@g4rcez/components 0.0.21 → 0.0.23
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/button.js +7 -7
- package/dist/components/core/tag.js +1 -1
- package/dist/components/display/calendar.js +1 -1
- package/dist/components/display/tabs.d.ts +1 -0
- package/dist/components/display/tabs.d.ts.map +1 -1
- package/dist/components/display/tabs.js +1 -1
- package/dist/components/floating/dropdown.d.ts +2 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +11 -2
- package/dist/components/form/autocomplete.d.ts.map +1 -1
- package/dist/components/form/autocomplete.js +5 -3
- package/dist/components/form/checkbox.js +1 -1
- package/dist/components/form/date-picker.js +1 -1
- package/dist/components/form/input-field.d.ts +2 -1
- package/dist/components/form/input-field.d.ts.map +1 -1
- package/dist/components/form/input-field.js +2 -2
- package/dist/components/form/input.d.ts.map +1 -1
- package/dist/components/form/input.js +2 -2
- package/dist/components/form/radiobox.d.ts +7 -0
- package/dist/components/form/radiobox.d.ts.map +1 -0
- package/dist/components/form/radiobox.js +7 -0
- package/dist/components/form/switch.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/table/filter.d.ts.map +1 -1
- package/dist/components/table/filter.js +3 -3
- package/dist/components/table/group.js +2 -2
- package/dist/components/table/index.d.ts +2 -1
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +3 -21
- package/dist/components/table/pagination.d.ts +2 -1
- package/dist/components/table/pagination.d.ts.map +1 -1
- package/dist/components/table/pagination.js +23 -3
- package/dist/components/table/sort.d.ts.map +1 -1
- package/dist/components/table/sort.js +7 -6
- package/dist/components/table/thead.d.ts.map +1 -1
- package/dist/components/table/thead.js +4 -2
- package/dist/hooks/use-parent.d.ts.map +1 -1
- package/dist/hooks/use-parent.js +0 -1
- package/dist/index.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4026 -3929
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +52 -37
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +0 -1
- package/dist/preset/preset.tailwind.d.ts.map +1 -1
- package/dist/preset/preset.tailwind.js +3 -2
- package/dist/preset/src/styles/theme.d.ts.map +1 -1
- package/dist/preset/src/styles/theme.js +16 -8
- package/dist/preset/src/styles/theme.types.d.ts +4 -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 +16 -8
- package/dist/styles/theme.types.d.ts +4 -0
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,133 +1,148 @@
|
|
|
1
|
-
(function(re,
|
|
1
|
+
(function(re,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],w):(re=typeof globalThis<"u"?globalThis:re||self,w(re.components={},re.React,re["react/jsx-runtime"],re.ReactDOM))})(this,function(re,w,x,Rd){"use strict";var fL=Object.defineProperty;var hL=(re,w,x)=>w in re?fL(re,w,{enumerable:!0,configurable:!0,writable:!0,value:x}):re[w]=x;var ne=(re,w,x)=>hL(re,typeof w!="symbol"?w+"":w,x);function jd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=jd(w),Bd=jd(Rd);function jn(e){return zd(e)?(e.nodeName||"").toLowerCase():"#document"}function $t(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(zd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zd(e){return e instanceof Node||e instanceof $t(e).Node}function Re(e){return e instanceof Element||e instanceof $t(e).Element}function st(e){return e instanceof HTMLElement||e instanceof $t(e).HTMLElement}function Ya(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $t(e).ShadowRoot}function Uo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function y0(e){return["table","td","th"].includes(jn(e))}function Js(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qa(e){const t=Ka(),n=Re(e)?Wt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function v0(e){let t=kn(e);for(;st(t)&&!Bn(t);){if(qa(t))return t;if(Js(t))return null;t=kn(t)}return null}function Ka(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bn(e){return["html","body","#document"].includes(jn(e))}function Wt(e){return $t(e).getComputedStyle(e)}function ei(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kn(e){if(jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ya(e)&&e.host||Pn(e);return Ya(t)?t.host:t}function Wd(e){const t=kn(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Uo(t)?t:Wd(t)}function zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wd(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=$t(o);return s?t.concat(i,i.visualViewport||[],Uo(o)?o:[],i.frameElement&&n?zn(i.frameElement):[]):t.concat(o,zn(o,[],n))}function tn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function mt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ya(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Za(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Hd(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Ud(e){return e.mozInputSource===0&&e.isTrusted?!0:Ja()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xa(e){return b0()?!1:!Ja()&&e.width===0&&e.height===0||Ja()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Qa(){return/apple/i.test(navigator.vendor)}function Ja(){const e=/android/i;return e.test(Za())||e.test(Hd())}function Gd(){return Za().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function b0(){return Hd().includes("jsdom/")}function Go(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function w0(e){return"nativeEvent"in e}function x0(e){return e.matches("html,body")}function gt(e){return(e==null?void 0:e.ownerDocument)||document}function el(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const S0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tl(e){return st(e)&&e.matches(S0)}function It(e){e.preventDefault(),e.stopPropagation()}function Yd(e){return e?e.getAttribute("role")==="combobox"&&tl(e):!1}const cn=Math.min,Ht=Math.max,ti=Math.round,Br=Math.floor,Hn=e=>({x:e,y:e}),T0={left:"right",right:"left",bottom:"top",top:"bottom"},E0={start:"end",end:"start"};function nl(e,t,n){return Ht(e,cn(t,n))}function zr(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function Wr(e){return e.split("-")[1]}function qd(e){return e==="x"?"y":"x"}function rl(e){return e==="y"?"height":"width"}function pr(e){return["top","bottom"].includes(Un(e))?"y":"x"}function ol(e){return qd(pr(e))}function C0(e,t,n){n===void 0&&(n=!1);const r=Wr(e),o=ol(e),s=rl(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ni(i)),[i,ni(i)]}function P0(e){const t=ni(e);return[sl(e),t,sl(t)]}function sl(e){return e.replace(/start|end/g,t=>E0[t])}function k0(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function O0(e,t,n,r){const o=Wr(e);let s=k0(Un(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(sl)))),s}function ni(e){return e.replace(/left|right|bottom|top/g,t=>T0[t])}function _0(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kd(e){return typeof e!="number"?_0(e):{top:e,right:e,bottom:e,left:e}}function ri(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
2
2
|
* tabbable 6.2.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var I0=["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])"],oi=I0.join(","),Qf=typeof Element>"u",Hr=Qf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,si=!Qf&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ii=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},D0=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},M0=function(t,n,r){if(ii(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(oi));return n&&Hr.call(t,oi)&&o.unshift(t),o=o.filter(r),o},N0=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ii(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Hr.call(i,oi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),d=!ii(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&d){var h=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Jf=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ed=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||D0(t))&&!Jf(t)?0:t.tabIndex},F0=function(t,n){var r=ed(t);return r<0&&n&&!Jf(t)?0:r},L0=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},td=function(t){return t.tagName==="INPUT"},V0=function(t){return td(t)&&t.type==="hidden"},$0=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R0=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},j0=function(t){if(!t.name)return!0;var n=t.form||si(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=R0(o,t.form);return!s||s===t},B0=function(t){return td(t)&&t.type==="radio"},z0=function(t){return B0(t)&&!j0(t)},W0=function(t){var n,r=t&&si(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=si(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},nd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},H0=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Hr.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Hr.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=si(t);if(l&&!l.shadowRoot&&o(l)===!0)return nd(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(W0(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return nd(t);return!1},U0=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Hr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},G0=function(t,n){return!(n.disabled||ii(n)||V0(n)||H0(n,t)||$0(n)||U0(n))},il=function(t,n){return!(z0(n)||ed(n)<0||!G0(t,n))},Y0=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},q0=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=F0(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(L0).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Yo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=N0([t],n.includeContainer,{filter:il.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Y0}):r=M0(t,n.includeContainer,il.bind(null,n)),q0(r)},K0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Hr.call(t,oi)===!1?!1:il(n,t)};function rd(e,t,n){let{reference:r,floating:o}=e;const s=pr(t),i=ol(t),a=rl(i),l=Un(t),c=s==="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(Wr(t)){case"start":h[i]-=d*(n&&c?-1:1);break;case"end":h[i]+=d*(n&&c?-1:1);break}return h}const Z0=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rd(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:w,y:g,data:T,reset:x}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,f=g??f,h={...h,[y]:{...h[y],...T}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=rd(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function al(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=zr(t,e),p=Xf(h),y=a[d?f==="floating"?"reference":"floating":f],v=ri(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},x=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(v.top-x.top+p.top)/T.y,bottom:(x.bottom-v.bottom+p.bottom)/T.y,left:(v.left-x.left+p.left)/T.x,right:(x.right-v.right+p.right)/T.x}}const X0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=zr(e,t)||{};if(c==null)return{};const f=Xf(u),d={x:n,y:r},h=ol(o),p=rl(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",w=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-d[h]-s.floating[p],x=d[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const O=T/2-x/2,I=C/2-m[p]/2-1,N=cn(f[v],I),L=cn(f[w],I),_=N,j=C-m[p]-L,D=C/2-m[p]/2+O,k=nl(_,D,j),F=!l.arrow&&Wr(o)!=null&&D!==k&&s.reference[p]/2-(D<_?N:L)-m[p]/2<0,$=F?D<_?D-_:D-j:0;return{[h]:d[h]+$,data:{[h]:k,centerOffset:D-k-$,...F&&{alignmentOffset:$}},reset:F}}}),Q0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=zr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),w=pr(a),g=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=d||(g||!m?[ni(a)]:O0(a)),E=p!=="none";!d&&E&&x.push(..._0(a,m,p,T));const C=[a,...x],O=await al(t,y),I=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(O[v]),f){const D=P0(o,i,T);I.push(O[D[0]],O[D[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(D=>D<=0)){var L,_;const D=(((L=s.flip)==null?void 0:L.index)||0)+1,k=C[D];if(k)return{data:{index:D,overflows:N},reset:{placement:k}};let F=(_=N.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(h){case"bestFit":{var j;const $=(j=N.filter(z=>{if(E){const q=pr(z.placement);return q===w||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function J0(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Un(n),a=Wr(n),l=pr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=zr(t,e);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 ew=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await J0(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},tw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...l}=zr(e,t),c={x:n,y:r},u=await al(t,l),f=pr(Un(o)),d=Zf(f);let h=c[d],p=c[f];if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=h+u[y],g=h-u[v];h=nl(w,h,g)}if(i){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=p+u[y],g=p-u[v];p=nl(w,p,g)}const m=a.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=zr(e,t),l=await al(t,a),c=Un(n),u=Wr(n),f=pr(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(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=d-l.left-l.right,w=cn(h-l[p],y),g=cn(d-l[m],v),T=!t.middlewareData.shift;let x=w,E=g;if(f?E=u||T?cn(g,v):v:x=u||T?cn(w,y):y,T&&!u){const O=Ht(l.left,0),I=Ht(l.right,0),N=Ht(l.top,0),L=Ht(l.bottom,0);f?E=d-2*(O!==0||I!==0?O+I:Ht(l.left,l.right)):x=h-2*(N!==0||L!==0?N+L:Ht(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:x});const C=await o.getDimensions(s.floating);return d!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function od(e){const t=Wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ti(n)!==s||ti(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ll(e){return Re(e)?e:e.contextElement}function Ur(e){const t=ll(e);if(!st(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=od(t);let i=(s?ti(n.width):n.width)/r,a=(s?ti(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const rw=Hn(0);function sd(e){const t=Vt(e);return!Ka()||!t.visualViewport?rw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ow(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ll(e);let i=Hn(1);t&&(r?Re(r)&&(i=Ur(r)):i=Ur(e));const a=ow(s,n,r)?sd(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const d=Vt(s),h=r&&Re(r)?Vt(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const y=Ur(m),v=m.getBoundingClientRect(),w=Wt(m),g=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=T,p=Vt(m),m=p.frameElement}}return ri({width:u,height:f,x:l,y:c})}function sw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Pn(r),a=t?Js(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),f=st(r);if((f||!f&&!s)&&((jn(r)!=="body"||Uo(i))&&(l=ei(r)),st(r))){const d=mr(r);c=Ur(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 iw(e){return Array.from(e.getClientRects())}function id(e){return mr(Pn(e)).left+ei(e).scrollLeft}function aw(e){const t=Pn(e),n=ei(e),r=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+id(e);const a=-n.scrollTop;return Wt(r).direction==="rtl"&&(i+=Ht(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function lw(e,t){const n=Vt(e),r=Pn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Ka();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function cw(e,t){const n=mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=st(e)?Ur(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function ad(e,t,n){let r;if(t==="viewport")r=lw(e,n);else if(t==="document")r=aw(Pn(e));else if(Re(t))r=cw(t,n);else{const o=sd(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ri(r)}function ld(e,t){const n=On(e);return n===t||!Re(n)||Bn(n)?!1:Wt(n).position==="fixed"||ld(n,t)}function uw(e,t){const n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(a=>Re(a)&&jn(a)!=="body"),o=null;const s=Wt(e).position==="fixed";let i=s?On(e):e;for(;Re(i)&&!Bn(i);){const a=Wt(i),l=qa(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Uo(i)&&!l&&ld(e,i))?r=r.filter(u=>u!==i):o=a,i=On(i)}return t.set(e,r),r}function fw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Js(t)?[]:uw(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=ad(t,u,o);return c.top=Ht(f.top,c.top),c.right=cn(f.right,c.right),c.bottom=cn(f.bottom,c.bottom),c.left=Ht(f.left,c.left),c},ad(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dw(e){const{width:t,height:n}=od(e);return{width:t,height:n}}function hw(e,t,n){const r=st(t),o=Pn(t),s=n==="fixed",i=mr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((jn(t)!=="body"||Uo(o))&&(a=ei(t)),r){const f=mr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=id(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function cl(e){return Wt(e).position==="static"}function cd(e,t){return!st(e)||Wt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ud(e,t){const n=Vt(e);if(Js(e))return n;if(!st(e)){let o=On(e);for(;o&&!Bn(o);){if(Re(o)&&!cl(o))return o;o=On(o)}return n}let r=cd(e,t);for(;r&&v0(r)&&cl(r);)r=cd(r,t);return r&&Bn(r)&&cl(r)&&!qa(r)?n:r||b0(e)||n}const pw=async function(e){const t=this.getOffsetParent||ud,n=this.getDimensions,r=await n(e.floating);return{reference:hw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mw(e){return Wt(e).direction==="rtl"}const gw={convertOffsetParentRelativeRectToViewportRelativeRect:sw,getDocumentElement:Pn,getClippingRect:fw,getOffsetParent:ud,getElementRects:pw,getClientRects:iw,getDimensions:dw,getScale:Ur,isElement:Re,isRTL:mw};function yw(e,t){let n=null,r;const o=Pn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Br(u),p=Br(o.clientWidth-(c+f)),m=Br(o.clientHeight-(u+d)),y=Br(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Ht(0,cn(1,l))||1};let g=!0;function T(x){const E=x[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return i(!0),s}function ul(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ll(e),u=o||s?[...c?zn(c):[],...zn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=c&&a?yw(c,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?mr(e):null;l&&y();function y(){const v=mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const vw=ew,bw=tw,ww=Q0,xw=nw,fd=X0,Sw=(e,t,n)=>{const r=new Map,o={platform:gw,...n},s={...o.platform,_c:r};return Z0(e,t,{...o,platform:s})};var ai=typeof document<"u"?b.useLayoutEffect:b.useEffect;function li(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!li(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!li(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function dd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hd(e,t){const n=dd(e);return Math.round(t*n)/n}function pd(e){const t=M.useRef(e);return ai(()=>{t.current=e}),t}function Tw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=M.useState(r);li(d,r)||h(r);const[p,m]=M.useState(null),[y,v]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==C.current&&(C.current=$,v($))},[]),T=s||p,x=i||y,E=M.useRef(null),C=M.useRef(null),O=M.useRef(u),I=l!=null,N=pd(l),L=pd(o),_=M.useCallback(()=>{if(!E.current||!C.current)return;const $={placement:t,strategy:n,middleware:d};L.current&&($.platform=L.current),Sw(E.current,C.current,$).then(z=>{const q={...z,isPositioned:!0};j.current&&!li(O.current,q)&&(O.current=q,Wf.flushSync(()=>{f(q)}))})},[d,t,n,L]);ai(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const j=M.useRef(!1);ai(()=>(j.current=!0,()=>{j.current=!1}),[]),ai(()=>{if(T&&(E.current=T),x&&(C.current=x),T&&x){if(N.current)return N.current(T,x,_);_()}},[T,x,_,N,I]);const D=M.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:g}),[w,g]),k=M.useMemo(()=>({reference:T,floating:x}),[T,x]),F=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!k.floating)return $;const z=hd(k.floating,u.x),q=hd(k.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+q+"px)",...dd(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,k.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:_,refs:D,elements:k,floatingStyles:F}),[u,_,D,k,F])}const Ew=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fd({element:r.current,padding:o}).fn(n):{}:r?fd({element:r,padding:o}).fn(n):{}}}},fl=(e,t)=>({...vw(e),options:[e,t]}),md=(e,t)=>({...bw(e),options:[e,t]}),gd=(e,t)=>({...ww(e),options:[e,t]}),Cw=(e,t)=>({...xw(e),options:[e,t]}),yd=(e,t)=>({...Ew(e),options:[e,t]}),vd={...M},Pw=vd.useInsertionEffect||(e=>e());function Ut(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Pw(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const dl="ArrowUp",qo="ArrowDown",Gr="ArrowLeft",Yr="ArrowRight";function ci(e,t,n){return Math.floor(e/t)!==n}function Ko(e,t){return t<0||t>=e.current.length}function hl(e,t){return Tt(e,{disabledIndices:t})}function bd(e,t){return Tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ui(i,a,o));return a}function Ow(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===dl){if(u&&It(n),c===-1)f=l;else if(f=Tt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const d=c%s,h=l%s,p=l-(h-d);h===d?f=l:f=h>d?p:p-s}Ko(e,f)&&(f=c)}if(n.key===qo&&(u&&It(n),c===-1?f=a:(f=Tt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=Tt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ko(e,f)&&(f=c)),r==="both"){const d=Br(c/s);n.key===Yr&&(u&&It(n),c%s!==s-1?(f=Tt(e,{startingIndex:c,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i})),ci(f,s,d)&&(f=c)),n.key===Gr&&(u&&It(n),c%s!==0?(f=Tt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),ci(f,s,d)&&(f=c));const h=Br(l/s)===d;Ko(e,f)&&(o&&h?f=n.key===Gr?l:Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function kw(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function _w(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function Aw(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ui(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let wd=0;function Gn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(wd);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():wd=requestAnimationFrame(s)}var We=typeof document<"u"?b.useLayoutEffect:b.useEffect;function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}let xd=!1,Iw=0;const Sd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Iw++;function Dw(){const[e,t]=M.useState(()=>xd?Sd():void 0);return We(()=>{e==null&&t(Sd())},[]),M.useEffect(()=>{xd=!0},[]),e}const Zo=vd.useId||Dw;let Xo;process.env.NODE_ENV!=="production"&&(Xo=new Set);function fi(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.warn(o)}}function Mw(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.error(o)}}const Td=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fi("The `ref` prop is required for `FloatingArrow`."));const y=Zo(),[v,w]=M.useState(!1);if(We(()=>{if(!o)return;Wt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const g=c*2,T=g/2,x=i/2*(l/-8+1),E=a/2*l/4,[C,O]=r.split("-"),I=!!d,N=C==="top"||C==="bottom",L=u&&O==="end"?"bottom":"top";let _=u&&O==="end"?"right":"left";u&&v&&(_=O==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",D=(s==null?void 0:s.y)!=null?u||s.y:"",k=d||"M0,0"+(" H"+i)+(" L"+(i-x)+","+(a-E))+(" Q"+i/2+","+a+" "+x+","+(a-E))+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return M.createElement("svg",qr({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:j,[L]:D,[C]:N||I?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:k}),M.createElement("path",{stroke:g&&!d?m.fill:"none",d:k}),M.createElement("clipPath",{id:y},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function Nw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Fw=M.createContext(null),Lw=M.createContext(null),di=()=>{var e;return((e=M.useContext(Fw))==null?void 0:e.id)||null},Qo=()=>M.useContext(Lw);function Yn(e){return"data-floating-ui-"+e}function Dt(e){const t=b.useRef(e);return We(()=>{t.current=e}),t}const Ed=Yn("safe-polygon");function pl(e,t,n){return n&&!Go(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Vw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=Qo(),p=di(),m=Dt(c),y=Dt(l),v=Dt(n),w=M.useRef(),g=M.useRef(-1),T=M.useRef(),x=M.useRef(-1),E=M.useRef(!0),C=M.useRef(!1),O=M.useRef(()=>{}),I=M.useCallback(()=>{var k;const F=(k=o.current.openEvent)==null?void 0:k.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function k(F){let{open:$}=F;$||(clearTimeout(g.current),clearTimeout(x.current),E.current=!0)}return s.on("openchange",k),()=>{s.off("openchange",k)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function k($){I()&&r(!1,$,"hover")}const F=mt(i.floating).documentElement;return F.addEventListener("mouseleave",k),()=>{F.removeEventListener("mouseleave",k)}},[i.floating,n,r,a,m,I]);const N=M.useCallback(function(k,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const z=pl(y.current,"close",w.current);z&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,k,$),z)):F&&(clearTimeout(g.current),r(!1,k,$))},[y,r]),L=Ut(()=>{O.current(),T.current=void 0}),_=Ut(()=>{if(C.current){const k=mt(i.floating).body;k.style.pointerEvents="",k.removeAttribute(Ed),C.current=!1}});M.useEffect(()=>{if(!a)return;function k(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(P){if(clearTimeout(g.current),E.current=!1,u&&!Go(w.current)||f>0&&!pl(y.current,"open"))return;const V=pl(y.current,"open",w.current);V?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},V):r(!0,P,"hover")}function $(P){if(k())return;O.current();const V=mt(i.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P,!0,"safe-polygon")}});const ie=T.current;V.addEventListener("mousemove",ie),O.current=()=>{V.removeEventListener("mousemove",ie)};return}(w.current==="touch"?!pt(i.floating,P.relatedTarget):!0)&&N(P)}function z(P){k()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P)}})(P))}if(Re(i.domReference)){var q;const P=i.domReference;return n&&P.addEventListener("mouseleave",z),(q=i.floating)==null||q.addEventListener("mouseleave",z),d&&P.addEventListener("mousemove",F,{once:!0}),P.addEventListener("mouseenter",F),P.addEventListener("mouseleave",$),()=>{var V;n&&P.removeEventListener("mouseleave",z),(V=i.floating)==null||V.removeEventListener("mouseleave",z),d&&P.removeEventListener("mousemove",F),P.removeEventListener("mouseenter",F),P.removeEventListener("mouseleave",$)}}},[i,a,e,u,f,d,N,L,_,r,n,v,h,y,m,o]),We(()=>{var k;if(a&&n&&(k=m.current)!=null&&k.__options.blockPointerEvents&&I()){const $=mt(i.floating).body;$.setAttribute(Ed,""),$.style.pointerEvents="none",C.current=!0;const z=i.floating;if(Re(i.domReference)&&z){var F;const q=i.domReference,P=h==null||(F=h.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return P&&(P.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),We(()=>{n||(w.current=void 0,L(),_())},[n,L,_]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(x.current),_()},[a,i.domReference,L,_]);const j=M.useMemo(()=>{function k(F){w.current=F.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(F){const{nativeEvent:$}=F;function z(){!E.current&&!v.current&&r(!0,$,"hover")}u&&!Go(w.current)||n||f===0||(clearTimeout(x.current),w.current==="touch"?z():x.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),D=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(k){N(k.nativeEvent,!1)}}),[N]);return M.useMemo(()=>a?{reference:j,floating:D}:{},[a,j,D])}function $w(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Kr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Rw(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Kr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Zr=new WeakMap,hi=new WeakSet,pi={},ml=0;const jw=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cd=e=>e&&(e.host||Cd(e.parentNode)),Bw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cd(n);return e.contains(r)?r:null}).filter(n=>n!=null);function zw(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Bw(t,e),a=new Set,l=new Set(i),c=[];pi[o]||(pi[o]=new WeakMap);const u=pi[o];i.forEach(f),d(t),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(jn(p)!=="script")if(a.has(p))d(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Zr.get(p)||0)+1,w=(u.get(p)||0)+1;Zr.set(p,v),u.set(p,w),c.push(p),v===1&&y&&hi.add(p),w===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return ml++,()=>{c.forEach(h=>{const p=(Zr.get(h)||0)-1,m=(u.get(h)||0)-1;Zr.set(h,p),u.set(h,m),p||(!hi.has(h)&&s&&h.removeAttribute(s),hi.delete(h)),m||h.removeAttribute(o)}),ml--,ml||(Zr=new WeakMap,Zr=new WeakMap,hi=new WeakSet,pi={})}}function Pd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=mt(e[0]).body;return zw(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Od(e,t){const n=Yo(e,Xr());t==="prev"&&n.reverse();const r=n.indexOf(tn(mt(e)));return n.slice(r+1)[0]}function kd(){return Od(document.body,"next")}function _d(){return Od(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function Ww(e){Yo(e,Xr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Hw(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Uw(e,t,n){const r=e.indexOf(t);function o(i){const a=Yn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||pt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const gl={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 Gw;function Ad(e){e.key==="Tab"&&(e.target,clearTimeout(Gw))}const mi=M.forwardRef(function(t,n){const[r,o]=M.useState();We(()=>(Qa()&&o("button"),document.addEventListener("keydown",Ad),()=>{document.removeEventListener("keydown",Ad)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:gl};return M.createElement("span",qr({},t,s))}),Id=M.createContext(null),Dd=Yn("portal");function Yw(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Md(),[s,i]=M.useState(null),a=M.useRef(null);return We(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),We(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Dd,""),l.appendChild(c),a.current=c,i(c)},[t,r]),We(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Re(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Dd,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function gi(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=Yw({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),d=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Jo(p)&&(p.type==="focusin"?Hw:Ww)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(Id.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},d&&s&&M.createElement(mi,{"data-type":"outside",ref:l,onFocus:h=>{if(Jo(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=_d()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),d&&s&&M.createElement("span",{"aria-owns":s.id,style:gl}),s&&Wf.createPortal(t,s),d&&s&&M.createElement(mi,{"data-type":"outside",ref:c,onFocus:h=>{if(Jo(h,s)){var p;(p=f.current)==null||p.focus()}else{const m=kd()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Md=()=>M.useContext(Id),Nd=20;let gr=[];function yl(e){gr=gr.filter(n=>n.isConnected);let t=e;if(!(!t||jn(t)==="body")){if(!K0(t,Xr())){const n=Yo(t,Xr())[0];n&&(t=n)}gr.push(t),gr.length>Nd&&(gr=gr.slice(-Nd))}}function Fd(){return gr.slice().reverse().find(e=>e.isConnected)}const qw=M.forwardRef(function(t,n){return M.createElement("button",qr({},t,{type:"button",ref:n,tabIndex:-1,style:gl}))});function vl(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:d,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:w,elements:{domReference:g,floating:T}}=t,x=typeof i=="number"&&i<0,E=Kf(g)&&x,C=jw()?s:!0,O=Dt(o),I=Dt(i),N=Dt(a),L=Qo(),_=Md(),j=M.useRef(null),D=M.useRef(null),k=M.useRef(!1),F=M.useRef(!1),$=M.useRef(-1),z=_!=null,q=T==null?void 0:T.firstElementChild,P=(q==null?void 0:q.id)===w?q:T,V=Ut(function(H){return H===void 0&&(H=P),H?Yo(H,Xr()):[]}),Q=Ut(H=>{const A=V(H);return O.current.map(R=>g&&R==="reference"?g:P&&R==="floating"?P:A).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){pt(P,tn(mt(P)))&&V().length===0&&!E&&It(R);const W=Q(),Y=Wn(R);O.current[0]==="reference"&&Y===g&&(It(R),R.shiftKey?Gn(W[W.length-1]):Gn(W[1])),O.current[1]==="floating"&&Y===P&&R.shiftKey&&(It(R),Gn(W[0]))}}const A=mt(P);return A.addEventListener("keydown",H),()=>{A.removeEventListener("keydown",H)}},[r,g,P,c,O,E,V,Q]),M.useEffect(()=>{if(r||!T)return;function H(A){const R=Wn(A),Y=V().indexOf(R);Y!==-1&&($.current=Y)}return T.addEventListener("focusin",H),()=>{T.removeEventListener("focusin",H)}},[r,T,V]),M.useEffect(()=>{if(r||!f)return;function H(){F.current=!0,setTimeout(()=>{F.current=!1})}function A(R){const W=R.relatedTarget;queueMicrotask(()=>{const Y=!(pt(g,W)||pt(T,W)||pt(W,T)||pt(_==null?void 0:_.portalNode,W)||W!=null&&W.hasAttribute(Yn("focus-guard"))||L&&(Kr(L.nodesRef.current,p).find(Z=>{var de,B;return pt((de=Z.context)==null?void 0:de.elements.floating,W)||pt((B=Z.context)==null?void 0:B.elements.domReference,W)})||$w(L.nodesRef.current,p).find(Z=>{var de,B;return((de=Z.context)==null?void 0:de.elements.floating)===W||((B=Z.context)==null?void 0:B.elements.domReference)===W})));if(l&&Y&&tn(mt(P))===mt(P).body){st(P)&&(P==null||P.focus());const Z=$.current,de=V(),B=de[Z]||de[de.length-1]||P;st(B)&&B.focus()}(E||!c)&&W&&Y&&!F.current&&W!==Fd()&&(k.current=!0,m(!1,R))})}if(T&&st(g))return g.addEventListener("focusout",A),g.addEventListener("pointerdown",H),T.addEventListener("focusout",A),()=>{g.removeEventListener("focusout",A),g.removeEventListener("pointerdown",H),T.removeEventListener("focusout",A)}},[r,g,T,P,c,p,L,_,m,f,l,V,E]),M.useEffect(()=>{var H;if(r)return;const A=Array.from((_==null||(H=_.portalNode)==null?void 0:H.querySelectorAll("["+Yn("portal")+"]"))||[]);if(T){const R=[T,...A,j.current,D.current,O.current.includes("reference")||E?g:null].filter(Y=>Y!=null),W=c||E?Pd(R,C,!C):Pd(R);return()=>{W()}}},[r,g,T,c,O,_,E,C]),We(()=>{if(r||!st(P))return;const H=mt(P),A=tn(H);queueMicrotask(()=>{const R=Q(P),W=I.current,Y=(typeof W=="number"?R[W]:W.current)||P,Z=pt(P,A);!x&&!Z&&d&&Gn(Y,{preventScroll:Y===P})})},[r,d,P,x,Q,I]),We(()=>{if(r||!P)return;let H=!1;const A=mt(P),R=tn(A);let Y=v.current.openEvent;const Z=h.domReference.current;yl(R);function de(B){let{open:Me,reason:rt,event:He,nested:ot}=B;Me&&(Y=He),rt==="escape-key"&&h.domReference.current&&yl(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(k.current=!0),rt==="outside-press"&&(ot?(k.current=!1,H=!0):k.current=!(Yf(He)||Xa(He)))}return y.on("openchange",de),()=>{y.off("openchange",de);const B=tn(A),Me=pt(T,B)||L&&Kr(L.nodesRef.current,p).some(ue=>{var Ee;return pt((Ee=ue.context)==null?void 0:Ee.elements.floating,B)});(Me||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&yl(h.domReference.current);const He=Z||R,ot=Yo(mt(He).body,Xr());queueMicrotask(()=>{let ue=Fd();!ue&&st(He)&&T&&(ue=Uw(ot,He,T)),N.current&&!k.current&&st(ue)&&(!(ue!==B&&B!==A.body)||Me)&&ue.focus({preventScroll:H})})}},[r,T,P,N,v,h,y,L,p]),We(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,d,m,h,f]),We(()=>{if(r||!P||typeof MutationObserver!="function"||x)return;const H=()=>{const R=P.getAttribute("tabindex"),W=V(),Y=tn(mt(T)),Z=W.indexOf(Y);Z!==-1&&($.current=Z),O.current.includes("floating")||Y!==h.domReference.current&&W.length===0?R!=="0"&&P.setAttribute("tabindex","0"):R!=="-1"&&P.setAttribute("tabindex","-1")};H();const A=new MutationObserver(H);return A.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{A.disconnect()}},[r,T,P,h,O,V,x]);function ie(H){return r||!u||!c?null:M.createElement(qw,{ref:H==="start"?j:D,onClick:A=>m(!1,A.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:H=>{if(c){const R=Q();Gn(o[0]==="reference"?R[0]:R[R.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(k.current=!1,Jo(H,_.portalNode)){const R=kd()||g;R==null||R.focus()}else{var A;(A=_.beforeOutsideRef.current)==null||A.focus()}}}),!E&&ie("start"),n,ie("end"),ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:H=>{if(c)Gn(Q()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(f&&(k.current=!0),Jo(H,_.portalNode)){const R=_d()||g;R==null||R.focus()}else{var A;(A=_.afterOutsideRef.current)==null||A.focus()}}}))}const bl=new Set,Kw=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Zo();return We(()=>{if(!r)return;bl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Za()),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"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(d-Math.floor(y))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{bl.delete(s),bl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,d)))}},[s,r]),M.createElement("div",qr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Ld(e){return st(e.target)&&e.target.tagName==="BUTTON"}function Vd(e){return tl(e)}function $d(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,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"&&(Go(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}Go(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||Ld(p))&&(p.key===" "&&!Vd(s)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Ld(p)||Vd(s)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:h}:{},[i,h])}const Zw={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Xw={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Rd=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function yi(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=t,m=Qo(),y=Ut(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,w=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:x}=Rd(h),{escapeKey:E,outsidePress:C}=Rd(p),O=Ut(D=>{var k;if(!n||!i||!a||D.key!=="Escape")return;const F=(k=s.current.floatingContext)==null?void 0:k.nodeId,$=m?Kr(m.nodesRef.current,F):[];if(!T&&(D.stopPropagation(),$.length>0)){let z=!0;if($.forEach(q=>{var P;if((P=q.context)!=null&&P.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,x0(D)?D.nativeEvent:D,"escape-key")}),I=Ut(D=>{var k;const F=()=>{var $;O(D),($=Wn(D))==null||$.removeEventListener("keydown",F)};(k=Wn(D))==null||k.addEventListener("keydown",F)}),N=Ut(D=>{var k;const F=w.current;w.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||F||typeof v=="function"&&!v(D))return;const z=Wn(D),q="["+Yn("inert")+"]",P=mt(o.floating).querySelectorAll(q);let V=Re(z)?z:null;for(;V&&!Bn(V);){const H=On(V);if(Bn(H)||!Re(H))break;V=H}if(P.length&&Re(z)&&!S0(z)&&!pt(z,o.floating)&&Array.from(P).every(H=>!pt(V,H)))return;if(st(z)&&j){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,A=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=A&&D.offsetX>z.clientWidth;if(A&&Wt(z).direction==="rtl"&&(R=D.offsetX<=z.offsetWidth-z.clientWidth),R||H&&D.offsetY>z.clientHeight)return}const Q=(k=s.current.floatingContext)==null?void 0:k.nodeId,ie=m&&Kr(m.nodesRef.current,Q).some(H=>{var A;return el(D,(A=H.context)==null?void 0:A.elements.floating)});if(el(D,o.floating)||el(D,o.domReference)||ie)return;const ee=m?Kr(m.nodesRef.current,Q):[];if(ee.length>0){let H=!0;if(ee.forEach(A=>{var R;if((R=A.context)!=null&&R.open&&!A.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,D,"outside-press")}),L=Ut(D=>{var k;const F=()=>{var $;N(D),($=Wn(D))==null||$.removeEventListener(c,F)};(k=Wn(D))==null||k.addEventListener(c,F)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=x;function D($){r(!1,$,"ancestor-scroll")}const k=mt(o.floating);a&&k.addEventListener("keydown",E?I:O,E),v&&k.addEventListener(c,C?L:N,C);let F=[];return d&&(Re(o.domReference)&&(F=zn(o.domReference)),Re(o.floating)&&(F=F.concat(zn(o.floating))),!Re(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(zn(o.reference.contextElement)))),F=F.filter($=>{var z;return $!==((z=k.defaultView)==null?void 0:z.visualViewport)}),F.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{a&&k.removeEventListener("keydown",E?I:O,E),v&&k.removeEventListener(c,C?L:N,C),F.forEach($=>{$.removeEventListener("scroll",D)})}},[s,o,a,v,c,n,r,d,i,T,x,O,E,I,N,C,L]),M.useEffect(()=>{w.current=!1},[v,c]);const _=M.useMemo(()=>({onKeyDown:O,[Zw[f]]:D=>{u&&r(!1,D.nativeEvent,"reference-press")}}),[O,r,u,f]),j=M.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[Xw[c]]:()=>{w.current=!0}}),[O,c]);return M.useMemo(()=>i?{reference:_,floating:j}:{},[i,_,j])}function Qw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),s=M.useRef({}),[i]=M.useState(()=>Nw()),a=di()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Re(h)&&Mw("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=Ut((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),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:s,open:t,onOpenChange:u,elements:d,events:i,floatingId:o,refs:f}),[t,u,d,i,o,f])}function vi(e){e===void 0&&(e={});const{nodeId:t}=e,n=Qw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,f=M.useRef(null),d=Qo();We(()=>{u&&(f.current=u)},[u]);const h=Tw({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=Re(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{(Re(g)||g===null)&&(f.current=g,i(g)),(Re(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Re(g))&&h.refs.setReference(g)},[h.refs]),y=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=M.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=w;const g=d==null?void 0:d.nodesRef.current.find(T=>T.id===t);g&&(g.context=w)}),M.useMemo(()=>({...h,context:w,refs:y,elements:v}),[h,y,v,w])}function Jw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&st(i.domReference)&&i.domReference===tn(mt(i.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)}},[i.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){Xa(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Wn(h.nativeEvent);if(l&&Re(p))try{if(Qa()&&qf())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!tl(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Re(p)&&p.hasAttribute(Yn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=tn(i.domReference?i.domReference.ownerDocument:document);!p&&w===i.domReference||pt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,w)||pt(i.domReference,w)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:d}:{},[a,d])}const jd="active",Bd="selected";function wl(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[jd]:i,[Bd]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[jd,Bd].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),i[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(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function bi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>wl(a,e,"reference"),t),s=M.useCallback(a=>wl(a,e,"floating"),n),i=M.useCallback(a=>wl(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let zd=!1;function wi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Wd(e,t){return wi(t,e===dl||e===qo,e===Gr||e===Yr)}function xl(e,t,n){return wi(t,e===qo,n?e===Gr:e===Yr)||e==="Enter"||e===" "||e===""}function ex(e,t,n){return wi(t,n?e===Gr:e===Yr,e===qo)}function Hd(e,t,n){return wi(t,n?e===Yr:e===Gr,e===dl)}function tx(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:x=!0,virtualItemRef:E,itemSizes:C,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||fi("`useListNavigation` looping must be enabled to allow escaping."),p||fi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&fi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=di(),N=Qo(),L=Ut(a),_=M.useRef(m),j=M.useRef(c??-1),D=M.useRef(null),k=M.useRef(!0),F=M.useRef(L),$=M.useRef(!!o.floating),z=M.useRef(n),q=M.useRef(!1),P=M.useRef(!1),V=Dt(w),Q=Dt(n),ie=Dt(x),ee=Dt(o.floating),H=Dt(c),[A,R]=M.useState(),[W,Y]=M.useState(),Z=Ut(function(ue,Ee,le){le===void 0&&(le=!1);function Oe(ke){p?(R(ke.id),N==null||N.events.emit("virtualfocus",ke),E&&(E.current=ke)):Gn(ke,{preventScroll:!0,sync:qf()&&Qa()?zd||q.current:!1})}const ut=ue.current[Ee.current];ut&&Oe(ut),requestAnimationFrame(()=>{const ke=ue.current[Ee.current]||ut;if(!ke)return;ut||Oe(ke);const ft=ie.current;ft&&B&&(le||!k.current)&&(ke.scrollIntoView==null||ke.scrollIntoView(typeof ft=="boolean"?{block:"nearest",inline:"nearest"}:ft))})});We(()=>{document.createElement("div").focus({get preventScroll(){return zd=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?_.current&&c!=null&&(P.current=!0,j.current=c,L(c)):$.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,L]),We(()=>{if(l&&n&&o.floating)if(i==null){if(q.current=!1,H.current!=null)return;if($.current&&(j.current=-1,Z(s,j)),(!z.current||!$.current)&&_.current&&(D.current!=null||_.current===!0&&D.current==null)){let ue=0;const Ee=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Ee),ue++):(j.current=D.current==null||xl(D.current,g,h)||d?hl(s,V.current):bd(s,V.current),D.current=null,L(j.current))};Ee()}}else Ko(s,i)||(j.current=i,Z(s,j,P.current),P.current=!1)},[l,n,o.floating,i,H,d,s,g,h,L,Z,V]),We(()=>{var ue;if(!l||o.floating||!N||p||!$.current)return;const Ee=N.nodesRef.current,le=(ue=Ee.find(ke=>ke.id===I))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Oe=tn(mt(o.floating)),ut=Ee.some(ke=>ke.context&&pt(ke.context.elements.floating,Oe));le&&!ut&&k.current&&le.focus({preventScroll:!0})},[l,o.floating,N,I,p]),We(()=>{if(!l||!N||!p||I)return;function ue(Ee){Y(Ee.id),E&&(E.current=Ee)}return N.events.on("virtualfocus",ue),()=>{N.events.off("virtualfocus",ue)}},[l,N,p,I,E]),We(()=>{F.current=L,$.current=!!o.floating}),We(()=>{n||(D.current=null)},[n]),We(()=>{z.current=n},[n]);const de=i!=null,B=M.useMemo(()=>{function ue(le){if(!n)return;const Oe=s.current.indexOf(le);Oe!==-1&&L(Oe)}return{onFocus(le){let{currentTarget:Oe}=le;ue(Oe)},onClick:le=>{let{currentTarget:Oe}=le;return Oe.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:Oe}=le;ue(Oe)},onPointerLeave(le){let{pointerType:Oe}=le;!k.current||Oe==="touch"||(j.current=-1,Z(s,j),L(null),p||Gn(ee.current,{preventScroll:!0}))}}}},[n,ee,Z,y,s,L,p]),Me=Ut(ue=>{if(k.current=!1,q.current=!0,!Q.current&&ue.currentTarget===ee.current)return;if(d&&Hd(ue.key,g,h)){It(ue),r(!1,ue.nativeEvent,"list-navigation"),st(o.domReference)&&!p&&o.domReference.focus();return}const Ee=j.current,le=hl(s,w),Oe=bd(s,w);if(ue.key==="Home"&&(It(ue),j.current=le,L(j.current)),ue.key==="End"&&(It(ue),j.current=Oe,L(j.current)),T>1){const ut=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ke=kw(ut,T,O),ft=ke.findIndex(se=>se!=null&&!ui(s.current,se,w)),X=ke.reduce((se,_e,Ke)=>_e!=null&&!ui(s.current,_e,w)?Ke:se,-1);if(j.current=ke[Ow({current:ke.map(se=>se!=null?s.current[se]:null)},{event:ue,orientation:g,loop:f,cols:T,disabledIndices:Aw([...w||s.current.map((se,_e)=>ui(s.current,_e)?_e:void 0),void 0],ke),minIndex:ft,maxIndex:X,prevIndex:_w(j.current>Oe?le:j.current,ut,ke,T,ue.key===qo?"bl":ue.key===Yr?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(Wd(ue.key,g)){if(It(ue),n&&!p&&tn(ue.currentTarget.ownerDocument)===ue.currentTarget){j.current=xl(ue.key,g,h)?le:Oe,L(j.current);return}xl(ue.key,g,h)?f?j.current=Ee>=Oe?u&&Ee!==s.current.length?-1:le:Tt(s,{startingIndex:Ee,disabledIndices:w}):j.current=Math.min(Oe,Tt(s,{startingIndex:Ee,disabledIndices:w})):f?j.current=Ee<=le?u&&Ee!==-1?s.current.length:Oe:Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:w}):j.current=Math.max(le,Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Ko(s,j.current)?L(null):L(j.current)}}),rt=M.useMemo(()=>p&&n&&de&&{"aria-activedescendant":W||A},[p,n,de,W,A]),He=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Kf(o.domReference)&&rt,onKeyDown:Me,onPointerMove(){k.current=!0}}),[rt,Me,o.domReference,g]),ot=M.useMemo(()=>{function ue(le){m==="auto"&&Yf(le.nativeEvent)&&(_.current=!0)}function Ee(le){_.current=m,m==="auto"&&Xa(le.nativeEvent)&&(_.current=!0)}return{...rt,onKeyDown(le){k.current=!1;const Oe=le.key.indexOf("Arrow")===0,ut=ex(le.key,g,h),ke=Hd(le.key,g,h),ft=Wd(le.key,g),X=(d?ut:ft)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const St=N==null?void 0:N.nodesRef.current.find(Lt=>Lt.parentId==null),At=N&&St?Rw(N.nodesRef.current,St.id):null;if(Oe&&At&&E){const Lt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(ut||ke){var se,_e;const jr=((se=At.context)==null?void 0:se.elements.domReference)===le.currentTarget,Wo=ke&&!jr?(_e=At.context)==null?void 0:_e.elements.domReference:ut?s.current.find(Ho=>(Ho==null?void 0:Ho.id)===A):null;Wo&&(It(le),Wo.dispatchEvent(Lt),Y(void 0))}if(ft&&At.context&&At.context.open&&At.parentId&&le.currentTarget!==At.context.elements.domReference){var Ke;It(le),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return Me(le)}if(!(!n&&!v&&Oe)){if(X&&(D.current=d&&ft?null:le.key),d){ut&&(It(le),n?(j.current=hl(s,V.current),L(j.current)):r(!0,le.nativeEvent,"list-navigation"));return}ft&&(c!=null&&(j.current=c),It(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):Me(le),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:ue,onClick:ue}},[A,rt,Me,V,m,s,d,L,r,n,v,g,h,c,N,p,E]);return M.useMemo(()=>l?{reference:ot,floating:He,item:B}:{},[l,ot,He,B])}const nx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=nx.get(i))!=null?n:i,l=Zo(),u=di()!=null,f=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),d=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=M.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:f,floating:d,item:h}:{},[s,f,d,h])}const Ud=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qr(e,t){return typeof e=="function"?e(t):e}function rx(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function ox(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=rx(n,i);return!c&&a==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function sx(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,d=(u?i:i.close)||0,[h,p]=M.useState(()=>({...Qr(s,c),...Qr(n,c)})),{isMounted:m,status:y}=ox(e,{duration:i}),v=Dt(n),w=Dt(r),g=Dt(o),T=Dt(s);return We(()=>{const x=Qr(v.current,c),E=Qr(g.current,c),C=Qr(T.current,c),O=Qr(w.current,c)||Object.keys(x).reduce((I,N)=>(I[N]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...x})),y==="open"&&p({transitionProperty:Object.keys(O).map(Ud).join(","),transitionDuration:f+"ms",...C,...O}),y==="close"){const I=E||x;p({transitionProperty:Object.keys(I).map(Ud).join(","),transitionDuration:d+"ms",...C,...I})}},[d,g,v,w,T,f,y,c]),{isMounted:m,styles:h}}class Si{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Si.getDescendantProperty(a[l],s,r);else s&&Si.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Jr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Si.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Jr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Jr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Jr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}/**
|
|
4
|
+
*/var A0=["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])"],oi=A0.join(","),Zd=typeof Element>"u",Hr=Zd?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,si=!Zd&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ii=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},I0=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},D0=function(t,n,r){if(ii(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(oi));return n&&Hr.call(t,oi)&&o.unshift(t),o=o.filter(r),o},M0=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ii(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Hr.call(i,oi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!ii(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var h=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Xd=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Qd=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||I0(t))&&!Xd(t)?0:t.tabIndex},N0=function(t,n){var r=Qd(t);return r<0&&n&&!Xd(t)?0:r},F0=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Jd=function(t){return t.tagName==="INPUT"},L0=function(t){return Jd(t)&&t.type==="hidden"},V0=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$0=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},R0=function(t){if(!t.name)return!0;var n=t.form||si(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=$0(o,t.form);return!s||s===t},j0=function(t){return Jd(t)&&t.type==="radio"},B0=function(t){return j0(t)&&!R0(t)},z0=function(t){var n,r=t&&si(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=si(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},ef=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},W0=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Hr.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Hr.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=si(t);if(l&&!l.shadowRoot&&o(l)===!0)return ef(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(z0(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ef(t);return!1},H0=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Hr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},U0=function(t,n){return!(n.disabled||ii(n)||L0(n)||W0(n,t)||V0(n)||H0(n))},il=function(t,n){return!(B0(n)||Qd(n)<0||!U0(t,n))},G0=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Y0=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=N0(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(F0).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Yo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=M0([t],n.includeContainer,{filter:il.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:G0}):r=D0(t,n.includeContainer,il.bind(null,n)),Y0(r)},q0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Hr.call(t,oi)===!1?!1:il(n,t)};function tf(e,t,n){let{reference:r,floating:o}=e;const s=pr(t),i=ol(t),a=rl(i),l=Un(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Wr(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const K0=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=tf(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:T,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,d=g??d,h={...h,[y]:{...h[y],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=tf(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function al(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=zr(t,e),p=Kd(h),y=a[f?d==="floating"?"reference":"floating":d],v=ri(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},S=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-S.top+p.top)/T.y,bottom:(S.bottom-v.bottom+p.bottom)/T.y,left:(v.left-S.left+p.left)/T.x,right:(S.right-v.right+p.right)/T.x}}const Z0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=zr(e,t)||{};if(c==null)return{};const d=Kd(u),f={x:n,y:r},h=ol(o),p=rl(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-f[h]-s.floating[p],S=f[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const k=T/2-S/2,I=C/2-m[p]/2-1,N=cn(d[v],I),L=cn(d[b],I),O=N,j=C-m[p]-L,D=C/2-m[p]/2+k,_=nl(O,D,j),F=!l.arrow&&Wr(o)!=null&&D!==_&&s.reference[p]/2-(D<O?N:L)-m[p]/2<0,$=F?D<O?D-O:D-j:0;return{[h]:f[h]+$,data:{[h]:_,centerOffset:D-_-$,...F&&{alignmentOffset:$}},reset:F}}}),X0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=zr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),b=pr(a),g=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(g||!m?[ni(a)]:P0(a)),E=p!=="none";!f&&E&&S.push(...O0(a,m,p,T));const C=[a,...S],k=await al(t,y),I=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[v]),d){const D=C0(o,i,T);I.push(k[D[0]],k[D[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(D=>D<=0)){var L,O;const D=(((L=s.flip)==null?void 0:L.index)||0)+1,_=C[D];if(_)return{data:{index:D,overflows:N},reset:{placement:_}};let F=(O=N.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(h){case"bestFit":{var j;const $=(j=N.filter(z=>{if(E){const q=pr(z.placement);return q===b||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function Q0(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Un(n),a=Wr(n),l=pr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=zr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const J0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Q0(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},ew=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=zr(e,t),c={x:n,y:r},u=await al(t,l),d=pr(Un(o)),f=qd(d);let h=c[f],p=c[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=nl(b,h,g)}if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=nl(b,p,g)}const m=a.fn({...t,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},tw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=zr(e,t),l=await al(t,a),c=Un(n),u=Wr(n),d=pr(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=f-l.left-l.right,b=cn(h-l[p],y),g=cn(f-l[m],v),T=!t.middlewareData.shift;let S=b,E=g;if(d?E=u||T?cn(g,v):v:S=u||T?cn(b,y):y,T&&!u){const k=Ht(l.left,0),I=Ht(l.right,0),N=Ht(l.top,0),L=Ht(l.bottom,0);d?E=f-2*(k!==0||I!==0?k+I:Ht(l.left,l.right)):S=h-2*(N!==0||L!==0?N+L:Ht(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const C=await o.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function nf(e){const t=Wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ti(n)!==s||ti(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ll(e){return Re(e)?e:e.contextElement}function Ur(e){const t=ll(e);if(!st(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nf(t);let i=(s?ti(n.width):n.width)/r,a=(s?ti(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const nw=Hn(0);function rf(e){const t=$t(e);return!Ka()||!t.visualViewport?nw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$t(e)?!1:t}function mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ll(e);let i=Hn(1);t&&(r?Re(r)&&(i=Ur(r)):i=Ur(e));const a=rw(s,n,r)?rf(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=$t(s),h=r&&Re(r)?$t(r):r;let p=f,m=p.frameElement;for(;m&&r&&h!==p;){const y=Ur(m),v=m.getBoundingClientRect(),b=Wt(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=g,c+=T,p=$t(m),m=p.frameElement}}return ri({width:u,height:d,x:l,y:c})}function ow(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Pn(r),a=t?Js(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=st(r);if((d||!d&&!s)&&((jn(r)!=="body"||Uo(i))&&(l=ei(r)),st(r))){const f=mr(r);c=Ur(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function sw(e){return Array.from(e.getClientRects())}function of(e){return mr(Pn(e)).left+ei(e).scrollLeft}function iw(e){const t=Pn(e),n=ei(e),r=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+of(e);const a=-n.scrollTop;return Wt(r).direction==="rtl"&&(i+=Ht(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function aw(e,t){const n=$t(e),r=Pn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Ka();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function lw(e,t){const n=mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=st(e)?Ur(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function sf(e,t,n){let r;if(t==="viewport")r=aw(e,n);else if(t==="document")r=iw(Pn(e));else if(Re(t))r=lw(t,n);else{const o=rf(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ri(r)}function af(e,t){const n=kn(e);return n===t||!Re(n)||Bn(n)?!1:Wt(n).position==="fixed"||af(n,t)}function cw(e,t){const n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(a=>Re(a)&&jn(a)!=="body"),o=null;const s=Wt(e).position==="fixed";let i=s?kn(e):e;for(;Re(i)&&!Bn(i);){const a=Wt(i),l=qa(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Uo(i)&&!l&&af(e,i))?r=r.filter(u=>u!==i):o=a,i=kn(i)}return t.set(e,r),r}function uw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Js(t)?[]:cw(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=sf(t,u,o);return c.top=Ht(d.top,c.top),c.right=cn(d.right,c.right),c.bottom=cn(d.bottom,c.bottom),c.left=Ht(d.left,c.left),c},sf(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dw(e){const{width:t,height:n}=nf(e);return{width:t,height:n}}function fw(e,t,n){const r=st(t),o=Pn(t),s=n==="fixed",i=mr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((jn(t)!=="body"||Uo(o))&&(a=ei(t)),r){const d=mr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=of(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function cl(e){return Wt(e).position==="static"}function lf(e,t){return!st(e)||Wt(e).position==="fixed"?null:t?t(e):e.offsetParent}function cf(e,t){const n=$t(e);if(Js(e))return n;if(!st(e)){let o=kn(e);for(;o&&!Bn(o);){if(Re(o)&&!cl(o))return o;o=kn(o)}return n}let r=lf(e,t);for(;r&&y0(r)&&cl(r);)r=lf(r,t);return r&&Bn(r)&&cl(r)&&!qa(r)?n:r||v0(e)||n}const hw=async function(e){const t=this.getOffsetParent||cf,n=this.getDimensions,r=await n(e.floating);return{reference:fw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pw(e){return Wt(e).direction==="rtl"}const mw={convertOffsetParentRelativeRectToViewportRelativeRect:ow,getDocumentElement:Pn,getClippingRect:uw,getOffsetParent:cf,getElementRects:hw,getClientRects:sw,getDimensions:dw,getScale:Ur,isElement:Re,isRTL:pw};function gw(e,t){let n=null,r;const o=Pn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Br(u),p=Br(o.clientWidth-(c+d)),m=Br(o.clientHeight-(u+f)),y=Br(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Ht(0,cn(1,l))||1};let g=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return i(!0),s}function ul(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ll(e),u=o||s?[...c?zn(c):[],...zn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?gw(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?mr(e):null;l&&y();function y(){const v=mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const yw=J0,vw=ew,bw=X0,ww=tw,uf=Z0,xw=(e,t,n)=>{const r=new Map,o={platform:mw,...n},s={...o.platform,_c:r};return K0(e,t,{...o,platform:s})};var ai=typeof document<"u"?w.useLayoutEffect:w.useEffect;function li(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!li(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!li(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function df(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ff(e,t){const n=df(e);return Math.round(t*n)/n}function hf(e){const t=M.useRef(e);return ai(()=>{t.current=e}),t}function Sw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=M.useState(r);li(f,r)||h(r);const[p,m]=M.useState(null),[y,v]=M.useState(null),b=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==C.current&&(C.current=$,v($))},[]),T=s||p,S=i||y,E=M.useRef(null),C=M.useRef(null),k=M.useRef(u),I=l!=null,N=hf(l),L=hf(o),O=M.useCallback(()=>{if(!E.current||!C.current)return;const $={placement:t,strategy:n,middleware:f};L.current&&($.platform=L.current),xw(E.current,C.current,$).then(z=>{const q={...z,isPositioned:!0};j.current&&!li(k.current,q)&&(k.current=q,Bd.flushSync(()=>{d(q)}))})},[f,t,n,L]);ai(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const j=M.useRef(!1);ai(()=>(j.current=!0,()=>{j.current=!1}),[]),ai(()=>{if(T&&(E.current=T),S&&(C.current=S),T&&S){if(N.current)return N.current(T,S,O);O()}},[T,S,O,N,I]);const D=M.useMemo(()=>({reference:E,floating:C,setReference:b,setFloating:g}),[b,g]),_=M.useMemo(()=>({reference:T,floating:S}),[T,S]),F=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const z=ff(_.floating,u.x),q=ff(_.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+q+"px)",...df(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,_.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:O,refs:D,elements:_,floatingStyles:F}),[u,O,D,_,F])}const Tw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?uf({element:r.current,padding:o}).fn(n):{}:r?uf({element:r,padding:o}).fn(n):{}}}},dl=(e,t)=>({...yw(e),options:[e,t]}),pf=(e,t)=>({...vw(e),options:[e,t]}),mf=(e,t)=>({...bw(e),options:[e,t]}),Ew=(e,t)=>({...ww(e),options:[e,t]}),gf=(e,t)=>({...Tw(e),options:[e,t]}),yf={...M},Cw=yf.useInsertionEffect||(e=>e());function Ut(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Cw(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const fl="ArrowUp",qo="ArrowDown",Gr="ArrowLeft",Yr="ArrowRight";function ci(e,t,n){return Math.floor(e/t)!==n}function Ko(e,t){return t<0||t>=e.current.length}function hl(e,t){return Et(e,{disabledIndices:t})}function vf(e,t){return Et(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Et(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ui(i,a,o));return a}function Pw(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===fl){if(u&&It(n),c===-1)d=l;else if(d=Et(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const f=c%s,h=l%s,p=l-(h-f);h===f?d=l:d=h>f?p:p-s}Ko(e,d)&&(d=c)}if(n.key===qo&&(u&&It(n),c===-1?d=a:(d=Et(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Et(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ko(e,d)&&(d=c)),r==="both"){const f=Br(c/s);n.key===Yr&&(u&&It(n),c%s!==s-1?(d=Et(e,{startingIndex:c,disabledIndices:i}),o&&ci(d,s,f)&&(d=Et(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Et(e,{startingIndex:c-c%s-1,disabledIndices:i})),ci(d,s,f)&&(d=c)),n.key===Gr&&(u&&It(n),c%s!==0?(d=Et(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&ci(d,s,f)&&(d=Et(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Et(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),ci(d,s,f)&&(d=c));const h=Br(l/s)===f;Ko(e,d)&&(o&&h?d=n.key===Gr?l:Et(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function kw(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function Ow(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function _w(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ui(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let bf=0;function Gn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(bf);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():bf=requestAnimationFrame(s)}var We=typeof document<"u"?w.useLayoutEffect:w.useEffect;function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}let wf=!1,Aw=0;const xf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Aw++;function Iw(){const[e,t]=M.useState(()=>wf?xf():void 0);return We(()=>{e==null&&t(xf())},[]),M.useEffect(()=>{wf=!0},[]),e}const Zo=yf.useId||Iw;let Xo;process.env.NODE_ENV!=="production"&&(Xo=new Set);function di(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.warn(o)}}function Dw(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.error(o)}}const Sf=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||di("The `ref` prop is required for `FloatingArrow`."));const y=Zo(),[v,b]=M.useState(!1);if(We(()=>{if(!o)return;Wt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,T=g/2,S=i/2*(l/-8+1),E=a/2*l/4,[C,k]=r.split("-"),I=!!f,N=C==="top"||C==="bottom",L=u&&k==="end"?"bottom":"top";let O=u&&k==="end"?"right":"left";u&&v&&(O=k==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",D=(s==null?void 0:s.y)!=null?u||s.y:"",_=f||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return M.createElement("svg",qr({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[O]:j,[L]:D,[C]:N||I?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:g+(f?0:1),d:_}),M.createElement("path",{stroke:g&&!f?m.fill:"none",d:_}),M.createElement("clipPath",{id:y},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function Mw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Nw=M.createContext(null),Fw=M.createContext(null),fi=()=>{var e;return((e=M.useContext(Nw))==null?void 0:e.id)||null},Qo=()=>M.useContext(Fw);function Yn(e){return"data-floating-ui-"+e}function Dt(e){const t=w.useRef(e);return We(()=>{t.current=e}),t}const Tf=Yn("safe-polygon");function pl(e,t,n){return n&&!Go(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Lw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Qo(),p=fi(),m=Dt(c),y=Dt(l),v=Dt(n),b=M.useRef(),g=M.useRef(-1),T=M.useRef(),S=M.useRef(-1),E=M.useRef(!0),C=M.useRef(!1),k=M.useRef(()=>{}),I=M.useCallback(()=>{var _;const F=(_=o.current.openEvent)==null?void 0:_.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function _(F){let{open:$}=F;$||(clearTimeout(g.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",_),()=>{s.off("openchange",_)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function _($){I()&&r(!1,$,"hover")}const F=gt(i.floating).documentElement;return F.addEventListener("mouseleave",_),()=>{F.removeEventListener("mouseleave",_)}},[i.floating,n,r,a,m,I]);const N=M.useCallback(function(_,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const z=pl(y.current,"close",b.current);z&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,$),z)):F&&(clearTimeout(g.current),r(!1,_,$))},[y,r]),L=Ut(()=>{k.current(),T.current=void 0}),O=Ut(()=>{if(C.current){const _=gt(i.floating).body;_.style.pointerEvents="",_.removeAttribute(Tf),C.current=!1}});M.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(P){if(clearTimeout(g.current),E.current=!1,u&&!Go(b.current)||d>0&&!pl(y.current,"open"))return;const V=pl(y.current,"open",b.current);V?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},V):r(!0,P,"hover")}function $(P){if(_())return;k.current();const V=gt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){O(),L(),N(P,!0,"safe-polygon")}});const ie=T.current;V.addEventListener("mousemove",ie),k.current=()=>{V.removeEventListener("mousemove",ie)};return}(b.current==="touch"?!mt(i.floating,P.relatedTarget):!0)&&N(P)}function z(P){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){O(),L(),N(P)}})(P))}if(Re(i.domReference)){var q;const P=i.domReference;return n&&P.addEventListener("mouseleave",z),(q=i.floating)==null||q.addEventListener("mouseleave",z),f&&P.addEventListener("mousemove",F,{once:!0}),P.addEventListener("mouseenter",F),P.addEventListener("mouseleave",$),()=>{var V;n&&P.removeEventListener("mouseleave",z),(V=i.floating)==null||V.removeEventListener("mouseleave",z),f&&P.removeEventListener("mousemove",F),P.removeEventListener("mouseenter",F),P.removeEventListener("mouseleave",$)}}},[i,a,e,u,d,f,N,L,O,r,n,v,h,y,m,o]),We(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&I()){const $=gt(i.floating).body;$.setAttribute(Tf,""),$.style.pointerEvents="none",C.current=!0;const z=i.floating;if(Re(i.domReference)&&z){var F;const q=i.domReference,P=h==null||(F=h.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return P&&(P.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),We(()=>{n||(b.current=void 0,L(),O())},[n,L,O]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(S.current),O()},[a,i.domReference,L,O]);const j=M.useMemo(()=>{function _(F){b.current=F.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(F){const{nativeEvent:$}=F;function z(){!E.current&&!v.current&&r(!0,$,"hover")}u&&!Go(b.current)||n||d===0||(clearTimeout(S.current),b.current==="touch"?z():S.current=window.setTimeout(z,d))}}},[u,r,n,v,d]),D=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){N(_.nativeEvent,!1)}}),[N]);return M.useMemo(()=>a?{reference:j,floating:D}:{},[a,j,D])}function Vw(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Kr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function $w(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Kr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Zr=new WeakMap,hi=new WeakSet,pi={},ml=0;const Rw=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ef=e=>e&&(e.host||Ef(e.parentNode)),jw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ef(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Bw(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=jw(t,e),a=new Set,l=new Set(i),c=[];pi[o]||(pi[o]=new WeakMap);const u=pi[o];i.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(jn(p)!=="script")if(a.has(p))f(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Zr.get(p)||0)+1,b=(u.get(p)||0)+1;Zr.set(p,v),u.set(p,b),c.push(p),v===1&&y&&hi.add(p),b===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return ml++,()=>{c.forEach(h=>{const p=(Zr.get(h)||0)-1,m=(u.get(h)||0)-1;Zr.set(h,p),u.set(h,m),p||(!hi.has(h)&&s&&h.removeAttribute(s),hi.delete(h)),m||h.removeAttribute(o)}),ml--,ml||(Zr=new WeakMap,Zr=new WeakMap,hi=new WeakSet,pi={})}}function Cf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=gt(e[0]).body;return Bw(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pf(e,t){const n=Yo(e,Xr());t==="prev"&&n.reverse();const r=n.indexOf(tn(gt(e)));return n.slice(r+1)[0]}function kf(){return Pf(document.body,"next")}function Of(){return Pf(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mt(n,r)}function zw(e){Yo(e,Xr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ww(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Hw(e,t,n){const r=e.indexOf(t);function o(i){const a=Yn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||mt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const gl={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 Uw;function _f(e){e.key==="Tab"&&(e.target,clearTimeout(Uw))}const mi=M.forwardRef(function(t,n){const[r,o]=M.useState();We(()=>(Qa()&&o("button"),document.addEventListener("keydown",_f),()=>{document.removeEventListener("keydown",_f)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:gl};return M.createElement("span",qr({},t,s))}),Af=M.createContext(null),If=Yn("portal");function Gw(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Df(),[s,i]=M.useState(null),a=M.useRef(null);return We(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),We(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(If,""),l.appendChild(c),a.current=c,i(c)},[t,r]),We(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Re(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(If,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function gi(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=Gw({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Jo(p)&&(p.type==="focusin"?Ww:zw)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(Af.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},f&&s&&M.createElement(mi,{"data-type":"outside",ref:l,onFocus:h=>{if(Jo(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Of()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),f&&s&&M.createElement("span",{"aria-owns":s.id,style:gl}),s&&Bd.createPortal(t,s),f&&s&&M.createElement(mi,{"data-type":"outside",ref:c,onFocus:h=>{if(Jo(h,s)){var p;(p=d.current)==null||p.focus()}else{const m=kf()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Df=()=>M.useContext(Af),Mf=20;let gr=[];function yl(e){gr=gr.filter(n=>n.isConnected);let t=e;if(!(!t||jn(t)==="body")){if(!q0(t,Xr())){const n=Yo(t,Xr())[0];n&&(t=n)}gr.push(t),gr.length>Mf&&(gr=gr.slice(-Mf))}}function Nf(){return gr.slice().reverse().find(e=>e.isConnected)}const Yw=M.forwardRef(function(t,n){return M.createElement("button",qr({},t,{type:"button",ref:n,tabIndex:-1,style:gl}))});function vl(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:T}}=t,S=typeof i=="number"&&i<0,E=Yd(g)&&S,C=Rw()?s:!0,k=Dt(o),I=Dt(i),N=Dt(a),L=Qo(),O=Df(),j=M.useRef(null),D=M.useRef(null),_=M.useRef(!1),F=M.useRef(!1),$=M.useRef(-1),z=O!=null,q=T==null?void 0:T.firstElementChild,P=(q==null?void 0:q.id)===b?q:T,V=Ut(function(H){return H===void 0&&(H=P),H?Yo(H,Xr()):[]}),Q=Ut(H=>{const A=V(H);return k.current.map(R=>g&&R==="reference"?g:P&&R==="floating"?P:A).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){mt(P,tn(gt(P)))&&V().length===0&&!E&&It(R);const W=Q(),Y=Wn(R);k.current[0]==="reference"&&Y===g&&(It(R),R.shiftKey?Gn(W[W.length-1]):Gn(W[1])),k.current[1]==="floating"&&Y===P&&R.shiftKey&&(It(R),Gn(W[0]))}}const A=gt(P);return A.addEventListener("keydown",H),()=>{A.removeEventListener("keydown",H)}},[r,g,P,c,k,E,V,Q]),M.useEffect(()=>{if(r||!T)return;function H(A){const R=Wn(A),Y=V().indexOf(R);Y!==-1&&($.current=Y)}return T.addEventListener("focusin",H),()=>{T.removeEventListener("focusin",H)}},[r,T,V]),M.useEffect(()=>{if(r||!d)return;function H(){F.current=!0,setTimeout(()=>{F.current=!1})}function A(R){const W=R.relatedTarget;queueMicrotask(()=>{const Y=!(mt(g,W)||mt(T,W)||mt(W,T)||mt(O==null?void 0:O.portalNode,W)||W!=null&&W.hasAttribute(Yn("focus-guard"))||L&&(Kr(L.nodesRef.current,p).find(Z=>{var fe,B;return mt((fe=Z.context)==null?void 0:fe.elements.floating,W)||mt((B=Z.context)==null?void 0:B.elements.domReference,W)})||Vw(L.nodesRef.current,p).find(Z=>{var fe,B;return((fe=Z.context)==null?void 0:fe.elements.floating)===W||((B=Z.context)==null?void 0:B.elements.domReference)===W})));if(l&&Y&&tn(gt(P))===gt(P).body){st(P)&&(P==null||P.focus());const Z=$.current,fe=V(),B=fe[Z]||fe[fe.length-1]||P;st(B)&&B.focus()}(E||!c)&&W&&Y&&!F.current&&W!==Nf()&&(_.current=!0,m(!1,R))})}if(T&&st(g))return g.addEventListener("focusout",A),g.addEventListener("pointerdown",H),T.addEventListener("focusout",A),()=>{g.removeEventListener("focusout",A),g.removeEventListener("pointerdown",H),T.removeEventListener("focusout",A)}},[r,g,T,P,c,p,L,O,m,d,l,V,E]),M.useEffect(()=>{var H;if(r)return;const A=Array.from((O==null||(H=O.portalNode)==null?void 0:H.querySelectorAll("["+Yn("portal")+"]"))||[]);if(T){const R=[T,...A,j.current,D.current,k.current.includes("reference")||E?g:null].filter(Y=>Y!=null),W=c||E?Cf(R,C,!C):Cf(R);return()=>{W()}}},[r,g,T,c,k,O,E,C]),We(()=>{if(r||!st(P))return;const H=gt(P),A=tn(H);queueMicrotask(()=>{const R=Q(P),W=I.current,Y=(typeof W=="number"?R[W]:W.current)||P,Z=mt(P,A);!S&&!Z&&f&&Gn(Y,{preventScroll:Y===P})})},[r,f,P,S,Q,I]),We(()=>{if(r||!P)return;let H=!1;const A=gt(P),R=tn(A);let Y=v.current.openEvent;const Z=h.domReference.current;yl(R);function fe(B){let{open:Me,reason:rt,event:He,nested:ot}=B;Me&&(Y=He),rt==="escape-key"&&h.domReference.current&&yl(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(_.current=!0),rt==="outside-press"&&(ot?(_.current=!1,H=!0):_.current=!(Ud(He)||Xa(He)))}return y.on("openchange",fe),()=>{y.off("openchange",fe);const B=tn(A),Me=mt(T,B)||L&&Kr(L.nodesRef.current,p).some(ue=>{var Ee;return mt((Ee=ue.context)==null?void 0:Ee.elements.floating,B)});(Me||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&yl(h.domReference.current);const He=Z||R,ot=Yo(gt(He).body,Xr());queueMicrotask(()=>{let ue=Nf();!ue&&st(He)&&T&&(ue=Hw(ot,He,T)),N.current&&!_.current&&st(ue)&&(!(ue!==B&&B!==A.body)||Me)&&ue.focus({preventScroll:H})})}},[r,T,P,N,v,h,y,L,p]),We(()=>{if(!r&&O)return O.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:m,refs:h}),()=>{O.setFocusManagerState(null)}},[r,O,c,f,m,h,d]),We(()=>{if(r||!P||typeof MutationObserver!="function"||S)return;const H=()=>{const R=P.getAttribute("tabindex"),W=V(),Y=tn(gt(T)),Z=W.indexOf(Y);Z!==-1&&($.current=Z),k.current.includes("floating")||Y!==h.domReference.current&&W.length===0?R!=="0"&&P.setAttribute("tabindex","0"):R!=="-1"&&P.setAttribute("tabindex","-1")};H();const A=new MutationObserver(H);return A.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{A.disconnect()}},[r,T,P,h,k,V,S]);function ie(H){return r||!u||!c?null:M.createElement(Yw,{ref:H==="start"?j:D,onClick:A=>m(!1,A.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(mi,{"data-type":"inside",ref:O==null?void 0:O.beforeInsideRef,onFocus:H=>{if(c){const R=Q();Gn(o[0]==="reference"?R[0]:R[R.length-1])}else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(_.current=!1,Jo(H,O.portalNode)){const R=kf()||g;R==null||R.focus()}else{var A;(A=O.beforeOutsideRef.current)==null||A.focus()}}}),!E&&ie("start"),n,ie("end"),ee&&M.createElement(mi,{"data-type":"inside",ref:O==null?void 0:O.afterInsideRef,onFocus:H=>{if(c)Gn(Q()[0]);else if(O!=null&&O.preserveTabOrder&&O.portalNode)if(d&&(_.current=!0),Jo(H,O.portalNode)){const R=Of()||g;R==null||R.focus()}else{var A;(A=O.afterOutsideRef.current)==null||A.focus()}}}))}const bl=new Set,qw=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Zo();return We(()=>{if(!r)return;bl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Za()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,f=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(y))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{bl.delete(s),bl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,f)))}},[s,r]),M.createElement("div",qr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Ff(e){return st(e.target)&&e.target.tagName==="BUTTON"}function Lf(e){return tl(e)}function Vf(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,d=M.useRef(),f=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){d.current=void 0,!(p.defaultPrevented||!u||Ff(p))&&(p.key===" "&&!Lf(s)&&(p.preventDefault(),f.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Ff(p)||Lf(s)||p.key===" "&&f.current&&(f.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:h}:{},[i,h])}const Kw={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Zw={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$f=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function yi(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:p}=t,m=Qo(),y=Ut(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:S}=$f(h),{escapeKey:E,outsidePress:C}=$f(p),k=Ut(D=>{var _;if(!n||!i||!a||D.key!=="Escape")return;const F=(_=s.current.floatingContext)==null?void 0:_.nodeId,$=m?Kr(m.nodesRef.current,F):[];if(!T&&(D.stopPropagation(),$.length>0)){let z=!0;if($.forEach(q=>{var P;if((P=q.context)!=null&&P.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,w0(D)?D.nativeEvent:D,"escape-key")}),I=Ut(D=>{var _;const F=()=>{var $;k(D),($=Wn(D))==null||$.removeEventListener("keydown",F)};(_=Wn(D))==null||_.addEventListener("keydown",F)}),N=Ut(D=>{var _;const F=b.current;b.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||F||typeof v=="function"&&!v(D))return;const z=Wn(D),q="["+Yn("inert")+"]",P=gt(o.floating).querySelectorAll(q);let V=Re(z)?z:null;for(;V&&!Bn(V);){const H=kn(V);if(Bn(H)||!Re(H))break;V=H}if(P.length&&Re(z)&&!x0(z)&&!mt(z,o.floating)&&Array.from(P).every(H=>!mt(V,H)))return;if(st(z)&&j){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,A=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=A&&D.offsetX>z.clientWidth;if(A&&Wt(z).direction==="rtl"&&(R=D.offsetX<=z.offsetWidth-z.clientWidth),R||H&&D.offsetY>z.clientHeight)return}const Q=(_=s.current.floatingContext)==null?void 0:_.nodeId,ie=m&&Kr(m.nodesRef.current,Q).some(H=>{var A;return el(D,(A=H.context)==null?void 0:A.elements.floating)});if(el(D,o.floating)||el(D,o.domReference)||ie)return;const ee=m?Kr(m.nodesRef.current,Q):[];if(ee.length>0){let H=!0;if(ee.forEach(A=>{var R;if((R=A.context)!=null&&R.open&&!A.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,D,"outside-press")}),L=Ut(D=>{var _;const F=()=>{var $;N(D),($=Wn(D))==null||$.removeEventListener(c,F)};(_=Wn(D))==null||_.addEventListener(c,F)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function D($){r(!1,$,"ancestor-scroll")}const _=gt(o.floating);a&&_.addEventListener("keydown",E?I:k,E),v&&_.addEventListener(c,C?L:N,C);let F=[];return f&&(Re(o.domReference)&&(F=zn(o.domReference)),Re(o.floating)&&(F=F.concat(zn(o.floating))),!Re(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(zn(o.reference.contextElement)))),F=F.filter($=>{var z;return $!==((z=_.defaultView)==null?void 0:z.visualViewport)}),F.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",E?I:k,E),v&&_.removeEventListener(c,C?L:N,C),F.forEach($=>{$.removeEventListener("scroll",D)})}},[s,o,a,v,c,n,r,f,i,T,S,k,E,I,N,C,L]),M.useEffect(()=>{b.current=!1},[v,c]);const O=M.useMemo(()=>({onKeyDown:k,[Kw[d]]:D=>{u&&r(!1,D.nativeEvent,"reference-press")}}),[k,r,u,d]),j=M.useMemo(()=>({onKeyDown:k,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[Zw[c]]:()=>{b.current=!0}}),[k,c]);return M.useMemo(()=>i?{reference:O,floating:j}:{},[i,O,j])}function Xw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),s=M.useRef({}),[i]=M.useState(()=>Mw()),a=fi()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Re(h)&&Dw("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=Ut((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),d=M.useMemo(()=>({setPositionReference:c}),[]),f=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function vi(e){e===void 0&&(e={});const{nodeId:t}=e,n=Xw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,d=M.useRef(null),f=Qo();We(()=>{u&&(d.current=u)},[u]);const h=Sw({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=Re(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{(Re(g)||g===null)&&(d.current=g,i(g)),(Re(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Re(g))&&h.refs.setReference(g)},[h.refs]),y=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:d}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=M.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=b;const g=f==null?void 0:f.nodesRef.current.find(T=>T.id===t);g&&(g.context=b)}),M.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}function Qw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),d=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=$t(i.domReference);function p(){!n&&st(i.domReference)&&i.domReference===tn(gt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),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 f=M.useMemo(()=>({onPointerDown(h){Xa(h.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Wn(h.nativeEvent);if(l&&Re(p))try{if(Qa()&&Gd())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!tl(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Re(p)&&p.hasAttribute(Yn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=tn(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||mt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,b)||mt(i.domReference,b)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:f}:{},[a,f])}const Rf="active",jf="selected";function wl(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Rf]:i,[jf]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Rf,jf].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function bi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>wl(a,e,"reference"),t),s=M.useCallback(a=>wl(a,e,"floating"),n),i=M.useCallback(a=>wl(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let Bf=!1;function wi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zf(e,t){return wi(t,e===fl||e===qo,e===Gr||e===Yr)}function xl(e,t,n){return wi(t,e===qo,n?e===Gr:e===Yr)||e==="Enter"||e===" "||e===""}function Jw(e,t,n){return wi(t,n?e===Gr:e===Yr,e===qo)}function Wf(e,t,n){return wi(t,n?e===Yr:e===Gr,e===fl)}function ex(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:C,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||di("`useListNavigation` looping must be enabled to allow escaping."),p||di("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&di("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=fi(),N=Qo(),L=Ut(a),O=M.useRef(m),j=M.useRef(c??-1),D=M.useRef(null),_=M.useRef(!0),F=M.useRef(L),$=M.useRef(!!o.floating),z=M.useRef(n),q=M.useRef(!1),P=M.useRef(!1),V=Dt(b),Q=Dt(n),ie=Dt(S),ee=Dt(o.floating),H=Dt(c),[A,R]=M.useState(),[W,Y]=M.useState(),Z=Ut(function(ue,Ee,le){le===void 0&&(le=!1);function ke(Oe){p?(R(Oe.id),N==null||N.events.emit("virtualfocus",Oe),E&&(E.current=Oe)):Gn(Oe,{preventScroll:!0,sync:Gd()&&Qa()?Bf||q.current:!1})}const ut=ue.current[Ee.current];ut&&ke(ut),requestAnimationFrame(()=>{const Oe=ue.current[Ee.current]||ut;if(!Oe)return;ut||ke(Oe);const dt=ie.current;dt&&B&&(le||!_.current)&&(Oe.scrollIntoView==null||Oe.scrollIntoView(typeof dt=="boolean"?{block:"nearest",inline:"nearest"}:dt))})});We(()=>{document.createElement("div").focus({get preventScroll(){return Bf=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?O.current&&c!=null&&(P.current=!0,j.current=c,L(c)):$.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,L]),We(()=>{if(l&&n&&o.floating)if(i==null){if(q.current=!1,H.current!=null)return;if($.current&&(j.current=-1,Z(s,j)),(!z.current||!$.current)&&O.current&&(D.current!=null||O.current===!0&&D.current==null)){let ue=0;const Ee=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Ee),ue++):(j.current=D.current==null||xl(D.current,g,h)||f?hl(s,V.current):vf(s,V.current),D.current=null,L(j.current))};Ee()}}else Ko(s,i)||(j.current=i,Z(s,j,P.current),P.current=!1)},[l,n,o.floating,i,H,f,s,g,h,L,Z,V]),We(()=>{var ue;if(!l||o.floating||!N||p||!$.current)return;const Ee=N.nodesRef.current,le=(ue=Ee.find(Oe=>Oe.id===I))==null||(ue=ue.context)==null?void 0:ue.elements.floating,ke=tn(gt(o.floating)),ut=Ee.some(Oe=>Oe.context&&mt(Oe.context.elements.floating,ke));le&&!ut&&_.current&&le.focus({preventScroll:!0})},[l,o.floating,N,I,p]),We(()=>{if(!l||!N||!p||I)return;function ue(Ee){Y(Ee.id),E&&(E.current=Ee)}return N.events.on("virtualfocus",ue),()=>{N.events.off("virtualfocus",ue)}},[l,N,p,I,E]),We(()=>{F.current=L,$.current=!!o.floating}),We(()=>{n||(D.current=null)},[n]),We(()=>{z.current=n},[n]);const fe=i!=null,B=M.useMemo(()=>{function ue(le){if(!n)return;const ke=s.current.indexOf(le);ke!==-1&&L(ke)}return{onFocus(le){let{currentTarget:ke}=le;ue(ke)},onClick:le=>{let{currentTarget:ke}=le;return ke.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:ke}=le;ue(ke)},onPointerLeave(le){let{pointerType:ke}=le;!_.current||ke==="touch"||(j.current=-1,Z(s,j),L(null),p||Gn(ee.current,{preventScroll:!0}))}}}},[n,ee,Z,y,s,L,p]),Me=Ut(ue=>{if(_.current=!1,q.current=!0,!Q.current&&ue.currentTarget===ee.current)return;if(f&&Wf(ue.key,g,h)){It(ue),r(!1,ue.nativeEvent,"list-navigation"),st(o.domReference)&&!p&&o.domReference.focus();return}const Ee=j.current,le=hl(s,b),ke=vf(s,b);if(ue.key==="Home"&&(It(ue),j.current=le,L(j.current)),ue.key==="End"&&(It(ue),j.current=ke,L(j.current)),T>1){const ut=C||Array.from({length:s.current.length},()=>({width:1,height:1})),Oe=kw(ut,T,k),dt=Oe.findIndex(se=>se!=null&&!ui(s.current,se,b)),X=Oe.reduce((se,_e,Ke)=>_e!=null&&!ui(s.current,_e,b)?Ke:se,-1);if(j.current=Oe[Pw({current:Oe.map(se=>se!=null?s.current[se]:null)},{event:ue,orientation:g,loop:d,cols:T,disabledIndices:_w([...b||s.current.map((se,_e)=>ui(s.current,_e)?_e:void 0),void 0],Oe),minIndex:dt,maxIndex:X,prevIndex:Ow(j.current>ke?le:j.current,ut,Oe,T,ue.key===qo?"bl":ue.key===Yr?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(zf(ue.key,g)){if(It(ue),n&&!p&&tn(ue.currentTarget.ownerDocument)===ue.currentTarget){j.current=xl(ue.key,g,h)?le:ke,L(j.current);return}xl(ue.key,g,h)?d?j.current=Ee>=ke?u&&Ee!==s.current.length?-1:le:Et(s,{startingIndex:Ee,disabledIndices:b}):j.current=Math.min(ke,Et(s,{startingIndex:Ee,disabledIndices:b})):d?j.current=Ee<=le?u&&Ee!==-1?s.current.length:ke:Et(s,{startingIndex:Ee,decrement:!0,disabledIndices:b}):j.current=Math.max(le,Et(s,{startingIndex:Ee,decrement:!0,disabledIndices:b})),Ko(s,j.current)?L(null):L(j.current)}}),rt=M.useMemo(()=>p&&n&&fe&&{"aria-activedescendant":W||A},[p,n,fe,W,A]),He=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Yd(o.domReference)&&rt,onKeyDown:Me,onPointerMove(){_.current=!0}}),[rt,Me,o.domReference,g]),ot=M.useMemo(()=>{function ue(le){m==="auto"&&Ud(le.nativeEvent)&&(O.current=!0)}function Ee(le){O.current=m,m==="auto"&&Xa(le.nativeEvent)&&(O.current=!0)}return{...rt,onKeyDown(le){_.current=!1;const ke=le.key.indexOf("Arrow")===0,ut=Jw(le.key,g,h),Oe=Wf(le.key,g,h),dt=zf(le.key,g),X=(f?ut:dt)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const Tt=N==null?void 0:N.nodesRef.current.find(Vt=>Vt.parentId==null),At=N&&Tt?$w(N.nodesRef.current,Tt.id):null;if(ke&&At&&E){const Vt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(ut||Oe){var se,_e;const jr=((se=At.context)==null?void 0:se.elements.domReference)===le.currentTarget,Wo=Oe&&!jr?(_e=At.context)==null?void 0:_e.elements.domReference:ut?s.current.find(Ho=>(Ho==null?void 0:Ho.id)===A):null;Wo&&(It(le),Wo.dispatchEvent(Vt),Y(void 0))}if(dt&&At.context&&At.context.open&&At.parentId&&le.currentTarget!==At.context.elements.domReference){var Ke;It(le),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Vt);return}}return Me(le)}if(!(!n&&!v&&ke)){if(X&&(D.current=f&&dt?null:le.key),f){ut&&(It(le),n?(j.current=hl(s,V.current),L(j.current)):r(!0,le.nativeEvent,"list-navigation"));return}dt&&(c!=null&&(j.current=c),It(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):Me(le),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:ue,onClick:ue}},[A,rt,Me,V,m,s,f,L,r,n,v,g,h,c,N,p,E]);return M.useMemo(()=>l?{reference:ot,floating:He,item:B}:{},[l,ot,He,B])}const tx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=tx.get(i))!=null?n:i,l=Zo(),u=fi()!=null,d=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),f=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=M.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:d,floating:f,item:h}:{},[s,d,f,h])}const Hf=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qr(e,t){return typeof e=="function"?e(t):e}function nx(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function rx(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=nx(n,i);return!c&&a==="close"&&l("unmounted"),We(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function ox(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,f=(u?i:i.close)||0,[h,p]=M.useState(()=>({...Qr(s,c),...Qr(n,c)})),{isMounted:m,status:y}=rx(e,{duration:i}),v=Dt(n),b=Dt(r),g=Dt(o),T=Dt(s);return We(()=>{const S=Qr(v.current,c),E=Qr(g.current,c),C=Qr(T.current,c),k=Qr(b.current,c)||Object.keys(S).reduce((I,N)=>(I[N]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...S})),y==="open"&&p({transitionProperty:Object.keys(k).map(Hf).join(","),transitionDuration:d+"ms",...C,...k}),y==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(Hf).join(","),transitionDuration:f+"ms",...C,...I})}},[f,g,v,b,T,d,y,c]),{isMounted:m,styles:h}}class Si{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Si.getDescendantProperty(a[l],s,r);else s&&Si.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Jr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Si.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Jr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Jr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Jr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}/**
|
|
5
5
|
* @license lucide-react v0.414.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 sx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uf=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
10
10
|
* @license lucide-react v0.414.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 ix={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.414.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 ax=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>w.createElement("svg",{ref:l,...ix,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Uf("lucide",o),...a},[...i.map(([c,u])=>w.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
20
20
|
* @license lucide-react v0.414.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
|
|
24
|
+
*/const ft=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(ax,{ref:s,iconNode:t,className:Uf(`lucide-${sx(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
25
25
|
* @license lucide-react v0.414.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const
|
|
29
|
+
*/const lx=ft("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
30
30
|
* @license lucide-react v0.414.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/const cx=
|
|
34
|
+
*/const cx=ft("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
|
|
35
35
|
* @license lucide-react v0.414.0 - ISC
|
|
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 Gf=ft("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
40
40
|
* @license lucide-react v0.414.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 ux=
|
|
44
|
+
*/const ux=ft("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
45
45
|
* @license lucide-react v0.414.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 Yf=ft("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
50
50
|
* @license lucide-react v0.414.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 dx=ft("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
55
55
|
* @license lucide-react v0.414.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 qf=ft("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
60
60
|
* @license lucide-react v0.414.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 fx=ft("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"}]]);/**
|
|
65
65
|
* @license lucide-react v0.414.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 hx=ft("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"}]]);/**
|
|
70
70
|
* @license lucide-react v0.414.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const px=ft("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"}]]);/**
|
|
75
75
|
* @license lucide-react v0.414.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const mx=ft("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"}]]);/**
|
|
80
80
|
* @license lucide-react v0.414.0 - ISC
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
84
|
+
*/const gx=ft("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
85
85
|
* @license lucide-react v0.414.0 - ISC
|
|
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
|
|
89
|
+
*/const Sl=ft("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
90
90
|
* @license lucide-react v0.414.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
93
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const
|
|
94
|
+
*/const yx=ft("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
95
95
|
* @license lucide-react v0.414.0 - ISC
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const eo=ft("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
100
100
|
* @license lucide-react v0.414.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const vx=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zd=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};function Xd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Xd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xd(e))&&(r&&(r+=" "),r+=t);return r}var Qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var xx=Error,Sx=EvalError,Tx=RangeError,Ex=ReferenceError,eh=SyntaxError,es=TypeError,Cx=URIError,Px=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},th=typeof Symbol<"u"&&Symbol,Ox=Px,kx=function(){return typeof th!="function"||typeof Symbol!="function"||typeof th("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ox()},El={__proto__:null,foo:{}},_x=Object,Ax=function(){return{__proto__:El}.foo===El.foo&&!(El instanceof _x)},Ix="Function.prototype.bind called on incompatible ",Dx=Object.prototype.toString,Mx=Math.max,Nx="[object Function]",nh=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},Fx=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Lx=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Vx=function(t){var n=this;if(typeof n!="function"||Dx.apply(n)!==Nx)throw new TypeError(Ix+n);for(var r=Fx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,nh(r,arguments));return Object(u)===u?u:this}return n.apply(t,nh(r,arguments))},i=Mx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Lx(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},$x=Vx,Cl=Function.prototype.bind||$x,Rx=Function.prototype.call,jx=Object.prototype.hasOwnProperty,Bx=Cl,zx=Bx.call(Rx,jx),Se,Wx=xx,Hx=Sx,Ux=Tx,Gx=Ex,to=eh,no=es,Yx=Cx,rh=Function,Pl=function(e){try{return rh('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var Ol=function(){throw new no},qx=yr?function(){try{return arguments.callee,Ol}catch{try{return yr(arguments,"callee").get}catch{return Ol}}}():Ol,ro=kx(),Kx=Ax(),gt=Object.getPrototypeOf||(Kx?function(e){return e.__proto__}:null),oo={},Zx=typeof Uint8Array>"u"||!gt?Se:gt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":ro&>?gt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":oo,"%AsyncGenerator%":oo,"%AsyncGeneratorFunction%":oo,"%AsyncIteratorPrototype%":oo,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wx,"%eval%":eval,"%EvalError%":Hx,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":rh,"%GeneratorFunction%":oo,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ro&>?gt(gt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ro||!gt?Se:gt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Ux,"%ReferenceError%":Gx,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ro||!gt?Se:gt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ro&>?gt(""[Symbol.iterator]()):Se,"%Symbol%":ro?Symbol:Se,"%SyntaxError%":to,"%ThrowTypeError%":qx,"%TypedArray%":Zx,"%TypeError%":no,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Yx,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(gt)try{null.error}catch(e){var Xx=gt(gt(e));vr["%Error.prototype%"]=Xx}var Qx=function e(t){var n;if(t==="%AsyncFunction%")n=Pl("async function () {}");else if(t==="%GeneratorFunction%")n=Pl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Pl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&>&&(n=gt(o.prototype))}return vr[t]=n,n},oh={__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"]},ts=Cl,Ti=zx,Jx=ts.call(Function.call,Array.prototype.concat),eS=ts.call(Function.apply,Array.prototype.splice),sh=ts.call(Function.call,String.prototype.replace),Ei=ts.call(Function.call,String.prototype.slice),tS=ts.call(Function.call,RegExp.prototype.exec),nS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rS=/\\(\\)?/g,oS=function(t){var n=Ei(t,0,1),r=Ei(t,-1);if(n==="%"&&r!=="%")throw new to("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new to("invalid intrinsic syntax, expected opening `%`");var o=[];return sh(t,nS,function(s,i,a,l){o[o.length]=a?sh(l,rS,"$1"):i||s}),o},sS=function(t,n){var r=t,o;if(Ti(oh,r)&&(o=oh[r],r="%"+o[0]+"%"),Ti(vr,r)){var s=vr[r];if(s===oo&&(s=Qx(r)),typeof s>"u"&&!n)throw new no("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new to("intrinsic "+t+" does not exist!")},so=function(t,n){if(typeof t!="string"||t.length===0)throw new no("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new no('"allowMissing" argument must be a boolean');if(tS(/^%?[^%]*%?$/,t)===null)throw new to("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=oS(t),o=r.length>0?r[0]:"",s=sS("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],eS(r,Jx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Ei(d,0,1),p=Ei(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new to("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,i="%"+o+"%",Ti(vr,i))a=vr[i];else if(a!=null){if(!(d in a)){if(!n)throw new no("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ti(a,d),a=a[d];f&&!l&&(vr[i]=a)}}return a},ih={exports:{}},kl,ah;function _l(){if(ah)return kl;ah=1;var e=so,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return kl=t,kl}var iS=so,Ci=iS("%Object.getOwnPropertyDescriptor%",!0);if(Ci)try{Ci([],"length")}catch{Ci=null}var lh=Ci,ch=_l(),aS=eh,io=es,uh=lh,lS=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!uh&&uh(t,n);if(ch)ch(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new aS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=_l(),fh=function(){return!!Al};fh.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var cS=fh,uS=so,dh=lS,fS=cS(),hh=lh,ph=es,dS=uS("%Math.floor%"),hS=function(t,n){if(typeof t!="function")throw new ph("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||dS(n)!==n)throw new ph("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&hh){var i=hh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(fS?dh(t,"length",n,!0,!0):dh(t,"length",n)),t};(function(e){var t=Cl,n=so,r=hS,o=es,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=_l(),c=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(ih);var pS=ih.exports,mh=so,gh=pS,mS=gh(mh("String.prototype.indexOf")),gS=function(t,n){var r=mh(t,!!n);return typeof r=="function"&&mS(t,".prototype.")>-1?gh(r):r};const yS=wx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Il=typeof Map=="function"&&Map.prototype,Dl=Object.getOwnPropertyDescriptor&&Il?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pi=Il&&Dl&&typeof Dl.get=="function"?Dl.get:null,yh=Il&&Map.prototype.forEach,Ml=typeof Set=="function"&&Set.prototype,Nl=Object.getOwnPropertyDescriptor&&Ml?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Oi=Ml&&Nl&&typeof Nl.get=="function"?Nl.get:null,vh=Ml&&Set.prototype.forEach,vS=typeof WeakMap=="function"&&WeakMap.prototype,ns=vS?WeakMap.prototype.has:null,bS=typeof WeakSet=="function"&&WeakSet.prototype,rs=bS?WeakSet.prototype.has:null,wS=typeof WeakRef=="function"&&WeakRef.prototype,bh=wS?WeakRef.prototype.deref:null,xS=Boolean.prototype.valueOf,SS=Object.prototype.toString,TS=Function.prototype.toString,ES=String.prototype.match,Fl=String.prototype.slice,qn=String.prototype.replace,CS=String.prototype.toUpperCase,wh=String.prototype.toLowerCase,xh=RegExp.prototype.test,Sh=Array.prototype.concat,un=Array.prototype.join,PS=Array.prototype.slice,Th=Math.floor,Ll=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Vl=Object.getOwnPropertySymbols,$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ao=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ct=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ao||!0)?Symbol.toStringTag:null,Eh=Object.prototype.propertyIsEnumerable,Ch=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ph(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||xh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Th(-e):Th(e);if(r!==e){var o=String(r),s=Fl.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var Rl=yS,Oh=Rl.custom,kh=Ih(Oh)?Oh:null,OS=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Kn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Kn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Mh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ph(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Ph(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return jl(t)?"[Array]":"[Object]";var f=US(s,r);if(typeof o>"u")o=[];else if(Dh(o,t)>=0)return"[Circular]";function d(j,D,k){if(D&&(o=PS.call(o),o.push(D)),k){var F={depth:s.depth};return Kn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Ah(t)){var h=LS(t),p=ki(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Ih(t)){var m=ao?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):$l.call(t);return typeof t=="object"&&!ao?os(m):m}if(zS(t)){for(var y="<"+wh.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)y+=" "+v[w].name+"="+_h(kS(v[w].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+wh.call(String(t.nodeName))+">",y}if(jl(t)){if(t.length===0)return"[]";var g=ki(t,d);return f&&!HS(g)?"["+zl(g,f)+"]":"[ "+un.call(g,", ")+" ]"}if(AS(t)){var T=ki(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Eh.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Sh.call("[cause]: "+d(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&i){if(kh&&typeof t[kh]=="function"&&Rl)return Rl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(VS(t)){var x=[];return yh&&yh.call(t,function(j,D){x.push(d(D,t,!0)+" => "+d(j,t))}),Nh("Map",Pi.call(t),x,f)}if(jS(t)){var E=[];return vh&&vh.call(t,function(j){E.push(d(j,t))}),Nh("Set",Oi.call(t),E,f)}if($S(t))return Bl("WeakMap");if(BS(t))return Bl("WeakSet");if(RS(t))return Bl("WeakRef");if(DS(t))return os(d(Number(t)));if(NS(t))return os(d(Ll.call(t)));if(MS(t))return os(xS.call(t));if(IS(t))return os(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Qd<"u"&&t===Qd)return"{ [object globalThis] }";if(!_S(t)&&!Ah(t)){var C=ki(t,d),O=Ch?Ch(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",N=!O&&Ct&&Object(t)===t&&Ct in t?Fl.call(Zn(t),8,-1):I?"Object":"",L=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=L+(N||I?"["+un.call(Sh.call([],N||[],I||[]),": ")+"] ":"");return C.length===0?_+"{}":f?_+"{"+zl(C,f)+"}":_+"{ "+un.call(C,", ")+" }"}return String(t)};function _h(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function kS(e){return qn.call(String(e),/"/g,""")}function jl(e){return Zn(e)==="[object Array]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function _S(e){return Zn(e)==="[object Date]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ah(e){return Zn(e)==="[object RegExp]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function AS(e){return Zn(e)==="[object Error]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function IS(e){return Zn(e)==="[object String]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function DS(e){return Zn(e)==="[object Number]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function MS(e){return Zn(e)==="[object Boolean]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ih(e){if(ao)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!$l)return!1;try{return $l.call(e),!0}catch{}return!1}function NS(e){if(!e||typeof e!="object"||!Ll)return!1;try{return Ll.call(e),!0}catch{}return!1}var FS=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return FS.call(e,t)}function Zn(e){return SS.call(e)}function LS(e){if(e.name)return e.name;var t=ES.call(TS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dh(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function VS(e){if(!Pi||!e||typeof e!="object")return!1;try{Pi.call(e);try{Oi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function $S(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{rs.call(e,rs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function RS(e){if(!bh||!e||typeof e!="object")return!1;try{return bh.call(e),!0}catch{}return!1}function jS(e){if(!Oi||!e||typeof e!="object")return!1;try{Oi.call(e);try{Pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function BS(e){if(!rs||!e||typeof e!="object")return!1;try{rs.call(e,rs);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function zS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Mh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Mh(Fl.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WS);return _h(o,"single",t)}function WS(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+CS.call(t.toString(16))}function os(e){return"Object("+e+")"}function Bl(e){return e+" { ? }"}function Nh(e,t,n,r){var o=r?zl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function HS(e){for(var t=0;t<e.length;t++)if(Dh(e[t],`
|
|
105
|
-
|
|
104
|
+
*/const vx=ft("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
|
|
105
|
+
* @license lucide-react v0.414.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const bx=ft("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"}]]);/**
|
|
110
|
+
* @license lucide-react v0.414.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const wx=ft("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
115
|
+
* @license lucide-react v0.414.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const xx=ft("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Kf=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};function Zf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Zf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zf(e))&&(r&&(r+=" "),r+=t);return r}var Xf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tx(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ex=Error,Cx=EvalError,Px=RangeError,kx=ReferenceError,Jf=SyntaxError,es=TypeError,Ox=URIError,_x=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},eh=typeof Symbol<"u"&&Symbol,Ax=_x,Ix=function(){return typeof eh!="function"||typeof Symbol!="function"||typeof eh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ax()},Tl={__proto__:null,foo:{}},Dx=Object,Mx=function(){return{__proto__:Tl}.foo===Tl.foo&&!(Tl instanceof Dx)},Nx="Function.prototype.bind called on incompatible ",Fx=Object.prototype.toString,Lx=Math.max,Vx="[object Function]",th=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},$x=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Rx=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},jx=function(t){var n=this;if(typeof n!="function"||Fx.apply(n)!==Vx)throw new TypeError(Nx+n);for(var r=$x(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,th(r,arguments));return Object(u)===u?u:this}return n.apply(t,th(r,arguments))},i=Lx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Rx(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},Bx=jx,El=Function.prototype.bind||Bx,zx=Function.prototype.call,Wx=Object.prototype.hasOwnProperty,Hx=El,Ux=Hx.call(zx,Wx),Se,Gx=Ex,Yx=Cx,qx=Px,Kx=kx,to=Jf,no=es,Zx=Ox,nh=Function,Cl=function(e){try{return nh('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var Pl=function(){throw new no},Xx=yr?function(){try{return arguments.callee,Pl}catch{try{return yr(arguments,"callee").get}catch{return Pl}}}():Pl,ro=Ix(),Qx=Mx(),yt=Object.getPrototypeOf||(Qx?function(e){return e.__proto__}:null),oo={},Jx=typeof Uint8Array>"u"||!yt?Se:yt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":ro&&yt?yt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":oo,"%AsyncGenerator%":oo,"%AsyncGeneratorFunction%":oo,"%AsyncIteratorPrototype%":oo,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Gx,"%eval%":eval,"%EvalError%":Yx,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":nh,"%GeneratorFunction%":oo,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ro&&yt?yt(yt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ro||!yt?Se:yt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":qx,"%ReferenceError%":Kx,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ro||!yt?Se:yt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ro&&yt?yt(""[Symbol.iterator]()):Se,"%Symbol%":ro?Symbol:Se,"%SyntaxError%":to,"%ThrowTypeError%":Xx,"%TypedArray%":Jx,"%TypeError%":no,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Zx,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(yt)try{null.error}catch(e){var e1=yt(yt(e));vr["%Error.prototype%"]=e1}var t1=function e(t){var n;if(t==="%AsyncFunction%")n=Cl("async function () {}");else if(t==="%GeneratorFunction%")n=Cl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Cl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&yt&&(n=yt(o.prototype))}return vr[t]=n,n},rh={__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"]},ts=El,Ti=Ux,n1=ts.call(Function.call,Array.prototype.concat),r1=ts.call(Function.apply,Array.prototype.splice),oh=ts.call(Function.call,String.prototype.replace),Ei=ts.call(Function.call,String.prototype.slice),o1=ts.call(Function.call,RegExp.prototype.exec),s1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,i1=/\\(\\)?/g,a1=function(t){var n=Ei(t,0,1),r=Ei(t,-1);if(n==="%"&&r!=="%")throw new to("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new to("invalid intrinsic syntax, expected opening `%`");var o=[];return oh(t,s1,function(s,i,a,l){o[o.length]=a?oh(l,i1,"$1"):i||s}),o},l1=function(t,n){var r=t,o;if(Ti(rh,r)&&(o=rh[r],r="%"+o[0]+"%"),Ti(vr,r)){var s=vr[r];if(s===oo&&(s=t1(r)),typeof s>"u"&&!n)throw new no("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new to("intrinsic "+t+" does not exist!")},so=function(t,n){if(typeof t!="string"||t.length===0)throw new no("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new no('"allowMissing" argument must be a boolean');if(o1(/^%?[^%]*%?$/,t)===null)throw new to("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=a1(t),o=r.length>0?r[0]:"",s=l1("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],r1(r,n1([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var f=r[u],h=Ei(f,0,1),p=Ei(f,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new to("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(l=!0),o+="."+f,i="%"+o+"%",Ti(vr,i))a=vr[i];else if(a!=null){if(!(f in a)){if(!n)throw new no("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,f);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else d=Ti(a,f),a=a[f];d&&!l&&(vr[i]=a)}}return a},sh={exports:{}},kl,ih;function Ol(){if(ih)return kl;ih=1;var e=so,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return kl=t,kl}var c1=so,Ci=c1("%Object.getOwnPropertyDescriptor%",!0);if(Ci)try{Ci([],"length")}catch{Ci=null}var ah=Ci,lh=Ol(),u1=Jf,io=es,ch=ah,d1=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!ch&&ch(t,n);if(lh)lh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new u1("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_l=Ol(),uh=function(){return!!_l};uh.hasArrayLengthDefineBug=function(){if(!_l)return null;try{return _l([],"length",{value:1}).length!==1}catch{return!0}};var f1=uh,h1=so,dh=d1,p1=f1(),fh=ah,hh=es,m1=h1("%Math.floor%"),g1=function(t,n){if(typeof t!="function")throw new hh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||m1(n)!==n)throw new hh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&fh){var i=fh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(p1?dh(t,"length",n,!0,!0):dh(t,"length",n)),t};(function(e){var t=El,n=so,r=g1,o=es,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Ol(),c=n("%Math.max%");e.exports=function(f){if(typeof f!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,f.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(sh);var y1=sh.exports,ph=so,mh=y1,v1=mh(ph("String.prototype.indexOf")),b1=function(t,n){var r=ph(t,!!n);return typeof r=="function"&&v1(t,".prototype.")>-1?mh(r):r};const w1=Tx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Al=typeof Map=="function"&&Map.prototype,Il=Object.getOwnPropertyDescriptor&&Al?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pi=Al&&Il&&typeof Il.get=="function"?Il.get:null,gh=Al&&Map.prototype.forEach,Dl=typeof Set=="function"&&Set.prototype,Ml=Object.getOwnPropertyDescriptor&&Dl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ki=Dl&&Ml&&typeof Ml.get=="function"?Ml.get:null,yh=Dl&&Set.prototype.forEach,x1=typeof WeakMap=="function"&&WeakMap.prototype,ns=x1?WeakMap.prototype.has:null,S1=typeof WeakSet=="function"&&WeakSet.prototype,rs=S1?WeakSet.prototype.has:null,T1=typeof WeakRef=="function"&&WeakRef.prototype,vh=T1?WeakRef.prototype.deref:null,E1=Boolean.prototype.valueOf,C1=Object.prototype.toString,P1=Function.prototype.toString,k1=String.prototype.match,Nl=String.prototype.slice,qn=String.prototype.replace,O1=String.prototype.toUpperCase,bh=String.prototype.toLowerCase,wh=RegExp.prototype.test,xh=Array.prototype.concat,un=Array.prototype.join,_1=Array.prototype.slice,Sh=Math.floor,Fl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ll=Object.getOwnPropertySymbols,Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ao=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ct=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ao||!0)?Symbol.toStringTag:null,Th=Object.prototype.propertyIsEnumerable,Eh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ch(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||wh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Sh(-e):Sh(e);if(r!==e){var o=String(r),s=Nl.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var $l=w1,Ph=$l.custom,kh=Ah(Ph)?Ph:null,A1=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Kn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Kn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Dh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ch(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Ch(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Rl(t)?"[Array]":"[Object]";var d=q1(s,r);if(typeof o>"u")o=[];else if(Ih(o,t)>=0)return"[Circular]";function f(j,D,_){if(D&&(o=_1.call(o),o.push(D)),_){var F={depth:s.depth};return Kn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!_h(t)){var h=R1(t),p=Oi(t,f);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Ah(t)){var m=ao?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Vl.call(t);return typeof t=="object"&&!ao?os(m):m}if(U1(t)){for(var y="<"+bh.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+Oh(I1(v[b].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+bh.call(String(t.nodeName))+">",y}if(Rl(t)){if(t.length===0)return"[]";var g=Oi(t,f);return d&&!Y1(g)?"["+Bl(g,d)+"]":"[ "+un.call(g,", ")+" ]"}if(M1(t)){var T=Oi(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Th.call(t,"cause")?"{ ["+String(t)+"] "+un.call(xh.call("[cause]: "+f(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&i){if(kh&&typeof t[kh]=="function"&&$l)return $l(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(j1(t)){var S=[];return gh&&gh.call(t,function(j,D){S.push(f(D,t,!0)+" => "+f(j,t))}),Mh("Map",Pi.call(t),S,d)}if(W1(t)){var E=[];return yh&&yh.call(t,function(j){E.push(f(j,t))}),Mh("Set",ki.call(t),E,d)}if(B1(t))return jl("WeakMap");if(H1(t))return jl("WeakSet");if(z1(t))return jl("WeakRef");if(F1(t))return os(f(Number(t)));if(V1(t))return os(f(Fl.call(t)));if(L1(t))return os(E1.call(t));if(N1(t))return os(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Xf<"u"&&t===Xf)return"{ [object globalThis] }";if(!D1(t)&&!_h(t)){var C=Oi(t,f),k=Eh?Eh(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",N=!k&&Ct&&Object(t)===t&&Ct in t?Nl.call(Zn(t),8,-1):I?"Object":"",L=k||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=L+(N||I?"["+un.call(xh.call([],N||[],I||[]),": ")+"] ":"");return C.length===0?O+"{}":d?O+"{"+Bl(C,d)+"}":O+"{ "+un.call(C,", ")+" }"}return String(t)};function Oh(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function I1(e){return qn.call(String(e),/"/g,""")}function Rl(e){return Zn(e)==="[object Array]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function D1(e){return Zn(e)==="[object Date]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function _h(e){return Zn(e)==="[object RegExp]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function M1(e){return Zn(e)==="[object Error]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function N1(e){return Zn(e)==="[object String]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function F1(e){return Zn(e)==="[object Number]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function L1(e){return Zn(e)==="[object Boolean]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ah(e){if(ao)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Vl)return!1;try{return Vl.call(e),!0}catch{}return!1}function V1(e){if(!e||typeof e!="object"||!Fl)return!1;try{return Fl.call(e),!0}catch{}return!1}var $1=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return $1.call(e,t)}function Zn(e){return C1.call(e)}function R1(e){if(e.name)return e.name;var t=k1.call(P1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Ih(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function j1(e){if(!Pi||!e||typeof e!="object")return!1;try{Pi.call(e);try{ki.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function B1(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{rs.call(e,rs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function z1(e){if(!vh||!e||typeof e!="object")return!1;try{return vh.call(e),!0}catch{}return!1}function W1(e){if(!ki||!e||typeof e!="object")return!1;try{ki.call(e);try{Pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function H1(e){if(!rs||!e||typeof e!="object")return!1;try{rs.call(e,rs);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function U1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Dh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Dh(Nl.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,G1);return Oh(o,"single",t)}function G1(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+O1.call(t.toString(16))}function os(e){return"Object("+e+")"}function jl(e){return e+" { ? }"}function Mh(e,t,n,r){var o=r?Bl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function Y1(e){for(var t=0;t<e.length;t++)if(Ih(e[t],`
|
|
120
|
+
`)>=0)return!1;return!0}function q1(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function Bl(e,t){if(e.length===0)return"";var n=`
|
|
106
121
|
`+t.prev+t.base;return n+un.call(e,","+n)+`
|
|
107
|
-
`+t.prev}function ki(e,t){var n=jl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof Vl=="function"?Vl(e):[],i;if(ao){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||ao&&i["$"+l]instanceof Symbol||(xh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Vl=="function")for(var c=0;c<s.length;c++)Eh.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Fh=so,lo=gS,GS=OS,YS=es,_i=Fh("%WeakMap%",!0),Ai=Fh("%Map%",!0),qS=lo("WeakMap.prototype.get",!0),KS=lo("WeakMap.prototype.set",!0),ZS=lo("WeakMap.prototype.has",!0),XS=lo("Map.prototype.get",!0),QS=lo("Map.prototype.set",!0),JS=lo("Map.prototype.has",!0),Wl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},eT=function(e,t){var n=Wl(e,t);return n&&n.value},tT=function(e,t,n){var r=Wl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},nT=function(e,t){return!!Wl(e,t)},rT=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new YS("Side channel does not contain "+GS(s))},get:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return qS(t,s)}else if(Ai){if(n)return XS(n,s)}else if(r)return eT(r,s)},has:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return ZS(t,s)}else if(Ai){if(n)return JS(n,s)}else if(r)return nT(r,s);return!1},set:function(s,i){_i&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new _i),KS(t,s,i)):Ai?(n||(n=new Ai),QS(n,s,i)):(r||(r={key:{},next:null}),tT(r,s,i))}};return o},oT=String.prototype.replace,sT=/%20/g,Hl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lh={default:Hl.RFC3986,formatters:{RFC1738:function(e){return oT.call(e,sT,"+")},RFC3986:function(e){return String(e)}},RFC1738:Hl.RFC1738,RFC3986:Hl.RFC3986},iT=Lh,Ul=Object.prototype.hasOwnProperty,br=Array.isArray,fn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),aT=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Vh=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},lT=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ul.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=Vh(t,r)),br(t)&&br(n)?(n.forEach(function(s,i){if(Ul.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Ul.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},cT=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},uT=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},fT=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===iT.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+fn[c];continue}if(c<2048){a=a+(fn[192|c>>6]+fn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(fn[224|c>>12]+fn[128|c>>6&63]+fn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=fn[240|c>>18]+fn[128|c>>12&63]+fn[128|c>>6&63]+fn[128|c&63]}return a},dT=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return aT(n),t},hT=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},pT=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},mT=function(t,n){return[].concat(t,n)},gT=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},$h={arrayToObject:Vh,assign:cT,combine:mT,compact:dT,decode:uT,encode:fT,isBuffer:pT,isRegExp:hT,maybeMap:gT,merge:lT},yT=$h,Rh=Lh,vT=Date.prototype.toISOString,jh=Rh.default;yT.encode,Rh.formatters[jh];var bT=$h;bT.decode;var Bh=e=>Array.isArray(e),Gl=e=>e===void 0,Yl=e=>e===null,wT=Function.bind.call(Function.call,Object.prototype.toString),xT=e=>!!e&&wT(e)==="[object Error]"||e instanceof Error,zh=(e,t)=>e instanceof t,ST=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},TT=e=>Object.prototype.toString.call(e)==="[object Date]"&&zh(e,Date),kn={array:Bh,date:TT,empty:e=>Yl(e)||Gl(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:zh,isError:xT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Yl(e)||Gl(e),null:Yl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Bh(e)&&typeof e=="object",primitive:ST,string:e=>typeof e=="string",undefined:Gl},ql=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=ql(s?[]:{},o,n)}else e[r]=ql(e[r],o,n)}else e[r]=n;return e},ET=e=>Object.keys(e),CT=e=>e.replace("[",".").replace("]","").split("."),Wh=(e,t,n)=>{const r=Array.isArray(t)?t:CT(t),o=structuredClone(e);return ql(o,r,n),o};const Kl="-";function PT(e){const t=kT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Kl);return a[0]===""&&a.length!==1&&a.shift(),Hh(a,t)||OT(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Hh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Kl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Uh=/^\[(.+)\]$/;function OT(e){if(Uh.test(e)){const t=Uh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function kT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return AT(Object.entries(e.classGroups),n).forEach(([s,i])=>{Zl(i,r,s,t)}),r}function Zl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Gh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(_T(o)){Zl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Zl(i,Gh(t,s),n,r)})})}function Gh(e,t){let n=e;return t.split(Kl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function _T(e){return e.isThemeGetter}function AT(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function IT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Yh="!";function DT(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){f=y;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(Yh),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:i})}:i}function MT(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function NT(e){return{cache:IT(e.cacheSize),parseClassName:DT(e),...PT(e)}}const FT=/\s+/;function LT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(FT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:i};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:i};f=!1}const h=MT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Yh:h,classGroupId:d,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}function qh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n}function $T(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=NT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=LT(l,n);return o(l,u),u}return function(){return s(VT.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,RT=/^\d+\/\d+$/,jT=new Set(["px","full","screen"]),BT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\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$/,WT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return wr(e)||jT.has(e)||RT.test(e)}function Xn(e){return co(e,"length",JT)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function Ii(e){return co(e,"number",wr)}function ss(e){return!!e&&Number.isInteger(Number(e))}function GT(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return Kh.test(e)}function Qn(e){return BT.test(e)}const YT=new Set(["length","size","percentage"]);function qT(e){return co(e,YT,Zh)}function KT(e){return co(e,"position",Zh)}const ZT=new Set(["image","url"]);function XT(e){return co(e,ZT,t1)}function QT(e){return co(e,"",e1)}function is(){return!0}function co(e,t,n){const r=Kh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function JT(e){return zT.test(e)&&!WT.test(e)}function Zh(){return!1}function e1(e){return HT.test(e)}function t1(e){return UT.test(e)}function n1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),f=Ue("invert"),d=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),y=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),g=Ue("saturate"),T=Ue("scale"),x=Ue("sepia"),E=Ue("skew"),C=Ue("space"),O=Ue("translate"),I=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],_=()=>[ve,t],j=()=>["",_n,Xn],D=()=>["auto",wr,ve],k=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[wr,Ii],Q=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[is],spacing:[_n,Xn],blur:["none","",Qn,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",Qn,ve],borderSpacing:_(),borderWidth:j(),contrast:V(),grayscale:q(),hueRotate:Q(),invert:q(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[GT,Xn],inset:L(),margin:L(),opacity:V(),padding:_(),saturate:V(),scale:V(),sepia:q(),skew:Q(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...k(),ve]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",ss,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",ss,ve]}],"grid-cols":[{"grid-cols":[is]}],"col-start-end":[{col:["auto",{span:["full",ss,ve]},ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[is]}],"row-start-end":[{row:["auto",{span:[ss,ve]},ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[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:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ii]}],"font-family":[{font:[is]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,Ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Xn]}],"underline-offset":[{"underline-offset":["auto",_n,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),KT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},XT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[_n,ve]}],"outline-w":[{outline:[_n,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_n,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,QT]}],"shadow-color":[{shadow:[is]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"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":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ss,ve]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Xn,Ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const r1=$T(n1),Xl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},o1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),s1=e=>kn.function(e),$t=(...e)=>r1(bx(e)),Ql=(e,t)=>{var r;console.log(e,t);const n=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;n==null||n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Xh=({reportStatus:e,hideLeft:t=!1,className:n,children:r,title:o})=>S.jsxs("div",{className:$t("w-full justify-between",t&&r===null?"hidden":"flex",n),children:[t?null:S.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,e?S.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[S.jsx(dx,{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}),S.jsx(hx,{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]}),Di=({optionalText:e="Optional",left:t,rightLabel:n,container:r,right:o,children:s,error:i,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return S.jsxs("fieldset",{"data-error":!!i,form:a,className:$t("group inline-block w-full",r),children:[S.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?S.jsx(Xh,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:e||n?S.jsxs(b.Fragment,{children:[h?null:S.jsx("span",{className:"text-opacity-70",children:e}),n?S.jsx(b.Fragment,{children:n}):null]}):null}):null,S.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:[t?S.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,s,o?S.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),S.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:i})]})},Qh=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>S.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:S.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),i1={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},a1={caseSensitive:!1,sort:!1},l1=[],c1=b.forwardRef(({options:e,required:t=!0,...n},r)=>{const[o,s]=b.useState(!1),[i,a]=b.useState(""),[l,c]=b.useState(n.value??n.defaultValue??""),[u,f]=b.useState(null),d=b.useRef(l1),h=Zd(u),p=new Jr(e,["value"],a1).search(i),{x:m,y,strategy:v,refs:w,context:g}=vi({open:o,transform:!0,onOpenChange:s,whileElementsMounted:ul,middleware:[fl(4),Cw({padding:10,apply(_){Object.assign(_.elements.floating.style,{width:`${_.rects.reference.width}px`,maxHeight:`${Math.min(480,_.availableHeight)}px`})}})]});b.useImperativeHandle(r,()=>{var _;return(_=w.domReference)==null?void 0:_.current},[w]);const T=sx(g,i1),{getReferenceProps:x,getFloatingProps:E,getItemProps:C}=bi([xi(g,{role:"listbox"}),yi(g),tx(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:_=>{const j=p.length-1;if(_===null&&h===0)return f(j);if(_===null&&h===j)return f(0);const D=_??h??null;return D===null?void 0:f(D)}})]),O=_=>{c(_.value),Ql(w.reference.current,_.value),s(!1),a("")},I=_=>{var D;const j=_.target.value;return a(j),!o&&j===""||j?s(!0):(D=n.onChange)==null?void 0:D.call(n,_)},N=()=>{s(!0),a("")},L=()=>{a(""),c(""),Ql(w.reference.current,""),s(!1)};return S.jsxs("fieldset",{className:"relative w-auto",children:[S.jsx(Di,{...n,required:t,right:S.jsxs("span",{className:"flex items-center gap-0.5",children:[S.jsx(Sl,{size:20}),l?S.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:S.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:S.jsx("input",{...x({...n,onChange:I,onFocus:N,ref:w.setReference,onClick:_=>_.currentTarget.focus(),onKeyDown(_){if(_.key==="Escape")return _.currentTarget.blur(),s(!1);if(_.key==="Enter"){if(u!==null&&p[u])return _.preventDefault(),O(p[u]);if(p.length===1)return _.preventDefault(),O(p[0])}}}),required:t,value:o?i: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||i?"pe-12":"",n.left?"ps-8":"",n.className)})}),S.jsx(gi,{preserveTabOrder:!0,children:S.jsx(vl,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:S.jsx("ul",{...E({ref:w.setFloating,style:{position:v,left:m??0,top:y??0,...T.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((_,j)=>b.createElement(Qh,{...C({onClick:()=>O(_),ref:D=>void(d.current[j]=D)}),key:`${_.value}-option`,option:_,selected:u===j,active:l===_.value}))})})})]})});var vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},vt.apply(this,arguments)};function Jl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ec(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var as=function(e){return e.replace(new RegExp(" ","g")," ")},Jh=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},u1=function(e){return e.replace(/^0+([0-9]+)/,"$1")},ep=function(e,t,n){var r=e.length-2,o=u1(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},tp=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},np=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},f1=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},tc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},d1=function(e){return e==="money"||e==="currency"},h1=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return vt(vt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},nc=function(e,t){var n=Jh(tp(e),t.fraction.length),r="".concat(t.currency).concat(ep(n,t.group,t.decimal));return as(r)},p1=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Jl(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=h1(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),d=function(p){var m=nc(p.target.value,f),y=np(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?nc(c.defaultValue,f):void 0;return b.createElement("input",vt({},c,{value:typeof c.value=="string"?nc(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),m1=1,g1=function(e){return e==="percentage"||e==="percent"||e==="percentual"},y1=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return vt(vt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},rc=function(e,t){var n=Jh(tp(e),t.fraction.length),r="".concat(ep(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},v1=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Jl(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=ec(b.useState(function(){var v,w;return(w=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(rc(w,f))},[i.value]);var f=b.useMemo(function(){var v=y1(r);return v.percentSign=as("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-m1,h=function(v){var w,g=a.current;g&&(g.setSelectionRange(d,d),v&&((w=i.onFocus)===null||w===void 0||w.call(i,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var g=w.selectionStart,T=w.selectionEnd,x=g!==T,E=d<g;!x&&E&&h()}s==null||s(v)},m=function(v){var w=rc(v.target.value,f),g=np(w);u(w),v.target.value=w,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var y=i.defaultValue?rc(i.defaultValue,f):void 0;return b.createElement("input",vt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},b1=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Mi[s];i===void 0?r.push(s.replace(ls.dots,"\\.").replace(ls.openParenthesis,"\\(").replace(ls.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ls.leadingBars,"\\")},cs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return oc(o,n);var s=b1(o);return n?"^".concat(s,"$"):s},w1=function(e){return e.replace(ls.escape,"\\$&")},oc=function(e,t){var n=e.map(function(r){return typeof r=="string"?w1(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Mi={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},x1=/\d/,rp="(dd) 9dddd-dddd",op="(dd) dddd-dddd",sp="ddd.ddd.ddd-dd",ip="dd.ddd.ddd/dddd-dd",Ni=function(e){return e.replace(/\D/g,"")},S1=["2",/[0-3]/,":",/[0-5]/,/\d/],T1=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Rt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:sp,isoDate:"dddd-dd-dd",cnpj:ip,telephone:op,cellphone:rp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ni(e).length<=11?sp:ip},int:function(e){return e===void 0&&(e=""),x1.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Ni(e);return t.length<11?op:rp},time:function(e){var t=Ni(e),n=t[0];return n==="2"?S1:T1}},jt=function(e,t,n){var r;return n===void 0&&(n={}),vt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:cs(e,"",!0),infinity:n.infinity},n)},Pt={cellTelephone:jt(Rt.cellTelephone,"tel"),cellphone:jt(Rt.cellphone,"tel"),cep:jt(Rt.cep,"decimal"),cnpj:jt(Rt.cnpj,"decimal"),color:jt(Rt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:jt(Rt.cpf,"decimal"),cpfCnpj:jt(Rt.cpfCnpj,"decimal",{transform:Ni}),creditCard:jt(Rt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:jt(Rt.date,"decimal"),int:jt(Rt.int,"decimal",{pattern:"[0-9]+"}),isoDate:jt(Rt.isoDate,"decimal"),telephone:jt(Rt.telephone,"tel"),time:jt(Rt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:jt(Rt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ap(e,t,n,r){var o,s;r===void 0&&(r=Mi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],d=i[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+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&s!==void 0?s:d),c+=1,l+=1}return a}var lp=function(e){return e},E1=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(cs(e,n,t));return r.test(n)};function C1(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var P1=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,d=e.as,h=Jl(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=tc(a),y=tc(f),v=tc(u),w=b.useRef(E1(u,s,h.value||h.defaultValue)),g=d??"input",T=ec(b.useState(""),2),x=T[0],E=T[1],C=C1(x),O=b.useCallback(function(k,F){var $,z,q=($=k??F)!==null&&$!==void 0?$:"";if(u===void 0)return q;var P=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return ap(P,typeof u=="function"?u(P):u,i??lp,c??Mi)},[i,u,c]),I=ec(b.useState(function(){return O(h.value,h.defaultValue)}),2),N=I[0],L=I[1],_=O(h.defaultValue,h.defaultValue),j=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var k=u(N);return Array.isArray(k)?oc(k,s):cs(u,N,s)}return typeof u=="string"?cs(u,N,s):oc(u,s)},[l,N,s,u]);b.useEffect(function(){if(h.value!==void 0){var k=O(h.value,h.defaultValue);L(k),p.current!==null&&(p.current.value=k)}},[h.value,u,i,h.defaultValue]);var D=function(k){var F,$,z,q,P,V=k.currentTarget,Q=k.target.value;if(v.current===void 0)return L(Q),(F=y.current)===null||F===void 0||F.call(y,Q),($=m.current)===null||$===void 0||$.call(m,k),f==null?void 0:f(Q);var ie=new RegExp(cs(v.current,Q,s)),ee=(z=V.selectionEnd)!==null&&z!==void 0?z:0,H=function(Z,de,B){if(Z.type!=="number")return Z.setSelectionRange(de,B)};if(r&&w.current&&Q.length>=N.length)return V.value=N,H(V,ee-1,ee-1);var A=!1;Q.length<C.length&&(w.current=!1,A=!0),ie.test(Q)&&(w.current=!0);var R=ee,W=Q[R-1],Y=ap(Q,typeof v.current=="function"?v.current(Q):v.current,i??lp,c??Mi);for(V.value=Y,L(Y);R<Y.length&&Y.charAt(R-1)!==W;)R+=1;A?H(V,ee,ee):H(V,R,R),k.target.value=Y,E(Y),(q=y.current)===null||q===void 0||q.call(y,Y),(P=m.current)===null||P===void 0||P.call(m,k)};return b.createElement(g,vt({},h,{ref:p,pattern:j,onChange:D,defaultValue:cp(h.defaultValue)?_:void 0,value:cp(h.value)?O(h.value,h.value):h.value}))}),cp=function(e){return typeof e=="string"},up=b.forwardRef(function(e,t){return d1(e.mask)?b.createElement(p1,vt({},e,{mask:void 0,ref:t})):g1(e.mask)?b.createElement(v1,vt({},e,{mask:void 0,ref:t})):b.createElement(P1,vt({},e,{ref:t}))}),Bt=function(e){return function(t){return b.createElement(up,vt({},e,t))}};Bt(Pt.cellTelephone),Bt(Pt.cellphone),Bt(Pt.cep),Bt(Pt.cnpj),Bt(Pt.color),Bt(Pt.cpf),Bt(Pt.cpfCnpj),Bt(Pt.creditCard),Bt(Pt.date),Bt(Pt.int),Bt(Pt.isoDate),Bt(Pt.telephone),Bt(Pt.time),Bt(Pt.uuid);var fp=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&f1(Pt,t.mask)?Pt[t.mask]:{mask:t.mask}},[t.mask]),o=vt(vt({},t),r);return b.createElement(up,vt({},o,{ref:n}))});const us=b.forwardRef(({type:e="text",container:t,next:n,rightLabel:r,optionalText:o,hideLeft:s=!1,right:i,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 y=m;if(y.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const w=document.getElementById(v);if(w)return w.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),S.jsx(Di,{...l,right:i,left:a,hideLeft:s,rightLabel:r,optionalText:o,container:$t("group inline-block w-full",t),children:S.jsx(fp,{...l,type:e,"data-next":n,ref:Xl(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",i?"pe-4":"",a?"ps-4":"",l.className)})})}),xr=b.forwardRef(({container:e,required:t=!0,options:n,...r},o)=>{const s=b.useRef(null),i=r.id??r.name;return b.useEffect(()=>{if(s.current===null)return;const a=s.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)}},[]),S.jsx(Di,{...r,required:t,container:$t("group inline-block w-full",e),right:S.jsx(Sl,{size:20}),children:S.jsxs("select",{...r,ref:Xl(o,s),id:i,name:i,required:t,"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:[S.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>S.jsx("option",{...a,children:a.label??a.value},`${i}-select-option-${a.value}`))]})})}),O1=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],k1=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],_1=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],A1=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],dp=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function hp(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?A1:_1:t.binary?k1:O1,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=dp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=dp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var sc={exports:{}},Fi={exports:{}},Ne={};/** @license React v16.13.1
|
|
122
|
+
`+t.prev}function Oi(e,t){var n=Rl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof Ll=="function"?Ll(e):[],i;if(ao){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||ao&&i["$"+l]instanceof Symbol||(wh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Ll=="function")for(var c=0;c<s.length;c++)Th.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Nh=so,lo=b1,K1=A1,Z1=es,_i=Nh("%WeakMap%",!0),Ai=Nh("%Map%",!0),X1=lo("WeakMap.prototype.get",!0),Q1=lo("WeakMap.prototype.set",!0),J1=lo("WeakMap.prototype.has",!0),eS=lo("Map.prototype.get",!0),tS=lo("Map.prototype.set",!0),nS=lo("Map.prototype.has",!0),zl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},rS=function(e,t){var n=zl(e,t);return n&&n.value},oS=function(e,t,n){var r=zl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},sS=function(e,t){return!!zl(e,t)},iS=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new Z1("Side channel does not contain "+K1(s))},get:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return X1(t,s)}else if(Ai){if(n)return eS(n,s)}else if(r)return rS(r,s)},has:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return J1(t,s)}else if(Ai){if(n)return nS(n,s)}else if(r)return sS(r,s);return!1},set:function(s,i){_i&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new _i),Q1(t,s,i)):Ai?(n||(n=new Ai),tS(n,s,i)):(r||(r={key:{},next:null}),oS(r,s,i))}};return o},aS=String.prototype.replace,lS=/%20/g,Wl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Fh={default:Wl.RFC3986,formatters:{RFC1738:function(e){return aS.call(e,lS,"+")},RFC3986:function(e){return String(e)}},RFC1738:Wl.RFC1738,RFC3986:Wl.RFC3986},cS=Fh,Hl=Object.prototype.hasOwnProperty,br=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),uS=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Lh=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},dS=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Hl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=Lh(t,r)),br(t)&&br(n)?(n.forEach(function(s,i){if(Hl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Hl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},fS=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},hS=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},pS=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===cS.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+dn[c];continue}if(c<2048){a=a+(dn[192|c>>6]+dn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(dn[224|c>>12]+dn[128|c>>6&63]+dn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=dn[240|c>>18]+dn[128|c>>12&63]+dn[128|c>>6&63]+dn[128|c&63]}return a},mS=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return uS(n),t},gS=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},yS=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},vS=function(t,n){return[].concat(t,n)},bS=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Vh={arrayToObject:Lh,assign:fS,combine:vS,compact:mS,decode:hS,encode:pS,isBuffer:yS,isRegExp:gS,maybeMap:bS,merge:dS},wS=Vh,$h=Fh,xS=Date.prototype.toISOString,Rh=$h.default;wS.encode,$h.formatters[Rh];var SS=Vh;SS.decode;var jh=e=>Array.isArray(e),Ul=e=>e===void 0,Gl=e=>e===null,TS=Function.bind.call(Function.call,Object.prototype.toString),ES=e=>!!e&&TS(e)==="[object Error]"||e instanceof Error,Bh=(e,t)=>e instanceof t,CS=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},PS=e=>Object.prototype.toString.call(e)==="[object Date]"&&Bh(e,Date),On={array:jh,date:PS,empty:e=>Gl(e)||Ul(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:Bh,isError:ES,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Gl(e)||Ul(e),null:Gl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!jh(e)&&typeof e=="object",primitive:CS,string:e=>typeof e=="string",undefined:Ul},Yl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=Yl(s?[]:{},o,n)}else e[r]=Yl(e[r],o,n)}else e[r]=n;return e},kS=e=>Object.keys(e),OS=e=>e.replace("[",".").replace("]","").split("."),zh=(e,t,n)=>{const r=Array.isArray(t)?t:OS(t),o=structuredClone(e);return Yl(o,r,n),o};const ql="-";function _S(e){const t=IS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(ql);return a[0]===""&&a.length!==1&&a.shift(),Wh(a,t)||AS(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Wh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Wh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(ql);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Hh=/^\[(.+)\]$/;function AS(e){if(Hh.test(e)){const t=Hh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function IS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return MS(Object.entries(e.classGroups),n).forEach(([s,i])=>{Kl(i,r,s,t)}),r}function Kl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Uh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(DS(o)){Kl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Kl(i,Uh(t,s),n,r)})})}function Uh(e,t){let n=e;return t.split(ql).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function DS(e){return e.isThemeGetter}function MS(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function NS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Gh="!";function FS(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){d=y;continue}}v==="["?c++:v==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Gh),p=h?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function LS(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function VS(e){return{cache:NS(e.cacheSize),parseClassName:FS(e),..._S(e)}}const $S=/\s+/;function RS(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split($S).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,f=r(d?c.substring(0,u):c);if(!f){if(!d)return{isTailwindClass:!1,originalClassName:i};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const h=LS(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Gh:h,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function jS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yh(t))&&(r&&(r+=" "),r+=n);return r}function Yh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Yh(e[r]))&&(n&&(n+=" "),n+=t);return n}function BS(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=VS(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=RS(l,n);return o(l,u),u}return function(){return s(jS.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const qh=/^\[(?:([a-z-]+):)?(.+)\]$/i,zS=/^\d+\/\d+$/,WS=new Set(["px","full","screen"]),HS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,US=/\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$/,GS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,YS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return wr(e)||WS.has(e)||zS.test(e)}function Xn(e){return co(e,"length",nT)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function Ii(e){return co(e,"number",wr)}function ss(e){return!!e&&Number.isInteger(Number(e))}function KS(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return qh.test(e)}function Qn(e){return HS.test(e)}const ZS=new Set(["length","size","percentage"]);function XS(e){return co(e,ZS,Kh)}function QS(e){return co(e,"position",Kh)}const JS=new Set(["image","url"]);function eT(e){return co(e,JS,oT)}function tT(e){return co(e,"",rT)}function is(){return!0}function co(e,t,n){const r=qh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function nT(e){return US.test(e)&&!GS.test(e)}function Kh(){return!1}function rT(e){return YS.test(e)}function oT(e){return qS.test(e)}function sT(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),d=Ue("invert"),f=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),y=Ue("margin"),v=Ue("opacity"),b=Ue("padding"),g=Ue("saturate"),T=Ue("scale"),S=Ue("sepia"),E=Ue("skew"),C=Ue("space"),k=Ue("translate"),I=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],O=()=>[ve,t],j=()=>["",_n,Xn],D=()=>["auto",wr,ve],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[wr,Ii],Q=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[is],spacing:[_n,Xn],blur:["none","",Qn,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",Qn,ve],borderSpacing:O(),borderWidth:j(),contrast:V(),grayscale:q(),hueRotate:Q(),invert:q(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[KS,Xn],inset:L(),margin:L(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:q(),skew:Q(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ve]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],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",ss,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",ss,ve]}],"grid-cols":[{"grid-cols":[is]}],"col-start-end":[{col:["auto",{span:["full",ss,ve]},ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[is]}],"row-start-end":[{row:["auto",{span:[ss,ve]},ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...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:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ii]}],"font-family":[{font:[is]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,Ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Xn]}],"underline-offset":[{"underline-offset":["auto",_n,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),QS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",XS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[_n,ve]}],"outline-w":[{outline:[_n,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_n,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,tT]}],"shadow-color":[{shadow:[is]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ss,ve]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Xn,Ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const iT=BS(sT),Zl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},aT=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),lT=e=>On.function(e),Mt=(...e)=>iT(Sx(e)),Xl=(e,t)=>{var r;const n=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;n==null||n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Zh=({reportStatus:e,hideLeft:t=!1,className:n,children:r,title:o})=>x.jsxs("div",{className:Mt("w-full justify-between",t&&r===null?"hidden":"flex",n),children:[t?null:x.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,e?x.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[x.jsx(fx,{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}),x.jsx(hx,{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]}),Di=({optionalText:e="Optional",left:t,rightLabel:n,container:r,feedback:o,right:s,children:i,error:a,form:l,id:c,name:u,title:d,placeholder:f,hideLeft:h,required:p})=>{const m=c??u;return x.jsxs("fieldset",{"data-error":!!a,form:l,className:Mt("group inline-block w-full",r),children:[x.jsxs("label",{form:l,htmlFor:m,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:[!h&&!n?x.jsx(Zh,{hideLeft:h,reportStatus:!0,title:d,placeholder:f,children:e||n?x.jsxs(w.Fragment,{children:[p?null:x.jsx("span",{className:"text-opacity-70",children:e}),n?x.jsx(w.Fragment,{children:n}):null]}):null}):null,x.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[t?x.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,i,s?x.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:s}):null]})]}),x.jsx("p",{className:"group-error:block group-error:text-danger mt-1 hidden text-xs group-has-[input:not(:focus):invalid[data-initialized=true]]:block",children:a}),x.jsx("p",{className:"mt-1 hidden text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block",children:o})]})},Xh=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>x.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:x.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),cT={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},uT={caseSensitive:!1,sort:!1},dT=[],fT=w.forwardRef(({options:e,required:t=!0,...n},r)=>{const[o,s]=w.useState(!1),[i,a]=w.useState(""),[l,c]=w.useState(n.value??n.defaultValue??""),[u,d]=w.useState(null),f=w.useRef(dT),h=Kf(u),p=new Jr(e,["value"],uT).search(i),{x:m,y,strategy:v,refs:b,context:g}=vi({open:o,transform:!0,onOpenChange:s,whileElementsMounted:ul,middleware:[dl(4),Ew({padding:10,apply(O){Object.assign(O.elements.floating.style,{width:`${O.rects.reference.width}px`,maxHeight:`${Math.min(480,O.availableHeight)}px`})}})]});w.useImperativeHandle(r,()=>{var O;return(O=b.domReference)==null?void 0:O.current},[b]);const T=ox(g,cT),{getReferenceProps:S,getFloatingProps:E,getItemProps:C}=bi([xi(g,{role:"listbox"}),yi(g),ex(g,{listRef:f,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:O=>{const j=p.length-1;if(O===null&&h===0)return d(j);if(O===null&&h===j)return d(0);const D=O??h??null;return D===null?void 0:d(D)}})]),k=O=>{c(O.value),Xl(b.reference.current,O.value),s(!1),a("")},I=O=>{var D;const j=O.target.value;return a(j),!o&&j===""||j?s(!0):(D=n.onChange)==null?void 0:D.call(n,O)},N=()=>{s(!0),a("")},L=()=>{a(""),c(""),Xl(b.reference.current,""),s(!1)};return x.jsxs("fieldset",{className:"relative w-auto",children:[x.jsx(Di,{...n,required:t,right:x.jsxs("span",{className:"flex items-center gap-0.5",children:[x.jsx(Yf,{size:20}),l?x.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:x.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:x.jsx("input",{...S({...n,onChange:I,onFocus:N,ref:b.setReference,onClick:O=>O.currentTarget.focus(),onKeyDown(O){if(O.key==="Escape")return O.currentTarget.blur(),s(!1);if(O.key==="Enter"){if(u!==null&&p[u])return O.preventDefault(),k(p[u]);if(p.length===1)return O.preventDefault(),k(p[0])}}}),required:t,value:o?i:l,"aria-autocomplete":"list",autoComplete:"off",className:Mt("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||i?"pe-12":"",n.left?"ps-8":"",n.className)})}),x.jsx(gi,{preserveTabOrder:!0,children:x.jsx(vl,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:x.jsx("ul",{...E({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...T.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((O,j)=>w.createElement(Xh,{...C({onClick:()=>k(O),ref:D=>void(f.current[j]=D),selected:u===j,active:l===O.value}),key:`${O.value}-option`,option:O,selected:u===j,active:l===O.value}))})})})]})});var bt=function(){return bt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},bt.apply(this,arguments)};function Ql(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Jl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var as=function(e){return e.replace(new RegExp(" ","g")," ")},Qh=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},hT=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Jh=function(e,t,n){var r=e.length-2,o=hT(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},ep=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},tp=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},pT=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ec=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},mT=function(e){return e==="money"||e==="currency"},gT=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return bt(bt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},tc=function(e,t){var n=Qh(ep(e),t.fraction.length),r="".concat(t.currency).concat(Jh(n,t.group,t.decimal));return as(r)},yT=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Ql(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var d=w.useMemo(function(){var p=gT(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),f=function(p){var m=tc(p.target.value,d),y=tp(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?tc(c.defaultValue,d):void 0;return w.createElement("input",bt({},c,{value:typeof c.value=="string"?tc(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),vT=1,bT=function(e){return e==="percentage"||e==="percent"||e==="percentual"},wT=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return bt(bt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},nc=function(e,t){var n=Qh(ep(e),t.fraction.length),r="".concat(Jh(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},xT=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Ql(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Jl(w.useState(function(){var v,b;return(b=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(nc(b,d))},[i.value]);var d=w.useMemo(function(){var v=wT(r);return v.percentSign=as("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-vT,h=function(v){var b,g=a.current;g&&(g.setSelectionRange(f,f),v&&((b=i.onFocus)===null||b===void 0||b.call(i,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,T=b.selectionEnd,S=g!==T,E=f<g;!S&&E&&h()}s==null||s(v)},m=function(v){var b=nc(v.target.value,d),g=tp(b);u(b),v.target.value=b,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){return h()},[c]);var y=i.defaultValue?nc(i.defaultValue,d):void 0;return w.createElement("input",bt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ST=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Mi[s];i===void 0?r.push(s.replace(ls.dots,"\\.").replace(ls.openParenthesis,"\\(").replace(ls.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ls.leadingBars,"\\")},cs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return rc(o,n);var s=ST(o);return n?"^".concat(s,"$"):s},TT=function(e){return e.replace(ls.escape,"\\$&")},rc=function(e,t){var n=e.map(function(r){return typeof r=="string"?TT(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Mi={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},ET=/\d/,np="(dd) 9dddd-dddd",rp="(dd) dddd-dddd",op="ddd.ddd.ddd-dd",sp="dd.ddd.ddd/dddd-dd",Ni=function(e){return e.replace(/\D/g,"")},CT=["2",/[0-3]/,":",/[0-5]/,/\d/],PT=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Rt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:op,isoDate:"dddd-dd-dd",cnpj:sp,telephone:rp,cellphone:np,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ni(e).length<=11?op:sp},int:function(e){return e===void 0&&(e=""),ET.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Ni(e);return t.length<11?rp:np},time:function(e){var t=Ni(e),n=t[0];return n==="2"?CT:PT}},jt=function(e,t,n){var r;return n===void 0&&(n={}),bt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:cs(e,"",!0),infinity:n.infinity},n)},Pt={cellTelephone:jt(Rt.cellTelephone,"tel"),cellphone:jt(Rt.cellphone,"tel"),cep:jt(Rt.cep,"decimal"),cnpj:jt(Rt.cnpj,"decimal"),color:jt(Rt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:jt(Rt.cpf,"decimal"),cpfCnpj:jt(Rt.cpfCnpj,"decimal",{transform:Ni}),creditCard:jt(Rt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:jt(Rt.date,"decimal"),int:jt(Rt.int,"decimal",{pattern:"[0-9]+"}),isoDate:jt(Rt.isoDate,"decimal"),telephone:jt(Rt.telephone,"tel"),time:jt(Rt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:jt(Rt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ip(e,t,n,r){var o,s;r===void 0&&(r=Mi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=i[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&s!==void 0?s:f),c+=1,l+=1}return a}var ap=function(e){return e},kT=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(cs(e,n,t));return r.test(n)};function OT(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var _T=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Ql(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=ec(a),y=ec(d),v=ec(u),b=w.useRef(kT(u,s,h.value||h.defaultValue)),g=f??"input",T=Jl(w.useState(""),2),S=T[0],E=T[1],C=OT(S),k=w.useCallback(function(_,F){var $,z,q=($=_??F)!==null&&$!==void 0?$:"";if(u===void 0)return q;var P=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return ip(P,typeof u=="function"?u(P):u,i??ap,c??Mi)},[i,u,c]),I=Jl(w.useState(function(){return k(h.value,h.defaultValue)}),2),N=I[0],L=I[1],O=k(h.defaultValue,h.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(N);return Array.isArray(_)?rc(_,s):cs(u,N,s)}return typeof u=="string"?cs(u,N,s):rc(u,s)},[l,N,s,u]);w.useEffect(function(){if(h.value!==void 0){var _=k(h.value,h.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[h.value,u,i,h.defaultValue]);var D=function(_){var F,$,z,q,P,V=_.currentTarget,Q=_.target.value;if(v.current===void 0)return L(Q),(F=y.current)===null||F===void 0||F.call(y,Q),($=m.current)===null||$===void 0||$.call(m,_),d==null?void 0:d(Q);var ie=new RegExp(cs(v.current,Q,s)),ee=(z=V.selectionEnd)!==null&&z!==void 0?z:0,H=function(Z,fe,B){if(Z.type!=="number")return Z.setSelectionRange(fe,B)};if(r&&b.current&&Q.length>=N.length)return V.value=N,H(V,ee-1,ee-1);var A=!1;Q.length<C.length&&(b.current=!1,A=!0),ie.test(Q)&&(b.current=!0);var R=ee,W=Q[R-1],Y=ip(Q,typeof v.current=="function"?v.current(Q):v.current,i??ap,c??Mi);for(V.value=Y,L(Y);R<Y.length&&Y.charAt(R-1)!==W;)R+=1;A?H(V,ee,ee):H(V,R,R),_.target.value=Y,E(Y),(q=y.current)===null||q===void 0||q.call(y,Y),(P=m.current)===null||P===void 0||P.call(m,_)};return w.createElement(g,bt({},h,{ref:p,pattern:j,onChange:D,defaultValue:lp(h.defaultValue)?O:void 0,value:lp(h.value)?k(h.value,h.value):h.value}))}),lp=function(e){return typeof e=="string"},cp=w.forwardRef(function(e,t){return mT(e.mask)?w.createElement(yT,bt({},e,{mask:void 0,ref:t})):bT(e.mask)?w.createElement(xT,bt({},e,{mask:void 0,ref:t})):w.createElement(_T,bt({},e,{ref:t}))}),Bt=function(e){return function(t){return w.createElement(cp,bt({},e,t))}};Bt(Pt.cellTelephone),Bt(Pt.cellphone),Bt(Pt.cep),Bt(Pt.cnpj),Bt(Pt.color),Bt(Pt.cpf),Bt(Pt.cpfCnpj),Bt(Pt.creditCard),Bt(Pt.date),Bt(Pt.int),Bt(Pt.isoDate),Bt(Pt.telephone),Bt(Pt.time),Bt(Pt.uuid);var up=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&pT(Pt,t.mask)?Pt[t.mask]:{mask:t.mask}},[t.mask]),o=bt(bt({},t),r);return w.createElement(cp,bt({},o,{ref:n}))});const us=w.forwardRef(({type:e="text",container:t,feedback:n=null,next:r,rightLabel:o,optionalText:s,hideLeft:i=!1,right:a,left:l,...c},u)=>{const d=c.id??c.name,f=w.useRef(null);return w.useEffect(()=>{if(f.current===null)return;const h=f.current,p=()=>h.setAttribute("data-initialized","true"),m=y=>{const v=y;if(v.key==="Enter"&&h.enterKeyHint==="next"){const b=h.getAttribute("data-next");if(b){const g=document.getElementById(b);if(g)return g.focus(),void v.preventDefault()}}};return h.addEventListener("keydown",m),h.addEventListener("focus",p),()=>{h.removeEventListener("keydown",m),h.removeEventListener("focus",p)}},[]),x.jsx(Di,{...c,feedback:n,right:a,left:l,hideLeft:i,rightLabel:o,optionalText:s,container:Mt("group inline-block w-full",t),children:x.jsx(up,{...c,type:e,"data-next":r,ref:Zl(u,f),id:d,name:d,className:Mt("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",a?"pe-4":"",l?"ps-4":"",c.className)})})}),xr=w.forwardRef(({container:e,required:t=!0,options:n,...r},o)=>{const s=w.useRef(null),i=r.id??r.name;return w.useEffect(()=>{if(s.current===null)return;const a=s.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)}},[]),x.jsx(Di,{...r,required:t,container:Mt("group inline-block w-full",e),right:x.jsx(Yf,{size:20}),children:x.jsxs("select",{...r,ref:Zl(o,s),id:i,name:i,required:t,"data-selected":!!r.value||!1,className:Mt("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:[x.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>x.jsx("option",{...a,children:a.label??a.value},`${i}-select-option-${a.value}`))]})})}),AT=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],IT=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],DT=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],MT=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],dp=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function fp(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?MT:DT:t.binary?IT:AT,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=dp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=dp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var oc={exports:{}},Fi={exports:{}},Ne={};/** @license React v16.13.1
|
|
108
123
|
* react-is.production.min.js
|
|
109
124
|
*
|
|
110
125
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
111
126
|
*
|
|
112
127
|
* This source code is licensed under the MIT license found in the
|
|
113
128
|
* LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/var
|
|
129
|
+
*/var hp;function NT(){if(hp)return Ne;hp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case h:case i:return S;default:return E}}case n:return E}}}function T(S){return g(S)===c}return Ne.AsyncMode=l,Ne.ConcurrentMode=c,Ne.ContextConsumer=a,Ne.ContextProvider=i,Ne.Element=t,Ne.ForwardRef=u,Ne.Fragment=r,Ne.Lazy=p,Ne.Memo=h,Ne.Portal=n,Ne.Profiler=s,Ne.StrictMode=o,Ne.Suspense=d,Ne.isAsyncMode=function(S){return T(S)||g(S)===l},Ne.isConcurrentMode=T,Ne.isContextConsumer=function(S){return g(S)===a},Ne.isContextProvider=function(S){return g(S)===i},Ne.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ne.isForwardRef=function(S){return g(S)===u},Ne.isFragment=function(S){return g(S)===r},Ne.isLazy=function(S){return g(S)===p},Ne.isMemo=function(S){return g(S)===h},Ne.isPortal=function(S){return g(S)===n},Ne.isProfiler=function(S){return g(S)===s},Ne.isStrictMode=function(S){return g(S)===o},Ne.isSuspense=function(S){return g(S)===d},Ne.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===h||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===y||S.$$typeof===v||S.$$typeof===b||S.$$typeof===m)},Ne.typeOf=g,Ne}var Fe={};/** @license React v16.13.1
|
|
115
130
|
* react-is.development.js
|
|
116
131
|
*
|
|
117
132
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
118
133
|
*
|
|
119
134
|
* This source code is licensed under the MIT license found in the
|
|
120
135
|
* LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/var
|
|
136
|
+
*/var pp;function FT(){return pp||(pp=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function g(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===s||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===i||B.$$typeof===a||B.$$typeof===u||B.$$typeof===y||B.$$typeof===v||B.$$typeof===b||B.$$typeof===m)}function T(B){if(typeof B=="object"&&B!==null){var Me=B.$$typeof;switch(Me){case t:var rt=B.type;switch(rt){case l:case c:case r:case s:case o:case d:return rt;default:var He=rt&&rt.$$typeof;switch(He){case a:case u:case p:case h:case i:return He;default:return Me}}case n:return Me}}}var S=l,E=c,C=a,k=i,I=t,N=u,L=r,O=p,j=h,D=n,_=s,F=o,$=d,z=!1;function q(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.")),P(B)||T(B)===l}function P(B){return T(B)===c}function V(B){return T(B)===a}function Q(B){return T(B)===i}function ie(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function H(B){return T(B)===r}function A(B){return T(B)===p}function R(B){return T(B)===h}function W(B){return T(B)===n}function Y(B){return T(B)===s}function Z(B){return T(B)===o}function fe(B){return T(B)===d}Fe.AsyncMode=S,Fe.ConcurrentMode=E,Fe.ContextConsumer=C,Fe.ContextProvider=k,Fe.Element=I,Fe.ForwardRef=N,Fe.Fragment=L,Fe.Lazy=O,Fe.Memo=j,Fe.Portal=D,Fe.Profiler=_,Fe.StrictMode=F,Fe.Suspense=$,Fe.isAsyncMode=q,Fe.isConcurrentMode=P,Fe.isContextConsumer=V,Fe.isContextProvider=Q,Fe.isElement=ie,Fe.isForwardRef=ee,Fe.isFragment=H,Fe.isLazy=A,Fe.isMemo=R,Fe.isPortal=W,Fe.isProfiler=Y,Fe.isStrictMode=Z,Fe.isSuspense=fe,Fe.isValidElementType=g,Fe.typeOf=T}()),Fe}var mp;function gp(){return mp||(mp=1,process.env.NODE_ENV==="production"?Fi.exports=NT():Fi.exports=FT()),Fi.exports}/*
|
|
122
137
|
object-assign
|
|
123
138
|
(c) Sindre Sorhus
|
|
124
139
|
@license MIT
|
|
125
|
-
*/var
|
|
126
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var B=
|
|
127
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
128
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
129
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
130
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wp(e,t){if(e){if(typeof e=="string")return gc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gc(e,t)}}function gc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _E(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function AE(e){if(Array.isArray(e))return e}function Hp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hp(Object(n),!0).forEach(function(r){yc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ri(e,t){if(e==null)return{};var n=IE(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var vc=b.forwardRef(function(e,t){var n=e.children,r=Ri(e,wE),o=Gp(r),s=o.open,i=Ri(o,xE);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(Xe(Xe({},i),{},{open:s})))});vc.displayName="Dropzone";var Up={disabled:!1,getFilesFromEvent:W1,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};vc.defaultProps=Up,vc.propTypes={children:je.func,accept:je.objectOf(je.arrayOf(je.string)),multiple:je.bool,preventDropOnDocument:je.bool,noClick:je.bool,noKeyboard:je.bool,noDrag:je.bool,noDragEventsBubbling:je.bool,minSize:je.number,maxSize:je.number,maxFiles:je.number,disabled:je.bool,getFilesFromEvent:je.func,onFileDialogCancel:je.func,onFileDialogOpen:je.func,useFsAccessApi:je.bool,autoFocus:je.bool,onDragEnter:je.func,onDragLeave:je.func,onDragOver:je.func,onDrop:je.func,onDropAccepted:je.func,onDropRejected:je.func,onError:je.func,validator:je.func};var bc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Gp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xe(Xe({},Up),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,x=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,O=t.onError,I=t.validator,N=b.useMemo(function(){return yE(n)},[n]),L=b.useMemo(function(){return gE(n)},[n]),_=b.useMemo(function(){return typeof y=="function"?y:Yp},[y]),j=b.useMemo(function(){return typeof m=="function"?m:Yp},[m]),D=b.useRef(null),k=b.useRef(null),F=b.useReducer(DE,bc),$=mc(F,2),z=$[0],q=$[1],P=z.isFocused,V=z.isFileDialogActive,Q=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&mE()),ie=function(){!Q.current&&V&&setTimeout(function(){if(k.current){var se=k.current.files;se.length||(q({type:"closeDialog"}),j())}},300)};b.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[k,V,j,Q]);var ee=b.useRef([]),H=function(se){D.current&&D.current.contains(se.target)||(se.preventDefault(),ee.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",jp,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",jp),document.removeEventListener("drop",H))}},[D,g]),b.useEffect(function(){return!r&&w&&D.current&&D.current.focus(),function(){}},[D,w,r]);var A=b.useCallback(function(X){O?O(X):console.error(X)},[O]),R=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[].concat(EE(ee.current),[X.target]),$i(X)&&Promise.resolve(o(X)).then(function(se){if(!(Vi(X)&&!C)){var _e=se.length,Ke=_e>0&&fE({files:se,accept:N,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),St=_e>0&&!Ke;q({isDragAccept:Ke,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(se){return A(se)})},[o,c,A,C,N,i,s,a,l,I]),W=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=$i(X);if(se&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return se&&f&&f(X),!1},[f,C]),Y=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=ee.current.filter(function(Ke){return D.current&&D.current.contains(Ke)}),_e=se.indexOf(X.target);_e!==-1&&se.splice(_e,1),ee.current=se,!(se.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),$i(X)&&u&&u(X))},[D,u,C]),Z=b.useCallback(function(X,se){var _e=[],Ke=[];X.forEach(function(St){var At=$p(St,N),Lt=mc(At,2),jr=Lt[0],Wo=Lt[1],Ho=Rp(St,i,s),Ga=mc(Ho,2),Lf=Ga[0],Vf=Ga[1],$f=I?I(St):null;if(jr&&Lf&&!$f)_e.push(St);else{var Rf=[Wo,Vf];$f&&(Rf=Rf.concat($f)),Ke.push({file:St,errors:Rf.filter(function(aL){return aL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(St){Ke.push({file:St,errors:[uE]})}),_e.splice(0)),q({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),d&&d(_e,Ke,se),Ke.length>0&&p&&p(Ke,se),_e.length>0&&h&&h(_e,se)},[q,a,N,i,s,l,d,h,p,I]),de=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[],$i(X)&&Promise.resolve(o(X)).then(function(se){Vi(X)&&!C||Z(se,X)}).catch(function(se){return A(se)}),q({type:"reset"})},[o,Z,A,C]),B=b.useCallback(function(){if(Q.current){q({type:"openDialog"}),_();var X={multiple:a,types:L};window.showOpenFilePicker(X).then(function(se){return o(se)}).then(function(se){Z(se,null),q({type:"closeDialog"})}).catch(function(se){vE(se)?(j(se),q({type:"closeDialog"})):bE(se)?(Q.current=!1,k.current?(k.current.value=null,k.current.click()):A(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."))):A(se)});return}k.current&&(q({type:"openDialog"}),_(),k.current.value=null,k.current.click())},[q,_,j,v,Z,A,L,a]),Me=b.useCallback(function(X){!D.current||!D.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[D,B]),rt=b.useCallback(function(){q({type:"focus"})},[]),He=b.useCallback(function(){q({type:"blur"})},[]),ot=b.useCallback(function(){T||(pE()?setTimeout(B,0):B())},[T,B]),ue=function(se){return r?null:se},Ee=function(se){return x?null:ue(se)},le=function(se){return E?null:ue(se)},Oe=function(se){C&&se.stopPropagation()},ut=b.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.role,St=X.onKeyDown,At=X.onFocus,Lt=X.onBlur,jr=X.onClick,Wo=X.onDragEnter,Ho=X.onDragOver,Ga=X.onDragLeave,Lf=X.onDrop,Vf=Ri(X,SE);return Xe(Xe(yc({onKeyDown:Ee(dn(St,Me)),onFocus:Ee(dn(At,rt)),onBlur:Ee(dn(Lt,He)),onClick:ue(dn(jr,ot)),onDragEnter:le(dn(Wo,R)),onDragOver:le(dn(Ho,W)),onDragLeave:le(dn(Ga,Y)),onDrop:le(dn(Lf,de)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,D),!r&&!x?{tabIndex:0}:{}),Vf)}},[D,Me,rt,He,ot,R,W,Y,de,x,E,r]),ke=b.useCallback(function(X){X.stopPropagation()},[]),ft=b.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.onChange,St=X.onClick,At=Ri(X,TE),Lt=yc({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ue(dn(Ke,de)),onClick:ue(dn(St,ke)),tabIndex:-1},_e,k);return Xe(Xe({},Lt),At)}},[k,n,a,de,r]);return Xe(Xe({},z),{},{isFocused:P&&!r,getRootProps:ut,getInputProps:ft,rootRef:D,inputRef:k,open:ue(B)})}function DE(e,t){switch(t.type){case"focus":return Xe(Xe({},e),{},{isFocused:!0});case"blur":return Xe(Xe({},e),{},{isFocused:!1});case"openDialog":return Xe(Xe({},bc),{},{isFileDialogActive:!0});case"closeDialog":return Xe(Xe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xe(Xe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xe(Xe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xe({},bc);default:return e}}function Yp(){}function qp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ME(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qp(e))&&(r&&(r+=" "),r+=t);return r}const Kp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zp=ME,wc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=Kp(u)||Kp(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=t==null||(r=t.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,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,f,d]:c},[]);return Zp(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},hs=b.forwardRef(function({as:t,...n},r){const o=t||"span";return S.jsx(o,{...n,ref:r})}),NE=wc("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"}}),ps=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return S.jsxs(hs,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:$t(NE({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),FE=e=>S.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>S.jsx("li",{className:"flex flex-1",children:S.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.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-${t.name}`))}),LE={isImage:e=>e.type.includes("image")},VE=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(LE.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:hp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:hp(e.file.size)})},[e.file]),t.type==="img"?S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[S.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{})})]}):S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[S.jsx(px,{size:48}),S.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{className:"text-danger"})})]})},$E=e=>S.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>S.jsx(VE,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),RE=e=>e.isDragActive?S.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?S.jsx($E,{onDeleteFile:e.onDeleteFile,files:e.files}):S.jsx(b.Fragment,{children:e.idle}),jE=S.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[S.jsx(yx,{size:64}),S.jsxs("p",{children:["You can drag your files or"," ",S.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),BE=({idle:e=jE,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Gp({onDrop:i});return S.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:[S.jsx("input",{...l(r),name:r.name,id:r.name}),S.jsx(RE,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},zE=["INPUT","SELECT"],Xp=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{zE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},WE=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return S.jsx("form",{...e,onSubmit:t})},HE=({children:e,...t})=>{const n=b.useId(),[r,o]=b.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return S.jsxs("div",{className:"flex items-center",children:[S.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),S.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"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:S.jsx("span",{"aria-hidden":"true","data-checked":s,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"})}),S.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:S.jsx("span",{className:"font-medium text-foreground",children:e})})]})},ji=0,Jn=1,ho=2,Qp=4;function ms(e,t){return n=>e(t(n))}function UE(e,t){return t(e)}function Jp(e,t){return n=>e(t,n)}function em(e,t){return()=>e(t)}function Bi(e,t){return t(e),e}function Ge(...e){return e}function GE(e){e()}function tm(e){return()=>e}function YE(...e){return()=>{e.map(GE)}}function xc(e){return e!==void 0}function Tr(){}function Le(e,t){return e(Jn,t)}function be(e,t){e(ji,t)}function Sc(e){e(ho)}function Ot(e){return e(Qp)}function ce(e,t){return Le(e,Jp(t,ji))}function hn(e,t){const n=e(Jn,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case ho:e.splice(0,e.length);return;case Jn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ji:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function K(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case Jn:o(t);break;case ji:t=o;break;case Qp:return t}return n(r,o)}}function qE(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Jn:return s?n===s?void 0:(r(),n=s,t=Le(e,s),t):(r(),Tr);case ho:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Gt(e){return Bi(Ce(),t=>ce(e,t))}function kt(e,t){return Bi(K(t),n=>ce(e,n))}function KE(...e){return t=>e.reduceRight(UE,t)}function U(e,...t){const n=KE(...t);return(r,o)=>{switch(r){case Jn:return Le(e,n(o));case ho:Sc(e);return}}}function nm(e,t){return e===t}function Ye(e=nm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function oe(e){return t=>ms(t,e)}function pn(e){return t=>()=>t(e)}function mn(e,t){return n=>r=>n(t=e(t,r))}function po(e){return t=>n=>{e>0?e--:t(n)}}function er(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function rm(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function om(...e){return function(t,n){switch(t){case Jn:return YE(...e.map(r=>Le(r,n)));case ho:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=nm){return U(e,Ye(t))}function yt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case Jn:return r===o&&i(n),Le(t,i);case ho:return Sc(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ae(e,t=[],{singleton:n}={singleton:!0}){return{id:ZE(),constructor:e,dependencies:t,singleton:n}}const ZE=()=>Symbol();function XE(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function QE(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const zi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Tc(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const g of r){const T=v[t.required[g]];be(T,w[g])}for(const g of o)if(g in w){const T=v[t.optional[g]];be(T,w[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((w,g)=>(w[g]=T=>{const x=v[t.methods[g]];be(x,T)},w),{})}function u(v){return i.reduce((w,g)=>(w[g]=qE(v[t.events[g]]),w),{})}const f=b.forwardRef((v,w)=>{const{children:g,...T}=v,[x]=b.useState(()=>Bi(XE(e),C=>l(C,T))),[E]=b.useState(em(u,x));return zi(()=>{for(const C of i)C in T&&Le(E[C],T[C]);return()=>{Object.values(E).map(Sc)}},[T,E,x]),zi(()=>{l(x,T)}),b.useImperativeHandle(w,tm(c(x))),b.createElement(a.Provider,{value:x},n?b.createElement(n,QE([...r,...o,...i],T),g):g)}),d=v=>b.useCallback(Jp(be,b.useContext(a)[v]),[v]),h=v=>{const g=b.useContext(a)[v],T=b.useCallback(x=>Le(g,x),[g]);return b.useSyncExternalStore(T,()=>Ot(g),()=>Ot(g))},p=v=>{const g=b.useContext(a)[v],[T,x]=b.useState(em(Ot,g));return zi(()=>Le(g,E=>{E!==T&&x(tm(E))}),[g,T]),T},m=b.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,w)=>{const T=b.useContext(a)[v];zi(()=>Le(T,w),[w,T])}}}const JE=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Yt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Yt||{});const eC={0:"debug",1:"log",2:"warn",3:"error"},tC=()=>typeof globalThis>"u"?window:globalThis,tr=Ae(()=>{const e=K(3);return{log:K((n,r,o=1)=>{var s;const i=(s=tC().VIRTUOSO_LOG_LEVEL)!=null?s:Ot(e);o>=i&&console[eC[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ec(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function gn(e,t=!0){return Ec(e,t).callbackRef}function sm(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=nC(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),s==null||s(rC("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ec(a,n)}function nC(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Yt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function rC(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}function nn(e,t){return Math.round(e.getBoundingClientRect()[t])}function im(e,t){return Math.abs(e-t)<1.01}function am(e,t,n,r=Tr,o){const s=b.useRef(null),i=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,y=h?window.innerHeight:d.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():Bf.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const d=s.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,y;d===window?(m=Math.max(nn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,p=nn(d,"height"),y=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),im(p,m)||f.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,d.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Mt=Ae(()=>{const e=Ce(),t=Ce(),n=K(0),r=Ce(),o=K(0),s=Ce(),i=Ce(),a=K(0),l=K(0),c=K(0),u=K(0),f=Ce(),d=Ce(),h=K(!1);return ce(U(e,oe(({scrollTop:p})=>p)),t),ce(U(e,oe(({scrollHeight:p})=>p)),i),ce(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),gs={lvl:0};function lm(e,t,n,r=gs,o=gs){return{k:e,v:t,lvl:n,l:r,r:o}}function Be(e){return e===gs}function mo(){return gs}function Cc(e,t){if(Be(e))return gs;const{k:n,l:r,r:o}=e;if(t===n){if(Be(r))return o;if(Be(o))return r;{const[s,i]=cm(r);return Wi(dt(e,{k:s,v:i,l:um(r)}))}}else return t<n?Wi(dt(e,{l:Cc(r,t)})):Wi(dt(e,{r:Cc(o,t)}))}function ys(e,t){if(!Be(e))return t===e.k?e.v:t<e.k?ys(e.l,t):ys(e.r,t)}function rn(e,t,n="k"){if(Be(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=rn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return rn(e.l,t,n)}function qt(e,t,n){return Be(e)?lm(t,n,1):t===e.k?dt(e,{k:t,v:n}):t<e.k?fm(dt(e,{l:qt(e.l,t,n)})):fm(dt(e,{r:qt(e.r,t,n)}))}function Pc(e,t,n){if(Be(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Pc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Pc(i,t,n))),a}function Er(e){return Be(e)?[]:[...Er(e.l),{k:e.k,v:e.v},...Er(e.r)]}function cm(e){return Be(e.r)?[e.k,e.v]:cm(e.r)}function um(e){return Be(e.r)?e.l:Wi(dt(e,{r:um(e.r)}))}function dt(e,t){return lm(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Oc(e){return Be(e)||e.lvl>e.r.lvl}function fm(e){return kc(hm(e))}function Wi(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Oc(t))return hm(dt(e,{lvl:r-1}));if(!Be(t)&&!Be(t.r))return dt(t.r,{l:dt(t,{r:t.r.l}),r:dt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Oc(e))return kc(dt(e,{lvl:r-1}));if(!Be(n)&&!Be(n.l)){const o=n.l,s=Oc(o)?n.lvl-1:n.lvl;return dt(o,{l:dt(e,{r:o.l,lvl:r-1}),r:kc(dt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Hi(e,t,n){if(Be(e))return[];const r=rn(e,t)[0];return oC(Pc(e,r,n))}function dm(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function oC(e){return dm(e,({k:t,v:n})=>({index:t,value:n}))}function kc(e){const{r:t,lvl:n}=e;return!Be(t)&&!Be(t.r)&&t.lvl===n&&t.r.lvl===n?dt(t,{l:dt(e,{r:t.l}),lvl:n+1}):e}function hm(e){const{l:t}=e;return!Be(t)&&t.lvl===e.lvl?dt(t,{r:dt(e,{l:t.r})}):e}function Ui(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function pm(e,t,n){return e[Ui(e,t,n)]}function sC(e,t,n,r){const o=Ui(e,t,r),s=Ui(e,n,r,o);return e.slice(o,s+1)}const _c=Ae(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function iC(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function mm(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function aC(e,t){let n=Be(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Be(e)){e=qt(e,0,o);continue}const a=Hi(e,s-1,i+1);if(a.some(iC(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(i>=u||o===d)&&(e=Cc(e,u)):(c=d!==o,l=!0),f>i&&i>=u&&d!==o&&(e=qt(e,i+1,d));c&&(e=qt(e,s,o))}return[e,n]}function lC(){return{offsetTree:[],sizeTree:mo(),groupOffsetTree:mo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Ac({index:e},t){return t===e?0:t<e?-1:1}function cC({offset:e},t){return t===e?0:t<e?-1:1}function uC(e){return{index:e.index,value:e}}function fC(e,t,n,r=0){return r>0&&(t=Math.max(t,pm(e,r,Ac).offset)),dm(sC(e,t,n,cC),uC)}function Ic(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ui(o,t-1,Ac),a=o[l].offset;const u=rn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===rn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Hi(n,t,1/0)){const f=c-s,d=f*i+a+f*r;o.push({offset:d,size:u,index:c}),s=c,a=d,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function dC(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Yt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Be(s)&&t.length===2){const d=t[0].size,h=t[1].size;i=n.reduce((p,m)=>qt(qt(p,m,d),m+1,h),i)}else[i,a]=aC(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ic(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>qt(d,h,vs(h,l,o)),mo()),groupIndices:n}}function vs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=pm(t,e,Ac),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function hC(e){return typeof e.groupIndex<"u"}function gm(e,t,n){if(hC(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=ym(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function ym(e,t){if(!Gi(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Gi(e){return!Be(e.groupOffsetTree)}function pC(e){return Er(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const mC={offsetHeight:"height",offsetWidth:"width"},yn=Ae(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=kt(r,0),s=Ce(),i=Ce(),a=K(0),l=K([]),c=K(void 0),u=K(void 0),f=K((x,E)=>nn(x,mC[E])),d=K(void 0),h=K(0),p=lC(),m=kt(U(n,we(l,e,h),mn(dC,p),Ye()),p),y=kt(U(l,Ye(),mn((x,E)=>({prev:x.current,current:E}),{prev:[],current:[]}),oe(({prev:x})=>x)),[]);ce(U(l,pe(x=>x.length>0),we(m,h),oe(([x,E,C])=>{const O=x.reduce((I,N,L)=>qt(I,N,vs(N,E.offsetTree,C)||L),mo());return{...E,groupIndices:x,groupOffsetTree:O}})),m),ce(U(r,we(m),pe(([x,{lastIndex:E}])=>x<E),oe(([x,{lastIndex:E,lastSize:C}])=>[{startIndex:x,endIndex:E,size:C}])),n),ce(c,u);const v=kt(U(c,oe(x=>x===void 0)),!0);ce(U(u,pe(x=>x!==void 0&&Be(Ot(m).sizeTree)),oe(x=>[{startIndex:0,endIndex:0,size:x}])),n);const w=Gt(U(n,we(m),mn(({sizes:x},[E,C])=>({changed:C!==x,sizes:C}),{changed:!1,sizes:p}),oe(x=>x.changed)));Le(U(a,mn((x,E)=>({diff:x.prev-E,prev:E}),{diff:0,prev:0}),oe(x=>x.diff)),x=>{const{groupIndices:E}=Ot(m);if(x>0)be(t,!0),be(s,x+mm(x,E));else if(x<0){const C=Ot(y);C.length>0&&(x-=mm(-x,C)),be(i,x)}}),Le(U(a,we(e)),([x,E])=>{x<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},Yt.ERROR)});const g=Gt(s);ce(U(s,we(m),oe(([x,E])=>{const C=E.groupIndices.length>0,O=[],I=E.lastSize;if(C){const N=ys(E.sizeTree,0);let L=0,_=0;for(;L<x;){const k=E.groupIndices[_],F=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-k-1;O.push({startIndex:k,endIndex:k,size:N}),O.push({startIndex:k+1,endIndex:k+1+F-1,size:I}),_++,L+=F+1}const j=Er(E.sizeTree);return L!==x&&j.shift(),j.reduce((k,{k:F,v:$})=>{let z=k.ranges;return k.prevSize!==0&&(z=[...k.ranges,{startIndex:k.prevIndex,endIndex:F+x-1,size:k.prevSize}]),{ranges:z,prevIndex:F+x,prevSize:$}},{ranges:O,prevIndex:x,prevSize:0}).ranges}return Er(E.sizeTree).reduce((N,{k:L,v:_})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:L+x-1,size:N.prevSize}],prevIndex:L+x,prevSize:_}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Gt(U(i,we(m,h),oe(([x,{offsetTree:E},C])=>{const O=-x;return vs(O,E,C)})));return ce(U(i,we(m,h),oe(([x,E,C])=>{if(E.groupIndices.length>0){if(Be(E.sizeTree))return E;let I=mo();const N=Ot(y);let L=0,_=0,j=0;for(;L<-x;){j=N[_];const k=N[_+1]-j-1;_++,L+=k+1}if(I=Er(E.sizeTree).reduce((k,{k:F,v:$})=>qt(k,Math.max(0,F+x),$),I),L!==-x){const k=ys(E.sizeTree,j);I=qt(I,0,k);const F=rn(E.sizeTree,-x+1)[1];I=qt(I,1,F)}return{...E,sizeTree:I,...Ic(E.offsetTree,0,I,C)}}else{const I=Er(E.sizeTree).reduce((N,{k:L,v:_})=>qt(N,Math.max(0,L+x),_),mo());return{...E,sizeTree:I,...Ic(E.offsetTree,0,I,C)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},Ge(tr,_c),{singleton:!0}),gC=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vm(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!gC)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const bs=Ae(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Ce(),p=Ce(),m=K(0);let y=null,v=null,w=null;function g(){y&&(y(),y=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ce(U(h,we(e,s,t,m,l,c,d),we(r,u,f),oe(([[T,x,E,C,O,I,N,L],_,j,D])=>{const k=vm(T),{align:F,behavior:$,offset:z}=k,q=C-1,P=gm(k,x,q);let V=vs(P,x.offsetTree,_)+I;F==="end"?(V+=j+rn(x.sizeTree,P)[1]-E+D,P===q&&(V+=N)):F==="center"?V+=(j+rn(x.sizeTree,P)[1]-E+D)/2:V-=O,z&&(V+=z);const Q=ie=>{g(),ie?(L("retrying to scroll to",{location:T},Yt.DEBUG),be(h,T)):(be(p,!0),L("list did not change, scroll successful",{},Yt.DEBUG))};if(g(),$==="smooth"){let ie=!1;w=Le(n,ee=>{ie=ie||ee}),y=hn(a,()=>{Q(ie)})}else y=hn(U(n,yC(150)),Q);return v=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:P,top:V,behavior:$},Yt.DEBUG),{top:V,behavior:$}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ge(yn,Mt,tr),{singleton:!0});function yC(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ws="up",xs="down",vC="none",bC={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},wC=0,Ss=Ae(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=K(!1),a=K(!0),l=Ce(),c=Ce(),u=K(4),f=K(wC),d=kt(U(om(U(ge(t),po(1),pn(!0)),U(ge(t),po(1),pn(!1),rm(100))),Ye()),!1),h=kt(U(om(U(s,pn(!0)),U(s,pn(!1),rm(200))),Ye()),!1);ce(U(yt(ge(t),ge(f)),oe(([w,g])=>w<=g),Ye()),a),ce(U(a,er(50)),c);const p=Gt(U(yt(e,ge(n),ge(r),ge(o),ge(u)),mn((w,[{scrollTop:g,scrollHeight:T},x,E,C,O])=>{const I=g+x-T>-O,N={viewportHeight:x,scrollTop:g,scrollHeight:T};if(I){let _,j;return g>w.state.scrollTop?(_="SCROLLED_DOWN",j=w.state.scrollTop-g):(_="SIZE_DECREASED",j=w.state.scrollTop-g||w.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:_,scrollTopDelta:j}}let L;return N.scrollHeight>w.state.scrollHeight?L="SIZE_INCREASED":x<w.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<w.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:N}},bC),Ye((w,g)=>w&&w.atBottom===g.atBottom))),m=kt(U(e,mn((w,{scrollTop:g,scrollHeight:T,viewportHeight:x})=>{if(im(w.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+x)<1;return w.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:w.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),oe(w=>w.jump)),0);ce(U(p,oe(w=>w.atBottom)),i),ce(U(i,er(50)),l);const y=K(xs);ce(U(e,oe(({scrollTop:w})=>w),Ye(),mn((w,g)=>Ot(h)?{direction:w.direction,prevScrollTop:g}:{direction:g<w.prevScrollTop?ws:xs,prevScrollTop:g},{direction:xs,prevScrollTop:0}),oe(w=>w.direction)),y),ce(U(e,er(50),pn(vC)),y);const v=K(0);return ce(U(d,pe(w=>!w),pn(0)),v),ce(U(t,er(100),we(d),pe(([w,g])=>!!g),mn(([w,g],[T])=>[g,T],[0,0]),oe(([w,g])=>g-w)),v),{isScrolling:d,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},Ge(Mt)),nr=Ae(([{log:e}])=>{const t=K(!1),n=Gt(U(t,pe(r=>r),Ye()));return Le(t,r=>{r&&Ot(e)("props updated",{},Yt.DEBUG)}),{propsReady:t,didMount:n}},Ge(tr),{singleton:!0});function Dc(e,t){e==0?t():requestAnimationFrame(()=>Dc(e-1,t))}function Mc(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ts=Ae(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=K(!0),l=K(0),c=K(!0);return ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),a),ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),c),Le(U(yt(t,i),we(a,e,n,c),pe(([[,u],f,{sizeTree:d},h,p])=>u&&(!Be(d)||xc(h))&&!f&&!p),we(l)),([,u])=>{hn(s,()=>{be(c,!0)}),Dc(4,()=>{hn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ge(yn,Mt,bs,nr),{singleton:!0});function bm(e){return e?e==="smooth"?"smooth":"auto":!1}const xC=(e,t)=>typeof e=="function"?bm(e(t)):t&&bm(e),SC=Ae(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=K(!1),f=Ce();let d=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}Le(U(yt(U(ge(e),po(1)),a),we(ge(u),n,s,c),oe(([[m,y],v,w,g,T])=>{let x=y&&g,E="auto";return x&&(E=xC(v,w||T),x=x&&!!E),{totalCount:m,shouldFollow:x,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=hn(t,()=>{Ot(l)("following output to ",{totalCount:m},Yt.DEBUG),h(y),d=null})});function p(m){const y=hn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(Ot(l)("scrolling to bottom due to increased size",{},Yt.DEBUG),h("auto"))});setTimeout(y,100)}return Le(U(yt(ge(u),e,i),pe(([m,,y])=>m&&y),mn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Ot(s)&&p(m!==!1)}),Le(f,()=>{p(Ot(u)!==!1)}),Le(yt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},Ge(yn,Ss,bs,Ts,nr,tr,Mt));function TC(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const wm=Ae(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Gt(U(s,oe(TC)));return ce(U(a,oe(l=>l.totalCount)),e),ce(U(a,oe(l=>l.groupIndices)),t),ce(U(yt(r,n,o),pe(([l,c])=>Gi(c)),oe(([l,c,u])=>rn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ye(),oe(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ge(yn,Mt));function Es(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function xm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Yi="top",qi="bottom",Sm="none";function Tm(e,t,n){return typeof e=="number"?n===ws&&t===Yi||n===xs&&t===qi?e:0:n===ws?t===Yi?e.main:e.reverse:t===qi?e.main:e.reverse}function Em(e,t){return typeof e=="number"?e:e[t]||0}const Nc=Ae(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=K(0),a=K(0),l=K(0),c=kt(U(yt(ge(e),ge(t),ge(r),ge(s,Es),ge(l),ge(i),ge(o),ge(n),ge(a)),oe(([u,f,d,[h,p],m,y,v,w,g])=>{const T=u-w,x=y+v,E=Math.max(d-T,0);let C=Sm;const O=Em(g,Yi),I=Em(g,qi);return h-=w,h+=d+v,p+=d+v,p-=w,h>u+x-O&&(C=ws),p<u-E+f+I&&(C=xs),C!==Sm?[Math.max(T-d-Tm(m,Yi,C)-O,0),T-E-v+f+Tm(m,qi,C)+I]:null}),pe(u=>u!=null),Ye(Es)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ge(Mt),{singleton:!0});function EC(e,t,n){if(Gi(t)){const r=ym(e,t);return[{index:rn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Fc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Cm(e,t,n){if(e.length===0)return[];if(!Gi(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Hi(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Ki(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,d=a+f*i+(f-1)*r,h=c,p=d-u;return{items:Cm(e,o,s),topItems:Cm(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Pm(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Mc(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return Ki(c,[],a,o,n,r)}const Cr=Ae(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=K([]),y=K(0),v=Ce();ce(s.topItemsIndexes,m);const w=kt(U(yt(h,p,ge(i,Es),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,C,,O,,,,,,,I])=>{const N=I&&I.length!==O;return E&&!C&&!N}),oe(([,,[E,C],O,I,N,L,_,j,D,k])=>{const F=I,{sizeTree:$,offsetTree:z}=F,q=Ot(y);if(O===0)return{...Fc,totalCount:O};if(E===0&&C===0)return q===0?{...Fc,totalCount:O}:Pm(q,N,I,j,D,k||[]);if(Be($))return q>0?null:Ki(EC(Mc(N,O),F,k),[],O,D,F,j);const P=[];if(_.length>0){const H=_[0],A=_[_.length-1];let R=0;for(const W of Hi($,H,A)){const Y=W.value,Z=Math.max(W.start,H),de=Math.min(W.end,A);for(let B=Z;B<=de;B++)P.push({index:B,size:Y,offset:R,data:k&&k[B]}),R+=Y}}if(!L)return Ki([],P,O,D,F,j);const V=_.length>0?_[_.length-1]+1:0,Q=fC(z,E,C,V);if(Q.length===0)return null;const ie=O-1,ee=Bi([],H=>{for(const A of Q){const R=A.value;let W=R.offset,Y=A.start;const Z=R.size;if(R.offset<E){Y+=Math.floor((E-R.offset+D)/(Z+D));const B=Y-A.start;W+=B*Z+B*D}Y<V&&(W+=(V-Y)*Z,Y=V);const de=Math.min(A.end,ie);for(let B=Y;B<=de&&!(W>=C);B++)H.push({index:B,size:Z,offset:W,data:k&&k[B]}),W+=Z+D}});return Ki(ee,P,O,D,F,j)}),pe(E=>E!==null),Ye()),Fc);ce(U(n,pe(xc),oe(E=>E==null?void 0:E.length)),t),ce(U(w,oe(E=>E.topListHeight)),f),ce(f,l),ce(U(w,oe(E=>[E.top,E.bottom])),a),ce(U(w,oe(E=>E.items)),v);const g=Gt(U(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},C])=>E[E.length-1].originalIndex===C-1),oe(([,E,C])=>[E-1,C]),Ye(Es),oe(([E])=>E))),T=Gt(U(w,er(200),pe(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),oe(({items:E})=>E[0].index),Ye())),x=Gt(U(w,pe(({items:E})=>E.length>0),oe(({items:E})=>{let C=0,O=E.length-1;for(;E[C].type==="group"&&C<O;)C++;for(;E[O].type==="group"&&O>C;)O--;return{startIndex:E[C].index,endIndex:E[O].index}}),Ye(xm)));return{listState:w,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:x,itemsRendered:v,initialItemCount:y,...d}},Ge(yn,wm,Nc,Ts,bs,Ss,nr,_c),{singleton:!0}),CC=Ae(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ce(U(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),oe(([[,l],c,u,f,d,h=[]])=>Pm(l,c,u,f,d,h))),i),{}),Ge(yn,Ts,Cr,nr),{singleton:!0}),Om=Ae(([{scrollVelocity:e}])=>{const t=K(!1),n=Ce(),r=K(!1);return ce(U(e,we(r,t,n),pe(([o,s])=>!!s),oe(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Ye()),t),Le(U(yt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ge(Ss),{singleton:!0}),PC=Ae(([{topItemsIndexes:e}])=>{const t=K(0);return ce(U(t,pe(n=>n>0),oe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ge(Cr)),km=Ae(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=kt(U(yt(e,r,t,n,o),oe(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ce(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ge(Mt,Cr),{singleton:!0});function _m(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const OC=_m(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kC=Ae(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Gt(U(l,we(a),mn(([,v,w,g],[{items:T,totalCount:x,bottom:E,offsetBottom:C},O])=>{const I=E+C;let N=0;return w===x&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(N=I-g,N!==0&&(N+=O))),[N,T,x,I]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,w,g,,,T])=>!T&&!g&&v!==0&&w===ws),oe(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},Yt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return Le(U(m,we(n,o)),([v,w,g])=>{g&&OC()?be(n,w-v):y(-v)}),Le(U(yt(kt(o,!1),n,p),pe(([v,w,g])=>!v&&!g&&w!==0),oe(([v,w])=>w),er(1)),y),ce(U(u,oe(v=>({top:-v}))),e),Le(U(c,we(f,d),oe(([v,{lastSize:w,groupIndices:g,sizeTree:T},x])=>{function E(C){return C*(w+x)}if(g.length===0)return E(v);{let C=0;const O=ys(T,0);let I=0,N=0;for(;I<v;){I++,C+=O;let L=g.length===N+1?1/0:g[N+1]-g[N]-1;I+L>v&&(C-=O,L=v-I+1),I+=L,C+=E(L),N++}return C}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ge(Mt,Ss,Cr,yn,tr,_c)),_C=Ae(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=K(0);return Le(U(e,we(r),pe(([,o])=>o!==0),oe(([,o])=>({top:o}))),o=>{hn(U(n,po(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ge(nr,Mt,Cr),{singleton:!0}),AC=Ae(([{viewportHeight:e},{totalListHeight:t}])=>{const n=K(!1),r=kt(U(yt(n,e,t),pe(([o])=>o),oe(([,o,s])=>Math.max(0,o-s)),er(0),Ye()),0);return{alignToBottom:n,paddingTopAddition:r}},Ge(Mt,km),{singleton:!0}),Lc=Ae(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=K(!1),i=K(void 0);return ce(U(yt(n,r),oe(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ce(U(e,we(r),oe(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ge(Mt)),IC=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,DC=Ae(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ce(U(u,we(e,o,t,s,i,a,r),we(n),oe(([[f,d,h,p,m,y,v,w],g])=>{const{done:T,behavior:x,align:E,calculateViewLocation:C=IC,...O}=f,I=gm(f,d,p-1),N=vs(I,d.offsetTree,g)+m+y,L=N+rn(d.sizeTree,I)[1],_=w+y,j=w+h-v,D=C({itemTop:N,itemBottom:L,viewportTop:_,viewportBottom:j,locationParams:{behavior:x,align:E,...O}});return D?T&&hn(U(l,pe(k=>k===!1),po(Ot(l)?1:2)),T):T&&T(),D}),pe(f=>f!==null)),c),{scrollIntoView:u}},Ge(yn,Mt,bs,Cr,tr),{singleton:!0}),MC=Ae(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=K(void 0),f=K(null),d=K(null);return ce(a,f),ce(l,d),Le(U(c,we(e,n,i,f,d,r)),([h,p,m,y,v,w,g])=>{const T=pC(p.sizeTree);y&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ce(U(u,pe(xc),oe(NC)),o),ce(U(s,we(u),pe(([,h])=>h!==void 0),Ye(),oe(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ge(yn,Mt,Ts,nr,Lc));function NC(e){return{offset:e.scrollTop,index:0,align:"start"}}const FC=Ae(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ge(Nc,CC,nr,Om,km,_C,AC,Lc,DC,tr)),Am=Ae(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:w,topItemsIndexes:g,...T},{scrollToIndex:x},E,{topItemCount:C},{groupCounts:O},I])=>(ce(T.rangeChanged,I.scrollSeekRangeChanged),ce(U(I.windowViewportRect,oe(N=>N.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:x,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:f,...y}),Ge(yn,Ts,Mt,MC,SC,Cr,bs,kC,PC,wm,FC)),Vc="-webkit-sticky",Im="sticky",Dm=_m(()=>{if(typeof document>"u")return Im;const e=document.createElement("div");return e.style.position=Vc,e.style.position===Vc?Vc:Im});function $c(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const d=t.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Ec(r),i=b.useCallback(()=>{r(s.current)},[r,s]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Zi=b.createContext(void 0),Mm=b.createContext(void 0);function Rc(e){return e}const LC=Ae(([e,t])=>({...e,...t}),Ge(Am,Ae(()=>{const e=K(l=>`Item ${l}`),t=K(null),n=K(l=>`Group ${l}`),r=K({}),o=K(Rc),s=K("div"),i=K(Tr),a=(l,c=null)=>kt(U(r,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),VC=({height:e})=>b.createElement("div",{style:{height:e}}),$C={position:Dm(),zIndex:1,overflowAnchor:"none"},RC={overflowAnchor:"none"},Nm=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Zt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Zt("windowScrollContainerState"),a=Zt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),f=Te("groupContent"),d=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=Zt("gap"),{callbackRef:y}=sm(r,h,d,t?Tr:l,p,m,s),[v,w]=b.useState(0);zc("deviation",D=>{v!==D&&w(D)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||VC,x=Te("ListComponent"),E=Te("ItemComponent"),C=Te("GroupComponent"),O=Te("computeItemKey"),I=Te("isSeeking"),N=Te("groupIndices").length>0,L=Te("alignToBottom"),_=Te("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:L?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,et(g,u)):b.createElement(x,{...et(x,u),ref:y,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const k=D.originalIndex,F=O(k+n.firstItemIndex,D.data,u);return I?b.createElement(T,{...et(T,u),key:F,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?b.createElement(C,{...et(C,u),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,style:$C},f(D.index,u)):b.createElement(E,{...et(E,u),...Fm(E,D.data),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,style:RC},N?c(D.index,D.groupIndex,D.data,u):c(D.index,D.data,u))}))}),jC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),BC={width:"100%",position:Dm(),top:0,zIndex:1};function et(e,t){if(typeof e!="string")return{context:t}}function Fm(e,t){return{item:typeof e=="string"?void 0:t}}const zC=b.memo(function(){const t=Te("HeaderComponent"),n=Zt("headerHeight"),r=Te("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),WC=b.memo(function(){const t=Te("FooterComponent"),n=Zt("footerHeight"),r=Te("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null});function jc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=am(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...jC,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...et(c,d)},i)})}function Bc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=am(l,u,c,Tr,h);return JE(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),b.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...et(c,p)},i)})}const HC=({children:e})=>{const t=b.useContext(Zi),n=Zt("viewportHeight"),r=Zt("fixedItemHeight"),o=Te("alignToBottom"),s=gn(b.useMemo(()=>ms(n,i=>nn(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:go(o),ref:s,"data-viewport-type":"element"},e)},UC=({children:e})=>{const t=b.useContext(Zi),n=Zt("windowViewportRect"),r=Zt("fixedItemHeight"),o=Te("customScrollParent"),s=$c(n,o),i=Te("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:go(i),"data-viewport-type":"window"},e)},GC=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...BC,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...et(t,o)},e)},YC=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?ZC:KC,i=o||n?UC:HC;return b.createElement(s,{...t},r&&b.createElement(GC,null,b.createElement(Nm,{showTopList:!0})),b.createElement(i,null,b.createElement(zC,null),b.createElement(Nm,null),b.createElement(WC,null)))}),{Component:qC,usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}=Tc(LC,{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"}},YC),KC=jc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),ZC=Bc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),XC=qC,Lm={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},QC={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Vm,ceil:$m,floor:Xi,min:Wc,max:Cs}=Math;function JC(e){return{...QC,items:e}}function Rm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function eP(e,t){return e&&e.column===t.column&&e.row===t.row}function Qi(e,t){return e&&e.width===t.width&&e.height===t.height}const tP=Ae(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:g},T])=>{const x=K(0),E=K(0),C=K(Lm),O=K({height:0,width:0}),I=K({height:0,width:0}),N=Ce(),L=Ce(),_=K(0),j=K(null),D=K({row:0,column:0}),k=Ce(),F=Ce(),$=K(!1),z=K(0),q=K(!0),P=K(!1);Le(U(p,we(z),pe(([A,R])=>!!R)),()=>{be(q,!1),be(E,0)}),Le(U(yt(p,q,I,O,z,P),pe(([A,R,W,Y,,Z])=>A&&!R&&W.height!==0&&Y.height!==0&&!Z)),([,,,,A])=>{be(P,!0),Dc(1,()=>{be(N,A)}),hn(U(r),()=>{be(n,[0,0]),be(q,!0)})}),ce(U(F,pe(A=>A!=null&&A.scrollTop>0),pn(0)),E),Le(U(p,we(F),pe(([,A])=>A!=null)),([,A])=>{A&&(be(O,A.viewport),be(I,A==null?void 0:A.item),be(D,A.gap),A.scrollTop>0&&(be($,!0),hn(U(r,po(1)),R=>{be($,!1)}),be(i,{top:A.scrollTop})))}),ce(U(O,oe(({height:A})=>A)),o),ce(U(yt(ge(O,Qi),ge(I,Qi),ge(D,(A,R)=>A&&A.column===R.column&&A.row===R.row),ge(r)),oe(([A,R,W,Y])=>({viewport:A,item:R,gap:W,scrollTop:Y}))),k),ce(U(yt(ge(x),t,ge(D,eP),ge(I,Qi),ge(O,Qi),ge(j),ge(E),ge($),ge(q),ge(z)),pe(([,,,,,,,A])=>!A),oe(([A,[R,W],Y,Z,de,B,Me,,rt,He])=>{const{row:ot,column:ue}=Y,{height:Ee,width:le}=Z,{width:Oe}=de;if(Me===0&&(A===0||Oe===0))return Lm;if(le===0){const Lt=Mc(He,A),jr=Lt===0?Math.max(Me-1,0):Lt;return JC(Rm(Lt,jr,B))}const ut=Bm(Oe,le,ue);let ke,ft;rt?R===0&&W===0&&Me>0?(ke=0,ft=Me-1):(ke=ut*Xi((R+ot)/(Ee+ot)),ft=ut*$m((W+ot)/(Ee+ot))-1,ft=Wc(A-1,Cs(ft,ut-1)),ke=Wc(ft,Cs(0,ke))):(ke=0,ft=-1);const X=Rm(ke,ft,B),{top:se,bottom:_e}=jm(de,Y,Z,X),Ke=$m(A/ut),At=Ke*Ee+(Ke-1)*ot-_e;return{items:X,offsetTop:se,offsetBottom:At,top:se,bottom:_e,itemHeight:Ee,itemWidth:le}})),C),ce(U(j,pe(A=>A!==null),oe(A=>A.length)),x),ce(U(yt(O,I,C,D),pe(([A,R,{items:W}])=>W.length>0&&R.height!==0&&A.height!==0),oe(([A,R,{items:W},Y])=>{const{top:Z,bottom:de}=jm(A,Y,R,W);return[Z,de]}),Ye(Es)),n);const V=K(!1);ce(U(r,we(V),oe(([A,R])=>R||A!==0)),V);const Q=Gt(U(ge(C),pe(({items:A})=>A.length>0),we(x,V),pe(([{items:A},R,W])=>W&&A[A.length-1].index===R-1),oe(([,A])=>A-1),Ye())),ie=Gt(U(ge(C),pe(({items:A})=>A.length>0&&A[0].index===0),pn(0),Ye())),ee=Gt(U(ge(C),we($),pe(([{items:A},R])=>A.length>0&&!R),oe(([{items:A}])=>({startIndex:A[0].index,endIndex:A[A.length-1].index})),Ye(xm),er(0)));ce(ee,d.scrollSeekRangeChanged),ce(U(N,we(O,I,x,D),oe(([A,R,W,Y,Z])=>{const de=vm(A),{align:B,behavior:Me,offset:rt}=de;let He=de.index;He==="LAST"&&(He=Y-1),He=Cs(0,He,Wc(Y-1,He));let ot=Hc(R,Z,W,He);return B==="end"?ot=Vm(ot-R.height+W.height):B==="center"&&(ot=Vm(ot-R.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Me}})),i);const H=kt(U(C,oe(A=>A.offsetBottom+A.bottom)),0);return ce(U(m,oe(A=>({width:A.visibleWidth,height:A.visibleHeight}))),O),{data:j,totalCount:x,viewportDimensions:O,itemDimensions:I,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:D,restoreStateFrom:F,...d,initialTopMostItemIndex:z,gridState:C,totalListHeight:H,...f,startReached:ie,endReached:Q,rangeChanged:ee,stateChanged:k,propsReady:h,stateRestoreInProgress:$,...T}},Ge(Nc,Mt,Ss,Om,nr,Lc,tr));function jm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Hc(e,t,n,r[0].index),i=Hc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Hc(e,t,n,r){const o=Bm(e.width,n.width,t.column),s=Xi(r/o),i=s*n.height+Cs(0,s-1)*t.row;return i>0?i+t.row:i}function Bm(e,t,n){return Cs(1,Xi((e+n)/(Xi(t)+n)))}const nP=Ae(([e,t])=>({...e,...t}),Ge(tP,Ae(()=>{const e=K(c=>`Item ${c}`),t=K({}),n=K(null),r=K("virtuoso-grid-item"),o=K("virtuoso-grid-list"),s=K(Rc),i=K("div"),a=K(Tr),l=(c,u=null)=>kt(U(t,oe(f=>f[c]),Ye()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),rP=b.memo(function(){const t=Qe("gridState"),n=Qe("listClassName"),r=Qe("itemClassName"),o=Qe("itemContent"),s=Qe("computeItemKey"),i=Qe("isSeeking"),a=on("scrollHeight"),l=Qe("ItemComponent"),c=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),f=Qe("context"),d=on("itemDimensions"),h=on("gap"),p=Qe("log"),m=Qe("stateRestoreInProgress"),y=gn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const g=v.firstChild;if(g){const{width:T,height:x}=g.getBoundingClientRect();d({width:T,height:x})}h({row:Wm("row-gap",getComputedStyle(v).rowGap,p),column:Wm("column-gap",getComputedStyle(v).columnGap,p)})},[a,d,h,p]));return m?null:b.createElement(c,{ref:y,className:n,...et(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=s(v.index,v.data,f);return i?b.createElement(u,{key:w,...et(u,f),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...et(l,f),className:r,"data-index":v.index,key:w},o(v.index,v.data,f))}))}),oP=b.memo(function(){const t=Qe("HeaderComponent"),n=on("headerHeight"),r=Qe("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),sP=b.memo(function(){const t=Qe("FooterComponent"),n=on("footerHeight"),r=Qe("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),iP=({children:e})=>{const t=b.useContext(Mm),n=on("itemDimensions"),r=on("viewportDimensions"),o=gn(b.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:go(!1),ref:o},e)},aP=({children:e})=>{const t=b.useContext(Mm),n=on("windowViewportRect"),r=on("itemDimensions"),o=Qe("customScrollParent"),s=$c(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:s,style:go(!1)},e)},lP=b.memo(function({...t}){const n=Qe("useWindowScroll"),r=Qe("customScrollParent"),o=r||n?uP:cP,s=r||n?aP:iP;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(oP,null),b.createElement(rP,null),b.createElement(sP,null)))}),{Component:yL,usePublisher:on,useEmitterValue:Qe,useEmitter:zm}=Tc(nP,{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"}},lP),cP=jc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm}),uP=Bc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm});function Wm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}const fP=Ae(([e,t])=>({...e,...t}),Ge(Am,Ae(()=>{const e=K(l=>b.createElement("td",null,"Item $",l)),t=K(null),n=K(null),r=K(null),o=K({}),s=K(Rc),i=K(Tr),a=(l,c=null)=>kt(U(o,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),dP=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),hP=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),pP={overflowAnchor:"none"},mP=b.memo(function(){const t=Ve("listState"),n=sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),s=sn("windowScrollContainerState"),i=sn("scrollContainerState"),a=o||r?s:i,l=Ve("itemContent"),c=Ve("trackItemSizes"),u=Ve("itemSize"),f=Ve("log"),{callbackRef:d,ref:h}=sm(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);Uc("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=Ve("EmptyPlaceholder"),v=Ve("ScrollSeekPlaceholder")||dP,w=Ve("FillerRow")||hP,g=Ve("TableBodyComponent"),T=Ve("TableRowComponent"),x=Ve("computeItemKey"),E=Ve("isSeeking"),C=Ve("paddingTopAddition"),O=Ve("firstItemIndex"),I=Ve("statefulTotalCount"),N=Ve("context");if(I===0&&y)return b.createElement(y,et(y,N));const L=t.offsetTop+C+p,_=t.offsetBottom,j=L>0?b.createElement(w,{height:L,key:"padding-top",context:N}):null,D=_>0?b.createElement(w,{height:_,key:"padding-bottom",context:N}):null,k=t.items.map(F=>{const $=F.originalIndex,z=x($+O,F.data,N);return E?b.createElement(v,{...et(v,N),key:z,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(T,{...et(T,N),...Fm(T,F.data),key:z,"data-index":$,"data-known-size":F.size,"data-item-index":F.index,style:pP},l(F.index,F.data,N))});return b.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...et(g,N)},[j,...k,D])}),gP=({children:e})=>{const t=b.useContext(Zi),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=gn(b.useMemo(()=>ms(n,s=>nn(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:go(!1),ref:o,"data-viewport-type":"element"},e)},yP=({children:e})=>{const t=b.useContext(Zi),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ve("customScrollParent"),s=$c(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:go(!1),"data-viewport-type":"window"},e)},vP=b.memo(function(t){const n=Ve("useWindowScroll"),r=Ve("customScrollParent"),o=sn("fixedHeaderHeight"),s=sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),l=Ve("context"),c=gn(b.useMemo(()=>ms(o,w=>nn(w,"height")),[o])),u=gn(b.useMemo(()=>ms(s,w=>nn(w,"height")),[s])),f=r||n?xP:wP,d=r||n?yP:gP,h=Ve("TableComponent"),p=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),y=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...et(p,l)},i()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...et(m,l)},a()):null;return b.createElement(f,{...t},b.createElement(d,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...et(h,l)},[y,b.createElement(mP,{key:"TableBody"}),v])))}),{Component:bP,usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}=Tc(fP,{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"}},vP),wP=jc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}),xP=Bc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}),SP=bP,TP=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(console.log(o),!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},Hm=({children:e,className:t="",size:n,...r})=>S.jsxs("label",{className:"font-normal flex items-center gap-2",children:[S.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",t),...r}),e]}),EP={Item:b.forwardRef(function(t,n){return S.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return S.jsx("ul",{...t,ref:n,className:"space-y-3"})})},CP=e=>{const t=b.useRef(null),n=TP(t);return S.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[S.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:[S.jsx("header",{className:"border-b border-card-border pb-2"}),S.jsxs("div",{className:"px-8 space-y-2",children:[S.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),S.jsx(XC,{height:n,useWindowScroll:!0,data:e.source,components:EP,itemContent:(r,o)=>S.jsx(b.Fragment,{children:S.jsx(Hm,{children:S.jsx(e.Item,{data:o})})})})]})]}),S.jsx("div",{children:S.jsx(ps,{children:S.jsx(qd,{})})}),S.jsx("div",{})]})};function ze(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function yo(e,t){const n=ze(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ji(e,t){const n=ze(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Um=6048e5,PP=864e5,OP=6e4,kP=36e5,_P=1e3;let AP={};function Pr(){return AP}function vn(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function vo(e){return vn(e,{weekStartsOn:1})}function Gm(e){const t=ze(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=vo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=vo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function bo(e){const t=ze(e);return t.setHours(0,0,0,0),t}function ea(e){const t=ze(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function IP(e,t){const n=bo(e),r=bo(t),o=+n-ea(n),s=+r-ea(r);return Math.round((o-s)/PP)}function DP(e){const t=Gm(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vo(n)}function Ym(e,t){const n=t*7;return yo(e,n)}function qm(e,t){return Ji(e,t*12)}function MP(e){return qe(e,Date.now())}function NP(e,t){const n=bo(e),r=bo(t);return+n==+r}function FP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function LP(e){if(!FP(e)&&typeof e!="number")return!1;const t=ze(e);return!isNaN(Number(t))}function Km(e,t){const n=ze(e.start),r=ze(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(ze(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Zm(e){const t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function VP(e){const t=ze(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $P(e,t){var a,l;const n=Pr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const RP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jP=(e,t,n)=>{let r;const o=RP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Gc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const BP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HP={date:Gc({formats:BP,defaultWidth:"full"}),time:Gc({formats:zP,defaultWidth:"full"}),dateTime:Gc({formats:WP,defaultWidth:"full"})},UP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GP=(e,t,n,r)=>UP[e];function Ps(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const YP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ZP={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},XP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},QP={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},JP={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ps({values:YP,defaultWidth:"wide"}),quarter:Ps({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ps({values:KP,defaultWidth:"wide"}),day:Ps({values:ZP,defaultWidth:"wide"}),dayPeriod:Ps({values:XP,defaultWidth:"wide",formattingValues:QP,defaultFormattingWidth:"wide"})};function Os(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?tO(a,f=>f.test(i)):eO(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function eO(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nO(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const rO=/^(\d+)(th|st|nd|rd)?/i,oO=/\d+/i,sO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iO={any:[/^b/i,/^(a|c)/i]},aO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lO={any:[/1/i,/2/i,/3/i,/4/i]},cO={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uO={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fO={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},dO={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},hO={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},pO={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mO={ordinalNumber:nO({matchPattern:rO,parsePattern:oO,valueCallback:e=>parseInt(e,10)}),era:Os({matchPatterns:sO,defaultMatchWidth:"wide",parsePatterns:iO,defaultParseWidth:"any"}),quarter:Os({matchPatterns:aO,defaultMatchWidth:"wide",parsePatterns:lO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Os({matchPatterns:cO,defaultMatchWidth:"wide",parsePatterns:uO,defaultParseWidth:"any"}),day:Os({matchPatterns:fO,defaultMatchWidth:"wide",parsePatterns:dO,defaultParseWidth:"any"}),dayPeriod:Os({matchPatterns:hO,defaultMatchWidth:"any",parsePatterns:pO,defaultParseWidth:"any"})},Xm={code:"en-US",formatDistance:jP,formatLong:HP,formatRelative:GP,localize:JP,match:mO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gO(e){const t=ze(e);return IP(t,VP(t))+1}function Qm(e){const t=ze(e),n=+vo(t)-+DP(t);return Math.round(n/Um)+1}function Yc(e,t){var u,f,d,h;const n=ze(e),r=n.getFullYear(),o=Pr(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(d=o.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=vn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=vn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function yO(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Yc(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),vn(s,t)}function Jm(e,t){const n=ze(e),r=+vn(n,t)-+yO(n,t);return Math.round(r/Um)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},wo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=Yc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return $e(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):$e(s,t.length)},R:function(e,t){const n=Gm(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return $e(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return $e(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return $e(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Jm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=Qm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=gO(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return $e(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return $e(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return $e(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=wo.noon:r===0?o=wo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=wo.evening:r>=12?o=wo.afternoon:r>=4?o=wo.morning:o=wo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ng(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ng(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tg(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function tg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+$e(s,2)}function ng(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),s=$e(r%60,2);return n+o+t+s}const rg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},og=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},qc={p:og,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rg(r,t)).replace("{{time}}",og(o,t))}},vO=/^D+$/,bO=/^Y+$/,wO=["D","DD","YY","YYYY"];function sg(e){return vO.test(e)}function ig(e){return bO.test(e)}function Kc(e,t,n){const r=xO(e,t,n);if(console.warn(r),wO.includes(e))throw new RangeError(r)}function xO(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const SO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EO=/^'([^]*?)'?$/,CO=/''/g,PO=/[a-zA-Z]/;function OO(e,t,n){var u,f,d,h;const r=Pr(),o=r.locale??Xm,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=ze(e);if(!LP(a))throw new RangeError("Invalid time value");let l=t.match(TO).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=qc[m];return y(p,o.formatLong)}return p}).join("").match(SO).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:kO(p)};if(eg[m])return{isToken:!0,value:p};if(m.match(PO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(ig(m)||sg(m))&&Kc(m,t,String(e));const y=eg[m[0]];return y(a,m,o.localize,c)}).join("")}function kO(e){const t=e.match(EO);return t?t[1].replace(CO,"'"):e}function _O(){return Object.assign({},Pr())}function AO(e){let n=ze(e).getDay();return n===0&&(n=7),n}function IO(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const DO=10;class ag{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class MO extends ag{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class NO extends ag{constructor(){super(...arguments);ne(this,"priority",DO);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,IO(n,Date))}}class Ie{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new MO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class FO extends Ie{constructor(){super(...arguments);ne(this,"priority",140);ne(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const it={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},bn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function at(e,t){return e&&{value:t(e.value),rest:e.rest}}function Je(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*kP+s*OP+i*_P),rest:t.slice(n[0].length)}}function lg(e){return Je(it.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Je(it.singleDigit,t);case 2:return Je(it.twoDigits,t);case 3:return Je(it.threeDigits,t);case 4:return Je(it.fourDigits,t);default:return Je(new RegExp("^\\d{1,"+e+"}"),t)}}function ta(e,t){switch(e){case 1:return Je(it.singleDigitSigned,t);case 2:return Je(it.twoDigitsSigned,t);case 3:return Je(it.threeDigitsSigned,t);case 4:return Je(it.fourDigitsSigned,t);default:return Je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Zc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function cg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function ug(e){return e%400===0||e%4===0&&e%100!==0}class LO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return at(tt(4,n),s);case"yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=cg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class VO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return at(tt(4,n),s);case"Yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Yc(n,s);if(o.isTwoDigitYear){const l=cg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}}class $O extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ta(r==="R"?4:r.length,n)}set(n,r,o){const s=qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),vo(s)}}class RO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ta(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class jO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return tt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class BO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return tt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class zO extends Ie{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return at(Je(it.month,n),s);case"MM":return at(tt(2,n),s);case"Mo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class WO extends Ie{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return at(Je(it.month,n),s);case"LL":return at(tt(2,n),s);case"Lo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function HO(e,t,n){const r=ze(e),o=Jm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class UO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Je(it.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return vn(HO(n,o,s),s)}}function GO(e,t){const n=ze(e),r=Qm(n)-t;return n.setDate(n.getDate()-r*7),n}class YO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Je(it.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return vo(GO(n,o))}}const qO=[31,28,31,30,31,30,31,31,30,31,30,31],KO=[31,29,31,30,31,30,31,31,30,31,30,31];class ZO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Je(it.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=ug(o),i=n.getMonth();return s?r>=1&&r<=KO[i]:r>=1&&r<=qO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class XO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Je(it.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return ug(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Xc(e,t,n){var f,d,h,p;const r=Pr(),o=(n==null?void 0:n.weekStartsOn)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=ze(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return yo(s,u)}class QO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}class JO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return at(tt(r.length,n),i);case"eo":return at(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}class ek extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return at(tt(r.length,n),i);case"co":return at(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}function tk(e,t){const n=ze(e),r=AO(n),o=t-r;return yo(n,o)}class nk extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return at(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return at(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return at(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return at(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=tk(n,o),n.setHours(0,0,0,0),n}}class rk extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Zc(o),0,0,0),n}}class ok extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Zc(o),0,0,0),n}}class sk extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Zc(o),0,0,0),n}}class ik extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Je(it.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class ak extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Je(it.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class lk extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Je(it.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class ck extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Je(it.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class uk extends Ie{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Je(it.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class fk extends Ie{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Je(it.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class dk extends Ie{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return at(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class hk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return wn(bn.basicOptionalMinutes,n);case"XX":return wn(bn.basic,n);case"XXXX":return wn(bn.basicOptionalSeconds,n);case"XXXXX":return wn(bn.extendedOptionalSeconds,n);case"XXX":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class pk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return wn(bn.basicOptionalMinutes,n);case"xx":return wn(bn.basic,n);case"xxxx":return wn(bn.basicOptionalSeconds,n);case"xxxxx":return wn(bn.extendedOptionalSeconds,n);case"xxx":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class mk extends Ie{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return lg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class gk extends Ie{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return lg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const yk={G:new FO,y:new LO,Y:new VO,R:new $O,u:new RO,Q:new jO,q:new BO,M:new zO,L:new WO,w:new UO,I:new YO,d:new ZO,D:new XO,E:new QO,e:new JO,c:new ek,i:new nk,a:new rk,b:new ok,B:new sk,h:new ik,H:new ak,K:new lk,k:new ck,m:new uk,s:new fk,S:new dk,X:new hk,x:new pk,t:new mk,T:new gk},vk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wk=/^'([^]*?)'?$/,xk=/''/g,Sk=/\S/,Tk=/[a-zA-Z]/;function Ek(e,t,n,r){var m,y,v,w;const o=_O(),s=o.locale??Xm,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?ze(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new NO],u=t.match(bk).map(g=>{const T=g[0];if(T in qc){const x=qc[T];return x(g,s.formatLong)}return g}).join("").match(vk),f=[];for(let g of u){ig(g)&&Kc(g,t,e),sg(g)&&Kc(g,t,e);const T=g[0],x=yk[T];if(x){const{incompatibleTokens:E}=x;if(Array.isArray(E)){const O=f.find(I=>E.includes(I.token)||I.token===T);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${g}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:T,fullToken:g});const C=x.run(e,g,s.match,l);if(!C)return qe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(Tk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=Ck(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&Sk.test(e))return qe(n,NaN);const d=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,x)=>x.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,x)=>x.subPriority-T.subPriority)).map(g=>g[0]);let h=ze(n);if(isNaN(h.getTime()))return qe(n,NaN);const p={};for(const g of d){if(!g.validate(h,l))return qe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return qe(n,h)}function Ck(e){return e.match(wk)[1].replace(xk,"'")}function Pk(e,t){const n=ze(e),r=ze(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ok(e){return NP(e,MP(e))}function kk(e,t){return yo(e,-t)}function fg(e,t){return Ji(e,-t)}function _k(e,t){return Ym(e,-t)}function Ak(e,t){return qm(e,-t)}const xo=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),na=b.createContext({}),ra=b.createContext(null),Qc=typeof document<"u",oa=Qc?b.useLayoutEffect:b.useEffect,dg=b.createContext({strict:!1}),sa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hg="data-"+sa("framerAppearId"),Ik={skipAnimations:!1,useManualTiming:!1};function Dk(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const h=f&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const ia=["read","resolveKeyframes","update","preRender","render","postRender"],Mk=40;function pg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=ia.reduce((v,w)=>(v[w]=Dk(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,Mk),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&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ia.reduce((v,w)=>{const g=i[w];return v[w]=(T,x=!1,E=!1)=>(n||p(),g.schedule(T,x,E)),v},{}),cancel:v=>{for(let w=0;w<ia.length;w++)i[ia[w]].cancel(v)},state:o,steps:i}}const{schedule:Jc,cancel:SL}=pg(queueMicrotask,!1);function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const mg=b.createContext({});let gg=!1;function Nk(e,t,n,r,o){const{visualElement:s}=b.useContext(na),i=b.useContext(dg),a=b.useContext(ra),l=b.useContext(xo).reducedMotion,c=b.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=b.useContext(mg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Lk(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const d=b.useRef(!!(n[hg]&&!window.HandoffComplete));return oa(()=>{u&&(u.updateFeatures(),Jc.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,gg||(gg=!0,queueMicrotask(Fk))))}),u}function Fk(){window.HandoffComplete=!0}function Lk(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yg(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&So(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function yg(e){if(e)return e.options.allowProjection!==!1?e.projection:yg(e.parent)}function Vk(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}function ks(e){return typeof e=="string"||Array.isArray(e)}function _s(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const eu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tu=["initial",...eu];function aa(e){return _s(e.animate)||tu.some(t=>ks(e[t]))}function vg(e){return!!(aa(e)||e.variants)}function $k(e,t){if(aa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function Rk(e){const{initial:t,animate:n}=$k(e,b.useContext(na));return b.useMemo(()=>({initial:t,animate:n}),[bg(t),bg(n)])}function bg(e){return Array.isArray(e)?e.join(" "):e}const wg={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"]},To={};for(const e in wg)To[e]={isEnabled:t=>wg[e].some(n=>!!t[n])};function jk(e){for(const t in e)To[t]={...To[t],...e[t]}}const As=b.createContext({}),Bk=Symbol.for("motionComponentSymbol"),bt=e=>e;let Eo=bt,an=bt;process.env.NODE_ENV!=="production"&&(Eo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});function zk({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&jk(e);function s(a,l){let c;const u={...b.useContext(xo),...a,layoutId:Wk(a)},{isStatic:f}=u,d=Rk(a),h=r(a,f);if(!f&&Qc){Hk(u,e);const p=Uk(u);c=p.MeasureLayout,d.visualElement=Nk(o,h,u,t,p.ProjectionNode)}return S.jsxs(na.Provider,{value:d,children:[c&&d.visualElement?S.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,Vk(h,d.visualElement,l),h,f,d.visualElement)]})}const i=b.forwardRef(s);return i[Bk]=o,i}function Wk({layoutId:e}){const t=b.useContext(As).id;return t&&e!==void 0?t+"-"+e:e}function Hk(e,t){const n=b.useContext(dg).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Eo(!1,r):an(!1,r)}}function Uk(e){const{drag:t,layout:n}=To;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gk(e){function t(r,o={}){return zk(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const Yk=["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 nu(e){return typeof e!="string"||e.includes("-")?!1:!!(Yk.indexOf(e)>-1||/[A-Z]/u.test(e))}const la={};function qk(e){Object.assign(la,e)}const Is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(Is);function xg(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!la[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),Kk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zk=Is.length;function Xk(e,t,n){let r="";for(let o=0;o<Zk;o++){const s=Is[o];if(e[s]!==void 0){const i=Kk[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Sg=e=>t=>typeof t=="string"&&t.startsWith(e),Tg=Sg("--"),Qk=Sg("var(--"),ru=e=>Qk(e)?Jk.test(e.split("/*")[0].trim()):!1,Jk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,e_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,sr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ds={...Co,transform:e=>sr(0,1,e)},ca={...Co,default:1},Ms=e=>Math.round(e*1e5)/1e5,ou=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,t_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,n_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ns(e){return typeof e=="string"}function r_(e){return e==null}const Fs=e=>({test:t=>Ns(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=Fs("deg"),xn=Fs("%"),fe=Fs("px"),o_=Fs("vh"),s_=Fs("vw"),Eg={...xn,parse:e=>xn.parse(e)/100,transform:e=>xn.transform(e*100)},Cg={...Co,transform:Math.round},Pg={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:ca,scaleX:ca,scaleY:ca,scaleZ:ca,skew:ir,skewX:ir,skewY:ir,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Ds,originX:Eg,originY:Eg,originZ:fe,zIndex:Cg,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:Ds,strokeOpacity:Ds,numOctaves:Cg};function su(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(Tg(u)){o[u]=f;continue}const d=Pg[u],h=e_(f,d);if(or.has(u)){if(a=!0,s[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=Xk(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=i;r.transformOrigin=`${u} ${f} ${d}`}}const iu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Og(e,t,n){for(const r in t)!wt(t[r])&&!xg(r,n)&&(e[r]=t[r])}function i_({transformTemplate:e},t){return b.useMemo(()=>{const n=iu();return su(n,t,e),Object.assign({},n.vars,n.style)},[t])}function a_(e,t){const n=e.style||{},r={};return Og(r,n,e),Object.assign(r,i_(e,t)),r}function l_(e,t){const n={},r=a_(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const c_=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 ua(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c_.has(e)}let kg=e=>!ua(e);function _g(e){e&&(kg=t=>t.startsWith("on")?!ua(t):e(t))}try{_g(require("@emotion/is-prop-valid").default)}catch{}function u_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(kg(o)||n===!0&&ua(o)||!t&&!ua(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ag(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function f_(e,t,n){const r=Ag(t,e.x,e.width),o=Ag(n,e.y,e.height);return`${r} ${o}`}const d_={offset:"stroke-dashoffset",array:"stroke-dasharray"},h_={offset:"strokeDashoffset",array:"strokeDasharray"};function p_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?d_:h_;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function au(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(su(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:p}=e;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=f_(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&p_(d,i,a,l,!1)}const Ig=()=>({...iu(),attrs:{}}),lu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function m_(e,t,n,r){const o=b.useMemo(()=>{const s=Ig();return au(s,t,lu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Og(s,e.style,e),o.style={...s,...o.style}}return o}function g_(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(nu(n)?m_:l_)(r,s,i,n),c=u_(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=b.useMemo(()=>wt(f)?f.get():f,[f]);return b.createElement(n,{...u,children:d})}}function Dg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Mg=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 Ng(e,t,n,r){Dg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mg.has(o)?o:sa(o),t.attrs[o])}function cu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||xg(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Fg(e,t,n){const r=cu(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=Is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Lg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uu(e,t,n,r){if(typeof t=="function"){const[o,s]=Lg(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Lg(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function ar(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const fu=e=>Array.isArray(e),y_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),v_=e=>fu(e)?e[e.length-1]||0:e;function fa(e){const t=wt(e)?e.get():e;return y_(t)?t.toValue():t}const Vg=new Set(["opacity","clipPath","filter","transform"]);function $g(e){if(or.has(e))return"transform";if(Vg.has(e))return sa(e)}function da(e,t){e.indexOf(t)===-1&&e.push(t)}function ha(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function b_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function w_({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:S_(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Rg=e=>(t,n)=>{const r=b.useContext(na),o=b.useContext(ra),s=()=>w_(e,t,r,o,n);return n?s():ar(s)};function x_(e,t){const n=$g(t);n&&da(e,n)}function jg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=uu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function S_(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=fa(c[y]);let{initial:u,animate:f}=e;const d=aa(e),h=vg(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!_s(m)&&jg(e,m,(y,v)=>{for(const w in y){let g=y[w];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(i[w]=g)}for(const w in v)i[w]=v[w]}),l&&(f&&u!==!1&&!_s(f)&&jg(e,f,y=>{for(const v in y)x_(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:De,cancel:Sn,state:xt,steps:du}=pg(typeof requestAnimationFrame<"u"?requestAnimationFrame:bt,!0),T_={useVisualState:Rg({scrapeMotionValuesFromProps:Fg,createRenderState:Ig,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{au(n,r,lu(t.tagName),e.transformTemplate),Ng(t,n)})}})},E_={useVisualState:Rg({applyWillChange:!0,scrapeMotionValuesFromProps:cu,createRenderState:iu})};function C_(e,{forwardMotionProps:t=!1},n,r){return{...nu(e)?T_:E_,preloadedFeatures:n,useRender:g_(t),createVisualElement:r,Component:e}}function An(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pa(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const P_=e=>t=>Bg(t)&&e(t,pa(t));function In(e,t,n,r){return An(e,t,P_(n),r)}const O_=(e,t)=>n=>t(e(n)),Dn=(...e)=>e.reduce(O_);function zg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Wg=zg("dragHorizontal"),Hg=zg("dragVertical");function Ug(e){let t=!1;if(e==="y")t=Hg();else if(e==="x")t=Wg();else{const n=Wg(),r=Hg();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Gg(){const e=Ug(!0);return e?(e(),!1):!0}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Gg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class k_ extends lr{mount(){this.unmount=Dn(Yg(this.node,!0),Yg(this.node,!1))}unmount(){}}class __ extends lr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Dn(An(this.node.current,"focus",()=>this.onFocus()),An(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qg=(e,t)=>t?e===t?!0:qg(e,t.parentElement):!1;function hu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,pa(n))}class A_ extends lr{constructor(){super(...arguments),this.removeStartListeners=bt,this.removeEndListeners=bt,this.removeAccessibleListeners=bt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!qg(this.node.current,a.target)?u:c;d&&De.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Dn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||hu("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=An(this.node.current,"keyup",i),hu("down",(a,l)=>{this.startPress(a,l)})},n=An(this.node.current,"keydown",t),r=()=>{this.isPressing&&hu("cancel",(s,i)=>this.cancelPress(s,i))},o=An(this.node.current,"blur",r);this.removeAccessibleListeners=Dn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=An(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Dn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const pu=new WeakMap,mu=new WeakMap,I_=e=>{const t=pu.get(e.target);t&&t(e)},D_=e=>{e.forEach(I_)};function M_({root:e,...t}){const n=e||document;mu.has(n)||mu.set(n,{});const r=mu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(D_,{root:e,...t})),r[o]}function N_(e,t,n){const r=M_(t);return pu.set(e,n),r.observe(e),()=>{pu.delete(e),r.unobserve(e)}}const F_={some:0,all:1};class L_ extends lr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:F_[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return N_(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(V_(t,n))&&this.startObserver()}unmount(){}}function V_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $_={inView:{Feature:L_},tap:{Feature:A_},focus:{Feature:__},hover:{Feature:k_}};function Kg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ma(e,t,n){const r=e.getProps();return uu(r,t,n!==void 0?n:r.custom,e)}const Mn=e=>e*1e3,Nn=e=>e/1e3,R_={type:"spring",stiffness:500,damping:25,restSpeed:10},j_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),B_={type:"keyframes",duration:.8},z_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},W_=(e,{keyframes:t})=>t.length>2?B_:or.has(e)?e.startsWith("scale")?j_(t[1]):R_:z_;function H_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function gu(e,t){return e[t]||e.default||e}const U_=e=>e!==null;function ga(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(U_),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ya;function G_(){ya=void 0}const cr={now:()=>(ya===void 0&&cr.set(xt.isProcessing||Ik.useManualTiming?xt.timestamp:performance.now()),ya),set:e=>{ya=e,queueMicrotask(G_)}},Zg=e=>/^0[^.\s]+$/u.test(e);function Y_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zg(e):!0}const Xg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),q_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=q_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Z_=4;function Qg(e,t,n=1){an(n<=Z_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=K_(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Xg(i)?parseFloat(i):i}return ru(o)?Qg(o,t,n+1):o}const X_=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Jg=e=>e===Co||e===fe,ey=(e,t)=>parseFloat(e.split(", ")[t]),ty=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ey(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?ey(s[1],e):0}},Q_=new Set(["x","y","z"]),J_=Is.filter(e=>!Q_.has(e));function eA(e){const t=[];return J_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Po={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ty(4,13),y:ty(5,14)};Po.translateX=Po.x,Po.translateY=Po.y;const ny=e=>t=>t.test(e),ry=[Co,fe,xn,ir,s_,o_,{test:e=>e==="auto",parse:e=>e}],oy=e=>ry.find(ny(e)),kr=new Set;let yu=!1,vu=!1;function sy(){if(vu){const e=Array.from(kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vu=!1,yu=!1,kr.forEach(e=>e.complete()),kr.clear()}function iy(){kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vu=!0)})}function tA(){iy(),sy()}class bu{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(kr.add(this),yu||(yu=!0,De.read(iy),De.resolveKeyframes(sy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const wu=(e,t)=>n=>!!(Ns(n)&&n_.test(n)&&n.startsWith(e)||t&&!r_(n)&&Object.prototype.hasOwnProperty.call(n,t)),ay=(e,t,n)=>r=>{if(!Ns(r))return r;const[o,s,i,a]=r.match(ou);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},nA=e=>sr(0,255,e),xu={...Co,transform:e=>Math.round(nA(e))},_r={test:wu("rgb","red"),parse:ay("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+xu.transform(e)+", "+xu.transform(t)+", "+xu.transform(n)+", "+Ms(Ds.transform(r))+")"};function rA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Su={test:wu("#"),parse:rA,transform:_r.transform},Oo={test:wu("hsl","hue"),parse:ay("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xn.transform(Ms(t))+", "+xn.transform(Ms(n))+", "+Ms(Ds.transform(r))+")"},_t={test:e=>_r.test(e)||Su.test(e)||Oo.test(e),parse:e=>_r.test(e)?_r.parse(e):Oo.test(e)?Oo.parse(e):Su.parse(e),transform:e=>Ns(e)?e:e.hasOwnProperty("red")?_r.transform(e):Oo.transform(e)};function oA(e){var t,n;return isNaN(e)&&Ns(e)&&(((t=e.match(ou))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(t_))===null||n===void 0?void 0:n.length)||0)>0}const ly="number",cy="color",sA="var",iA="var(",uy="${}",aA=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(aA,l=>(_t.test(l)?(r.color.push(s),o.push(cy),n.push(_t.parse(l))):l.startsWith(iA)?(r.var.push(s),o.push(sA),n.push(l)):(r.number.push(s),o.push(ly),n.push(parseFloat(l))),++s,uy)).split(uy);return{values:n,split:a,indexes:r,types:o}}function fy(e){return Ls(e).values}function dy(e){const{split:t,types:n}=Ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===ly?s+=Ms(o[i]):a===cy?s+=_t.transform(o[i]):s+=o[i]}return s}}const lA=e=>typeof e=="number"?0:e;function cA(e){const t=fy(e);return dy(e)(t.map(lA))}const ur={test:oA,parse:fy,createTransformer:dy,getAnimatableNone:cA},uA=new Set(["brightness","contrast","saturate","opacity"]);function fA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ou)||[];if(!r)return e;const o=n.replace(r,"");let s=uA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const dA=/\b([a-z-]*)\(.*?\)/gu,Tu={...ur,getAnimatableNone:e=>{const t=e.match(dA);return t?t.map(fA).join(" "):e}},hA={...Pg,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Tu,WebkitFilter:Tu},Eu=e=>hA[e];function hy(e,t){let n=Eu(e);return n!==Tu&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pA=new Set(["auto","none","0"]);function mA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!pA.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=hy(n,o)}class py extends bu{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ru(c))){const u=Qg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!X_.has(r)||t.length!==2)return;const[o,s]=t,i=oy(o),a=oy(s);if(i!==a)if(Jg(i)&&Jg(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)Y_(t[o])&&r.push(o);r.length&&mA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Po[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Po[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function my(e){let t;return()=>(t===void 0&&(t=e()),t)}const gy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function gA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=gy(o,t),a=gy(s,t);return Eo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:gA(e)||n==="spring"&&r}class yy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&tA(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yA(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ga(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function vy(e,t){return t?e*(1e3/t):0}const vA=5;function by(e,t,n){const r=Math.max(t-vA,0);return vy(n-e(r),t-r)}const Cu=.001,bA=.01,wy=10,wA=.05,xA=1;function SA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Eo(e<=Mn(wy),"Spring duration must be 10 seconds or less");let i=1-t;i=sr(wA,xA,i),e=sr(bA,wy,Nn(e)),i<1?(o=c=>{const u=c*i,f=u*e,d=u-n,h=Pu(c,i),p=Math.exp(-f);return Cu-d/h*p},s=c=>{const f=c*i*e,d=f*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Pu(Math.pow(c,2),i);return(-o(c)+Cu>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Cu+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=EA(o,s,a);if(e=Mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const TA=12;function EA(e,t,n){let r=n;for(let o=1;o<TA;o++)r=r-e(r)/t(r);return r}function Pu(e,t){return e*Math.sqrt(1-t*t)}const CA=["duration","bounce"],PA=["stiffness","damping","mass"];function xy(e,t){return t.some(n=>e[n]!==void 0)}function OA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xy(e,PA)&&xy(e,CA)){const n=SA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Sy({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=OA({...r,velocity:-Nn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Nn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const g=Pu(y,p);w=T=>{const x=Math.exp(-p*y*T);return s-x*((h+p*y*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)w=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);w=T=>{const x=Math.exp(-p*y*T),E=Math.min(g*T,300);return s-x*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:d&&u||null,next:g=>{const T=w(g);if(d)i.done=g>=u;else{let x=h;g!==0&&(p<1?x=by(w,g,T):x=0);const E=Math.abs(x)<=n,C=Math.abs(s-T)<=t;i.done=E&&C}return i.value=i.done?s:T,i}}}function Ty({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*t;const y=f+m,v=i===void 0?y:i(y);v!==y&&(m=v-f);const w=O=>-m*Math.exp(-O/r),g=O=>v+w(O),T=O=>{const I=w(O),N=g(O);d.done=Math.abs(I)<=c,d.value=d.done?v:N};let x,E;const C=O=>{h(d.value)&&(x=O,E=Sy({keyframes:[d.value,p(d.value)],velocity:by(g,O,d.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:O=>{let I=!1;return!E&&x===void 0&&(I=!0,T(O),C(O)),x!==void 0&&O>=x?E.next(O-x):(!I&&T(O),d)}}}const Ey=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kA=1e-7,_A=12;function AA(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Ey(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>kA&&++a<_A);return i}function Vs(e,t,n,r){if(e===t&&n===r)return bt;const o=s=>AA(s,0,1,e,n);return s=>s===0||s===1?s:Ey(o(s),t,r)}const IA=Vs(.42,0,1,1),DA=Vs(0,0,.58,1),Cy=Vs(.42,0,.58,1),MA=e=>Array.isArray(e)&&typeof e[0]!="number",Py=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Oy=e=>t=>1-e(1-t),Ou=e=>1-Math.sin(Math.acos(e)),ky=Oy(Ou),NA=Py(Ou),_y=Vs(.33,1.53,.69,.99),ku=Oy(_y),FA=Py(ku),Ay={linear:bt,easeIn:IA,easeInOut:Cy,easeOut:DA,circIn:Ou,circInOut:NA,circOut:ky,backIn:ku,backInOut:FA,backOut:_y,anticipate:e=>(e*=2)<1?.5*ku(e):.5*(2-Math.pow(2,-10*(e-1)))},Iy=e=>{if(Array.isArray(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return an(Ay[e]!==void 0,`Invalid easing type '${e}'`),Ay[e];return e},$s=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function _u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function LA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=_u(l,a,e+1/3),s=_u(l,a,e),i=_u(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function va(e,t){return n=>n>0?t:e}const Au=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VA=[Su,_r,Oo],$A=e=>VA.find(t=>t.test(e));function Dy(e){const t=$A(e);if(Eo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Oo&&(n=LA(n)),n}const My=(e,t)=>{const n=Dy(e),r=Dy(t);if(!n||!r)return va(e,t);const o={...n};return s=>(o.red=Au(n.red,r.red,s),o.green=Au(n.green,r.green,s),o.blue=Au(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),_r.transform(o))},Iu=new Set(["none","hidden"]);function RA(e,t){return Iu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jA(e,t){return n=>Ze(e,t,n)}function Du(e){return typeof e=="number"?jA:typeof e=="string"?ru(e)?va:_t.test(e)?My:WA:Array.isArray(e)?Ny:typeof e=="object"?_t.test(e)?My:BA:va}function Ny(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Du(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function BA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Du(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function zA(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const WA=(e,t)=>{const n=ur.createTransformer(t),r=Ls(e),o=Ls(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Iu.has(e)&&!o.values.length||Iu.has(t)&&!r.values.length?RA(e,t):Dn(Ny(zA(r,o),o.values),n):(Eo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),va(e,t))};function Fy(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):Du(e)(e,t)}function HA(e,t,n){const r=[],o=n||Fy,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||bt:t;a=Dn(l,a)}r.push(a)}return r}function Ly(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(an(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=HA(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=$s(e[u],e[u+1],c);return i[u](f)};return n?c=>l(sr(e[0],e[s-1],c)):l}function UA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=$s(0,t,r);e.push(Ze(n,1,o))}}function GA(e){const t=[0];return UA(t,e.length-1),t}function YA(e,t){return e.map(n=>n*t)}function qA(e,t){return e.map(()=>t||Cy).splice(0,e.length-1)}function ba({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=MA(r)?r.map(Iy):Iy(r),s={done:!1,value:t[0]},i=YA(n&&n.length===t.length?n:GA(t),e),a=Ly(i,t,{ease:Array.isArray(o)?o:qA(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Vy=2e4;function KA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vy;)t+=n,r=e.next(t);return t>=Vy?1/0:t}const ZA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>Sn(t),now:()=>xt.isProcessing?xt.timestamp:cr.now()}},XA={decay:Ty,inertia:Ty,tween:ba,keyframes:ba,spring:Sy},QA=e=>e/100;class Mu extends yy{constructor({KeyframeResolver:t=bu,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=XA[n]||ba;let l,c;a!==ba&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&an(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Dn(QA,Fy(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=KA(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:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),w=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const O=Math.min(this.currentTime,u)/f;let I=Math.floor(O),N=O%1;!N&&O>=1&&(N=1),N===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/f)):p==="mirror"&&(T=i)),g=sr(0,1,N)*f}const x=w?{done:!1,value:l[0]}:T.next(g);a&&(x.value=a(x.value));let{done:E}=x;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(x.value=ga(l,this.options,o)),y&&y(x.value),C&&this.finish(),x}get duration(){const{resolved:t}=this;return t?Nn(t.calculatedDuration):0}get time(){return Nn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Nn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZA,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const $y=e=>Array.isArray(e)&&typeof e[0]=="number";function Ry(e){return!!(!e||typeof e=="string"&&e in Nu||$y(e)||Array.isArray(e)&&e.every(Ry))}const Rs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Nu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rs([0,.65,.55,1]),circOut:Rs([.55,0,1,.45]),backIn:Rs([.31,.01,.66,-.59]),backOut:Rs([.33,1.53,.69,.99])};function JA(e){return jy(e)||Nu.easeOut}function jy(e){if(e)return $y(e)?Rs(e):Array.isArray(e)?e.map(JA):Nu[e]}function eI(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=jy(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const tI=my(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wa=10,nI=2e4;function rI(e){return e.type==="spring"||!Ry(e.ease)}function oI(e,t){const n=new Mu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<nI;)r=n.sample(s),o.push(r.value),s+=wa;return{times:void 0,keyframes:o,duration:s-wa,ease:"linear"}}class By extends yy{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new py(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(rI(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=oI(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=eI(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=cr.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ga(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Nn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Nn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return bt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return bt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Mu({...d,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=Mn(this.time);c.setWithVelocity(h.sample(p-wa).value,h.sample(p).value,wa)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return tI()&&r&&Vg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function sI(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return De.update(r,!0),()=>Sn(r)}const iI=my(()=>window.ScrollTimeline!==void 0);class aI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(iI()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),sI(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Fu=(e,t,n,r={},o,s,i)=>a=>{const l=gu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Mn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};H_(l)||(f={...f,...W_(e,f)}),f.duration&&(f.duration=Mn(f.duration)),f.repeatDelay&&(f.repeatDelay=Mn(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&&!s&&t.get()!==void 0){const h=ga(f.keyframes,l);if(h!==void 0)return De.update(()=>{f.onUpdate(h),f.onComplete()}),new aI([])}return!s&&By.supports(f)?new By(f):new Mu(f)};class Lu{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>ha(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zy=new Set;function Vu(e,t,n){e||zy.has(t)||(console.warn(t),zy.add(t))}const Wy=30,lI=e=>!isNaN(parseFloat(e)),js={current:void 0};class Hy{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=cr.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Vu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Lu);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return js.current&&js.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Wy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Wy);return vy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ko(e,t){return new Hy(e,t)}function cI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ko(n))}function uI(e,t){const n=ma(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=v_(s[i]);cI(e,i,a)}}function Uy(e){return e.getProps()[hg]}class fI extends Hy{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=$g(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(ha(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function dI(e){return!!(wt(e)&&e.add)}function $u(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new fI("auto"),e.addValue("willChange",r)),dI(r))return r.add(t)}function hI({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Gy(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),h=l[f];if(h===void 0||u&&hI(u,f))continue;const p={delay:n,elapsed:0,...gu(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Uy(e);if(v){const w=window.HandoffAppearAnimations(v,f,d,De);w!==null&&(p.elapsed=w,m=!0)}}d.start(Fu(f,d,h,e.shouldReduceMotion&&or.has(f)?{type:!1}:p,e,m,$u(e,f)));const y=d.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&uI(e,a)})}),c}function Ru(e,t,n={}){var r;const o=ma(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Gy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return pI(e,t,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function pI(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(mI).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Ru(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function mI(e,t){return e.sortNodePosition(t)}function gI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ru(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ru(e,t,n);else{const o=typeof t=="function"?ma(e,t,n.custom):t;r=Promise.all(Gy(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const yI=[...eu].reverse(),vI=eu.length;function bI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gI(e,n,r)))}function wI(e){let t=bI(e),n=Yy(),r=!0;const o=l=>(c,u)=>{var f;const d=ma(e,u,l==="exit"?(f=e.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 s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<vI;y++){const v=yI[y],w=n[v],g=c[v]!==void 0?c[v]:u[v],T=ks(g),x=v===l?w.isActive:null;x===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&x===null||!g&&!w.prevProp||_s(g)||typeof g=="boolean")continue;let O=xI(w.prevProp,g)||v===l&&w.isActive&&!E&&T||y>p&&T,I=!1;const N=Array.isArray(g)?g:[g];let L=N.reduce(o(v),{});x===!1&&(L={});const{prevResolvedValues:_={}}=w,j={..._,...L},D=k=>{O=!0,d.has(k)&&(I=!0,d.delete(k)),w.needsAnimating[k]=!0;const F=e.getValue(k);F&&(F.liveStyle=!1)};for(const k in j){const F=L[k],$=_[k];if(h.hasOwnProperty(k))continue;let z=!1;fu(F)&&fu($)?z=!Kg(F,$):z=F!==$,z?F!=null?D(k):d.add(k):F!==void 0&&d.has(k)?D(k):w.protectedKeys[k]=!0}w.prevProp=g,w.prevResolvedValues=L,w.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(O=!1),O&&(!E||I)&&f.push(...N.map(k=>({animation:k,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const w=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=w??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Yy(),r=!0}}}function xI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kg(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yy(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class SI extends lr{constructor(t){super(t),t.animationState||(t.animationState=wI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_s(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let TI=0;class EI extends lr{constructor(){super(...arguments),this.id=TI++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CI={animation:{Feature:SI},exit:{Feature:EI}},qy=(e,t)=>Math.abs(e-t);function PI(e,t){const n=qy(e.x,t.x),r=qy(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ky{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Bu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=PI(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=xt;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ju(d,this.transformPagePoint),De.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 y=Bu(f.type==="pointercancel"?this.lastMoveEventInfo:ju(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Bg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=pa(t),a=ju(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Bu(a,this.history)),this.removeListeners=Dn(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Sn(this.updatePoint)}}function ju(e,t){return t?{point:t(e.point)}:e}function Zy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bu({point:e},t){return{point:e,delta:Zy(e,Xy(t)),offset:Zy(e,OI(t)),velocity:kI(t,.1)}}function OI(e){return e[0]}function Xy(e){return e[e.length-1]}function kI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Xy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const s=Nn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Qy=1e-4,_I=1-Qy,AI=1+Qy,Jy=.01,II=0-Jy,DI=0+Jy;function Kt(e){return e.max-e.min}function MI(e,t,n){return Math.abs(e-t)<=n}function ev(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Kt(n)/Kt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_I&&e.scale<=AI||isNaN(e.scale))&&(e.scale=1),(e.translate>=II&&e.translate<=DI||isNaN(e.translate))&&(e.translate=0)}function Bs(e,t,n,r){ev(e.x,t.x,n.x,r?r.originX:void 0),ev(e.y,t.y,n.y,r?r.originY:void 0)}function tv(e,t,n){e.min=n.min+t.min,e.max=e.min+Kt(t)}function NI(e,t,n){tv(e.x,t.x,n.x),tv(e.y,t.y,n.y)}function nv(e,t,n){e.min=t.min-n.min,e.max=e.min+Kt(t)}function zs(e,t,n){nv(e.x,t.x,n.x),nv(e.y,t.y,n.y)}function FI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function rv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function LI(e,{top:t,left:n,bottom:r,right:o}){return{x:rv(e.x,n,o),y:rv(e.y,t,r)}}function ov(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function VI(e,t){return{x:ov(e.x,t.x),y:ov(e.y,t.y)}}function $I(e,t){let n=.5;const r=Kt(e),o=Kt(t);return o>r?n=$s(t.min,t.max-r,e.min):r>o&&(n=$s(e.min,e.max-o,t.min)),sr(0,1,n)}function RI(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const zu=.35;function jI(e=zu){return e===!1?e=0:e===!0&&(e=zu),{x:sv(e,"left","right"),y:sv(e,"top","bottom")}}function sv(e,t,n){return{min:iv(e,t),max:iv(e,n)}}function iv(e,t){return typeof e=="number"?e:e[t]||0}const av=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:av(),y:av()}),lv=()=>({min:0,max:0}),lt=()=>({x:lv(),y:lv()});function Xt(e){return[e("x"),e("y")]}function cv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wu(e){return e===void 0||e===1}function Hu({scale:e,scaleX:t,scaleY:n}){return!Wu(e)||!Wu(t)||!Wu(n)}function Ir(e){return Hu(e)||uv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function uv(e){return fv(e.x)||fv(e.y)}function fv(e){return e&&e!=="0%"}function xa(e,t,n){const r=e-n,o=t*r;return n+o}function dv(e,t,n,r,o){return o!==void 0&&(e=xa(e,o,r)),xa(e,n,r)+t}function Uu(e,t=0,n=1,r,o){e.min=dv(e.min,t,n,r,o),e.max=dv(e.max,t,n,r,o)}function hv(e,{x:t,y:n}){Uu(e.x,t.translate,t.scale,t.originPoint),Uu(e.y,n.translate,n.scale,n.originPoint)}const pv=.999999999999,mv=1.0000000000001;function WI(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,hv(e,i)),r&&Ir(s.latestValues)&&Ao(e,s.latestValues))}t.x<mv&&t.x>pv&&(t.x=1),t.y<mv&&t.y>pv&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function gv(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);Uu(e,t,n,s,r)}function Ao(e,t){gv(e.x,t.x,t.scaleX,t.scale,t.originX),gv(e.y,t.y,t.scaleY,t.scale,t.originY)}function yv(e,t){return cv(zI(e.getBoundingClientRect(),t))}function HI(e,t,n){const r=yv(e,n),{scroll:o}=t;return o&&(fr(r.x,o.offset.x),fr(r.y,o.offset.y)),r}const vv=({current:e})=>e?e.ownerDocument.defaultView:null,UI=new WeakMap;class GI{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(pa(u,"page").point)},s=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ug(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),Xt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(xn.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[v];T&&(w=Kt(T)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&De.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=$u(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=YI(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Xt(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 Ky(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:vv(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&De.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Sa(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=FI(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=LI(o.layoutBox,n):this.constraints=!1,this.elastic=jI(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=RI(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(t))return!1;const r=t.current;an(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=HI(r,o.root,this.visualElement.getTransformPagePoint());let i=VI(o.layout.layoutBox,s);if(n){const a=n(BI(i));this.hasMutatedConstraints=!!a,a&&(i=cv(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!Sa(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Fu(t,r,0,n,this.visualElement,!1,$u(this.visualElement,t)))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xt(n=>{const{drag:r}=this.getProps();if(!Sa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=$I({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xt(i=>{if(!Sa(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;UI.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();So(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const i=An(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=zu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Sa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qI extends lr{constructor(t){super(t),this.removeGroupControls=bt,this.removeListeners=bt,this.controls=new GI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const bv=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class KI extends lr{constructor(){super(...arguments),this.removePointerDownListener=bt}onPointerDown(t){this.session=new Ky(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:bv(t),onStart:bv(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&De.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZI(){const e=b.useContext(ra);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ws={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=wv(e,t.target.x),r=wv(e,t.target.y);return`${n}% ${r}%`}},XI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const s=ur.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class QI extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;qk(JI),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||De.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Jc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xv(e){const[t,n]=ZI(),r=b.useContext(As);return S.jsx(QI,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(mg),isPresent:t,safeToRemove:n})}const JI={borderRadius:{...Ws,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ws,borderTopRightRadius:Ws,borderBottomLeftRadius:Ws,borderBottomRightRadius:Ws,boxShadow:XI},Sv=["TopLeft","TopRight","BottomLeft","BottomRight"],eD=Sv.length,Tv=e=>typeof e=="string"?parseFloat(e):e,Ev=e=>typeof e=="number"||fe.test(e);function tD(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,nD(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,rD(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<eD;i++){const a=`border${Sv[i]}Radius`;let l=Cv(t,a),c=Cv(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ev(l)===Ev(c)?(e[a]=Math.max(Ze(Tv(l),Tv(c),r),0),(xn.test(c)||xn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Cv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nD=Pv(0,.5,ky),rD=Pv(.5,.95,bt);function Pv(e,t,n){return r=>r<e?0:r>t?1:n($s(e,t,r))}function Ov(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){Ov(e.x,t.x),Ov(e.y,t.y)}function kv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _v(e,t,n,r,o){return e-=t,e=xa(e,1/n,r),o!==void 0&&(e=xa(e,1/o,r)),e}function oD(e,t=0,n=1,r=.5,o,s=e,i=e){if(xn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=_v(e.min,t,n,a,o),e.max=_v(e.max,t,n,a,o)}function Av(e,t,[n,r,o],s,i){oD(e,t[n],t[r],t[o],t.scale,s,i)}const sD=["x","scaleX","originX"],iD=["y","scaleY","originY"];function Iv(e,t,n,r){Av(e.x,t,sD,n?n.x:void 0,r?r.x:void 0),Av(e.y,t,iD,n?n.y:void 0,r?r.y:void 0)}function Dv(e){return e.translate===0&&e.scale===1}function Mv(e){return Dv(e.x)&&Dv(e.y)}function aD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Nv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Fv(e){return Kt(e.x)/Kt(e.y)}function Lv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lD{constructor(){this.members=[]}add(t){da(this.members,t),t.scheduleRender()}remove(t){if(ha(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cD(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX: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=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const uD=(e,t)=>e.depth-t.depth;class fD{constructor(){this.children=[],this.isDirty=!1}add(t){da(this.children,t),this.isDirty=!0}remove(t){ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uD),this.isDirty=!1,this.children.forEach(t)}}function dD(e,t){const n=cr.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Sn(r),e(s-t))};return De.read(r,!0),()=>Sn(r)}function hD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function pD(e,t,n){const r=wt(e)?e:ko(e);return r.start(Fu("",r,t,n)),r.animation}const Dr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Gu=["","X","Y","Z"],mD={visibility:"hidden"},Vv=1e3;let gD=0;function Yu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $v(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Uy(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?$v(e.parent):!1:!1}function Rv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=gD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Dr.totalNodes=Dr.resolvedTargetDeltas=Dr.recalculatedProjection=0),this.nodes.forEach(bD),this.nodes.forEach(ED),this.nodes.forEach(CD),this.nodes.forEach(wD),window.MotionDebug&&window.MotionDebug.record(Dr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new fD)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Lu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hD(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=dD(d,250),Ta.hasAnimatedSinceResize&&(Ta.hasAnimatedSinceResize=!1,this.nodes.forEach(Bv))})}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()||AD,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Nv(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const T={...gu(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else d||Bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Sn(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(PD),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&$v(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(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(SD),this.isUpdating=!1,this.nodes.forEach(TD),this.nodes.forEach(yD),this.nodes.forEach(vD),this.clearAllSnapshots();const a=cr.now();xt.delta=sr(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,du.update.process(xt),du.preRender.process(xt),du.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xD),this.sharedNodes.forEach(OD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ir(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),ID(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return lt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(fr(a.x,l.offset.x),fr(a.y,l.offset.y)),a}removeElementScroll(i){const a=lt();Qt(a,i);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){Qt(a,i);const{scroll:d}=this.root;d&&(fr(a.x,-d.offset.x),fr(a.y,-d.offset.y))}fr(a.x,u.offset.x),fr(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=lt();Qt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ir(u.latestValues)&&Ao(l,u.latestValues)}return Ir(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ir(c.latestValues))continue;Hu(c.latestValues)&&c.updateSnapshot();const u=lt(),f=c.measurePageBox();Qt(u,f),Iv(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ir(this.latestValues)&&Iv(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NI(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),hv(this.target,this.targetDelta)):Qt(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=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Dr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Hu(this.parent.latestValues)||uv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===xt.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;Qt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;WI(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kv(this.prevProjectionDelta.x,this.projectionDelta.x),kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Bs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Lv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Dr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_o(),this.projectionDelta=_o(),this.projectionDeltaWithTransform=_o()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=_o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=lt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(_D));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const x=T/1e3;zv(f.x,i.x,x),zv(f.y,i.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kD(this.relativeTarget,this.relativeTargetOrigin,d,x),g&&aD(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=lt()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,tD(u,c,this.latestValues,x,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Sn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{Ta.hasAnimatedSinceResize=!0,this.currentAnimation=pD(0,Vv,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Yv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const f=Kt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const d=Kt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+d}Qt(a,l),Ao(a,u),Bs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new lD),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Yu("z",i,c,this.animationValues);for(let u=0;u<Gu.length;u++)Yu(`rotate${Gu[u]}`,i,c,this.animationValues),Yu(`skew${Gu[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mD;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=fa(i==null?void 0:i.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=fa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ir(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=cD(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 la){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=la[m],w=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let T=0;T<g;T++)c[v[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=f===this?fa(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function yD(e){e.updateLayout()}function vD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(d);d.min=r[f].min,d.max=d.min+h}):Yv(s,n.layoutBox,r)&&Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=_o();Bs(a,r,n.layoutBox);const l=_o();i?Bs(l,e.applyTransform(o,!0),n.measuredBox):Bs(l,r,n.layoutBox);const c=!Mv(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=lt();zs(p,n.layoutBox,d.layoutBox);const m=lt();zs(m,r,h.layoutBox),Nv(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bD(e){window.MotionDebug&&Dr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xD(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function SD(e){e.isLayoutDirty=!1}function TD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ED(e){e.resolveTargetDelta()}function CD(e){e.calcProjection()}function PD(e){e.resetSkewAndRotation()}function OD(e){e.removeLeadSnapshot()}function zv(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Wv(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function kD(e,t,n,r){Wv(e.x,t.x,n.x,r),Wv(e.y,t.y,n.y,r)}function _D(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AD={duration:.45,ease:[.4,0,.1,1]},Hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Uv=Hv("applewebkit/")&&!Hv("chrome/")?Math.round:bt;function Gv(e){e.min=Uv(e.min),e.max=Uv(e.max)}function ID(e){Gv(e.x),Gv(e.y)}function Yv(e,t,n){return e==="position"||e==="preserve-aspect"&&!MI(Fv(t),Fv(n),.2)}const DD=Rv({attachResizeListener:(e,t)=>An(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qu={current:void 0},qv=Rv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qu.current){const e=new DD({});e.mount(window),e.setOptions({layoutScroll:!0}),qu.current=e}return qu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MD={pan:{Feature:KI},drag:{Feature:qI,ProjectionNode:qv,MeasureLayout:xv}},Ku={current:null},Kv={current:!1};function ND(){if(Kv.current=!0,!!Qc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ku.current=e.matches;e.addListener(t),t()}else Ku.current=!1}function FD(e,t,n){for(const r in t){const o=t[r],s=n[r];if(wt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Vu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(wt(s))e.addValue(r,ko(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,ko(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Zv=new WeakMap,LD=[...ry,_t,ur],VD=e=>LD.find(ny(e)),Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$D=tu.length;class RD{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},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=bu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=aa(n),this.isVariantNode=vg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&wt(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Zv.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Kv.current||ND(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ku.current,process.env.NODE_ENV!=="production"&&Vu(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(){Zv.delete(this.current),this.projection&&this.projection.unmount(),Sn(this.notifyUpdate),Sn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=or.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in To){const n=To[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Xv.length;r++){const o=Xv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=FD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<$D;r++){const o=tu[r],s=this.props[o];(ks(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ko(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Xg(o)||Zg(o))?o=parseFloat(o):!VD(o)&&ur.test(n)&&(o=hy(t,n)),this.setBaseTarget(t,wt(o)?o.get():o)),wt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=uu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qv extends RD{constructor(){super(...arguments),this.KeyframeResolver=py}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function jD(e){return window.getComputedStyle(e)}class BD extends Qv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Dg}readValueFromInstance(t,n){if(or.has(n)){const r=Eu(n);return r&&r.default||0}else{const r=jD(t),o=(Tg(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return yv(t,n)}build(t,n,r){su(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zD extends Qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(or.has(n)){const r=Eu(n);return r&&r.default||0}return n=Mg.has(n)?n:sa(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fg(t,n,r)}build(t,n,r){au(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ng(t,n,r,o)}mount(t){this.isSVGTag=lu(t.tagName),super.mount(t)}}const WD=(e,t)=>nu(e)?new zD(t):new BD(t,{allowProjection:e!==b.Fragment}),HD={...CI,...$_,...MD,...{layout:{ProjectionNode:qv,MeasureLayout:xv}}},Jt=Gk((e,t)=>C_(e,t,HD,WD));function Jv(){const e=b.useRef(!1);return oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function eb(){const e=Jv(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>De.postRender(r),[r]),t]}class UD extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GD({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(xo);return b.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
140
|
+
*/var sc,yp;function LT(){if(yp)return sc;yp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return sc=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},sc}var ic,vp;function ac(){if(vp)return ic;vp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ic=e,ic}var lc,bp;function wp(){return bp||(bp=1,lc=Function.call.bind(Object.prototype.hasOwnProperty)),lc}var cc,xp;function VT(){if(xp)return cc;xp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ac(),n={},r=wp();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},cc=o,cc}var uc,Sp;function $T(){if(Sp)return uc;Sp=1;var e=gp(),t=LT(),n=ac(),r=wp(),o=VT(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return uc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(P){var V=P&&(c&&P[c]||P[u]);if(typeof V=="function")return V}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:g,element:T(),elementType:S(),instanceOf:E,node:N(),objectOf:k,oneOf:C,oneOfType:I,shape:O,exact:j};function p(P,V){return P===V?P!==0||1/P===1/V:P!==P&&V!==V}function m(P,V){this.message=P,this.data=V&&typeof V=="object"?V:{},this.stack=""}m.prototype=Error.prototype;function y(P){if(process.env.NODE_ENV!=="production")var V={},Q=0;function ie(H,A,R,W,Y,Z,fe){if(W=W||f,Z=Z||R,fe!==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;!V[Me]&&Q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Me]=!0,Q++)}}return A[R]==null?H?A[R]===null?new m("The "+Y+" `"+Z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+Y+" `"+Z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:P(A,R,W,Y,Z)}var ee=ie.bind(null,!1);return ee.isRequired=ie.bind(null,!0),ee}function v(P){function V(Q,ie,ee,H,A,R){var W=Q[ie],Y=F(W);if(Y!==P){var Z=$(W);return new m("Invalid "+H+" `"+A+"` of type "+("`"+Z+"` supplied to `"+ee+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return y(V)}function b(){return y(i)}function g(P){function V(Q,ie,ee,H,A){if(typeof P!="function")return new m("Property `"+A+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var R=Q[ie];if(!Array.isArray(R)){var W=F(R);return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an array."))}for(var Y=0;Y<R.length;Y++){var Z=P(R,Y,ee,H,A+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return y(V)}function T(){function P(V,Q,ie,ee,H){var A=V[Q];if(!a(A)){var R=F(A);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return y(P)}function S(){function P(V,Q,ie,ee,H){var A=V[Q];if(!e.isValidElementType(A)){var R=F(A);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return y(P)}function E(P){function V(Q,ie,ee,H,A){if(!(Q[ie]instanceof P)){var R=P.name||f,W=q(Q[ie]);return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected ")+("instance of `"+R+"`."))}return null}return y(V)}function C(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Q,ie,ee,H,A){for(var R=Q[ie],W=0;W<P.length;W++)if(p(R,P[W]))return null;var Y=JSON.stringify(P,function(fe,B){var Me=$(B);return Me==="symbol"?String(B):B});return new m("Invalid "+H+" `"+A+"` of value `"+String(R)+"` "+("supplied to `"+ee+"`, expected one of "+Y+"."))}return y(V)}function k(P){function V(Q,ie,ee,H,A){if(typeof P!="function")return new m("Property `"+A+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an object."));for(var Y in R)if(r(R,Y)){var Z=P(R,Y,ee,H,A+"."+Y,n);if(Z instanceof Error)return Z}return null}return y(V)}function I(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<P.length;V++){var Q=P[V];if(typeof Q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Q)+" at index "+V+"."),i}function ie(ee,H,A,R,W){for(var Y=[],Z=0;Z<P.length;Z++){var fe=P[Z],B=fe(ee,H,A,R,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var Me=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new m("Invalid "+R+" `"+W+"` supplied to "+("`"+A+"`"+Me+"."))}return y(ie)}function N(){function P(V,Q,ie,ee,H){return D(V[Q])?null:new m("Invalid "+ee+" `"+H+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return y(P)}function L(P,V,Q,ie,ee){return new m((P||"React class")+": "+V+" type `"+Q+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function O(P){function V(Q,ie,ee,H,A){var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));for(var Y in P){var Z=P[Y];if(typeof Z!="function")return L(ee,H,A,Y,$(Z));var fe=Z(R,Y,ee,H,A+"."+Y,n);if(fe)return fe}return null}return y(V)}function j(P){function V(Q,ie,ee,H,A){var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));var Y=t({},Q[ie],P);for(var Z in Y){var fe=P[Z];if(r(P,Z)&&typeof fe!="function")return L(ee,H,A,Z,$(fe));if(!fe)return new m("Invalid "+H+" `"+A+"` key `"+Z+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[ie],null," ")+`
|
|
141
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var B=fe(R,Z,ee,H,A+"."+Z,n);if(B)return B}return null}return y(V)}function D(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(D);if(P===null||a(P))return!0;var V=d(P);if(V){var Q=V.call(P),ie;if(V!==P.entries){for(;!(ie=Q.next()).done;)if(!D(ie.value))return!1}else for(;!(ie=Q.next()).done;){var ee=ie.value;if(ee&&!D(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(P,V){return P==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function F(P){var V=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":_(V,P)?"symbol":V}function $(P){if(typeof P>"u"||P===null)return""+P;var V=F(P);if(V==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return V}function z(P){var V=$(P);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function q(P){return!P.constructor||!P.constructor.name?f:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},uc}var dc,Tp;function RT(){if(Tp)return dc;Tp=1;var e=ac();function t(){}function n(){}return n.resetWarningCache=t,dc=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},dc}if(process.env.NODE_ENV!=="production"){var jT=gp(),BT=!0;oc.exports=$T()(jT.isElement,BT)}else oc.exports=RT()();var zT=oc.exports;const je=Qf(zT);function uo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function fo(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ep(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Cp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var 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 ds(e,t){var n=HT(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function HT(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=WT.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var UT=[".DS_Store","Thumbs.db"];function GT(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return Li(e)&&YT(e.dataTransfer)?[2,XT(e.dataTransfer,e.type)]:qT(e)?[2,KT(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ZT(e)]:[2,[]]})})}function YT(e){return Li(e)}function qT(e){return Li(e)&&Li(e.target)}function Li(e){return typeof e=="object"&&e!==null}function KT(e){return fc(e.target.files).map(function(t){return ds(t)})}function ZT(e){return uo(this,void 0,void 0,function(){var t;return fo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return ds(r)})]}})})}function XT(e,t){return uo(this,void 0,void 0,function(){var n,r;return fo(this,function(o){switch(o.label){case 0:return e.items?(n=fc(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(QT))]):[3,2];case 1:return r=o.sent(),[2,Pp(kp(r))];case 2:return[2,Pp(fc(e.files).map(function(s){return ds(s)}))]}})})}function Pp(e){return e.filter(function(t){return UT.indexOf(t.name)===-1})}function fc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function QT(e){if(typeof e.webkitGetAsEntry!="function")return Op(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?_p(t):Op(e)}function kp(e){return e.reduce(function(t,n){return Cp(Cp([],Ep(t),!1),Ep(Array.isArray(n)?kp(n):[n]),!1)},[])}function Op(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ds(t);return Promise.resolve(n)}function JT(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return[2,e.isDirectory?_p(e):eE(e)]})})}function _p(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return uo(i,void 0,void 0,function(){var l,c,u;return fo(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(JT)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function eE(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=ds(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var tE=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Ap(e){return oE(e)||rE(e)||Np(e)||nE()}function nE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
142
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rE(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oE(e){if(Array.isArray(e))return hc(e)}function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ip(Object(n),!0).forEach(function(r){Mp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fs(e,t){return aE(e)||iE(e,t)||Np(e,t)||sE()}function sE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
143
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Np(e,t){if(e){if(typeof e=="string")return hc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hc(e,t)}}function hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function aE(e){if(Array.isArray(e))return e}var lE="file-invalid-type",cE="file-too-large",uE="file-too-small",dE="too-many-files",fE=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:lE,message:"File type must be ".concat(n)}},Fp=function(t){return{code:cE,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Lp=function(t){return{code:uE,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},hE={code:dE,message:"Too many files"};function Vp(e,t){var n=e.type==="application/x-moz-file"||tE(e,t);return[n,n?null:fE(t)]}function $p(e,t,n){if(Sr(e.size))if(Sr(t)&&Sr(n)){if(e.size>n)return[!1,Fp(n)];if(e.size<t)return[!1,Lp(t)]}else{if(Sr(t)&&e.size<t)return[!1,Lp(t)];if(Sr(n)&&e.size>n)return[!1,Fp(n)]}return[!0,null]}function Sr(e){return e!=null}function pE(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=Vp(l,n),u=fs(c,1),d=u[0],f=$p(l,r,o),h=fs(f,1),p=h[0],m=a?a(l):null;return d&&p&&!m})}function Vi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function $i(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Rp(e){e.preventDefault()}function mE(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function gE(e){return e.indexOf("Edge/")!==-1}function yE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mE(e)||gE(e)}function fn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Vi(r)&&a&&a.apply(void 0,[r].concat(s)),Vi(r)})}}function vE(){return"showOpenFilePicker"in window}function bE(e){if(Sr(e)){var t=Object.entries(e).filter(function(n){var r=fs(n,2),o=r[0],s=r[1],i=!0;return jp(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(s)||!s.every(Bp))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=fs(r,2),s=o[0],i=o[1];return Dp(Dp({},n),{},Mp({},s,i))},{});return[{description:"Files",accept:t}]}return e}function wE(e){if(Sr(e))return Object.entries(e).reduce(function(t,n){var r=fs(n,2),o=r[0],s=r[1];return[].concat(Ap(t),[o],Ap(s))},[]).filter(function(t){return jp(t)||Bp(t)}).join(",")}function xE(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function SE(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function jp(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Bp(e){return/^.*\.[\w]+$/.test(e)}var TE=["children"],EE=["open"],CE=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],PE=["refKey","onChange","onClick"];function kE(e){return AE(e)||_E(e)||zp(e)||OE()}function OE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _E(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AE(e){if(Array.isArray(e))return mc(e)}function pc(e,t){return ME(e)||DE(e,t)||zp(e,t)||IE()}function IE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
145
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zp(e,t){if(e){if(typeof e=="string")return mc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mc(e,t)}}function mc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function ME(e){if(Array.isArray(e))return e}function Wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(n),!0).forEach(function(r){gc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ri(e,t){if(e==null)return{};var n=NE(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var yc=w.forwardRef(function(e,t){var n=e.children,r=Ri(e,TE),o=Up(r),s=o.open,i=Ri(o,EE);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(Xe(Xe({},i),{},{open:s})))});yc.displayName="Dropzone";var Hp={disabled:!1,getFilesFromEvent:GT,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};yc.defaultProps=Hp,yc.propTypes={children:je.func,accept:je.objectOf(je.arrayOf(je.string)),multiple:je.bool,preventDropOnDocument:je.bool,noClick:je.bool,noKeyboard:je.bool,noDrag:je.bool,noDragEventsBubbling:je.bool,minSize:je.number,maxSize:je.number,maxFiles:je.number,disabled:je.bool,getFilesFromEvent:je.func,onFileDialogCancel:je.func,onFileDialogOpen:je.func,useFsAccessApi:je.bool,autoFocus:je.bool,onDragEnter:je.func,onDragLeave:je.func,onDragOver:je.func,onDrop:je.func,onDropAccepted:je.func,onDropRejected:je.func,onError:je.func,validator:je.func};var vc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Up(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xe(Xe({},Hp),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,k=t.onError,I=t.validator,N=w.useMemo(function(){return wE(n)},[n]),L=w.useMemo(function(){return bE(n)},[n]),O=w.useMemo(function(){return typeof y=="function"?y:Gp},[y]),j=w.useMemo(function(){return typeof m=="function"?m:Gp},[m]),D=w.useRef(null),_=w.useRef(null),F=w.useReducer(FE,vc),$=pc(F,2),z=$[0],q=$[1],P=z.isFocused,V=z.isFileDialogActive,Q=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&vE()),ie=function(){!Q.current&&V&&setTimeout(function(){if(_.current){var se=_.current.files;se.length||(q({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[_,V,j,Q]);var ee=w.useRef([]),H=function(se){D.current&&D.current.contains(se.target)||(se.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Rp,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Rp),document.removeEventListener("drop",H))}},[D,g]),w.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var A=w.useCallback(function(X){k?k(X):console.error(X)},[k]),R=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X),ee.current=[].concat(kE(ee.current),[X.target]),$i(X)&&Promise.resolve(o(X)).then(function(se){if(!(Vi(X)&&!C)){var _e=se.length,Ke=_e>0&&pE({files:se,accept:N,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),Tt=_e>0&&!Ke;q({isDragAccept:Ke,isDragReject:Tt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(se){return A(se)})},[o,c,A,C,N,i,s,a,l,I]),W=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X);var se=$i(X);if(se&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return se&&d&&d(X),!1},[d,C]),Y=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X);var se=ee.current.filter(function(Ke){return D.current&&D.current.contains(Ke)}),_e=se.indexOf(X.target);_e!==-1&&se.splice(_e,1),ee.current=se,!(se.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),$i(X)&&u&&u(X))},[D,u,C]),Z=w.useCallback(function(X,se){var _e=[],Ke=[];X.forEach(function(Tt){var At=Vp(Tt,N),Vt=pc(At,2),jr=Vt[0],Wo=Vt[1],Ho=$p(Tt,i,s),Ga=pc(Ho,2),Nd=Ga[0],Fd=Ga[1],Ld=I?I(Tt):null;if(jr&&Nd&&!Ld)_e.push(Tt);else{var Vd=[Wo,Fd];Ld&&(Vd=Vd.concat(Ld)),Ke.push({file:Tt,errors:Vd.filter(function(dL){return dL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(Tt){Ke.push({file:Tt,errors:[hE]})}),_e.splice(0)),q({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),f&&f(_e,Ke,se),Ke.length>0&&p&&p(Ke,se),_e.length>0&&h&&h(_e,se)},[q,a,N,i,s,l,f,h,p,I]),fe=w.useCallback(function(X){X.preventDefault(),X.persist(),ke(X),ee.current=[],$i(X)&&Promise.resolve(o(X)).then(function(se){Vi(X)&&!C||Z(se,X)}).catch(function(se){return A(se)}),q({type:"reset"})},[o,Z,A,C]),B=w.useCallback(function(){if(Q.current){q({type:"openDialog"}),O();var X={multiple:a,types:L};window.showOpenFilePicker(X).then(function(se){return o(se)}).then(function(se){Z(se,null),q({type:"closeDialog"})}).catch(function(se){xE(se)?(j(se),q({type:"closeDialog"})):SE(se)?(Q.current=!1,_.current?(_.current.value=null,_.current.click()):A(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."))):A(se)});return}_.current&&(q({type:"openDialog"}),O(),_.current.value=null,_.current.click())},[q,O,j,v,Z,A,L,a]),Me=w.useCallback(function(X){!D.current||!D.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[D,B]),rt=w.useCallback(function(){q({type:"focus"})},[]),He=w.useCallback(function(){q({type:"blur"})},[]),ot=w.useCallback(function(){T||(yE()?setTimeout(B,0):B())},[T,B]),ue=function(se){return r?null:se},Ee=function(se){return S?null:ue(se)},le=function(se){return E?null:ue(se)},ke=function(se){C&&se.stopPropagation()},ut=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.role,Tt=X.onKeyDown,At=X.onFocus,Vt=X.onBlur,jr=X.onClick,Wo=X.onDragEnter,Ho=X.onDragOver,Ga=X.onDragLeave,Nd=X.onDrop,Fd=Ri(X,CE);return Xe(Xe(gc({onKeyDown:Ee(fn(Tt,Me)),onFocus:Ee(fn(At,rt)),onBlur:Ee(fn(Vt,He)),onClick:ue(fn(jr,ot)),onDragEnter:le(fn(Wo,R)),onDragOver:le(fn(Ho,W)),onDragLeave:le(fn(Ga,Y)),onDrop:le(fn(Nd,fe)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,D),!r&&!S?{tabIndex:0}:{}),Fd)}},[D,Me,rt,He,ot,R,W,Y,fe,S,E,r]),Oe=w.useCallback(function(X){X.stopPropagation()},[]),dt=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.onChange,Tt=X.onClick,At=Ri(X,PE),Vt=gc({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ue(fn(Ke,fe)),onClick:ue(fn(Tt,Oe)),tabIndex:-1},_e,_);return Xe(Xe({},Vt),At)}},[_,n,a,fe,r]);return Xe(Xe({},z),{},{isFocused:P&&!r,getRootProps:ut,getInputProps:dt,rootRef:D,inputRef:_,open:ue(B)})}function FE(e,t){switch(t.type){case"focus":return Xe(Xe({},e),{},{isFocused:!0});case"blur":return Xe(Xe({},e),{},{isFocused:!1});case"openDialog":return Xe(Xe({},vc),{},{isFileDialogActive:!0});case"closeDialog":return Xe(Xe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xe(Xe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xe(Xe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xe({},vc);default:return e}}function Gp(){}function Yp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Yp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function LE(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Yp(e))&&(r&&(r+=" "),r+=t);return r}const qp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Kp=LE,bc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Kp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=qp(u)||qp(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,d,f]:c},[]);return Kp(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},hs=w.forwardRef(function({as:t,...n},r){const o=t||"span";return x.jsx(o,{...n,ref:r})}),VE=bc("inline-flex duration-700 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",warn:"bg-warn text-warn-foreground",danger:"bg-danger text-danger-foreground",secondary:"bg-secondary-background text-secondary-foreground disabled:text-secondary-subtle",success:"bg-success text-success-foreground",info:"bg-info text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ps=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return x.jsxs(hs,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:Mt(VE({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),$E=e=>x.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>x.jsx("li",{className:"flex flex-1",children:x.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Mt("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),RE={isImage:e=>e.type.includes("image")},jE=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(RE.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:fp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:fp(e.file.size)})},[e.file]),t.type==="img"?x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[x.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(eo,{})})]}):x.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[x.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[x.jsx(px,{size:48}),x.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[x.jsx("span",{children:e.file.name}),x.jsx("span",{children:t.size})]})]}),x.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:x.jsx(eo,{className:"text-danger"})})]})},BE=e=>x.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>x.jsx(jE,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),zE=e=>e.isDragActive?x.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?x.jsx(BE,{onDeleteFile:e.onDeleteFile,files:e.files}):x.jsx(w.Fragment,{children:e.idle}),WE=x.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[x.jsx(bx,{size:64}),x.jsxs("p",{children:["You can drag your files or"," ",x.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),HE=({idle:e=WE,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=Up({onDrop:i});return x.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[x.jsx("input",{...l(r),name:r.name,id:r.name}),x.jsx(zE,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},UE=["INPUT","SELECT"],Zp=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{UE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},GE=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return x.jsx("form",{...e,onSubmit:t})},YE=({children:e,...t})=>{const n=w.useId(),[r,o]=w.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return x.jsxs("div",{className:"flex items-center",children:[x.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),x.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:x.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),x.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:x.jsx("span",{className:"font-medium text-foreground",children:e})})]})},ji=0,Jn=1,ho=2,Xp=4;function ms(e,t){return n=>e(t(n))}function qE(e,t){return t(e)}function Qp(e,t){return n=>e(t,n)}function Jp(e,t){return()=>e(t)}function Bi(e,t){return t(e),e}function Ge(...e){return e}function KE(e){e()}function em(e){return()=>e}function ZE(...e){return()=>{e.map(KE)}}function wc(e){return e!==void 0}function Tr(){}function Le(e,t){return e(Jn,t)}function be(e,t){e(ji,t)}function xc(e){e(ho)}function kt(e){return e(Xp)}function ce(e,t){return Le(e,Qp(t,ji))}function hn(e,t){const n=e(Jn,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case ho:e.splice(0,e.length);return;case Jn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ji:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function K(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case Jn:o(t);break;case ji:t=o;break;case Xp:return t}return n(r,o)}}function XE(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Jn:return s?n===s?void 0:(r(),n=s,t=Le(e,s),t):(r(),Tr);case ho:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Gt(e){return Bi(Ce(),t=>ce(e,t))}function Ot(e,t){return Bi(K(t),n=>ce(e,n))}function QE(...e){return t=>e.reduceRight(qE,t)}function U(e,...t){const n=QE(...t);return(r,o)=>{switch(r){case Jn:return Le(e,n(o));case ho:xc(e);return}}}function tm(e,t){return e===t}function Ye(e=tm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function oe(e){return t=>ms(t,e)}function pn(e){return t=>()=>t(e)}function mn(e,t){return n=>r=>n(t=e(t,r))}function po(e){return t=>n=>{e>0?e--:t(n)}}function er(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function nm(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function rm(...e){return function(t,n){switch(t){case Jn:return ZE(...e.map(r=>Le(r,n)));case ho:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=tm){return U(e,Ye(t))}function vt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case Jn:return r===o&&i(n),Le(t,i);case ho:return xc(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ae(e,t=[],{singleton:n}={singleton:!0}){return{id:JE(),constructor:e,dependencies:t,singleton:n}}const JE=()=>Symbol();function eC(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function tC(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const zi=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Sc(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&be(v.propsReady,!1);for(const g of r){const T=v[t.required[g]];be(T,b[g])}for(const g of o)if(g in b){const T=v[t.optional[g]];be(T,b[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((b,g)=>(b[g]=T=>{const S=v[t.methods[g]];be(S,T)},b),{})}function u(v){return i.reduce((b,g)=>(b[g]=XE(v[t.events[g]]),b),{})}const d=w.forwardRef((v,b)=>{const{children:g,...T}=v,[S]=w.useState(()=>Bi(eC(e),C=>l(C,T))),[E]=w.useState(Jp(u,S));return zi(()=>{for(const C of i)C in T&&Le(E[C],T[C]);return()=>{Object.values(E).map(xc)}},[T,E,S]),zi(()=>{l(S,T)}),w.useImperativeHandle(b,em(c(S))),w.createElement(a.Provider,{value:S},n?w.createElement(n,tC([...r,...o,...i],T),g):g)}),f=v=>w.useCallback(Qp(be,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],T=w.useCallback(S=>Le(g,S),[g]);return w.useSyncExternalStore(T,()=>kt(g),()=>kt(g))},p=v=>{const g=w.useContext(a)[v],[T,S]=w.useState(Jp(kt,g));return zi(()=>Le(g,E=>{E!==T&&S(em(E))}),[g,T]),T},m=w.version.startsWith("18")?h:p;return{Component:d,usePublisher:f,useEmitterValue:m,useEmitter:(v,b)=>{const T=w.useContext(a)[v];zi(()=>Le(T,b),[b,T])}}}const nC=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Yt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Yt||{});const rC={0:"debug",1:"log",2:"warn",3:"error"},oC=()=>typeof globalThis>"u"?window:globalThis,tr=Ae(()=>{const e=K(3);return{log:K((n,r,o=1)=>{var s;const i=(s=oC().VIRTUOSO_LOG_LEVEL)!=null?s:kt(e);o>=i&&console[rC[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Tc(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function gn(e,t=!0){return Tc(e,t).callbackRef}function om(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=sC(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",f=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(f,0),scrollHeight:h,viewportHeight:p}),s==null||s(iC("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Tc(a,n)}function sC(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Yt.ERROR),u===c)continue;const d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function iC(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}function nn(e,t){return Math.round(e.getBoundingClientRect()[t])}function sm(e,t){return Math.abs(e-t)<1.01}function im(e,t,n,r=Tr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(d=>{const f=d.target,h=f===window||f===document,p=h?window.pageYOffset||document.documentElement.scrollTop:f.scrollTop,m=h?document.documentElement.scrollHeight:f.scrollHeight,y=h?window.innerHeight:f.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};d.suppressFlushSync?v():Rd.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const f=s.current;if(!f||"offsetHeight"in f&&f.offsetHeight===0)return;const h=d.behavior==="smooth";let p,m,y;f===window?(m=Math.max(nn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=f.scrollHeight,p=nn(f,"height"),y=f.scrollTop);const v=m-p;if(d.top=Math.ceil(Math.max(Math.min(v,d.top),0)),sm(p,m)||d.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,f.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Nt=Ae(()=>{const e=Ce(),t=Ce(),n=K(0),r=Ce(),o=K(0),s=Ce(),i=Ce(),a=K(0),l=K(0),c=K(0),u=K(0),d=Ce(),f=Ce(),h=K(!1);return ce(U(e,oe(({scrollTop:p})=>p)),t),ce(U(e,oe(({scrollHeight:p})=>p)),i),ce(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:f,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),gs={lvl:0};function am(e,t,n,r=gs,o=gs){return{k:e,v:t,lvl:n,l:r,r:o}}function Be(e){return e===gs}function mo(){return gs}function Ec(e,t){if(Be(e))return gs;const{k:n,l:r,r:o}=e;if(t===n){if(Be(r))return o;if(Be(o))return r;{const[s,i]=lm(r);return Wi(ht(e,{k:s,v:i,l:cm(r)}))}}else return t<n?Wi(ht(e,{l:Ec(r,t)})):Wi(ht(e,{r:Ec(o,t)}))}function ys(e,t){if(!Be(e))return t===e.k?e.v:t<e.k?ys(e.l,t):ys(e.r,t)}function rn(e,t,n="k"){if(Be(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=rn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return rn(e.l,t,n)}function qt(e,t,n){return Be(e)?am(t,n,1):t===e.k?ht(e,{k:t,v:n}):t<e.k?um(ht(e,{l:qt(e.l,t,n)})):um(ht(e,{r:qt(e.r,t,n)}))}function Cc(e,t,n){if(Be(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Cc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Cc(i,t,n))),a}function Er(e){return Be(e)?[]:[...Er(e.l),{k:e.k,v:e.v},...Er(e.r)]}function lm(e){return Be(e.r)?[e.k,e.v]:lm(e.r)}function cm(e){return Be(e.r)?e.l:Wi(ht(e,{r:cm(e.r)}))}function ht(e,t){return am(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function Pc(e){return Be(e)||e.lvl>e.r.lvl}function um(e){return kc(fm(e))}function Wi(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Pc(t))return fm(ht(e,{lvl:r-1}));if(!Be(t)&&!Be(t.r))return ht(t.r,{l:ht(t,{r:t.r.l}),r:ht(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Pc(e))return kc(ht(e,{lvl:r-1}));if(!Be(n)&&!Be(n.l)){const o=n.l,s=Pc(o)?n.lvl-1:n.lvl;return ht(o,{l:ht(e,{r:o.l,lvl:r-1}),r:kc(ht(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Hi(e,t,n){if(Be(e))return[];const r=rn(e,t)[0];return aC(Cc(e,r,n))}function dm(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function aC(e){return dm(e,({k:t,v:n})=>({index:t,value:n}))}function kc(e){const{r:t,lvl:n}=e;return!Be(t)&&!Be(t.r)&&t.lvl===n&&t.r.lvl===n?ht(t,{l:ht(e,{r:t.l}),lvl:n+1}):e}function fm(e){const{l:t}=e;return!Be(t)&&t.lvl===e.lvl?ht(t,{r:ht(e,{l:t.r})}):e}function Ui(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function hm(e,t,n){return e[Ui(e,t,n)]}function lC(e,t,n,r){const o=Ui(e,t,r),s=Ui(e,n,r,o);return e.slice(o,s+1)}const Oc=Ae(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function cC(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function pm(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function uC(e,t){let n=Be(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Be(e)){e=qt(e,0,o);continue}const a=Hi(e,s-1,i+1);if(a.some(cC(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:f}of a)l?(i>=u||o===f)&&(e=Ec(e,u)):(c=f!==o,l=!0),d>i&&i>=u&&f!==o&&(e=qt(e,i+1,f));c&&(e=qt(e,s,o))}return[e,n]}function dC(){return{offsetTree:[],sizeTree:mo(),groupOffsetTree:mo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function _c({index:e},t){return t===e?0:t<e?-1:1}function fC({offset:e},t){return t===e?0:t<e?-1:1}function hC(e){return{index:e.index,value:e}}function pC(e,t,n,r=0){return r>0&&(t=Math.max(t,hm(e,r,_c).offset)),dm(lC(e,t,n,fC),hC)}function Ac(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ui(o,t-1,_c),a=o[l].offset;const u=rn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===rn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Hi(n,t,1/0)){const d=c-s,f=d*i+a+d*r;o.push({offset:f,size:u,index:c}),s=c,a=f,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function mC(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Yt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Be(s)&&t.length===2){const f=t[0].size,h=t[1].size;i=n.reduce((p,m)=>qt(qt(p,m,f),m+1,h),i)}else[i,a]=uC(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=Ac(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((f,h)=>qt(f,h,vs(h,l,o)),mo()),groupIndices:n}}function vs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=hm(t,e,_c),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function gC(e){return typeof e.groupIndex<"u"}function mm(e,t,n){if(gC(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=gm(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function gm(e,t){if(!Gi(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Gi(e){return!Be(e.groupOffsetTree)}function yC(e){return Er(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const vC={offsetHeight:"height",offsetWidth:"width"},yn=Ae(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=Ot(r,0),s=Ce(),i=Ce(),a=K(0),l=K([]),c=K(void 0),u=K(void 0),d=K((S,E)=>nn(S,vC[E])),f=K(void 0),h=K(0),p=dC(),m=Ot(U(n,we(l,e,h),mn(mC,p),Ye()),p),y=Ot(U(l,Ye(),mn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),oe(({prev:S})=>S)),[]);ce(U(l,pe(S=>S.length>0),we(m,h),oe(([S,E,C])=>{const k=S.reduce((I,N,L)=>qt(I,N,vs(N,E.offsetTree,C)||L),mo());return{...E,groupIndices:S,groupOffsetTree:k}})),m),ce(U(r,we(m),pe(([S,{lastIndex:E}])=>S<E),oe(([S,{lastIndex:E,lastSize:C}])=>[{startIndex:S,endIndex:E,size:C}])),n),ce(c,u);const v=Ot(U(c,oe(S=>S===void 0)),!0);ce(U(u,pe(S=>S!==void 0&&Be(kt(m).sizeTree)),oe(S=>[{startIndex:0,endIndex:0,size:S}])),n);const b=Gt(U(n,we(m),mn(({sizes:S},[E,C])=>({changed:C!==S,sizes:C}),{changed:!1,sizes:p}),oe(S=>S.changed)));Le(U(a,mn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),oe(S=>S.diff)),S=>{const{groupIndices:E}=kt(m);if(S>0)be(t,!0),be(s,S+pm(S,E));else if(S<0){const C=kt(y);C.length>0&&(S-=pm(-S,C)),be(i,S)}}),Le(U(a,we(e)),([S,E])=>{S<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Yt.ERROR)});const g=Gt(s);ce(U(s,we(m),oe(([S,E])=>{const C=E.groupIndices.length>0,k=[],I=E.lastSize;if(C){const N=ys(E.sizeTree,0);let L=0,O=0;for(;L<S;){const _=E.groupIndices[O],F=E.groupIndices.length===O+1?1/0:E.groupIndices[O+1]-_-1;k.push({startIndex:_,endIndex:_,size:N}),k.push({startIndex:_+1,endIndex:_+1+F-1,size:I}),O++,L+=F+1}const j=Er(E.sizeTree);return L!==S&&j.shift(),j.reduce((_,{k:F,v:$})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:F+S-1,size:_.prevSize}]),{ranges:z,prevIndex:F+S,prevSize:$}},{ranges:k,prevIndex:S,prevSize:0}).ranges}return Er(E.sizeTree).reduce((N,{k:L,v:O})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:L+S-1,size:N.prevSize}],prevIndex:L+S,prevSize:O}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Gt(U(i,we(m,h),oe(([S,{offsetTree:E},C])=>{const k=-S;return vs(k,E,C)})));return ce(U(i,we(m,h),oe(([S,E,C])=>{if(E.groupIndices.length>0){if(Be(E.sizeTree))return E;let I=mo();const N=kt(y);let L=0,O=0,j=0;for(;L<-S;){j=N[O];const _=N[O+1]-j-1;O++,L+=_+1}if(I=Er(E.sizeTree).reduce((_,{k:F,v:$})=>qt(_,Math.max(0,F+S),$),I),L!==-S){const _=ys(E.sizeTree,j);I=qt(I,0,_);const F=rn(E.sizeTree,-S+1)[1];I=qt(I,1,F)}return{...E,sizeTree:I,...Ac(E.offsetTree,0,I,C)}}else{const I=Er(E.sizeTree).reduce((N,{k:L,v:O})=>qt(N,Math.max(0,L+S),O),mo());return{...E,sizeTree:I,...Ac(E.offsetTree,0,I,C)}}})),m),{data:f,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:d}},Ge(tr,Oc),{singleton:!0}),bC=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function ym(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!bC)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const bs=Ae(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:f}])=>{const h=Ce(),p=Ce(),m=K(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ce(U(h,we(e,s,t,m,l,c,f),we(r,u,d),oe(([[T,S,E,C,k,I,N,L],O,j,D])=>{const _=ym(T),{align:F,behavior:$,offset:z}=_,q=C-1,P=mm(_,S,q);let V=vs(P,S.offsetTree,O)+I;F==="end"?(V+=j+rn(S.sizeTree,P)[1]-E+D,P===q&&(V+=N)):F==="center"?V+=(j+rn(S.sizeTree,P)[1]-E+D)/2:V-=k,z&&(V+=z);const Q=ie=>{g(),ie?(L("retrying to scroll to",{location:T},Yt.DEBUG),be(h,T)):(be(p,!0),L("list did not change, scroll successful",{},Yt.DEBUG))};if(g(),$==="smooth"){let ie=!1;b=Le(n,ee=>{ie=ie||ee}),y=hn(a,()=>{Q(ie)})}else y=hn(U(n,wC(150)),Q);return v=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:P,top:V,behavior:$},Yt.DEBUG),{top:V,behavior:$}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ge(yn,Nt,tr),{singleton:!0});function wC(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ws="up",xs="down",xC="none",SC={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},TC=0,Ss=Ae(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=K(!1),a=K(!0),l=Ce(),c=Ce(),u=K(4),d=K(TC),f=Ot(U(rm(U(ge(t),po(1),pn(!0)),U(ge(t),po(1),pn(!1),nm(100))),Ye()),!1),h=Ot(U(rm(U(s,pn(!0)),U(s,pn(!1),nm(200))),Ye()),!1);ce(U(vt(ge(t),ge(d)),oe(([b,g])=>b<=g),Ye()),a),ce(U(a,er(50)),c);const p=Gt(U(vt(e,ge(n),ge(r),ge(o),ge(u)),mn((b,[{scrollTop:g,scrollHeight:T},S,E,C,k])=>{const I=g+S-T>-k,N={viewportHeight:S,scrollTop:g,scrollHeight:T};if(I){let O,j;return g>b.state.scrollTop?(O="SCROLLED_DOWN",j=b.state.scrollTop-g):(O="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:O,scrollTopDelta:j}}let L;return N.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":S<b.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<b.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:N}},SC),Ye((b,g)=>b&&b.atBottom===g.atBottom))),m=Ot(U(e,mn((b,{scrollTop:g,scrollHeight:T,viewportHeight:S})=>{if(sm(b.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+S)<1;return b.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(b=>b.changed),oe(b=>b.jump)),0);ce(U(p,oe(b=>b.atBottom)),i),ce(U(i,er(50)),l);const y=K(xs);ce(U(e,oe(({scrollTop:b})=>b),Ye(),mn((b,g)=>kt(h)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?ws:xs,prevScrollTop:g},{direction:xs,prevScrollTop:0}),oe(b=>b.direction)),y),ce(U(e,er(50),pn(xC)),y);const v=K(0);return ce(U(f,pe(b=>!b),pn(0)),v),ce(U(t,er(100),we(f),pe(([b,g])=>!!g),mn(([b,g],[T])=>[g,T],[0,0]),oe(([b,g])=>g-b)),v),{isScrolling:f,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:v,lastJumpDueToItemResize:m}},Ge(Nt)),nr=Ae(([{log:e}])=>{const t=K(!1),n=Gt(U(t,pe(r=>r),Ye()));return Le(t,r=>{r&&kt(e)("props updated",{},Yt.DEBUG)}),{propsReady:t,didMount:n}},Ge(tr),{singleton:!0});function Ic(e,t){e==0?t():requestAnimationFrame(()=>Ic(e-1,t))}function Dc(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ts=Ae(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=K(!0),l=K(0),c=K(!0);return ce(U(i,we(l),pe(([u,d])=>!!d),pn(!1)),a),ce(U(i,we(l),pe(([u,d])=>!!d),pn(!1)),c),Le(U(vt(t,i),we(a,e,n,c),pe(([[,u],d,{sizeTree:f},h,p])=>u&&(!Be(f)||wc(h))&&!d&&!p),we(l)),([,u])=>{hn(s,()=>{be(c,!0)}),Ic(4,()=>{hn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ge(yn,Nt,bs,nr),{singleton:!0});function vm(e){return e?e==="smooth"?"smooth":"auto":!1}const EC=(e,t)=>typeof e=="function"?vm(e(t)):t&&vm(e),CC=Ae(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=K(!1),d=Ce();let f=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}Le(U(vt(U(ge(e),po(1)),a),we(ge(u),n,s,c),oe(([[m,y],v,b,g,T])=>{let S=y&&g,E="auto";return S&&(E=EC(v,b||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{f&&(f(),f=null),f=hn(t,()=>{kt(l)("following output to ",{totalCount:m},Yt.DEBUG),h(y),f=null})});function p(m){const y=hn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!f&&(kt(l)("scrolling to bottom due to increased size",{},Yt.DEBUG),h("auto"))});setTimeout(y,100)}return Le(U(vt(ge(u),e,i),pe(([m,,y])=>m&&y),mn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{kt(s)&&p(m!==!1)}),Le(d,()=>{p(kt(u)!==!1)}),Le(vt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:d}},Ge(yn,Ss,bs,Ts,nr,tr,Nt));function PC(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const bm=Ae(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Gt(U(s,oe(PC)));return ce(U(a,oe(l=>l.totalCount)),e),ce(U(a,oe(l=>l.groupIndices)),t),ce(U(vt(r,n,o),pe(([l,c])=>Gi(c)),oe(([l,c,u])=>rn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ye(),oe(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ge(yn,Nt));function Es(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function wm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Yi="top",qi="bottom",xm="none";function Sm(e,t,n){return typeof e=="number"?n===ws&&t===Yi||n===xs&&t===qi?e:0:n===ws?t===Yi?e.main:e.reverse:t===qi?e.main:e.reverse}function Tm(e,t){return typeof e=="number"?e:e[t]||0}const Mc=Ae(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=K(0),a=K(0),l=K(0),c=Ot(U(vt(ge(e),ge(t),ge(r),ge(s,Es),ge(l),ge(i),ge(o),ge(n),ge(a)),oe(([u,d,f,[h,p],m,y,v,b,g])=>{const T=u-b,S=y+v,E=Math.max(f-T,0);let C=xm;const k=Tm(g,Yi),I=Tm(g,qi);return h-=b,h+=f+v,p+=f+v,p-=b,h>u+S-k&&(C=ws),p<u-E+d+I&&(C=xs),C!==xm?[Math.max(T-f-Sm(m,Yi,C)-k,0),T-E-v+d+Sm(m,qi,C)+I]:null}),pe(u=>u!=null),Ye(Es)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ge(Nt),{singleton:!0});function kC(e,t,n){if(Gi(t)){const r=gm(e,t);return[{index:rn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Nc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Em(e,t,n){if(e.length===0)return[];if(!Gi(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Hi(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Ki(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const d=n-l,f=a+d*i+(d-1)*r,h=c,p=f-u;return{items:Em(e,o,s),topItems:Em(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Cm(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Dc(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Ki(c,[],a,o,n,r)}const Cr=Ae(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:p}])=>{const m=K([]),y=K(0),v=Ce();ce(s.topItemsIndexes,m);const b=Ot(U(vt(h,p,ge(i,Es),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,C,,k,,,,,,,I])=>{const N=I&&I.length!==k;return E&&!C&&!N}),oe(([,,[E,C],k,I,N,L,O,j,D,_])=>{const F=I,{sizeTree:$,offsetTree:z}=F,q=kt(y);if(k===0)return{...Nc,totalCount:k};if(E===0&&C===0)return q===0?{...Nc,totalCount:k}:Cm(q,N,I,j,D,_||[]);if(Be($))return q>0?null:Ki(kC(Dc(N,k),F,_),[],k,D,F,j);const P=[];if(O.length>0){const H=O[0],A=O[O.length-1];let R=0;for(const W of Hi($,H,A)){const Y=W.value,Z=Math.max(W.start,H),fe=Math.min(W.end,A);for(let B=Z;B<=fe;B++)P.push({index:B,size:Y,offset:R,data:_&&_[B]}),R+=Y}}if(!L)return Ki([],P,k,D,F,j);const V=O.length>0?O[O.length-1]+1:0,Q=pC(z,E,C,V);if(Q.length===0)return null;const ie=k-1,ee=Bi([],H=>{for(const A of Q){const R=A.value;let W=R.offset,Y=A.start;const Z=R.size;if(R.offset<E){Y+=Math.floor((E-R.offset+D)/(Z+D));const B=Y-A.start;W+=B*Z+B*D}Y<V&&(W+=(V-Y)*Z,Y=V);const fe=Math.min(A.end,ie);for(let B=Y;B<=fe&&!(W>=C);B++)H.push({index:B,size:Z,offset:W,data:_&&_[B]}),W+=Z+D}});return Ki(ee,P,k,D,F,j)}),pe(E=>E!==null),Ye()),Nc);ce(U(n,pe(wc),oe(E=>E==null?void 0:E.length)),t),ce(U(b,oe(E=>E.topListHeight)),d),ce(d,l),ce(U(b,oe(E=>[E.top,E.bottom])),a),ce(U(b,oe(E=>E.items)),v);const g=Gt(U(b,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},C])=>E[E.length-1].originalIndex===C-1),oe(([,E,C])=>[E-1,C]),Ye(Es),oe(([E])=>E))),T=Gt(U(b,er(200),pe(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),oe(({items:E})=>E[0].index),Ye())),S=Gt(U(b,pe(({items:E})=>E.length>0),oe(({items:E})=>{let C=0,k=E.length-1;for(;E[C].type==="group"&&C<k;)C++;for(;E[k].type==="group"&&k>C;)k--;return{startIndex:E[C].index,endIndex:E[k].index}}),Ye(wm)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:S,itemsRendered:v,initialItemCount:y,...f}},Ge(yn,bm,Mc,Ts,bs,Ss,nr,Oc),{singleton:!0}),OC=Ae(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ce(U(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),oe(([[,l],c,u,d,f,h=[]])=>Cm(l,c,u,d,f,h))),i),{}),Ge(yn,Ts,Cr,nr),{singleton:!0}),Pm=Ae(([{scrollVelocity:e}])=>{const t=K(!1),n=Ce(),r=K(!1);return ce(U(e,we(r,t,n),pe(([o,s])=>!!s),oe(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Ye()),t),Le(U(vt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ge(Ss),{singleton:!0}),_C=Ae(([{topItemsIndexes:e}])=>{const t=K(0);return ce(U(t,pe(n=>n>0),oe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ge(Cr)),km=Ae(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=Ot(U(vt(e,r,t,n,o),oe(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ce(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ge(Nt,Cr),{singleton:!0});function Om(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const AC=Om(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),IC=Ae(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:f},{log:h},{recalcInProgress:p}])=>{const m=Gt(U(l,we(a),mn(([,v,b,g],[{items:T,totalCount:S,bottom:E,offsetBottom:C},k])=>{const I=E+C;let N=0;return b===S&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(N=I-g,N!==0&&(N+=k))),[N,T,S,I]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,b,g,,,T])=>!T&&!g&&v!==0&&b===ws),oe(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},Yt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return Le(U(m,we(n,o)),([v,b,g])=>{g&&AC()?be(n,b-v):y(-v)}),Le(U(vt(Ot(o,!1),n,p),pe(([v,b,g])=>!v&&!g&&b!==0),oe(([v,b])=>b),er(1)),y),ce(U(u,oe(v=>({top:-v}))),e),Le(U(c,we(d,f),oe(([v,{lastSize:b,groupIndices:g,sizeTree:T},S])=>{function E(C){return C*(b+S)}if(g.length===0)return E(v);{let C=0;const k=ys(T,0);let I=0,N=0;for(;I<v;){I++,C+=k;let L=g.length===N+1?1/0:g[N+1]-g[N]-1;I+L>v&&(C-=k,L=v-I+1),I+=L,C+=E(L),N++}return C}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ge(Nt,Ss,Cr,yn,tr,Oc)),DC=Ae(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=K(0);return Le(U(e,we(r),pe(([,o])=>o!==0),oe(([,o])=>({top:o}))),o=>{hn(U(n,po(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ge(nr,Nt,Cr),{singleton:!0}),MC=Ae(([{viewportHeight:e},{totalListHeight:t}])=>{const n=K(!1),r=Ot(U(vt(n,e,t),pe(([o])=>o),oe(([,o,s])=>Math.max(0,o-s)),er(0),Ye()),0);return{alignToBottom:n,paddingTopAddition:r}},Ge(Nt,km),{singleton:!0}),Fc=Ae(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=K(!1),i=K(void 0);return ce(U(vt(n,r),oe(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ce(U(e,we(r),oe(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ge(Nt)),NC=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,FC=Ae(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ce(U(u,we(e,o,t,s,i,a,r),we(n),oe(([[d,f,h,p,m,y,v,b],g])=>{const{done:T,behavior:S,align:E,calculateViewLocation:C=NC,...k}=d,I=mm(d,f,p-1),N=vs(I,f.offsetTree,g)+m+y,L=N+rn(f.sizeTree,I)[1],O=b+y,j=b+h-v,D=C({itemTop:N,itemBottom:L,viewportTop:O,viewportBottom:j,locationParams:{behavior:S,align:E,...k}});return D?T&&hn(U(l,pe(_=>_===!1),po(kt(l)?1:2)),T):T&&T(),D}),pe(d=>d!==null)),c),{scrollIntoView:u}},Ge(yn,Nt,bs,Cr,tr),{singleton:!0}),LC=Ae(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=K(void 0),d=K(null),f=K(null);return ce(a,d),ce(l,f),Le(U(c,we(e,n,i,d,f,r)),([h,p,m,y,v,b,g])=>{const T=yC(p.sizeTree);y&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ce(U(u,pe(wc),oe(VC)),o),ce(U(s,we(u),pe(([,h])=>h!==void 0),Ye(),oe(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ge(yn,Nt,Ts,nr,Fc));function VC(e){return{offset:e.scrollTop,index:0,align:"start"}}const $C=Ae(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ge(Mc,OC,nr,Pm,km,DC,MC,Fc,FC,tr)),_m=Ae(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:b,topItemsIndexes:g,...T},{scrollToIndex:S},E,{topItemCount:C},{groupCounts:k},I])=>(ce(T.rangeChanged,I.scrollSeekRangeChanged),ce(U(I.windowViewportRect,oe(N=>N.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:f,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:k,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...y}),Ge(yn,Ts,Nt,LC,CC,Cr,bs,IC,_C,bm,$C)),Lc="-webkit-sticky",Am="sticky",Im=Om(()=>{if(typeof document>"u")return Am;const e=document.createElement("div");return e.style.position=Lc,e.style.position===Lc?Lc:Am});function Vc(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,d;if(t){const f=t.getBoundingClientRect(),h=l.top-f.top;u=f.height-Math.max(0,h),d=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Tc(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Zi=w.createContext(void 0),Dm=w.createContext(void 0);function $c(e){return e}const RC=Ae(([e,t])=>({...e,...t}),Ge(_m,Ae(()=>{const e=K(l=>`Item ${l}`),t=K(null),n=K(l=>`Group ${l}`),r=K({}),o=K($c),s=K("div"),i=K(Tr),a=(l,c=null)=>Ot(U(r,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),jC=({height:e})=>w.createElement("div",{style:{height:e}}),BC={position:Im(),zIndex:1,overflowAnchor:"none"},zC={overflowAnchor:"none"},Mm=w.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Zt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Zt("windowScrollContainerState"),a=Zt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),f=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=Zt("gap"),{callbackRef:y}=om(r,h,f,t?Tr:l,p,m,s),[v,b]=w.useState(0);Bc("deviation",D=>{v!==D&&b(D)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||jC,S=Te("ListComponent"),E=Te("ItemComponent"),C=Te("GroupComponent"),k=Te("computeItemKey"),I=Te("isSeeking"),N=Te("groupIndices").length>0,L=Te("alignToBottom"),O=Te("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:L?"auto":0,...O?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,et(g,u)):w.createElement(S,{...et(S,u),ref:y,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const _=D.originalIndex,F=k(_+n.firstItemIndex,D.data,u);return I?w.createElement(T,{...et(T,u),key:F,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?w.createElement(C,{...et(C,u),key:F,"data-index":_,"data-known-size":D.size,"data-item-index":D.index,style:BC},d(D.index,u)):w.createElement(E,{...et(E,u),...Nm(E,D.data),key:F,"data-index":_,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,style:zC},N?c(D.index,D.groupIndex,D.data,u):c(D.index,D.data,u))}))}),WC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),HC={width:"100%",position:Im(),top:0,zIndex:1};function et(e,t){if(typeof e!="string")return{context:t}}function Nm(e,t){return{item:typeof e=="string"?void 0:t}}const UC=w.memo(function(){const t=Te("HeaderComponent"),n=Zt("headerHeight"),r=Te("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),GC=w.memo(function(){const t=Te("FooterComponent"),n=Zt("footerHeight"),r=Te("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null});function Rc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("scrollerRef"),f=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=im(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...WC,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...et(c,f)},i)})}function jc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),d=n("totalListHeight"),f=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=im(l,u,c,Tr,h);return nC(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),w.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+f}:{}},"data-virtuoso-scroller":!0,...a,...et(c,p)},i)})}const YC=({children:e})=>{const t=w.useContext(Zi),n=Zt("viewportHeight"),r=Zt("fixedItemHeight"),o=Te("alignToBottom"),s=gn(w.useMemo(()=>ms(n,i=>nn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:go(o),ref:s,"data-viewport-type":"element"},e)},qC=({children:e})=>{const t=w.useContext(Zi),n=Zt("windowViewportRect"),r=Zt("fixedItemHeight"),o=Te("customScrollParent"),s=Vc(n,o),i=Te("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:go(i),"data-viewport-type":"window"},e)},KC=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...HC,marginTop:`${n}px`},o=Te("context");return w.createElement(t,{style:r,...et(t,o)},e)},ZC=w.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?JC:QC,i=o||n?qC:YC;return w.createElement(s,{...t},r&&w.createElement(KC,null,w.createElement(Mm,{showTopList:!0})),w.createElement(i,null,w.createElement(UC,null),w.createElement(Mm,null),w.createElement(GC,null)))}),{Component:XC,usePublisher:Zt,useEmitterValue:Te,useEmitter:Bc}=Sc(RC,{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"}},ZC),QC=Rc({usePublisher:Zt,useEmitterValue:Te,useEmitter:Bc}),JC=jc({usePublisher:Zt,useEmitterValue:Te,useEmitter:Bc}),eP=XC,Fm={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},tP={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Lm,ceil:Vm,floor:Xi,min:zc,max:Cs}=Math;function nP(e){return{...tP,items:e}}function $m(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function rP(e,t){return e&&e.column===t.column&&e.row===t.row}function Qi(e,t){return e&&e.width===t.width&&e.height===t.height}const oP=Ae(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,f,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},T])=>{const S=K(0),E=K(0),C=K(Fm),k=K({height:0,width:0}),I=K({height:0,width:0}),N=Ce(),L=Ce(),O=K(0),j=K(null),D=K({row:0,column:0}),_=Ce(),F=Ce(),$=K(!1),z=K(0),q=K(!0),P=K(!1);Le(U(p,we(z),pe(([A,R])=>!!R)),()=>{be(q,!1),be(E,0)}),Le(U(vt(p,q,I,k,z,P),pe(([A,R,W,Y,,Z])=>A&&!R&&W.height!==0&&Y.height!==0&&!Z)),([,,,,A])=>{be(P,!0),Ic(1,()=>{be(N,A)}),hn(U(r),()=>{be(n,[0,0]),be(q,!0)})}),ce(U(F,pe(A=>A!=null&&A.scrollTop>0),pn(0)),E),Le(U(p,we(F),pe(([,A])=>A!=null)),([,A])=>{A&&(be(k,A.viewport),be(I,A==null?void 0:A.item),be(D,A.gap),A.scrollTop>0&&(be($,!0),hn(U(r,po(1)),R=>{be($,!1)}),be(i,{top:A.scrollTop})))}),ce(U(k,oe(({height:A})=>A)),o),ce(U(vt(ge(k,Qi),ge(I,Qi),ge(D,(A,R)=>A&&A.column===R.column&&A.row===R.row),ge(r)),oe(([A,R,W,Y])=>({viewport:A,item:R,gap:W,scrollTop:Y}))),_),ce(U(vt(ge(S),t,ge(D,rP),ge(I,Qi),ge(k,Qi),ge(j),ge(E),ge($),ge(q),ge(z)),pe(([,,,,,,,A])=>!A),oe(([A,[R,W],Y,Z,fe,B,Me,,rt,He])=>{const{row:ot,column:ue}=Y,{height:Ee,width:le}=Z,{width:ke}=fe;if(Me===0&&(A===0||ke===0))return Fm;if(le===0){const Vt=Dc(He,A),jr=Vt===0?Math.max(Me-1,0):Vt;return nP($m(Vt,jr,B))}const ut=jm(ke,le,ue);let Oe,dt;rt?R===0&&W===0&&Me>0?(Oe=0,dt=Me-1):(Oe=ut*Xi((R+ot)/(Ee+ot)),dt=ut*Vm((W+ot)/(Ee+ot))-1,dt=zc(A-1,Cs(dt,ut-1)),Oe=zc(dt,Cs(0,Oe))):(Oe=0,dt=-1);const X=$m(Oe,dt,B),{top:se,bottom:_e}=Rm(fe,Y,Z,X),Ke=Vm(A/ut),At=Ke*Ee+(Ke-1)*ot-_e;return{items:X,offsetTop:se,offsetBottom:At,top:se,bottom:_e,itemHeight:Ee,itemWidth:le}})),C),ce(U(j,pe(A=>A!==null),oe(A=>A.length)),S),ce(U(vt(k,I,C,D),pe(([A,R,{items:W}])=>W.length>0&&R.height!==0&&A.height!==0),oe(([A,R,{items:W},Y])=>{const{top:Z,bottom:fe}=Rm(A,Y,R,W);return[Z,fe]}),Ye(Es)),n);const V=K(!1);ce(U(r,we(V),oe(([A,R])=>R||A!==0)),V);const Q=Gt(U(ge(C),pe(({items:A})=>A.length>0),we(S,V),pe(([{items:A},R,W])=>W&&A[A.length-1].index===R-1),oe(([,A])=>A-1),Ye())),ie=Gt(U(ge(C),pe(({items:A})=>A.length>0&&A[0].index===0),pn(0),Ye())),ee=Gt(U(ge(C),we($),pe(([{items:A},R])=>A.length>0&&!R),oe(([{items:A}])=>({startIndex:A[0].index,endIndex:A[A.length-1].index})),Ye(wm),er(0)));ce(ee,f.scrollSeekRangeChanged),ce(U(N,we(k,I,S,D),oe(([A,R,W,Y,Z])=>{const fe=ym(A),{align:B,behavior:Me,offset:rt}=fe;let He=fe.index;He==="LAST"&&(He=Y-1),He=Cs(0,He,zc(Y-1,He));let ot=Wc(R,Z,W,He);return B==="end"?ot=Lm(ot-R.height+W.height):B==="center"&&(ot=Lm(ot-R.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Me}})),i);const H=Ot(U(C,oe(A=>A.offsetBottom+A.bottom)),0);return ce(U(m,oe(A=>({width:A.visibleWidth,height:A.visibleHeight}))),k),{data:j,totalCount:S,viewportDimensions:k,itemDimensions:I,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:O,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:D,restoreStateFrom:F,...f,initialTopMostItemIndex:z,gridState:C,totalListHeight:H,...d,startReached:ie,endReached:Q,rangeChanged:ee,stateChanged:_,propsReady:h,stateRestoreInProgress:$,...T}},Ge(Mc,Nt,Ss,Pm,nr,Fc,tr));function Rm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Wc(e,t,n,r[0].index),i=Wc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Wc(e,t,n,r){const o=jm(e.width,n.width,t.column),s=Xi(r/o),i=s*n.height+Cs(0,s-1)*t.row;return i>0?i+t.row:i}function jm(e,t,n){return Cs(1,Xi((e+n)/(Xi(t)+n)))}const sP=Ae(([e,t])=>({...e,...t}),Ge(oP,Ae(()=>{const e=K(c=>`Item ${c}`),t=K({}),n=K(null),r=K("virtuoso-grid-item"),o=K("virtuoso-grid-list"),s=K($c),i=K("div"),a=K(Tr),l=(c,u=null)=>Ot(U(t,oe(d=>d[c]),Ye()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),iP=w.memo(function(){const t=Qe("gridState"),n=Qe("listClassName"),r=Qe("itemClassName"),o=Qe("itemContent"),s=Qe("computeItemKey"),i=Qe("isSeeking"),a=on("scrollHeight"),l=Qe("ItemComponent"),c=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),d=Qe("context"),f=on("itemDimensions"),h=on("gap"),p=Qe("log"),m=Qe("stateRestoreInProgress"),y=gn(w.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:T,height:S}=g.getBoundingClientRect();f({width:T,height:S})}h({row:zm("row-gap",getComputedStyle(v).rowGap,p),column:zm("column-gap",getComputedStyle(v).columnGap,p)})},[a,f,h,p]));return m?null:w.createElement(c,{ref:y,className:n,...et(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const b=s(v.index,v.data,d);return i?w.createElement(u,{key:b,...et(u,d),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...et(l,d),className:r,"data-index":v.index,key:b},o(v.index,v.data,d))}))}),aP=w.memo(function(){const t=Qe("HeaderComponent"),n=on("headerHeight"),r=Qe("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),lP=w.memo(function(){const t=Qe("FooterComponent"),n=on("footerHeight"),r=Qe("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),cP=({children:e})=>{const t=w.useContext(Dm),n=on("itemDimensions"),r=on("viewportDimensions"),o=gn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:go(!1),ref:o},e)},uP=({children:e})=>{const t=w.useContext(Dm),n=on("windowViewportRect"),r=on("itemDimensions"),o=Qe("customScrollParent"),s=Vc(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:go(!1)},e)},dP=w.memo(function({...t}){const n=Qe("useWindowScroll"),r=Qe("customScrollParent"),o=r||n?hP:fP,s=r||n?uP:cP;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(aP,null),w.createElement(iP,null),w.createElement(lP,null)))}),{Component:xL,usePublisher:on,useEmitterValue:Qe,useEmitter:Bm}=Sc(sP,{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"}},dP),fP=Rc({usePublisher:on,useEmitterValue:Qe,useEmitter:Bm}),hP=jc({usePublisher:on,useEmitterValue:Qe,useEmitter:Bm});function zm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}const pP=Ae(([e,t])=>({...e,...t}),Ge(_m,Ae(()=>{const e=K(l=>w.createElement("td",null,"Item $",l)),t=K(null),n=K(null),r=K(null),o=K({}),s=K($c),i=K(Tr),a=(l,c=null)=>Ot(U(o,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),mP=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),gP=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),yP={overflowAnchor:"none"},vP=w.memo(function(){const t=Ve("listState"),n=sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),s=sn("windowScrollContainerState"),i=sn("scrollContainerState"),a=o||r?s:i,l=Ve("itemContent"),c=Ve("trackItemSizes"),u=Ve("itemSize"),d=Ve("log"),{callbackRef:f,ref:h}=om(n,u,c,a,d,void 0,o),[p,m]=w.useState(0);Hc("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=Ve("EmptyPlaceholder"),v=Ve("ScrollSeekPlaceholder")||mP,b=Ve("FillerRow")||gP,g=Ve("TableBodyComponent"),T=Ve("TableRowComponent"),S=Ve("computeItemKey"),E=Ve("isSeeking"),C=Ve("paddingTopAddition"),k=Ve("firstItemIndex"),I=Ve("statefulTotalCount"),N=Ve("context");if(I===0&&y)return w.createElement(y,et(y,N));const L=t.offsetTop+C+p,O=t.offsetBottom,j=L>0?w.createElement(b,{height:L,key:"padding-top",context:N}):null,D=O>0?w.createElement(b,{height:O,key:"padding-bottom",context:N}):null,_=t.items.map(F=>{const $=F.originalIndex,z=S($+k,F.data,N);return E?w.createElement(v,{...et(v,N),key:z,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(T,{...et(T,N),...Nm(T,F.data),key:z,"data-index":$,"data-known-size":F.size,"data-item-index":F.index,style:yP},l(F.index,F.data,N))});return w.createElement(g,{ref:f,"data-testid":"virtuoso-item-list",...et(g,N)},[j,..._,D])}),bP=({children:e})=>{const t=w.useContext(Zi),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=gn(w.useMemo(()=>ms(n,s=>nn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:go(!1),ref:o,"data-viewport-type":"element"},e)},wP=({children:e})=>{const t=w.useContext(Zi),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ve("customScrollParent"),s=Vc(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:go(!1),"data-viewport-type":"window"},e)},xP=w.memo(function(t){const n=Ve("useWindowScroll"),r=Ve("customScrollParent"),o=sn("fixedHeaderHeight"),s=sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),l=Ve("context"),c=gn(w.useMemo(()=>ms(o,b=>nn(b,"height")),[o])),u=gn(w.useMemo(()=>ms(s,b=>nn(b,"height")),[s])),d=r||n?EP:TP,f=r||n?wP:bP,h=Ve("TableComponent"),p=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),y=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...et(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...et(m,l)},a()):null;return w.createElement(d,{...t},w.createElement(f,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...et(h,l)},[y,w.createElement(vP,{key:"TableBody"}),v])))}),{Component:SP,usePublisher:sn,useEmitterValue:Ve,useEmitter:Hc}=Sc(pP,{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"}},xP),TP=Rc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Hc}),EP=jc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Hc}),CP=SP,PP=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},Wm=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"checkbox",className:Mt("form-checkbox h-4 w-4 app rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),kP={Item:w.forwardRef(function(t,n){return x.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return x.jsx("ul",{...t,ref:n,className:"space-y-3"})})},OP=e=>{const t=w.useRef(null),n=PP(t);return x.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[x.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[x.jsx("header",{className:"border-b border-card-border pb-2"}),x.jsxs("div",{className:"px-8 space-y-2",children:[x.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),x.jsx(eP,{height:n,useWindowScroll:!0,data:e.source,components:kP,itemContent:(r,o)=>x.jsx(w.Fragment,{children:x.jsx(Wm,{children:x.jsx(e.Item,{data:o})})})})]})]}),x.jsx("div",{children:x.jsx(ps,{children:x.jsx(qf,{})})}),x.jsx("div",{})]})},_P=({children:e,className:t="",size:n,...r})=>x.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[x.jsx("input",{...r,type:"radio",className:Mt("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]});function ze(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function yo(e,t){const n=ze(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ji(e,t){const n=ze(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Hm=6048e5,AP=864e5,IP=6e4,DP=36e5,MP=1e3;let NP={};function Pr(){return NP}function vn(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function vo(e){return vn(e,{weekStartsOn:1})}function Um(e){const t=ze(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=vo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=vo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function bo(e){const t=ze(e);return t.setHours(0,0,0,0),t}function ea(e){const t=ze(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function FP(e,t){const n=bo(e),r=bo(t),o=+n-ea(n),s=+r-ea(r);return Math.round((o-s)/AP)}function LP(e){const t=Um(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vo(n)}function Gm(e,t){const n=t*7;return yo(e,n)}function Ym(e,t){return Ji(e,t*12)}function VP(e){return qe(e,Date.now())}function $P(e,t){const n=bo(e),r=bo(t);return+n==+r}function RP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function jP(e){if(!RP(e)&&typeof e!="number")return!1;const t=ze(e);return!isNaN(Number(t))}function qm(e,t){const n=ze(e.start),r=ze(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(ze(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Km(e){const t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function BP(e){const t=ze(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zP(e,t){var a,l;const n=Pr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const WP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},HP=(e,t,n)=>{let r;const o=WP[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Uc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const UP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},YP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qP={date:Uc({formats:UP,defaultWidth:"full"}),time:Uc({formats:GP,defaultWidth:"full"}),dateTime:Uc({formats:YP,defaultWidth:"full"})},KP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ZP=(e,t,n,r)=>KP[e];function Ps(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const XP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},JP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ek={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},tk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},nk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},rk={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ps({values:XP,defaultWidth:"wide"}),quarter:Ps({values:QP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ps({values:JP,defaultWidth:"wide"}),day:Ps({values:ek,defaultWidth:"wide"}),dayPeriod:Ps({values:tk,defaultWidth:"wide",formattingValues:nk,defaultFormattingWidth:"wide"})};function ks(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?sk(a,d=>d.test(i)):ok(a,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function ok(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function sk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ik(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const ak=/^(\d+)(th|st|nd|rd)?/i,lk=/\d+/i,ck={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uk={any:[/^b/i,/^(a|c)/i]},dk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fk={any:[/1/i,/2/i,/3/i,/4/i]},hk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},yk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},bk={ordinalNumber:ik({matchPattern:ak,parsePattern:lk,valueCallback:e=>parseInt(e,10)}),era:ks({matchPatterns:ck,defaultMatchWidth:"wide",parsePatterns:uk,defaultParseWidth:"any"}),quarter:ks({matchPatterns:dk,defaultMatchWidth:"wide",parsePatterns:fk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ks({matchPatterns:hk,defaultMatchWidth:"wide",parsePatterns:pk,defaultParseWidth:"any"}),day:ks({matchPatterns:mk,defaultMatchWidth:"wide",parsePatterns:gk,defaultParseWidth:"any"}),dayPeriod:ks({matchPatterns:yk,defaultMatchWidth:"any",parsePatterns:vk,defaultParseWidth:"any"})},Zm={code:"en-US",formatDistance:HP,formatLong:qP,formatRelative:ZP,localize:rk,match:bk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wk(e){const t=ze(e);return FP(t,BP(t))+1}function Xm(e){const t=ze(e),n=+vo(t)-+LP(t);return Math.round(n/Hm)+1}function Gc(e,t){var u,d,f,h;const n=ze(e),r=n.getFullYear(),o=Pr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(f=o.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=vn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=vn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function xk(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Gc(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),vn(s,t)}function Qm(e,t){const n=ze(e),r=+vn(n,t)-+xk(n,t);return Math.round(r/Hm)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},wo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return rr.y(e,t)},Y:function(e,t,n,r){const o=Gc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return $e(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):$e(s,t.length)},R:function(e,t){const n=Um(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return $e(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return $e(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return rr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return $e(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Qm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=Xm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=wk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return $e(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return $e(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return $e(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=wo.noon:r===0?o=wo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=wo.evening:r>=12?o=wo.afternoon:r>=4?o=wo.morning:o=wo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tg(r);case"XXXX":case"XX":return kr(r);case"XXXXX":case"XXX":default:return kr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tg(r);case"xxxx":case"xx":return kr(r);case"xxxxx":case"xxx":default:return kr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eg(r,":");case"OOOO":default:return"GMT"+kr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eg(r,":");case"zzzz":default:return"GMT"+kr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function eg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+$e(s,2)}function tg(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):kr(e,t)}function kr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),s=$e(r%60,2);return n+o+t+s}const ng=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},rg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Yc={p:rg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ng(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",ng(r,t)).replace("{{time}}",rg(o,t))}},Sk=/^D+$/,Tk=/^Y+$/,Ek=["D","DD","YY","YYYY"];function og(e){return Sk.test(e)}function sg(e){return Tk.test(e)}function qc(e,t,n){const r=Ck(e,t,n);if(console.warn(r),Ek.includes(e))throw new RangeError(r)}function Ck(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Pk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ok=/^'([^]*?)'?$/,_k=/''/g,Ak=/[a-zA-Z]/;function Ik(e,t,n){var u,d,f,h;const r=Pr(),o=r.locale??Zm,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=ze(e);if(!jP(a))throw new RangeError("Invalid time value");let l=t.match(kk).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Yc[m];return y(p,o.formatLong)}return p}).join("").match(Pk).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Dk(p)};if(Jm[m])return{isToken:!0,value:p};if(m.match(Ak))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(sg(m)||og(m))&&qc(m,t,String(e));const y=Jm[m[0]];return y(a,m,o.localize,c)}).join("")}function Dk(e){const t=e.match(Ok);return t?t[1].replace(_k,"'"):e}function Mk(){return Object.assign({},Pr())}function Nk(e){let n=ze(e).getDay();return n===0&&(n=7),n}function Fk(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Lk=10;class ig{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class Vk extends ig{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class $k extends ig{constructor(){super(...arguments);ne(this,"priority",Lk);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,Fk(n,Date))}}class Ie{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new Vk(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class Rk extends Ie{constructor(){super(...arguments);ne(this,"priority",140);ne(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})||o.era(n,{width:"abbreviated"})||o.era(n,{width:"narrow"})}}set(n,r,o){return r.era=o,n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}const it={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},bn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function at(e,t){return e&&{value:t(e.value),rest:e.rest}}function Je(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*DP+s*IP+i*MP),rest:t.slice(n[0].length)}}function ag(e){return Je(it.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Je(it.singleDigit,t);case 2:return Je(it.twoDigits,t);case 3:return Je(it.threeDigits,t);case 4:return Je(it.fourDigits,t);default:return Je(new RegExp("^\\d{1,"+e+"}"),t)}}function ta(e,t){switch(e){case 1:return Je(it.singleDigitSigned,t);case 2:return Je(it.twoDigitsSigned,t);case 3:return Je(it.threeDigitsSigned,t);case 4:return Je(it.fourDigitsSigned,t);default:return Je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Kc(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function lg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function cg(e){return e%400===0||e%4===0&&e%100!==0}class jk extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return at(tt(4,n),s);case"yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=lg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class Bk extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return at(tt(4,n),s);case"Yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Gc(n,s);if(o.isTwoDigitYear){const l=lg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}}class zk extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ta(r==="R"?4:r.length,n)}set(n,r,o){const s=qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),vo(s)}}class Wk extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ta(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class Hk extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"Q":case"QQ":return tt(r.length,n);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})||o.quarter(n,{width:"abbreviated",context:"formatting"})||o.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Uk extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"q":case"qq":return tt(r.length,n);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})||o.quarter(n,{width:"abbreviated",context:"standalone"})||o.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,o){return n.setMonth((o-1)*3,1),n.setHours(0,0,0,0),n}}class Gk extends Ie{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return at(Je(it.month,n),s);case"MM":return at(tt(2,n),s);case"Mo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class Yk extends Ie{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return at(Je(it.month,n),s);case"LL":return at(tt(2,n),s);case"Lo":return at(o.ordinalNumber(n,{unit:"month"}),s);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function qk(e,t,n){const r=ze(e),o=Qm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class Kk extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Je(it.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return vn(qk(n,o,s),s)}}function Zk(e,t){const n=ze(e),r=Xm(n)-t;return n.setDate(n.getDate()-r*7),n}class Xk extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,o){switch(r){case"I":return Je(it.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return vo(Zk(n,o))}}const Qk=[31,28,31,30,31,30,31,31,30,31,30,31],Jk=[31,29,31,30,31,30,31,31,30,31,30,31];class eO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Je(it.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=cg(o),i=n.getMonth();return s?r>=1&&r<=Jk[i]:r>=1&&r<=Qk[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class tO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,o){switch(r){case"D":case"DD":return Je(it.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return cg(o)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,o){return n.setMonth(0,o),n.setHours(0,0,0,0),n}}function Zc(e,t,n){var d,f,h,p;const r=Pr(),o=(n==null?void 0:n.weekStartsOn)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=ze(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return yo(s,u)}class nO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Zc(n,o,s),n.setHours(0,0,0,0),n}}class rO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return at(tt(r.length,n),i);case"eo":return at(o.ordinalNumber(n,{unit:"day"}),i);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Zc(n,o,s),n.setHours(0,0,0,0),n}}class oO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return at(tt(r.length,n),i);case"co":return at(o.ordinalNumber(n,{unit:"day"}),i);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,s){return n=Zc(n,o,s),n.setHours(0,0,0,0),n}}function sO(e,t){const n=ze(e),r=Nk(n),o=t-r;return yo(n,o)}class iO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return at(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return at(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return at(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return at(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=sO(n,o),n.setHours(0,0,0,0),n}}class aO extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Kc(o),0,0,0),n}}class lO extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Kc(o),0,0,0),n}}class cO extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(n,{width:"wide",context:"formatting"})||o.dayPeriod(n,{width:"abbreviated",context:"formatting"})||o.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,o){return n.setHours(Kc(o),0,0,0),n}}class uO extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Je(it.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class dO extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Je(it.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class fO extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Je(it.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.getHours()>=12&&o<12?n.setHours(o+12,0,0,0):n.setHours(o,0,0,0),n}}class hO extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Je(it.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class pO extends Ie{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Je(it.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class mO extends Ie{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Je(it.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class gO extends Ie{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return at(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class yO extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return wn(bn.basicOptionalMinutes,n);case"XX":return wn(bn.basic,n);case"XXXX":return wn(bn.basicOptionalSeconds,n);case"XXXXX":return wn(bn.extendedOptionalSeconds,n);case"XXX":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class vO extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return wn(bn.basicOptionalMinutes,n);case"xx":return wn(bn.basic,n);case"xxxx":return wn(bn.basicOptionalSeconds,n);case"xxxxx":return wn(bn.extendedOptionalSeconds,n);case"xxx":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class bO extends Ie{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return ag(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class wO extends Ie{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return ag(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const xO={G:new Rk,y:new jk,Y:new Bk,R:new zk,u:new Wk,Q:new Hk,q:new Uk,M:new Gk,L:new Yk,w:new Kk,I:new Xk,d:new eO,D:new tO,E:new nO,e:new rO,c:new oO,i:new iO,a:new aO,b:new lO,B:new cO,h:new uO,H:new dO,K:new fO,k:new hO,m:new pO,s:new mO,S:new gO,X:new yO,x:new vO,t:new bO,T:new wO},SO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EO=/^'([^]*?)'?$/,CO=/''/g,PO=/\S/,kO=/[a-zA-Z]/;function OO(e,t,n,r){var m,y,v,b;const o=Mk(),s=o.locale??Zm,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?ze(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new $k],u=t.match(TO).map(g=>{const T=g[0];if(T in Yc){const S=Yc[T];return S(g,s.formatLong)}return g}).join("").match(SO),d=[];for(let g of u){sg(g)&&qc(g,t,e),og(g)&&qc(g,t,e);const T=g[0],S=xO[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const k=d.find(I=>E.includes(I.token)||I.token===T);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${g}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);d.push({token:T,fullToken:g});const C=S.run(e,g,s.match,l);if(!C)return qe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(kO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=_O(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&PO.test(e))return qe(n,NaN);const f=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,S)=>S.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,S)=>S.subPriority-T.subPriority)).map(g=>g[0]);let h=ze(n);if(isNaN(h.getTime()))return qe(n,NaN);const p={};for(const g of f){if(!g.validate(h,l))return qe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return qe(n,h)}function _O(e){return e.match(EO)[1].replace(CO,"'")}function AO(e,t){const n=ze(e),r=ze(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function IO(e){return $P(e,VP(e))}function DO(e,t){return yo(e,-t)}function ug(e,t){return Ji(e,-t)}function MO(e,t){return Gm(e,-t)}function NO(e,t){return Ym(e,-t)}const xo=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),na=w.createContext({}),ra=w.createContext(null),Xc=typeof document<"u",oa=Xc?w.useLayoutEffect:w.useEffect,dg=w.createContext({strict:!1}),sa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fg="data-"+sa("framerAppearId"),FO={skipAnimations:!1,useManualTiming:!1};function LO(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,d=!1)=>{const h=d&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const ia=["read","resolveKeyframes","update","preRender","render","postRender"],VO=40;function hg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=ia.reduce((v,b)=>(v[b]=LO(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,VO),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ia.reduce((v,b)=>{const g=i[b];return v[b]=(T,S=!1,E=!1)=>(n||p(),g.schedule(T,S,E)),v},{}),cancel:v=>{for(let b=0;b<ia.length;b++)i[ia[b]].cancel(v)},state:o,steps:i}}const{schedule:Qc,cancel:PL}=hg(queueMicrotask,!1);function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const pg=w.createContext({});let mg=!1;function $O(e,t,n,r,o){const{visualElement:s}=w.useContext(na),i=w.useContext(dg),a=w.useContext(ra),l=w.useContext(xo).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=w.useContext(pg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&jO(c.current,n,o,d),w.useInsertionEffect(()=>{u&&u.update(n,a)});const f=w.useRef(!!(n[fg]&&!window.HandoffComplete));return oa(()=>{u&&(u.updateFeatures(),Qc.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,mg||(mg=!0,queueMicrotask(RO))))}),u}function RO(){window.HandoffComplete=!0}function jO(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gg(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&So(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function gg(e){if(e)return e.options.allowProjection!==!1?e.projection:gg(e.parent)}function BO(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}function Os(e){return typeof e=="string"||Array.isArray(e)}function _s(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Jc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eu=["initial",...Jc];function aa(e){return _s(e.animate)||eu.some(t=>Os(e[t]))}function yg(e){return!!(aa(e)||e.variants)}function zO(e,t){if(aa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Os(n)?n:void 0,animate:Os(r)?r:void 0}}return e.inherit!==!1?t:{}}function WO(e){const{initial:t,animate:n}=zO(e,w.useContext(na));return w.useMemo(()=>({initial:t,animate:n}),[vg(t),vg(n)])}function vg(e){return Array.isArray(e)?e.join(" "):e}const bg={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"]},To={};for(const e in bg)To[e]={isEnabled:t=>bg[e].some(n=>!!t[n])};function HO(e){for(const t in e)To[t]={...To[t],...e[t]}}const As=w.createContext({}),UO=Symbol.for("motionComponentSymbol"),wt=e=>e;let Eo=wt,an=wt;process.env.NODE_ENV!=="production"&&(Eo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});function GO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&HO(e);function s(a,l){let c;const u={...w.useContext(xo),...a,layoutId:YO(a)},{isStatic:d}=u,f=WO(a),h=r(a,d);if(!d&&Xc){qO(u,e);const p=KO(u);c=p.MeasureLayout,f.visualElement=$O(o,h,u,t,p.ProjectionNode)}return x.jsxs(na.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,BO(h,f.visualElement,l),h,d,f.visualElement)]})}const i=w.forwardRef(s);return i[UO]=o,i}function YO({layoutId:e}){const t=w.useContext(As).id;return t&&e!==void 0?t+"-"+e:e}function qO(e,t){const n=w.useContext(dg).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Eo(!1,r):an(!1,r)}}function KO(e){const{drag:t,layout:n}=To;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ZO(e){function t(r,o={}){return GO(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const XO=["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 tu(e){return typeof e!="string"||e.includes("-")?!1:!!(XO.indexOf(e)>-1||/[A-Z]/u.test(e))}const la={};function QO(e){Object.assign(la,e)}const Is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(Is);function wg(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!la[e]||e==="opacity")}const xt=e=>!!(e&&e.getVelocity),JO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},e_=Is.length;function t_(e,t,n){let r="";for(let o=0;o<e_;o++){const s=Is[o];if(e[s]!==void 0){const i=JO[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const xg=e=>t=>typeof t=="string"&&t.startsWith(e),Sg=xg("--"),n_=xg("var(--"),nu=e=>n_(e)?r_.test(e.split("/*")[0].trim()):!1,r_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,o_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,sr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ds={...Co,transform:e=>sr(0,1,e)},ca={...Co,default:1},Ms=e=>Math.round(e*1e5)/1e5,ru=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,s_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,i_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ns(e){return typeof e=="string"}function a_(e){return e==null}const Fs=e=>({test:t=>Ns(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=Fs("deg"),xn=Fs("%"),de=Fs("px"),l_=Fs("vh"),c_=Fs("vw"),Tg={...xn,parse:e=>xn.parse(e)/100,transform:e=>xn.transform(e*100)},Eg={...Co,transform:Math.round},Cg={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,size:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,rotate:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:ca,scaleX:ca,scaleY:ca,scaleZ:ca,skew:ir,skewX:ir,skewY:ir,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:Ds,originX:Tg,originY:Tg,originZ:de,zIndex:Eg,backgroundPositionX:de,backgroundPositionY:de,fillOpacity:Ds,strokeOpacity:Ds,numOctaves:Eg};function ou(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const d=t[u];if(Sg(u)){o[u]=d;continue}const f=Cg[u],h=o_(d,f);if(or.has(u)){if(a=!0,s[u]=h,!c)continue;d!==(f.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=t_(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${u} ${d} ${f}`}}const su=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pg(e,t,n){for(const r in t)!xt(t[r])&&!wg(r,n)&&(e[r]=t[r])}function u_({transformTemplate:e},t){return w.useMemo(()=>{const n=su();return ou(n,t,e),Object.assign({},n.vars,n.style)},[t])}function d_(e,t){const n=e.style||{},r={};return Pg(r,n,e),Object.assign(r,u_(e,t)),r}function f_(e,t){const n={},r=d_(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const h_=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 ua(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||h_.has(e)}let kg=e=>!ua(e);function Og(e){e&&(kg=t=>t.startsWith("on")?!ua(t):e(t))}try{Og(require("@emotion/is-prop-valid").default)}catch{}function p_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(kg(o)||n===!0&&ua(o)||!t&&!ua(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function _g(e,t,n){return typeof e=="string"?e:de.transform(t+n*e)}function m_(e,t,n){const r=_g(t,e.x,e.width),o=_g(n,e.y,e.height);return`${r} ${o}`}const g_={offset:"stroke-dashoffset",array:"stroke-dasharray"},y_={offset:"strokeDashoffset",array:"strokeDasharray"};function v_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?g_:y_;e[s.offset]=de.transform(-r);const i=de.transform(t),a=de.transform(n);e[s.array]=`${i} ${a}`}function iu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(ou(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=m_(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&v_(f,i,a,l,!1)}const Ag=()=>({...su(),attrs:{}}),au=e=>typeof e=="string"&&e.toLowerCase()==="svg";function b_(e,t,n,r){const o=w.useMemo(()=>{const s=Ag();return iu(s,t,au(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Pg(s,e.style,e),o.style={...s,...o.style}}return o}function w_(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(tu(n)?b_:f_)(r,s,i,n),c=p_(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=w.useMemo(()=>xt(d)?d.get():d,[d]);return w.createElement(n,{...u,children:f})}}function Ig(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Dg=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 Mg(e,t,n,r){Ig(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dg.has(o)?o:sa(o),t.attrs[o])}function lu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(xt(o[i])||t.style&&xt(t.style[i])||wg(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Ng(e,t,n){const r=lu(e,t,n);for(const o in e)if(xt(e[o])||xt(t[o])){const s=Is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Fg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function cu(e,t,n,r){if(typeof t=="function"){const[o,s]=Fg(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Fg(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function ar(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const uu=e=>Array.isArray(e),x_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),S_=e=>uu(e)?e[e.length-1]||0:e;function da(e){const t=xt(e)?e.get():e;return x_(t)?t.toValue():t}const Lg=new Set(["opacity","clipPath","filter","transform"]);function Vg(e){if(or.has(e))return"transform";if(Lg.has(e))return sa(e)}function fa(e,t){e.indexOf(t)===-1&&e.push(t)}function ha(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function T_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function E_({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:P_(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const $g=e=>(t,n)=>{const r=w.useContext(na),o=w.useContext(ra),s=()=>E_(e,t,r,o,n);return n?s():ar(s)};function C_(e,t){const n=Vg(t);n&&fa(e,n)}function Rg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=cu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function P_(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=da(c[y]);let{initial:u,animate:d}=e;const f=aa(e),h=yg(e);t&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!_s(m)&&Rg(e,m,(y,v)=>{for(const b in y){let g=y[b];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(i[b]=g)}for(const b in v)i[b]=v[b]}),l&&(d&&u!==!1&&!_s(d)&&Rg(e,d,y=>{for(const v in y)C_(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:De,cancel:Sn,state:St,steps:du}=hg(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0),k_={useVisualState:$g({scrapeMotionValuesFromProps:Ng,createRenderState:Ag,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{iu(n,r,au(t.tagName),e.transformTemplate),Mg(t,n)})}})},O_={useVisualState:$g({applyWillChange:!0,scrapeMotionValuesFromProps:lu,createRenderState:su})};function __(e,{forwardMotionProps:t=!1},n,r){return{...tu(e)?k_:O_,preloadedFeatures:n,useRender:w_(t),createVisualElement:r,Component:e}}function An(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const jg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pa(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const A_=e=>t=>jg(t)&&e(t,pa(t));function In(e,t,n,r){return An(e,t,A_(n),r)}const I_=(e,t)=>n=>t(e(n)),Dn=(...e)=>e.reduce(I_);function Bg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zg=Bg("dragHorizontal"),Wg=Bg("dragVertical");function Hg(e){let t=!1;if(e==="y")t=Wg();else if(e==="x")t=zg();else{const n=zg(),r=Wg();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Ug(){const e=Hg(!0);return e?(e(),!1):!0}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Gg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Ug())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class D_ extends lr{mount(){this.unmount=Dn(Gg(this.node,!0),Gg(this.node,!1))}unmount(){}}class M_ extends lr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Dn(An(this.node.current,"focus",()=>this.onFocus()),An(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Yg=(e,t)=>t?e===t?!0:Yg(e,t.parentElement):!1;function fu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,pa(n))}class N_ extends lr{constructor(){super(...arguments),this.removeStartListeners=wt,this.removeEndListeners=wt,this.removeAccessibleListeners=wt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),f=!d&&!Yg(this.node.current,a.target)?u:c;f&&De.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Dn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||fu("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=An(this.node.current,"keyup",i),fu("down",(a,l)=>{this.startPress(a,l)})},n=An(this.node.current,"keydown",t),r=()=>{this.isPressing&&fu("cancel",(s,i)=>this.cancelPress(s,i))},o=An(this.node.current,"blur",r);this.removeAccessibleListeners=Dn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ug()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=An(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Dn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const hu=new WeakMap,pu=new WeakMap,F_=e=>{const t=hu.get(e.target);t&&t(e)},L_=e=>{e.forEach(F_)};function V_({root:e,...t}){const n=e||document;pu.has(n)||pu.set(n,{});const r=pu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(L_,{root:e,...t})),r[o]}function $_(e,t,n){const r=V_(t);return hu.set(e,n),r.observe(e),()=>{hu.delete(e),r.unobserve(e)}}const R_={some:0,all:1};class j_ extends lr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:R_[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return $_(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(B_(t,n))&&this.startObserver()}unmount(){}}function B_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const z_={inView:{Feature:j_},tap:{Feature:N_},focus:{Feature:M_},hover:{Feature:D_}};function qg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ma(e,t,n){const r=e.getProps();return cu(r,t,n!==void 0?n:r.custom,e)}const Mn=e=>e*1e3,Nn=e=>e/1e3,W_={type:"spring",stiffness:500,damping:25,restSpeed:10},H_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),U_={type:"keyframes",duration:.8},G_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Y_=(e,{keyframes:t})=>t.length>2?U_:or.has(e)?e.startsWith("scale")?H_(t[1]):W_:G_;function q_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function mu(e,t){return e[t]||e.default||e}const K_=e=>e!==null;function ga(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(K_),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ya;function Z_(){ya=void 0}const cr={now:()=>(ya===void 0&&cr.set(St.isProcessing||FO.useManualTiming?St.timestamp:performance.now()),ya),set:e=>{ya=e,queueMicrotask(Z_)}},Kg=e=>/^0[^.\s]+$/u.test(e);function X_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Kg(e):!0}const Zg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Q_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function J_(e){const t=Q_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const eA=4;function Xg(e,t,n=1){an(n<=eA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=J_(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Zg(i)?parseFloat(i):i}return nu(o)?Xg(o,t,n+1):o}const tA=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Qg=e=>e===Co||e===de,Jg=(e,t)=>parseFloat(e.split(", ")[t]),ey=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Jg(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Jg(s[1],e):0}},nA=new Set(["x","y","z"]),rA=Is.filter(e=>!nA.has(e));function oA(e){const t=[];return rA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Po={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ey(4,13),y:ey(5,14)};Po.translateX=Po.x,Po.translateY=Po.y;const ty=e=>t=>t.test(e),ny=[Co,de,xn,ir,c_,l_,{test:e=>e==="auto",parse:e=>e}],ry=e=>ny.find(ty(e)),Or=new Set;let gu=!1,yu=!1;function oy(){if(yu){const e=Array.from(Or).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=oA(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}yu=!1,gu=!1,Or.forEach(e=>e.complete()),Or.clear()}function sy(){Or.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yu=!0)})}function sA(){sy(),oy()}class vu{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Or.add(this),gu||(gu=!0,De.read(sy),De.resolveKeyframes(oy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Or.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Or.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const bu=(e,t)=>n=>!!(Ns(n)&&i_.test(n)&&n.startsWith(e)||t&&!a_(n)&&Object.prototype.hasOwnProperty.call(n,t)),iy=(e,t,n)=>r=>{if(!Ns(r))return r;const[o,s,i,a]=r.match(ru);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},iA=e=>sr(0,255,e),wu={...Co,transform:e=>Math.round(iA(e))},_r={test:bu("rgb","red"),parse:iy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wu.transform(e)+", "+wu.transform(t)+", "+wu.transform(n)+", "+Ms(Ds.transform(r))+")"};function aA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const xu={test:bu("#"),parse:aA,transform:_r.transform},ko={test:bu("hsl","hue"),parse:iy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xn.transform(Ms(t))+", "+xn.transform(Ms(n))+", "+Ms(Ds.transform(r))+")"},_t={test:e=>_r.test(e)||xu.test(e)||ko.test(e),parse:e=>_r.test(e)?_r.parse(e):ko.test(e)?ko.parse(e):xu.parse(e),transform:e=>Ns(e)?e:e.hasOwnProperty("red")?_r.transform(e):ko.transform(e)};function lA(e){var t,n;return isNaN(e)&&Ns(e)&&(((t=e.match(ru))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(s_))===null||n===void 0?void 0:n.length)||0)>0}const ay="number",ly="color",cA="var",uA="var(",cy="${}",dA=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(dA,l=>(_t.test(l)?(r.color.push(s),o.push(ly),n.push(_t.parse(l))):l.startsWith(uA)?(r.var.push(s),o.push(cA),n.push(l)):(r.number.push(s),o.push(ay),n.push(parseFloat(l))),++s,cy)).split(cy);return{values:n,split:a,indexes:r,types:o}}function uy(e){return Ls(e).values}function dy(e){const{split:t,types:n}=Ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===ay?s+=Ms(o[i]):a===ly?s+=_t.transform(o[i]):s+=o[i]}return s}}const fA=e=>typeof e=="number"?0:e;function hA(e){const t=uy(e);return dy(e)(t.map(fA))}const ur={test:lA,parse:uy,createTransformer:dy,getAnimatableNone:hA},pA=new Set(["brightness","contrast","saturate","opacity"]);function mA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ru)||[];if(!r)return e;const o=n.replace(r,"");let s=pA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const gA=/\b([a-z-]*)\(.*?\)/gu,Su={...ur,getAnimatableNone:e=>{const t=e.match(gA);return t?t.map(mA).join(" "):e}},yA={...Cg,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Su,WebkitFilter:Su},Tu=e=>yA[e];function fy(e,t){let n=Tu(e);return n!==Su&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vA=new Set(["auto","none","0"]);function bA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!vA.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=fy(n,o)}class hy extends vu{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),nu(c))){const u=Xg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!tA.has(r)||t.length!==2)return;const[o,s]=t,i=ry(o),a=ry(s);if(i!==a)if(Qg(i)&&Qg(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)X_(t[o])&&r.push(o);r.length&&bA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Po[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Po[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function py(e){let t;return()=>(t===void 0&&(t=e()),t)}const my=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function wA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function xA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=my(o,t),a=my(s,t);return Eo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:wA(e)||n==="spring"&&r}class gy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&sA(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!xA(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ga(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function yy(e,t){return t?e*(1e3/t):0}const SA=5;function vy(e,t,n){const r=Math.max(t-SA,0);return yy(n-e(r),t-r)}const Eu=.001,TA=.01,by=10,EA=.05,CA=1;function PA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Eo(e<=Mn(by),"Spring duration must be 10 seconds or less");let i=1-t;i=sr(EA,CA,i),e=sr(TA,by,Nn(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Cu(c,i),p=Math.exp(-d);return Eu-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Cu(Math.pow(c,2),i);return(-o(c)+Eu>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Eu+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=OA(o,s,a);if(e=Mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const kA=12;function OA(e,t,n){let r=n;for(let o=1;o<kA;o++)r=r-e(r)/t(r);return r}function Cu(e,t){return e*Math.sqrt(1-t*t)}const _A=["duration","bounce"],AA=["stiffness","damping","mass"];function wy(e,t){return t.some(n=>e[n]!==void 0)}function IA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!wy(e,AA)&&wy(e,_A)){const n=PA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function xy({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=IA({...r,velocity:-Nn(r.velocity||0)}),h=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Nn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let b;if(p<1){const g=Cu(y,p);b=T=>{const S=Math.exp(-p*y*T);return s-S*((h+p*y*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)b=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=T=>{const S=Math.exp(-p*y*T),E=Math.min(g*T,300);return s-S*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:f&&u||null,next:g=>{const T=b(g);if(f)i.done=g>=u;else{let S=h;g!==0&&(p<1?S=vy(b,g,T):S=0);const E=Math.abs(S)<=n,C=Math.abs(s-T)<=t;i.done=E&&C}return i.value=i.done?s:T,i}}}function Sy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=k=>a!==void 0&&k<a||l!==void 0&&k>l,p=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const y=d+m,v=i===void 0?y:i(y);v!==y&&(m=v-d);const b=k=>-m*Math.exp(-k/r),g=k=>v+b(k),T=k=>{const I=b(k),N=g(k);f.done=Math.abs(I)<=c,f.value=f.done?v:N};let S,E;const C=k=>{h(f.value)&&(S=k,E=xy({keyframes:[f.value,p(f.value)],velocity:vy(g,k,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:k=>{let I=!1;return!E&&S===void 0&&(I=!0,T(k),C(k)),S!==void 0&&k>=S?E.next(k-S):(!I&&T(k),f)}}}const Ty=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,DA=1e-7,MA=12;function NA(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Ty(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>DA&&++a<MA);return i}function Vs(e,t,n,r){if(e===t&&n===r)return wt;const o=s=>NA(s,0,1,e,n);return s=>s===0||s===1?s:Ty(o(s),t,r)}const FA=Vs(.42,0,1,1),LA=Vs(0,0,.58,1),Ey=Vs(.42,0,.58,1),VA=e=>Array.isArray(e)&&typeof e[0]!="number",Cy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Py=e=>t=>1-e(1-t),Pu=e=>1-Math.sin(Math.acos(e)),ky=Py(Pu),$A=Cy(Pu),Oy=Vs(.33,1.53,.69,.99),ku=Py(Oy),RA=Cy(ku),_y={linear:wt,easeIn:FA,easeInOut:Ey,easeOut:LA,circIn:Pu,circInOut:$A,circOut:ky,backIn:ku,backInOut:RA,backOut:Oy,anticipate:e=>(e*=2)<1?.5*ku(e):.5*(2-Math.pow(2,-10*(e-1)))},Ay=e=>{if(Array.isArray(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return an(_y[e]!==void 0,`Invalid easing type '${e}'`),_y[e];return e},$s=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function Ou(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ou(l,a,e+1/3),s=Ou(l,a,e),i=Ou(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function va(e,t){return n=>n>0?t:e}const _u=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},BA=[xu,_r,ko],zA=e=>BA.find(t=>t.test(e));function Iy(e){const t=zA(e);if(Eo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ko&&(n=jA(n)),n}const Dy=(e,t)=>{const n=Iy(e),r=Iy(t);if(!n||!r)return va(e,t);const o={...n};return s=>(o.red=_u(n.red,r.red,s),o.green=_u(n.green,r.green,s),o.blue=_u(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),_r.transform(o))},Au=new Set(["none","hidden"]);function WA(e,t){return Au.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function HA(e,t){return n=>Ze(e,t,n)}function Iu(e){return typeof e=="number"?HA:typeof e=="string"?nu(e)?va:_t.test(e)?Dy:YA:Array.isArray(e)?My:typeof e=="object"?_t.test(e)?Dy:UA:va}function My(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Iu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function UA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Iu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function GA(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const YA=(e,t)=>{const n=ur.createTransformer(t),r=Ls(e),o=Ls(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Au.has(e)&&!o.values.length||Au.has(t)&&!r.values.length?WA(e,t):Dn(My(GA(r,o),o.values),n):(Eo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),va(e,t))};function Ny(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):Iu(e)(e,t)}function qA(e,t,n){const r=[],o=n||Ny,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||wt:t;a=Dn(l,a)}r.push(a)}return r}function Fy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(an(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=qA(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=$s(e[u],e[u+1],c);return i[u](d)};return n?c=>l(sr(e[0],e[s-1],c)):l}function KA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=$s(0,t,r);e.push(Ze(n,1,o))}}function ZA(e){const t=[0];return KA(t,e.length-1),t}function XA(e,t){return e.map(n=>n*t)}function QA(e,t){return e.map(()=>t||Ey).splice(0,e.length-1)}function ba({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=VA(r)?r.map(Ay):Ay(r),s={done:!1,value:t[0]},i=XA(n&&n.length===t.length?n:ZA(t),e),a=Fy(i,t,{ease:Array.isArray(o)?o:QA(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ly=2e4;function JA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ly;)t+=n,r=e.next(t);return t>=Ly?1/0:t}const eI=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>Sn(t),now:()=>St.isProcessing?St.timestamp:cr.now()}},tI={decay:Sy,inertia:Sy,tween:ba,keyframes:ba,spring:xy},nI=e=>e/100;class Du extends gy{constructor({KeyframeResolver:t=vu,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=tI[n]||ba;let l,c;a!==ba&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&an(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Dn(nI,Ny(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=JA(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const k=Math.min(this.currentTime,u)/d;let I=Math.floor(k),N=k%1;!N&&k>=1&&(N=1),N===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/d)):p==="mirror"&&(T=i)),g=sr(0,1,N)*d}const S=b?{done:!1,value:l[0]}:T.next(g);a&&(S.value=a(S.value));let{done:E}=S;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(S.value=ga(l,this.options,o)),y&&y(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Nn(t.calculatedDuration):0}get time(){return Nn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Nn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=eI,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Vy=e=>Array.isArray(e)&&typeof e[0]=="number";function $y(e){return!!(!e||typeof e=="string"&&e in Mu||Vy(e)||Array.isArray(e)&&e.every($y))}const Rs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rs([0,.65,.55,1]),circOut:Rs([.55,0,1,.45]),backIn:Rs([.31,.01,.66,-.59]),backOut:Rs([.33,1.53,.69,.99])};function rI(e){return Ry(e)||Mu.easeOut}function Ry(e){if(e)return Vy(e)?Rs(e):Array.isArray(e)?e.map(rI):Mu[e]}function oI(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ry(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const sI=py(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wa=10,iI=2e4;function aI(e){return e.type==="spring"||!$y(e.ease)}function lI(e,t){const n=new Du({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<iI;)r=n.sample(s),o.push(r.value),s+=wa;return{times:void 0,keyframes:o,duration:s-wa,ease:"linear"}}class jy extends gy{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new hy(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(aI(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...p}=this.options,m=lI(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=oI(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=cr.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(ga(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Nn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Nn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return wt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,...f}=this.options,h=new Du({...f,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=Mn(this.time);c.setWithVelocity(h.sample(p-wa).value,h.sample(p).value,wa)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;return sI()&&r&&Lg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function cI(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return De.update(r,!0),()=>Sn(r)}const uI=py(()=>window.ScrollTimeline!==void 0);class dI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(uI()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),cI(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Nu=(e,t,n,r={},o,s,i)=>a=>{const l=mu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Mn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};q_(l)||(d={...d,...Y_(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=ga(d.keyframes,l);if(h!==void 0)return De.update(()=>{d.onUpdate(h),d.onComplete()}),new dI([])}return!s&&jy.supports(d)?new jy(d):new Du(d)};class Fu{constructor(){this.subscriptions=[]}add(t){return fa(this.subscriptions,t),()=>ha(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const By=new Set;function Lu(e,t,n){e||By.has(t)||(console.warn(t),By.add(t))}const zy=30,fI=e=>!isNaN(parseFloat(e)),js={current:void 0};class Wy{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=cr.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Lu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fu);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return js.current&&js.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zy);return yy(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Oo(e,t){return new Wy(e,t)}function hI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Oo(n))}function pI(e,t){const n=ma(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=S_(s[i]);hI(e,i,a)}}function Hy(e){return e.getProps()[fg]}class mI extends Wy{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Vg(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(ha(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function gI(e){return!!(xt(e)&&e.add)}function Vu(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new mI("auto"),e.addValue("willChange",r)),gI(r))return r.add(t)}function yI({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Uy(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&yI(u,d))continue;const p={delay:n,elapsed:0,...mu(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const v=Hy(e);if(v){const b=window.HandoffAppearAnimations(v,d,f,De);b!==null&&(p.elapsed=b,m=!0)}}f.start(Nu(d,f,h,e.shouldReduceMotion&&or.has(d)?{type:!1}:p,e,m,Vu(e,d)));const y=f.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&pI(e,a)})}),c}function $u(e,t,n={}){var r;const o=ma(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Uy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return vI(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function vI(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(bI).forEach((c,u)=>{c.notify("AnimationStart",t),i.push($u(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function bI(e,t){return e.sortNodePosition(t)}function wI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>$u(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=$u(e,t,n);else{const o=typeof t=="function"?ma(e,t,n.custom):t;r=Promise.all(Uy(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const xI=[...Jc].reverse(),SI=Jc.length;function TI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wI(e,n,r)))}function EI(e){let t=TI(e),n=Gy(),r=!0;const o=l=>(c,u)=>{var d;const f=ma(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<SI;y++){const v=xI[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],T=Os(g),S=v===l?b.isActive:null;S===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&S===null||!g&&!b.prevProp||_s(g)||typeof g=="boolean")continue;let k=CI(b.prevProp,g)||v===l&&b.isActive&&!E&&T||y>p&&T,I=!1;const N=Array.isArray(g)?g:[g];let L=N.reduce(o(v),{});S===!1&&(L={});const{prevResolvedValues:O={}}=b,j={...O,...L},D=_=>{k=!0,f.has(_)&&(I=!0,f.delete(_)),b.needsAnimating[_]=!0;const F=e.getValue(_);F&&(F.liveStyle=!1)};for(const _ in j){const F=L[_],$=O[_];if(h.hasOwnProperty(_))continue;let z=!1;uu(F)&&uu($)?z=!qg(F,$):z=F!==$,z?F!=null?D(_):f.add(_):F!==void 0&&f.has(_)?D(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(k=!1),k&&(!E||I)&&d.push(...N.map(_=>({animation:_,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const b=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),d.push({animation:y})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Gy(),r=!0}}}function CI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qg(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gy(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class PI extends lr{constructor(t){super(t),t.animationState||(t.animationState=EI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_s(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let kI=0;class OI extends lr{constructor(){super(...arguments),this.id=kI++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const _I={animation:{Feature:PI},exit:{Feature:OI}},Yy=(e,t)=>Math.abs(e-t);function AI(e,t){const n=Yy(e.x,t.x),r=Yy(e.y,t.y);return Math.sqrt(n**2+r**2)}class qy{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ju(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=AI(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=St;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ru(f,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ju(d.type==="pointercancel"?this.lastMoveEventInfo:Ru(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,y),p&&p(d,y)},!jg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=pa(t),a=Ru(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=St;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,ju(a,this.history)),this.removeListeners=Dn(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Sn(this.updatePoint)}}function Ru(e,t){return t?{point:t(e.point)}:e}function Ky(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ju({point:e},t){return{point:e,delta:Ky(e,Zy(t)),offset:Ky(e,II(t)),velocity:DI(t,.1)}}function II(e){return e[0]}function Zy(e){return e[e.length-1]}function DI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Zy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const s=Nn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Xy=1e-4,MI=1-Xy,NI=1+Xy,Qy=.01,FI=0-Qy,LI=0+Qy;function Kt(e){return e.max-e.min}function VI(e,t,n){return Math.abs(e-t)<=n}function Jy(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Kt(n)/Kt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=MI&&e.scale<=NI||isNaN(e.scale))&&(e.scale=1),(e.translate>=FI&&e.translate<=LI||isNaN(e.translate))&&(e.translate=0)}function Bs(e,t,n,r){Jy(e.x,t.x,n.x,r?r.originX:void 0),Jy(e.y,t.y,n.y,r?r.originY:void 0)}function ev(e,t,n){e.min=n.min+t.min,e.max=e.min+Kt(t)}function $I(e,t,n){ev(e.x,t.x,n.x),ev(e.y,t.y,n.y)}function tv(e,t,n){e.min=t.min-n.min,e.max=e.min+Kt(t)}function zs(e,t,n){tv(e.x,t.x,n.x),tv(e.y,t.y,n.y)}function RI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function nv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function jI(e,{top:t,left:n,bottom:r,right:o}){return{x:nv(e.x,n,o),y:nv(e.y,t,r)}}function rv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function BI(e,t){return{x:rv(e.x,t.x),y:rv(e.y,t.y)}}function zI(e,t){let n=.5;const r=Kt(e),o=Kt(t);return o>r?n=$s(t.min,t.max-r,e.min):r>o&&(n=$s(e.min,e.max-o,t.min)),sr(0,1,n)}function WI(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Bu=.35;function HI(e=Bu){return e===!1?e=0:e===!0&&(e=Bu),{x:ov(e,"left","right"),y:ov(e,"top","bottom")}}function ov(e,t,n){return{min:sv(e,t),max:sv(e,n)}}function sv(e,t){return typeof e=="number"?e:e[t]||0}const iv=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:iv(),y:iv()}),av=()=>({min:0,max:0}),lt=()=>({x:av(),y:av()});function Xt(e){return[e("x"),e("y")]}function lv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function UI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function GI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function zu(e){return e===void 0||e===1}function Wu({scale:e,scaleX:t,scaleY:n}){return!zu(e)||!zu(t)||!zu(n)}function Ir(e){return Wu(e)||cv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cv(e){return uv(e.x)||uv(e.y)}function uv(e){return e&&e!=="0%"}function xa(e,t,n){const r=e-n,o=t*r;return n+o}function dv(e,t,n,r,o){return o!==void 0&&(e=xa(e,o,r)),xa(e,n,r)+t}function Hu(e,t=0,n=1,r,o){e.min=dv(e.min,t,n,r,o),e.max=dv(e.max,t,n,r,o)}function fv(e,{x:t,y:n}){Hu(e.x,t.translate,t.scale,t.originPoint),Hu(e.y,n.translate,n.scale,n.originPoint)}const hv=.999999999999,pv=1.0000000000001;function YI(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,fv(e,i)),r&&Ir(s.latestValues)&&Ao(e,s.latestValues))}t.x<pv&&t.x>hv&&(t.x=1),t.y<pv&&t.y>hv&&(t.y=1)}function dr(e,t){e.min=e.min+t,e.max=e.max+t}function mv(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);Hu(e,t,n,s,r)}function Ao(e,t){mv(e.x,t.x,t.scaleX,t.scale,t.originX),mv(e.y,t.y,t.scaleY,t.scale,t.originY)}function gv(e,t){return lv(GI(e.getBoundingClientRect(),t))}function qI(e,t,n){const r=gv(e,n),{scroll:o}=t;return o&&(dr(r.x,o.offset.x),dr(r.y,o.offset.y)),r}const yv=({current:e})=>e?e.ownerDocument.defaultView:null,KI=new WeakMap;class ZI{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(pa(u,"page").point)},s=(u,d)=>{var f;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Hg(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),Xt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(xn.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[v];T&&(b=Kt(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&De.postRender(()=>m(u,d)),(f=this.removeWillChange)===null||f===void 0||f.call(this),this.removeWillChange=Vu(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=d;if(h&&this.currentDirection===null){this.currentDirection=XI(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Xt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qy(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:yv(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&De.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Sa(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=RI(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=jI(o.layoutBox,n):this.constraints=!1,this.elastic=HI(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=WI(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(t))return!1;const r=t.current;an(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=qI(r,o.root,this.visualElement.getTransformPagePoint());let i=BI(o.layout.layoutBox,s);if(n){const a=n(UI(i));this.hasMutatedConstraints=!!a,a&&(i=lv(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!Sa(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Nu(t,r,0,n,this.visualElement,!1,Vu(this.visualElement,t)))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xt(n=>{const{drag:r}=this.getProps();if(!Sa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=zI({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xt(i=>{if(!Sa(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;KI.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();So(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const i=An(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Bu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Sa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function XI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class QI extends lr{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new ZI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const vv=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class JI extends lr{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new qy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:vv(t),onStart:vv(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&De.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function eD(){const e=w.useContext(ra);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function bv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ws={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=bv(e,t.target.x),r=bv(e,t.target.y);return`${n}% ${r}%`}},tD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const s=ur.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class nD extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;QO(rD),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||De.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wv(e){const[t,n]=eD(),r=w.useContext(As);return x.jsx(nD,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(pg),isPresent:t,safeToRemove:n})}const rD={borderRadius:{...Ws,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ws,borderTopRightRadius:Ws,borderBottomLeftRadius:Ws,borderBottomRightRadius:Ws,boxShadow:tD},xv=["TopLeft","TopRight","BottomLeft","BottomRight"],oD=xv.length,Sv=e=>typeof e=="string"?parseFloat(e):e,Tv=e=>typeof e=="number"||de.test(e);function sD(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,iD(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,aD(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<oD;i++){const a=`border${xv[i]}Radius`;let l=Ev(t,a),c=Ev(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Tv(l)===Tv(c)?(e[a]=Math.max(Ze(Sv(l),Sv(c),r),0),(xn.test(c)||xn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Ev(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const iD=Cv(0,.5,ky),aD=Cv(.5,.95,wt);function Cv(e,t,n){return r=>r<e?0:r>t?1:n($s(e,t,r))}function Pv(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){Pv(e.x,t.x),Pv(e.y,t.y)}function kv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ov(e,t,n,r,o){return e-=t,e=xa(e,1/n,r),o!==void 0&&(e=xa(e,1/o,r)),e}function lD(e,t=0,n=1,r=.5,o,s=e,i=e){if(xn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=Ov(e.min,t,n,a,o),e.max=Ov(e.max,t,n,a,o)}function _v(e,t,[n,r,o],s,i){lD(e,t[n],t[r],t[o],t.scale,s,i)}const cD=["x","scaleX","originX"],uD=["y","scaleY","originY"];function Av(e,t,n,r){_v(e.x,t,cD,n?n.x:void 0,r?r.x:void 0),_v(e.y,t,uD,n?n.y:void 0,r?r.y:void 0)}function Iv(e){return e.translate===0&&e.scale===1}function Dv(e){return Iv(e.x)&&Iv(e.y)}function dD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Mv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Nv(e){return Kt(e.x)/Kt(e.y)}function Fv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class fD{constructor(){this.members=[]}add(t){fa(this.members,t),t.scheduleRender()}remove(t){if(ha(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hD(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const pD=(e,t)=>e.depth-t.depth;class mD{constructor(){this.children=[],this.isDirty=!1}add(t){fa(this.children,t),this.isDirty=!0}remove(t){ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pD),this.isDirty=!1,this.children.forEach(t)}}function gD(e,t){const n=cr.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Sn(r),e(s-t))};return De.read(r,!0),()=>Sn(r)}function yD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vD(e,t,n){const r=xt(e)?e:Oo(e);return r.start(Nu("",r,t,n)),r.animation}const Dr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Uu=["","X","Y","Z"],bD={visibility:"hidden"},Lv=1e3;let wD=0;function Gu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Hy(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Vv(e.parent):!1:!1}function $v({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=wD++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,window.MotionDebug&&(Dr.totalNodes=Dr.resolvedTargetDeltas=Dr.recalculatedProjection=0),this.nodes.forEach(TD),this.nodes.forEach(OD),this.nodes.forEach(_D),this.nodes.forEach(ED),window.MotionDebug&&window.MotionDebug.record(Dr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mD)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Fu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=yD(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=gD(f,250),Ta.hasAnimatedSinceResize&&(Ta.hasAnimatedSinceResize=!1,this.nodes.forEach(jv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ND,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Mv(this.targetLayout,p)||h,g=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,g);const T={...mu(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||jv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Sn(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(AD),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Vv(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Rv);return}this.isUpdating||this.nodes.forEach(PD),this.isUpdating=!1,this.nodes.forEach(kD),this.nodes.forEach(xD),this.nodes.forEach(SD),this.clearAllSnapshots();const a=cr.now();St.delta=sr(0,1e3/60,a-St.timestamp),St.timestamp=a,St.isProcessing=!0,du.update.process(St),du.preRender.process(St),du.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CD),this.sharedNodes.forEach(ID)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Dv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ir(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),FD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return lt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(dr(a.x,l.offset.x),dr(a.y,l.offset.y)),a}removeElementScroll(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Qt(a,i);const{scroll:f}=this.root;f&&(dr(a.x,-f.offset.x),dr(a.y,-f.offset.y))}dr(a.x,u.offset.x),dr(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=lt();Qt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ir(u.latestValues)&&Ao(l,u.latestValues)}return Ir(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ir(c.latestValues))continue;Wu(c.latestValues)&&c.updateSnapshot();const u=lt(),d=c.measurePageBox();Qt(u,d),Av(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ir(this.latestValues)&&Av(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=St.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$I(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),fv(this.target,this.targetDelta)):Qt(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=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Dr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Wu(this.parent.latestValues)||cv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===St.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Qt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;YI(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kv(this.prevProjectionDelta.x,this.projectionDelta.x),kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Bs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Fv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Dr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_o(),this.projectionDelta=_o(),this.projectionDeltaWithTransform=_o()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=_o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=lt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(MD));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const S=T/1e3;Bv(d.x,i.x,S),Bv(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),DD(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&dD(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=lt()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,sD(u,c,this.latestValues,S,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Sn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{Ta.hasAnimatedSinceResize=!0,this.currentAnimation=vD(0,Lv,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Lv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Gv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const d=Kt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Kt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Qt(a,l),Ao(a,u),Bs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new fD),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Gu("z",i,c,this.animationValues);for(let u=0;u<Uu.length;u++)Gu(`rotate${Uu[u]}`,i,c,this.animationValues),Gu(`skew${Uu[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return bD;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=da(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=da(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ir(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=hD(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in la){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=la[m],b=c.transform==="none"?f[m]:y(f[m],d);if(v){const g=v.length;for(let T=0;T<g;T++)c[v[T]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=d===this?da(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Rv),this.root.sharedNodes.clear()}}}function xD(e){e.updateLayout()}function SD(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Kt(f);f.min=r[d].min,f.max=f.min+h}):Gv(s,n.layoutBox,r)&&Xt(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Kt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=_o();Bs(a,r,n.layoutBox);const l=_o();i?Bs(l,e.applyTransform(o,!0),n.measuredBox):Bs(l,r,n.layoutBox);const c=!Dv(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=lt();zs(p,n.layoutBox,f.layoutBox);const m=lt();zs(m,r,h.layoutBox),Mv(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function TD(e){window.MotionDebug&&Dr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ED(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CD(e){e.clearSnapshot()}function Rv(e){e.clearMeasurements()}function PD(e){e.isLayoutDirty=!1}function kD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function OD(e){e.resolveTargetDelta()}function _D(e){e.calcProjection()}function AD(e){e.resetSkewAndRotation()}function ID(e){e.removeLeadSnapshot()}function Bv(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zv(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function DD(e,t,n,r){zv(e.x,t.x,n.x,r),zv(e.y,t.y,n.y,r)}function MD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ND={duration:.45,ease:[.4,0,.1,1]},Wv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hv=Wv("applewebkit/")&&!Wv("chrome/")?Math.round:wt;function Uv(e){e.min=Hv(e.min),e.max=Hv(e.max)}function FD(e){Uv(e.x),Uv(e.y)}function Gv(e,t,n){return e==="position"||e==="preserve-aspect"&&!VI(Nv(t),Nv(n),.2)}const LD=$v({attachResizeListener:(e,t)=>An(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Yu={current:void 0},Yv=$v({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Yu.current){const e=new LD({});e.mount(window),e.setOptions({layoutScroll:!0}),Yu.current=e}return Yu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),VD={pan:{Feature:JI},drag:{Feature:QI,ProjectionNode:Yv,MeasureLayout:wv}},qu={current:null},qv={current:!1};function $D(){if(qv.current=!0,!!Xc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qu.current=e.matches;e.addListener(t),t()}else qu.current=!1}function RD(e,t,n){for(const r in t){const o=t[r],s=n[r];if(xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Lu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(xt(s))e.addValue(r,Oo(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Oo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Kv=new WeakMap,jD=[...ny,_t,ur],BD=e=>jD.find(ty(e)),Zv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],zD=eu.length;class WD{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(f,h,p,m)=>new this.KeyframeResolver(f,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=aa(n),this.isVariantNode=yg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&xt(h)&&h.set(l[f],!1)}}mount(t){this.current=t,Kv.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qv.current||$D(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qu.current,process.env.NODE_ENV!=="production"&&Lu(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(){Kv.delete(this.current),this.projection&&this.projection.unmount(),Sn(this.notifyUpdate),Sn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=or.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in To){const n=To[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Zv.length;r++){const o=Zv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=RD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<zD;r++){const o=eu[r],s=this.props[o];(Os(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Oo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Zg(o)||Kg(o))?o=parseFloat(o):!BD(o)&&ur.test(n)&&(o=fy(t,n)),this.setBaseTarget(t,xt(o)?o.get():o)),xt(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=cu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!xt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Xv extends WD{constructor(){super(...arguments),this.KeyframeResolver=hy}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function HD(e){return window.getComputedStyle(e)}class UD extends Xv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Ig}readValueFromInstance(t,n){if(or.has(n)){const r=Tu(n);return r&&r.default||0}else{const r=HD(t),o=(Sg(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return gv(t,n)}build(t,n,r){ou(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class GD extends Xv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(or.has(n)){const r=Tu(n);return r&&r.default||0}return n=Dg.has(n)?n:sa(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ng(t,n,r)}build(t,n,r){iu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Mg(t,n,r,o)}mount(t){this.isSVGTag=au(t.tagName),super.mount(t)}}const YD=(e,t)=>tu(e)?new GD(t):new UD(t,{allowProjection:e!==w.Fragment}),qD={..._I,...z_,...VD,...{layout:{ProjectionNode:Yv,MeasureLayout:wv}}},Jt=ZO((e,t)=>__(e,t,qD,YD));function Qv(){const e=w.useRef(!1);return oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jv(){const e=Qv(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>De.postRender(r),[r]),t]}class KD extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function ZD({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(xo);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
131
146
|
[data-motion-pop-id="${n}"] {
|
|
132
147
|
position: absolute !important;
|
|
133
148
|
width: ${i}px !important;
|
|
@@ -135,7 +150,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
135
150
|
top: ${l}px !important;
|
|
136
151
|
left: ${c}px !important;
|
|
137
152
|
}
|
|
138
|
-
`),()=>{document.head.removeChild(u)}},[t]),
|
|
153
|
+
`),()=>{document.head.removeChild(u)}},[t]),x.jsx(KD,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Ku=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=ar(XD),l=w.useId(),c=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=x.jsx(ZD,{isPresent:n,children:e})),x.jsx(ra.Provider,{value:c,children:e})};function XD(){return new Map}function QD(e){return w.useEffect(()=>()=>e(),[])}const Mr=e=>e.key||"";function JD(e,t){e.forEach(n=>{const r=Mr(n);t.set(r,n)})}function eM(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Ea=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{an(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(As).forceRender||Jv()[0],l=Qv(),c=eM(e);let u=c;const d=w.useRef(new Map).current,f=w.useRef(u),h=w.useRef(new Map).current,p=w.useRef(!0);if(oa(()=>{p.current=!1,JD(c,h),f.current=u}),QD(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return x.jsx(x.Fragment,{children:u.map(b=>x.jsx(Ku,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:b},Mr(b)))});u=[...u];const m=f.current.map(Mr),y=c.map(Mr),v=m.length;for(let b=0;b<v;b++){const g=m[b];y.indexOf(g)===-1&&!d.has(g)&&d.set(g,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((b,g)=>{if(y.indexOf(g)!==-1)return;const T=h.get(g);if(!T)return;const S=m.indexOf(g);let E=b;if(!E){const C=()=>{d.delete(g);const k=Array.from(h.keys()).filter(I=>!y.includes(I));if(k.forEach(I=>h.delete(I)),f.current=c.filter(I=>{const N=Mr(I);return N===g||k.includes(N)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.jsx(Ku,{isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:s,mode:i,children:T},Mr(T)),d.set(g,E)}u.splice(S,0,E)}),u=u.map(b=>{const g=b.key;return d.has(g)?b:x.jsx(Ku,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:b},Mr(b))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x.jsx(x.Fragment,{children:d.size?u:u.map(b=>w.cloneElement(b))})};function tM({children:e,isValidProp:t,...n}){t&&Og(t),n={...w.useContext(xo),...n},n.isStatic=ar(()=>n.isStatic);const r=w.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return x.jsx(xo.Provider,{value:r,children:e})}const nM=w.createContext(null),rM=e=>!e.isLayoutDirty&&e.willUpdate(!1);function eb(){const e=new Set,t=new WeakMap,n=()=>e.forEach(rM);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const tb=e=>e===!0,oM=e=>tb(e===!0)||e==="id",sM=({children:e,id:t,inherit:n=!0})=>{const r=w.useContext(As),o=w.useContext(nM),[s,i]=Jv(),a=w.useRef(null),l=r.id||o;a.current===null&&(oM(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:tb(n)&&r.group||eb()});const c=w.useMemo(()=>({...a.current,forceRender:s}),[i]);return x.jsx(As.Provider,{value:c,children:e})},nb=w.createContext(null);function iM(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ze(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?T_(e,o,o+s):e}function aM({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=ar(()=>Jt(t)),l=[],c=w.useRef(!1);an(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,f)=>{const h=l.findIndex(p=>d===p.value);h!==-1?l[h].layout=f[n]:l.push({value:d,layout:f[n]}),l.sort(uM)},updateOrder:(d,f,h)=>{if(c.current)return;const p=iM(l,d,f,h);l!==p&&(c.current=!0,r(p.map(cM).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),x.jsx(a,{...s,ref:i,ignoreStrict:!0,children:x.jsx(nb.Provider,{value:u,children:e})})}const lM=w.forwardRef(aM);function cM(e){return e.value}function uM(e,t){return e.layout.min-t.layout.min}function Io(e){const t=ar(()=>Oo(e)),{isStatic:n}=w.useContext(xo);if(n){const[,r]=w.useState(e);w.useEffect(()=>t.on("change",r),[])}return t}const dM=e=>e&&typeof e=="object"&&e.mix,fM=e=>dM(e)?e.mix:void 0;function hM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Fy(o,s,{mixer:fM(s[0]),...i});return t?a(r):a}function rb(e,t){const n=Io(t()),r=()=>n.set(t());return r(),oa(()=>{const o=()=>De.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Sn(r)}}),n}function pM(e){js.current=[],e();const t=rb(js.current,e);return js.current=void 0,t}function mM(e,t,n,r){if(typeof e=="function")return pM(e);const o=typeof t=="function"?t:hM(t,n,r);return Array.isArray(e)?ob(e,o):ob([e],([s])=>o(s))}function ob(e,t){const n=ar(()=>[]);return rb(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function sb(e,t=0){return xt(e)?e:Io(t)}function gM({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=ar(()=>Jt(r)),c=w.useContext(nb),u={x:sb(t.x),y:sb(t.y)},d=mM([u.x,u.y],([m,y])=>m||y?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:f,registerItem:h,updateOrder:p}=c;return x.jsx(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,u[f].get(),v[f]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const yM=w.forwardRef(gM),Ca={Group:lM,Item:yM};class vM{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const bM=()=>new vM;function wM(){return ar(bM)}var Zu={},Xu={exports:{}},Qu={};/**
|
|
139
154
|
* @license React
|
|
140
155
|
* use-sync-external-store-shim.production.min.js
|
|
141
156
|
*
|
|
@@ -143,7 +158,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
143
158
|
*
|
|
144
159
|
* This source code is licensed under the MIT license found in the
|
|
145
160
|
* LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/var
|
|
161
|
+
*/var ib;function xM(){if(ib)return Qu;ib=1;var e=w;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,y=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&y({inst:m})},[d,h,f]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Qu.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Qu}var ab={};/**
|
|
147
162
|
* @license React
|
|
148
163
|
* use-sync-external-store-shim.development.js
|
|
149
164
|
*
|
|
@@ -151,7 +166,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
151
166
|
*
|
|
152
167
|
* This source code is licensed under the MIT license found in the
|
|
153
168
|
* LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/var
|
|
169
|
+
*/var lb;function SM(){return lb||(lb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",g,S)}}function r(g,T,S){{var E=t.ReactDebugCurrentFrame,C=E.getStackAddendum();C!==""&&(T+="%s",S=S.concat([C]));var k=S.map(function(I){return String(I)});k.unshift("Warning: "+T),Function.prototype.apply.call(console[g],console,k)}}function o(g,T){return g===T&&(g!==0||1/g===1/T)||g!==g&&T!==T}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(g,T,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=T();if(!d){var C=T();s(E,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var k=i({inst:{value:E,getSnapshot:T}}),I=k[0].inst,N=k[1];return l(function(){I.value=E,I.getSnapshot=T,h(I)&&N({inst:I})},[g,E,T]),a(function(){h(I)&&N({inst:I});var L=function(){h(I)&&N({inst:I})};return g(L)},[g]),c(E),E}function h(g){var T=g.getSnapshot,S=g.value;try{var E=T();return!s(S,E)}catch{return!0}}function p(g,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?p:f,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;ab.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ab}var cb;function ub(){return cb||(cb=1,process.env.NODE_ENV==="production"?Xu.exports=xM():Xu.exports=SM()),Xu.exports}/**
|
|
155
170
|
* @license React
|
|
156
171
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
157
172
|
*
|
|
@@ -159,7 +174,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
159
174
|
*
|
|
160
175
|
* This source code is licensed under the MIT license found in the
|
|
161
176
|
* LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/var db;function
|
|
177
|
+
*/var db;function TM(){if(db)return Zu;db=1;var e=w,t=ub();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Zu.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!b){if(b=!0,g=E,E=f(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return T=C}return T=E}if(C=T,r(g,E))return C;var k=f(E);return h!==void 0&&h(C,k)?C:(g=E,T=k)}var b=!1,g,T,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},Zu}var fb={};/**
|
|
163
178
|
* @license React
|
|
164
179
|
* use-sync-external-store-shim/with-selector.development.js
|
|
165
180
|
*
|
|
@@ -167,5 +182,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
167
182
|
*
|
|
168
183
|
* This source code is licensed under the MIT license found in the
|
|
169
184
|
* LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/var pb;function wM(){return pb||(pb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=fb();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,d,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var x=!1,E,C,O=function(_){if(!x){x=!0,E=_;var j=h(_);if(p!==void 0&&y.hasValue){var D=y.value;if(p(D,j))return C=D,D}return C=j,j}var k=E,F=C;if(r(k,_))return F;var $=h(_);return p!==void 0&&p(F,$)?F:(E=_,C=$,$)},I=d===void 0?null:d,N=function(){return O(f())},L=I===null?void 0:function(){return O(I())};return[N,L]},[f,d,h,p]),w=v[0],g=v[1],T=o(u,w,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}hb.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),hb}process.env.NODE_ENV==="production"?bM():wM();const Do=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},xM=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},SM=e=>Object.entries(e),mb=e=>e instanceof Promise,gb=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),TM=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(d=>gb(u,d,s,f));return mb(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},EM=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>gb(c,u,s,o.current));return mb(a)?a.then(c=>l(c)):l(a)},ef=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=Do(r),i=Do((n==null?void 0:n.props)??{}),a=Do(t),l=Do((n==null?void 0:n.postMiddleware)??[]),c=Do((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=xM(r),d=Do(f),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>d.current});return SM(y).reduce((v,[w,g])=>({...v,[w]:n!=null&&n.debug?TM(w,g,o,m,h,c.current):EM(w,g,o,m,h,c.current)}),{})});return[r,p,i.current]},CM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function PM(e,t){return b.useRef(CM(e,t)).current}function tf(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}tf.debounce=tf;var OM=tf;const yb=Jd(OM);function kM(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=b.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=b.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=b.useRef(!1);b.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,h,p]=b.useMemo(()=>{const w=()=>{if(!l.current.element)return;const{left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N}=l.current.element.getBoundingClientRect(),L={left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N};l.current.element instanceof HTMLElement&&o&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),f.current&&!DM(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[w,u?yb(w,u):w,c?yb(w,c):w]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=w=>{!w||w===l.current.element||(m(),l.current.element=w,l.current.scrollContainers=vb(w),y())};return AM(p,!!n),_M(h),b.useEffect(()=>{m(),y()},[n,p,h]),b.useEffect(()=>m,[]),[v,i,d]}function _M(e){b.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function AM(e,t){b.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function vb(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...vb(e.parentElement)]}const IM=["x","y","top","bottom","left","right","width","height"],DM=(e,t)=>IM.every(n=>e[n]===t[n]),MM=({children:e})=>{const[t,n]=kM();return S.jsx(Jt.div,{animate:{height:n.height>0?n.height:"auto"},children:S.jsx("div",{ref:t,children:e})})},NM={type:"spring",bounce:.1,duration:.3},bb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),wb={middle:{x:"0%",opacity:1},enter:bb(1),exit:bb(-1)},xb={exit:{visibility:"hidden"}},FM=e=>{const t=vn(Zm(e));return Km({start:t,end:yo(t,41)})},Sb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),LM=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Zm(new Date(e).setMonth(r)),s=Sb(o,t);return S.jsx("option",{value:s,"data-index":r,children:s},s)}),nf={ArrowLeft:(e,t)=>t==="days"?kk(e,1):fg(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):Ji(e,1),ArrowUp:(e,t)=>t==="days"?_k(e,1):Ak(e,1),ArrowDown:(e,t)=>t==="days"?Ym(e,1):qm(e,1)},Tb=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),Eb=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=ef({date:i,isAnimating:!1,year:Nr(i),direction:void 0,months:LM(i,e),week:Km({start:vn(i),end:$P(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:bo(new Date)}),onExitComplete:()=>(Tb(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:Nr(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Ji(m.date,1);return{date:y,isAnimating:!0,direction:1,year:Nr(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=fg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:Nr(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:Nr(v)}},onChangeMonth:m=>{const y=m.target.value,w=Array.from(m.target.options).find(g=>g.value===y);if(w){const g=w.dataset.index||"",T=new Date(p.state().date);return T.setMonth(+g),{date:T,year:Nr(T)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in nf){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=kn.keyof(nf,y)?nf[y](v,m.shiftKey?"month":"days"):null;if(w!==null)return Tb(w),{date:w,year:Nr(w)}}return p.state()}})),c=FM(a.date),u=a.date.toISOString(),f=Sb(a.date,e);b.useEffect(()=>s==null?void 0:s(a.date),[u]);const d=PM(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),d(m)};return S.jsx(XD,{transition:NM,children:S.jsxs("div",{className:"relative overflow-hidden",children:[S.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:S.jsx(MM,{children:S.jsx(Ea,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,custom:a.direction,onExitComplete:l.onExitComplete,children:S.jsxs(Jt.div,{initial:"enter",animate:"middle",exit:"exit",children:[S.jsxs("header",{className:"relative flex justify-between",children:[S.jsx(Jt.button,{onClick:l.previousMonth,variants:xb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",children:S.jsx(ux,{className:"h-4 w-4"})}),S.jsx(Jt.span,{variants:wb,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:S.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[S.jsx("select",{style:{width:`${f.length}ch`},value:f,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),S.jsx(fp,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),S.jsx(Jt.button,{variants:xb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",onClick:l.nextMonth,children:S.jsx(qd,{className:"h-4 w-4"})}),S.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),S.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>S.jsx("span",{className:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),S.jsx(Jt.ul,{onKeyDown:l.onKeyDown,variants:wb,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=Ok(p)&&n,w=(t==null?void 0:t(p))||!1,g=!Pk(p,a.date)||w;return S.jsx("li",{className:"w-full flex items-center justify-center",children:S.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},f)})})}),S.jsx("footer",{className:"text-center text-primary mt-2",children:S.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Mo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[fl(10),gd({fallbackAxisSideDirection:"end"}),md(),yd({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=vi({open:n,middleware:s,transform:!0,whileElementsMounted:ul,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=$d(l),u=yi(l),f=xi(l),{getReferenceProps:d,getFloatingProps:h}=bi([c,u,f]);return S.jsxs(b.Fragment,{children:[S.jsx("button",{ref:i.setReference,...d(),type:"button",children:e.trigger}),n&&S.jsx(gi,{id:`${t}-portal`,children:S.jsx(vl,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:l,modal:!1,children:S.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[S.jsx(Td,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),S.jsx("header",{className:"mb-2",children:S.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},Cb=new Date(1970,11,31),rf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Pb={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},VM={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},$M=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[l,c]=b.useState(e||void 0),[u,f]=b.useState(!1),d=a.formatToParts(Cb).flatMap(w=>kn.keyof(rf,w.type)?rf[w.type](w.value):[]),h=a.formatToParts(Cb).reduce((w,g)=>w+(kn.keyof(Pb,g.type)?Pb[g.type](g.value):""),""),[p,m]=b.useState(l?a.formatToParts(l).reduce((w,g)=>w+(kn.keyof(rf,g.type)?VM[g.type](l,g.value):""),""):""),y=w=>{const g=w.target.value;if(m(g),d.length===g.length&&d.every((x,E)=>{const C=g.charAt(E);return typeof x=="string"?C===x:x.test(C)})){const x=bo(Ek(g,h,new Date));c(x),o==null||o(x)}},v=w=>{c(w),o==null||o(w),m(OO(w,h))};return S.jsx(us,{...i,mask:d,value:p,onChange:y,className:"uppercase",formNoValidate:!u,placeholder:h,required:i.required??!0,error:u?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:S.jsxs(b.Fragment,{children:[S.jsx("input",{defaultValue:l==null?void 0:l.toISOString(),hidden:!0,type:"date",name:i.name}),S.jsx(Mo,{trigger:S.jsx(cx,{}),onChange:f,open:u,children:S.jsx(Eb,{...i,locale:t,date:l,onChange:v,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},RM=wc("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"}}),jM=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return S.jsxs(hs,{...i,ref:a,"data-theme":o,as:i.as??"span",className:$t(RM({size:s,theme:o}),t),children:[i.children,n]})}),Ob=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>S.jsxs(hs,{...s,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:[t?S.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,S.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),BM=e=>S.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[S.jsxs("header",{className:"p-6 items-start flex gap-4",children:[S.jsx("div",{className:$t("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:S.jsx("div",{children:S.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("header",{children:S.jsx("h3",{className:"text-base leading-none",children:e.title})}),S.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?S.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),kb=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},_b=b.createContext(""),zM=e=>{const[t,n]=kb(e.active),r=Io(0),o=Io(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useEffect(()=>{const c=s.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},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(e.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(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,f=u.getBoundingClientRect();o.set(f.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return S.jsx(_b.Provider,{value:t,children:S.jsx(Ob,{container:"pt-0",header:S.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",children:[S.jsx(Jt.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"}),S.jsx("nav",{children:S.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 S.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:S.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:e.children})})},WM=()=>b.useContext(_b),HM=e=>{const t=WM();return S.jsx(b.Fragment,{children:e.id===t?e.children:null})},UM=({children:e,as:t,title:n,...r})=>{const[o,s]=b.useState(!1),i=b.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=vi({open:o,onOpenChange:s,whileElementsMounted:ul,transform:!0,middleware:[fl(5),gd({fallbackAxisSideDirection:"start"}),md(),yd({element:i,padding:5})]}),f=Vw(u,{move:!0}),d=Jw(u),h=yi(u),p=xi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=bi([f,d,h,p]);return S.jsxs(b.Fragment,{children:[S.jsx(a,{ref:l.setReference,...m(r),children:n}),S.jsx(gi,{children:o&&S.jsxs(hs,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[S.jsx(Td,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};function GM(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function YM(...e){return t=>e.forEach(n=>GM(n,t))}var Ab=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(KM);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return S.jsx(of,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return S.jsx(of,{...r,ref:t,children:n})});Ab.displayName="Slot";var of=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=XM(n);return M.cloneElement(n,{...ZM(r,n.props),ref:t?YM(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});of.displayName="SlotClone";var qM=({children:e})=>S.jsx(S.Fragment,{children:e});function KM(e){return M.isValidElement(e)&&e.type===qM}function ZM(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function XM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const No="600ms",Ib=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:No},enter:{[e]:0,opacity:1,animationDuration:No},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:No}}),QM=Ib("left"),JM=Ib("right"),Db={drawer:e=>e==="left"?QM:JM,dialog:{initial:{opacity:0,scale:.95,animationDuration:No},enter:{opacity:1,scale:[1.05,1],animationDuration:No},exit:{opacity:0,scale:.97,animationDuration:No}}},eN=wc("isolate ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8"},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"}}),tN={top:0,left:0,right:0,bottom:0},nN=e=>{const t=(n,r)=>{if(e.parent.current){const o=e.parent.current,s=e.value.get()||o.getBoundingClientRect().width,i=e.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(s+i))}};return S.jsx(Jt.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:tN,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${e.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},rN=({type:e="dialog",resizer:t=!0,...n})=>{const r=e==="dialog",o=r?"none":n.position||"left",s=r?Db.dialog:Db.drawer(o),i=b.useId(),a=b.useId(),{refs:l,context:c}=vi({open:n.open,onOpenChange:n.onChange}),u=$d(c),f=xi(c),d=yi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=bi([u,f,d]),m=n.trigger,y=Io(void 0);return S.jsxs(b.Fragment,{children:[n.trigger?S.jsx(b.Fragment,{children:n.asChild?S.jsx(Ab,{ref:l.setReference,...h(),children:m}):S.jsx("button",{ref:l.setReference,...h(),type:"button",children:m})}):null,S.jsx(gi,{children:S.jsx(Ea,{presenceAffectsLayout:!0,children:n.open&&S.jsx(Kw,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${e==="drawer"?"":"grid justify-center p-8"}`,children:S.jsx(vl,{modal:!0,closeOnFocusOut:!0,context:c,children:S.jsxs(Jt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:eN({position:o,type:e}),exit:"exit",initial:"initial",ref:l.setFloating,variants:s,style:{width:y},...p(),children:[!r&&t?S.jsx(nN,{value:y,parent:l.floating,type:o}):null,n.title||n.closable?S.jsxs("header",{className:"w-full relative",children:[n.title?S.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?S.jsx("nav",{className:"absolute -top-1 right-8",children:S.jsx("button",{type:"button",onClick:()=>{var v;return(v=n.onChange)==null?void 0:v.call(n,!1)},className:"p-1 transition-colors hover:text-danger focus:text-danger",children:S.jsx(vx,{})})}):null]}):null,S.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?S.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var oN=Object.defineProperty,Mb=Object.getOwnPropertySymbols,sN=Object.prototype.hasOwnProperty,iN=Object.prototype.propertyIsEnumerable,Nb=(e,t,n)=>t in e?oN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aN=(e,t)=>{for(var n in t||(t={}))sN.call(t,n)&&Nb(e,n,t[n]);if(Mb)for(var n of Mb(t))iN.call(t,n)&&Nb(e,n,t[n]);return e},sf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},lN=(e,t,n,r)=>Oa(sf,e,t,n,r),Fo=e=>typeof e=="object",dr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Fo(e)&&!Fo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>dr(e[r],t[r]))},cN=(e,t)=>(Fo(e)||Array.isArray(e))&&t?e[t]:e,uN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Pa=e=>/[0-9.]+/.test(e),Fb=e=>["string","number"].includes(typeof e),Lb=e=>e==null||(e==null?void 0:e.length)===0||e==="",Vb={eq:dr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Lb,notEmpty:e=>!Lb(e),in:(e,t)=>sf(t,n=>dr(e,n)),notIn:(e,t)=>$b(t,n=>!dr(e,n))},fN=e=>{if(e in Vb)return Vb[e];throw new Error("Linq - Symbol not found")},Lo=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Oa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=fN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},dN=(e,t,n,r)=>Oa(Lo,e,t,n,r),$b=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},hN=(e,t,n,r)=>Oa($b,e,t,n,r),Rb=e=>{if(e===null)return null;const t=aN({},e);return Object.keys(t).forEach(n=>t[n]=Fo(e[n])?Rb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},jb=(e,t)=>{if(Fo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1},pN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},mN=e=>Lo(e,(t,n,r)=>Fo(t)?n===r.findIndex(o=>dr(o,t)):n===r.indexOf(t)),gN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Bb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},yN=(e,t)=>Bb(e,n=>n[t]),zb=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},vN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},bN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Pa(e)&&Pa(t)?r.map(i=>Number.parseInt(i)):r},af=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Pa(e)&&Pa(t)){const o=[],[s,i]=vN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return bN(e,t,r)},wN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?af(r,o,1):af(r,s,Number.parseInt(o,10))}return Fb(e)&&Fb(t)?af(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},lf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},Wb=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},xN=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},SN=(e,t,n,r)=>Oa(xN,e,t,n,r),Hb=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(uN(t))},TN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),EN=(e,t)=>e.sort(TN(t)),CN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Lo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},PN=class jf{constructor(t=[]){this.array=t}static Range(...t){return wN(...t)}static New(t){return new jf(t)}Where(t,n,r){return this.array=dN(this.array,t,n,r),this}Some(t,n,r){return lN(this.array,t,n,r)}All(t,n,r){return hN(this.array,t,n,r)}Reverse(){return this.array=Wb(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=SN(this.array,t,n,r),this}Distinct(){return this.array=mN(this.array),this}First(t){return t===void 0?this.array[0]:gN(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?lf((n,r)=>n+r,0,this.array):lf((n,r)=>n+cN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return yN(this.array,t)}GroupWith(t){return Bb(this.array,t)}Except(t){return Lo(this.array,n=>!jb(t,n))}Intersect(t){return Lo(this.array,n=>jb(t,n))}OrderBy(t,n){let r;return r=t?Hb(this.array,t):this.array.toSorted(),this.array=n==="desc"?Wb(r):r,this}Includes(t){return sf(this.array,n=>dr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return lf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(zb(this.array,n=>[t,n]))}Zip(t,n){return zb(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Lo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new jf(Rb(this.array))}ToObject(t){return pN(this.array,t)}Sort(t){return Array.isArray(t)?EN(this.array,t):Hb(this.array,t)}Unique(t){return CN(this.array,t)}},Ub=PN;const Gb=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},ka=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Yb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),qb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Kb=(e,t)=>{const n=Yb(t,qb.basic,e)||Yb(t,qb.extend,e);return n===void 0||n===e?void 0:n},cf=()=>typeof window>"u";var uf={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(w){window.console.log(w)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const w=v.getItem(y);try{return JSON.parse(w)}catch{return w??null}},s=y=>Object.keys(y).reduce((v,w)=>({...v,[w]:o(w,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},f=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],d={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=d.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,w={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=f.reduce((x,E)=>{const C=E.parse(w);return C===""?x:x.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const v=new Set,w=g=>{y().removeItem(g);const T=s(y());v.forEach(x=>x(T))};return{delete:w,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),w),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),v.forEach(x=>x(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=d,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(uf);const Zb=e=>e.headerLabel??e.thead??e.id,ff=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Vo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Vo||{});const df=e=>e.type==="number"?e.valueAsNumber:e.value,ON=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},kN={},_N=(e,t=kN)=>{const n=cf()?null:uf.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=ef({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return cf()||uf.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Nt={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"}},hf={[Vo.Text]:[Nt.is,Nt.isNot,Nt.contains,Nt.notContains,Nt.startsWith,Nt.endsWith],[Vo.Boolean]:[Nt.is,Nt.isNot],[Vo.Number]:[Nt.is,Nt.isNot,Nt.greaterThan,Nt.lessThan]},pf=(e,t={})=>{var i;const n=e.id,r=e.type??Vo.Text,o=(i=hf[r])==null?void 0:i[0].value,s=Nt[o];return{id:ka(),operation:s,label:Zb(e),name:n,type:r,value:"",...t}},AN=e=>{const t=()=>{const i=e.cols.at(0);e.set(a=>[...a,pf(i)])},n=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>{if(a!==u.id)return u;const f=e.cols.find(d=>l===d.id);return pf(f,{value:""})}))},r=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>u.id===a?{...u,operation:Nt[l]}:u))},o=i=>{const a=i.currentTarget.dataset.id||"";e.set(l=>l.filter(c=>c.id!==a))},s=i=>{const a=i.target.dataset.id||"",l=df(i.target);e.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return S.jsx(b.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Filters",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(Kd,{size:14}),"Filtros ",e.filters.length===0?"":` (${e.filters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(i=>{const a=hf[i.type];return S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{title:"Filter",options:e.options,placeholder:"Name...",value:i.name,"data-id":i.id,onChange:n}),S.jsx(xr,{title:"Filter type","data-id":i.id,onChange:r,value:i.operation.value,options:a,placeholder:"Operator..."}),S.jsx(us,{"data-id":i.id,onChange:s,placeholder:"Search...",title:"Value",type:i.type,value:i.value}),S.jsx("div",{className:"flex items-center justify-center mt-5",children:S.jsx("button",{"data-id":i.id,type:"button",onClick:o,children:S.jsx(eo,{className:"text-danger",size:16})})})]},`filter-select-${i.id}`)}),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(Tl,{size:14})," New filter"]})})]})})})},IN=({filter:e,onDelete:t,set:n})=>{const r=s=>{const i=s.target.value,a=s.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Nt[i]}:c))},o=s=>{const i=s.target.dataset.id||"",a=df(s.target);n(l=>l.map(c=>c.id===i?{...c,value:a}:c))};return S.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[S.jsx(xr,{onChange:r,options:hf[e.type],placeholder:"Operation...",title:"Filter type",value:e.operation.value}),S.jsx(us,{"data-id":e.id,onChange:o,placeholder:"Looking for...",title:"Value",type:e.type,value:e.value}),S.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:S.jsx(eo,{className:"text-danger",size:14})})]})},DN=({item:e,onPointerDown:t})=>{const n=Io(0);return S.jsxs(Ca.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[S.jsx("button",{type:"button",className:"cursor-grab",children:S.jsx(mx,{size:14})}),S.jsx("span",{children:e.groupName})]},e.groupId)},MN=e=>{var a;const t=ff(e.cols),n=gM(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=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 Ub(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(ET(h).map((y,v)=>{const w=h[y];return{...p,groupId:ka(),groupKey:u,index:v,rows:w,groupName:y}}))},i=()=>e.setGroups([]);return S.jsx(b.Fragment,{children:S.jsxs(Mo,{arrow:!1,title:"Groups",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(gx,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[S.jsxs("div",{className:"flex flex-nowrap items-center",children:[S.jsx(xr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),S.jsx(ps,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:S.jsx(eo,{size:16,className:"text-danger"})})]}),e.groups.length>0?S.jsxs("section",{className:"my-4",children:[S.jsx("header",{children:S.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),S.jsx(tM,{children:S.jsx(Ca.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>S.jsx(DN,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},NN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return console.log({acc:r,p:a,a:t,b:n,property:i}),r!==0?r:a},0),FN=(e,t)=>e.sort(NN(t)),mf={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},LN=[mf.asc,mf.desc],gf=(e,t="asc")=>({id:ka(),type:t,value:e.id,label:mf.asc.label}),VN=e=>{const t=()=>{const s=e.cols[0];s&&e.set(i=>[...i,gf(s)])},n=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,value:a}:c))},r=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,type:a}:c))},o=s=>{const i=s.currentTarget.dataset.id||"";e.set(a=>a.filter(l=>l.id!==i))};return S.jsx(b.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Order By",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[S.jsx(Yd,{size:14}),"Order by ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(s=>S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{onChange:n(s.id),options:e.options,title:"Field",placeholder:"Selecione um campo...",value:s.value}),S.jsx(xr,{title:"Sort type",onChange:r(s.id),value:s.type,options:LN,placeholder:"Operação..."}),S.jsx("button",{className:"mt-4","data-id":s.id,onClick:o,children:S.jsx(eo,{className:"text-danger",size:14})})]},`sorter-select-${s.id}`)),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(Tl,{size:14})," Add sort"]})})]})})})},$N=e=>{const t=e.sorters.find(s=>s.id===e.col.id),[n,r]=b.useState(t?t.type:"undefined"),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");return b.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(a=>a.value!==e.col.id);const i=s.findIndex(a=>a.value===e.col.id);return i===-1?[...s,gf(e.col,n)]:(s[i]=gf(e.col,n),[...s])})},[n,e.col]),S.jsxs("button",{className:"isolate flex items-center",onClick:o,type:"button",children:[n==="asc"?S.jsx(Sl,{size:14}):null,n==="desc"?S.jsx(fx,{size:14}):null,n==="undefined"?S.jsx(Yd,{size:14}):null]})},RN=e=>S.jsx("header",{className:"min-w-full mb-1",children:S.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[S.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[S.jsx("span",{children:S.jsx(AN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),S.jsx("span",{children:S.jsx(VN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),S.jsx("span",{children:S.jsx(MN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),S.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>S.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[S.jsxs("span",{children:[S.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),S.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[S.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),S.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=df(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})}),jN={opacity:1},BN={opacity:.75,backgroundColor:"var(--table-border)"},zN={opacity:0,transition:{duration:.4,type:"spring"}},WN=e=>{var r;const t=e.filters.filter(o=>o.name===e.header.id),n=o=>{const s=o.currentTarget.dataset.id||"";return e.setFilters(i=>i.filter(a=>a.id!==s))};return S.jsx(Ca.Item,{...e.header.thProps,as:"th",exit:zN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:e.header,whileDrag:BN,animate:jN,className:`hidden font-medium text-secondary px-2 py-4 first:table-cell md:table-cell ${((r=e.header.thProps)==null?void 0:r.className)??""}`,children:S.jsx("span",{className:"flex items-center justify-between",children:S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(Mo,{title:`Filter by ${Zb(e.header)}`,arrow:!0,trigger:S.jsx(Kd,{size:14}),children:t.length===0===null?null:S.jsxs("ul",{className:"font-medium",children:[t.map(o=>S.jsx("li",{className:"my-1",children:S.jsx(IN,{onDelete:n,filter:o,set:e.setFilters})},`thead-filter-${o.id}`)),S.jsx("li",{children:S.jsxs("button",{onClick:()=>e.setFilters(o=>o.concat(pf(e.header))),className:"flex items-center",children:[S.jsx(Tl,{size:14})," Add"]})})]})}),S.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),S.jsx($N,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},HN=e=>S.jsx(Ca.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:S.jsx(Ea,{children:e.headers.map(t=>S.jsx(WN,{setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})});function UN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2,o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const GN=b.forwardRef((e,t)=>S.jsx("tbody",{...e,className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:S.jsx(Ea,{children:e.children})})),YN=b.forwardRef((e,t)=>S.jsx("table",{...e,ref:t,className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),qN=b.forwardRef((e,t)=>S.jsx("thead",{...e,className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),KN=b.forwardRef((e,t)=>S.jsx("tr",{...e,ref:t,className:`table-row ${e.className??""}`})),ZN=b.forwardRef((e,t)=>e.context.loadingMore?S.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:S.jsx("tr",{className:"bg-card-background",children:S.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:S.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),XN={TableHead:qN,Table:YN,TableBody:GN,TableRow:KN,TableFoot:ZN},QN=[0,0,0,0,0,0,0,0,0,0],JN=(e,t,n)=>{const r=n.cols,o=n.loading;return S.jsx(b.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=Kb(t,s.id),c=s.Element;return b.createElement("td",{...s.cellProps,"data-matrix":a,key:`accessor-${e}-${i}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?S.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?S.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):S.jsx(b.Fragment,{children:kn.nil(l)?"":l}))})})},eF=()=>S.jsx(b.Fragment,{}),tF=e=>{const t=e.asLink||"button",n=b.useMemo(()=>UN(e.current,e.pages),[e.current,e.pages]),r=e.current<e.pages;return S.jsxs("footer",{className:"flex px-1 py-2 items-center justify-between flex-nowrap",children:[S.jsxs("p",{children:[e.current," to ",e.pages," of ",e.totalItems," items.",e.onChangeSize&&Array.isArray(e.sizes)?S.jsxs(b.Fragment,{children:[S.jsx("select",{className:"cursor-pointer",onChange:o=>{var s;(s=e.onChangeSize)==null||s.call(e,Number(o.target.value))},children:e.sizes.map(o=>S.jsx("option",{value:o,children:o}))})," per page"]}):null]}),S.jsx("nav",{children:S.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?S.jsx("li",{children:S.jsx(t,{href:"previous",className:"",children:"Previous"})}):null,n.map(o=>o===null?null:S.jsx(b.Fragment,{children:typeof o=="string"?S.jsx("li",{children:"..."}):S.jsx("li",{children:S.jsx(t,{href:o,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${o===e.current?"text-primary border-primary":"border-transparent"}`,children:o})},`pagination-${o}`)})),r?S.jsx("li",{children:S.jsx(t,{href:"next",className:"",children:"Next"})}):null]})})]})},Xb=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,setSorters:l,...c})=>{const u=b.useRef(null),[f,d]=b.useState(!1),h=Gb(n),p=Gb(c.loadingMore),m=b.useMemo(()=>{if(c.loading)return QN;if(r)return c.rows;const y=new Ub(c.rows);return e.length>0&&e.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:y.Where(v.name,v.operation.symbol,v.value)),i.length===0?y.Select():FN(y.Select(),i)},[c.rows,e,i,c.loading]);return b.useEffect(()=>{if(u.current===null)return()=>{};const y=u.current,v=new IntersectionObserver(w=>{var x;return w.forEach(E=>console.log(E.isIntersecting,E.target)),w[w.length-1].isIntersecting&&p.current?((x=h.current)==null||x.call(h),void d(!0)):d(!1)});return v.observe(y),()=>v.disconnect()},[]),S.jsxs("div",{className:"min-w-full",children:[S.jsxs("div",{className:"group border border-table-border rounded-lg px-1",children:[S.jsx(SP,{data:m,useWindowScroll:!0,components:XN,totalCount:m.length,itemContent:JN,context:{loading:c.loading,loadingMore:c.loadingMore,cols:a},fixedFooterContent:f?eF:null,fixedHeaderContent:()=>S.jsx(HN,{sorters:i,setSorters:l,filters:e,setFilters:s,headers:a,setCols:o})}),S.jsx("div",{"aria-hidden":"true",ref:u,className:"h-0.5 w-full"})]}),t!==null?S.jsx(tF,{...t}):null]})},nF=(e,t)=>typeof t=="function"?t(e):t,rF=e=>{const t=e.operations??!0,n=b.useMemo(()=>ff(e.cols),[e.cols]),[r,o]=ef({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:nF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return S.jsxs("div",{className:"relative min-w-full",children:[t?S.jsx(RN,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?S.jsx(Xb,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):S.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((s,i)=>S.jsx(Jt.div,{className:"min-w-full",children:S.jsx(Xb,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})};var oF=String.prototype.replace,sF=/%20/g,yf={RFC1738:"RFC1738",RFC3986:"RFC3986"},vf={default:yf.RFC3986,formatters:{RFC1738:function(e){return oF.call(e,sF,"+")},RFC3986:function(e){return String(e)}},RFC1738:yf.RFC1738,RFC3986:yf.RFC3986},iF=vf,bf=Object.prototype.hasOwnProperty,Fr=Array.isArray,Tn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),aF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Fr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Qb=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},lF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Fr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!bf.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Fr(t)&&!Fr(n)&&(o=Qb(t,r)),Fr(t)&&Fr(n)?(n.forEach(function(s,i){if(bf.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return bf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},cF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},uF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},wf=1024,fF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=wf){for(var c=i.length>=wf?i.slice(l,l+wf):i,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||s===iF.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=Tn[d];continue}if(d<2048){u[u.length]=Tn[192|d>>6]+Tn[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Tn[224|d>>12]+Tn[128|d>>6&63]+Tn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Tn[240|d>>18]+Tn[128|d>>12&63]+Tn[128|d>>6&63]+Tn[128|d&63]}a+=u.join("")}return a},dF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return aF(n),t},hF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},pF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},mF=function(t,n){return[].concat(t,n)},gF=function(t,n){if(Fr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jb={arrayToObject:Qb,assign:cF,combine:mF,compact:dF,decode:uF,encode:fF,isBuffer:pF,isRegExp:hF,maybeMap:gF,merge:lF},e0=rT,_a=Jb,Hs=vf,yF=Object.prototype.hasOwnProperty,t0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,vF=Array.prototype.push,n0=function(e,t){vF.apply(e,En(t)?t:[t])},bF=Date.prototype.toISOString,r0=Hs.default,ht={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_a.encode,encodeValuesOnly:!1,format:r0,formatter:Hs.formatters[r0],indices:!1,serializeDate:function(t){return bF.call(t)},skipNulls:!1,strictNullHandling:!1},wF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},xf={},xF=function e(t,n,r,o,s,i,a,l,c,u,f,d,h,p,m,y,v,w){for(var g=t,T=w,x=0,E=!1;(T=T.get(xf))!==void 0&&!E;){var C=T.get(t);if(x+=1,typeof C<"u"){if(C===x)throw new RangeError("Cyclic object value");E=!0}typeof T.get(xf)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=_a.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,ht.encoder,v,"key",p):n;g=""}if(wF(g)||_a.isBuffer(g)){if(c){var O=y?n:c(n,ht.encoder,v,"key",p);return[m(O)+"="+m(c(g,ht.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var N;if(r==="comma"&&En(g))y&&c&&(g=_a.maybeMap(g,c)),N=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))N=u;else{var L=Object.keys(g);N=f?L.sort(f):L}var _=l?n.replace(/\./g,"%2E"):n,j=o&&En(g)&&g.length===1?_+"[]":_;if(s&&En(g)&&g.length===0)return j+"[]";for(var D=0;D<N.length;++D){var k=N[D],F=typeof k=="object"&&typeof k.value<"u"?k.value:g[k];if(!(a&&F===null)){var $=d&&l?k.replace(/\./g,"%2E"):k,z=En(g)?typeof r=="function"?r(j,$):j:j+(d?"."+$:"["+$+"]");w.set(t,x);var q=e0();q.set(xf,w),n0(I,e(F,z,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,f,d,h,p,m,y,v,q))}}return I},SF=function(t){if(!t)return ht;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||ht.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Hs.default;if(typeof t.format<"u"){if(!yF.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=ht.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in t0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ht.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:ht.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ht.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ht.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ht.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ht.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ht.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ht.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ht.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ht.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ht.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ht.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ht.strictNullHandling}},TF=function(e,t){var n=e,r=SF(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=t0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=e0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||n0(i,xF(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=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},$o=Jb,Sf=Object.prototype.hasOwnProperty,EF=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:$o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},CF=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},o0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},PF="utf8=%26%2310003%3B",OF="utf8=%E2%9C%93",kF=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===OF?c="utf-8":i[l]===PF&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,ct.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),ct.decoder,c,"key"),p=$o.maybeMap(o0(u.slice(d+1),n),function(y){return n.decoder(y,ct.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=CF(p)),u.indexOf("[]=")>-1&&(p=EF(p)?[p]:p);var m=Sf.call(r,h);m&&n.duplicates==="combine"?r[h]=$o.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},_F=function(e,t,n,r){for(var o=r?t:o0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},AF=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Sf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Sf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),_F(u,n,r,o)}},IF=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ct.charset:t.charset,r=typeof t.duplicates>"u"?ct.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ct.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ct.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ct.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ct.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ct.decoder,delimiter:typeof t.delimiter=="string"||$o.isRegExp(t.delimiter)?t.delimiter:ct.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ct.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ct.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ct.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},DF=function(e,t){var n=IF(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?kF(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=AF(a,r[a],n,typeof e=="string");o=$o.merge(o,l,n)}return n.allowSparse===!0?o:$o.compact(o)},MF=TF,NF=DF,FF=vf,LF={formats:FF,parse:NF,stringify:MF},Pe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var s0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(s0||(s0={}));const te=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lr=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(e)?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(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},G=Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const Us=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.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 e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case G.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case 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 ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let VF=Us;function Tf(){return VF}const Ef=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function J(e,t){const n=Tf(),r=Ef({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(o=>!!o)});e.common.issues.push(r)}class Ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return Ft.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),i0=e=>e.status==="aborted",a0=e=>e.status==="dirty",Aa=e=>e.status==="valid",Ia=e=>typeof Promise<"u"&&e instanceof Promise;function Da(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function l0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));var Ys,qs;class Cn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const c0=(e,t)=>{if(Aa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ia(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return c0(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Ia(o)?o:Promise.resolve(o));return c0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new $n({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rn.create(this,this._def)}nullable(){return Rr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return Xs.create(this,this._def)}or(t){return Fa.create([this,t],this._def)}and(t){return La.create(this,t,this._def)}transform(t){return new $n({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ba({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new h0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new za({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Wa.create(this,t)}readonly(){return Ha.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $F=/^c[^\s-]{8,}$/i,RF=/^[0-9a-z]+$/,jF=/^[0-9A-HJKMNP-TV-Z]{26}$/,BF=/^[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,zF=/^[a-z0-9_-]{21}$/i,WF=/^[-+]?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)?)??$/,HF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,UF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cf;const GF=/^(?:(?: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])$/,YF=/^(([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})))$/,qF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,u0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",KF=new RegExp(`^${u0}$`);function f0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function ZF(e){return new RegExp(`^${f0(e)}$`)}function XF(e){let t=`${u0}T${f0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function QF(e,t){return!!((t==="v4"||!t)&&GF.test(e)||(t==="v6"||!t)&&YF.test(e))}class Fn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.string,received:s.parsedType}),me}const r=new Ft;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")HF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"email",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Cf||(Cf=new RegExp(UF,"u")),Cf.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"emoji",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")BF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"uuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")zF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"nanoid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")$F.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")RF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid2",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")jF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ulid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),J(o,{validation:"url",code:G.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"regex",code:G.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?XF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?KF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?ZF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?WF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"duration",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?QF(t.data,s.version)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ip",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?qF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"base64",code:G.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:G.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function JF(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Vr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.number,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?JF(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Pe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Vr.create=e=>new Vr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ro extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==te.bigint){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.bigint,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>{var t;return new Ro({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Pf extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),me}return zt(t.data)}}Pf.create=e=>new Pf({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ks extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_date}),me}const r=new Ft;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ks.create=e=>new Ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Of extends xe{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),me}return zt(t.data)}}Of.create=e=>new Of({typeName:he.ZodSymbol,...ye(e)});class Ma extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),me}return zt(t.data)}}Ma.create=e=>new Ma({typeName:he.ZodUndefined,...ye(e)});class Na extends xe{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),me}return zt(t.data)}}Na.create=e=>new Na({typeName:he.ZodNull,...ye(e)});class kf extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}kf.create=e=>new kf({typeName:he.ZodAny,...ye(e)});class jo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}jo.create=e=>new jo({typeName:he.ZodUnknown,...ye(e)});class hr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),me}}hr.create=e=>new hr({typeName:he.ZodNever,...ye(e)});class _f extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),me}return zt(t.data)}}_f.create=e=>new _f({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==te.array)return J(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(J(n,{code:i?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(J(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&&(J(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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Ft.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Ft.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Bo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rn.create(Bo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Bo(e.element)}):e instanceof Rn?Rn.create(Bo(e.unwrap())):e instanceof Rr?Rr.create(Bo(e.unwrap())):e instanceof Vn?Vn.create(e.items.map(t=>Bo(t))):e}class nt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==te.object){const c=this._getOrReturnCtx(t);return J(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof hr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof hr){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&&(J(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 Cn(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=>Ft.mergeObjectSync(r,c)):Ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Bo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Rn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return d0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)});class Fa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new en(a.ctx.common.issues));return J(n,{code:G.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new en(l));return J(n,{code:G.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Fa.create=(e,t)=>new Fa({options:e,typeName:he.ZodUnion,...ye(t)});const Ln=e=>e instanceof $a?Ln(e.schema):e instanceof $n?Ln(e.innerType()):e instanceof Ra?[e.value]:e instanceof $r?e.options:e instanceof ja?Pe.objectValues(e.enum):e instanceof Ba?Ln(e._def.innerType):e instanceof Ma?[void 0]:e instanceof Na?[null]:e instanceof Rn?[void 0,...Ln(e.unwrap())]:e instanceof Rr?[null,...Ln(e.unwrap())]:e instanceof h0||e instanceof Ha?Ln(e.unwrap()):e instanceof za?Ln(e._def.innerType):[];class Af extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.object)return J(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Ln(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Af({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function If(e,t){const n=Lr(e),r=Lr(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=If(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=If(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class La extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(i0(s)||i0(i))return me;const a=If(s.value,i.value);return a.valid?((a0(s)||a0(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:G.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}La.create=(e,t,n)=>new La({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Vn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return J(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return J(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Ft.mergeArray(n,i)):Ft.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Vn({...this._def,rest:t})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Va extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.object)return J(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ft.mergeObjectAsync(n,o):Ft.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Va({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Va({keyType:Fn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Df extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return J(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Df.create=(e,t,n)=>new Df({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class zo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return J(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(J(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&&(J(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new zo({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new zo({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zo.create=(e,t)=>new zo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class Zs extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.function)return J(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),me;function r(a,l){return Ef({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),Us].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Ef({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),Us].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Xs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new en([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zs({...this._def,args:Vn.create(t).rest(jo.create())})}returns(t){return new Zs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zs({args:t||Vn.create([]).rest(jo.create()),returns:n||jo.create(),typeName:he.ZodFunction,...ye(r)})}}class $a extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$a.create=(e,t)=>new $a({getter:e,typeName:he.ZodLazy,...ye(t)});class Ra extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ra.create=(e,t)=>new Ra({value:e,typeName:he.ZodLiteral,...ye(t)});function d0(e,t){return new $r({values:e,typeName:he.ZodEnum,...ye(t)})}class $r extends xe{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Pe.joinValues(r),received:n.parsedType,code:G.invalid_type}),me}if(Da(this,Ys)||l0(this,Ys,new Set(this._def.values)),!Da(this,Ys).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:G.invalid_enum_value,options:r}),me}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $r.create(t,{...this._def,...n})}exclude(t,n=this._def){return $r.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ys=new WeakMap,$r.create=d0;class ja extends xe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Pe.objectValues(n);return J(r,{expected:Pe.joinValues(o),received:r.parsedType,code:G.invalid_type}),me}if(Da(this,qs)||l0(this,qs,new Set(Pe.getValidEnumValues(this._def.values))),!Da(this,qs).has(t.data)){const o=Pe.objectValues(n);return J(r,{received:r.data,code:G.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}qs=new WeakMap,ja.create=(e,t)=>new ja({values:e,typeName:he.ZodNativeEnum,...ye(t)});class Xs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return J(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),me;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xs.create=(e,t)=>new Xs({type:e,typeName:he.ZodPromise,...ye(t)});class $n extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Gs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Gs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Aa(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Aa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}$n.create=(e,t,n)=>new $n({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),$n.createWithPreprocess=(e,t,n)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Rn extends xe{_parse(t){return this._getType(t)===te.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rn.create=(e,t)=>new Rn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Rr extends xe{_parse(t){return this._getType(t)===te.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rr.create=(e,t)=>new Rr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ba extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);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}}Ba.create=(e,t)=>new Ba({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ia(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Mf extends xe{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Mf.create=e=>new Mf({typeName:he.ZodNaN,...ye(e)});class h0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Gs(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Wa({in:t,out:n,typeName:he.ZodPipeline})}}class Ha extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Aa(o)&&(o.value=Object.freeze(o.value)),o);return Ia(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Fn.create,Vr.create,Mf.create,Ro.create,Pf.create,Ks.create,Of.create,Ma.create,Na.create,kf.create,jo.create,hr.create,_f.create,ln.create,nt.create,nt.strictCreate,Fa.create,Af.create,La.create,Vn.create,Va.create,Df.create,zo.create,Zs.create,$a.create,Ra.create,$r.create,ja.create,Xs.create,$n.create,Rn.create,Rr.create,$n.createWithPreprocess,Wa.create;const eL={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},p0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return LF.parse(n.toString(),eL)},m0=e=>e.replace("[",".").replace("]","").split("."),Nf=(e,t)=>m0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Ua=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,tL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Nf(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},s=(l,c)=>{const u=Nf(l,e);return{...c,name:l,id:l,type:kn.instance(u,Vr)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[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(Ua(u.element)),d=p=>{const m=u.schema.safeParse(Ua(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(w=>{const{[v]:g,...T}=w||{};return T===null||kn.empty(T)?null:T});if(y.required){const w=m.error.issues[0].message;y.setCustomValidity(w),n(g=>({...g,[v]:w}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,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 i=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Ua(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=kn.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=p0(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=Wh(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=Wh(f,h.name,Ua(h))}}),l({form:u,json:f,event:c,reset:()=>Xp(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},nL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"50%"},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, 20%, 80%)",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%)"}}},rL={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 20%, 40%)",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%)"}}},oL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Qs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Qs(i,t,n,a))},[]),g0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:g0(i,t,n,a)}},{}),y0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Ff=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},sL={default:e=>Ff(e,{result:y0.default}),dark:e=>Ff(e,{result:y0.dark})},iL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Qs(e.colors,n),o=Qs(e.spacing,n),s=Qs(e.rounded,n);return Ff(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};re.Autocomplete=c1,re.Button=ps,re.ButtonGroup=FE,re.Calendar=Eb,re.Card=Ob,re.Checkbox=Hm,re.ColType=Vo,re.DatePicker=$M,re.Dropdown=Mo,re.FileUpload=BE,re.Form=WE,re.Input=us,re.InputFeedback=Xh,re.InputField=Di,re.Modal=rN,re.Option=Qh,re.Polymorph=hs,re.Select=xr,re.Stats=BM,re.Switch=HE,re.Tab=HM,re.Table=rF,re.Tabs=zM,re.Tag=jM,re.Tooltip=UM,re.TransferList=CP,re.convertPath=m0,re.createColumns=ON,re.createDesignTokens=g0,re.createOptionCols=ff,re.createStyles=sL,re.createTheme=iL,re.css=$t,re.defaultDarkTheme=nL,re.defaultLightTheme=rL,re.dispatchInput=Ql,re.formReset=Xp,re.formToJson=p0,re.getSchemaShape=Nf,re.isReactComponent=o1,re.isReactFC=s1,re.isSsr=cf,re.mergeRefs=Xl,re.parsers=oL,re.path=Kb,re.reduceTokens=Qs,re.useForm=tL,re.usePrevious=Zd,re.useReactive=kb,re.useTablePreferences=_N,re.uuid=ka,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
185
|
+
*/var hb;function EM(){return hb||(hb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=ub();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var S=!1,E,C,k=function(O){if(!S){S=!0,E=O;var j=h(O);if(p!==void 0&&y.hasValue){var D=y.value;if(p(D,j))return C=D,D}return C=j,j}var _=E,F=C;if(r(_,O))return F;var $=h(O);return p!==void 0&&p(F,$)?F:(E=O,C=$,$)},I=f===void 0?null:f,N=function(){return k(d())},L=I===null?void 0:function(){return k(I())};return[N,L]},[d,f,h,p]),b=v[0],g=v[1],T=o(u,b,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}fb.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),fb}process.env.NODE_ENV==="production"?TM():EM();const Do=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},CM=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},PM=e=>Object.entries(e),pb=e=>e instanceof Promise,mb=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),kM=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(f=>mb(u,f,s,d));return pb(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},OM=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>mb(c,u,s,o.current));return pb(a)?a.then(c=>l(c)):l(a)},Ju=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Do(r),i=Do((n==null?void 0:n.props)??{}),a=Do(t),l=Do((n==null?void 0:n.postMiddleware)??[]),c=Do((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),d=CM(r),f=Do(d),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,d,m)})},[r,l,d]);const[p]=w.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>f.current});return PM(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?kM(b,g,o,m,h,c.current):OM(b,g,o,m,h,c.current)}),{})});return[r,p,i.current]},_M=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function AM(e,t){return w.useRef(_M(e,t)).current}function ed(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}ed.debounce=ed;var IM=ed;const gb=Qf(IM);function DM(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=w.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=w.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,d=w.useRef(!1);w.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,p]=w.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:g,top:T,width:S,height:E,bottom:C,right:k,x:I,y:N}=l.current.element.getBoundingClientRect(),L={left:g,top:T,width:S,height:E,bottom:C,right:k,x:I,y:N};l.current.element instanceof HTMLElement&&o&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),d.current&&!LM(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[b,u?gb(b,u):b,c?gb(b,c):b]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=b=>{!b||b===l.current.element||(m(),l.current.element=b,l.current.scrollContainers=yb(b),y())};return NM(p,!!n),MM(h),w.useEffect(()=>{m(),y()},[n,p,h]),w.useEffect(()=>m,[]),[v,i,f]}function MM(e){w.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function NM(e,t){w.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function yb(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...yb(e.parentElement)]}const FM=["x","y","top","bottom","left","right","width","height"],LM=(e,t)=>FM.every(n=>e[n]===t[n]),VM=({children:e})=>{const[t,n]=DM();return x.jsx(Jt.div,{animate:{height:n.height>0?n.height:"auto"},children:x.jsx("div",{ref:t,children:e})})},$M={type:"spring",bounce:.1,duration:.3},vb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),bb={middle:{x:"0%",opacity:1},enter:vb(1),exit:vb(-1)},wb={exit:{visibility:"hidden"}},RM=e=>{const t=vn(Km(e));return qm({start:t,end:yo(t,41)})},xb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),jM=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Km(new Date(e).setMonth(r)),s=xb(o,t);return x.jsx("option",{value:s,"data-index":r,children:s},s)}),td={ArrowLeft:(e,t)=>t==="days"?DO(e,1):ug(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):Ji(e,1),ArrowUp:(e,t)=>t==="days"?MO(e,1):NO(e,1),ArrowDown:(e,t)=>t==="days"?Gm(e,1):Ym(e,1)},Sb=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),Tb=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=Ju({date:i,isAnimating:!1,year:Nr(i),direction:void 0,months:jM(i,e),week:qm({start:vn(i),end:zP(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:bo(new Date)}),onExitComplete:()=>(Sb(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:Nr(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Ji(m.date,1);return{date:y,isAnimating:!0,direction:1,year:Nr(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=ug(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:Nr(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:Nr(v)}},onChangeMonth:m=>{const y=m.target.value,b=Array.from(m.target.options).find(g=>g.value===y);if(b){const g=b.dataset.index||"",T=new Date(p.state().date);return T.setMonth(+g),{date:T,year:Nr(T)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in td){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,b=On.keyof(td,y)?td[y](v,m.shiftKey?"month":"days"):null;if(b!==null)return Sb(b),{date:b,year:Nr(b)}}return p.state()}})),c=RM(a.date),u=a.date.toISOString(),d=xb(a.date,e);w.useEffect(()=>s==null?void 0:s(a.date),[u]);const f=AM(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),f(m)};return x.jsx(tM,{transition:$M,children:x.jsxs("div",{className:"relative overflow-hidden",children:[x.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:x.jsx(VM,{children:x.jsx(Ea,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,custom:a.direction,onExitComplete:l.onExitComplete,children:x.jsxs(Jt.div,{initial:"enter",animate:"middle",exit:"exit",children:[x.jsxs("header",{className:"relative flex justify-between",children:[x.jsx(Jt.button,{onClick:l.previousMonth,variants:wb,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:x.jsx(dx,{className:"h-4 w-4"})}),x.jsx(Jt.span,{variants:bb,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:x.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[x.jsx("select",{style:{width:`${d.length}ch`},value:d,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),x.jsx(up,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),x.jsx(Jt.button,{variants:wb,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:l.nextMonth,children:x.jsx(qf,{className:"h-4 w-4"})}),x.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),x.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>x.jsx("span",{className:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),x.jsx(Jt.ul,{onKeyDown:l.onKeyDown,variants:bb,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=IO(p)&&n,b=(t==null?void 0:t(p))||!1,g=!AO(p,a.date)||b;return x.jsx("li",{className:"w-full flex items-center justify-center",children:x.jsx("button",{type:"button","data-date":m,disabled:b,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},d)})})}),x.jsx("footer",{className:"text-center text-primary mt-2",children:x.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Mo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[dl(10),mf({fallbackAxisSideDirection:"end"}),pf(),gf({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=vi({open:n,middleware:s,transform:!0,whileElementsMounted:ul,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=Vf(l),u=yi(l),d=xi(l),{getReferenceProps:f,getFloatingProps:h}=bi([c,u,d]);return x.jsxs(w.Fragment,{children:[x.jsx("button",{ref:i.setReference,...f(),type:"button",children:e.trigger}),n&&x.jsx(gi,{id:`${t}-portal`,children:x.jsx(vl,{restoreFocus:e.restoreFocus??!0,returnFocus:e.restoreFocus??!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:x.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[x.jsx(Sf,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),x.jsx("header",{className:"mb-2",children:x.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},Eb=new Date(1970,11,31),nd={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Cb={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},BM={literal:(e,t)=>t,year:e=>e.getFullYear(),day:e=>e.getDate().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},zM=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=w.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[l,c]=w.useState(e||void 0),[u,d]=w.useState(!1),f=a.formatToParts(Eb).flatMap(b=>On.keyof(nd,b.type)?nd[b.type](b.value):[]),h=a.formatToParts(Eb).reduce((b,g)=>b+(On.keyof(Cb,g.type)?Cb[g.type](g.value):""),""),[p,m]=w.useState(l?a.formatToParts(l).reduce((b,g)=>b+(On.keyof(nd,g.type)?BM[g.type](l,g.value):""),""):""),y=b=>{const g=b.target.value;if(m(g),f.length===g.length&&f.every((S,E)=>{const C=g.charAt(E);return typeof S=="string"?C===S:S.test(C)})){const S=bo(OO(g,h,new Date));c(S),o==null||o(S)}},v=b=>{c(b),o==null||o(b),m(Ik(b,h))};return x.jsx(us,{...i,mask:f,value:p,onChange:y,className:"uppercase",formNoValidate:!u,placeholder:h,required:i.required??!0,error:u?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:x.jsxs(w.Fragment,{children:[x.jsx("input",{defaultValue:l==null?void 0:l.toISOString(),hidden:!0,type:"date",name:i.name}),x.jsx(Mo,{restoreFocus:!0,trigger:x.jsx(ux,{}),onChange:d,open:u,children:x.jsx(Tb,{...i,locale:t,date:l,onChange:v,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},WM=bc("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-background text-secondary-foreground",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),HM=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return x.jsxs(hs,{...i,ref:a,"data-theme":o,as:i.as??"span",className:Mt(WM({size:s,theme:o}),t),children:[i.children,n]})}),Pb=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>x.jsxs(hs,{...s,as:"div",className:Mt("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?x.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,x.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),UM=e=>x.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[x.jsxs("header",{className:"p-6 items-start flex gap-4",children:[x.jsx("div",{className:Mt("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:x.jsx("div",{children:x.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("header",{children:x.jsx("h3",{className:"text-base leading-none",children:e.title})}),x.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?x.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),kb=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Ob=w.createContext(""),GM=e=>{const[t,n]=kb(e.active),r=Io(0),o=Io(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useEffect(()=>{const c=s.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},d=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",d);let f=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(f=c.querySelector(`li[data-id=${h}]`),n(h)),f===null){f=c.querySelector("li[data-id]");const p=f.getAttribute("data-id")||"";n(p)}return u(f),()=>window.removeEventListener("resize",d)},[]),w.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=w.Children.toArray(e.children),l=c=>{const u=c.currentTarget,d=u.getBoundingClientRect();o.set(d.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return x.jsx(Ob.Provider,{value:t,children:x.jsx(Pb,{className:e.className,container:"pt-0",header:x.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",children:[x.jsx(Jt.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"}),x.jsx("nav",{children:x.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 x.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:x.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:e.children})})},YM=()=>w.useContext(Ob),qM=e=>{const t=YM();return x.jsx(w.Fragment,{children:e.id===t?e.children:null})},KM=({children:e,as:t,title:n,...r})=>{const[o,s]=w.useState(!1),i=w.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=vi({open:o,onOpenChange:s,whileElementsMounted:ul,transform:!0,middleware:[dl(5),mf({fallbackAxisSideDirection:"start"}),pf(),gf({element:i,padding:5})]}),d=Lw(u,{move:!0}),f=Qw(u),h=yi(u),p=xi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=bi([d,f,h,p]);return x.jsxs(w.Fragment,{children:[x.jsx(a,{ref:l.setReference,...m(r),children:n}),x.jsx(gi,{children:o&&x.jsxs(hs,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[x.jsx(Sf,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};function ZM(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function XM(...e){return t=>e.forEach(n=>ZM(n,t))}var _b=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(JM);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return x.jsx(rd,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return x.jsx(rd,{...r,ref:t,children:n})});_b.displayName="Slot";var rd=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=tN(n);return M.cloneElement(n,{...eN(r,n.props),ref:t?XM(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});rd.displayName="SlotClone";var QM=({children:e})=>x.jsx(x.Fragment,{children:e});function JM(e){return M.isValidElement(e)&&e.type===QM}function eN(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function tN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const No="600ms",Ab=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:No},enter:{[e]:0,opacity:1,animationDuration:No},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:No}}),nN=Ab("left"),rN=Ab("right"),Ib={drawer:e=>e==="left"?nN:rN,dialog:{initial:{opacity:0,scale:.95,animationDuration:No},enter:{opacity:1,scale:[1.05,1],animationDuration:No},exit:{opacity:0,scale:.97,animationDuration:No}}},oN=bc("isolate ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8"},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"}}),sN={top:0,left:0,right:0,bottom:0},iN=e=>{const t=(n,r)=>{if(e.parent.current){const o=e.parent.current,s=e.value.get()||o.getBoundingClientRect().width,i=e.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(s+i))}};return x.jsx(Jt.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:sN,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${e.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},aN=({type:e="dialog",resizer:t=!0,...n})=>{const r=e==="dialog",o=r?"none":n.position||"left",s=r?Ib.dialog:Ib.drawer(o),i=w.useId(),a=w.useId(),{refs:l,context:c}=vi({open:n.open,onOpenChange:n.onChange}),u=Vf(c),d=xi(c),f=yi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=bi([u,d,f]),m=n.trigger,y=Io(void 0);return x.jsxs(w.Fragment,{children:[n.trigger?x.jsx(w.Fragment,{children:n.asChild?x.jsx(_b,{ref:l.setReference,...h(),children:m}):x.jsx("button",{ref:l.setReference,...h(),type:"button",children:m})}):null,x.jsx(gi,{children:x.jsx(Ea,{presenceAffectsLayout:!0,children:n.open&&x.jsx(qw,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${e==="drawer"?"":"grid justify-center p-8"}`,children:x.jsx(vl,{modal:!0,closeOnFocusOut:!0,context:c,children:x.jsxs(Jt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:oN({position:o,type:e}),exit:"exit",initial:"initial",ref:l.setFloating,variants:s,style:{width:y},...p(),children:[!r&&t?x.jsx(iN,{value:y,parent:l.floating,type:o}):null,n.title||n.closable?x.jsxs("header",{className:"w-full relative",children:[n.title?x.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?x.jsx("nav",{className:"absolute -top-1 right-8",children:x.jsx("button",{type:"button",onClick:()=>{var v;return(v=n.onChange)==null?void 0:v.call(n,!1)},className:"p-1 transition-colors hover:text-danger focus:text-danger",children:x.jsx(wx,{})})}):null]}):null,x.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?x.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var lN=Object.defineProperty,Db=Object.getOwnPropertySymbols,cN=Object.prototype.hasOwnProperty,uN=Object.prototype.propertyIsEnumerable,Mb=(e,t,n)=>t in e?lN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dN=(e,t)=>{for(var n in t||(t={}))cN.call(t,n)&&Mb(e,n,t[n]);if(Db)for(var n of Db(t))uN.call(t,n)&&Mb(e,n,t[n]);return e},od=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},fN=(e,t,n,r)=>ka(od,e,t,n,r),Fo=e=>typeof e=="object",fr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Fo(e)&&!Fo(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>fr(e[r],t[r]))},hN=(e,t)=>(Fo(e)||Array.isArray(e))&&t?e[t]:e,pN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Pa=e=>/[0-9.]+/.test(e),Nb=e=>["string","number"].includes(typeof e),Fb=e=>e==null||(e==null?void 0:e.length)===0||e==="",Lb={eq:fr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:Fb,notEmpty:e=>!Fb(e),in:(e,t)=>od(t,n=>fr(e,n)),notIn:(e,t)=>Vb(t,n=>!fr(e,n))},mN=e=>{if(e in Lb)return Lb[e];throw new Error("Linq - Symbol not found")},Lo=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},ka=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=mN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},gN=(e,t,n,r)=>ka(Lo,e,t,n,r),Vb=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},yN=(e,t,n,r)=>ka(Vb,e,t,n,r),$b=e=>{if(e===null)return null;const t=dN({},e);return Object.keys(t).forEach(n=>t[n]=Fo(e[n])?$b(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Rb=(e,t)=>{if(Fo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(fr(t,r))return!0}return!1},vN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},bN=e=>Lo(e,(t,n,r)=>Fo(t)?n===r.findIndex(o=>fr(o,t)):n===r.indexOf(t)),wN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},jb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},xN=(e,t)=>jb(e,n=>n[t]),Bb=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},SN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},TN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Pa(e)&&Pa(t)?r.map(i=>Number.parseInt(i)):r},sd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Pa(e)&&Pa(t)){const o=[],[s,i]=SN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return TN(e,t,r)},EN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?sd(r,o,1):sd(r,s,Number.parseInt(o,10))}return Nb(e)&&Nb(t)?sd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},id=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},zb=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let s=t[n];t[n]=t[r],t[r]=s}return t},CN=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},PN=(e,t,n,r)=>ka(CN,e,t,n,r),Wb=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(pN(t))},kN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),ON=(e,t)=>e.sort(kN(t)),_N=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Lo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},AN=class $d{constructor(t=[]){this.array=t}static Range(...t){return EN(...t)}static New(t){return new $d(t)}Where(t,n,r){return this.array=gN(this.array,t,n,r),this}Some(t,n,r){return fN(this.array,t,n,r)}All(t,n,r){return yN(this.array,t,n,r)}Reverse(){return this.array=zb(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=PN(this.array,t,n,r),this}Distinct(){return this.array=bN(this.array),this}First(t){return t===void 0?this.array[0]:wN(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?id((n,r)=>n+r,0,this.array):id((n,r)=>n+hN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return xN(this.array,t)}GroupWith(t){return jb(this.array,t)}Except(t){return Lo(this.array,n=>!Rb(t,n))}Intersect(t){return Lo(this.array,n=>Rb(t,n))}OrderBy(t,n){let r;return r=t?Wb(this.array,t):this.array.toSorted(),this.array=n==="desc"?zb(r):r,this}Includes(t){return od(this.array,n=>fr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return id(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Bb(this.array,n=>[t,n]))}Zip(t,n){return Bb(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Lo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new $d($b(this.array))}ToObject(t){return vN(this.array,t)}Sort(t){return Array.isArray(t)?ON(this.array,t):Wb(this.array,t)}Unique(t){return _N(this.array,t)}},Hb=AN;const Ub=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},Oa=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Gb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Yb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},qb=(e,t)=>{const n=Gb(t,Yb.basic,e)||Gb(t,Yb.extend,e);return n===void 0||n===e?void 0:n},ad=()=>typeof window>"u";var ld={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(b){window.console.log(b)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const b=v.getItem(y);try{return JSON.parse(b)}catch{return b??null}},s=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},d=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],f={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=f.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((S,E)=>{const C=E.parse(b);return C===""?S:S.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const v=new Set,b=g=>{y().removeItem(g);const T=s(y());v.forEach(S=>S(T))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),v.forEach(S=>S(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(ld);const Kb=e=>e.headerLabel??e.thead??e.id,cd=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Vo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Vo||{});const ud=e=>e.type==="number"?e.valueAsNumber:e.value,IN=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},DN={},MN=(e,t=DN)=>{const n=ad()?null:ld.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=Ju({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return ad()||ld.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Ft={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"}},dd={[Vo.Text]:[Ft.is,Ft.isNot,Ft.contains,Ft.notContains,Ft.startsWith,Ft.endsWith],[Vo.Boolean]:[Ft.is,Ft.isNot],[Vo.Number]:[Ft.is,Ft.isNot,Ft.greaterThan,Ft.lessThan]},fd=(e,t={})=>{var i;const n=e.id,r=e.type??Vo.Text,o=(i=dd[r])==null?void 0:i[0].value,s=Ft[o];return{id:Oa(),operation:s,label:Kb(e),name:n,type:r,value:"",...t}},NN=e=>{const t=()=>{const i=e.cols.at(0);e.set(a=>[...a,fd(i)])},n=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>{if(a!==u.id)return u;const d=e.cols.find(f=>l===f.id);return fd(d,{value:""})}))},r=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>u.id===a?{...u,operation:Ft[l]}:u))},o=i=>{const a=i.currentTarget.dataset.id||"";e.set(l=>l.filter(c=>c.id!==a))},s=i=>{const a=i.target.dataset.id||"",l=ud(i.target);e.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return x.jsx(w.Fragment,{children:x.jsx(Mo,{arrow:!1,title:"Filters",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(gx,{size:14}),"Filtros ",e.filters.length===0?"":` (${e.filters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(i=>{const a=dd[i.type];return x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(xr,{title:"Filter",options:e.options,placeholder:"Name...",value:i.name,"data-id":i.id,onChange:n}),x.jsx(xr,{title:"Filter type","data-id":i.id,onChange:r,value:i.operation.value,options:a,placeholder:"Operator..."}),x.jsx(us,{"data-id":i.id,onChange:s,placeholder:"Search...",title:"Value",type:i.type,value:i.value}),x.jsx("div",{className:"flex items-center justify-center mt-5",children:x.jsx("button",{"data-id":i.id,type:"button",onClick:o,children:x.jsx(eo,{className:"text-danger",size:16})})})]},`filter-select-${i.id}`)}),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[x.jsx(Sl,{size:14})," New filter"]})})]})})})},FN=({filter:e,onDelete:t,set:n})=>{const r=s=>{const i=s.target.value,a=s.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Ft[i]}:c))},o=s=>{const i=s.target.dataset.id||"",a=ud(s.target);n(l=>l.map(c=>c.id===i?{...c,value:a}:c))};return x.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[x.jsx(xr,{"data-id":e.id,onChange:r,options:dd[e.type],placeholder:"Operation...",title:"Filter type",value:e.operation.value}),x.jsx(us,{"data-id":e.id,onChange:o,placeholder:"Looking for...",title:"Value",type:e.type,value:e.value}),x.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:x.jsx(eo,{className:"text-danger",size:14})})]})},LN=({item:e,onPointerDown:t})=>{const n=Io(0);return x.jsxs(Ca.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[x.jsx("button",{type:"button",className:"cursor-grab",children:x.jsx(mx,{size:14})}),x.jsx("span",{children:e.groupName})]},e.groupId)},VN=e=>{var a;const t=cd(e.cols),n=wM(),[r,o]=w.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=l=>{var m;const c=l.target,u=c.value,d=c.options.selectedIndex,f=((m=c.options.item(d))==null?void 0:m.label)||"";o(f);const h=new Hb(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(kS(h).map((y,v)=>{const b=h[y];return{...p,groupId:Oa(),groupKey:u,index:v,rows:b,groupName:y}}))},i=()=>e.setGroups([]);return x.jsx(w.Fragment,{children:x.jsxs(Mo,{arrow:!1,title:"Groups",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(vx,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[x.jsxs("div",{className:"flex flex-nowrap items-center",children:[x.jsx(xr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),x.jsx(ps,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:x.jsx(eo,{size:16,className:"text-danger"})})]}),e.groups.length>0?x.jsxs("section",{className:"my-4",children:[x.jsx("header",{children:x.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),x.jsx(sM,{children:x.jsx(Ca.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>x.jsx(LN,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},$N=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),RN=(e,t)=>e.sort($N(t)),hd={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},jN=[hd.asc,hd.desc],pd=(e,t="asc")=>({id:Oa(),type:t,value:e.id,label:hd.asc.label}),BN=e=>{const t=()=>{const s=e.cols[0];s&&e.set(i=>[...i,pd(s)])},n=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,value:a}:c))},r=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,type:a}:c))},o=s=>{const i=s.currentTarget.dataset.id||"";e.set(a=>a.filter(l=>l.id!==i))};return x.jsx(w.Fragment,{children:x.jsx(Mo,{arrow:!1,title:"Order By",trigger:x.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[x.jsx(Gf,{size:14}),"Order by ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:x.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(s=>x.jsxs("li",{className:"flex flex-nowrap gap-3",children:[x.jsx(xr,{onChange:n(s.id),options:e.options,title:"Field",placeholder:"Selecione um campo...",value:s.value}),x.jsx(xr,{title:"Sort type",onChange:r(s.id),value:s.type,options:jN,placeholder:"Operação..."}),x.jsx("button",{className:"mt-4","data-id":s.id,onClick:o,children:x.jsx(eo,{className:"text-danger",size:14})})]},`sorter-select-${s.id}`)),x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[x.jsx(Sl,{size:14})," Add sort"]})})]})})})},zN=e=>{const[t,n]=w.useState(()=>{const o=e.sorters.find(s=>s.value===e.col.id);return o?o.type:"undefined"}),r=()=>n(o=>o==="undefined"?"asc":o==="asc"?"desc":"undefined");return w.useEffect(()=>{e.setSorters(o=>{if(t==="undefined")return o.filter(i=>i.value!==e.col.id);const s=o.findIndex(i=>i.value===e.col.id);return s===-1?[...o,pd(e.col,t)]:(o[s]=pd(e.col,t),[...o])})},[t,e.col]),x.jsxs("button",{className:"isolate flex items-center",onClick:r,type:"button",children:[t==="asc"?x.jsx(cx,{size:14}):null,t==="desc"?x.jsx(lx,{size:14}):null,t==="undefined"?x.jsx(Gf,{size:14}):null]})},WN=e=>x.jsx("header",{className:"min-w-full mb-1",children:x.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[x.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[x.jsx("span",{children:x.jsx(NN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),x.jsx("span",{children:x.jsx(BN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),x.jsx("span",{children:x.jsx(VN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),x.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:e.filters.map(t=>x.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[x.jsxs("span",{children:[x.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),x.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[x.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),x.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=ud(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function HN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const UN=e=>{const t=e.asLink||"button",n=w.useMemo(()=>HN(e.current,e.pages),[e.current,e.pages]),r=e.current<e.pages;return x.jsxs("footer",{className:"flex px-1 py-2 items-center justify-between flex-nowrap",children:[x.jsxs("p",{children:[e.current," to ",e.pages," of ",e.totalItems," items.",e.onChangeSize&&Array.isArray(e.sizes)?x.jsxs(w.Fragment,{children:[x.jsx("select",{value:e.size,className:"cursor-pointer bg-transparent",onChange:o=>{var s;(s=e.onChangeSize)==null||s.call(e,Number(o.target.value))},children:e.sizes.map(o=>x.jsx("option",{value:o,children:o}))})," per page"]}):null]}),x.jsx("nav",{children:x.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?x.jsx("li",{children:x.jsx(t,{href:"previous",className:"",children:"Previous"})}):null,n.map(o=>o===null?null:x.jsx(w.Fragment,{children:typeof o=="string"?x.jsx("li",{children:"..."}):x.jsx("li",{children:x.jsx(t,{href:o,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${o===e.current?"text-primary border-primary":"border-transparent"}`,children:o})},`pagination-${o}`)})),r?x.jsx("li",{children:x.jsx(t,{href:"next",className:"",children:"Next"})}):null]})})]})},GN={opacity:1},YN={opacity:.75,backgroundColor:"var(--table-border)"},qN={opacity:0,transition:{duration:.4,type:"spring"}},KN=e=>{var s;const t=e.filters.filter(i=>i.name===e.header.id),r=t.length>0?xx:yx,o=i=>{const a=i.currentTarget.dataset.id||"";return e.setFilters(l=>l.filter(c=>c.id!==a))};return x.jsx(Ca.Item,{...e.header.thProps,as:"th",exit:qN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:e.header,whileDrag:YN,animate:GN,className:`hidden font-medium px-2 py-4 first:table-cell md:table-cell ${((s=e.header.thProps)==null?void 0:s.className)??""}`,children:x.jsx("span",{className:"flex items-center justify-between",children:x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx(Mo,{title:`Filter by ${Kb(e.header)}`,arrow:!0,trigger:x.jsx(r,{size:14}),children:t.length===0===null?null:x.jsxs("ul",{className:"font-medium",children:[t.map(i=>x.jsx("li",{className:"my-1",children:x.jsx(FN,{onDelete:o,filter:i,set:e.setFilters})},`thead-filter-${i.id}`)),x.jsx("li",{children:x.jsxs("button",{onClick:()=>e.setFilters(i=>i.concat(fd(e.header))),className:"flex items-center",children:[x.jsx(Sl,{size:14})," Add"]})})]})}),x.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),x.jsx(zN,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},ZN=e=>x.jsx(Ca.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:x.jsx(Ea,{children:e.headers.map(t=>x.jsx(KN,{setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),XN=w.forwardRef((e,t)=>x.jsx("tbody",{...e,className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:x.jsx(Ea,{children:e.children})})),QN=w.forwardRef((e,t)=>x.jsx("table",{...e,ref:t,className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),JN=w.forwardRef((e,t)=>x.jsx("thead",{...e,className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),eF=w.forwardRef((e,t)=>x.jsx("tr",{...e,ref:t,className:`table-row ${e.className??""}`})),tF=w.forwardRef((e,t)=>e.context.loadingMore?x.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:x.jsx("tr",{className:"bg-card-background",children:x.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:x.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),nF={TableHead:JN,Table:QN,TableBody:XN,TableRow:eF,TableFoot:tF},rF=[0,0,0,0,0,0,0,0,0,0],oF=(e,t,n)=>{const r=n.cols,o=n.loading;return x.jsx(w.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=qb(t,s.id),c=s.Element;return w.createElement("td",{...s.cellProps,"data-matrix":a,key:`accessor-${e}-${i}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?x.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?x.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):x.jsx(w.Fragment,{children:On.nil(l)?"":l}))})})},sF=()=>x.jsx(w.Fragment,{}),Zb=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!0,setSorters:c,...u})=>{const d=w.useRef(null),[f,h]=w.useState(!1),p=Ub(n),m=Ub(u.loadingMore),y=w.useMemo(()=>{if(u.loading)return rF;if(r)return u.rows;const v=new Hb(u.rows);return e.length>0&&e.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:v.Where(b.name,b.operation.symbol,b.value)),i.length===0?v.Select():RN(v.Select(),i)},[u.rows,e,i,u.loading]);return w.useEffect(()=>{if(d.current===null)return()=>{};const v=d.current,b=new IntersectionObserver(g=>{var E;return g[g.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void h(!0)):h(!1)});return b.observe(v),()=>b.disconnect()},[]),x.jsxs("div",{className:"min-w-full",children:[x.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[x.jsx(CP,{data:y,useWindowScroll:!0,components:nF,totalCount:y.length,itemContent:oF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:f?sF:null,fixedHeaderContent:()=>x.jsx(ZN,{sorters:i,setSorters:c,filters:e,setFilters:s,headers:a,setCols:o})}),x.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?x.jsx(UN,{...t}):null]})},iF=(e,t)=>typeof t=="function"?t(e):t,aF=e=>{const t=e.operations??!0,n=w.useMemo(()=>cd(e.cols),[e.cols]),[r,o]=Ju({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:iF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return x.jsxs("div",{className:"relative min-w-full",children:[t?x.jsx(WN,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?x.jsx(Zb,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):x.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((s,i)=>x.jsx(Jt.div,{className:"min-w-full",children:x.jsx(Zb,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})};var lF=String.prototype.replace,cF=/%20/g,md={RFC1738:"RFC1738",RFC3986:"RFC3986"},gd={default:md.RFC3986,formatters:{RFC1738:function(e){return lF.call(e,cF,"+")},RFC3986:function(e){return String(e)}},RFC1738:md.RFC1738,RFC3986:md.RFC3986},uF=gd,yd=Object.prototype.hasOwnProperty,Fr=Array.isArray,Tn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),dF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Fr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Xb=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},fF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Fr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!yd.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Fr(t)&&!Fr(n)&&(o=Xb(t,r)),Fr(t)&&Fr(n)?(n.forEach(function(s,i){if(yd.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return yd.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},hF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},pF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},vd=1024,mF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=vd){for(var c=i.length>=vd?i.slice(l,l+vd):i,u=[],d=0;d<c.length;++d){var f=c.charCodeAt(d);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||s===uF.RFC1738&&(f===40||f===41)){u[u.length]=c.charAt(d);continue}if(f<128){u[u.length]=Tn[f];continue}if(f<2048){u[u.length]=Tn[192|f>>6]+Tn[128|f&63];continue}if(f<55296||f>=57344){u[u.length]=Tn[224|f>>12]+Tn[128|f>>6&63]+Tn[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=Tn[240|f>>18]+Tn[128|f>>12&63]+Tn[128|f>>6&63]+Tn[128|f&63]}a+=u.join("")}return a},gF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return dF(n),t},yF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},vF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},bF=function(t,n){return[].concat(t,n)},wF=function(t,n){if(Fr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Qb={arrayToObject:Xb,assign:hF,combine:bF,compact:gF,decode:pF,encode:mF,isBuffer:vF,isRegExp:yF,maybeMap:wF,merge:fF},Jb=iS,_a=Qb,Hs=gd,xF=Object.prototype.hasOwnProperty,e0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,SF=Array.prototype.push,t0=function(e,t){SF.apply(e,En(t)?t:[t])},TF=Date.prototype.toISOString,n0=Hs.default,pt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_a.encode,encodeValuesOnly:!1,format:n0,formatter:Hs.formatters[n0],indices:!1,serializeDate:function(t){return TF.call(t)},skipNulls:!1,strictNullHandling:!1},EF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},bd={},CF=function e(t,n,r,o,s,i,a,l,c,u,d,f,h,p,m,y,v,b){for(var g=t,T=b,S=0,E=!1;(T=T.get(bd))!==void 0&&!E;){var C=T.get(t);if(S+=1,typeof C<"u"){if(C===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(bd)>"u"&&(S=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=_a.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,pt.encoder,v,"key",p):n;g=""}if(EF(g)||_a.isBuffer(g)){if(c){var k=y?n:c(n,pt.encoder,v,"key",p);return[m(k)+"="+m(c(g,pt.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var N;if(r==="comma"&&En(g))y&&c&&(g=_a.maybeMap(g,c)),N=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))N=u;else{var L=Object.keys(g);N=d?L.sort(d):L}var O=l?n.replace(/\./g,"%2E"):n,j=o&&En(g)&&g.length===1?O+"[]":O;if(s&&En(g)&&g.length===0)return j+"[]";for(var D=0;D<N.length;++D){var _=N[D],F=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&F===null)){var $=f&&l?_.replace(/\./g,"%2E"):_,z=En(g)?typeof r=="function"?r(j,$):j:j+(f?"."+$:"["+$+"]");b.set(t,S);var q=Jb();q.set(bd,b),t0(I,e(F,z,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,d,f,h,p,m,y,v,q))}}return I},PF=function(t){if(!t)return pt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||pt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Hs.default;if(typeof t.format<"u"){if(!xF.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=pt.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in e0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=pt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:pt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:pt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:pt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:pt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?pt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:pt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:pt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:pt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:pt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:pt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:pt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:pt.strictNullHandling}},kF=function(e,t){var n=e,r=PF(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=e0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Jb(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||t0(i,CF(n[d],d,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var f=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},$o=Qb,wd=Object.prototype.hasOwnProperty,OF=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:$o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},_F=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},r0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},AF="utf8=%26%2310003%3B",IF="utf8=%E2%9C%93",DF=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===IF?c="utf-8":i[l]===AF&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),f=d===-1?u.indexOf("="):d+1,h,p;f===-1?(h=n.decoder(u,ct.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,f),ct.decoder,c,"key"),p=$o.maybeMap(r0(u.slice(f+1),n),function(y){return n.decoder(y,ct.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=_F(p)),u.indexOf("[]=")>-1&&(p=OF(p)?[p]:p);var m=wd.call(r,h);m&&n.duplicates==="combine"?r[h]=$o.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},MF=function(e,t,n,r){for(var o=r?t:r0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},NF=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&wd.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&wd.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),MF(u,n,r,o)}},FF=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ct.charset:t.charset,r=typeof t.duplicates>"u"?ct.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ct.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ct.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ct.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ct.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ct.decoder,delimiter:typeof t.delimiter=="string"||$o.isRegExp(t.delimiter)?t.delimiter:ct.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ct.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ct.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ct.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},LF=function(e,t){var n=FF(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?DF(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=NF(a,r[a],n,typeof e=="string");o=$o.merge(o,l,n)}return n.allowSparse===!0?o:$o.compact(o)},VF=kF,$F=LF,RF=gd,jF={formats:RF,parse:$F,stringify:VF},Pe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var o0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(o0||(o0={}));const te=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lr=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(e)?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(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},G=Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class en extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}en.create=e=>new en(e);const Us=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.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 e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case G.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case 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 ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let BF=Us;function xd(){return BF}const Sd=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function J(e,t){const n=xd(),r=Sd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(o=>!!o)});e.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return me;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return Lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),s0=e=>e.status==="aborted",i0=e=>e.status==="dirty",Aa=e=>e.status==="valid",Ia=e=>typeof Promise<"u"&&e instanceof Promise;function Da(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function a0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));var Ys,qs;class Cn{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l0=(e,t)=>{if(Aa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new en(e.common.issues);return this._error=n,this._error}}};function ye(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Lt,ctx:{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ia(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return l0(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Ia(o)?o:Promise.resolve(o));return l0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new $n({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rn.create(this,this._def)}nullable(){return Rr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return Xs.create(this,this._def)}or(t){return Fa.create([this,t],this._def)}and(t){return La.create(this,t,this._def)}transform(t){return new $n({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ba({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new f0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new za({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Wa.create(this,t)}readonly(){return Ha.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const zF=/^c[^\s-]{8,}$/i,WF=/^[0-9a-z]+$/,HF=/^[0-9A-HJKMNP-TV-Z]{26}$/,UF=/^[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,GF=/^[a-z0-9_-]{21}$/i,YF=/^[-+]?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)?)??$/,qF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,KF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Td;const ZF=/^(?:(?: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])$/,XF=/^(([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})))$/,QF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,c0="((\\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])))",JF=new RegExp(`^${c0}$`);function u0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function eL(e){return new RegExp(`^${u0(e)}$`)}function tL(e){let t=`${c0}T${u0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function nL(e,t){return!!((t==="v4"||!t)&&ZF.test(e)||(t==="v6"||!t)&&XF.test(e))}class Fn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.string,received:s.parsedType}),me}const r=new Lt;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")qF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"email",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Td||(Td=new RegExp(KF,"u")),Td.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"emoji",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")UF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"uuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")GF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"nanoid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")zF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")WF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid2",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")HF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ulid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),J(o,{validation:"url",code:G.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"regex",code:G.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?tL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?JF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?eL(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?YF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"duration",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?nL(t.data,s.version)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ip",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?QF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"base64",code:G.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:G.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function rL(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Vr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.number,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?rL(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Pe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Vr.create=e=>new Vr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ro extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==te.bigint){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.bigint,received:s.parsedType}),me}let r;const o=new Lt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ro.create=e=>{var t;return new Ro({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Ed extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),me}return zt(t.data)}}Ed.create=e=>new Ed({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ks extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_date}),me}const r=new Lt;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ks.create=e=>new Ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Cd extends xe{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),me}return zt(t.data)}}Cd.create=e=>new Cd({typeName:he.ZodSymbol,...ye(e)});class Ma extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),me}return zt(t.data)}}Ma.create=e=>new Ma({typeName:he.ZodUndefined,...ye(e)});class Na extends xe{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),me}return zt(t.data)}}Na.create=e=>new Na({typeName:he.ZodNull,...ye(e)});class Pd extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}Pd.create=e=>new Pd({typeName:he.ZodAny,...ye(e)});class jo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}jo.create=e=>new jo({typeName:he.ZodUnknown,...ye(e)});class hr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),me}}hr.create=e=>new hr({typeName:he.ZodNever,...ye(e)});class kd extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),me}return zt(t.data)}}kd.create=e=>new kd({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==te.array)return J(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(J(n,{code:i?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(J(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&&(J(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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Lt.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Lt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Bo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rn.create(Bo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Bo(e.element)}):e instanceof Rn?Rn.create(Bo(e.unwrap())):e instanceof Rr?Rr.create(Bo(e.unwrap())):e instanceof Vn?Vn.create(e.items.map(t=>Bo(t))):e}class nt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==te.object){const c=this._getOrReturnCtx(t);return J(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof hr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof hr){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&&(J(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 d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Bo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Rn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return d0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)});class Fa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new en(a.ctx.common.issues));return J(n,{code:G.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new en(l));return J(n,{code:G.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Fa.create=(e,t)=>new Fa({options:e,typeName:he.ZodUnion,...ye(t)});const Ln=e=>e instanceof $a?Ln(e.schema):e instanceof $n?Ln(e.innerType()):e instanceof Ra?[e.value]:e instanceof $r?e.options:e instanceof ja?Pe.objectValues(e.enum):e instanceof Ba?Ln(e._def.innerType):e instanceof Ma?[void 0]:e instanceof Na?[null]:e instanceof Rn?[void 0,...Ln(e.unwrap())]:e instanceof Rr?[null,...Ln(e.unwrap())]:e instanceof f0||e instanceof Ha?Ln(e.unwrap()):e instanceof za?Ln(e._def.innerType):[];class Od extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.object)return J(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Ln(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Od({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function _d(e,t){const n=Lr(e),r=Lr(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=_d(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=_d(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class La extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(s0(s)||s0(i))return me;const a=_d(s.value,i.value);return a.valid?((i0(s)||i0(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:G.invalid_intersection_types}),me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}La.create=(e,t,n)=>new La({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Vn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return J(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return J(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Lt.mergeArray(n,i)):Lt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Vn({...this._def,rest:t})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Va extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.object)return J(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,o):Lt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Va({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Va({keyType:Fn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Ad extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return J(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Ad.create=(e,t,n)=>new Ad({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class zo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return J(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(J(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&&(J(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new zo({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new zo({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zo.create=(e,t)=>new zo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class Zs extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.function)return J(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),me;function r(a,l){return Sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xd(),Us].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Sd({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xd(),Us].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Xs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zs({...this._def,args:Vn.create(t).rest(jo.create())})}returns(t){return new Zs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zs({args:t||Vn.create([]).rest(jo.create()),returns:n||jo.create(),typeName:he.ZodFunction,...ye(r)})}}class $a extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$a.create=(e,t)=>new $a({getter:e,typeName:he.ZodLazy,...ye(t)});class Ra extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ra.create=(e,t)=>new Ra({value:e,typeName:he.ZodLiteral,...ye(t)});function d0(e,t){return new $r({values:e,typeName:he.ZodEnum,...ye(t)})}class $r extends xe{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Pe.joinValues(r),received:n.parsedType,code:G.invalid_type}),me}if(Da(this,Ys)||a0(this,Ys,new Set(this._def.values)),!Da(this,Ys).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:G.invalid_enum_value,options:r}),me}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $r.create(t,{...this._def,...n})}exclude(t,n=this._def){return $r.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ys=new WeakMap,$r.create=d0;class ja extends xe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Pe.objectValues(n);return J(r,{expected:Pe.joinValues(o),received:r.parsedType,code:G.invalid_type}),me}if(Da(this,qs)||a0(this,qs,new Set(Pe.getValidEnumValues(this._def.values))),!Da(this,qs).has(t.data)){const o=Pe.objectValues(n);return J(r,{received:r.data,code:G.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}qs=new WeakMap,ja.create=(e,t)=>new ja({values:e,typeName:he.ZodNativeEnum,...ye(t)});class Xs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return J(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),me;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xs.create=(e,t)=>new Xs({type:e,typeName:he.ZodPromise,...ye(t)});class $n extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Gs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Gs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Aa(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Aa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}$n.create=(e,t,n)=>new $n({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),$n.createWithPreprocess=(e,t,n)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Rn extends xe{_parse(t){return this._getType(t)===te.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rn.create=(e,t)=>new Rn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Rr extends xe{_parse(t){return this._getType(t)===te.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rr.create=(e,t)=>new Rr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ba extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);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}}Ba.create=(e,t)=>new Ba({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ia(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Id extends xe{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Id.create=e=>new Id({typeName:he.ZodNaN,...ye(e)});class f0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Gs(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Wa({in:t,out:n,typeName:he.ZodPipeline})}}class Ha extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Aa(o)&&(o.value=Object.freeze(o.value)),o);return Ia(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.lazycreate;var he;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(he||(he={})),Fn.create,Vr.create,Id.create,Ro.create,Ed.create,Ks.create,Cd.create,Ma.create,Na.create,Pd.create,jo.create,hr.create,kd.create,ln.create,nt.create,nt.strictCreate,Fa.create,Od.create,La.create,Vn.create,Va.create,Ad.create,zo.create,Zs.create,$a.create,Ra.create,$r.create,ja.create,Xs.create,$n.create,Rn.create,Rr.create,$n.createWithPreprocess,Wa.create;const oL={sort:(e,t)=>e.localeCompare(t),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},h0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return jF.parse(n.toString(),oL)},p0=e=>e.replace("[",".").replace("]","").split("."),Dd=(e,t)=>p0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Ua=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,sL=e=>{const[t,n]=w.useState(null),r=w.useRef({}),o=(l,c)=>{const u=Dd(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}},s=(l,c)=>{const u=Dd(l,e);return{...c,name:l,id:l,type:On.instance(u,Vr)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:d=>{d!==null&&(r.current[l]={element:d,schema:u})}}};w.useEffect(()=>{const l=Object.values(r.current).map(u=>{const d=u.schema.safeParse(Ua(u.element)),f=p=>{const m=u.schema.safeParse(Ua(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...T}=b||{};return T===null||On.empty(T)?null:T});if(y.required){const b=m.error.issues[0].message;y.setCustomValidity(b),n(g=>({...g,[v]:b}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,f),{input:u,hasInitialError:u.element.required?!d.success:!1,unsubscribe:()=>u.element.removeEventListener(h,f)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,d=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Ua(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),f=On.empty(d)?null:{};n(f),l==null||l({form:u,errors:f||{}})},[]),a=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let d=h0(u);Array.from(u.elements).forEach(f=>{if(f.tagName==="SELECT"){const h=f;d=zh(d,h.name,h.value)}if(f.tagName==="INPUT"){const h=f;d=zh(d,h.name,Ua(h))}}),l({form:u,json:d,event:c,reset:()=>Zp(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},iL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},rounded:{pill:"2rem",card:"0.75rem",full:"9999px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",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, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 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%)"}}},aL={name:"light",shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 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%)"}}},lL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Qs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Qs(i,t,n,a))},[]),m0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:m0(i,t,n,a)}},{}),g0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Md=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},cL={default:e=>Md(e,{result:g0.default}),dark:e=>Md(e,{result:g0.dark})},uL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Qs(e.colors,n),o=Qs(e.spacing,n),s=Qs(e.rounded,n);return Md(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};re.Autocomplete=fT,re.Button=ps,re.ButtonGroup=$E,re.Calendar=Tb,re.Card=Pb,re.Checkbox=Wm,re.ColType=Vo,re.DatePicker=zM,re.Dropdown=Mo,re.FileUpload=HE,re.Form=GE,re.Input=us,re.InputFeedback=Zh,re.InputField=Di,re.Modal=aN,re.Option=Xh,re.Polymorph=hs,re.Radiobox=_P,re.Select=xr,re.Stats=UM,re.Switch=YE,re.Tab=qM,re.Table=aF,re.Tabs=GM,re.Tag=HM,re.Tooltip=KM,re.TransferList=OP,re.convertPath=p0,re.createColumns=IN,re.createDesignTokens=m0,re.createOptionCols=cd,re.createStyles=cL,re.createTheme=uL,re.css=Mt,re.defaultDarkTheme=iL,re.defaultLightTheme=aL,re.dispatchInput=Xl,re.formReset=Zp,re.formToJson=h0,re.getSchemaShape=Dd,re.isReactComponent=aT,re.isReactFC=lT,re.isSsr=ad,re.mergeRefs=Zl,re.parsers=lL,re.path=qb,re.reduceTokens=Qs,re.useForm=sL,re.usePrevious=Kf,re.useReactive=kb,re.useTablePreferences=MN,re.uuid=Oa,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
171
186
|
//# sourceMappingURL=index.umd.js.map
|