@g4rcez/components 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +7 -6
  2. package/dist/components/core/button.d.ts +2 -2
  3. package/dist/components/core/button.d.ts.map +1 -1
  4. package/dist/components/core/button.js +9 -10
  5. package/dist/components/core/tag.d.ts +15 -0
  6. package/dist/components/core/tag.d.ts.map +1 -0
  7. package/dist/components/core/tag.js +36 -0
  8. package/dist/components/floating/modal.d.ts +14 -0
  9. package/dist/components/floating/modal.d.ts.map +1 -0
  10. package/dist/components/floating/modal.js +36 -0
  11. package/dist/components/index.d.ts +1 -0
  12. package/dist/components/index.d.ts.map +1 -1
  13. package/dist/components/index.js +1 -0
  14. package/dist/components/table/filter.d.ts +2 -1
  15. package/dist/components/table/filter.d.ts.map +1 -1
  16. package/dist/components/table/filter.js +0 -1
  17. package/dist/components/table/table-lib.d.ts +17 -10
  18. package/dist/components/table/table-lib.d.ts.map +1 -1
  19. package/dist/index.css +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +7698 -7618
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/index.umd.js +33 -33
  24. package/dist/index.umd.js.map +1 -1
  25. package/dist/lib/dom.d.ts +2 -1
  26. package/dist/lib/dom.d.ts.map +1 -1
  27. package/dist/lib/dom.js +2 -0
  28. package/dist/preset/preset.tailwind.d.ts +1 -4
  29. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  30. package/dist/preset/preset.tailwind.js +20 -13
  31. package/dist/preset/src/styles/design-tokens.d.ts +12 -19
  32. package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
  33. package/dist/preset/src/styles/design-tokens.js +26 -11
  34. package/dist/preset/src/styles/theme.d.ts +3 -68
  35. package/dist/preset/src/styles/theme.d.ts.map +1 -1
  36. package/dist/preset/src/styles/theme.js +96 -72
  37. package/dist/preset/src/styles/theme.types.d.ts +93 -0
  38. package/dist/preset/src/styles/theme.types.d.ts.map +1 -0
  39. package/dist/preset/src/styles/theme.types.js +1 -0
  40. package/dist/styles/design-tokens.d.ts +12 -19
  41. package/dist/styles/design-tokens.d.ts.map +1 -1
  42. package/dist/styles/design-tokens.js +26 -11
  43. package/dist/styles/theme.d.ts +3 -68
  44. package/dist/styles/theme.d.ts.map +1 -1
  45. package/dist/styles/theme.js +96 -72
  46. package/dist/styles/theme.types.d.ts +93 -0
  47. package/dist/styles/theme.types.d.ts.map +1 -0
  48. package/dist/styles/theme.types.js +1 -0
  49. package/package.json +78 -14
package/dist/index.umd.js CHANGED
@@ -1,77 +1,77 @@
1
- (function(pe,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):(pe=typeof globalThis<"u"?globalThis:pe||self,w(pe.components={},pe.React,pe["react/jsx-runtime"],pe.ReactDOM))})(this,function(pe,w,E,Nu){"use strict";function Vu(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const R=Vu(w),$u=Vu(Nu);function En(t){return ju(t)?(t.nodeName||"").toLowerCase():"#document"}function Et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function un(t){var e;return(e=(ju(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ju(t){return t instanceof Node||t instanceof Et(t).Node}function Ve(t){return t instanceof Element||t instanceof Et(t).Element}function Je(t){return t instanceof HTMLElement||t instanceof Et(t).HTMLElement}function ca(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Et(t).ShadowRoot}function co(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=It(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Mv(t){return["table","td","th"].includes(En(t))}function yi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ua(t){const e=fa(),n=It(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Rv(t){let e=fn(t);for(;Je(e)&&!Cn(e);){if(yi(e))return null;if(ua(e))return e;e=fn(e)}return null}function fa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Cn(t){return["html","body","#document"].includes(En(t))}function It(t){return Et(t).getComputedStyle(t)}function vi(t){return Ve(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function fn(t){if(En(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ca(t)&&t.host||un(t);return ca(e)?e.host:e}function Bu(t){const e=fn(t);return Cn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Je(e)&&co(e)?e:Bu(e)}function An(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Bu(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=Et(o);return i?e.concat(s,s.visualViewport||[],co(o)?o:[],s.frameElement&&n?An(s.frameElement):[]):e.concat(o,An(o,[],n))}function Bt(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function it(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ca(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function zu(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Wu(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Hu(t){return t.mozInputSource===0&&t.isTrusted?!0:pa()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function da(t){return Fv()?!1:!pa()&&t.width===0&&t.height===0||pa()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function ha(){return/apple/i.test(navigator.vendor)}function pa(){const t=/android/i;return t.test(zu())||t.test(Wu())}function Uu(){return zu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Fv(){return Wu().includes("jsdom/")}function uo(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function Lv(t){return"nativeEvent"in t}function Nv(t){return t.matches("html,body")}function st(t){return(t==null?void 0:t.ownerDocument)||document}function ma(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function _n(t){return"composedPath"in t?t.composedPath()[0]:t.target}const Vv="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ga(t){return Je(t)&&t.matches(Vv)}function yt(t){t.preventDefault(),t.stopPropagation()}function Gu(t){return t?t.getAttribute("role")==="combobox"&&ga(t):!1}const Zt=Math.min,kt=Math.max,bi=Math.round,xr=Math.floor,Pn=t=>({x:t,y:t}),$v={left:"right",right:"left",bottom:"top",top:"bottom"},jv={start:"end",end:"start"};function ya(t,e,n){return kt(t,Zt(e,n))}function wr(t,e){return typeof t=="function"?t(e):t}function On(t){return t.split("-")[0]}function Sr(t){return t.split("-")[1]}function Ku(t){return t==="x"?"y":"x"}function va(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(On(t))?"y":"x"}function ba(t){return Ku(qn(t))}function Bv(t,e,n){n===void 0&&(n=!1);const r=Sr(t),o=ba(t),i=va(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=xi(s)),[s,xi(s)]}function zv(t){const e=xi(t);return[xa(t),e,xa(e)]}function xa(t){return t.replace(/start|end/g,e=>jv[e])}function Wv(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:s;default:return[]}}function Hv(t,e,n,r){const o=Sr(t);let i=Wv(On(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(xa)))),i}function xi(t){return t.replace(/left|right|bottom|top/g,e=>$v[e])}function Uv(t){return{top:0,right:0,bottom:0,left:0,...t}}function Zu(t){return typeof t!="number"?Uv(t):{top:t,right:t,bottom:t,left:t}}function wi(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}/*!
1
+ (function(fe,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],x):(fe=typeof globalThis<"u"?globalThis:fe||self,x(fe.components={},fe.React,fe["react/jsx-runtime"],fe.ReactDOM))})(this,function(fe,x,E,$u){"use strict";function ju(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const F=ju(x),Bu=ju($u);function En(t){return zu(t)?(t.nodeName||"").toLowerCase():"#document"}function Et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function un(t){var e;return(e=(zu(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zu(t){return t instanceof Node||t instanceof Et(t).Node}function Ve(t){return t instanceof Element||t instanceof Et(t).Element}function Je(t){return t instanceof HTMLElement||t instanceof Et(t).HTMLElement}function ua(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Et(t).ShadowRoot}function co(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=It(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Fv(t){return["table","td","th"].includes(En(t))}function xi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function fa(t){const e=da(),n=It(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Rv(t){let e=fn(t);for(;Je(e)&&!Cn(e);){if(xi(e))return null;if(fa(e))return e;e=fn(e)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Cn(t){return["html","body","#document"].includes(En(t))}function It(t){return Et(t).getComputedStyle(t)}function wi(t){return Ve(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function fn(t){if(En(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ua(t)&&t.host||un(t);return ua(e)?e.host:e}function Wu(t){const e=fn(t);return Cn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Je(e)&&co(e)?e:Wu(e)}function An(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Wu(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=Et(o);return i?e.concat(s,s.visualViewport||[],co(o)?o:[],s.frameElement&&n?An(s.frameElement):[]):e.concat(o,An(o,[],n))}function zt(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function it(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&ua(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function Hu(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Uu(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Gu(t){return t.mozInputSource===0&&t.isTrusted?!0:ma()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function ha(t){return Lv()?!1:!ma()&&t.width===0&&t.height===0||ma()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function pa(){return/apple/i.test(navigator.vendor)}function ma(){const t=/android/i;return t.test(Hu())||t.test(Uu())}function Ku(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Lv(){return Uu().includes("jsdom/")}function uo(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function Nv(t){return"nativeEvent"in t}function Vv(t){return t.matches("html,body")}function st(t){return(t==null?void 0:t.ownerDocument)||document}function ga(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function _n(t){return"composedPath"in t?t.composedPath()[0]:t.target}const $v="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ya(t){return Je(t)&&t.matches($v)}function yt(t){t.preventDefault(),t.stopPropagation()}function Zu(t){return t?t.getAttribute("role")==="combobox"&&ya(t):!1}const Zt=Math.min,kt=Math.max,Si=Math.round,xr=Math.floor,Pn=t=>({x:t,y:t}),jv={left:"right",right:"left",bottom:"top",top:"bottom"},Bv={start:"end",end:"start"};function va(t,e,n){return kt(t,Zt(e,n))}function wr(t,e){return typeof t=="function"?t(e):t}function On(t){return t.split("-")[0]}function Sr(t){return t.split("-")[1]}function qu(t){return t==="x"?"y":"x"}function ba(t){return t==="y"?"height":"width"}function qn(t){return["top","bottom"].includes(On(t))?"y":"x"}function xa(t){return qu(qn(t))}function zv(t,e,n){n===void 0&&(n=!1);const r=Sr(t),o=xa(t),i=ba(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Ti(s)),[s,Ti(s)]}function Wv(t){const e=Ti(t);return[wa(t),e,wa(e)]}function wa(t){return t.replace(/start|end/g,e=>Bv[e])}function Hv(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:s;default:return[]}}function Uv(t,e,n,r){const o=Sr(t);let i=Hv(On(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(wa)))),i}function Ti(t){return t.replace(/left|right|bottom|top/g,e=>jv[e])}function Gv(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yu(t){return typeof t!="number"?Gv(t):{top:t,right:t,bottom:t,left:t}}function Ei(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}/*!
2
2
  * tabbable 6.2.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
- */var Gv=["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])"],Si=Gv.join(","),qu=typeof Element>"u",Tr=qu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ti=!qu&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ei=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},Kv=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},Zv=function(e,n,r){if(Ei(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Si));return n&&Tr.call(e,Si)&&o.unshift(e),o=o.filter(r),o},qv=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!Ei(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Tr.call(s,Si);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Ei(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var h=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},Yu=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Xu=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Kv(e))&&!Yu(e)?0:e.tabIndex},Yv=function(e,n){var r=Xu(e);return r<0&&n&&!Yu(e)?0:r},Xv=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ju=function(e){return e.tagName==="INPUT"},Jv=function(e){return Ju(e)&&e.type==="hidden"},Qv=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},eb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},tb=function(e){if(!e.name)return!0;var n=e.form||Ti(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=eb(o,e.form);return!i||i===e},nb=function(e){return Ju(e)&&e.type==="radio"},rb=function(e){return nb(e)&&!tb(e)},ob=function(e){var n,r=e&&Ti(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,u,f;r=Ti(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Qu=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},ib=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Tr.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Tr.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Ti(e);if(l&&!l.shadowRoot&&o(l)===!0)return Qu(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(ob(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Qu(e);return!1},sb=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Tr.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},ab=function(e,n){return!(n.disabled||Ei(n)||Jv(n)||ib(n,e)||Qv(n)||sb(n))},wa=function(e,n){return!(rb(n)||Xu(n)<0||!ab(e,n))},lb=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},cb=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Yv(a,s),c=s?t(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(Xv).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ci=function(e,n){n=n||{};var r;return n.getShadowRoot?r=qv([e],n.includeContainer,{filter:wa.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:lb}):r=Zv(e,n.includeContainer,wa.bind(null,n)),cb(r)},ub=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Tr.call(e,Si)===!1?!1:wa(n,e)};function ef(t,e,n){let{reference:r,floating:o}=t;const i=qn(e),s=ba(e),a=va(s),l=On(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Sr(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}const fb=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=ef(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:S,reset:x}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=b??u,f=g??f,h={...h,[y]:{...h[y],...S}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):x.rects),{x:u,y:f}=ef(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function Sa(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=wr(e,t),p=Zu(h),y=a[d?f==="floating"?"reference":"floating":f],v=wi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},x=wi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-x.top+p.top)/S.y,bottom:(x.bottom-v.bottom+p.bottom)/S.y,left:(v.left-x.left+p.left)/S.x,right:(x.right-v.right+p.right)/S.x}}const db=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wr(t,e)||{};if(c==null)return{};const f=Zu(u),d={x:n,y:r},h=ba(o),p=va(h),m=await s.getDimensions(c),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-d[h]-i.floating[p],x=d[h]-i.reference[h],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=T?T[g]:0;(!P||!await(s.isElement==null?void 0:s.isElement(T)))&&(P=a.floating[g]||i.floating[p]);const O=S/2-x/2,k=P/2-m[p]/2-1,D=Zt(f[v],k),L=Zt(f[b],k),A=D,j=P-m[p]-L,F=P/2-m[p]/2+O,_=ya(A,F,j),M=!l.arrow&&Sr(o)!=null&&F!==_&&i.reference[p]/2-(F<A?D:L)-m[p]/2<0,N=M?F<A?F-A:F-j:0;return{[h]:d[h]+N,data:{[h]:_,centerOffset:F-_-N,...M&&{alignmentOffset:N}},reset:M}}}),hb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=wr(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=On(o),b=qn(a),g=On(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=d||(g||!m?[xi(a)]:zv(a)),T=p!=="none";!d&&T&&x.push(...Hv(a,m,p,S));const P=[a,...x],O=await Sa(e,y),k=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(O[v]),f){const F=Bv(o,s,S);k.push(O[F[0]],O[F[1]])}if(D=[...D,{placement:o,overflows:k}],!k.every(F=>F<=0)){var L,A;const F=(((L=i.flip)==null?void 0:L.index)||0)+1,_=P[F];if(_)return{data:{index:F,overflows:D},reset:{placement:_}};let M=(A=D.filter(N=>N.overflows[0]<=0).sort((N,z)=>N.overflows[1]-z.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(h){case"bestFit":{var j;const N=(j=D.filter(z=>{if(T){const q=qn(z.placement);return q===b||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,C)=>q+C,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];N&&(M=N);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function pb(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=On(n),a=Sr(n),l=qn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=wr(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const mb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await pb(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},gb=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=wr(t,e),c={x:n,y:r},u=await Sa(e,l),f=qn(On(o)),d=Ku(f);let h=c[d],p=c[f];if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=ya(b,h,g)}if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=ya(b,p,g)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},yb=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...a}=wr(t,e),l=await Sa(e,a),c=On(n),u=Sr(n),f=qn(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=d-l.left-l.right,b=Zt(h-l[p],y),g=Zt(d-l[m],v),S=!e.middlewareData.shift;let x=b,T=g;if(f?T=u||S?Zt(g,v):v:x=u||S?Zt(b,y):y,S&&!u){const O=kt(l.left,0),k=kt(l.right,0),D=kt(l.top,0),L=kt(l.bottom,0);f?T=d-2*(O!==0||k!==0?O+k:kt(l.left,l.right)):x=h-2*(D!==0||L!==0?D+L:kt(l.top,l.bottom))}await s({...e,availableWidth:T,availableHeight:x});const P=await o.getDimensions(i.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function tf(t){const e=It(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Je(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=bi(n)!==i||bi(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ta(t){return Ve(t)?t:t.contextElement}function Er(t){const e=Ta(t);if(!Je(e))return Pn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=tf(e);let s=(i?bi(n.width):n.width)/r,a=(i?bi(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const vb=Pn(0);function nf(t){const e=Et(t);return!fa()||!e.visualViewport?vb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function bb(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Et(t)?!1:e}function Yn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=Ta(t);let s=Pn(1);e&&(r?Ve(r)&&(s=Er(r)):s=Er(t));const a=bb(i,n,r)?nf(i):Pn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=Et(i),h=r&&Ve(r)?Et(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const y=Er(m),v=m.getBoundingClientRect(),b=It(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=S,p=Et(m),m=p.frameElement}}return wi({width:u,height:f,x:l,y:c})}function xb(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=un(r),a=e?yi(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Pn(1);const u=Pn(0),f=Je(r);if((f||!f&&!i)&&((En(r)!=="body"||co(s))&&(l=vi(r)),Je(r))){const d=Yn(r);c=Er(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 wb(t){return Array.from(t.getClientRects())}function rf(t){return Yn(un(t)).left+vi(t).scrollLeft}function Sb(t){const e=un(t),n=vi(t),r=t.ownerDocument.body,o=kt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=kt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+rf(t);const a=-n.scrollTop;return It(r).direction==="rtl"&&(s+=kt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Tb(t,e){const n=Et(t),r=un(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=fa();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Eb(t,e){const n=Yn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Je(t)?Er(t):Pn(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function of(t,e,n){let r;if(e==="viewport")r=Tb(t,n);else if(e==="document")r=Sb(un(t));else if(Ve(e))r=Eb(e,n);else{const o=nf(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return wi(r)}function sf(t,e){const n=fn(t);return n===e||!Ve(n)||Cn(n)?!1:It(n).position==="fixed"||sf(n,e)}function Cb(t,e){const n=e.get(t);if(n)return n;let r=An(t,[],!1).filter(a=>Ve(a)&&En(a)!=="body"),o=null;const i=It(t).position==="fixed";let s=i?fn(t):t;for(;Ve(s)&&!Cn(s);){const a=It(s),l=ua(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||co(s)&&!l&&sf(t,s))?r=r.filter(u=>u!==s):o=a,s=fn(s)}return e.set(t,r),r}function Ab(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?yi(e)?[]:Cb(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=of(e,u,o);return c.top=kt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=kt(f.left,c.left),c},of(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _b(t){const{width:e,height:n}=tf(t);return{width:e,height:n}}function Pb(t,e,n){const r=Je(e),o=un(e),i=n==="fixed",s=Yn(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Pn(0);if(r||!r&&!i)if((En(e)!=="body"||co(o))&&(a=vi(e)),r){const f=Yn(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=rf(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Ea(t){return It(t).position==="static"}function af(t,e){return!Je(t)||It(t).position==="fixed"?null:e?e(t):t.offsetParent}function lf(t,e){const n=Et(t);if(yi(t))return n;if(!Je(t)){let o=fn(t);for(;o&&!Cn(o);){if(Ve(o)&&!Ea(o))return o;o=fn(o)}return n}let r=af(t,e);for(;r&&Mv(r)&&Ea(r);)r=af(r,e);return r&&Cn(r)&&Ea(r)&&!ua(r)?n:r||Rv(t)||n}const Ob=async function(t){const e=this.getOffsetParent||lf,n=this.getDimensions,r=await n(t.floating);return{reference:Pb(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ib(t){return It(t).direction==="rtl"}const kb={convertOffsetParentRelativeRectToViewportRelativeRect:xb,getDocumentElement:un,getClippingRect:Ab,getOffsetParent:lf,getElementRects:Ob,getClientRects:wb,getDimensions:_b,getScale:Er,isElement:Ve,isRTL:Ib};function Db(t,e){let n=null,r;const o=un(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=xr(u),p=xr(o.clientWidth-(c+f)),m=xr(o.clientHeight-(u+d)),y=xr(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:kt(0,Zt(1,l))||1};let g=!0;function S(x){const T=x[0].intersectionRatio;if(T!==l){if(!g)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),i}function Ca(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ta(t),u=o||i?[...c?An(c):[],...An(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?Db(c,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Yn(t):null;l&&y();function y(){const v=Yn(t);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),i&&b.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Mb=mb,Rb=gb,Fb=hb,Lb=yb,cf=db,Nb=(t,e,n)=>{const r=new Map,o={platform:kb,...n},i={...o.platform,_c:r};return fb(t,e,{...o,platform:i})};var Ai=typeof document<"u"?w.useLayoutEffect:w.useEffect;function _i(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!_i(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!_i(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function uf(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ff(t,e){const n=uf(t);return Math.round(e*n)/n}function df(t){const e=R.useRef(t);return Ai(()=>{e.current=t}),e}function Vb(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=R.useState(r);_i(d,r)||h(r);const[p,m]=R.useState(null),[y,v]=R.useState(null),b=R.useCallback(N=>{N!==T.current&&(T.current=N,m(N))},[]),g=R.useCallback(N=>{N!==P.current&&(P.current=N,v(N))},[]),S=i||p,x=s||y,T=R.useRef(null),P=R.useRef(null),O=R.useRef(u),k=l!=null,D=df(l),L=df(o),A=R.useCallback(()=>{if(!T.current||!P.current)return;const N={placement:e,strategy:n,middleware:d};L.current&&(N.platform=L.current),Nb(T.current,P.current,N).then(z=>{const q={...z,isPositioned:!0};j.current&&!_i(O.current,q)&&(O.current=q,$u.flushSync(()=>{f(q)}))})},[d,e,n,L]);Ai(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const j=R.useRef(!1);Ai(()=>(j.current=!0,()=>{j.current=!1}),[]),Ai(()=>{if(S&&(T.current=S),x&&(P.current=x),S&&x){if(D.current)return D.current(S,x,A);A()}},[S,x,A,D,k]);const F=R.useMemo(()=>({reference:T,floating:P,setReference:b,setFloating:g}),[b,g]),_=R.useMemo(()=>({reference:S,floating:x}),[S,x]),M=R.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const z=ff(_.floating,u.x),q=ff(_.floating,u.y);return a?{...N,transform:"translate("+z+"px, "+q+"px)",...uf(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,_.floating,u.x,u.y]);return R.useMemo(()=>({...u,update:A,refs:F,elements:_,floatingStyles:M}),[u,A,F,_,M])}const $b=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?cf({element:r.current,padding:o}).fn(n):{}:r?cf({element:r,padding:o}).fn(n):{}}}},Aa=(t,e)=>({...Mb(t),options:[t,e]}),hf=(t,e)=>({...Rb(t),options:[t,e]}),pf=(t,e)=>({...Fb(t),options:[t,e]}),jb=(t,e)=>({...Lb(t),options:[t,e]}),mf=(t,e)=>({...$b(t),options:[t,e]}),gf={...R},Bb=gf.useInsertionEffect||(t=>t());function Dt(t){const e=R.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Bb(()=>{e.current=t}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const _a="ArrowUp",fo="ArrowDown",Cr="ArrowLeft",Ar="ArrowRight";function Pi(t,e,n){return Math.floor(t/e)!==n}function ho(t,e){return e<0||e>=t.current.length}function Pa(t,e){return dt(t,{disabledIndices:e})}function yf(t,e){return dt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function dt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&Oi(s,a,o));return a}function zb(t,e){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===_a){if(u&&yt(n),c===-1)f=l;else if(f=dt(t,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const d=c%i,h=l%i,p=l-(h-d);h===d?f=l:f=h>d?p:p-i}ho(t,f)&&(f=c)}if(n.key===fo&&(u&&yt(n),c===-1?f=a:(f=dt(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=dt(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),ho(t,f)&&(f=c)),r==="both"){const d=xr(c/i);n.key===Ar&&(u&&yt(n),c%i!==i-1?(f=dt(t,{startingIndex:c,disabledIndices:s}),o&&Pi(f,i,d)&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s})),Pi(f,i,d)&&(f=c)),n.key===Cr&&(u&&yt(n),c%i!==0?(f=dt(t,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&Pi(f,i,d)&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Pi(f,i,d)&&(f=c));const h=xr(l/i)===d;ho(t,f)&&(o&&h?f=n.key===Cr?l:dt(t,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function Wb(t,e,n){const r=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*e);o%e+a<=e&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function Hb(t,e,n,r,o){if(t===-1)return-1;const i=n.indexOf(t),s=e[t];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(t)}}function Ub(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}function Oi(t,e,n){if(n)return n.includes(e);const r=t[e];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let vf=0;function dn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=e;r&&cancelAnimationFrame(vf);const i=()=>t==null?void 0:t.focus({preventScroll:n});o?i():vf=requestAnimationFrame(i)}var je=typeof document<"u"?w.useLayoutEffect:w.useEffect;function po(){return po=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},po.apply(this,arguments)}let bf=!1,Gb=0;const xf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Gb++;function Kb(){const[t,e]=R.useState(()=>bf?xf():void 0);return je(()=>{t==null&&e(xf())},[]),R.useEffect(()=>{bf=!0},[]),t}const mo=gf.useId||Kb;let go;process.env.NODE_ENV!=="production"&&(go=new Set);function Ii(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.warn(o)}}function Zb(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.error(o)}}const wf=R.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=e;process.env.NODE_ENV!=="production"&&(n||Ii("The `ref` prop is required for `FloatingArrow`."));const y=mo(),[v,b]=R.useState(!1);if(je(()=>{if(!o)return;It(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,S=g/2,x=s/2*(l/-8+1),T=a/2*l/4,[P,O]=r.split("-"),k=!!d,D=P==="top"||P==="bottom",L=u&&O==="end"?"bottom":"top";let A=u&&O==="end"?"right":"left";u&&v&&(A=O==="end"?"left":"right");const j=(i==null?void 0:i.x)!=null?u||i.x:"",F=(i==null?void 0:i.y)!=null?u||i.y:"",_=d||"M0,0"+(" H"+s)+(" L"+(s-x)+","+(a-T))+(" Q"+s/2+","+a+" "+x+","+(a-T))+" Z",M={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[P];return R.createElement("svg",po({},m,{"aria-hidden":!0,ref:n,width:k?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[A]:j,[L]:F,[P]:D||k?"100%":"calc(100% - "+g/2+"px)",transform:""+M+(h??""),...p}}),g>0&&R.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:_}),R.createElement("path",{stroke:g&&!d?m.fill:"none",d:_}),R.createElement("clipPath",{id:y},R.createElement("rect",{x:-S,y:S*(k?-1:1),width:s+g,height:s})))});function qb(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const Yb=R.createContext(null),Xb=R.createContext(null),ki=()=>{var t;return((t=R.useContext(Yb))==null?void 0:t.id)||null},yo=()=>R.useContext(Xb);function Xn(t){return"data-floating-ui-"+t}function vt(t){const e=w.useRef(t);return je(()=>{e.current=t}),e}const Sf=Xn("safe-polygon");function Oa(t,e,n){return n&&!uo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Jb(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=e,h=yo(),p=ki(),m=vt(c),y=vt(l),v=vt(n),b=R.useRef(),g=R.useRef(-1),S=R.useRef(),x=R.useRef(-1),T=R.useRef(!0),P=R.useRef(!1),O=R.useRef(()=>{}),k=R.useCallback(()=>{var _;const M=(_=o.current.openEvent)==null?void 0:_.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);R.useEffect(()=>{if(!a)return;function _(M){let{open:N}=M;N||(clearTimeout(g.current),clearTimeout(x.current),T.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),R.useEffect(()=>{if(!a||!m.current||!n)return;function _(N){k()&&r(!1,N,"hover")}const M=st(s.floating).documentElement;return M.addEventListener("mouseleave",_),()=>{M.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,k]);const D=R.useCallback(function(_,M,N){M===void 0&&(M=!0),N===void 0&&(N="hover");const z=Oa(y.current,"close",b.current);z&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,N),z)):M&&(clearTimeout(g.current),r(!1,_,N))},[y,r]),L=Dt(()=>{O.current(),S.current=void 0}),A=Dt(()=>{if(P.current){const _=st(s.floating).body;_.style.pointerEvents="",_.removeAttribute(Sf),P.current=!1}});R.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(C){if(clearTimeout(g.current),T.current=!1,u&&!uo(b.current)||f>0&&!Oa(y.current,"open"))return;const $=Oa(y.current,"open",b.current);$?g.current=window.setTimeout(()=>{v.current||r(!0,C,"hover")},$):r(!0,C,"hover")}function N(C){if(_())return;O.current();const $=st(s.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C,!0,"safe-polygon")}});const re=S.current;$.addEventListener("mousemove",re),O.current=()=>{$.removeEventListener("mousemove",re)};return}(b.current==="touch"?!it(s.floating,C.relatedTarget):!0)&&D(C)}function z(C){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C)}})(C))}if(Ve(s.domReference)){var q;const C=s.domReference;return n&&C.addEventListener("mouseleave",z),(q=s.floating)==null||q.addEventListener("mouseleave",z),d&&C.addEventListener("mousemove",M,{once:!0}),C.addEventListener("mouseenter",M),C.addEventListener("mouseleave",N),()=>{var $;n&&C.removeEventListener("mouseleave",z),($=s.floating)==null||$.removeEventListener("mouseleave",z),d&&C.removeEventListener("mousemove",M),C.removeEventListener("mouseenter",M),C.removeEventListener("mouseleave",N)}}},[s,a,t,u,f,d,D,L,A,r,n,v,h,y,m,o]),je(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&k()){const N=st(s.floating).body;N.setAttribute(Sf,""),N.style.pointerEvents="none",P.current=!0;const z=s.floating;if(Ve(s.domReference)&&z){var M;const q=s.domReference,C=h==null||(M=h.nodesRef.current.find($=>$.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return C&&(C.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,k]),je(()=>{n||(b.current=void 0,L(),A())},[n,L,A]),R.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(x.current),A()},[a,s.domReference,L,A]);const j=R.useMemo(()=>{function _(M){b.current=M.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(M){const{nativeEvent:N}=M;function z(){!T.current&&!v.current&&r(!0,N,"hover")}u&&!uo(b.current)||n||f===0||(clearTimeout(x.current),b.current==="touch"?z():x.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),F=R.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){D(_.nativeEvent,!1)}}),[D]);return R.useMemo(()=>a?{reference:j,floating:F}:{},[a,j,F])}function Qb(t,e){var n;let r=[],o=(n=t.find(i=>i.id===e))==null?void 0:n.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function _r(t,e){let n=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=t.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function e0(t,e){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),_r(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===n)}let Pr=new WeakMap,Di=new WeakSet,Mi={},Ia=0;const t0=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tf=t=>t&&(t.host||Tf(t.parentNode)),n0=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Tf(n);return t.contains(r)?r:null}).filter(n=>n!=null);function r0(t,e,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=n0(e,t),a=new Set,l=new Set(s),c=[];Mi[o]||(Mi[o]=new WeakMap);const u=Mi[o];s.forEach(f),d(e),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(En(p)!=="script")if(a.has(p))d(p);else{const m=i?p.getAttribute(i):null,y=m!==null&&m!=="false",v=(Pr.get(p)||0)+1,b=(u.get(p)||0)+1;Pr.set(p,v),u.set(p,b),c.push(p),v===1&&y&&Di.add(p),b===1&&p.setAttribute(o,""),!y&&i&&p.setAttribute(i,"true")}})}return Ia++,()=>{c.forEach(h=>{const p=(Pr.get(h)||0)-1,m=(u.get(h)||0)-1;Pr.set(h,p),u.set(h,m),p||(!Di.has(h)&&i&&h.removeAttribute(i),Di.delete(h)),m||h.removeAttribute(o)}),Ia--,Ia||(Pr=new WeakMap,Pr=new WeakMap,Di=new WeakSet,Mi={})}}function Ef(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=st(t[0]).body;return r0(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const vo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cf(t,e){const n=Ci(t,vo());e==="prev"&&n.reverse();const r=n.indexOf(Bt(st(t)));return n.slice(r+1)[0]}function Af(){return Cf(document.body,"next")}function _f(){return Cf(document.body,"prev")}function bo(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!it(n,r)}function o0(t){Ci(t,vo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function i0(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const ka={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 s0;function Pf(t){t.key==="Tab"&&(t.target,clearTimeout(s0))}const Ri=R.forwardRef(function(e,n){const[r,o]=R.useState();je(()=>(ha()&&o("button"),document.addEventListener("keydown",Pf),()=>{document.removeEventListener("keydown",Pf)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Xn("focus-guard")]:"",style:ka};return R.createElement("span",po({},e,i))}),Of=R.createContext(null),If=Xn("portal");function a0(t){t===void 0&&(t={});const{id:e,root:n}=t,r=mo(),o=Df(),[i,s]=R.useState(null),a=R.useRef(null);return je(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),je(()=>{if(!r||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(If,""),l.appendChild(c),a.current=c,s(c)},[e,r]),je(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ve(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(If,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,r,o]),i}function kf(t){const{children:e,id:n,root:r=null,preserveTabOrder:o=!0}=t,i=a0({id:n,root:r}),[s,a]=R.useState(null),l=R.useRef(null),c=R.useRef(null),u=R.useRef(null),f=R.useRef(null),d=!!s&&!s.modal&&s.open&&o&&!!(r||i);return R.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&bo(p)&&(p.type==="focusin"?i0:o0)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),R.createElement(Of.Provider,{value:R.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},d&&i&&R.createElement(Ri,{"data-type":"outside",ref:l,onFocus:h=>{if(bo(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=_f()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),d&&i&&R.createElement("span",{"aria-owns":i.id,style:ka}),i&&$u.createPortal(e,i),d&&i&&R.createElement(Ri,{"data-type":"outside",ref:c,onFocus:h=>{if(bo(h,i)){var p;(p=f.current)==null||p.focus()}else{const m=Af()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Df=()=>R.useContext(Of),Mf=20;let Jn=[];function Da(t){Jn=Jn.filter(n=>n.isConnected);let e=t;if(!(!e||En(e)==="body")){if(!ub(e,vo())){const n=Ci(e,vo())[0];n&&(e=n)}Jn.push(e),Jn.length>Mf&&(Jn=Jn.slice(-Mf))}}function Rf(){return Jn.slice().reverse().find(t=>t.isConnected)}const l0=R.forwardRef(function(e,n){return R.createElement("button",po({},e,{type:"button",ref:n,tabIndex:-1,style:ka}))});function Ff(t){const{context:e,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=t,{open:d,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:S}}=e,x=typeof s=="number"&&s<0,T=Gu(g)&&x,P=t0()?i:!0,O=vt(o),k=vt(s),D=vt(a),L=yo(),A=Df(),j=R.useRef(null),F=R.useRef(null),_=R.useRef(!1),M=R.useRef(!1),N=R.useRef(-1),z=A!=null,q=S==null?void 0:S.firstElementChild,C=(q==null?void 0:q.id)===b?q:S,$=Dt(function(W){return W===void 0&&(W=C),W?Ci(W,vo()):[]}),Y=Dt(W=>{const I=$(W);return O.current.map(V=>g&&V==="reference"?g:C&&V==="floating"?C:I).filter(Boolean).flat()});R.useEffect(()=>{if(r||!c)return;function W(V){if(V.key==="Tab"){it(C,Bt(st(C)))&&$().length===0&&!T&&yt(V);const H=Y(),K=_n(V);O.current[0]==="reference"&&K===g&&(yt(V),V.shiftKey?dn(H[H.length-1]):dn(H[1])),O.current[1]==="floating"&&K===C&&V.shiftKey&&(yt(V),dn(H[0]))}}const I=st(C);return I.addEventListener("keydown",W),()=>{I.removeEventListener("keydown",W)}},[r,g,C,c,O,T,$,Y]),R.useEffect(()=>{if(r||!S)return;function W(I){const V=_n(I),K=$().indexOf(V);K!==-1&&(N.current=K)}return S.addEventListener("focusin",W),()=>{S.removeEventListener("focusin",W)}},[r,S,$]),R.useEffect(()=>{if(r||!f)return;function W(){M.current=!0,setTimeout(()=>{M.current=!1})}function I(V){const H=V.relatedTarget;queueMicrotask(()=>{const K=!(it(g,H)||it(S,H)||it(H,S)||it(A==null?void 0:A.portalNode,H)||H!=null&&H.hasAttribute(Xn("focus-guard"))||L&&(_r(L.nodesRef.current,p).find(X=>{var le,B;return it((le=X.context)==null?void 0:le.elements.floating,H)||it((B=X.context)==null?void 0:B.elements.domReference,H)})||Qb(L.nodesRef.current,p).find(X=>{var le,B;return((le=X.context)==null?void 0:le.elements.floating)===H||((B=X.context)==null?void 0:B.elements.domReference)===H})));if(l&&K&&Bt(st(C))===st(C).body){Je(C)&&(C==null||C.focus());const X=N.current,le=$(),B=le[X]||le[le.length-1]||C;Je(B)&&B.focus()}(T||!c)&&H&&K&&!M.current&&H!==Rf()&&(_.current=!0,m(!1,V))})}if(S&&Je(g))return g.addEventListener("focusout",I),g.addEventListener("pointerdown",W),S.addEventListener("focusout",I),()=>{g.removeEventListener("focusout",I),g.removeEventListener("pointerdown",W),S.removeEventListener("focusout",I)}},[r,g,S,C,c,p,L,A,m,f,l,$,T]),R.useEffect(()=>{var W;if(r)return;const I=Array.from((A==null||(W=A.portalNode)==null?void 0:W.querySelectorAll("["+Xn("portal")+"]"))||[]);if(S){const V=[S,...I,j.current,F.current,O.current.includes("reference")||T?g:null].filter(K=>K!=null),H=c||T?Ef(V,P,!P):Ef(V);return()=>{H()}}},[r,g,S,c,O,A,T,P]),je(()=>{if(r||!Je(C))return;const W=st(C),I=Bt(W);queueMicrotask(()=>{const V=Y(C),H=k.current,K=(typeof H=="number"?V[H]:H.current)||C,X=it(C,I);!x&&!X&&d&&dn(K,{preventScroll:K===C})})},[r,d,C,x,Y,k]),je(()=>{if(r||!C)return;let W=!1;const I=st(C),V=Bt(I);let K=v.current.openEvent;Da(V);function X(le){let{open:B,reason:ke,event:He,nested:Xe}=le;B&&(K=He),ke==="escape-key"&&h.domReference.current&&Da(h.domReference.current),ke==="hover"&&He.type==="mouseleave"&&(_.current=!0),ke==="outside-press"&&(Xe?(_.current=!1,W=!0):_.current=!(Hu(He)||da(He)))}return y.on("openchange",X),()=>{y.off("openchange",X);const le=Bt(I),B=it(S,le)||L&&_r(L.nodesRef.current,p).some(Xe=>{var se;return it((se=Xe.context)==null?void 0:se.elements.floating,le)});(B||K&&["click","mousedown"].includes(K.type))&&h.domReference.current&&Da(h.domReference.current);const He=Rf();D.current&&!_.current&&Je(He)&&(!(He!==le&&le!==I.body)||B)&&dn(He,{cancelPrevious:!1,preventScroll:W})}},[r,S,C,D,v,h,y,L,p]),je(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{A.setFocusManagerState(null)}},[r,A,c,d,m,h,f]),je(()=>{if(r||!C||typeof MutationObserver!="function"||x)return;const W=()=>{const V=C.getAttribute("tabindex"),H=$(),K=Bt(st(S)),X=H.indexOf(K);X!==-1&&(N.current=X),O.current.includes("floating")||K!==h.domReference.current&&H.length===0?V!=="0"&&C.setAttribute("tabindex","0"):V!=="-1"&&C.setAttribute("tabindex","-1")};W();const I=new MutationObserver(W);return I.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{I.disconnect()}},[r,S,C,h,O,$,x]);function re(W){return r||!u||!c?null:R.createElement(l0,{ref:W==="start"?j:F,onClick:I=>m(!1,I.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&P&&(c?!T:!0)&&(z||c);return R.createElement(R.Fragment,null,ee&&R.createElement(Ri,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:W=>{if(c){const V=Y();dn(o[0]==="reference"?V[0]:V[V.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(_.current=!1,bo(W,A.portalNode)){const V=Af()||g;V==null||V.focus()}else{var I;(I=A.beforeOutsideRef.current)==null||I.focus()}}}),!T&&re("start"),n,re("end"),ee&&R.createElement(Ri,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:W=>{if(c)dn(Y()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(f&&(_.current=!0),bo(W,A.portalNode)){const V=_f()||g;V==null||V.focus()}else{var I;(I=A.afterOutsideRef.current)==null||I.focus()}}}))}function Lf(t){return Je(t.target)&&t.target.tagName==="BUTTON"}function Nf(t){return ga(t)}function c0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=R.useRef(),d=R.useRef(!1),h=R.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(uo(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}uo(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||Lf(p))&&(p.key===" "&&!Nf(i)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Lf(p)||Nf(i)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return R.useMemo(()=>s?{reference:h}:{},[s,h])}const u0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},f0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vf=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Ma(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,m=yo(),y=Dt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=R.useRef(!1),g=R.useRef(!1),{escapeKey:S,outsidePress:x}=Vf(h),{escapeKey:T,outsidePress:P}=Vf(p),O=Dt(F=>{var _;if(!n||!s||!a||F.key!=="Escape")return;const M=(_=i.current.floatingContext)==null?void 0:_.nodeId,N=m?_r(m.nodesRef.current,M):[];if(!S&&(F.stopPropagation(),N.length>0)){let z=!0;if(N.forEach(q=>{var C;if((C=q.context)!=null&&C.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,Lv(F)?F.nativeEvent:F,"escape-key")}),k=Dt(F=>{var _;const M=()=>{var N;O(F),(N=_n(F))==null||N.removeEventListener("keydown",M)};(_=_n(F))==null||_.addEventListener("keydown",M)}),D=Dt(F=>{var _;const M=b.current;b.current=!1;const N=g.current;if(g.current=!1,c==="click"&&N||M||typeof v=="function"&&!v(F))return;const z=_n(F),q="["+Xn("inert")+"]",C=st(o.floating).querySelectorAll(q);let $=Ve(z)?z:null;for(;$&&!Cn($);){const W=fn($);if(Cn(W)||!Ve(W))break;$=W}if(C.length&&Ve(z)&&!Nv(z)&&!it(z,o.floating)&&Array.from(C).every(W=>!it($,W)))return;if(Je(z)&&j){const W=z.clientWidth>0&&z.scrollWidth>z.clientWidth,I=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let V=I&&F.offsetX>z.clientWidth;if(I&&It(z).direction==="rtl"&&(V=F.offsetX<=z.offsetWidth-z.clientWidth),V||W&&F.offsetY>z.clientHeight)return}const Y=(_=i.current.floatingContext)==null?void 0:_.nodeId,re=m&&_r(m.nodesRef.current,Y).some(W=>{var I;return ma(F,(I=W.context)==null?void 0:I.elements.floating)});if(ma(F,o.floating)||ma(F,o.domReference)||re)return;const ee=m?_r(m.nodesRef.current,Y):[];if(ee.length>0){let W=!0;if(ee.forEach(I=>{var V;if((V=I.context)!=null&&V.open&&!I.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}r(!1,F,"outside-press")}),L=Dt(F=>{var _;const M=()=>{var N;D(F),(N=_n(F))==null||N.removeEventListener(c,M)};(_=_n(F))==null||_.addEventListener(c,M)});R.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=x;function F(N){r(!1,N,"ancestor-scroll")}const _=st(o.floating);a&&_.addEventListener("keydown",T?k:O,T),v&&_.addEventListener(c,P?L:D,P);let M=[];return d&&(Ve(o.domReference)&&(M=An(o.domReference)),Ve(o.floating)&&(M=M.concat(An(o.floating))),!Ve(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(An(o.reference.contextElement)))),M=M.filter(N=>{var z;return N!==((z=_.defaultView)==null?void 0:z.visualViewport)}),M.forEach(N=>{N.addEventListener("scroll",F,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",T?k:O,T),v&&_.removeEventListener(c,P?L:D,P),M.forEach(N=>{N.removeEventListener("scroll",F)})}},[i,o,a,v,c,n,r,d,s,S,x,O,T,k,D,P,L]),R.useEffect(()=>{b.current=!1},[v,c]);const A=R.useMemo(()=>({onKeyDown:O,[u0[f]]:F=>{u&&r(!1,F.nativeEvent,"reference-press")}}),[O,r,u,f]),j=R.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[f0[c]]:()=>{b.current=!0}}),[O,c]);return R.useMemo(()=>s?{reference:A,floating:j}:{},[s,A,j])}function d0(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=mo(),i=R.useRef({}),[s]=R.useState(()=>qb()),a=ki()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ve(h)&&Zb("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]=R.useState(r.reference),u=Dt((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=R.useMemo(()=>({setPositionReference:c}),[]),d=R.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return R.useMemo(()=>({dataRef:i,open:e,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[e,u,d,s,o,f])}function Ra(t){t===void 0&&(t={});const{nodeId:e}=t,n=d0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=R.useState(null),[a,l]=R.useState(null),u=(o==null?void 0:o.reference)||i,f=R.useRef(null),d=yo();je(()=>{u&&(f.current=u)},[u]);const h=Vb({...t,elements:{...o,...a&&{reference:a}}}),p=R.useCallback(g=>{const S=Ve(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=R.useCallback(g=>{(Ve(g)||g===null)&&(f.current=g,s(g)),(Ve(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ve(g))&&h.refs.setReference(g)},[h.refs]),y=R.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=R.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=R.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:e}),[h,y,v,e,r]);return je(()=>{r.dataRef.current.floatingContext=b;const g=d==null?void 0:d.nodesRef.current.find(S=>S.id===e);g&&(g.context=b)}),R.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}function h0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=R.useRef(!1),u=R.useRef(),f=R.useRef(!0);R.useEffect(()=>{if(!a)return;const h=Et(s.domReference);function p(){!n&&Je(s.domReference)&&s.domReference===Bt(st(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),R.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]),R.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=R.useMemo(()=>({onPointerDown(h){da(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=_n(h.nativeEvent);if(l&&Ve(p))try{if(ha()&&Uu())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!ga(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Ve(p)&&p.hasAttribute(Xn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Bt(s.domReference?s.domReference.ownerDocument:document);!p&&b===s.domReference||it((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||it(s.domReference,b)||y||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return R.useMemo(()=>a?{reference:d}:{},[a,d])}const $f="active",jf="selected";function Fa(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[$f]:s,[jf]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[$f,jf].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(y=>y(...p)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function La(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=R.useCallback(a=>Fa(a,t,"reference"),e),i=R.useCallback(a=>Fa(a,t,"floating"),n),s=R.useCallback(a=>Fa(a,t,"item"),r);return R.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let Bf=!1;function Fi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function zf(t,e){return Fi(e,t===_a||t===fo,t===Cr||t===Ar)}function Na(t,e,n){return Fi(e,t===fo,n?t===Cr:t===Ar)||t==="Enter"||t===" "||t===""}function p0(t,e,n){return Fi(e,n?t===Cr:t===Ar,t===fo)}function Wf(t,e,n){return Fi(e,n?t===Ar:t===Cr,t===_a)}function m0(t,e){const{open:n,onOpenChange:r,elements:o}=t,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:x=!0,virtualItemRef:T,itemSizes:P,dense:O=!1}=e;process.env.NODE_ENV!=="production"&&(u&&(f||Ii("`useListNavigation` looping must be enabled to allow escaping."),p||Ii("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&Ii("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=ki(),D=yo(),L=Dt(a),A=R.useRef(m),j=R.useRef(c??-1),F=R.useRef(null),_=R.useRef(!0),M=R.useRef(L),N=R.useRef(!!o.floating),z=R.useRef(!1),q=R.useRef(!1),C=vt(b),$=vt(n),Y=vt(x),re=vt(o.floating),ee=vt(c),[W,I]=R.useState(),[V,H]=R.useState(),K=Dt(function(se,Ae,Se){Se===void 0&&(Se=!1);function Ce(Pe){p?(I(Pe.id),D==null||D.events.emit("virtualfocus",Pe),T&&(T.current=Pe)):dn(Pe,{preventScroll:!0,sync:Uu()&&ha()?Bf||z.current:!1})}const me=se.current[Ae.current];me&&Ce(me),requestAnimationFrame(()=>{const Pe=se.current[Ae.current]||me;if(!Pe)return;me||Ce(Pe);const tt=Y.current;tt&&le&&(Se||!_.current)&&(Pe.scrollIntoView==null||Pe.scrollIntoView(typeof tt=="boolean"?{block:"nearest",inline:"nearest"}:tt))})});je(()=>{document.createElement("div").focus({get preventScroll(){return Bf=!0,!1}})},[]),je(()=>{l&&(n&&o.floating?A.current&&c!=null&&(q.current=!0,j.current=c,L(c)):N.current&&(j.current=-1,M.current(null)))},[l,n,o.floating,c,L]),je(()=>{if(l&&n&&o.floating)if(s==null){if(z.current=!1,ee.current!=null)return;if(N.current&&(j.current=-1,K(i,j)),!N.current&&A.current&&(F.current!=null||A.current===!0&&F.current==null)){let se=0;const Ae=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(Ae),se++):(j.current=F.current==null||Na(F.current,g,h)||d?Pa(i,C.current):yf(i,C.current),F.current=null,L(j.current))};Ae()}}else ho(i,s)||(j.current=s,K(i,j,q.current),q.current=!1)},[l,n,o.floating,s,ee,d,i,g,h,L,K,C]),je(()=>{var se;if(!l||o.floating||!D||p||!N.current)return;const Ae=D.nodesRef.current,Se=(se=Ae.find(Pe=>Pe.id===k))==null||(se=se.context)==null?void 0:se.elements.floating,Ce=Bt(st(o.floating)),me=Ae.some(Pe=>Pe.context&&it(Pe.context.elements.floating,Ce));Se&&!me&&_.current&&Se.focus({preventScroll:!0})},[l,o.floating,D,k,p]),je(()=>{if(!l||!D||!p||k)return;function se(Ae){H(Ae.id),T&&(T.current=Ae)}return D.events.on("virtualfocus",se),()=>{D.events.off("virtualfocus",se)}},[l,D,p,k,T]),je(()=>{M.current=L,N.current=!!o.floating}),je(()=>{n||(F.current=null)},[n]);const X=s!=null,le=R.useMemo(()=>{function se(Se){if(!n)return;const Ce=i.current.indexOf(Se);Ce!==-1&&L(Ce)}return{onFocus(Se){let{currentTarget:Ce}=Se;se(Ce)},onClick:Se=>{let{currentTarget:Ce}=Se;return Ce.focus({preventScroll:!0})},...y&&{onMouseMove(Se){let{currentTarget:Ce}=Se;se(Ce)},onPointerLeave(Se){let{pointerType:Ce}=Se;!_.current||Ce==="touch"||(j.current=-1,K(i,j),L(null),p||dn(re.current,{preventScroll:!0}))}}}},[n,re,K,y,i,L,p]),B=Dt(se=>{if(_.current=!1,z.current=!0,!$.current&&se.currentTarget===re.current)return;if(d&&Wf(se.key,g,h)){yt(se),r(!1,se.nativeEvent,"list-navigation"),Je(o.domReference)&&!p&&o.domReference.focus();return}const Ae=j.current,Se=Pa(i,b),Ce=yf(i,b);if(se.key==="Home"&&(yt(se),j.current=Se,L(j.current)),se.key==="End"&&(yt(se),j.current=Ce,L(j.current)),S>1){const me=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Pe=Wb(me,S,O),tt=Pe.findIndex(Z=>Z!=null&&!Oi(i.current,Z,b)),Tt=Pe.reduce((Z,oe,Fe)=>oe!=null&&!Oi(i.current,oe,b)?Fe:Z,-1);if(j.current=Pe[zb({current:Pe.map(Z=>Z!=null?i.current[Z]:null)},{event:se,orientation:g,loop:f,cols:S,disabledIndices:Ub([...b||i.current.map((Z,oe)=>Oi(i.current,oe)?oe:void 0),void 0],Pe),minIndex:tt,maxIndex:Tt,prevIndex:Hb(j.current>Ce?Se:j.current,me,Pe,S,se.key===fo?"bl":se.key===Ar?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(zf(se.key,g)){if(yt(se),n&&!p&&Bt(se.currentTarget.ownerDocument)===se.currentTarget){j.current=Na(se.key,g,h)?Se:Ce,L(j.current);return}Na(se.key,g,h)?f?j.current=Ae>=Ce?u&&Ae!==i.current.length?-1:Se:dt(i,{startingIndex:Ae,disabledIndices:b}):j.current=Math.min(Ce,dt(i,{startingIndex:Ae,disabledIndices:b})):f?j.current=Ae<=Se?u&&Ae!==-1?i.current.length:Ce:dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b}):j.current=Math.max(Se,dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b})),ho(i,j.current)?L(null):L(j.current)}}),ke=R.useMemo(()=>p&&n&&X&&{"aria-activedescendant":V||W},[p,n,X,V,W]),He=R.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Gu(o.domReference)&&ke,onKeyDown:B,onPointerMove(){_.current=!0}}),[ke,B,o.domReference,g]),Xe=R.useMemo(()=>{const se=C.current,Ae=i.current.find(me=>(me==null?void 0:me.id)===W);function Se(me){m==="auto"&&Hu(me.nativeEvent)&&(A.current=!0)}function Ce(me){A.current=m,m==="auto"&&da(me.nativeEvent)&&(A.current=!0)}return{...ke,onKeyDown(me){_.current=!1;const Pe=me.key.indexOf("Arrow")===0,tt=p0(me.key,g,h),Tt=Wf(me.key,g,h),Z=zf(me.key,g),oe=(d?tt:Z)||me.key==="Enter"||me.key.trim()==="";if(p&&n){const ln=D==null?void 0:D.nodesRef.current.find(cn=>cn.parentId==null),nt=D&&ln?e0(D.nodesRef.current,ln.id):null;if(Pe&&nt&&T){const cn=new KeyboardEvent("keydown",{key:me.key,bubbles:!0});if(tt||Tt){var Fe,Ke;const gi=((Fe=nt.context)==null?void 0:Fe.elements.domReference)===me.currentTarget,lo=Tt&&!gi?(Ke=nt.context)==null?void 0:Ke.elements.domReference:tt?Ae:null;lo&&(yt(me),lo.dispatchEvent(cn),H(void 0))}if(Z&&nt.context&&nt.context.open&&nt.parentId&&me.currentTarget!==nt.context.elements.domReference){var ft;yt(me),(ft=nt.context.elements.domReference)==null||ft.dispatchEvent(cn);return}}return B(me)}if(!(!n&&!v&&Pe)){if(oe&&(F.current=d&&Z?null:me.key),d){tt&&(yt(me),n?(j.current=Pa(i,se),L(j.current)):r(!0,me.nativeEvent,"list-navigation"));return}Z&&(c!=null&&(j.current=c),yt(me),!n&&v?r(!0,me.nativeEvent,"list-navigation"):B(me),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ce,onMouseDown:Se,onClick:Se}},[W,ke,B,C,m,i,d,L,r,n,v,g,h,c,D,p,T]);return R.useMemo(()=>l?{reference:Xe,floating:He,item:le}:{},[l,Xe,He,le])}const g0=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Va(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(n=g0.get(s))!=null?n:s,l=mo(),u=ki()!=null,f=R.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),d=R.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=R.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return R.useMemo(()=>i?{reference:f,floating:d,item:h}:{},[i,f,d,h])}const Hf=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase());function Or(t,e){return typeof t=="function"?t(e):t}function y0(t,e){const[n,r]=R.useState(t);return t&&!n&&r(!0),R.useEffect(()=>{if(!t&&n){const o=setTimeout(()=>r(!1),e);return()=>clearTimeout(o)}},[t,n,e]),n}function v0(t,e){e===void 0&&(e={});const{open:n,elements:{floating:r}}=t,{duration:o=250}=e,s=(typeof o=="number"?o:o.close)||0,[a,l]=R.useState("unmounted"),c=y0(n,s);return!c&&a==="close"&&l("unmounted"),je(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function b0(t,e){e===void 0&&(e={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=e,a=t.placement,l=a.split("-")[0],c=R.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,d=(u?s:s.close)||0,[h,p]=R.useState(()=>({...Or(i,c),...Or(n,c)})),{isMounted:m,status:y}=v0(t,{duration:s}),v=vt(n),b=vt(r),g=vt(o),S=vt(i);return je(()=>{const x=Or(v.current,c),T=Or(g.current,c),P=Or(S.current,c),O=Or(b.current,c)||Object.keys(x).reduce((k,D)=>(k[D]="",k),{});if(y==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...P,...x})),y==="open"&&p({transitionProperty:Object.keys(O).map(Hf).join(","),transitionDuration:f+"ms",...P,...O}),y==="close"){const k=T||x;p({transitionProperty:Object.keys(k).map(Hf).join(","),transitionDuration:d+"ms",...P,...k})}},[d,g,v,b,S,f,y,c]),{isMounted:m,styles:h}}class Li{static getDescendantProperty(e,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=e[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Li.getDescendantProperty(a[l],i,r);else i&&Li.getDescendantProperty(a,i,r)}else r.push(e);return r}}class Ir{constructor(e=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=e,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(e=""){if(e==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Ir.isMatch(o,e,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Li.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Ir.isMatch(s[l],e,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(e,n,r){e=String(e),n=String(n),r||(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Ir.nearestIndexesFor(e,n);return o?e===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(e,n){const r=n.split("");let o=[];return Ir.indexesOfFirstLetter(e,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=e.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(e,n){const r=n[0];return e.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}/**
4
+ */var Kv=["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])"],Ci=Kv.join(","),Xu=typeof Element>"u",Tr=Xu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ai=!Xu&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},_i=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},Zv=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},qv=function(e,n,r){if(_i(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Ci));return n&&Tr.call(e,Ci)&&o.unshift(e),o=o.filter(r),o},Yv=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!_i(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Tr.call(s,Ci);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!_i(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var h=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},Ju=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Qu=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Zv(e))&&!Ju(e)?0:e.tabIndex},Xv=function(e,n){var r=Qu(e);return r<0&&n&&!Ju(e)?0:r},Jv=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},ef=function(e){return e.tagName==="INPUT"},Qv=function(e){return ef(e)&&e.type==="hidden"},eb=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},tb=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},nb=function(e){if(!e.name)return!0;var n=e.form||Ai(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=tb(o,e.form);return!i||i===e},rb=function(e){return ef(e)&&e.type==="radio"},ob=function(e){return rb(e)&&!nb(e)},ib=function(e){var n,r=e&&Ai(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,u,f;r=Ai(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},tf=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},sb=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Tr.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Tr.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Ai(e);if(l&&!l.shadowRoot&&o(l)===!0)return tf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(ib(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return tf(e);return!1},ab=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Tr.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},lb=function(e,n){return!(n.disabled||_i(n)||Qv(n)||sb(n,e)||eb(n)||ab(n))},Sa=function(e,n){return!(ob(n)||Qu(n)<0||!lb(e,n))},cb=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ub=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Xv(a,s),c=s?t(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(Jv).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Pi=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Yv([e],n.includeContainer,{filter:Sa.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:cb}):r=qv(e,n.includeContainer,Sa.bind(null,n)),ub(r)},fb=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Tr.call(e,Ci)===!1?!1:Sa(n,e)};function nf(t,e,n){let{reference:r,floating:o}=t;const i=qn(e),s=xa(e),a=ba(s),l=On(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Sr(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}const db=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=nf(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:S,reset:w}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=b??u,f=g??f,h={...h,[y]:{...h[y],...S}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:u,y:f}=nf(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function Ta(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=wr(e,t),p=Yu(h),y=a[d?f==="floating"?"reference":"floating":f],v=Ei(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},w=Ei(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-w.top+p.top)/S.y,bottom:(w.bottom-v.bottom+p.bottom)/S.y,left:(v.left-w.left+p.left)/S.x,right:(w.right-v.right+p.right)/S.x}}const hb=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=wr(t,e)||{};if(c==null)return{};const f=Yu(u),d={x:n,y:r},h=xa(o),p=ba(h),m=await s.getDimensions(c),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-d[h]-i.floating[p],w=d[h]-i.reference[h],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let P=T?T[g]:0;(!P||!await(s.isElement==null?void 0:s.isElement(T)))&&(P=a.floating[g]||i.floating[p]);const O=S/2-w/2,k=P/2-m[p]/2-1,D=Zt(f[v],k),L=Zt(f[b],k),A=D,j=P-m[p]-L,R=P/2-m[p]/2+O,_=va(A,R,j),M=!l.arrow&&Sr(o)!=null&&R!==_&&i.reference[p]/2-(R<A?D:L)-m[p]/2<0,N=M?R<A?R-A:R-j:0;return{[h]:d[h]+N,data:{[h]:_,centerOffset:R-_-N,...M&&{alignmentOffset:N}},reset:M}}}),pb=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=wr(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=On(o),b=qn(a),g=On(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(g||!m?[Ti(a)]:Wv(a)),T=p!=="none";!d&&T&&w.push(...Uv(a,m,p,S));const P=[a,...w],O=await Ta(e,y),k=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(O[v]),f){const R=zv(o,s,S);k.push(O[R[0]],O[R[1]])}if(D=[...D,{placement:o,overflows:k}],!k.every(R=>R<=0)){var L,A;const R=(((L=i.flip)==null?void 0:L.index)||0)+1,_=P[R];if(_)return{data:{index:R,overflows:D},reset:{placement:_}};let M=(A=D.filter(N=>N.overflows[0]<=0).sort((N,z)=>N.overflows[1]-z.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(h){case"bestFit":{var j;const N=(j=D.filter(z=>{if(T){const q=qn(z.placement);return q===b||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,C)=>q+C,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];N&&(M=N);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};async function mb(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=On(n),a=Sr(n),l=qn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=wr(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const gb=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await mb(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},yb=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=wr(t,e),c={x:n,y:r},u=await Ta(e,l),f=qn(On(o)),d=qu(f);let h=c[d],p=c[f];if(i){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=va(b,h,g)}if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=va(b,p,g)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},vb=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...a}=wr(t,e),l=await Ta(e,a),c=On(n),u=Sr(n),f=qn(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=d-l.left-l.right,b=Zt(h-l[p],y),g=Zt(d-l[m],v),S=!e.middlewareData.shift;let w=b,T=g;if(f?T=u||S?Zt(g,v):v:w=u||S?Zt(b,y):y,S&&!u){const O=kt(l.left,0),k=kt(l.right,0),D=kt(l.top,0),L=kt(l.bottom,0);f?T=d-2*(O!==0||k!==0?O+k:kt(l.left,l.right)):w=h-2*(D!==0||L!==0?D+L:kt(l.top,l.bottom))}await s({...e,availableWidth:T,availableHeight:w});const P=await o.getDimensions(i.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function rf(t){const e=It(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Je(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=Si(n)!==i||Si(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ea(t){return Ve(t)?t:t.contextElement}function Er(t){const e=Ea(t);if(!Je(e))return Pn(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=rf(e);let s=(i?Si(n.width):n.width)/r,a=(i?Si(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const bb=Pn(0);function of(t){const e=Et(t);return!da()||!e.visualViewport?bb:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xb(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Et(t)?!1:e}function Yn(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=Ea(t);let s=Pn(1);e&&(r?Ve(r)&&(s=Er(r)):s=Er(t));const a=xb(i,n,r)?of(i):Pn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=Et(i),h=r&&Ve(r)?Et(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const y=Er(m),v=m.getBoundingClientRect(),b=It(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=S,p=Et(m),m=p.frameElement}}return Ei({width:u,height:f,x:l,y:c})}function wb(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=o==="fixed",s=un(r),a=e?xi(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Pn(1);const u=Pn(0),f=Je(r);if((f||!f&&!i)&&((En(r)!=="body"||co(s))&&(l=wi(r)),Je(r))){const d=Yn(r);c=Er(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 Sb(t){return Array.from(t.getClientRects())}function sf(t){return Yn(un(t)).left+wi(t).scrollLeft}function Tb(t){const e=un(t),n=wi(t),r=t.ownerDocument.body,o=kt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=kt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+sf(t);const a=-n.scrollTop;return It(r).direction==="rtl"&&(s+=kt(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Eb(t,e){const n=Et(t),r=un(t),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=da();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Cb(t,e){const n=Yn(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Je(t)?Er(t):Pn(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function af(t,e,n){let r;if(e==="viewport")r=Eb(t,n);else if(e==="document")r=Tb(un(t));else if(Ve(e))r=Cb(e,n);else{const o=of(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return Ei(r)}function lf(t,e){const n=fn(t);return n===e||!Ve(n)||Cn(n)?!1:It(n).position==="fixed"||lf(n,e)}function Ab(t,e){const n=e.get(t);if(n)return n;let r=An(t,[],!1).filter(a=>Ve(a)&&En(a)!=="body"),o=null;const i=It(t).position==="fixed";let s=i?fn(t):t;for(;Ve(s)&&!Cn(s);){const a=It(s),l=fa(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||co(s)&&!l&&lf(t,s))?r=r.filter(u=>u!==s):o=a,s=fn(s)}return e.set(t,r),r}function _b(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?xi(e)?[]:Ab(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=af(e,u,o);return c.top=kt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=kt(f.left,c.left),c},af(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Pb(t){const{width:e,height:n}=rf(t);return{width:e,height:n}}function Ob(t,e,n){const r=Je(e),o=un(e),i=n==="fixed",s=Yn(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Pn(0);if(r||!r&&!i)if((En(e)!=="body"||co(o))&&(a=wi(e)),r){const f=Yn(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=sf(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Ca(t){return It(t).position==="static"}function cf(t,e){return!Je(t)||It(t).position==="fixed"?null:e?e(t):t.offsetParent}function uf(t,e){const n=Et(t);if(xi(t))return n;if(!Je(t)){let o=fn(t);for(;o&&!Cn(o);){if(Ve(o)&&!Ca(o))return o;o=fn(o)}return n}let r=cf(t,e);for(;r&&Fv(r)&&Ca(r);)r=cf(r,e);return r&&Cn(r)&&Ca(r)&&!fa(r)?n:r||Rv(t)||n}const Ib=async function(t){const e=this.getOffsetParent||uf,n=this.getDimensions,r=await n(t.floating);return{reference:Ob(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kb(t){return It(t).direction==="rtl"}const Db={convertOffsetParentRelativeRectToViewportRelativeRect:wb,getDocumentElement:un,getClippingRect:_b,getOffsetParent:uf,getElementRects:Ib,getClientRects:Sb,getDimensions:Pb,getScale:Er,isElement:Ve,isRTL:kb};function Mb(t,e){let n=null,r;const o=un(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=xr(u),p=xr(o.clientWidth-(c+f)),m=xr(o.clientHeight-(u+d)),y=xr(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:kt(0,Zt(1,l))||1};let g=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!g)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return s(!0),i}function Aa(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ea(t),u=o||i?[...c?An(c):[],...An(e)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?Mb(c,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Yn(t):null;l&&y();function y(){const v=Yn(t);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),i&&b.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Fb=gb,Rb=yb,Lb=pb,Nb=vb,ff=hb,Vb=(t,e,n)=>{const r=new Map,o={platform:Db,...n},i={...o.platform,_c:r};return db(t,e,{...o,platform:i})};var Oi=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ii(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ii(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!Ii(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function df(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hf(t,e){const n=df(t);return Math.round(e*n)/n}function pf(t){const e=F.useRef(t);return Oi(()=>{e.current=t}),e}function $b(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=F.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=F.useState(r);Ii(d,r)||h(r);const[p,m]=F.useState(null),[y,v]=F.useState(null),b=F.useCallback(N=>{N!==T.current&&(T.current=N,m(N))},[]),g=F.useCallback(N=>{N!==P.current&&(P.current=N,v(N))},[]),S=i||p,w=s||y,T=F.useRef(null),P=F.useRef(null),O=F.useRef(u),k=l!=null,D=pf(l),L=pf(o),A=F.useCallback(()=>{if(!T.current||!P.current)return;const N={placement:e,strategy:n,middleware:d};L.current&&(N.platform=L.current),Vb(T.current,P.current,N).then(z=>{const q={...z,isPositioned:!0};j.current&&!Ii(O.current,q)&&(O.current=q,Bu.flushSync(()=>{f(q)}))})},[d,e,n,L]);Oi(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const j=F.useRef(!1);Oi(()=>(j.current=!0,()=>{j.current=!1}),[]),Oi(()=>{if(S&&(T.current=S),w&&(P.current=w),S&&w){if(D.current)return D.current(S,w,A);A()}},[S,w,A,D,k]);const R=F.useMemo(()=>({reference:T,floating:P,setReference:b,setFloating:g}),[b,g]),_=F.useMemo(()=>({reference:S,floating:w}),[S,w]),M=F.useMemo(()=>{const N={position:n,left:0,top:0};if(!_.floating)return N;const z=hf(_.floating,u.x),q=hf(_.floating,u.y);return a?{...N,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 F.useMemo(()=>({...u,update:A,refs:R,elements:_,floatingStyles:M}),[u,A,R,_,M])}const jb=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?ff({element:r.current,padding:o}).fn(n):{}:r?ff({element:r,padding:o}).fn(n):{}}}},_a=(t,e)=>({...Fb(t),options:[t,e]}),mf=(t,e)=>({...Rb(t),options:[t,e]}),gf=(t,e)=>({...Lb(t),options:[t,e]}),Bb=(t,e)=>({...Nb(t),options:[t,e]}),yf=(t,e)=>({...jb(t),options:[t,e]}),vf={...F},zb=vf.useInsertionEffect||(t=>t());function Dt(t){const e=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return zb(()=>{e.current=t}),F.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const Pa="ArrowUp",fo="ArrowDown",Cr="ArrowLeft",Ar="ArrowRight";function ki(t,e,n){return Math.floor(t/e)!==n}function ho(t,e){return e<0||e>=t.current.length}function Oa(t,e){return dt(t,{disabledIndices:e})}function bf(t,e){return dt(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function dt(t,e){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&Di(s,a,o));return a}function Wb(t,e){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=e,f=c;if(n.key===Pa){if(u&&yt(n),c===-1)f=l;else if(f=dt(t,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const d=c%i,h=l%i,p=l-(h-d);h===d?f=l:f=h>d?p:p-i}ho(t,f)&&(f=c)}if(n.key===fo&&(u&&yt(n),c===-1?f=a:(f=dt(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=dt(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),ho(t,f)&&(f=c)),r==="both"){const d=xr(c/i);n.key===Ar&&(u&&yt(n),c%i!==i-1?(f=dt(t,{startingIndex:c,disabledIndices:s}),o&&ki(f,i,d)&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c-c%i-1,disabledIndices:s})),ki(f,i,d)&&(f=c)),n.key===Cr&&(u&&yt(n),c%i!==0?(f=dt(t,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&ki(f,i,d)&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=dt(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),ki(f,i,d)&&(f=c));const h=xr(l/i)===d;ho(t,f)&&(o&&h?f=n.key===Cr?l:dt(t,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function Hb(t,e,n){const r=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*e);o%e+a<=e&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function Ub(t,e,n,r,o){if(t===-1)return-1;const i=n.indexOf(t),s=e[t];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(t)}}function Gb(t,e){return e.flatMap((n,r)=>t.includes(n)?[r]:[])}function Di(t,e,n){if(n)return n.includes(e);const r=t[e];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}let xf=0;function dn(t,e){e===void 0&&(e={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=e;r&&cancelAnimationFrame(xf);const i=()=>t==null?void 0:t.focus({preventScroll:n});o?i():xf=requestAnimationFrame(i)}var je=typeof document<"u"?x.useLayoutEffect:x.useEffect;function po(){return po=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},po.apply(this,arguments)}let wf=!1,Kb=0;const Sf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kb++;function Zb(){const[t,e]=F.useState(()=>wf?Sf():void 0);return je(()=>{t==null&&e(Sf())},[]),F.useEffect(()=>{wf=!0},[]),t}const mo=vf.useId||Zb;let go;process.env.NODE_ENV!=="production"&&(go=new Set);function Mi(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.warn(o)}}function qb(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((t=go)!=null&&t.has(o))){var i;(i=go)==null||i.add(o),console.error(o)}}const Tf=F.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=e;process.env.NODE_ENV!=="production"&&(n||Mi("The `ref` prop is required for `FloatingArrow`."));const y=mo(),[v,b]=F.useState(!1);if(je(()=>{if(!o)return;It(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,S=g/2,w=s/2*(l/-8+1),T=a/2*l/4,[P,O]=r.split("-"),k=!!d,D=P==="top"||P==="bottom",L=u&&O==="end"?"bottom":"top";let A=u&&O==="end"?"right":"left";u&&v&&(A=O==="end"?"left":"right");const j=(i==null?void 0:i.x)!=null?u||i.x:"",R=(i==null?void 0:i.y)!=null?u||i.y:"",_=d||"M0,0"+(" H"+s)+(" L"+(s-w)+","+(a-T))+(" Q"+s/2+","+a+" "+w+","+(a-T))+" Z",M={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[P];return F.createElement("svg",po({},m,{"aria-hidden":!0,ref:n,width:k?s:s+g,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[A]:j,[L]:R,[P]:D||k?"100%":"calc(100% - "+g/2+"px)",transform:""+M+(h??""),...p}}),g>0&&F.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:_}),F.createElement("path",{stroke:g&&!d?m.fill:"none",d:_}),F.createElement("clipPath",{id:y},F.createElement("rect",{x:-S,y:S*(k?-1:1),width:s+g,height:s})))});function Yb(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const Xb=F.createContext(null),Jb=F.createContext(null),Fi=()=>{var t;return((t=F.useContext(Xb))==null?void 0:t.id)||null},yo=()=>F.useContext(Jb);function Xn(t){return"data-floating-ui-"+t}function vt(t){const e=x.useRef(t);return je(()=>{e.current=t}),e}const Ef=Xn("safe-polygon");function Ia(t,e,n){return n&&!uo(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Qb(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=e,h=yo(),p=Fi(),m=vt(c),y=vt(l),v=vt(n),b=F.useRef(),g=F.useRef(-1),S=F.useRef(),w=F.useRef(-1),T=F.useRef(!0),P=F.useRef(!1),O=F.useRef(()=>{}),k=F.useCallback(()=>{var _;const M=(_=o.current.openEvent)==null?void 0:_.type;return(M==null?void 0:M.includes("mouse"))&&M!=="mousedown"},[o]);F.useEffect(()=>{if(!a)return;function _(M){let{open:N}=M;N||(clearTimeout(g.current),clearTimeout(w.current),T.current=!0)}return i.on("openchange",_),()=>{i.off("openchange",_)}},[a,i]),F.useEffect(()=>{if(!a||!m.current||!n)return;function _(N){k()&&r(!1,N,"hover")}const M=st(s.floating).documentElement;return M.addEventListener("mouseleave",_),()=>{M.removeEventListener("mouseleave",_)}},[s.floating,n,r,a,m,k]);const D=F.useCallback(function(_,M,N){M===void 0&&(M=!0),N===void 0&&(N="hover");const z=Ia(y.current,"close",b.current);z&&!S.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,_,N),z)):M&&(clearTimeout(g.current),r(!1,_,N))},[y,r]),L=Dt(()=>{O.current(),S.current=void 0}),A=Dt(()=>{if(P.current){const _=st(s.floating).body;_.style.pointerEvents="",_.removeAttribute(Ef),P.current=!1}});F.useEffect(()=>{if(!a)return;function _(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function M(C){if(clearTimeout(g.current),T.current=!1,u&&!uo(b.current)||f>0&&!Ia(y.current,"open"))return;const $=Ia(y.current,"open",b.current);$?g.current=window.setTimeout(()=>{v.current||r(!0,C,"hover")},$):r(!0,C,"hover")}function N(C){if(_())return;O.current();const $=st(s.floating);if(clearTimeout(w.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),S.current=m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C,!0,"safe-polygon")}});const re=S.current;$.addEventListener("mousemove",re),O.current=()=>{$.removeEventListener("mousemove",re)};return}(b.current==="touch"?!it(s.floating,C.relatedTarget):!0)&&D(C)}function z(C){_()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:C.clientX,y:C.clientY,onClose(){A(),L(),D(C)}})(C))}if(Ve(s.domReference)){var q;const C=s.domReference;return n&&C.addEventListener("mouseleave",z),(q=s.floating)==null||q.addEventListener("mouseleave",z),d&&C.addEventListener("mousemove",M,{once:!0}),C.addEventListener("mouseenter",M),C.addEventListener("mouseleave",N),()=>{var $;n&&C.removeEventListener("mouseleave",z),($=s.floating)==null||$.removeEventListener("mouseleave",z),d&&C.removeEventListener("mousemove",M),C.removeEventListener("mouseenter",M),C.removeEventListener("mouseleave",N)}}},[s,a,t,u,f,d,D,L,A,r,n,v,h,y,m,o]),je(()=>{var _;if(a&&n&&(_=m.current)!=null&&_.__options.blockPointerEvents&&k()){const N=st(s.floating).body;N.setAttribute(Ef,""),N.style.pointerEvents="none",P.current=!0;const z=s.floating;if(Ve(s.domReference)&&z){var M;const q=s.domReference,C=h==null||(M=h.nodesRef.current.find($=>$.id===p))==null||(M=M.context)==null?void 0:M.elements.floating;return C&&(C.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,h,m,k]),je(()=>{n||(b.current=void 0,L(),A())},[n,L,A]),F.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(w.current),A()},[a,s.domReference,L,A]);const j=F.useMemo(()=>{function _(M){b.current=M.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(M){const{nativeEvent:N}=M;function z(){!T.current&&!v.current&&r(!0,N,"hover")}u&&!uo(b.current)||n||f===0||(clearTimeout(w.current),b.current==="touch"?z():w.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),R=F.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(_){D(_.nativeEvent,!1)}}),[D]);return F.useMemo(()=>a?{reference:j,floating:R}:{},[a,j,R])}function e0(t,e){var n;let r=[],o=(n=t.find(i=>i.id===e))==null?void 0:n.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function _r(t,e){let n=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=t.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function t0(t,e){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),_r(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===n)}let Pr=new WeakMap,Ri=new WeakSet,Li={},ka=0;const n0=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cf=t=>t&&(t.host||Cf(t.parentNode)),r0=(t,e)=>e.map(n=>{if(t.contains(n))return n;const r=Cf(n);return t.contains(r)?r:null}).filter(n=>n!=null);function o0(t,e,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=r0(e,t),a=new Set,l=new Set(s),c=[];Li[o]||(Li[o]=new WeakMap);const u=Li[o];s.forEach(f),d(e),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(En(p)!=="script")if(a.has(p))d(p);else{const m=i?p.getAttribute(i):null,y=m!==null&&m!=="false",v=(Pr.get(p)||0)+1,b=(u.get(p)||0)+1;Pr.set(p,v),u.set(p,b),c.push(p),v===1&&y&&Ri.add(p),b===1&&p.setAttribute(o,""),!y&&i&&p.setAttribute(i,"true")}})}return ka++,()=>{c.forEach(h=>{const p=(Pr.get(h)||0)-1,m=(u.get(h)||0)-1;Pr.set(h,p),u.set(h,m),p||(!Ri.has(h)&&i&&h.removeAttribute(i),Ri.delete(h)),m||h.removeAttribute(o)}),ka--,ka||(Pr=new WeakMap,Pr=new WeakMap,Ri=new WeakSet,Li={})}}function Af(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=st(t[0]).body;return o0(t.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,e,n)}const vo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _f(t,e){const n=Pi(t,vo());e==="prev"&&n.reverse();const r=n.indexOf(zt(st(t)));return n.slice(r+1)[0]}function Pf(){return _f(document.body,"next")}function Of(){return _f(document.body,"prev")}function bo(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!it(n,r)}function i0(t){Pi(t,vo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function s0(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Da={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let a0;function If(t){t.key==="Tab"&&(t.target,clearTimeout(a0))}const Ni=F.forwardRef(function(e,n){const[r,o]=F.useState();je(()=>(pa()&&o("button"),document.addEventListener("keydown",If),()=>{document.removeEventListener("keydown",If)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Xn("focus-guard")]:"",style:Da};return F.createElement("span",po({},e,i))}),kf=F.createContext(null),Df=Xn("portal");function l0(t){t===void 0&&(t={});const{id:e,root:n}=t,r=mo(),o=Ff(),[i,s]=F.useState(null),a=F.useRef(null);return je(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),je(()=>{if(!r||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Df,""),l.appendChild(c),a.current=c,s(c)},[e,r]),je(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ve(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Df,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[e,n,r,o]),i}function Mf(t){const{children:e,id:n,root:r=null,preserveTabOrder:o=!0}=t,i=l0({id:n,root:r}),[s,a]=F.useState(null),l=F.useRef(null),c=F.useRef(null),u=F.useRef(null),f=F.useRef(null),d=!!s&&!s.modal&&s.open&&o&&!!(r||i);return F.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&bo(p)&&(p.type==="focusin"?s0:i0)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),F.createElement(kf.Provider,{value:F.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},d&&i&&F.createElement(Ni,{"data-type":"outside",ref:l,onFocus:h=>{if(bo(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=Of()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),d&&i&&F.createElement("span",{"aria-owns":i.id,style:Da}),i&&Bu.createPortal(e,i),d&&i&&F.createElement(Ni,{"data-type":"outside",ref:c,onFocus:h=>{if(bo(h,i)){var p;(p=f.current)==null||p.focus()}else{const m=Pf()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const Ff=()=>F.useContext(kf),Rf=20;let Jn=[];function Ma(t){Jn=Jn.filter(n=>n.isConnected);let e=t;if(!(!e||En(e)==="body")){if(!fb(e,vo())){const n=Pi(e,vo())[0];n&&(e=n)}Jn.push(e),Jn.length>Rf&&(Jn=Jn.slice(-Rf))}}function Lf(){return Jn.slice().reverse().find(t=>t.isConnected)}const c0=F.forwardRef(function(e,n){return F.createElement("button",po({},e,{type:"button",ref:n,tabIndex:-1,style:Da}))});function Nf(t){const{context:e,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=t,{open:d,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:S}}=e,w=typeof s=="number"&&s<0,T=Zu(g)&&w,P=n0()?i:!0,O=vt(o),k=vt(s),D=vt(a),L=yo(),A=Ff(),j=F.useRef(null),R=F.useRef(null),_=F.useRef(!1),M=F.useRef(!1),N=F.useRef(-1),z=A!=null,q=S==null?void 0:S.firstElementChild,C=(q==null?void 0:q.id)===b?q:S,$=Dt(function(W){return W===void 0&&(W=C),W?Pi(W,vo()):[]}),Y=Dt(W=>{const I=$(W);return O.current.map(V=>g&&V==="reference"?g:C&&V==="floating"?C:I).filter(Boolean).flat()});F.useEffect(()=>{if(r||!c)return;function W(V){if(V.key==="Tab"){it(C,zt(st(C)))&&$().length===0&&!T&&yt(V);const H=Y(),K=_n(V);O.current[0]==="reference"&&K===g&&(yt(V),V.shiftKey?dn(H[H.length-1]):dn(H[1])),O.current[1]==="floating"&&K===C&&V.shiftKey&&(yt(V),dn(H[0]))}}const I=st(C);return I.addEventListener("keydown",W),()=>{I.removeEventListener("keydown",W)}},[r,g,C,c,O,T,$,Y]),F.useEffect(()=>{if(r||!S)return;function W(I){const V=_n(I),K=$().indexOf(V);K!==-1&&(N.current=K)}return S.addEventListener("focusin",W),()=>{S.removeEventListener("focusin",W)}},[r,S,$]),F.useEffect(()=>{if(r||!f)return;function W(){M.current=!0,setTimeout(()=>{M.current=!1})}function I(V){const H=V.relatedTarget;queueMicrotask(()=>{const K=!(it(g,H)||it(S,H)||it(H,S)||it(A==null?void 0:A.portalNode,H)||H!=null&&H.hasAttribute(Xn("focus-guard"))||L&&(_r(L.nodesRef.current,p).find(X=>{var le,B;return it((le=X.context)==null?void 0:le.elements.floating,H)||it((B=X.context)==null?void 0:B.elements.domReference,H)})||e0(L.nodesRef.current,p).find(X=>{var le,B;return((le=X.context)==null?void 0:le.elements.floating)===H||((B=X.context)==null?void 0:B.elements.domReference)===H})));if(l&&K&&zt(st(C))===st(C).body){Je(C)&&(C==null||C.focus());const X=N.current,le=$(),B=le[X]||le[le.length-1]||C;Je(B)&&B.focus()}(T||!c)&&H&&K&&!M.current&&H!==Lf()&&(_.current=!0,m(!1,V))})}if(S&&Je(g))return g.addEventListener("focusout",I),g.addEventListener("pointerdown",W),S.addEventListener("focusout",I),()=>{g.removeEventListener("focusout",I),g.removeEventListener("pointerdown",W),S.removeEventListener("focusout",I)}},[r,g,S,C,c,p,L,A,m,f,l,$,T]),F.useEffect(()=>{var W;if(r)return;const I=Array.from((A==null||(W=A.portalNode)==null?void 0:W.querySelectorAll("["+Xn("portal")+"]"))||[]);if(S){const V=[S,...I,j.current,R.current,O.current.includes("reference")||T?g:null].filter(K=>K!=null),H=c||T?Af(V,P,!P):Af(V);return()=>{H()}}},[r,g,S,c,O,A,T,P]),je(()=>{if(r||!Je(C))return;const W=st(C),I=zt(W);queueMicrotask(()=>{const V=Y(C),H=k.current,K=(typeof H=="number"?V[H]:H.current)||C,X=it(C,I);!w&&!X&&d&&dn(K,{preventScroll:K===C})})},[r,d,C,w,Y,k]),je(()=>{if(r||!C)return;let W=!1;const I=st(C),V=zt(I);let K=v.current.openEvent;Ma(V);function X(le){let{open:B,reason:ke,event:He,nested:Xe}=le;B&&(K=He),ke==="escape-key"&&h.domReference.current&&Ma(h.domReference.current),ke==="hover"&&He.type==="mouseleave"&&(_.current=!0),ke==="outside-press"&&(Xe?(_.current=!1,W=!0):_.current=!(Gu(He)||ha(He)))}return y.on("openchange",X),()=>{y.off("openchange",X);const le=zt(I),B=it(S,le)||L&&_r(L.nodesRef.current,p).some(Xe=>{var se;return it((se=Xe.context)==null?void 0:se.elements.floating,le)});(B||K&&["click","mousedown"].includes(K.type))&&h.domReference.current&&Ma(h.domReference.current);const He=Lf();D.current&&!_.current&&Je(He)&&(!(He!==le&&le!==I.body)||B)&&dn(He,{cancelPrevious:!1,preventScroll:W})}},[r,S,C,D,v,h,y,L,p]),je(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{A.setFocusManagerState(null)}},[r,A,c,d,m,h,f]),je(()=>{if(r||!C||typeof MutationObserver!="function"||w)return;const W=()=>{const V=C.getAttribute("tabindex"),H=$(),K=zt(st(S)),X=H.indexOf(K);X!==-1&&(N.current=X),O.current.includes("floating")||K!==h.domReference.current&&H.length===0?V!=="0"&&C.setAttribute("tabindex","0"):V!=="-1"&&C.setAttribute("tabindex","-1")};W();const I=new MutationObserver(W);return I.observe(C,{childList:!0,subtree:!0,attributes:!0}),()=>{I.disconnect()}},[r,S,C,h,O,$,w]);function re(W){return r||!u||!c?null:F.createElement(c0,{ref:W==="start"?j:R,onClick:I=>m(!1,I.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&P&&(c?!T:!0)&&(z||c);return F.createElement(F.Fragment,null,ee&&F.createElement(Ni,{"data-type":"inside",ref:A==null?void 0:A.beforeInsideRef,onFocus:W=>{if(c){const V=Y();dn(o[0]==="reference"?V[0]:V[V.length-1])}else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(_.current=!1,bo(W,A.portalNode)){const V=Pf()||g;V==null||V.focus()}else{var I;(I=A.beforeOutsideRef.current)==null||I.focus()}}}),!T&&re("start"),n,re("end"),ee&&F.createElement(Ni,{"data-type":"inside",ref:A==null?void 0:A.afterInsideRef,onFocus:W=>{if(c)dn(Y()[0]);else if(A!=null&&A.preserveTabOrder&&A.portalNode)if(f&&(_.current=!0),bo(W,A.portalNode)){const V=Of()||g;V==null||V.focus()}else{var I;(I=A.afterOutsideRef.current)==null||I.focus()}}}))}function Vf(t){return Je(t.target)&&t.target.tagName==="BUTTON"}function $f(t){return ya(t)}function u0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=e,f=F.useRef(),d=F.useRef(!1),h=F.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(uo(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}uo(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||Vf(p))&&(p.key===" "&&!$f(i)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Vf(p)||$f(i)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return F.useMemo(()=>s?{reference:h}:{},[s,h])}const f0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},d0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jf=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Fa(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,m=yo(),y=Dt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=F.useRef(!1),g=F.useRef(!1),{escapeKey:S,outsidePress:w}=jf(h),{escapeKey:T,outsidePress:P}=jf(p),O=Dt(R=>{var _;if(!n||!s||!a||R.key!=="Escape")return;const M=(_=i.current.floatingContext)==null?void 0:_.nodeId,N=m?_r(m.nodesRef.current,M):[];if(!S&&(R.stopPropagation(),N.length>0)){let z=!0;if(N.forEach(q=>{var C;if((C=q.context)!=null&&C.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,Nv(R)?R.nativeEvent:R,"escape-key")}),k=Dt(R=>{var _;const M=()=>{var N;O(R),(N=_n(R))==null||N.removeEventListener("keydown",M)};(_=_n(R))==null||_.addEventListener("keydown",M)}),D=Dt(R=>{var _;const M=b.current;b.current=!1;const N=g.current;if(g.current=!1,c==="click"&&N||M||typeof v=="function"&&!v(R))return;const z=_n(R),q="["+Xn("inert")+"]",C=st(o.floating).querySelectorAll(q);let $=Ve(z)?z:null;for(;$&&!Cn($);){const W=fn($);if(Cn(W)||!Ve(W))break;$=W}if(C.length&&Ve(z)&&!Vv(z)&&!it(z,o.floating)&&Array.from(C).every(W=>!it($,W)))return;if(Je(z)&&j){const W=z.clientWidth>0&&z.scrollWidth>z.clientWidth,I=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let V=I&&R.offsetX>z.clientWidth;if(I&&It(z).direction==="rtl"&&(V=R.offsetX<=z.offsetWidth-z.clientWidth),V||W&&R.offsetY>z.clientHeight)return}const Y=(_=i.current.floatingContext)==null?void 0:_.nodeId,re=m&&_r(m.nodesRef.current,Y).some(W=>{var I;return ga(R,(I=W.context)==null?void 0:I.elements.floating)});if(ga(R,o.floating)||ga(R,o.domReference)||re)return;const ee=m?_r(m.nodesRef.current,Y):[];if(ee.length>0){let W=!0;if(ee.forEach(I=>{var V;if((V=I.context)!=null&&V.open&&!I.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}r(!1,R,"outside-press")}),L=Dt(R=>{var _;const M=()=>{var N;D(R),(N=_n(R))==null||N.removeEventListener(c,M)};(_=_n(R))==null||_.addEventListener(c,M)});F.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=w;function R(N){r(!1,N,"ancestor-scroll")}const _=st(o.floating);a&&_.addEventListener("keydown",T?k:O,T),v&&_.addEventListener(c,P?L:D,P);let M=[];return d&&(Ve(o.domReference)&&(M=An(o.domReference)),Ve(o.floating)&&(M=M.concat(An(o.floating))),!Ve(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(An(o.reference.contextElement)))),M=M.filter(N=>{var z;return N!==((z=_.defaultView)==null?void 0:z.visualViewport)}),M.forEach(N=>{N.addEventListener("scroll",R,{passive:!0})}),()=>{a&&_.removeEventListener("keydown",T?k:O,T),v&&_.removeEventListener(c,P?L:D,P),M.forEach(N=>{N.removeEventListener("scroll",R)})}},[i,o,a,v,c,n,r,d,s,S,w,O,T,k,D,P,L]),F.useEffect(()=>{b.current=!1},[v,c]);const A=F.useMemo(()=>({onKeyDown:O,[f0[f]]:R=>{u&&r(!1,R.nativeEvent,"reference-press")}}),[O,r,u,f]),j=F.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[d0[c]]:()=>{b.current=!0}}),[O,c]);return F.useMemo(()=>s?{reference:A,floating:j}:{},[s,A,j])}function h0(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=mo(),i=F.useRef({}),[s]=F.useState(()=>Yb()),a=Fi()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Ve(h)&&qb("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]=F.useState(r.reference),u=Dt((h,p,m)=>{i.current.openEvent=h?p:void 0,s.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=F.useMemo(()=>({setPositionReference:c}),[]),d=F.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return F.useMemo(()=>({dataRef:i,open:e,onOpenChange:u,elements:d,events:s,floatingId:o,refs:f}),[e,u,d,s,o,f])}function Ra(t){t===void 0&&(t={});const{nodeId:e}=t,n=h0({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=F.useState(null),[a,l]=F.useState(null),u=(o==null?void 0:o.reference)||i,f=F.useRef(null),d=yo();je(()=>{u&&(f.current=u)},[u]);const h=$b({...t,elements:{...o,...a&&{reference:a}}}),p=F.useCallback(g=>{const S=Ve(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),h.refs.setReference(S)},[h.refs]),m=F.useCallback(g=>{(Ve(g)||g===null)&&(f.current=g,s(g)),(Ve(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Ve(g))&&h.refs.setReference(g)},[h.refs]),y=F.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=F.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=F.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:e}),[h,y,v,e,r]);return je(()=>{r.dataRef.current.floatingContext=b;const g=d==null?void 0:d.nodesRef.current.find(S=>S.id===e);g&&(g.context=b)}),F.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}function p0(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=F.useRef(!1),u=F.useRef(),f=F.useRef(!0);F.useEffect(()=>{if(!a)return;const h=Et(s.domReference);function p(){!n&&Je(s.domReference)&&s.domReference===zt(st(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),F.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]),F.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=F.useMemo(()=>({onPointerDown(h){ha(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=_n(h.nativeEvent);if(l&&Ve(p))try{if(pa()&&Ku())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!ya(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Ve(p)&&p.hasAttribute(Xn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=zt(s.domReference?s.domReference.ownerDocument:document);!p&&b===s.domReference||it((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||it(s.domReference,b)||y||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return F.useMemo(()=>a?{reference:d}:{},[a,d])}const Bf="active",zf="selected";function La(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[Bf]:s,[zf]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Bf,zf].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),s[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(y=>y(...p)).find(y=>y!==void 0)}}}else s[c]=u}),s),{})}}function Na(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=F.useCallback(a=>La(a,t,"reference"),e),i=F.useCallback(a=>La(a,t,"floating"),n),s=F.useCallback(a=>La(a,t,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let Wf=!1;function Vi(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function Hf(t,e){return Vi(e,t===Pa||t===fo,t===Cr||t===Ar)}function Va(t,e,n){return Vi(e,t===fo,n?t===Cr:t===Ar)||t==="Enter"||t===" "||t===""}function m0(t,e,n){return Vi(e,n?t===Cr:t===Ar,t===fo)}function Uf(t,e,n){return Vi(e,n?t===Ar:t===Cr,t===Pa)}function g0(t,e){const{open:n,onOpenChange:r,elements:o}=t,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:S=1,scrollItemIntoView:w=!0,virtualItemRef:T,itemSizes:P,dense:O=!1}=e;process.env.NODE_ENV!=="production"&&(u&&(f||Mi("`useListNavigation` looping must be enabled to allow escaping."),p||Mi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&S>1&&Mi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const k=Fi(),D=yo(),L=Dt(a),A=F.useRef(m),j=F.useRef(c??-1),R=F.useRef(null),_=F.useRef(!0),M=F.useRef(L),N=F.useRef(!!o.floating),z=F.useRef(!1),q=F.useRef(!1),C=vt(b),$=vt(n),Y=vt(w),re=vt(o.floating),ee=vt(c),[W,I]=F.useState(),[V,H]=F.useState(),K=Dt(function(se,Ae,Se){Se===void 0&&(Se=!1);function Ce(Pe){p?(I(Pe.id),D==null||D.events.emit("virtualfocus",Pe),T&&(T.current=Pe)):dn(Pe,{preventScroll:!0,sync:Ku()&&pa()?Wf||z.current:!1})}const me=se.current[Ae.current];me&&Ce(me),requestAnimationFrame(()=>{const Pe=se.current[Ae.current]||me;if(!Pe)return;me||Ce(Pe);const tt=Y.current;tt&&le&&(Se||!_.current)&&(Pe.scrollIntoView==null||Pe.scrollIntoView(typeof tt=="boolean"?{block:"nearest",inline:"nearest"}:tt))})});je(()=>{document.createElement("div").focus({get preventScroll(){return Wf=!0,!1}})},[]),je(()=>{l&&(n&&o.floating?A.current&&c!=null&&(q.current=!0,j.current=c,L(c)):N.current&&(j.current=-1,M.current(null)))},[l,n,o.floating,c,L]),je(()=>{if(l&&n&&o.floating)if(s==null){if(z.current=!1,ee.current!=null)return;if(N.current&&(j.current=-1,K(i,j)),!N.current&&A.current&&(R.current!=null||A.current===!0&&R.current==null)){let se=0;const Ae=()=>{i.current[0]==null?(se<2&&(se?requestAnimationFrame:queueMicrotask)(Ae),se++):(j.current=R.current==null||Va(R.current,g,h)||d?Oa(i,C.current):bf(i,C.current),R.current=null,L(j.current))};Ae()}}else ho(i,s)||(j.current=s,K(i,j,q.current),q.current=!1)},[l,n,o.floating,s,ee,d,i,g,h,L,K,C]),je(()=>{var se;if(!l||o.floating||!D||p||!N.current)return;const Ae=D.nodesRef.current,Se=(se=Ae.find(Pe=>Pe.id===k))==null||(se=se.context)==null?void 0:se.elements.floating,Ce=zt(st(o.floating)),me=Ae.some(Pe=>Pe.context&&it(Pe.context.elements.floating,Ce));Se&&!me&&_.current&&Se.focus({preventScroll:!0})},[l,o.floating,D,k,p]),je(()=>{if(!l||!D||!p||k)return;function se(Ae){H(Ae.id),T&&(T.current=Ae)}return D.events.on("virtualfocus",se),()=>{D.events.off("virtualfocus",se)}},[l,D,p,k,T]),je(()=>{M.current=L,N.current=!!o.floating}),je(()=>{n||(R.current=null)},[n]);const X=s!=null,le=F.useMemo(()=>{function se(Se){if(!n)return;const Ce=i.current.indexOf(Se);Ce!==-1&&L(Ce)}return{onFocus(Se){let{currentTarget:Ce}=Se;se(Ce)},onClick:Se=>{let{currentTarget:Ce}=Se;return Ce.focus({preventScroll:!0})},...y&&{onMouseMove(Se){let{currentTarget:Ce}=Se;se(Ce)},onPointerLeave(Se){let{pointerType:Ce}=Se;!_.current||Ce==="touch"||(j.current=-1,K(i,j),L(null),p||dn(re.current,{preventScroll:!0}))}}}},[n,re,K,y,i,L,p]),B=Dt(se=>{if(_.current=!1,z.current=!0,!$.current&&se.currentTarget===re.current)return;if(d&&Uf(se.key,g,h)){yt(se),r(!1,se.nativeEvent,"list-navigation"),Je(o.domReference)&&!p&&o.domReference.focus();return}const Ae=j.current,Se=Oa(i,b),Ce=bf(i,b);if(se.key==="Home"&&(yt(se),j.current=Se,L(j.current)),se.key==="End"&&(yt(se),j.current=Ce,L(j.current)),S>1){const me=P||Array.from({length:i.current.length},()=>({width:1,height:1})),Pe=Hb(me,S,O),tt=Pe.findIndex(Z=>Z!=null&&!Di(i.current,Z,b)),Tt=Pe.reduce((Z,oe,Re)=>oe!=null&&!Di(i.current,oe,b)?Re:Z,-1);if(j.current=Pe[Wb({current:Pe.map(Z=>Z!=null?i.current[Z]:null)},{event:se,orientation:g,loop:f,cols:S,disabledIndices:Gb([...b||i.current.map((Z,oe)=>Di(i.current,oe)?oe:void 0),void 0],Pe),minIndex:tt,maxIndex:Tt,prevIndex:Ub(j.current>Ce?Se:j.current,me,Pe,S,se.key===fo?"bl":se.key===Ar?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(Hf(se.key,g)){if(yt(se),n&&!p&&zt(se.currentTarget.ownerDocument)===se.currentTarget){j.current=Va(se.key,g,h)?Se:Ce,L(j.current);return}Va(se.key,g,h)?f?j.current=Ae>=Ce?u&&Ae!==i.current.length?-1:Se:dt(i,{startingIndex:Ae,disabledIndices:b}):j.current=Math.min(Ce,dt(i,{startingIndex:Ae,disabledIndices:b})):f?j.current=Ae<=Se?u&&Ae!==-1?i.current.length:Ce:dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b}):j.current=Math.max(Se,dt(i,{startingIndex:Ae,decrement:!0,disabledIndices:b})),ho(i,j.current)?L(null):L(j.current)}}),ke=F.useMemo(()=>p&&n&&X&&{"aria-activedescendant":V||W},[p,n,X,V,W]),He=F.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Zu(o.domReference)&&ke,onKeyDown:B,onPointerMove(){_.current=!0}}),[ke,B,o.domReference,g]),Xe=F.useMemo(()=>{const se=C.current,Ae=i.current.find(me=>(me==null?void 0:me.id)===W);function Se(me){m==="auto"&&Gu(me.nativeEvent)&&(A.current=!0)}function Ce(me){A.current=m,m==="auto"&&ha(me.nativeEvent)&&(A.current=!0)}return{...ke,onKeyDown(me){_.current=!1;const Pe=me.key.indexOf("Arrow")===0,tt=m0(me.key,g,h),Tt=Uf(me.key,g,h),Z=Hf(me.key,g),oe=(d?tt:Z)||me.key==="Enter"||me.key.trim()==="";if(p&&n){const ln=D==null?void 0:D.nodesRef.current.find(cn=>cn.parentId==null),nt=D&&ln?t0(D.nodesRef.current,ln.id):null;if(Pe&&nt&&T){const cn=new KeyboardEvent("keydown",{key:me.key,bubbles:!0});if(tt||Tt){var Re,Ke;const bi=((Re=nt.context)==null?void 0:Re.elements.domReference)===me.currentTarget,lo=Tt&&!bi?(Ke=nt.context)==null?void 0:Ke.elements.domReference:tt?Ae:null;lo&&(yt(me),lo.dispatchEvent(cn),H(void 0))}if(Z&&nt.context&&nt.context.open&&nt.parentId&&me.currentTarget!==nt.context.elements.domReference){var ft;yt(me),(ft=nt.context.elements.domReference)==null||ft.dispatchEvent(cn);return}}return B(me)}if(!(!n&&!v&&Pe)){if(oe&&(R.current=d&&Z?null:me.key),d){tt&&(yt(me),n?(j.current=Oa(i,se),L(j.current)):r(!0,me.nativeEvent,"list-navigation"));return}Z&&(c!=null&&(j.current=c),yt(me),!n&&v?r(!0,me.nativeEvent,"list-navigation"):B(me),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ce,onMouseDown:Se,onClick:Se}},[W,ke,B,C,m,i,d,L,r,n,v,g,h,c,D,p,T]);return F.useMemo(()=>l?{reference:Xe,floating:He,item:le}:{},[l,Xe,He,le])}const y0=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function $a(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(n=y0.get(s))!=null?n:s,l=mo(),u=Fi()!=null,f=F.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),d=F.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),h=F.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,s]);return F.useMemo(()=>i?{reference:f,floating:d,item:h}:{},[i,f,d,h])}const Gf=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase());function Or(t,e){return typeof t=="function"?t(e):t}function v0(t,e){const[n,r]=F.useState(t);return t&&!n&&r(!0),F.useEffect(()=>{if(!t&&n){const o=setTimeout(()=>r(!1),e);return()=>clearTimeout(o)}},[t,n,e]),n}function b0(t,e){e===void 0&&(e={});const{open:n,elements:{floating:r}}=t,{duration:o=250}=e,s=(typeof o=="number"?o:o.close)||0,[a,l]=F.useState("unmounted"),c=v0(n,s);return!c&&a==="close"&&l("unmounted"),je(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function x0(t,e){e===void 0&&(e={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=e,a=t.placement,l=a.split("-")[0],c=F.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,d=(u?s:s.close)||0,[h,p]=F.useState(()=>({...Or(i,c),...Or(n,c)})),{isMounted:m,status:y}=b0(t,{duration:s}),v=vt(n),b=vt(r),g=vt(o),S=vt(i);return je(()=>{const w=Or(v.current,c),T=Or(g.current,c),P=Or(S.current,c),O=Or(b.current,c)||Object.keys(w).reduce((k,D)=>(k[D]="",k),{});if(y==="initial"&&p(k=>({transitionProperty:k.transitionProperty,...P,...w})),y==="open"&&p({transitionProperty:Object.keys(O).map(Gf).join(","),transitionDuration:f+"ms",...P,...O}),y==="close"){const k=T||w;p({transitionProperty:Object.keys(k).map(Gf).join(","),transitionDuration:d+"ms",...P,...k})}},[d,g,v,b,S,f,y,c]),{isMounted:m,styles:h}}class $i{static getDescendantProperty(e,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=e[o],a!==null&&typeof a<"u")if(!i&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)$i.getDescendantProperty(a[l],i,r);else i&&$i.getDescendantProperty(a,i,r)}else r.push(e);return r}}class Ir{constructor(e=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=e,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(e=""){if(e==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const i=Ir.isMatch(o,e,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=$i.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=Ir.isMatch(s[l],e,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(e,n,r){e=String(e),n=String(n),r||(e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Ir.nearestIndexesFor(e,n);return o?e===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(e,n){const r=n.split("");let o=[];return Ir.indexesOfFirstLetter(e,n).forEach((s,a)=>{let l=s+1;o[a]=[s];for(let c=1;c<r.length;c++){const u=r[c];if(l=e.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(e,n){const r=n[0];return e.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}/**
5
5
  * @license lucide-react v0.407.0 - ISC
6
6
  *
7
7
  * This source code is licensed under the ISC license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
- */const x0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uf=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
9
+ */const w0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kf=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
10
10
  * @license lucide-react v0.407.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */var w0={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"};/**
14
+ */var S0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
15
15
  * @license lucide-react v0.407.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */const S0=w.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>w.createElement("svg",{ref:l,...w0,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Uf("lucide",o),...a},[...s.map(([c,u])=>w.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
19
+ */const T0=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>x.createElement("svg",{ref:l,...S0,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Kf("lucide",o),...a},[...s.map(([c,u])=>x.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
20
20
  * @license lucide-react v0.407.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */const Lt=(t,e)=>{const n=w.forwardRef(({className:r,...o},i)=>w.createElement(S0,{ref:i,iconNode:e,className:Uf(`lucide-${x0(t)}`,r),...o}));return n.displayName=`${t}`,n};/**
24
+ */const Lt=(t,e)=>{const n=x.forwardRef(({className:r,...o},i)=>x.createElement(T0,{ref:i,iconNode:e,className:Kf(`lucide-${w0(t)}`,r),...o}));return n.displayName=`${t}`,n};/**
25
25
  * @license lucide-react v0.407.0 - ISC
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const Gf=Lt("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
29
+ */const Zf=Lt("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
30
30
  * @license lucide-react v0.407.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 $a=Lt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
34
+ */const ja=Lt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
35
35
  * @license lucide-react v0.407.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 T0=Lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
39
+ */const E0=Lt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
40
40
  * @license lucide-react v0.407.0 - ISC
41
41
  *
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */const E0=Lt("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
44
+ */const C0=Lt("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
45
45
  * @license lucide-react v0.407.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */const C0=Lt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
49
+ */const A0=Lt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
50
50
  * @license lucide-react v0.407.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const A0=Lt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
54
+ */const _0=Lt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
55
55
  * @license lucide-react v0.407.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */const _0=Lt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
59
+ */const P0=Lt("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
60
60
  * @license lucide-react v0.407.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const P0=Lt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
64
+ */const O0=Lt("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
65
65
  * @license lucide-react v0.407.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const ja=Lt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
69
+ */const Ba=Lt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
70
70
  * @license lucide-react v0.407.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 Kf=Lt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
74
+ */const qf=Lt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
75
75
  * @license lucide-react v0.407.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
@@ -81,30 +81,33 @@
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 O0=Lt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function Zf(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Zf(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function I0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Zf(t))&&(r&&(r+=" "),r+=e);return r}const Ba="-";function k0(t){const e=M0(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function o(s){const a=s.split(Ba);return a[0]===""&&a.length!==1&&a.shift(),qf(a,e)||D0(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function qf(t,e){var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?qf(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(Ba);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Yf=/^\[(.+)\]$/;function D0(t){if(Yf.test(t)){const e=Yf.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function M0(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return F0(Object.entries(t.classGroups),n).forEach(([i,s])=>{za(s,r,i,e)}),r}function za(t,e,n,r){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:Xf(e,o);i.classGroupId=n;return}if(typeof o=="function"){if(R0(o)){za(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{za(s,Xf(e,i),n,r)})})}function Xf(t,e){let n=t;return e.split(Ba).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function R0(t){return t.isThemeGetter}function F0(t,e){return e?t.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[n,o]}):t}function L0(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),e++,e>t&&(e=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Jf="!";function N0(t){const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],i=e.length;function s(a){const l=[];let c=0,u=0,f;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+i)===e)){l.push(a.slice(u,y)),u=y+i;continue}if(v==="/"){f=y;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(Jf),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function V0(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function $0(t){return{cache:L0(t.cacheSize),parseClassName:N0(t),...k0(t)}}const j0=/\s+/;function B0(t,e){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(j0).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:s};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=V0(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Jf:h,classGroupId:d,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function z0(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Qf(e))&&(r&&(r+=" "),r+=n);return r}function Qf(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Qf(t[r]))&&(n&&(n+=" "),n+=e);return n}function W0(t,...e){let n,r,o,i=s;function s(l){const c=e.reduce((u,f)=>f(u),t());return n=$0(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=B0(l,n);return o(l,u),u}return function(){return i(z0.apply(null,arguments))}}function $e(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const ed=/^\[(?:([a-z-]+):)?(.+)\]$/i,H0=/^\d+\/\d+$/,U0=new Set(["px","full","screen"]),G0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,K0=/\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$/,Z0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function hn(t){return Qn(t)||U0.has(t)||H0.test(t)}function In(t){return kr(t,"length",ox)}function Qn(t){return!!t&&!Number.isNaN(Number(t))}function Ni(t){return kr(t,"number",Qn)}function wo(t){return!!t&&Number.isInteger(Number(t))}function X0(t){return t.endsWith("%")&&Qn(t.slice(0,-1))}function ye(t){return ed.test(t)}function kn(t){return G0.test(t)}const J0=new Set(["length","size","percentage"]);function Q0(t){return kr(t,J0,td)}function ex(t){return kr(t,"position",td)}const tx=new Set(["image","url"]);function nx(t){return kr(t,tx,sx)}function rx(t){return kr(t,"",ix)}function So(){return!0}function kr(t,e,n){const r=ed.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function ox(t){return K0.test(t)&&!Z0.test(t)}function td(){return!1}function ix(t){return q0.test(t)}function sx(t){return Y0.test(t)}function ax(){const t=$e("colors"),e=$e("spacing"),n=$e("blur"),r=$e("brightness"),o=$e("borderColor"),i=$e("borderRadius"),s=$e("borderSpacing"),a=$e("borderWidth"),l=$e("contrast"),c=$e("grayscale"),u=$e("hueRotate"),f=$e("invert"),d=$e("gap"),h=$e("gradientColorStops"),p=$e("gradientColorStopPositions"),m=$e("inset"),y=$e("margin"),v=$e("opacity"),b=$e("padding"),g=$e("saturate"),S=$e("scale"),x=$e("sepia"),T=$e("skew"),P=$e("space"),O=$e("translate"),k=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ye,e],A=()=>[ye,e],j=()=>["",hn,In],F=()=>["auto",Qn,ye],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],N=()=>["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",ye],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Qn,Ni],Y=()=>[Qn,ye];return{cacheSize:500,separator:":",theme:{colors:[So],spacing:[hn,In],blur:["none","",kn,ye],brightness:$(),borderColor:[t],borderRadius:["none","","full",kn,ye],borderSpacing:A(),borderWidth:j(),contrast:$(),grayscale:q(),hueRotate:Y(),invert:q(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[X0,In],inset:L(),margin:L(),opacity:$(),padding:A(),saturate:$(),scale:$(),sepia:q(),skew:Y(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ye]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],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",wo,ye]}],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",ye]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",wo,ye]}],"grid-cols":[{"grid-cols":[So]}],"col-start-end":[{col:["auto",{span:["full",wo,ye]},ye]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[So]}],"row-start-end":[{row:["auto",{span:[wo,ye]},ye]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,e]}],"min-w":[{"min-w":[ye,e,"min","max","fit"]}],"max-w":[{"max-w":[ye,e,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ni]}],"font-family":[{font:[So]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",Qn,Ni]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hn,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hn,In]}],"underline-offset":[{"underline-offset":["auto",hn,ye]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),ex]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Q0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nx]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[hn,ye]}],"outline-w":[{outline:[hn,In]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[hn,In]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",kn,rx]}],"shadow-color":[{shadow:[So]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kn,ye]}],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":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[wo,ye]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[hn,In,Ni]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const lx=W0(ax),Wa=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n!==null&&(n.current=e)})},cx=t=>t.$$typeof===Symbol.for("react.forward_ref")||t.$$typeof===Symbol.for("react.fragment")?!0:t.$$typeof===Symbol.for("react.element"),zt=(...t)=>lx(I0(t)),nd=({reportStatus:t,hideLeft:e=!1,className:n,children:r,title:o})=>E.jsxs("div",{className:zt("w-full justify-between",e&&r===null?"hidden":"flex",n),children:[e?null:E.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,t?E.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[E.jsx(E0,{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}),E.jsx(C0,{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]}),Vi=({optionalText:t="Optional",left:e,rightLabel:n,container:r,right:o,children:i,error:s,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return E.jsxs("fieldset",{"data-error":!!s,form:a,className:zt("group inline-block w-full",r),children:[E.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?E.jsx(nd,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:t||n?E.jsxs(w.Fragment,{children:[h?null:E.jsx("span",{className:"text-opacity-70",children:t}),n?E.jsx(w.Fragment,{children:n}):null]}):null}):null,E.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[e?E.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:e}):null,i,o?E.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),E.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:s})]})},rd=t=>{const e=w.useRef();return w.useEffect(()=>{e.current=t},[t]),e.current},od=w.forwardRef(({selected:t,active:e,onClick:n,option:r,...o},i)=>E.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full",children:E.jsx("button",{type:"button",onClick:n,"aria-selected":t,className:`p-2 w-full text-left cursor-pointer ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),ux={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},fx={caseSensitive:!1,sort:!1},dx=[],hx=w.forwardRef(({options:t,required:e=!0,...n},r)=>{const[o,i]=w.useState(!1),[s,a]=w.useState(""),[l,c]=w.useState(n.value??n.defaultValue??""),[u,f]=w.useState(null),d=w.useRef(dx),h=rd(u),p=new Ir(t,["value"],fx).search(s),{x:m,y,strategy:v,refs:b,context:g}=Ra({open:o,transform:!0,onOpenChange:i,whileElementsMounted:Ca,middleware:[Aa(4),jb({padding:10,apply(A){Object.assign(A.elements.floating.style,{width:`${A.rects.reference.width}px`,maxHeight:`${Math.min(480,A.availableHeight)}px`})}})]});w.useImperativeHandle(r,()=>{var A;return(A=b.domReference)==null?void 0:A.current},[b]);const S=b0(g,ux),{getReferenceProps:x,getFloatingProps:T,getItemProps:P}=La([Va(g,{role:"listbox"}),Ma(g),m0(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:A=>{const j=p.length-1;if(A===null&&h===0)return f(j);if(A===null&&h===j)return f(0);const F=A??h??null;return F===null?void 0:f(F)}})]),O=A=>{c(A.value),i(!1),a("")},k=A=>{var F;const j=A.target.value;return a(j),!o&&j===""||j?i(!0):(F=n.onChange)==null?void 0:F.call(n,A)},D=()=>{i(!0),a("")},L=()=>{a(""),c(""),i(!1)};return E.jsxs("fieldset",{className:"relative w-auto",children:[E.jsx(Vi,{...n,required:e,right:E.jsxs("span",{className:"flex items-center gap-0.5",children:[E.jsx($a,{size:20}),l?E.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:E.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.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:E.jsx("input",{...x({...n,onChange:k,onFocus:D,ref:b.setReference,onClick:A=>A.currentTarget.focus(),onKeyDown(A){if(A.key==="Escape")return A.currentTarget.blur(),i(!1);if(A.key==="Enter"){if(u!==null&&p[u])return A.preventDefault(),O(p[u]);if(p.length===1)return A.preventDefault(),O(p[0])}}}),required:e,value:o?s:l,"aria-autocomplete":"list",autoComplete:"off",className:zt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||s?"pe-12":"",n.left?"ps-8":"",n.className)})}),E.jsx(kf,{preserveTabOrder:!0,children:E.jsx(Ff,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:E.jsx("ul",{...T({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...S.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((A,j)=>w.createElement(od,{...P({onClick:()=>O(A),ref:F=>void(d.current[j]=F)}),key:`${A.value}-option`,option:A,selected:u===j,active:l===A.value}))})})})]})});var at=function(){return at=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},at.apply(this,arguments)};function Ha(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Ua(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var To=function(t){return t.replace(new RegExp(" ","g")," ")},id=function(t,e){var n=t.length,r=e+1;if(n>=r)return t;var o="0".repeat(r-n);return"".concat(o).concat(t)},px=function(t){return t.replace(/^0+([0-9]+)/,"$1")},sd=function(t,e,n){var r=t.length-2,o=px(t.substring(0,r)),i=t.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(e)+n+i},ad=function(t){return t===void 0&&(t=""),t.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ld=function(t){return Number.parseFloat(t.replace(/,/g,".").replace(/(.*)\./,function(e){return"".concat(e.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mx=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Ga=function(t){var e=w.useRef(t);return w.useEffect(function(){e.current=t},[t]),e},gx=function(t){return t==="money"||t==="currency"},yx=function(t,e,n){return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return at(at({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},Ka=function(t,e){var n=id(ad(t),e.fraction.length),r="".concat(e.currency).concat(sd(n,e.group,e.decimal));return To(r)},vx=w.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n,o=t.currency,i=o===void 0?"BRL":o,s=t.currencyDisplay,a=s===void 0?"symbol":s;t.mask;var l=t.onChange,c=Ha(t,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(e,function(){return u.current});var f=w.useMemo(function(){var p=yx(r,i,a);return p.currency=To("".concat(p.currency.trim()," ")),p.literal=To(p.literal.trim()),p},[r,i]),d=function(p){var m=Ka(p.target.value,f),y=ld(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?Ka(c.defaultValue,f):void 0;return w.createElement("input",at({},c,{value:typeof c.value=="string"?Ka(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),bx=1,xx=function(t){return t==="percentage"||t==="percent"||t==="percentual"},wx=function(t){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(e,n){var r;return at(at({},e),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Za=function(t,e){var n=id(ad(t),e.fraction.length),r="".concat(sd(n,e.group,e.decimal)," ").concat(e.percentSign);return To(r)},Sx=w.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n;t.mask;var o=t.onChange,i=t.onKeyUp,s=Ha(t,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=Ua(w.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(e,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(Za(b,f))},[s.value]);var f=w.useMemo(function(){var v=wx(r);return v.percentSign=To("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-bx,h=function(v){var b,g=a.current;g&&(g.setSelectionRange(d,d),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,S=b.selectionEnd,x=g!==S,T=d<g;!x&&T&&h()}i==null||i(v)},m=function(v){var b=Za(v.target.value,f),g=ld(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=s.defaultValue?Za(s.defaultValue,f):void 0;return w.createElement("input",at({},s,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Eo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},Tx=function(t){for(var e,n=t.length,r=[],o=0;o<n;o++){var i=t[o],s=$i[i];s===void 0?r.push(i.replace(Eo.dots,"\\.").replace(Eo.openParenthesis,"\\(").replace(Eo.closeParenthesis,"\\)")):r.push((e=s.regex)===null||e===void 0?void 0:e.source)}return r.join("").replace(Eo.leadingBars,"\\")},Co=function(t,e,n){var r=typeof t=="function",o=r?"":t;if(r&&(o=t(e)),Array.isArray(o))return qa(o,n);var i=Tx(o);return n?"^".concat(i,"$"):i},Ex=function(t){return t.replace(Eo.escape,"\\$&")},qa=function(t,e){var n=t.map(function(r){return typeof r=="string"?Ex(r):r.source}).join("");return new RegExp(e?"^".concat(n,"$"):n).source},$i={A:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},Cx=/\d/,cd="(dd) 9dddd-dddd",ud="(dd) dddd-dddd",fd="ddd.ddd.ddd-dd",dd="dd.ddd.ddd/dddd-dd",ji=function(t){return t.replace(/\D/g,"")},Ax=["2",/[0-3]/,":",/[0-5]/,/\d/],_x=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Ct={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:fd,isoDate:"dddd-dd-dd",cnpj:dd,telephone:ud,cellphone:cd,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(t){return t.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(t){return ji(t).length<=11?fd:dd},int:function(t){return t===void 0&&(t=""),Cx.test(t.toString().slice(-1))?"d".repeat(Math.max(t.length,0)):"d".repeat(Math.max(t.length-1,0))},cellTelephone:function(t){var e=ji(t);return e.length<11?ud:cd},time:function(t){var e=ji(t),n=e[0];return n==="2"?Ax:_x}},At=function(t,e,n){var r;return n===void 0&&(n={}),at({mask:t,inputMode:e,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof t=="function")?void 0:Co(t,"",!0),infinity:n.infinity},n)},ht={cellTelephone:At(Ct.cellTelephone,"tel"),cellphone:At(Ct.cellphone,"tel"),cep:At(Ct.cep,"decimal"),cnpj:At(Ct.cnpj,"decimal"),color:At(Ct.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(Ct.cpf,"decimal"),cpfCnpj:At(Ct.cpfCnpj,"decimal",{transform:ji}),creditCard:At(Ct.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(Ct.date,"decimal"),int:At(Ct.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(Ct.isoDate,"decimal"),telephone:At(Ct.telephone,"tel"),time:At(Ct.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(Ct.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function hd(t,e,n,r){var o,i;r===void 0&&(r=$i);for(var s=n(t),a="",l=0,c=0;l<e.length&&c<s.length;){var u=e[l],f=u instanceof RegExp?u:r[u],d=s[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&i!==void 0?i:d),c+=1,l+=1}return a}var pd=function(t){return t},Px=function(t,e,n){if(!t||!n)return!1;var r=new RegExp(Co(t,n,e));return r.test(n)};function Ox(t){var e=w.useRef(t);return w.useEffect(function(){e.current=t},[t]),e.current}var Ix=w.forwardRef(function(t,e){var n=t.infinity,r=n===void 0?!1:n,o=t.strict,i=o===void 0?!0:o,s=t.transform,a=t.onChange,l=t.pattern,c=t.tokens,u=t.mask,f=t.onChangeText,d=t.as,h=Ha(t,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(e,function(){return p.current});var m=Ga(a),y=Ga(f),v=Ga(u),b=w.useRef(Px(u,i,h.value||h.defaultValue)),g=d??"input",S=Ua(w.useState(""),2),x=S[0],T=S[1],P=Ox(x),O=w.useCallback(function(_,M){var N,z,q=(N=_??M)!==null&&N!==void 0?N:"";if(u===void 0)return q;var C=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return hd(C,typeof u=="function"?u(C):u,s??pd,c??$i)},[s,u,c]),k=Ua(w.useState(function(){return O(h.value,h.defaultValue)}),2),D=k[0],L=k[1],A=O(h.defaultValue,h.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(D);return Array.isArray(_)?qa(_,i):Co(u,D,i)}return typeof u=="string"?Co(u,D,i):qa(u,i)},[l,D,i,u]);w.useEffect(function(){if(h.value!==void 0){var _=O(h.value,h.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[h.value,u,s,h.defaultValue]);var F=function(_){var M,N,z,q,C,$=_.currentTarget,Y=_.target.value;if(v.current===void 0)return L(Y),(M=y.current)===null||M===void 0||M.call(y,Y),(N=m.current)===null||N===void 0||N.call(m,_),f==null?void 0:f(Y);var re=new RegExp(Co(v.current,Y,i)),ee=(z=$.selectionEnd)!==null&&z!==void 0?z:0,W=function(X,le,B){if(X.type!=="number")return X.setSelectionRange(le,B)};if(r&&b.current&&Y.length>=D.length)return $.value=D,W($,ee-1,ee-1);var I=!1;Y.length<P.length&&(b.current=!1,I=!0),re.test(Y)&&(b.current=!0);var V=ee,H=Y[V-1],K=hd(Y,typeof v.current=="function"?v.current(Y):v.current,s??pd,c??$i);for($.value=K,L(K);V<K.length&&K.charAt(V-1)!==H;)V+=1;I?W($,ee,ee):W($,V,V),_.target.value=K,T(K),(q=y.current)===null||q===void 0||q.call(y,K),(C=m.current)===null||C===void 0||C.call(m,_)};return w.createElement(g,at({},h,{ref:p,pattern:j,onChange:F,defaultValue:md(h.defaultValue)?A:void 0,value:md(h.value)?O(h.value,h.value):h.value}))}),md=function(t){return typeof t=="string"},gd=w.forwardRef(function(t,e){return gx(t.mask)?w.createElement(vx,at({},t,{mask:void 0,ref:e})):xx(t.mask)?w.createElement(Sx,at({},t,{mask:void 0,ref:e})):w.createElement(Ix,at({},t,{ref:e}))}),_t=function(t){return function(e){return w.createElement(gd,at({},t,e))}};_t(ht.cellTelephone),_t(ht.cellphone),_t(ht.cep),_t(ht.cnpj),_t(ht.color),_t(ht.cpf),_t(ht.cpfCnpj),_t(ht.creditCard),_t(ht.date),_t(ht.int),_t(ht.isoDate),_t(ht.telephone),_t(ht.time),_t(ht.uuid);var kx=w.forwardRef(function(e,n){var r=w.useMemo(function(){if(e.mask)return typeof e.mask=="string"&&mx(ht,e.mask)?ht[e.mask]:{mask:e.mask}},[e.mask]),o=at(at({},e),r);return w.createElement(gd,at({},o,{ref:n}))});const Ya=w.forwardRef(({type:t="text",container:e,next:n,rightLabel:r,optionalText:o,hideLeft:i=!1,right:s,left:a,...l},c)=>{const u=l.id??l.name,f=w.useRef(null);return w.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 b=document.getElementById(v);if(b)return b.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),E.jsx(Vi,{...l,right:s,left:a,hideLeft:i,rightLabel:r,optionalText:o,container:zt("group inline-block w-full",e),children:E.jsx(kx,{...l,type:t,"data-next":n,ref:Wa(c,f),id:u,name:u,className:zt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",s?"pe-4":"",a?"ps-4":"",l.className)})})}),er=w.forwardRef(({container:t,required:e=!0,options:n,...r},o)=>{const i=w.useRef(null),s=r.id??r.name;return w.useEffect(()=>{if(i.current===null)return;const a=i.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),E.jsx(Vi,{...r,required:e,container:zt("group inline-block w-full",t),right:E.jsx($a,{size:20}),children:E.jsxs("select",{...r,ref:Wa(o,i),id:s,name:s,required:e,"data-selected":!!r.value||!1,className:zt("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:[E.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>E.jsx("option",{...a,children:a.label??a.value},`${s}-select-option-${a.value}`))]})})}),Dx=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Mx=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Rx=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Fx=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],yd=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r};function vd(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};const n=e.bits?e.binary?Fx:Rx:e.binary?Mx:Dx,r=e.space?" ":"";if(e.signed&&t===0)return` 0${r}${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";o&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){const u=yd(t,e.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));const l=yd(Number(t),e.locale,s),c=n[a];return i+l+r+c}var bd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Nx(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var Xa={exports:{}},Bi={exports:{}},Oe={};/** @license React v16.13.1
84
+ */const I0=Lt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function Yf(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Yf(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function k0(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Yf(t))&&(r&&(r+=" "),r+=e);return r}var Xf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function M0(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var F0=Error,R0=EvalError,L0=RangeError,N0=ReferenceError,Jf=SyntaxError,wo=TypeError,V0=URIError,$0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},Qf=typeof Symbol<"u"&&Symbol,j0=$0,B0=function(){return typeof Qf!="function"||typeof Symbol!="function"||typeof Qf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:j0()},za={__proto__:null,foo:{}},z0=Object,W0=function(){return{__proto__:za}.foo===za.foo&&!(za instanceof z0)},H0="Function.prototype.bind called on incompatible ",U0=Object.prototype.toString,G0=Math.max,K0="[object Function]",ed=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},Z0=function(e,n){for(var r=[],o=n,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},q0=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},Y0=function(e){var n=this;if(typeof n!="function"||U0.apply(n)!==K0)throw new TypeError(H0+n);for(var r=Z0(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,ed(r,arguments));return Object(u)===u?u:this}return n.apply(e,ed(r,arguments))},s=G0(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+q0(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},X0=Y0,Wa=Function.prototype.bind||X0,J0=Function.prototype.call,Q0=Object.prototype.hasOwnProperty,ex=Wa,tx=ex.call(J0,Q0),we,nx=F0,rx=R0,ox=L0,ix=N0,kr=Jf,Dr=wo,sx=V0,td=Function,Ha=function(t){try{return td('"use strict"; return ('+t+").constructor;")()}catch{}},Qn=Object.getOwnPropertyDescriptor;if(Qn)try{Qn({},"")}catch{Qn=null}var Ua=function(){throw new Dr},ax=Qn?function(){try{return arguments.callee,Ua}catch{try{return Qn(arguments,"callee").get}catch{return Ua}}}():Ua,Mr=B0(),lx=W0(),rt=Object.getPrototypeOf||(lx?function(t){return t.__proto__}:null),Fr={},cx=typeof Uint8Array>"u"||!rt?we:rt(Uint8Array),er={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Mr&&rt?rt([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":Fr,"%AsyncGenerator%":Fr,"%AsyncGeneratorFunction%":Fr,"%AsyncIteratorPrototype%":Fr,"%Atomics%":typeof Atomics>"u"?we:Atomics,"%BigInt%":typeof BigInt>"u"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":nx,"%eval%":eval,"%EvalError%":rx,"%Float32Array%":typeof Float32Array>"u"?we:Float32Array,"%Float64Array%":typeof Float64Array>"u"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?we:FinalizationRegistry,"%Function%":td,"%GeneratorFunction%":Fr,"%Int8Array%":typeof Int8Array>"u"?we:Int8Array,"%Int16Array%":typeof Int16Array>"u"?we:Int16Array,"%Int32Array%":typeof Int32Array>"u"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mr&&rt?rt(rt([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map>"u"?we:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mr||!rt?we:rt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?we:Promise,"%Proxy%":typeof Proxy>"u"?we:Proxy,"%RangeError%":ox,"%ReferenceError%":ix,"%Reflect%":typeof Reflect>"u"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?we:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mr||!rt?we:rt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mr&&rt?rt(""[Symbol.iterator]()):we,"%Symbol%":Mr?Symbol:we,"%SyntaxError%":kr,"%ThrowTypeError%":ax,"%TypedArray%":cx,"%TypeError%":Dr,"%Uint8Array%":typeof Uint8Array>"u"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?we:Uint32Array,"%URIError%":sx,"%WeakMap%":typeof WeakMap>"u"?we:WeakMap,"%WeakRef%":typeof WeakRef>"u"?we:WeakRef,"%WeakSet%":typeof WeakSet>"u"?we:WeakSet};if(rt)try{null.error}catch(t){var ux=rt(rt(t));er["%Error.prototype%"]=ux}var fx=function t(e){var n;if(e==="%AsyncFunction%")n=Ha("async function () {}");else if(e==="%GeneratorFunction%")n=Ha("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Ha("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&rt&&(n=rt(o.prototype))}return er[e]=n,n},nd={__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"]},So=Wa,ji=tx,dx=So.call(Function.call,Array.prototype.concat),hx=So.call(Function.apply,Array.prototype.splice),rd=So.call(Function.call,String.prototype.replace),Bi=So.call(Function.call,String.prototype.slice),px=So.call(Function.call,RegExp.prototype.exec),mx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gx=/\\(\\)?/g,yx=function(e){var n=Bi(e,0,1),r=Bi(e,-1);if(n==="%"&&r!=="%")throw new kr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new kr("invalid intrinsic syntax, expected opening `%`");var o=[];return rd(e,mx,function(i,s,a,l){o[o.length]=a?rd(l,gx,"$1"):s||i}),o},vx=function(e,n){var r=e,o;if(ji(nd,r)&&(o=nd[r],r="%"+o[0]+"%"),ji(er,r)){var i=er[r];if(i===Fr&&(i=fx(r)),typeof i>"u"&&!n)throw new Dr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new kr("intrinsic "+e+" does not exist!")},Rr=function(e,n){if(typeof e!="string"||e.length===0)throw new Dr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Dr('"allowMissing" argument must be a boolean');if(px(/^%?[^%]*%?$/,e)===null)throw new kr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=yx(e),o=r.length>0?r[0]:"",i=vx("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],hx(r,dx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Bi(d,0,1),p=Bi(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new kr("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,s="%"+o+"%",ji(er,s))a=er[s];else if(a!=null){if(!(d in a)){if(!n)throw new Dr("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qn&&u+1>=r.length){var m=Qn(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=ji(a,d),a=a[d];f&&!l&&(er[s]=a)}}return a},od={exports:{}},Ga,id;function Ka(){if(id)return Ga;id=1;var t=Rr,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ga=e,Ga}var bx=Rr,zi=bx("%Object.getOwnPropertyDescriptor%",!0);if(zi)try{zi([],"length")}catch{zi=null}var sd=zi,ad=Ka(),xx=Jf,Lr=wo,ld=sd,wx=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Lr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Lr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Lr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Lr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Lr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Lr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!ld&&ld(e,n);if(ad)ad(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[n]=r;else throw new xx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Za=Ka(),cd=function(){return!!Za};cd.hasArrayLengthDefineBug=function(){if(!Za)return null;try{return Za([],"length",{value:1}).length!==1}catch{return!0}};var Sx=cd,Tx=Rr,ud=wx,Ex=Sx(),fd=sd,dd=wo,Cx=Tx("%Math.floor%"),Ax=function(e,n){if(typeof e!="function")throw new dd("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Cx(n)!==n)throw new dd("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&fd){var s=fd(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(Ex?ud(e,"length",n,!0,!0):ud(e,"length",n)),e};(function(t){var e=Wa,n=Rr,r=Ax,o=wo,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||e.call(s,i),l=Ka(),c=n("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(e,s,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(od);var _x=od.exports,hd=Rr,pd=_x,Px=pd(hd("String.prototype.indexOf")),Ox=function(e,n){var r=hd(e,!!n);return typeof r=="function"&&Px(e,".prototype.")>-1?pd(r):r};const Ix=M0(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var qa=typeof Map=="function"&&Map.prototype,Ya=Object.getOwnPropertyDescriptor&&qa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Wi=qa&&Ya&&typeof Ya.get=="function"?Ya.get:null,md=qa&&Map.prototype.forEach,Xa=typeof Set=="function"&&Set.prototype,Ja=Object.getOwnPropertyDescriptor&&Xa?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hi=Xa&&Ja&&typeof Ja.get=="function"?Ja.get:null,gd=Xa&&Set.prototype.forEach,kx=typeof WeakMap=="function"&&WeakMap.prototype,To=kx?WeakMap.prototype.has:null,Dx=typeof WeakSet=="function"&&WeakSet.prototype,Eo=Dx?WeakSet.prototype.has:null,Mx=typeof WeakRef=="function"&&WeakRef.prototype,yd=Mx?WeakRef.prototype.deref:null,Fx=Boolean.prototype.valueOf,Rx=Object.prototype.toString,Lx=Function.prototype.toString,Nx=String.prototype.match,Qa=String.prototype.slice,In=String.prototype.replace,Vx=String.prototype.toUpperCase,vd=String.prototype.toLowerCase,bd=RegExp.prototype.test,xd=Array.prototype.concat,qt=Array.prototype.join,$x=Array.prototype.slice,wd=Math.floor,el=typeof BigInt=="function"?BigInt.prototype.valueOf:null,tl=Object.getOwnPropertySymbols,nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Nr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ht=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Nr||!0)?Symbol.toStringTag:null,Sd=Object.prototype.propertyIsEnumerable,Td=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Ed(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||bd.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-wd(-t):wd(t);if(r!==t){var o=String(r),i=Qa.call(e,o.length+1);return In.call(o,n,"$&_")+"."+In.call(In.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return In.call(e,n,"$&_")}var rl=Ix,Cd=rl.custom,Ad=Od(Cd)?Cd:null,jx=function t(e,n,r,o){var i=n||{};if(kn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(kn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=kn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(kn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(kn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return kd(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Ed(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?Ed(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof e=="object")return ol(e)?"[Array]":"[Object]";var f=ow(i,r);if(typeof o>"u")o=[];else if(Id(o,e)>=0)return"[Circular]";function d(j,R,_){if(R&&(o=$x.call(o),o.push(R)),_){var M={depth:i.depth};return kn(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),t(j,M,r+1,o)}return t(j,i,r+1,o)}if(typeof e=="function"&&!Pd(e)){var h=qx(e),p=Ui(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+qt.call(p,", ")+" }":"")}if(Od(e)){var m=Nr?In.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):nl.call(e);return typeof e=="object"&&!Nr?Co(m):m}if(tw(e)){for(var y="<"+vd.call(String(e.nodeName)),v=e.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+_d(Bx(v[b].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+vd.call(String(e.nodeName))+">",y}if(ol(e)){if(e.length===0)return"[]";var g=Ui(e,d);return f&&!rw(g)?"["+sl(g,f)+"]":"[ "+qt.call(g,", ")+" ]"}if(Wx(e)){var S=Ui(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Sd.call(e,"cause")?"{ ["+String(e)+"] "+qt.call(xd.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+qt.call(S,", ")+" }"}if(typeof e=="object"&&s){if(Ad&&typeof e[Ad]=="function"&&rl)return rl(e,{depth:u-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Yx(e)){var w=[];return md&&md.call(e,function(j,R){w.push(d(R,e,!0)+" => "+d(j,e))}),Dd("Map",Wi.call(e),w,f)}if(Qx(e)){var T=[];return gd&&gd.call(e,function(j){T.push(d(j,e))}),Dd("Set",Hi.call(e),T,f)}if(Xx(e))return il("WeakMap");if(ew(e))return il("WeakSet");if(Jx(e))return il("WeakRef");if(Ux(e))return Co(d(Number(e)));if(Kx(e))return Co(d(el.call(e)));if(Gx(e))return Co(Fx.call(e));if(Hx(e))return Co(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Xf<"u"&&e===Xf)return"{ [object globalThis] }";if(!zx(e)&&!Pd(e)){var P=Ui(e,d),O=Td?Td(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",D=!O&&ht&&Object(e)===e&&ht in e?Qa.call(Dn(e),8,-1):k?"Object":"",L=O||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",A=L+(D||k?"["+qt.call(xd.call([],D||[],k||[]),": ")+"] ":"");return P.length===0?A+"{}":f?A+"{"+sl(P,f)+"}":A+"{ "+qt.call(P,", ")+" }"}return String(e)};function _d(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Bx(t){return In.call(String(t),/"/g,"&quot;")}function ol(t){return Dn(t)==="[object Array]"&&(!ht||!(typeof t=="object"&&ht in t))}function zx(t){return Dn(t)==="[object Date]"&&(!ht||!(typeof t=="object"&&ht in t))}function Pd(t){return Dn(t)==="[object RegExp]"&&(!ht||!(typeof t=="object"&&ht in t))}function Wx(t){return Dn(t)==="[object Error]"&&(!ht||!(typeof t=="object"&&ht in t))}function Hx(t){return Dn(t)==="[object String]"&&(!ht||!(typeof t=="object"&&ht in t))}function Ux(t){return Dn(t)==="[object Number]"&&(!ht||!(typeof t=="object"&&ht in t))}function Gx(t){return Dn(t)==="[object Boolean]"&&(!ht||!(typeof t=="object"&&ht in t))}function Od(t){if(Nr)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!nl)return!1;try{return nl.call(t),!0}catch{}return!1}function Kx(t){if(!t||typeof t!="object"||!el)return!1;try{return el.call(t),!0}catch{}return!1}var Zx=Object.prototype.hasOwnProperty||function(t){return t in this};function kn(t,e){return Zx.call(t,e)}function Dn(t){return Rx.call(t)}function qx(t){if(t.name)return t.name;var e=Nx.call(Lx.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Id(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Yx(t){if(!Wi||!t||typeof t!="object")return!1;try{Wi.call(t);try{Hi.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function Xx(t){if(!To||!t||typeof t!="object")return!1;try{To.call(t,To);try{Eo.call(t,Eo)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function Jx(t){if(!yd||!t||typeof t!="object")return!1;try{return yd.call(t),!0}catch{}return!1}function Qx(t){if(!Hi||!t||typeof t!="object")return!1;try{Hi.call(t);try{Wi.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function ew(t){if(!Eo||!t||typeof t!="object")return!1;try{Eo.call(t,Eo);try{To.call(t,To)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function tw(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function kd(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return kd(Qa.call(t,0,e.maxStringLength),e)+r}var o=In.call(In.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,nw);return _d(o,"single",e)}function nw(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Vx.call(e.toString(16))}function Co(t){return"Object("+t+")"}function il(t){return t+" { ? }"}function Dd(t,e,n,r){var o=r?sl(n,r):qt.call(n,", ");return t+" ("+e+") {"+o+"}"}function rw(t){for(var e=0;e<t.length;e++)if(Id(t[e],`
85
+ `)>=0)return!1;return!0}function ow(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=qt.call(Array(t.indent+1)," ");else return null;return{base:n,prev:qt.call(Array(e+1),n)}}function sl(t,e){if(t.length===0)return"";var n=`
86
+ `+e.prev+e.base;return n+qt.call(t,","+n)+`
87
+ `+e.prev}function Ui(t,e){var n=ol(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=kn(t,o)?e(t[o],t):""}var i=typeof tl=="function"?tl(t):[],s;if(Nr){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in t)kn(t,l)&&(n&&String(Number(l))===l&&l<t.length||Nr&&s["$"+l]instanceof Symbol||(bd.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof tl=="function")for(var c=0;c<i.length;c++)Sd.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var Md=Rr,Vr=Ox,iw=jx,sw=wo,Gi=Md("%WeakMap%",!0),Ki=Md("%Map%",!0),aw=Vr("WeakMap.prototype.get",!0),lw=Vr("WeakMap.prototype.set",!0),cw=Vr("WeakMap.prototype.has",!0),uw=Vr("Map.prototype.get",!0),fw=Vr("Map.prototype.set",!0),dw=Vr("Map.prototype.has",!0),al=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},hw=function(t,e){var n=al(t,e);return n&&n.value},pw=function(t,e,n){var r=al(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},mw=function(t,e){return!!al(t,e)},gw=function(){var e,n,r,o={assert:function(i){if(!o.has(i))throw new sw("Side channel does not contain "+iw(i))},get:function(i){if(Gi&&i&&(typeof i=="object"||typeof i=="function")){if(e)return aw(e,i)}else if(Ki){if(n)return uw(n,i)}else if(r)return hw(r,i)},has:function(i){if(Gi&&i&&(typeof i=="object"||typeof i=="function")){if(e)return cw(e,i)}else if(Ki){if(n)return dw(n,i)}else if(r)return mw(r,i);return!1},set:function(i,s){Gi&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Gi),lw(e,i,s)):Ki?(n||(n=new Ki),fw(n,i,s)):(r||(r={key:{},next:null}),pw(r,i,s))}};return o},yw=String.prototype.replace,vw=/%20/g,ll={RFC1738:"RFC1738",RFC3986:"RFC3986"},Fd={default:ll.RFC3986,formatters:{RFC1738:function(t){return yw.call(t,vw,"+")},RFC3986:function(t){return String(t)}},RFC1738:ll.RFC1738,RFC3986:ll.RFC3986},bw=Fd,cl=Object.prototype.hasOwnProperty,tr=Array.isArray,Yt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),xw=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(tr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Rd=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},ww=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(tr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!cl.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return tr(e)&&!tr(n)&&(o=Rd(e,r)),tr(e)&&tr(n)?(n.forEach(function(i,s){if(cl.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return cl.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},Sw=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},Tw=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Ew=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===bw.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+Yt[c];continue}if(c<2048){a=a+(Yt[192|c>>6]+Yt[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Yt[224|c>>12]+Yt[128|c>>6&63]+Yt[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=Yt[240|c>>18]+Yt[128|c>>12&63]+Yt[128|c>>6&63]+Yt[128|c&63]}return a},Cw=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return xw(n),e},Aw=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_w=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pw=function(e,n){return[].concat(e,n)},Ow=function(e,n){if(tr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},Ld={arrayToObject:Rd,assign:Sw,combine:Pw,compact:Cw,decode:Tw,encode:Ew,isBuffer:_w,isRegExp:Aw,maybeMap:Ow,merge:ww},Iw=Ld,Nd=Fd,kw=Date.prototype.toISOString,Vd=Nd.default;Iw.encode,Nd.formatters[Vd];var Dw=Ld;Dw.decode;var $d=t=>Array.isArray(t),ul=t=>t===void 0,fl=t=>t===null,Mw=Function.bind.call(Function.call,Object.prototype.toString),Fw=t=>!!t&&Mw(t)==="[object Error]"||t instanceof Error,jd=(t,e)=>t instanceof e,Rw=t=>{const e=typeof t;return e==="undefined"||e===null||e==="number"||e==="string"||e==="boolean"||e==="bigint"},Lw=t=>Object.prototype.toString.call(t)==="[object Date]"&&jd(t,Date),Ao={array:$d,date:Lw,empty:t=>fl(t)||ul(t)?!0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0:Number.isNaN(t),function:t=>typeof t=="function",instance:jd,isError:Fw,keyof:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nan:t=>Number.isNaN(t),nil:t=>fl(t)||ul(t),null:fl,number:t=>typeof t=="number"||!Number.isNaN(t),object:t=>!$d(t)&&typeof t=="object",primitive:Rw,string:t=>typeof t=="string",undefined:ul},dl=(t,e,n)=>{const[r,...o]=e;if(o.length>0){if(!t[r]){const i=`${+o[0]}`===o[0];t[r]=i?[]:{}}if(typeof t[r]!="object"){const i=`${+o[0]}`===o[0];t[r]=dl(i?[]:{},o,n)}else t[r]=dl(t[r],o,n)}else t[r]=n;return t},Nw=t=>Object.keys(t),Vw=t=>t.replace("[",".").replace("]","").split("."),Bd=(t,e,n)=>{const r=Array.isArray(e)?e:Vw(e),o=structuredClone(t);return dl(o,r,n),o};const hl="-";function $w(t){const e=Bw(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function o(s){const a=s.split(hl);return a[0]===""&&a.length!==1&&a.shift(),zd(a,e)||jw(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function zd(t,e){var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?zd(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(hl);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Wd=/^\[(.+)\]$/;function jw(t){if(Wd.test(t)){const e=Wd.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function Bw(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Ww(Object.entries(t.classGroups),n).forEach(([i,s])=>{pl(s,r,i,e)}),r}function pl(t,e,n,r){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:Hd(e,o);i.classGroupId=n;return}if(typeof o=="function"){if(zw(o)){pl(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{pl(s,Hd(e,i),n,r)})})}function Hd(t,e){let n=t;return e.split(hl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function zw(t){return t.isThemeGetter}function Ww(t,e){return e?t.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[n,o]}):t}function Hw(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),e++,e>t&&(e=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Ud="!";function Uw(t){const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],i=e.length;function s(a){const l=[];let c=0,u=0,f;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+i)===e)){l.push(a.slice(u,y)),u=y+i;continue}if(v==="/"){f=y;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(Ud),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function Gw(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function Kw(t){return{cache:Hw(t.cacheSize),parseClassName:Uw(t),...$w(t)}}const Zw=/\s+/;function qw(t,e){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(Zw).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:s};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=Gw(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Ud:h,classGroupId:d,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Yw(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Gd(e))&&(r&&(r+=" "),r+=n);return r}function Gd(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Gd(t[r]))&&(n&&(n+=" "),n+=e);return n}function Xw(t,...e){let n,r,o,i=s;function s(l){const c=e.reduce((u,f)=>f(u),t());return n=Kw(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=qw(l,n);return o(l,u),u}return function(){return i(Yw.apply(null,arguments))}}function $e(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const Kd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jw=/^\d+\/\d+$/,Qw=new Set(["px","full","screen"]),eS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tS=/\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$/,nS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function hn(t){return nr(t)||Qw.has(t)||Jw.test(t)}function Mn(t){return $r(t,"length",dS)}function nr(t){return!!t&&!Number.isNaN(Number(t))}function Zi(t){return $r(t,"number",nr)}function _o(t){return!!t&&Number.isInteger(Number(t))}function iS(t){return t.endsWith("%")&&nr(t.slice(0,-1))}function ye(t){return Kd.test(t)}function Fn(t){return eS.test(t)}const sS=new Set(["length","size","percentage"]);function aS(t){return $r(t,sS,Zd)}function lS(t){return $r(t,"position",Zd)}const cS=new Set(["image","url"]);function uS(t){return $r(t,cS,pS)}function fS(t){return $r(t,"",hS)}function Po(){return!0}function $r(t,e,n){const r=Kd.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function dS(t){return tS.test(t)&&!nS.test(t)}function Zd(){return!1}function hS(t){return rS.test(t)}function pS(t){return oS.test(t)}function mS(){const t=$e("colors"),e=$e("spacing"),n=$e("blur"),r=$e("brightness"),o=$e("borderColor"),i=$e("borderRadius"),s=$e("borderSpacing"),a=$e("borderWidth"),l=$e("contrast"),c=$e("grayscale"),u=$e("hueRotate"),f=$e("invert"),d=$e("gap"),h=$e("gradientColorStops"),p=$e("gradientColorStopPositions"),m=$e("inset"),y=$e("margin"),v=$e("opacity"),b=$e("padding"),g=$e("saturate"),S=$e("scale"),w=$e("sepia"),T=$e("skew"),P=$e("space"),O=$e("translate"),k=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ye,e],A=()=>[ye,e],j=()=>["",hn,Mn],R=()=>["auto",nr,ye],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],N=()=>["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",ye],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[nr,Zi],Y=()=>[nr,ye];return{cacheSize:500,separator:":",theme:{colors:[Po],spacing:[hn,Mn],blur:["none","",Fn,ye],brightness:$(),borderColor:[t],borderRadius:["none","","full",Fn,ye],borderSpacing:A(),borderWidth:j(),contrast:$(),grayscale:q(),hueRotate:Y(),invert:q(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[iS,Mn],inset:L(),margin:L(),opacity:$(),padding:A(),saturate:$(),scale:$(),sepia:q(),skew:Y(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[Fn]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),ye]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],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",_o,ye]}],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",ye]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",_o,ye]}],"grid-cols":[{"grid-cols":[Po]}],"col-start-end":[{col:["auto",{span:["full",_o,ye]},ye]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Po]}],"row-start-end":[{row:["auto",{span:[_o,ye]},ye]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,e]}],"min-w":[{"min-w":[ye,e,"min","max","fit"]}],"max-w":[{"max-w":[ye,e,"none","full","min","max","fit","prose",{screen:[Fn]},Fn]}],h:[{h:[ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Fn,Mn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Zi]}],"font-family":[{font:[Po]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",nr,Zi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hn,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hn,Mn]}],"underline-offset":[{"underline-offset":["auto",hn,ye]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),lS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uS]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[hn,ye]}],"outline-w":[{outline:[hn,Mn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[hn,Mn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Fn,fS]}],"shadow-color":[{shadow:[Po]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fn,ye]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[_o,ye]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[hn,Mn,Zi]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const gS=Xw(mS),ml=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n!==null&&(n.current=e)})},yS=t=>t.$$typeof===Symbol.for("react.forward_ref")||t.$$typeof===Symbol.for("react.fragment")?!0:t.$$typeof===Symbol.for("react.element"),vS=t=>Ao.function(t),Nt=(...t)=>gS(k0(t)),qd=({reportStatus:t,hideLeft:e=!1,className:n,children:r,title:o})=>E.jsxs("div",{className:Nt("w-full justify-between",e&&r===null?"hidden":"flex",n),children:[e?null:E.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,t?E.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[E.jsx(C0,{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}),E.jsx(A0,{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]}),qi=({optionalText:t="Optional",left:e,rightLabel:n,container:r,right:o,children:i,error:s,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return E.jsxs("fieldset",{"data-error":!!s,form:a,className:Nt("group inline-block w-full",r),children:[E.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?E.jsx(qd,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:t||n?E.jsxs(x.Fragment,{children:[h?null:E.jsx("span",{className:"text-opacity-70",children:t}),n?E.jsx(x.Fragment,{children:n}):null]}):null}):null,E.jsxs("div",{className:"relative group flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[e?E.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:e}):null,i,o?E.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),E.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:s})]})},Yd=t=>{const e=x.useRef();return x.useEffect(()=>{e.current=t},[t]),e.current},Xd=x.forwardRef(({selected:t,active:e,onClick:n,option:r,...o},i)=>E.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full",children:E.jsx("button",{type:"button",onClick:n,"aria-selected":t,className:`p-2 w-full text-left cursor-pointer ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),bS={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},xS={caseSensitive:!1,sort:!1},wS=[],SS=x.forwardRef(({options:t,required:e=!0,...n},r)=>{const[o,i]=x.useState(!1),[s,a]=x.useState(""),[l,c]=x.useState(n.value??n.defaultValue??""),[u,f]=x.useState(null),d=x.useRef(wS),h=Yd(u),p=new Ir(t,["value"],xS).search(s),{x:m,y,strategy:v,refs:b,context:g}=Ra({open:o,transform:!0,onOpenChange:i,whileElementsMounted:Aa,middleware:[_a(4),Bb({padding:10,apply(A){Object.assign(A.elements.floating.style,{width:`${A.rects.reference.width}px`,maxHeight:`${Math.min(480,A.availableHeight)}px`})}})]});x.useImperativeHandle(r,()=>{var A;return(A=b.domReference)==null?void 0:A.current},[b]);const S=x0(g,bS),{getReferenceProps:w,getFloatingProps:T,getItemProps:P}=Na([$a(g,{role:"listbox"}),Fa(g),g0(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:A=>{const j=p.length-1;if(A===null&&h===0)return f(j);if(A===null&&h===j)return f(0);const R=A??h??null;return R===null?void 0:f(R)}})]),O=A=>{c(A.value),i(!1),a("")},k=A=>{var R;const j=A.target.value;return a(j),!o&&j===""||j?i(!0):(R=n.onChange)==null?void 0:R.call(n,A)},D=()=>{i(!0),a("")},L=()=>{a(""),c(""),i(!1)};return E.jsxs("fieldset",{className:"relative w-auto",children:[E.jsx(qi,{...n,required:e,right:E.jsxs("span",{className:"flex items-center gap-0.5",children:[E.jsx(ja,{size:20}),l?E.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:E.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.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:E.jsx("input",{...w({...n,onChange:k,onFocus:D,ref:b.setReference,onClick:A=>A.currentTarget.focus(),onKeyDown(A){if(A.key==="Escape")return A.currentTarget.blur(),i(!1);if(A.key==="Enter"){if(u!==null&&p[u])return A.preventDefault(),O(p[u]);if(p.length===1)return A.preventDefault(),O(p[0])}}}),required:e,value:o?s:l,"aria-autocomplete":"list",autoComplete:"off",className:Nt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||s?"pe-12":"",n.left?"ps-8":"",n.className)})}),E.jsx(Mf,{preserveTabOrder:!0,children:E.jsx(Nf,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:E.jsx("ul",{...T({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...S.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((A,j)=>x.createElement(Xd,{...P({onClick:()=>O(A),ref:R=>void(d.current[j]=R)}),key:`${A.value}-option`,option:A,selected:u===j,active:l===A.value}))})})})]})});var at=function(){return at=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},at.apply(this,arguments)};function gl(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function yl(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Oo=function(t){return t.replace(new RegExp(" ","g")," ")},Jd=function(t,e){var n=t.length,r=e+1;if(n>=r)return t;var o="0".repeat(r-n);return"".concat(o).concat(t)},TS=function(t){return t.replace(/^0+([0-9]+)/,"$1")},Qd=function(t,e,n){var r=t.length-2,o=TS(t.substring(0,r)),i=t.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(e)+n+i},eh=function(t){return t===void 0&&(t=""),t.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},th=function(t){return Number.parseFloat(t.replace(/,/g,".").replace(/(.*)\./,function(e){return"".concat(e.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},ES=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},vl=function(t){var e=x.useRef(t);return x.useEffect(function(){e.current=t},[t]),e},CS=function(t){return t==="money"||t==="currency"},AS=function(t,e,n){return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return at(at({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},bl=function(t,e){var n=Jd(eh(t),e.fraction.length),r="".concat(e.currency).concat(Qd(n,e.group,e.decimal));return Oo(r)},_S=x.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n,o=t.currency,i=o===void 0?"BRL":o,s=t.currencyDisplay,a=s===void 0?"symbol":s;t.mask;var l=t.onChange,c=gl(t,["locale","currency","currencyDisplay","mask","onChange"]),u=x.useRef(null);x.useImperativeHandle(e,function(){return u.current});var f=x.useMemo(function(){var p=AS(r,i,a);return p.currency=Oo("".concat(p.currency.trim()," ")),p.literal=Oo(p.literal.trim()),p},[r,i]),d=function(p){var m=bl(p.target.value,f),y=th(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?bl(c.defaultValue,f):void 0;return x.createElement("input",at({},c,{value:typeof c.value=="string"?bl(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),PS=1,OS=function(t){return t==="percentage"||t==="percent"||t==="percentual"},IS=function(t){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(e,n){var r;return at(at({},e),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},xl=function(t,e){var n=Jd(eh(t),e.fraction.length),r="".concat(Qd(n,e.group,e.decimal)," ").concat(e.percentSign);return Oo(r)},kS=x.forwardRef(function(t,e){var n=t.locale,r=n===void 0?"pt-BR":n;t.mask;var o=t.onChange,i=t.onKeyUp,s=gl(t,["locale","mask","onChange","onKeyUp"]),a=x.useRef(null),l=yl(x.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];x.useImperativeHandle(e,function(){return a.current}),x.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(xl(b,f))},[s.value]);var f=x.useMemo(function(){var v=IS(r);return v.percentSign=Oo("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-PS,h=function(v){var b,g=a.current;g&&(g.setSelectionRange(d,d),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,S=b.selectionEnd,w=g!==S,T=d<g;!w&&T&&h()}i==null||i(v)},m=function(v){var b=xl(v.target.value,f),g=th(b);u(b),v.target.value=b,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};x.useEffect(function(){return h()},[c]);var y=s.defaultValue?xl(s.defaultValue,f):void 0;return x.createElement("input",at({},s,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),Io={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},DS=function(t){for(var e,n=t.length,r=[],o=0;o<n;o++){var i=t[o],s=Yi[i];s===void 0?r.push(i.replace(Io.dots,"\\.").replace(Io.openParenthesis,"\\(").replace(Io.closeParenthesis,"\\)")):r.push((e=s.regex)===null||e===void 0?void 0:e.source)}return r.join("").replace(Io.leadingBars,"\\")},ko=function(t,e,n){var r=typeof t=="function",o=r?"":t;if(r&&(o=t(e)),Array.isArray(o))return wl(o,n);var i=DS(o);return n?"^".concat(i,"$"):i},MS=function(t){return t.replace(Io.escape,"\\$&")},wl=function(t,e){var n=t.map(function(r){return typeof r=="string"?MS(r):r.source}).join("");return new RegExp(e?"^".concat(n,"$"):n).source},Yi={A:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(t){return t.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},FS=/\d/,nh="(dd) 9dddd-dddd",rh="(dd) dddd-dddd",oh="ddd.ddd.ddd-dd",ih="dd.ddd.ddd/dddd-dd",Xi=function(t){return t.replace(/\D/g,"")},RS=["2",/[0-3]/,":",/[0-5]/,/\d/],LS=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Ct={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:oh,isoDate:"dddd-dd-dd",cnpj:ih,telephone:rh,cellphone:nh,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(t){return t.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(t){return Xi(t).length<=11?oh:ih},int:function(t){return t===void 0&&(t=""),FS.test(t.toString().slice(-1))?"d".repeat(Math.max(t.length,0)):"d".repeat(Math.max(t.length-1,0))},cellTelephone:function(t){var e=Xi(t);return e.length<11?rh:nh},time:function(t){var e=Xi(t),n=e[0];return n==="2"?RS:LS}},At=function(t,e,n){var r;return n===void 0&&(n={}),at({mask:t,inputMode:e,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof t=="function")?void 0:ko(t,"",!0),infinity:n.infinity},n)},pt={cellTelephone:At(Ct.cellTelephone,"tel"),cellphone:At(Ct.cellphone,"tel"),cep:At(Ct.cep,"decimal"),cnpj:At(Ct.cnpj,"decimal"),color:At(Ct.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(Ct.cpf,"decimal"),cpfCnpj:At(Ct.cpfCnpj,"decimal",{transform:Xi}),creditCard:At(Ct.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(Ct.date,"decimal"),int:At(Ct.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(Ct.isoDate,"decimal"),telephone:At(Ct.telephone,"tel"),time:At(Ct.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(Ct.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function sh(t,e,n,r){var o,i;r===void 0&&(r=Yi);for(var s=n(t),a="",l=0,c=0;l<e.length&&c<s.length;){var u=e[l],f=u instanceof RegExp?u:r[u],d=s[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&i!==void 0?i:d),c+=1,l+=1}return a}var ah=function(t){return t},NS=function(t,e,n){if(!t||!n)return!1;var r=new RegExp(ko(t,n,e));return r.test(n)};function VS(t){var e=x.useRef(t);return x.useEffect(function(){e.current=t},[t]),e.current}var $S=x.forwardRef(function(t,e){var n=t.infinity,r=n===void 0?!1:n,o=t.strict,i=o===void 0?!0:o,s=t.transform,a=t.onChange,l=t.pattern,c=t.tokens,u=t.mask,f=t.onChangeText,d=t.as,h=gl(t,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=x.useRef(null);x.useImperativeHandle(e,function(){return p.current});var m=vl(a),y=vl(f),v=vl(u),b=x.useRef(NS(u,i,h.value||h.defaultValue)),g=d??"input",S=yl(x.useState(""),2),w=S[0],T=S[1],P=VS(w),O=x.useCallback(function(_,M){var N,z,q=(N=_??M)!==null&&N!==void 0?N:"";if(u===void 0)return q;var C=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return sh(C,typeof u=="function"?u(C):u,s??ah,c??Yi)},[s,u,c]),k=yl(x.useState(function(){return O(h.value,h.defaultValue)}),2),D=k[0],L=k[1],A=O(h.defaultValue,h.defaultValue),j=x.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var _=u(D);return Array.isArray(_)?wl(_,i):ko(u,D,i)}return typeof u=="string"?ko(u,D,i):wl(u,i)},[l,D,i,u]);x.useEffect(function(){if(h.value!==void 0){var _=O(h.value,h.defaultValue);L(_),p.current!==null&&(p.current.value=_)}},[h.value,u,s,h.defaultValue]);var R=function(_){var M,N,z,q,C,$=_.currentTarget,Y=_.target.value;if(v.current===void 0)return L(Y),(M=y.current)===null||M===void 0||M.call(y,Y),(N=m.current)===null||N===void 0||N.call(m,_),f==null?void 0:f(Y);var re=new RegExp(ko(v.current,Y,i)),ee=(z=$.selectionEnd)!==null&&z!==void 0?z:0,W=function(X,le,B){if(X.type!=="number")return X.setSelectionRange(le,B)};if(r&&b.current&&Y.length>=D.length)return $.value=D,W($,ee-1,ee-1);var I=!1;Y.length<P.length&&(b.current=!1,I=!0),re.test(Y)&&(b.current=!0);var V=ee,H=Y[V-1],K=sh(Y,typeof v.current=="function"?v.current(Y):v.current,s??ah,c??Yi);for($.value=K,L(K);V<K.length&&K.charAt(V-1)!==H;)V+=1;I?W($,ee,ee):W($,V,V),_.target.value=K,T(K),(q=y.current)===null||q===void 0||q.call(y,K),(C=m.current)===null||C===void 0||C.call(m,_)};return x.createElement(g,at({},h,{ref:p,pattern:j,onChange:R,defaultValue:lh(h.defaultValue)?A:void 0,value:lh(h.value)?O(h.value,h.value):h.value}))}),lh=function(t){return typeof t=="string"},ch=x.forwardRef(function(t,e){return CS(t.mask)?x.createElement(_S,at({},t,{mask:void 0,ref:e})):OS(t.mask)?x.createElement(kS,at({},t,{mask:void 0,ref:e})):x.createElement($S,at({},t,{ref:e}))}),_t=function(t){return function(e){return x.createElement(ch,at({},t,e))}};_t(pt.cellTelephone),_t(pt.cellphone),_t(pt.cep),_t(pt.cnpj),_t(pt.color),_t(pt.cpf),_t(pt.cpfCnpj),_t(pt.creditCard),_t(pt.date),_t(pt.int),_t(pt.isoDate),_t(pt.telephone),_t(pt.time),_t(pt.uuid);var jS=x.forwardRef(function(e,n){var r=x.useMemo(function(){if(e.mask)return typeof e.mask=="string"&&ES(pt,e.mask)?pt[e.mask]:{mask:e.mask}},[e.mask]),o=at(at({},e),r);return x.createElement(ch,at({},o,{ref:n}))});const Sl=x.forwardRef(({type:t="text",container:e,next:n,rightLabel:r,optionalText:o,hideLeft:i=!1,right:s,left:a,...l},c)=>{const u=l.id??l.name,f=x.useRef(null);return x.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 b=document.getElementById(v);if(b)return b.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),E.jsx(qi,{...l,right:s,left:a,hideLeft:i,rightLabel:r,optionalText:o,container:Nt("group inline-block w-full",e),children:E.jsx(jS,{...l,type:t,"data-next":n,ref:ml(c,f),id:u,name:u,className:Nt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",s?"pe-4":"",a?"ps-4":"",l.className)})})}),rr=x.forwardRef(({container:t,required:e=!0,options:n,...r},o)=>{const i=x.useRef(null),s=r.id??r.name;return x.useEffect(()=>{if(i.current===null)return;const a=i.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),E.jsx(qi,{...r,required:e,container:Nt("group inline-block w-full",t),right:E.jsx(ja,{size:20}),children:E.jsxs("select",{...r,ref:ml(o,i),id:s,name:s,required:e,"data-selected":!!r.value||!1,className:Nt("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:[E.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>E.jsx("option",{...a,children:a.label??a.value},`${s}-select-option-${a.value}`))]})})}),BS=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zS=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],WS=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],HS=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uh=(t,e,n)=>{let r=t;return typeof e=="string"||Array.isArray(e)?r=t.toLocaleString(e,n):(e===!0||n!==void 0)&&(r=t.toLocaleString(void 0,n)),r};function fh(t,e){if(!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);e={bits:!1,binary:!1,space:!0,...e};const n=e.bits?e.binary?HS:WS:e.binary?zS:BS,r=e.space?" ":"";if(e.signed&&t===0)return` 0${r}${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";o&&(t=-t);let s;if(e.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:e.minimumFractionDigits}),e.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:e.maximumFractionDigits,...s}),t<1){const u=uh(t,e.locale,s);return i+u+r+n[0]}const a=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**a,s||(t=t.toPrecision(3));const l=uh(Number(t),e.locale,s),c=n[a];return i+l+r+c}var Tl={exports:{}},Ji={exports:{}},Oe={};/** @license React v16.13.1
85
88
  * react-is.production.min.js
86
89
  *
87
90
  * Copyright (c) Facebook, Inc. and its affiliates.
88
91
  *
89
92
  * This source code is licensed under the MIT license found in the
90
93
  * LICENSE file in the root directory of this source tree.
91
- */var xd;function Vx(){if(xd)return Oe;xd=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(x){if(typeof x=="object"&&x!==null){var T=x.$$typeof;switch(T){case e:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case a:case u:case p:case h:case s:return x;default:return T}}case n:return T}}}function S(x){return g(x)===c}return Oe.AsyncMode=l,Oe.ConcurrentMode=c,Oe.ContextConsumer=a,Oe.ContextProvider=s,Oe.Element=e,Oe.ForwardRef=u,Oe.Fragment=r,Oe.Lazy=p,Oe.Memo=h,Oe.Portal=n,Oe.Profiler=i,Oe.StrictMode=o,Oe.Suspense=f,Oe.isAsyncMode=function(x){return S(x)||g(x)===l},Oe.isConcurrentMode=S,Oe.isContextConsumer=function(x){return g(x)===a},Oe.isContextProvider=function(x){return g(x)===s},Oe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Oe.isForwardRef=function(x){return g(x)===u},Oe.isFragment=function(x){return g(x)===r},Oe.isLazy=function(x){return g(x)===p},Oe.isMemo=function(x){return g(x)===h},Oe.isPortal=function(x){return g(x)===n},Oe.isProfiler=function(x){return g(x)===i},Oe.isStrictMode=function(x){return g(x)===o},Oe.isSuspense=function(x){return g(x)===f},Oe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===d||typeof x=="object"&&x!==null&&(x.$$typeof===p||x.$$typeof===h||x.$$typeof===s||x.$$typeof===a||x.$$typeof===u||x.$$typeof===y||x.$$typeof===v||x.$$typeof===b||x.$$typeof===m)},Oe.typeOf=g,Oe}var Ie={};/** @license React v16.13.1
94
+ */var dh;function US(){if(dh)return Oe;dh=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case l:case c:case r:case i:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case p:case h:case s:return w;default:return T}}case n:return T}}}function S(w){return g(w)===c}return Oe.AsyncMode=l,Oe.ConcurrentMode=c,Oe.ContextConsumer=a,Oe.ContextProvider=s,Oe.Element=e,Oe.ForwardRef=u,Oe.Fragment=r,Oe.Lazy=p,Oe.Memo=h,Oe.Portal=n,Oe.Profiler=i,Oe.StrictMode=o,Oe.Suspense=f,Oe.isAsyncMode=function(w){return S(w)||g(w)===l},Oe.isConcurrentMode=S,Oe.isContextConsumer=function(w){return g(w)===a},Oe.isContextProvider=function(w){return g(w)===s},Oe.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Oe.isForwardRef=function(w){return g(w)===u},Oe.isFragment=function(w){return g(w)===r},Oe.isLazy=function(w){return g(w)===p},Oe.isMemo=function(w){return g(w)===h},Oe.isPortal=function(w){return g(w)===n},Oe.isProfiler=function(w){return g(w)===i},Oe.isStrictMode=function(w){return g(w)===o},Oe.isSuspense=function(w){return g(w)===f},Oe.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===i||w===o||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===h||w.$$typeof===s||w.$$typeof===a||w.$$typeof===u||w.$$typeof===y||w.$$typeof===v||w.$$typeof===b||w.$$typeof===m)},Oe.typeOf=g,Oe}var Ie={};/** @license React v16.13.1
92
95
  * react-is.development.js
93
96
  *
94
97
  * Copyright (c) Facebook, Inc. and its affiliates.
95
98
  *
96
99
  * This source code is licensed under the MIT license found in the
97
100
  * LICENSE file in the root directory of this source tree.
98
- */var wd;function $x(){return wd||(wd=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===f||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===y||B.$$typeof===v||B.$$typeof===b||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var ke=B.$$typeof;switch(ke){case e:var He=B.type;switch(He){case l:case c:case r:case i:case o:case f:return He;default:var Xe=He&&He.$$typeof;switch(Xe){case a:case u:case p:case h:case s:return Xe;default:return ke}}case n:return ke}}}var x=l,T=c,P=a,O=s,k=e,D=u,L=r,A=p,j=h,F=n,_=i,M=o,N=f,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.")),C(B)||S(B)===l}function C(B){return S(B)===c}function $(B){return S(B)===a}function Y(B){return S(B)===s}function re(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function ee(B){return S(B)===u}function W(B){return S(B)===r}function I(B){return S(B)===p}function V(B){return S(B)===h}function H(B){return S(B)===n}function K(B){return S(B)===i}function X(B){return S(B)===o}function le(B){return S(B)===f}Ie.AsyncMode=x,Ie.ConcurrentMode=T,Ie.ContextConsumer=P,Ie.ContextProvider=O,Ie.Element=k,Ie.ForwardRef=D,Ie.Fragment=L,Ie.Lazy=A,Ie.Memo=j,Ie.Portal=F,Ie.Profiler=_,Ie.StrictMode=M,Ie.Suspense=N,Ie.isAsyncMode=q,Ie.isConcurrentMode=C,Ie.isContextConsumer=$,Ie.isContextProvider=Y,Ie.isElement=re,Ie.isForwardRef=ee,Ie.isFragment=W,Ie.isLazy=I,Ie.isMemo=V,Ie.isPortal=H,Ie.isProfiler=K,Ie.isStrictMode=X,Ie.isSuspense=le,Ie.isValidElementType=g,Ie.typeOf=S}()),Ie}var Sd;function Td(){return Sd||(Sd=1,process.env.NODE_ENV==="production"?Bi.exports=Vx():Bi.exports=$x()),Bi.exports}/*
101
+ */var hh;function GS(){return hh||(hh=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function g(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===f||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===y||B.$$typeof===v||B.$$typeof===b||B.$$typeof===m)}function S(B){if(typeof B=="object"&&B!==null){var ke=B.$$typeof;switch(ke){case e:var He=B.type;switch(He){case l:case c:case r:case i:case o:case f:return He;default:var Xe=He&&He.$$typeof;switch(Xe){case a:case u:case p:case h:case s:return Xe;default:return ke}}case n:return ke}}}var w=l,T=c,P=a,O=s,k=e,D=u,L=r,A=p,j=h,R=n,_=i,M=o,N=f,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.")),C(B)||S(B)===l}function C(B){return S(B)===c}function $(B){return S(B)===a}function Y(B){return S(B)===s}function re(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function ee(B){return S(B)===u}function W(B){return S(B)===r}function I(B){return S(B)===p}function V(B){return S(B)===h}function H(B){return S(B)===n}function K(B){return S(B)===i}function X(B){return S(B)===o}function le(B){return S(B)===f}Ie.AsyncMode=w,Ie.ConcurrentMode=T,Ie.ContextConsumer=P,Ie.ContextProvider=O,Ie.Element=k,Ie.ForwardRef=D,Ie.Fragment=L,Ie.Lazy=A,Ie.Memo=j,Ie.Portal=R,Ie.Profiler=_,Ie.StrictMode=M,Ie.Suspense=N,Ie.isAsyncMode=q,Ie.isConcurrentMode=C,Ie.isContextConsumer=$,Ie.isContextProvider=Y,Ie.isElement=re,Ie.isForwardRef=ee,Ie.isFragment=W,Ie.isLazy=I,Ie.isMemo=V,Ie.isPortal=H,Ie.isProfiler=K,Ie.isStrictMode=X,Ie.isSuspense=le,Ie.isValidElementType=g,Ie.typeOf=S}()),Ie}var ph;function mh(){return ph||(ph=1,process.env.NODE_ENV==="production"?Ji.exports=US():Ji.exports=GS()),Ji.exports}/*
99
102
  object-assign
100
103
  (c) Sindre Sorhus
101
104
  @license MIT
102
- */var Ja,Ed;function jx(){if(Ed)return Ja;Ed=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ja=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(t){c=t(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},Ja}var Qa,Cd;function el(){if(Cd)return Qa;Cd=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qa=t,Qa}var tl,Ad;function _d(){return Ad||(Ad=1,tl=Function.call.bind(Object.prototype.hasOwnProperty)),tl}var nl,Pd;function Bx(){if(Pd)return nl;Pd=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=el(),n={},r=_d();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";t("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},nl=o,nl}var rl,Od;function zx(){if(Od)return rl;Od=1;var t=Td(),e=jx(),n=el(),r=_d(),o=Bx(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return rl=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(C){var $=C&&(c&&C[c]||C[u]);if(typeof $=="function")return $}var d="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:g,element:S(),elementType:x(),instanceOf:T,node:D(),objectOf:O,oneOf:P,oneOfType:k,shape:A,exact:j};function p(C,$){return C===$?C!==0||1/C===1/$:C!==C&&$!==$}function m(C,$){this.message=C,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function y(C){if(process.env.NODE_ENV!=="production")var $={},Y=0;function re(W,I,V,H,K,X,le){if(H=H||d,X=X||V,le!==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 ke=H+":"+V;!$[ke]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+H+"`. 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."),$[ke]=!0,Y++)}}return I[V]==null?W?I[V]===null?new m("The "+K+" `"+X+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+K+" `"+X+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:C(I,V,H,K,X)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function v(C){function $(Y,re,ee,W,I,V){var H=Y[re],K=M(H);if(K!==C){var X=N(H);return new m("Invalid "+W+" `"+I+"` of type "+("`"+X+"` supplied to `"+ee+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return y($)}function b(){return y(s)}function g(C){function $(Y,re,ee,W,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var V=Y[re];if(!Array.isArray(V)){var H=M(V);return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected an array."))}for(var K=0;K<V.length;K++){var X=C(V,K,ee,W,I+"["+K+"]",n);if(X instanceof Error)return X}return null}return y($)}function S(){function C($,Y,re,ee,W){var I=$[Y];if(!a(I)){var V=M(I);return new m("Invalid "+ee+" `"+W+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(C)}function x(){function C($,Y,re,ee,W){var I=$[Y];if(!t.isValidElementType(I)){var V=M(I);return new m("Invalid "+ee+" `"+W+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(C)}function T(C){function $(Y,re,ee,W,I){if(!(Y[re]instanceof C)){var V=C.name||d,H=q(Y[re]);return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected ")+("instance of `"+V+"`."))}return null}return y($)}function P(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function $(Y,re,ee,W,I){for(var V=Y[re],H=0;H<C.length;H++)if(p(V,C[H]))return null;var K=JSON.stringify(C,function(le,B){var ke=N(B);return ke==="symbol"?String(B):B});return new m("Invalid "+W+" `"+I+"` of value `"+String(V)+"` "+("supplied to `"+ee+"`, expected one of "+K+"."))}return y($)}function O(C){function $(Y,re,ee,W,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected an object."));for(var K in V)if(r(V,K)){var X=C(V,K,ee,W,I+"."+K,n);if(X instanceof Error)return X}return null}return y($)}function k(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var $=0;$<C.length;$++){var Y=C[$];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Y)+" at index "+$+"."),s}function re(ee,W,I,V,H){for(var K=[],X=0;X<C.length;X++){var le=C[X],B=le(ee,W,I,V,H,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var ke=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+V+" `"+H+"` supplied to "+("`"+I+"`"+ke+"."))}return y(re)}function D(){function C($,Y,re,ee,W){return F($[Y])?null:new m("Invalid "+ee+" `"+W+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(C)}function L(C,$,Y,re,ee){return new m((C||"React class")+": "+$+" type `"+Y+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function A(C){function $(Y,re,ee,W,I){var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));for(var K in C){var X=C[K];if(typeof X!="function")return L(ee,W,I,K,N(X));var le=X(V,K,ee,W,I+"."+K,n);if(le)return le}return null}return y($)}function j(C){function $(Y,re,ee,W,I){var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));var K=e({},Y[re],C);for(var X in K){var le=C[X];if(r(C,X)&&typeof le!="function")return L(ee,W,I,X,N(le));if(!le)return new m("Invalid "+W+" `"+I+"` key `"+X+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Y[re],null," ")+`
103
- Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=le(V,X,ee,W,I+"."+X,n);if(B)return B}return null}return y($)}function F(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(F);if(C===null||a(C))return!0;var $=f(C);if($){var Y=$.call(C),re;if($!==C.entries){for(;!(re=Y.next()).done;)if(!F(re.value))return!1}else for(;!(re=Y.next()).done;){var ee=re.value;if(ee&&!F(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(C,$){return C==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function M(C){var $=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":_($,C)?"symbol":$}function N(C){if(typeof C>"u"||C===null)return""+C;var $=M(C);if($==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return $}function z(C){var $=N(C);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function q(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},rl}var ol,Id;function Wx(){if(Id)return ol;Id=1;var t=el();function e(){}function n(){}return n.resetWarningCache=e,ol=function(){function r(s,a,l,c,u,f){if(f!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},ol}if(process.env.NODE_ENV!=="production"){var Hx=Td(),Ux=!0;Xa.exports=zx()(Hx.isElement,Ux)}else Xa.exports=Wx()();var Gx=Xa.exports;const Le=Lx(Gx);function Dr(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Mr(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function kd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Dd(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Kx=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 Ao(t,e){var n=Zx(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Zx(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),o=Kx.get(r);o&&Object.defineProperty(t,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return t}var qx=[".DS_Store","Thumbs.db"];function Yx(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return zi(t)&&Xx(t.dataTransfer)?[2,tw(t.dataTransfer,t.type)]:Jx(t)?[2,Qx(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,ew(t)]:[2,[]]})})}function Xx(t){return zi(t)}function Jx(t){return zi(t)&&zi(t.target)}function zi(t){return typeof t=="object"&&t!==null}function Qx(t){return il(t.target.files).map(function(e){return Ao(e)})}function ew(t){return Dr(this,void 0,void 0,function(){var e;return Mr(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Ao(r)})]}})})}function tw(t,e){return Dr(this,void 0,void 0,function(){var n,r;return Mr(this,function(o){switch(o.label){case 0:return t.items?(n=il(t.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(nw))]):[3,2];case 1:return r=o.sent(),[2,Md(Rd(r))];case 2:return[2,Md(il(t.files).map(function(i){return Ao(i)}))]}})})}function Md(t){return t.filter(function(e){return qx.indexOf(e.name)===-1})}function il(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function nw(t){if(typeof t.webkitGetAsEntry!="function")return Fd(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Ld(e):Fd(t)}function Rd(t){return t.reduce(function(e,n){return Dd(Dd([],kd(e),!1),kd(Array.isArray(n)?Rd(n):[n]),!1)},[])}function Fd(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Ao(e);return Promise.resolve(n)}function rw(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return[2,t.isDirectory?Ld(t):ow(t)]})})}function Ld(t){var e=t.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;e.readEntries(function(a){return Dr(s,void 0,void 0,function(){var l,c,u;return Mr(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(rw)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function ow(t){return Dr(this,void 0,void 0,function(){return Mr(this,function(e){return[2,new Promise(function(n,r){t.file(function(o){var i=Ao(o,t.fullPath);n(i)},function(o){r(o)})})]})})}var iw=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=(t.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Nd(t){return lw(t)||aw(t)||Bd(t)||sw()}function sw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
104
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aw(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function lw(t){if(Array.isArray(t))return sl(t)}function Vd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function $d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vd(Object(n),!0).forEach(function(r){jd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _o(t,e){return fw(t)||uw(t,e)||Bd(t,e)||cw()}function cw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
105
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bd(t,e){if(t){if(typeof t=="string")return sl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(t,e)}}function sl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function uw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function fw(t){if(Array.isArray(t))return t}var dw="file-invalid-type",hw="file-too-large",pw="file-too-small",mw="too-many-files",gw=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:dw,message:"File type must be ".concat(n)}},zd=function(e){return{code:hw,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Wd=function(e){return{code:pw,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},yw={code:mw,message:"Too many files"};function Hd(t,e){var n=t.type==="application/x-moz-file"||iw(t,e);return[n,n?null:gw(e)]}function Ud(t,e,n){if(tr(t.size))if(tr(e)&&tr(n)){if(t.size>n)return[!1,zd(n)];if(t.size<e)return[!1,Wd(e)]}else{if(tr(e)&&t.size<e)return[!1,Wd(e)];if(tr(n)&&t.size>n)return[!1,zd(n)]}return[!0,null]}function tr(t){return t!=null}function vw(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Hd(l,n),u=_o(c,1),f=u[0],d=Ud(l,r,o),h=_o(d,1),p=h[0],m=a?a(l):null;return f&&p&&!m})}function Wi(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Hi(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Gd(t){t.preventDefault()}function bw(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function xw(t){return t.indexOf("Edge/")!==-1}function ww(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return bw(t)||xw(t)}function qt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!Wi(r)&&a&&a.apply(void 0,[r].concat(i)),Wi(r)})}}function Sw(){return"showOpenFilePicker"in window}function Tw(t){if(tr(t)){var e=Object.entries(t).filter(function(n){var r=_o(n,2),o=r[0],i=r[1],s=!0;return Kd(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(Zd))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=_o(r,2),i=o[0],s=o[1];return $d($d({},n),{},jd({},i,s))},{});return[{description:"Files",accept:e}]}return t}function Ew(t){if(tr(t))return Object.entries(t).reduce(function(e,n){var r=_o(n,2),o=r[0],i=r[1];return[].concat(Nd(e),[o],Nd(i))},[]).filter(function(e){return Kd(e)||Zd(e)}).join(",")}function Cw(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function Aw(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function Kd(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function Zd(t){return/^.*\.[\w]+$/.test(t)}var _w=["children"],Pw=["open"],Ow=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Iw=["refKey","onChange","onClick"];function kw(t){return Rw(t)||Mw(t)||qd(t)||Dw()}function Dw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
106
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mw(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Rw(t){if(Array.isArray(t))return ll(t)}function al(t,e){return Nw(t)||Lw(t,e)||qd(t,e)||Fw()}function Fw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
107
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qd(t,e){if(t){if(typeof t=="string")return ll(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ll(t,e)}}function ll(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Nw(t){if(Array.isArray(t))return t}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(n),!0).forEach(function(r){cl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function cl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ui(t,e){if(t==null)return{};var n=Vw(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Vw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var ul=w.forwardRef(function(t,e){var n=t.children,r=Ui(t,_w),o=Jd(r),i=o.open,s=Ui(o,Pw);return w.useImperativeHandle(e,function(){return{open:i}},[i]),w.createElement(w.Fragment,null,n(Ue(Ue({},s),{},{open:i})))});ul.displayName="Dropzone";var Xd={disabled:!1,getFilesFromEvent:Yx,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};ul.defaultProps=Xd,ul.propTypes={children:Le.func,accept:Le.objectOf(Le.arrayOf(Le.string)),multiple:Le.bool,preventDropOnDocument:Le.bool,noClick:Le.bool,noKeyboard:Le.bool,noDrag:Le.bool,noDragEventsBubbling:Le.bool,minSize:Le.number,maxSize:Le.number,maxFiles:Le.number,disabled:Le.bool,getFilesFromEvent:Le.func,onFileDialogCancel:Le.func,onFileDialogOpen:Le.func,useFsAccessApi:Le.bool,autoFocus:Le.bool,onDragEnter:Le.func,onDragLeave:Le.func,onDragOver:Le.func,onDrop:Le.func,onDropAccepted:Le.func,onDropRejected:Le.func,onError:Le.func,validator:Le.func};var fl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Jd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},Xd),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,g=e.preventDropOnDocument,S=e.noClick,x=e.noKeyboard,T=e.noDrag,P=e.noDragEventsBubbling,O=e.onError,k=e.validator,D=w.useMemo(function(){return Ew(n)},[n]),L=w.useMemo(function(){return Tw(n)},[n]),A=w.useMemo(function(){return typeof y=="function"?y:Qd},[y]),j=w.useMemo(function(){return typeof m=="function"?m:Qd},[m]),F=w.useRef(null),_=w.useRef(null),M=w.useReducer($w,fl),N=al(M,2),z=N[0],q=N[1],C=z.isFocused,$=z.isFileDialogActive,Y=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&Sw()),re=function(){!Y.current&&$&&setTimeout(function(){if(_.current){var oe=_.current.files;oe.length||(q({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,$,j,Y]);var ee=w.useRef([]),W=function(oe){F.current&&F.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Gd,!1),document.addEventListener("drop",W,!1)),function(){g&&(document.removeEventListener("dragover",Gd),document.removeEventListener("drop",W))}},[F,g]),w.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var I=w.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),V=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z),ee.current=[].concat(kw(ee.current),[Z.target]),Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(Wi(Z)&&!P)){var Fe=oe.length,Ke=Fe>0&&vw({files:oe,accept:D,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),ft=Fe>0&&!Ke;q({isDragAccept:Ke,isDragReject:ft,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return I(oe)})},[o,c,I,P,D,s,i,a,l,k]),H=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z);var oe=Hi(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,P]),K=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z);var oe=ee.current.filter(function(Ke){return F.current&&F.current.contains(Ke)}),Fe=oe.indexOf(Z.target);Fe!==-1&&oe.splice(Fe,1),ee.current=oe,!(oe.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Hi(Z)&&u&&u(Z))},[F,u,P]),X=w.useCallback(function(Z,oe){var Fe=[],Ke=[];Z.forEach(function(ft){var ln=Hd(ft,D),nt=al(ln,2),cn=nt[0],gi=nt[1],lo=Ud(ft,s,i),la=al(lo,2),Du=la[0],Mu=la[1],Ru=k?k(ft):null;if(cn&&Du&&!Ru)Fe.push(ft);else{var Fu=[gi,Mu];Ru&&(Fu=Fu.concat(Ru)),Ke.push({file:ft,errors:Fu.filter(function(dk){return dk})})}}),(!a&&Fe.length>1||a&&l>=1&&Fe.length>l)&&(Fe.forEach(function(ft){Ke.push({file:ft,errors:[yw]})}),Fe.splice(0)),q({acceptedFiles:Fe,fileRejections:Ke,type:"setFiles"}),d&&d(Fe,Ke,oe),Ke.length>0&&p&&p(Ke,oe),Fe.length>0&&h&&h(Fe,oe)},[q,a,D,s,i,l,d,h,p,k]),le=w.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z),ee.current=[],Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){Wi(Z)&&!P||X(oe,Z)}).catch(function(oe){return I(oe)}),q({type:"reset"})},[o,X,I,P]),B=w.useCallback(function(){if(Y.current){q({type:"openDialog"}),A();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){X(oe,null),q({type:"closeDialog"})}).catch(function(oe){Cw(oe)?(j(oe),q({type:"closeDialog"})):Aw(oe)?(Y.current=!1,_.current?(_.current.value=null,_.current.click()):I(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."))):I(oe)});return}_.current&&(q({type:"openDialog"}),A(),_.current.value=null,_.current.click())},[q,A,j,v,X,I,L,a]),ke=w.useCallback(function(Z){!F.current||!F.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),B())},[F,B]),He=w.useCallback(function(){q({type:"focus"})},[]),Xe=w.useCallback(function(){q({type:"blur"})},[]),se=w.useCallback(function(){S||(ww()?setTimeout(B,0):B())},[S,B]),Ae=function(oe){return r?null:oe},Se=function(oe){return x?null:Ae(oe)},Ce=function(oe){return T?null:Ae(oe)},me=function(oe){P&&oe.stopPropagation()},Pe=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.role,ft=Z.onKeyDown,ln=Z.onFocus,nt=Z.onBlur,cn=Z.onClick,gi=Z.onDragEnter,lo=Z.onDragOver,la=Z.onDragLeave,Du=Z.onDrop,Mu=Ui(Z,Ow);return Ue(Ue(cl({onKeyDown:Se(qt(ft,ke)),onFocus:Se(qt(ln,He)),onBlur:Se(qt(nt,Xe)),onClick:Ae(qt(cn,se)),onDragEnter:Ce(qt(gi,V)),onDragOver:Ce(qt(lo,H)),onDragLeave:Ce(qt(la,K)),onDrop:Ce(qt(Du,le)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},Fe,F),!r&&!x?{tabIndex:0}:{}),Mu)}},[F,ke,He,Xe,se,V,H,K,le,x,T,r]),tt=w.useCallback(function(Z){Z.stopPropagation()},[]),Tt=w.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.onChange,ft=Z.onClick,ln=Ui(Z,Iw),nt=cl({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:Ae(qt(Ke,le)),onClick:Ae(qt(ft,tt)),tabIndex:-1},Fe,_);return Ue(Ue({},nt),ln)}},[_,n,a,le,r]);return Ue(Ue({},z),{},{isFocused:C&&!r,getRootProps:Pe,getInputProps:Tt,rootRef:F,inputRef:_,open:Ae(B)})}function $w(t,e){switch(e.type){case"focus":return Ue(Ue({},t),{},{isFocused:!0});case"blur":return Ue(Ue({},t),{},{isFocused:!1});case"openDialog":return Ue(Ue({},fl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ue(Ue({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ue(Ue({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},fl);default:return t}}function Qd(){}function eh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=eh(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function jw(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=eh(t))&&(r&&(r+=" "),r+=e);return r}const th=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,nh=jw,Bw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return nh(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=th(u)||th(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,f,d]:c},[]);return nh(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Gi=w.forwardRef(function({as:e,...n},r){const o=e||"span";return E.jsx(o,{...n,ref:r})}),zw=Bw("inline-flex 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-50 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",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Ki=w.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return E.jsxs(Gi,{...l,ref:c,type:i,"data-theme":o,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:zt(zw({size:s,rounded:a,theme:r?"loading":u?"disabled":o}),e),children:[l.children,n]})}),Ww=t=>E.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>E.jsx("li",{className:"flex flex-1",children:E.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:zt("border-main-bg flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","hover:text-main cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),Hw={isImage:t=>t.type.includes("image")},Uw=t=>{const[e,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(Hw.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:vd(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:vd(t.file.size)})},[t.file]),e.type==="img"?E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[E.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),E.jsxs("div",{className:"flex flex-col",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Ki,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{})})]}):E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[E.jsx(A0,{size:48}),E.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Ki,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{className:"text-danger"})})]})},Gw=t=>E.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>E.jsx(Uw,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),Kw=t=>t.isDragActive?E.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?E.jsx(Gw,{onDeleteFile:t.onDeleteFile,files:t.files}):E.jsx(w.Fragment,{children:t.idle}),Zw=E.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[E.jsx(O0,{size:64}),E.jsxs("p",{children:["You can drag your files or"," ",E.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),qw=({idle:t=Zw,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=w.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Jd({onDrop:s});return E.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:[E.jsx("input",{...l(r),name:r.name,id:r.name}),E.jsx(Kw,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},Yw=["INPUT","SELECT"],rh=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{Yw.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},Xw=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return E.jsx("form",{...t,onSubmit:e})},Jw=({children:t,...e})=>{const n=w.useId(),[r,o]=w.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),E.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:E.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),E.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:E.jsx("span",{className:"font-medium text-foreground",children:t})})]})},Qw=t=>E.jsx(Gi,{...t,as:"div",className:zt("rounded-lg bg-card-background p-8 border-card-border border shadow",t.className)}),Po=t=>{const[e,n]=w.useState(t.open),r=w.useRef(null),o=w.useMemo(()=>[Aa(10),pf({fallbackAxisSideDirection:"end"}),hf(),mf({padding:5,element:r})],[t.arrow]),{refs:i,floatingStyles:s,context:a}=Ra({open:e,transform:!0,whileElementsMounted:Ca,middleware:o,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(n(p),(v=t.onChange)==null||v.call(t,p))}}),l=c0(a),c=Ma(a),u=Va(a),{getReferenceProps:f,getFloatingProps:d}=La([l,c,u]),h=mo();return E.jsxs(w.Fragment,{children:[E.jsx("button",{ref:i.setReference,...f(),children:t.trigger}),e&&E.jsx(Ff,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:a,modal:!1,children:E.jsxs("div",{className:"bg-floating-background isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:s,"aria-labelledby":h,...d(),children:[E.jsx(wf,{ref:r,context:a,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),E.jsx("header",{className:"mb-2",children:E.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})]})},eS=({children:t,as:e,title:n,...r})=>{const[o,i]=w.useState(!1),s=w.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Ra({open:o,onOpenChange:i,whileElementsMounted:Ca,transform:!0,middleware:[Aa(5),pf({fallbackAxisSideDirection:"start"}),hf(),mf({element:s,padding:5})]}),f=Jb(u,{move:!1}),d=h0(u),h=Ma(u),p=Va(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=La([f,d,h,p]);return E.jsxs(w.Fragment,{children:[E.jsx(a,{ref:l.setReference,...m(r),children:n}),E.jsx(kf,{children:o&&E.jsxs(Gi,{ref:l.setFloating,style:c,...y(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[E.jsx(wf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})},Zi=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),qi=w.createContext({}),Yi=w.createContext(null),dl=typeof document<"u",Xi=dl?w.useLayoutEffect:w.useEffect,oh=w.createContext({strict:!1}),Ji=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ih="data-"+Ji("framerAppearId"),tS={skipAnimations:!1,useManualTiming:!1};class sh{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function nS(t){let e=new sh,n=new sh,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Qi=["read","resolveKeyframes","update","preRender","render","postRender"],rS=40;function ah(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Qi.reduce((v,b)=>(v[b]=nS(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,rS),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&e&&(r=!1,t(h))},p=()=>{n=!0,r=!0,o.isProcessing||t(h)};return{schedule:Qi.reduce((v,b)=>{const g=s[b];return v[b]=(S,x=!1,T=!1)=>(n||p(),g.schedule(S,x,T)),v},{}),cancel:v=>{for(let b=0;b<Qi.length;b++)s[Qi[b]].cancel(v)},state:o,steps:s}}const{schedule:hl,cancel:gk}=ah(queueMicrotask,!1);function Rr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const lh=w.createContext({});let ch=!1;function oS(t,e,n,r,o){const{visualElement:i}=w.useContext(qi),s=w.useContext(oh),a=w.useContext(Yi),l=w.useContext(Zi).reducedMotion,c=w.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(lh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&sS(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const d=w.useRef(!!(n[ih]&&!window.HandoffComplete));return Xi(()=>{u&&(u.updateFeatures(),hl.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,ch||(ch=!0,queueMicrotask(iS))))}),u}function iS(){window.HandoffComplete=!0}function sS(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:uh(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Rr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function uh(t){if(t)return t.options.allowProjection!==!1?t.projection:uh(t.parent)}function aS(t,e,n){return w.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Rr(n)&&(n.current=r))},[e])}function Oo(t){return typeof t=="string"||Array.isArray(t)}function Io(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const pl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ml=["initial",...pl];function es(t){return Io(t.animate)||ml.some(e=>Oo(t[e]))}function fh(t){return!!(es(t)||t.variants)}function lS(t,e){if(es(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Oo(n)?n:void 0,animate:Oo(r)?r:void 0}}return t.inherit!==!1?e:{}}function cS(t){const{initial:e,animate:n}=lS(t,w.useContext(qi));return w.useMemo(()=>({initial:e,animate:n}),[dh(e),dh(n)])}function dh(t){return Array.isArray(t)?t.join(" "):t}const hh={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"]},Fr={};for(const t in hh)Fr[t]={isEnabled:e=>hh[t].some(n=>!!e[n])};function uS(t){for(const e in t)Fr[e]={...Fr[e],...t[e]}}const ko=w.createContext({}),fS=Symbol.for("motionComponentSymbol"),lt=t=>t;let Lr=lt,Wt=lt;process.env.NODE_ENV!=="production"&&(Lr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Wt=(t,e)=>{if(!t)throw new Error(e)});function dS({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&uS(t);function i(a,l){let c;const u={...w.useContext(Zi),...a,layoutId:hS(a)},{isStatic:f}=u,d=cS(a),h=r(a,f);if(!f&&dl){pS(u,t);const p=mS(u);c=p.MeasureLayout,d.visualElement=oS(o,h,u,e,p.ProjectionNode)}return E.jsxs(qi.Provider,{value:d,children:[c&&d.visualElement?E.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,aS(h,d.visualElement,l),h,f,d.visualElement)]})}const s=w.forwardRef(i);return s[fS]=o,s}function hS({layoutId:t}){const e=w.useContext(ko).id;return e&&t!==void 0?e+"-"+t:t}function pS(t,e){const n=w.useContext(oh).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Lr(!1,r):Wt(!1,r)}}function mS(t){const{drag:e,layout:n}=Fr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function gS(t){function e(r,o={}){return dS(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const yS=["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 gl(t){return typeof t!="string"||t.includes("-")?!1:!!(yS.indexOf(t)>-1||/[A-Z]/u.test(t))}const ts={};function vS(t){Object.assign(ts,t)}const Do=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dn=new Set(Do);function ph(t,{layout:e,layoutId:n}){return Dn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ts[t]||t==="opacity")}const ct=t=>!!(t&&t.getVelocity),bS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xS=Do.length;function wS(t,e,n){let r="";for(let o=0;o<xS;o++){const i=Do[o];if(t[i]!==void 0){const s=bS[i]||i;r+=`${s}(${t[i]}) `}}return r=r.trim(),n?r=n(t,e?"":r):e&&(r="none"),r}const mh=t=>e=>typeof e=="string"&&e.startsWith(t),gh=mh("--"),SS=mh("var(--"),yl=t=>SS(t)?TS.test(t.split("/*")[0].trim()):!1,TS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ES=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Mn=(t,e,n)=>n>e?e:n<t?t:n,Nr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mo={...Nr,transform:t=>Mn(0,1,t)},ns={...Nr,default:1},Ro=t=>Math.round(t*1e5)/1e5,vl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,CS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,AS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Fo(t){return typeof t=="string"}function _S(t){return t==null}const Lo=t=>({test:e=>Fo(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Rn=Lo("deg"),Yt=Lo("%"),ce=Lo("px"),PS=Lo("vh"),OS=Lo("vw"),yh={...Yt,parse:t=>Yt.parse(t)/100,transform:t=>Yt.transform(t*100)},vh={...Nr,transform:Math.round},bh={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Rn,rotateX:Rn,rotateY:Rn,rotateZ:Rn,scale:ns,scaleX:ns,scaleY:ns,scaleZ:ns,skew:Rn,skewX:Rn,skewY:Rn,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Mo,originX:yh,originY:yh,originZ:ce,zIndex:vh,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:Mo,strokeOpacity:Mo,numOctaves:vh};function bl(t,e,n){const{style:r,vars:o,transform:i,transformOrigin:s}=t;let a=!1,l=!1,c=!0;for(const u in e){const f=e[u];if(gh(u)){o[u]=f;continue}const d=bh[u],h=ES(f,d);if(Dn.has(u)){if(a=!0,i[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(e.transform||(a||n?r.transform=wS(t.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${f} ${d}`}}const xl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xh(t,e,n){for(const r in e)!ct(e[r])&&!ph(r,n)&&(t[r]=e[r])}function IS({transformTemplate:t},e){return w.useMemo(()=>{const n=xl();return bl(n,e,t),Object.assign({},n.vars,n.style)},[e])}function kS(t,e){const n=t.style||{},r={};return xh(r,n,t),Object.assign(r,IS(t,e)),r}function DS(t,e){const n={},r=kS(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const MS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function rs(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||MS.has(t)}let wh=t=>!rs(t);function RS(t){t&&(wh=e=>e.startsWith("on")?!rs(e):t(e))}try{RS(require("@emotion/is-prop-valid").default)}catch{}function FS(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(wh(o)||n===!0&&rs(o)||!e&&!rs(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Sh(t,e,n){return typeof t=="string"?t:ce.transform(e+n*t)}function LS(t,e,n){const r=Sh(e,t.x,t.width),o=Sh(n,t.y,t.height);return`${r} ${o}`}const NS={offset:"stroke-dashoffset",array:"stroke-dasharray"},VS={offset:"strokeDashoffset",array:"strokeDasharray"};function $S(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?NS:VS;t[i.offset]=ce.transform(-r);const s=ce.transform(e),a=ce.transform(n);t[i.array]=`${s} ${a}`}function wl(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(bl(t,c,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=LS(p,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&$S(d,s,a,l,!1)}const Th=()=>({...xl(),attrs:{}}),Sl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function jS(t,e,n,r){const o=w.useMemo(()=>{const i=Th();return wl(i,e,Sl(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};xh(i,t.style,t),o.style={...i,...o.style}}return o}function BS(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(gl(n)?jS:DS)(r,i,s,n),c=FS(r,typeof n=="string",t),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=w.useMemo(()=>ct(f)?f.get():f,[f]);return w.createElement(n,{...u,children:d})}}function Eh(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Ch=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 Ah(t,e,n,r){Eh(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Ch.has(o)?o:Ji(o),e.attrs[o])}function Tl(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ct(o[s])||e.style&&ct(e.style[s])||ph(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function _h(t,e,n){const r=Tl(t,e,n);for(const o in t)if(ct(t[o])||ct(e[o])){const i=Do.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function Ph(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function El(t,e,n,r){if(typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function nr(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const Cl=t=>Array.isArray(t),zS=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),WS=t=>Cl(t)?t[t.length-1]||0:t;function os(t){const e=ct(t)?t.get():t;return zS(e)?e.toValue():e}const Oh=new Set(["opacity","clipPath","filter","transform"]);function Ih(t){if(Dn.has(t))return"transform";if(Oh.has(t)||t==="backgroundColor")return Ji(t)}function is(t,e){t.indexOf(e)===-1&&t.push(e)}function ss(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function HS([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}function US({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:GS(o,i,s,a?!1:t,e),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const kh=t=>(e,n)=>{const r=w.useContext(qi),o=w.useContext(Yi),i=()=>US(t,e,r,o,n);return n?i():nr(i)};function Dh(t,e){const n=Ih(e);n&&is(t,n)}function Mh(t,e,n){const r=Array.isArray(e)?e:[e];for(let o=0;o<r.length;o++){const i=El(t,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function GS(t,e,n,r,o){var i;const s={},a=[],l=r&&((i=t.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(t,{});for(const y in c)s[y]=os(c[y]),l&&Dh(a,y);let{initial:u,animate:f}=t;const d=es(t),h=fh(t);e&&h&&!d&&t.inherit!==!1&&(u===void 0&&(u=e.initial),f===void 0&&(f=e.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!Io(m)&&Mh(t,m,(y,v)=>{for(const b in y){let g=y[b];if(Array.isArray(g)){const S=p?g.length-1:0;g=g[S]}g!==null&&(s[b]=g)}for(const b in v)s[b]=v[b]}),l&&(f&&u!==!1&&!Io(f)&&Mh(t,f,y=>{for(const v in y)Dh(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:_e,cancel:Xt,state:ut,steps:Al}=ah(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0),KS={useVisualState:kh({scrapeMotionValuesFromProps:_h,createRenderState:Th,onMount:(t,e,{renderState:n,latestValues:r})=>{_e.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_e.render(()=>{wl(n,r,Sl(e.tagName),t.transformTemplate),Ah(e,n)})}})},ZS={useVisualState:kh({applyWillChange:!0,scrapeMotionValuesFromProps:Tl,createRenderState:xl})};function qS(t,{forwardMotionProps:e=!1},n,r){return{...gl(t)?KS:ZS,preloadedFeatures:n,useRender:BS(e),createVisualElement:r,Component:t}}function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Rh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function as(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const YS=t=>e=>Rh(e)&&t(e,as(e));function mn(t,e,n,r){return pn(t,e,YS(n),r)}const XS=(t,e)=>n=>e(t(n)),gn=(...t)=>t.reduce(XS);function Fh(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Lh=Fh("dragHorizontal"),Nh=Fh("dragVertical");function Vh(t){let e=!1;if(t==="y")e=Nh();else if(t==="x")e=Lh();else{const n=Lh(),r=Nh();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function $h(){const t=Vh(!0);return t?(t(),!1):!0}class Fn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function jh(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||$h())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&_e.postRender(()=>l(i,s))};return mn(t.current,n,o,{passive:!t.getProps()[r]})}class JS extends Fn{mount(){this.unmount=gn(jh(this.node,!0),jh(this.node,!1))}unmount(){}}class QS extends Fn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gn(pn(this.node.current,"focus",()=>this.onFocus()),pn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Bh=(t,e)=>e?t===e?!0:Bh(t,e.parentElement):!1;function _l(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,as(n))}class eT extends Fn{constructor(){super(...arguments),this.removeStartListeners=lt,this.removeEndListeners=lt,this.removeAccessibleListeners=lt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=mn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Bh(this.node.current,a.target)?u:c;d&&_e.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=mn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||_l("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&_e.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=pn(this.node.current,"keyup",s),_l("down",(a,l)=>{this.startPress(a,l)})},n=pn(this.node.current,"keydown",e),r=()=>{this.isPressing&&_l("cancel",(i,s)=>this.cancelPress(i,s))},o=pn(this.node.current,"blur",r);this.removeAccessibleListeners=gn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_e.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!$h()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_e.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=mn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=pn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pl=new WeakMap,Ol=new WeakMap,tT=t=>{const e=Pl.get(t.target);e&&e(t)},nT=t=>{t.forEach(tT)};function rT({root:t,...e}){const n=t||document;Ol.has(n)||Ol.set(n,{});const r=Ol.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(nT,{root:t,...e})),r[o]}function oT(t,e,n){const r=rT(e);return Pl.set(t,n),r.observe(t),()=>{Pl.delete(t),r.unobserve(t)}}const iT={some:0,all:1};class sT extends Fn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:iT[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return oT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(aT(e,n))&&this.startObserver()}unmount(){}}function aT({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const lT={inView:{Feature:sT},tap:{Feature:eT},focus:{Feature:QS},hover:{Feature:JS}};function zh(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function ls(t,e,n){const r=t.getProps();return El(r,e,n!==void 0?n:r.custom,t)}const yn=t=>t*1e3,vn=t=>t/1e3,cT={type:"spring",stiffness:500,damping:25,restSpeed:10},uT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),fT={type:"keyframes",duration:.8},dT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},hT=(t,{keyframes:e})=>e.length>2?fT:Dn.has(t)?t.startsWith("scale")?uT(e[1]):cT:dT;function pT({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Il(t,e){return t[e]||t.default||t}const mT=t=>t!==null;function cs(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(mT),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let us;function gT(){us=void 0}const Ln={now:()=>(us===void 0&&Ln.set(ut.isProcessing||tS.useManualTiming?ut.timestamp:performance.now()),us),set:t=>{us=t,queueMicrotask(gT)}},Wh=t=>/^0[^.\s]+$/u.test(t);function yT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Wh(t):!0}const Hh=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),vT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bT(t){const e=vT.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const xT=4;function Uh(t,e,n=1){Wt(n<=xT,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=bT(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return Hh(s)?parseFloat(s):s}return yl(o)?Uh(o,e,n+1):o}const wT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Gh=t=>t===Nr||t===ce,Kh=(t,e)=>parseFloat(t.split(", ")[e]),Zh=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Kh(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Kh(i[1],t):0}},ST=new Set(["x","y","z"]),TT=Do.filter(t=>!ST.has(t));function ET(t){const e=[];return TT.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Vr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Zh(4,13),y:Zh(5,14)};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const qh=t=>e=>e.test(t),Yh=[Nr,ce,Yt,Rn,OS,PS,{test:t=>t==="auto",parse:t=>t}],Xh=t=>Yh.find(qh(t)),rr=new Set;let kl=!1,Dl=!1;function Jh(){if(Dl){const t=Array.from(rr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=ET(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Dl=!1,kl=!1,rr.forEach(t=>t.complete()),rr.clear()}function Qh(){rr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Dl=!0)})}function CT(){Qh(),Jh()}class Ml{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rr.add(this),kl||(kl=!0,_e.read(Qh),_e.resolveKeyframes(Jh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Rl=(t,e)=>n=>!!(Fo(n)&&AS.test(n)&&n.startsWith(t)||e&&!_S(n)&&Object.prototype.hasOwnProperty.call(n,e)),ep=(t,e,n)=>r=>{if(!Fo(r))return r;const[o,i,s,a]=r.match(vl);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},AT=t=>Mn(0,255,t),Fl={...Nr,transform:t=>Math.round(AT(t))},or={test:Rl("rgb","red"),parse:ep("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Fl.transform(t)+", "+Fl.transform(e)+", "+Fl.transform(n)+", "+Ro(Mo.transform(r))+")"};function _T(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ll={test:Rl("#"),parse:_T,transform:or.transform},$r={test:Rl("hsl","hue"),parse:ep("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Yt.transform(Ro(e))+", "+Yt.transform(Ro(n))+", "+Ro(Mo.transform(r))+")"},pt={test:t=>or.test(t)||Ll.test(t)||$r.test(t),parse:t=>or.test(t)?or.parse(t):$r.test(t)?$r.parse(t):Ll.parse(t),transform:t=>Fo(t)?t:t.hasOwnProperty("red")?or.transform(t):$r.transform(t)};function PT(t){var e,n;return isNaN(t)&&Fo(t)&&(((e=t.match(vl))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(CS))===null||n===void 0?void 0:n.length)||0)>0}const tp="number",np="color",OT="var",IT="var(",rp="${}",kT=/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 No(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace(kT,l=>(pt.test(l)?(r.color.push(i),o.push(np),n.push(pt.parse(l))):l.startsWith(IT)?(r.var.push(i),o.push(OT),n.push(l)):(r.number.push(i),o.push(tp),n.push(parseFloat(l))),++i,rp)).split(rp);return{values:n,split:a,indexes:r,types:o}}function op(t){return No(t).values}function ip(t){const{split:e,types:n}=No(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===tp?i+=Ro(o[s]):a===np?i+=pt.transform(o[s]):i+=o[s]}return i}}const DT=t=>typeof t=="number"?0:t;function MT(t){const e=op(t);return ip(t)(e.map(DT))}const Nn={test:PT,parse:op,createTransformer:ip,getAnimatableNone:MT},RT=new Set(["brightness","contrast","saturate","opacity"]);function FT(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(vl)||[];if(!r)return t;const o=n.replace(r,"");let i=RT.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const LT=/\b([a-z-]*)\(.*?\)/gu,Nl={...Nn,getAnimatableNone:t=>{const e=t.match(LT);return e?e.map(FT).join(" "):t}},NT={...bh,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Nl,WebkitFilter:Nl},Vl=t=>NT[t];function sp(t,e){let n=Vl(t);return n!==Nl&&(n=Nn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const VT=new Set(["auto","none","0"]);function $T(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!VT.has(i)&&No(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=sp(n,o)}class ap extends Ml{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),yl(c))){const u=Uh(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!wT.has(r)||e.length!==2)return;const[o,i]=e,s=Xh(o),a=Xh(i);if(s!==a)if(Gh(s)&&Gh(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)yT(e[o])&&r.push(o);r.length&&$T(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Vr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function lp(t){let e;return()=>(e===void 0&&(e=t()),e)}const cp=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Nn.test(t)||t==="0")&&!t.startsWith("url("));function jT(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function BT(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=cp(o,e),a=cp(i,e);return Lr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:jT(t)||n==="spring"&&r}class up{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&CT(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!BT(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(cs(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function fp(t,e){return e?t*(1e3/e):0}const zT=5;function dp(t,e,n){const r=Math.max(e-zT,0);return fp(n-t(r),e-r)}const $l=.001,WT=.01,hp=10,HT=.05,UT=1;function GT({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Lr(t<=yn(hp),"Spring duration must be 10 seconds or less");let s=1-e;s=Mn(HT,UT,s),t=Mn(WT,hp,vn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=jl(c,s),p=Math.exp(-f);return $l-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=jl(Math.pow(c,2),s);return(-o(c)+$l>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-$l+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=ZT(o,i,a);if(t=yn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const KT=12;function ZT(t,e,n){let r=n;for(let o=1;o<KT;o++)r=r-t(r)/e(r);return r}function jl(t,e){return t*Math.sqrt(1-e*e)}const qT=["duration","bounce"],YT=["stiffness","damping","mass"];function pp(t,e){return e.some(n=>t[n]!==void 0)}function XT(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!pp(t,YT)&&pp(t,qT)){const n=GT(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function mp({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=XT({...r,velocity:-vn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,y=vn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(p<1){const g=jl(y,p);b=S=>{const x=Math.exp(-p*y*S);return i-x*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)b=g=>i-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=S=>{const x=Math.exp(-p*y*S),T=Math.min(g*S,300);return i-x*((h+p*y*m)*Math.sinh(T)+g*m*Math.cosh(T))/g}}return{calculatedDuration:d&&u||null,next:g=>{const S=b(g);if(d)s.done=g>=u;else{let x=h;g!==0&&(p<1?x=dp(b,g,S):x=0);const T=Math.abs(x)<=n,P=Math.abs(i-S)<=e;s.done=T&&P}return s.value=s.done?i:S,s}}}function gp({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=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*e;const y=f+m,v=s===void 0?y:s(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),S=O=>{const k=b(O),D=g(O);d.done=Math.abs(k)<=c,d.value=d.done?v:D};let x,T;const P=O=>{h(d.value)&&(x=O,T=mp({keyframes:[d.value,p(d.value)],velocity:dp(g,O,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:O=>{let k=!1;return!T&&x===void 0&&(k=!0,S(O),P(O)),x!==void 0&&O>=x?T.next(O-x):(!k&&S(O),d)}}}const yp=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,JT=1e-7,QT=12;function eE(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=yp(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>JT&&++a<QT);return s}function Vo(t,e,n,r){if(t===e&&n===r)return lt;const o=i=>eE(i,0,1,t,n);return i=>i===0||i===1?i:yp(o(i),e,r)}const tE=Vo(.42,0,1,1),nE=Vo(0,0,.58,1),vp=Vo(.42,0,.58,1),rE=t=>Array.isArray(t)&&typeof t[0]!="number",bp=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xp=t=>e=>1-t(1-e),Bl=t=>1-Math.sin(Math.acos(t)),wp=xp(Bl),oE=bp(Bl),Sp=Vo(.33,1.53,.69,.99),zl=xp(Sp),iE=bp(zl),Tp={linear:lt,easeIn:tE,easeInOut:vp,easeOut:nE,circIn:Bl,circInOut:oE,circOut:wp,backIn:zl,backInOut:iE,backOut:Sp,anticipate:t=>(t*=2)<1?.5*zl(t):.5*(2-Math.pow(2,-10*(t-1)))},Ep=t=>{if(Array.isArray(t)){Wt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return Vo(e,n,r,o)}else if(typeof t=="string")return Wt(Tp[t]!==void 0,`Invalid easing type '${t}'`),Tp[t];return t},$o=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Be=(t,e,n)=>t+(e-t)*n;function Wl(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function sE({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=Wl(l,a,t+1/3),i=Wl(l,a,t),s=Wl(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function fs(t,e){return n=>n>0?e:t}const Hl=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},aE=[Ll,or,$r],lE=t=>aE.find(e=>e.test(t));function Cp(t){const e=lE(t);if(Lr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===$r&&(n=sE(n)),n}const Ap=(t,e)=>{const n=Cp(t),r=Cp(e);if(!n||!r)return fs(t,e);const o={...n};return i=>(o.red=Hl(n.red,r.red,i),o.green=Hl(n.green,r.green,i),o.blue=Hl(n.blue,r.blue,i),o.alpha=Be(n.alpha,r.alpha,i),or.transform(o))},Ul=new Set(["none","hidden"]);function cE(t,e){return Ul.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function uE(t,e){return n=>Be(t,e,n)}function Gl(t){return typeof t=="number"?uE:typeof t=="string"?yl(t)?fs:pt.test(t)?Ap:hE:Array.isArray(t)?_p:typeof t=="object"?pt.test(t)?Ap:fE:fs}function _p(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Gl(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function fE(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Gl(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function dE(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const hE=(t,e)=>{const n=Nn.createTransformer(e),r=No(t),o=No(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ul.has(t)&&!o.values.length||Ul.has(e)&&!r.values.length?cE(t,e):gn(_p(dE(r,o),o.values),n):(Lr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),fs(t,e))};function Pp(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Be(t,e,n):Gl(t)(t,e)}function pE(t,e,n){const r=[],o=n||Pp,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||lt:e;a=gn(l,a)}r.push(a)}return r}function Op(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Wt(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=pE(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=$o(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Mn(t[0],t[i-1],c)):l}function mE(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=$o(0,e,r);t.push(Be(n,1,o))}}function gE(t){const e=[0];return mE(e,t.length-1),e}function yE(t,e){return t.map(n=>n*e)}function vE(t,e){return t.map(()=>e||vp).splice(0,t.length-1)}function ds({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=rE(r)?r.map(Ep):Ep(r),i={done:!1,value:e[0]},s=yE(n&&n.length===e.length?n:gE(e),t),a=Op(s,e,{ease:Array.isArray(o)?o:vE(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Ip=2e4;function bE(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Ip;)e+=n,r=t.next(e);return e>=Ip?1/0:e}const xE=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_e.update(e,!0),stop:()=>Xt(e),now:()=>ut.isProcessing?ut.timestamp:Ln.now()}},wE={decay:gp,inertia:gp,tween:ds,keyframes:ds,spring:mp},SE=t=>t/100;class Kl extends up{constructor({KeyframeResolver:e=Ml,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=wE[n]||ds;let l,c;a!==ds&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Wt(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=gn(SE,Pp(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=bE(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),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,S=i;if(h){const O=Math.min(this.currentTime,u)/f;let k=Math.floor(O),D=O%1;!D&&O>=1&&(D=1),D===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(D=1-D,m&&(D-=m/f)):p==="mirror"&&(S=s)),g=Mn(0,1,D)*f}const x=b?{done:!1,value:l[0]}:S.next(g);a&&(x.value=a(x.value));let{done:T}=x;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&o!==void 0&&(x.value=cs(l,this.options,o)),y&&y(x.value),P&&this.finish(),x}get duration(){const{resolved:e}=this;return e?vn(e.calculatedDuration):0}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=xE,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const kp=t=>Array.isArray(t)&&typeof t[0]=="number";function Dp(t){return!!(!t||typeof t=="string"&&t in Zl||kp(t)||Array.isArray(t)&&t.every(Dp))}const jo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Zl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jo([0,.65,.55,1]),circOut:jo([.55,0,1,.45]),backIn:jo([.31,.01,.66,-.59]),backOut:jo([.33,1.53,.69,.99])};function TE(t){return Mp(t)||Zl.easeOut}function Mp(t){if(t)return kp(t)?jo(t):Array.isArray(t)?t.map(TE):Zl[t]}function EE(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Mp(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const CE=lp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hs=10,AE=2e4;function _E(t){return t.type==="spring"||t.name==="backgroundColor"||!Dp(t.ease)}function PE(t,e){const n=new Kl({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<AE;)r=n.sample(i),o.push(r.value),i+=hs;return{times:void 0,keyframes:o,duration:i-hs,ease:"linear"}}class Rp extends up{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new ap(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(_E(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=PE(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=EE(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Ln.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(cs(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return vn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return vn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return lt;const{animation:r}=n;r.timeline=e,r.onfinish=null}return lt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Kl({...d,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=yn(this.time);c.setWithVelocity(h.sample(p-hs).value,h.sample(p).value,hs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return CE()&&r&&Oh.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function OE(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return _e.update(r,!0),()=>Xt(r)}const IE=lp(()=>window.ScrollTimeline!==void 0);class kE{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(IE()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),OE(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ql=(t,e,n,r={},o,i,s)=>a=>{const l=Il(r,t)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-yn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:i?void 0:o};pT(l)||(f={...f,...hT(t,f)}),f.duration&&(f.duration=yn(f.duration)),f.repeatDelay&&(f.repeatDelay=yn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&e.get()!==void 0){const h=cs(f.keyframes,l);if(h!==void 0)return _e.update(()=>{f.onUpdate(h),f.onComplete()}),new kE([])}return!i&&Rp.supports(f)?new Rp(f):new Kl(f)};class Yl{constructor(){this.subscriptions=[]}add(e){return is(this.subscriptions,e),()=>ss(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fp=new Set;function Xl(t,e,n){t||Fp.has(e)||(console.warn(e),Fp.add(e))}const Lp=30,DE=t=>!isNaN(parseFloat(t)),Bo={current:void 0};class Np{constructor(e,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Ln.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Ln.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=DE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Xl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Yl);const r=this.events[e].add(n);return e==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Bo.current&&Bo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Lp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lp);return fp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jr(t,e){return new Np(t,e)}function ME(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jr(n))}function RE(t,e){const n=ls(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=WS(i[s]);ME(t,s,a)}}function Vp(t){return t.getProps()[ih]}class FE extends Np{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const n=Ih(e);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(ss(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function LE(t){return!!(ct(t)&&t.add)}function Jl(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");if(!r&&!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&(r=new FE("auto"),t.addValue("willChange",r)),LE(r))return r.add(e)}function NE({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function $p(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const c=[],u=o&&t.animationState&&t.animationState.getState()[o];for(const f in l){const d=t.getValue(f,(i=t.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||u&&NE(u,f))continue;const p={delay:n,elapsed:0,...Il(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Vp(t);if(v){const b=window.HandoffAppearAnimations(v,f,d,_e);b!==null&&(p.elapsed=b,m=!0)}}d.start(ql(f,d,h,t.shouldReduceMotion&&Dn.has(f)?{type:!1}:p,t,m,Jl(t,f)));const y=d.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{_e.update(()=>{a&&RE(t,a)})}),c}function Ql(t,e,n={}){var r;const o=ls(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all($p(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return VE(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function VE(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort($E).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(Ql(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function $E(t,e){return t.sortNodePosition(e)}function jE(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>Ql(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=Ql(t,e,n);else{const o=typeof e=="function"?ls(t,e,n.custom):e;r=Promise.all($p(t,o,n))}return r.then(()=>{_e.postRender(()=>{t.notify("AnimationComplete",e)})})}const BE=[...pl].reverse(),zE=pl.length;function WE(t){return e=>Promise.all(e.map(({animation:n,options:r})=>jE(t,n,r)))}function HE(t){let e=WE(t),n=jp(),r=!0;const o=l=>(c,u)=>{var f;const d=ls(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<zE;y++){const v=BE[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],S=Oo(g),x=v===l?b.isActive:null;x===!1&&(p=y);let T=g===u[v]&&g!==c[v]&&S;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...h},!b.isActive&&x===null||!g&&!b.prevProp||Io(g)||typeof g=="boolean")continue;let O=UE(b.prevProp,g)||v===l&&b.isActive&&!T&&S||y>p&&S,k=!1;const D=Array.isArray(g)?g:[g];let L=D.reduce(o(v),{});x===!1&&(L={});const{prevResolvedValues:A={}}=b,j={...A,...L},F=_=>{O=!0,d.has(_)&&(k=!0,d.delete(_)),b.needsAnimating[_]=!0;const M=t.getValue(_);M&&(M.liveStyle=!1)};for(const _ in j){const M=L[_],N=A[_];if(h.hasOwnProperty(_))continue;let z=!1;Cl(M)&&Cl(N)?z=!zh(M,N):z=M!==N,z?M!=null?F(_):d.add(_):M!==void 0&&d.has(_)?F(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&t.blockInitialAnimation&&(O=!1),O&&(!T||k)&&f.push(...D.map(_=>({animation:_,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=jp(),r=!0}}}function UE(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!zh(e,t):!1}function ir(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jp(){return{animate:ir(!0),whileInView:ir(),whileHover:ir(),whileTap:ir(),whileDrag:ir(),whileFocus:ir(),exit:ir()}}class GE extends Fn{constructor(e){super(e),e.animationState||(e.animationState=HE(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Io(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let KE=0;class ZE extends Fn{constructor(){super(...arguments),this.id=KE++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const qE={animation:{Feature:GE},exit:{Feature:ZE}},Bp=(t,e)=>Math.abs(t-e);function YE(t,e){const n=Bp(t.x,e.x),r=Bp(t.y,e.y);return Math.sqrt(n**2+r**2)}class zp{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=tc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=YE(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=ut;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=ec(d,this.transformPagePoint),_e.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=tc(f.type==="pointercancel"?this.lastMoveEventInfo:ec(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Rh(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=as(e),a=ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ut;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,tc(a,this.history)),this.removeListeners=gn(mn(this.contextWindow,"pointermove",this.handlePointerMove),mn(this.contextWindow,"pointerup",this.handlePointerUp),mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function ec(t,e){return e?{point:e(t.point)}:t}function Wp(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tc({point:t},e){return{point:t,delta:Wp(t,Hp(e)),offset:Wp(t,XE(e)),velocity:JE(e,.1)}}function XE(t){return t[0]}function Hp(t){return t[t.length-1]}function JE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=Hp(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>yn(e)));)n--;if(!r)return{x:0,y:0};const i=vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mt(t){return t.max-t.min}function nc(t,e=0,n=.01){return Math.abs(t-e)<=n}function Up(t,e,n,r=.5){t.origin=r,t.originPoint=Be(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(nc(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(nc(t.translate)||isNaN(t.translate))&&(t.translate=0)}function zo(t,e,n,r){Up(t.x,e.x,n.x,r?r.originX:void 0),Up(t.y,e.y,n.y,r?r.originY:void 0)}function Gp(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function QE(t,e,n){Gp(t.x,e.x,n.x),Gp(t.y,e.y,n.y)}function Kp(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function Wo(t,e,n){Kp(t.x,e.x,n.x),Kp(t.y,e.y,n.y)}function e1(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Be(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Be(n,t,r.max):Math.min(t,n)),t}function Zp(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function t1(t,{top:e,left:n,bottom:r,right:o}){return{x:Zp(t.x,n,o),y:Zp(t.y,e,r)}}function qp(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function n1(t,e){return{x:qp(t.x,e.x),y:qp(t.y,e.y)}}function r1(t,e){let n=.5;const r=Mt(t),o=Mt(e);return o>r?n=$o(e.min,e.max-r,t.min):r>o&&(n=$o(t.min,t.max-o,e.min)),Mn(0,1,n)}function o1(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const rc=.35;function i1(t=rc){return t===!1?t=0:t===!0&&(t=rc),{x:Yp(t,"left","right"),y:Yp(t,"top","bottom")}}function Yp(t,e,n){return{min:Xp(t,e),max:Xp(t,n)}}function Xp(t,e){return typeof t=="number"?t:t[e]||0}const Jp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:Jp(),y:Jp()}),Qp=()=>({min:0,max:0}),qe=()=>({x:Qp(),y:Qp()});function Nt(t){return[t("x"),t("y")]}function em({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function s1({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function a1(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function oc(t){return t===void 0||t===1}function ic({scale:t,scaleX:e,scaleY:n}){return!oc(t)||!oc(e)||!oc(n)}function sr(t){return ic(t)||tm(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function tm(t){return nm(t.x)||nm(t.y)}function nm(t){return t&&t!=="0%"}function ps(t,e,n){const r=t-n,o=e*r;return n+o}function rm(t,e,n,r,o){return o!==void 0&&(t=ps(t,o,r)),ps(t,n,r)+e}function sc(t,e=0,n=1,r,o){t.min=rm(t.min,e,n,r,o),t.max=rm(t.max,e,n,r,o)}function om(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}function l1(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zr(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,om(t,s)),r&&sr(i.latestValues)&&zr(t,i.latestValues))}e.x=im(e.x),e.y=im(e.y)}function im(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Vn(t,e){t.min=t.min+e,t.max=t.max+e}function sm(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=Be(t.min,t.max,i);sc(t,e[n],e[r],s,e.scale)}const c1=["x","scaleX","originX"],u1=["y","scaleY","originY"];function zr(t,e){sm(t.x,e,c1),sm(t.y,e,u1)}function am(t,e){return em(a1(t.getBoundingClientRect(),e))}function f1(t,e,n){const r=am(t,n),{scroll:o}=e;return o&&(Vn(r.x,o.offset.x),Vn(r.y,o.offset.y)),r}const lm=({current:t})=>t?t.ownerDocument.defaultView:null,d1=new WeakMap;class h1{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(as(u,"page").point)},i=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Vh(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),Nt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Yt.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[v];S&&(b=Mt(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&_e.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=Jl(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(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=p1(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=()=>Nt(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 zp(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:lm(this.visualElement)})}stop(e,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!ms(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=e1(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Rr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=t1(o.layoutBox,n):this.constraints=!1,this.elastic=i1(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Nt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=o1(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rr(e))return!1;const r=e.current;Wt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=f1(r,o.root,this.visualElement.getTransformPagePoint());let s=n1(o.layout.layoutBox,i);if(n){const a=n(s1(s));this.hasMutatedConstraints=!!a,a&&(s=em(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Nt(u=>{if(!ms(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(ql(e,r,0,n,this.visualElement,!1,Jl(this.visualElement,e)))}stopAnimation(){Nt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Nt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Nt(n=>{const{drag:r}=this.getProps();if(!ms(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-Be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Nt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=r1({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Nt(s=>{if(!ms(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Be(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;d1.set(this.visualElement,this);const e=this.visualElement.current,n=mn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_e.read(r);const s=pn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Nt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=rc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function ms(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function p1(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class m1 extends Fn{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new h1(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const cm=t=>(e,n)=>{t&&_e.postRender(()=>t(e,n))};class g1 extends Fn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new zp(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lm(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cm(e),onStart:cm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&_e.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=mn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function y1(){const t=w.useContext(Yi);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=w.useId();return w.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const gs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function um(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ho={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const n=um(t,e.target.x),r=um(t,e.target.y);return`${n}% ${r}%`}},v1={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=Nn.parse(t);if(o.length>5)return r;const i=Nn.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=Be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class b1 extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;vS(x1),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),gs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||_e.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),hl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function fm(t){const[e,n]=y1(),r=w.useContext(ko);return E.jsx(b1,{...t,layoutGroup:r,switchLayoutGroup:w.useContext(lh),isPresent:e,safeToRemove:n})}const x1={borderRadius:{...Ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ho,borderTopRightRadius:Ho,borderBottomLeftRadius:Ho,borderBottomRightRadius:Ho,boxShadow:v1},dm=["TopLeft","TopRight","BottomLeft","BottomRight"],w1=dm.length,hm=t=>typeof t=="string"?parseFloat(t):t,pm=t=>typeof t=="number"||ce.test(t);function S1(t,e,n,r,o,i){o?(t.opacity=Be(0,n.opacity!==void 0?n.opacity:1,T1(r)),t.opacityExit=Be(e.opacity!==void 0?e.opacity:1,0,E1(r))):i&&(t.opacity=Be(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<w1;s++){const a=`border${dm[s]}Radius`;let l=mm(e,a),c=mm(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||pm(l)===pm(c)?(t[a]=Math.max(Be(hm(l),hm(c),r),0),(Yt.test(c)||Yt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Be(e.rotate||0,n.rotate||0,r))}function mm(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const T1=gm(0,.5,wp),E1=gm(.5,.95,lt);function gm(t,e,n){return r=>r<t?0:r>e?1:n($o(t,e,r))}function ym(t,e){t.min=e.min,t.max=e.max}function Vt(t,e){ym(t.x,e.x),ym(t.y,e.y)}function vm(t,e,n,r,o){return t-=e,t=ps(t,1/n,r),o!==void 0&&(t=ps(t,1/o,r)),t}function C1(t,e=0,n=1,r=.5,o,i=t,s=t){if(Yt.test(e)&&(e=parseFloat(e),e=Be(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Be(i.min,i.max,r);t===i&&(a-=e),t.min=vm(t.min,e,n,a,o),t.max=vm(t.max,e,n,a,o)}function bm(t,e,[n,r,o],i,s){C1(t,e[n],e[r],e[o],e.scale,i,s)}const A1=["x","scaleX","originX"],_1=["y","scaleY","originY"];function xm(t,e,n,r){bm(t.x,e,A1,n?n.x:void 0,r?r.x:void 0),bm(t.y,e,_1,n?n.y:void 0,r?r.y:void 0)}function wm(t){return t.translate===0&&t.scale===1}function Sm(t){return wm(t.x)&&wm(t.y)}function P1(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Tm(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Em(t){return Mt(t.x)/Mt(t.y)}class O1{constructor(){this.members=[]}add(e){is(this.members,e),e.scheduleRender()}remove(e){if(ss(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Cm(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const I1=(t,e)=>t.depth-e.depth;class k1{constructor(){this.children=[],this.isDirty=!1}add(e){is(this.children,e),this.isDirty=!0}remove(e){ss(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(I1),this.isDirty=!1,this.children.forEach(e)}}function D1(t,e){const n=Ln.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(Xt(r),t(i-e))};return _e.read(r,!0),()=>Xt(r)}function M1(t){window.MotionDebug&&window.MotionDebug.record(t)}function R1(t){return t instanceof SVGElement&&t.tagName!=="svg"}function F1(t,e,n){const r=ct(t)?t:jr(t);return r.start(ql("",r,e,n)),r.animation}const ac=["","X","Y","Z"],L1={visibility:"hidden"},Am=1e3;let N1=0;const ar={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function lc(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function _m(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Vp(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?_m(t.parent):!1:!1}function Pm({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=N1++,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,ar.totalNodes=ar.resolvedTargetDeltas=ar.recalculatedProjection=0,this.nodes.forEach(j1),this.nodes.forEach(U1),this.nodes.forEach(G1),this.nodes.forEach(B1),M1(ar)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new k1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Yl),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=R1(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=D1(d,250),gs.hasAnimatedSinceResize&&(gs.hasAnimatedSinceResize=!1,this.nodes.forEach(Im))})}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()||X1,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Tm(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const S={...Il(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Im(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xt(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(K1),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&_m(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Om);return}this.isUpdating||this.nodes.forEach(W1),this.isUpdating=!1,this.nodes.forEach(H1),this.nodes.forEach(V1),this.nodes.forEach($1),this.clearAllSnapshots();const a=Ln.now();ut.delta=Mn(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,Al.update.process(ut),Al.preRender.process(ut),Al.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z1),this.sharedNodes.forEach(Z1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Sm(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||sr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),J1(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return qe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Vn(a.x,l.offset.x),Vn(a.y,l.offset.y)),a}removeElementScroll(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Vt(a,s);const{scroll:d}=this.root;d&&(Vn(a.x,-d.offset.x),Vn(a.y,-d.offset.y))}Vn(a.x,u.offset.x),Vn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=qe();Vt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sr(u.latestValues)&&zr(l,u.latestValues)}return sr(this.latestValues)&&zr(l,this.latestValues),l}removeTransform(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sr(c.latestValues))continue;ic(c.latestValues)&&c.updateSnapshot();const u=qe(),f=c.measurePageBox();Vt(u,f),xm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sr(this.latestValues)&&xm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=ut.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),Wo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),QE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),om(this.target,this.targetDelta)):Vt(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=qe(),this.relativeTargetOrigin=qe(),Wo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ar.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ic(this.parent.latestValues)||tm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.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;Vt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;l1(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=qe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Br(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Br(),this.projectionDeltaWithTransform=Br());const m=this.projectionTransform;zo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=Cm(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ar.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=qe(),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(Y1));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const x=S/1e3;km(f.x,s.x,x),km(f.y,s.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),q1(this.relativeTarget,this.relativeTargetOrigin,d,x),g&&P1(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=qe()),Vt(g,this.relativeTarget)),m&&(this.animationValues=u,S1(u,c,this.latestValues,x,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{gs.hasAnimatedSinceResize=!0,this.currentAnimation=F1(0,Am,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Am),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Lm(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||qe();const f=Mt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=Mt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Vt(a,l),zr(a,u),zo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new O1),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&lc("z",s,c,this.animationValues);for(let u=0;u<ac.length;u++)lc(`rotate${ac[u]}`,s,c,this.animationValues),lc(`skew${ac[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return L1;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=os(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const 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=os(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Cm(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 ts){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=ts[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?os(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Om),this.root.sharedNodes.clear()}}}function V1(t){t.updateLayout()}function $1(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(d);d.min=r[f].min,d.max=d.min+h}):Lm(i,n.layoutBox,r)&&Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Br();zo(a,r,n.layoutBox);const l=Br();s?zo(l,t.applyTransform(o,!0),n.measuredBox):zo(l,r,n.layoutBox);const c=!Sm(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=qe();Wo(p,n.layoutBox,d.layoutBox);const m=qe();Wo(m,r,h.layoutBox),Tm(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function j1(t){ar.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function B1(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function z1(t){t.clearSnapshot()}function Om(t){t.clearMeasurements()}function W1(t){t.isLayoutDirty=!1}function H1(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Im(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function U1(t){t.resolveTargetDelta()}function G1(t){t.calcProjection()}function K1(t){t.resetSkewAndRotation()}function Z1(t){t.removeLeadSnapshot()}function km(t,e,n){t.translate=Be(e.translate,0,n),t.scale=Be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Dm(t,e,n,r){t.min=Be(e.min,n.min,r),t.max=Be(e.max,n.max,r)}function q1(t,e,n,r){Dm(t.x,e.x,n.x,r),Dm(t.y,e.y,n.y,r)}function Y1(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const X1={duration:.45,ease:[.4,0,.1,1]},Mm=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Rm=Mm("applewebkit/")&&!Mm("chrome/")?Math.round:lt;function Fm(t){t.min=Rm(t.min),t.max=Rm(t.max)}function J1(t){Fm(t.x),Fm(t.y)}function Lm(t,e,n){return t==="position"||t==="preserve-aspect"&&!nc(Em(e),Em(n),.2)}const Q1=Pm({attachResizeListener:(t,e)=>pn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},Nm=Pm({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cc.current){const t=new Q1({});t.mount(window),t.setOptions({layoutScroll:!0}),cc.current=t}return cc.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),eC={pan:{Feature:g1},drag:{Feature:m1,ProjectionNode:Nm,MeasureLayout:fm}},uc={current:null},Vm={current:!1};function tC(){if(Vm.current=!0,!!dl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uc.current=t.matches;t.addListener(e),e()}else uc.current=!1}function nC(t,e,n){for(const r in e){const o=e[r],i=n[r];if(ct(o))t.addValue(r,o),process.env.NODE_ENV==="development"&&Xl(o.version==="11.3.0",`Attempting to mix Framer Motion versions ${o.version} with 11.3.0 may not work as expected.`);else if(ct(i))t.addValue(r,jr(o,{owner:t}));else if(i!==o)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=t.getStaticValue(r);t.addValue(r,jr(s!==void 0?s:o,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const $m=new WeakMap,rC=[...Yh,pt,Nn],oC=t=>rC.find(qh(t)),jm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],iC=ml.length;class sC{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ml,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_e.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=es(n),this.isVariantNode=fh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ct(h)&&h.set(l[d],!1)}}mount(e){this.current=e,$m.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Vm.current||tC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uc.current,process.env.NODE_ENV!=="production"&&Xl(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(){$m.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=Dn.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Fr){const n=Fr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<jm.length;r++){const o=jm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=nC(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<iC;r++){const o=ml[r],i=this.props[o];(Oo(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=jr(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(Hh(o)||Wh(o))?o=parseFloat(o):!oC(o)&&Nn.test(n)&&(o=sp(e,n)),this.setBaseTarget(e,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=El(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ct(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Yl),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Bm extends sC{constructor(){super(...arguments),this.KeyframeResolver=ap}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function aC(t){return window.getComputedStyle(t)}class lC extends Bm{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(e,n){if(Dn.has(n)){const r=Vl(n);return r&&r.default||0}else{const r=aC(e),o=(gh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return am(e,n)}build(e,n,r){bl(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Tl(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){Eh(e,n,r,o)}}class cC extends Bm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Dn.has(n)){const r=Vl(n);return r&&r.default||0}return n=Ch.has(n)?n:Ji(n),e.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(e,n,r){return _h(e,n,r)}build(e,n,r){wl(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,o){Ah(e,n,r,o)}mount(e){this.isSVGTag=Sl(e.tagName),super.mount(e)}}const uC=(t,e)=>gl(t)?new cC(e):new lC(e,{allowProjection:t!==w.Fragment}),fC={...qE,...lT,...eC,...{layout:{ProjectionNode:Nm,MeasureLayout:fm}}},fc=gS((t,e)=>qS(t,e,fC,uC));function zm(){const t=w.useRef(!1);return Xi(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Wm(){const t=zm(),[e,n]=w.useState(0),r=w.useCallback(()=>{t.current&&n(e+1)},[e]);return[w.useCallback(()=>_e.postRender(r),[r]),e]}class dC extends R.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function hC({children:t,isPresent:e}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=w.useContext(Zi);return w.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
105
+ */var El,gh;function KS(){if(gh)return El;gh=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return El=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)e.call(a,f)&&(l[f]=a[f]);if(t){c=t(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},El}var Cl,yh;function Al(){if(yh)return Cl;yh=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Cl=t,Cl}var _l,vh;function bh(){return vh||(vh=1,_l=Function.call.bind(Object.prototype.hasOwnProperty)),_l}var Pl,xh;function ZS(){if(xh)return Pl;xh=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Al(),n={},r=bh();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";t("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Pl=o,Pl}var Ol,wh;function qS(){if(wh)return Ol;wh=1;var t=mh(),e=KS(),n=Al(),r=bh(),o=ZS(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ol=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(C){var $=C&&(c&&C[c]||C[u]);if(typeof $=="function")return $}var d="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:g,element:S(),elementType:w(),instanceOf:T,node:D(),objectOf:O,oneOf:P,oneOfType:k,shape:A,exact:j};function p(C,$){return C===$?C!==0||1/C===1/$:C!==C&&$!==$}function m(C,$){this.message=C,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function y(C){if(process.env.NODE_ENV!=="production")var $={},Y=0;function re(W,I,V,H,K,X,le){if(H=H||d,X=X||V,le!==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 ke=H+":"+V;!$[ke]&&Y<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+H+"`. 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."),$[ke]=!0,Y++)}}return I[V]==null?W?I[V]===null?new m("The "+K+" `"+X+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new m("The "+K+" `"+X+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:C(I,V,H,K,X)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function v(C){function $(Y,re,ee,W,I,V){var H=Y[re],K=M(H);if(K!==C){var X=N(H);return new m("Invalid "+W+" `"+I+"` of type "+("`"+X+"` supplied to `"+ee+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return y($)}function b(){return y(s)}function g(C){function $(Y,re,ee,W,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var V=Y[re];if(!Array.isArray(V)){var H=M(V);return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected an array."))}for(var K=0;K<V.length;K++){var X=C(V,K,ee,W,I+"["+K+"]",n);if(X instanceof Error)return X}return null}return y($)}function S(){function C($,Y,re,ee,W){var I=$[Y];if(!a(I)){var V=M(I);return new m("Invalid "+ee+" `"+W+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(C)}function w(){function C($,Y,re,ee,W){var I=$[Y];if(!t.isValidElementType(I)){var V=M(I);return new m("Invalid "+ee+" `"+W+"` of type "+("`"+V+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(C)}function T(C){function $(Y,re,ee,W,I){if(!(Y[re]instanceof C)){var V=C.name||d,H=q(Y[re]);return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected ")+("instance of `"+V+"`."))}return null}return y($)}function P(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function $(Y,re,ee,W,I){for(var V=Y[re],H=0;H<C.length;H++)if(p(V,C[H]))return null;var K=JSON.stringify(C,function(le,B){var ke=N(B);return ke==="symbol"?String(B):B});return new m("Invalid "+W+" `"+I+"` of value `"+String(V)+"` "+("supplied to `"+ee+"`, expected one of "+K+"."))}return y($)}function O(C){function $(Y,re,ee,W,I){if(typeof C!="function")return new m("Property `"+I+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected an object."));for(var K in V)if(r(V,K)){var X=C(V,K,ee,W,I+"."+K,n);if(X instanceof Error)return X}return null}return y($)}function k(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var $=0;$<C.length;$++){var Y=C[$];if(typeof Y!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Y)+" at index "+$+"."),s}function re(ee,W,I,V,H){for(var K=[],X=0;X<C.length;X++){var le=C[X],B=le(ee,W,I,V,H,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&K.push(B.data.expectedType)}var ke=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new m("Invalid "+V+" `"+H+"` supplied to "+("`"+I+"`"+ke+"."))}return y(re)}function D(){function C($,Y,re,ee,W){return R($[Y])?null:new m("Invalid "+ee+" `"+W+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(C)}function L(C,$,Y,re,ee){return new m((C||"React class")+": "+$+" type `"+Y+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function A(C){function $(Y,re,ee,W,I){var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));for(var K in C){var X=C[K];if(typeof X!="function")return L(ee,W,I,K,N(X));var le=X(V,K,ee,W,I+"."+K,n);if(le)return le}return null}return y($)}function j(C){function $(Y,re,ee,W,I){var V=Y[re],H=M(V);if(H!=="object")return new m("Invalid "+W+" `"+I+"` of type `"+H+"` "+("supplied to `"+ee+"`, expected `object`."));var K=e({},Y[re],C);for(var X in K){var le=C[X];if(r(C,X)&&typeof le!="function")return L(ee,W,I,X,N(le));if(!le)return new m("Invalid "+W+" `"+I+"` key `"+X+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Y[re],null," ")+`
106
+ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=le(V,X,ee,W,I+"."+X,n);if(B)return B}return null}return y($)}function R(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(R);if(C===null||a(C))return!0;var $=f(C);if($){var Y=$.call(C),re;if($!==C.entries){for(;!(re=Y.next()).done;)if(!R(re.value))return!1}else for(;!(re=Y.next()).done;){var ee=re.value;if(ee&&!R(ee[1]))return!1}}else return!1;return!0;default:return!1}}function _(C,$){return C==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function M(C){var $=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":_($,C)?"symbol":$}function N(C){if(typeof C>"u"||C===null)return""+C;var $=M(C);if($==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return $}function z(C){var $=N(C);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function q(C){return!C.constructor||!C.constructor.name?d:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ol}var Il,Sh;function YS(){if(Sh)return Il;Sh=1;var t=Al();function e(){}function n(){}return n.resetWarningCache=e,Il=function(){function r(s,a,l,c,u,f){if(f!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},Il}if(process.env.NODE_ENV!=="production"){var XS=mh(),JS=!0;Tl.exports=qS()(XS.isElement,JS)}else Tl.exports=YS()();var QS=Tl.exports;const Le=D0(QS);function jr(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Br(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Th(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Eh(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var eT=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 Do(t,e){var n=tT(t);if(typeof n.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof e=="string"?e:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return n}function tT(t){var e=t.name,n=e&&e.lastIndexOf(".")!==-1;if(n&&!t.type){var r=e.split(".").pop().toLowerCase(),o=eT.get(r);o&&Object.defineProperty(t,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return t}var nT=[".DS_Store","Thumbs.db"];function rT(t){return jr(this,void 0,void 0,function(){return Br(this,function(e){return Qi(t)&&oT(t.dataTransfer)?[2,lT(t.dataTransfer,t.type)]:iT(t)?[2,sT(t)]:Array.isArray(t)&&t.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,aT(t)]:[2,[]]})})}function oT(t){return Qi(t)}function iT(t){return Qi(t)&&Qi(t.target)}function Qi(t){return typeof t=="object"&&t!==null}function sT(t){return kl(t.target.files).map(function(e){return Do(e)})}function aT(t){return jr(this,void 0,void 0,function(){var e;return Br(this,function(n){switch(n.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return e=n.sent(),[2,e.map(function(r){return Do(r)})]}})})}function lT(t,e){return jr(this,void 0,void 0,function(){var n,r;return Br(this,function(o){switch(o.label){case 0:return t.items?(n=kl(t.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,n]:[4,Promise.all(n.map(cT))]):[3,2];case 1:return r=o.sent(),[2,Ch(Ah(r))];case 2:return[2,Ch(kl(t.files).map(function(i){return Do(i)}))]}})})}function Ch(t){return t.filter(function(e){return nT.indexOf(e.name)===-1})}function kl(t){if(t===null)return[];for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(r)}return e}function cT(t){if(typeof t.webkitGetAsEntry!="function")return _h(t);var e=t.webkitGetAsEntry();return e&&e.isDirectory?Ph(e):_h(t)}function Ah(t){return t.reduce(function(e,n){return Eh(Eh([],Th(e),!1),Th(Array.isArray(n)?Ah(n):[n]),!1)},[])}function _h(t){var e=t.getAsFile();if(!e)return Promise.reject("".concat(t," is not a File"));var n=Do(e);return Promise.resolve(n)}function uT(t){return jr(this,void 0,void 0,function(){return Br(this,function(e){return[2,t.isDirectory?Ph(t):fT(t)]})})}function Ph(t){var e=t.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;e.readEntries(function(a){return jr(s,void 0,void 0,function(){var l,c,u;return Br(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(uT)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function fT(t){return jr(this,void 0,void 0,function(){return Br(this,function(e){return[2,new Promise(function(n,r){t.file(function(o){var i=Do(o,t.fullPath);n(i)},function(o){r(o)})})]})})}var dT=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",o=(t.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function Oh(t){return mT(t)||pT(t)||Mh(t)||hT()}function hT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
107
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function mT(t){if(Array.isArray(t))return Dl(t)}function Ih(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function kh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ih(Object(n),!0).forEach(function(r){Dh(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ih(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Dh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mo(t,e){return vT(t)||yT(t,e)||Mh(t,e)||gT()}function gT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
108
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mh(t,e){if(t){if(typeof t=="string")return Dl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dl(t,e)}}function Dl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function yT(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function vT(t){if(Array.isArray(t))return t}var bT="file-invalid-type",xT="file-too-large",wT="file-too-small",ST="too-many-files",TT=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:bT,message:"File type must be ".concat(n)}},Fh=function(e){return{code:xT,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Rh=function(e){return{code:wT,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},ET={code:ST,message:"Too many files"};function Lh(t,e){var n=t.type==="application/x-moz-file"||dT(t,e);return[n,n?null:TT(e)]}function Nh(t,e,n){if(or(t.size))if(or(e)&&or(n)){if(t.size>n)return[!1,Fh(n)];if(t.size<e)return[!1,Rh(e)]}else{if(or(e)&&t.size<e)return[!1,Rh(e)];if(or(n)&&t.size>n)return[!1,Fh(n)]}return[!0,null]}function or(t){return t!=null}function CT(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Lh(l,n),u=Mo(c,1),f=u[0],d=Nh(l,r,o),h=Mo(d,1),p=h[0],m=a?a(l):null;return f&&p&&!m})}function es(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function ts(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Vh(t){t.preventDefault()}function AT(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function _T(t){return t.indexOf("Edge/")!==-1}function PT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return AT(t)||_T(t)}function Xt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!es(r)&&a&&a.apply(void 0,[r].concat(i)),es(r)})}}function OT(){return"showOpenFilePicker"in window}function IT(t){if(or(t)){var e=Object.entries(t).filter(function(n){var r=Mo(n,2),o=r[0],i=r[1],s=!0;return $h(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(jh))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Mo(r,2),i=o[0],s=o[1];return kh(kh({},n),{},Dh({},i,s))},{});return[{description:"Files",accept:e}]}return t}function kT(t){if(or(t))return Object.entries(t).reduce(function(e,n){var r=Mo(n,2),o=r[0],i=r[1];return[].concat(Oh(e),[o],Oh(i))},[]).filter(function(e){return $h(e)||jh(e)}).join(",")}function DT(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function MT(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function $h(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function jh(t){return/^.*\.[\w]+$/.test(t)}var FT=["children"],RT=["open"],LT=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],NT=["refKey","onChange","onClick"];function VT(t){return BT(t)||jT(t)||Bh(t)||$T()}function $T(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
109
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function BT(t){if(Array.isArray(t))return Fl(t)}function Ml(t,e){return HT(t)||WT(t,e)||Bh(t,e)||zT()}function zT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
110
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bh(t,e){if(t){if(typeof t=="string")return Fl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fl(t,e)}}function Fl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function WT(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function HT(t){if(Array.isArray(t))return t}function zh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zh(Object(n),!0).forEach(function(r){Rl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zh(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Rl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ns(t,e){if(t==null)return{};var n=UT(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function UT(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var Ll=x.forwardRef(function(t,e){var n=t.children,r=ns(t,FT),o=Hh(r),i=o.open,s=ns(o,RT);return x.useImperativeHandle(e,function(){return{open:i}},[i]),x.createElement(x.Fragment,null,n(Ue(Ue({},s),{},{open:i})))});Ll.displayName="Dropzone";var Wh={disabled:!1,getFilesFromEvent:rT,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};Ll.defaultProps=Wh,Ll.propTypes={children:Le.func,accept:Le.objectOf(Le.arrayOf(Le.string)),multiple:Le.bool,preventDropOnDocument:Le.bool,noClick:Le.bool,noKeyboard:Le.bool,noDrag:Le.bool,noDragEventsBubbling:Le.bool,minSize:Le.number,maxSize:Le.number,maxFiles:Le.number,disabled:Le.bool,getFilesFromEvent:Le.func,onFileDialogCancel:Le.func,onFileDialogOpen:Le.func,useFsAccessApi:Le.bool,autoFocus:Le.bool,onDragEnter:Le.func,onDragLeave:Le.func,onDragOver:Le.func,onDrop:Le.func,onDropAccepted:Le.func,onDropRejected:Le.func,onError:Le.func,validator:Le.func};var Nl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Hh(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},Wh),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,g=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,T=e.noDrag,P=e.noDragEventsBubbling,O=e.onError,k=e.validator,D=x.useMemo(function(){return kT(n)},[n]),L=x.useMemo(function(){return IT(n)},[n]),A=x.useMemo(function(){return typeof y=="function"?y:Uh},[y]),j=x.useMemo(function(){return typeof m=="function"?m:Uh},[m]),R=x.useRef(null),_=x.useRef(null),M=x.useReducer(GT,Nl),N=Ml(M,2),z=N[0],q=N[1],C=z.isFocused,$=z.isFileDialogActive,Y=x.useRef(typeof window<"u"&&window.isSecureContext&&v&&OT()),re=function(){!Y.current&&$&&setTimeout(function(){if(_.current){var oe=_.current.files;oe.length||(q({type:"closeDialog"}),j())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,$,j,Y]);var ee=x.useRef([]),W=function(oe){R.current&&R.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",Vh,!1),document.addEventListener("drop",W,!1)),function(){g&&(document.removeEventListener("dragover",Vh),document.removeEventListener("drop",W))}},[R,g]),x.useEffect(function(){return!r&&b&&R.current&&R.current.focus(),function(){}},[R,b,r]);var I=x.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),V=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z),ee.current=[].concat(VT(ee.current),[Z.target]),ts(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(es(Z)&&!P)){var Re=oe.length,Ke=Re>0&&CT({files:oe,accept:D,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),ft=Re>0&&!Ke;q({isDragAccept:Ke,isDragReject:ft,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return I(oe)})},[o,c,I,P,D,s,i,a,l,k]),H=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z);var oe=ts(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,P]),K=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z);var oe=ee.current.filter(function(Ke){return R.current&&R.current.contains(Ke)}),Re=oe.indexOf(Z.target);Re!==-1&&oe.splice(Re,1),ee.current=oe,!(oe.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ts(Z)&&u&&u(Z))},[R,u,P]),X=x.useCallback(function(Z,oe){var Re=[],Ke=[];Z.forEach(function(ft){var ln=Lh(ft,D),nt=Ml(ln,2),cn=nt[0],bi=nt[1],lo=Nh(ft,s,i),ca=Ml(lo,2),Fu=ca[0],Ru=ca[1],Lu=k?k(ft):null;if(cn&&Fu&&!Lu)Re.push(ft);else{var Nu=[bi,Ru];Lu&&(Nu=Nu.concat(Lu)),Ke.push({file:ft,errors:Nu.filter(function(gk){return gk})})}}),(!a&&Re.length>1||a&&l>=1&&Re.length>l)&&(Re.forEach(function(ft){Ke.push({file:ft,errors:[ET]})}),Re.splice(0)),q({acceptedFiles:Re,fileRejections:Ke,type:"setFiles"}),d&&d(Re,Ke,oe),Ke.length>0&&p&&p(Ke,oe),Re.length>0&&h&&h(Re,oe)},[q,a,D,s,i,l,d,h,p,k]),le=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),me(Z),ee.current=[],ts(Z)&&Promise.resolve(o(Z)).then(function(oe){es(Z)&&!P||X(oe,Z)}).catch(function(oe){return I(oe)}),q({type:"reset"})},[o,X,I,P]),B=x.useCallback(function(){if(Y.current){q({type:"openDialog"}),A();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){X(oe,null),q({type:"closeDialog"})}).catch(function(oe){DT(oe)?(j(oe),q({type:"closeDialog"})):MT(oe)?(Y.current=!1,_.current?(_.current.value=null,_.current.click()):I(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."))):I(oe)});return}_.current&&(q({type:"openDialog"}),A(),_.current.value=null,_.current.click())},[q,A,j,v,X,I,L,a]),ke=x.useCallback(function(Z){!R.current||!R.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),B())},[R,B]),He=x.useCallback(function(){q({type:"focus"})},[]),Xe=x.useCallback(function(){q({type:"blur"})},[]),se=x.useCallback(function(){S||(PT()?setTimeout(B,0):B())},[S,B]),Ae=function(oe){return r?null:oe},Se=function(oe){return w?null:Ae(oe)},Ce=function(oe){return T?null:Ae(oe)},me=function(oe){P&&oe.stopPropagation()},Pe=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Re=oe===void 0?"ref":oe,Ke=Z.role,ft=Z.onKeyDown,ln=Z.onFocus,nt=Z.onBlur,cn=Z.onClick,bi=Z.onDragEnter,lo=Z.onDragOver,ca=Z.onDragLeave,Fu=Z.onDrop,Ru=ns(Z,LT);return Ue(Ue(Rl({onKeyDown:Se(Xt(ft,ke)),onFocus:Se(Xt(ln,He)),onBlur:Se(Xt(nt,Xe)),onClick:Ae(Xt(cn,se)),onDragEnter:Ce(Xt(bi,V)),onDragOver:Ce(Xt(lo,H)),onDragLeave:Ce(Xt(ca,K)),onDrop:Ce(Xt(Fu,le)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},Re,R),!r&&!w?{tabIndex:0}:{}),Ru)}},[R,ke,He,Xe,se,V,H,K,le,w,T,r]),tt=x.useCallback(function(Z){Z.stopPropagation()},[]),Tt=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Re=oe===void 0?"ref":oe,Ke=Z.onChange,ft=Z.onClick,ln=ns(Z,NT),nt=Rl({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:Ae(Xt(Ke,le)),onClick:Ae(Xt(ft,tt)),tabIndex:-1},Re,_);return Ue(Ue({},nt),ln)}},[_,n,a,le,r]);return Ue(Ue({},z),{},{isFocused:C&&!r,getRootProps:Pe,getInputProps:Tt,rootRef:R,inputRef:_,open:Ae(B)})}function GT(t,e){switch(e.type){case"focus":return Ue(Ue({},t),{},{isFocused:!0});case"blur":return Ue(Ue({},t),{},{isFocused:!1});case"openDialog":return Ue(Ue({},Nl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ue(Ue({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ue(Ue({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},Nl);default:return t}}function Uh(){}function Gh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Gh(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function KT(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Gh(t))&&(r&&(r+=" "),r+=e);return r}const Kh=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,Zh=KT,qh=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Zh(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=Kh(u)||Kh(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,f,d]:c},[]);return Zh(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Fo=x.forwardRef(function({as:e,...n},r){const o=e||"span";return E.jsx(o,{...n,ref:r})}),ZT=qh("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"}}),rs=x.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return E.jsxs(Fo,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:Nt(ZT({size:s,rounded:a,theme:o}),e),children:[l.children,n]})}),qT=t=>E.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>E.jsx("li",{className:"flex flex-1",children:E.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:Nt("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),YT={isImage:t=>t.type.includes("image")},XT=t=>{const[e,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if(YT.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:fh(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:fh(t.file.size)})},[t.file]),e.type==="img"?E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[E.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),E.jsxs("div",{className:"flex flex-col",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(rs,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{})})]}):E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[E.jsx(_0,{size:48}),E.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(rs,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{className:"text-danger"})})]})},JT=t=>E.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>E.jsx(XT,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),QT=t=>t.isDragActive?E.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?E.jsx(JT,{onDeleteFile:t.onDeleteFile,files:t.files}):E.jsx(x.Fragment,{children:t.idle}),eE=E.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[E.jsx(I0,{size:64}),E.jsxs("p",{children:["You can drag your files or"," ",E.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),tE=({idle:t=eE,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=x.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Hh({onDrop:s});return E.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:[E.jsx("input",{...l(r),name:r.name,id:r.name}),E.jsx(QT,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},nE=["INPUT","SELECT"],Yh=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{nE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},rE=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return E.jsx("form",{...t,onSubmit:e})},oE=({children:t,...e})=>{const n=x.useId(),[r,o]=x.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),E.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:E.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),E.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:E.jsx("span",{className:"font-medium text-foreground",children:t})})]})},iE=qh("inline-flex rounded-pill bg-opacity-90 gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium",{variants:{size:{default:"h-8 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},theme:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-subtle text-secondary-hover",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),sE=x.forwardRef(function({className:e,icon:n,loading:r,theme:o,size:i,...s},a){return E.jsxs(Fo,{...s,ref:a,"data-theme":o,as:s.as??"button",className:Nt(iE({size:i,theme:r?"loading":o!=null&&o.disabled?"disabled":o}),e),children:[s.children,n]})}),aE=t=>E.jsx(Fo,{...t,as:"div",className:Nt("rounded-lg bg-card-background p-8 border-card-border border shadow",t.className)}),Ro=t=>{const[e,n]=x.useState(t.open),r=x.useRef(null),o=x.useMemo(()=>[_a(10),gf({fallbackAxisSideDirection:"end"}),mf(),yf({padding:5,element:r})],[t.arrow]),{refs:i,floatingStyles:s,context:a}=Ra({open:e,transform:!0,whileElementsMounted:Aa,middleware:o,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(n(p),(v=t.onChange)==null||v.call(t,p))}}),l=u0(a),c=Fa(a),u=$a(a),{getReferenceProps:f,getFloatingProps:d}=Na([l,c,u]),h=mo();return E.jsxs(x.Fragment,{children:[E.jsx("button",{ref:i.setReference,...f(),children:t.trigger}),e&&E.jsx(Nf,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:a,modal:!1,children:E.jsxs("div",{className:"bg-floating-background isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:s,"aria-labelledby":h,...d(),children:[E.jsx(Tf,{ref:r,context:a,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),E.jsx("header",{className:"mb-2",children:E.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})]})},lE=({children:t,as:e,title:n,...r})=>{const[o,i]=x.useState(!1),s=x.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Ra({open:o,onOpenChange:i,whileElementsMounted:Aa,transform:!0,middleware:[_a(5),gf({fallbackAxisSideDirection:"start"}),mf(),yf({element:s,padding:5})]}),f=Qb(u,{move:!1}),d=p0(u),h=Fa(u),p=$a(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Na([f,d,h,p]);return E.jsxs(x.Fragment,{children:[E.jsx(a,{ref:l.setReference,...m(r),children:n}),E.jsx(Mf,{children:o&&E.jsxs(Fo,{ref:l.setFloating,style:c,...y(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[E.jsx(Tf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})},os=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),is=x.createContext({}),ss=x.createContext(null),Vl=typeof document<"u",as=Vl?x.useLayoutEffect:x.useEffect,Xh=x.createContext({strict:!1}),ls=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Jh="data-"+ls("framerAppearId"),cE={skipAnimations:!1,useManualTiming:!1};class Qh{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function uE(t){let e=new Qh,n=new Qh,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const cs=["read","resolveKeyframes","update","preRender","render","postRender"],fE=40;function ep(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=cs.reduce((v,b)=>(v[b]=uE(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=s,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,fE),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&e&&(r=!1,t(h))},p=()=>{n=!0,r=!0,o.isProcessing||t(h)};return{schedule:cs.reduce((v,b)=>{const g=s[b];return v[b]=(S,w=!1,T=!1)=>(n||p(),g.schedule(S,w,T)),v},{}),cancel:v=>{for(let b=0;b<cs.length;b++)s[cs[b]].cancel(v)},state:o,steps:s}}const{schedule:$l,cancel:Sk}=ep(queueMicrotask,!1);function zr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const tp=x.createContext({});let np=!1;function dE(t,e,n,r,o){const{visualElement:i}=x.useContext(is),s=x.useContext(Xh),a=x.useContext(ss),l=x.useContext(os).reducedMotion,c=x.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=x.useContext(tp);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&pE(c.current,n,o,f),x.useInsertionEffect(()=>{u&&u.update(n,a)});const d=x.useRef(!!(n[Jh]&&!window.HandoffComplete));return as(()=>{u&&(u.updateFeatures(),$l.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,np||(np=!0,queueMicrotask(hE))))}),u}function hE(){window.HandoffComplete=!0}function pE(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:rp(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&zr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function rp(t){if(t)return t.options.allowProjection!==!1?t.projection:rp(t.parent)}function mE(t,e,n){return x.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):zr(n)&&(n.current=r))},[e])}function Lo(t){return typeof t=="string"||Array.isArray(t)}function No(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const jl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bl=["initial",...jl];function us(t){return No(t.animate)||Bl.some(e=>Lo(t[e]))}function op(t){return!!(us(t)||t.variants)}function gE(t,e){if(us(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Lo(n)?n:void 0,animate:Lo(r)?r:void 0}}return t.inherit!==!1?e:{}}function yE(t){const{initial:e,animate:n}=gE(t,x.useContext(is));return x.useMemo(()=>({initial:e,animate:n}),[ip(e),ip(n)])}function ip(t){return Array.isArray(t)?t.join(" "):t}const sp={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"]},Wr={};for(const t in sp)Wr[t]={isEnabled:e=>sp[t].some(n=>!!e[n])};function vE(t){for(const e in t)Wr[e]={...Wr[e],...t[e]}}const Vo=x.createContext({}),bE=Symbol.for("motionComponentSymbol"),lt=t=>t;let Hr=lt,Wt=lt;process.env.NODE_ENV!=="production"&&(Hr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Wt=(t,e)=>{if(!t)throw new Error(e)});function xE({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&vE(t);function i(a,l){let c;const u={...x.useContext(os),...a,layoutId:wE(a)},{isStatic:f}=u,d=yE(a),h=r(a,f);if(!f&&Vl){SE(u,t);const p=TE(u);c=p.MeasureLayout,d.visualElement=dE(o,h,u,e,p.ProjectionNode)}return E.jsxs(is.Provider,{value:d,children:[c&&d.visualElement?E.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,mE(h,d.visualElement,l),h,f,d.visualElement)]})}const s=x.forwardRef(i);return s[bE]=o,s}function wE({layoutId:t}){const e=x.useContext(Vo).id;return e&&t!==void 0?e+"-"+t:t}function SE(t,e){const n=x.useContext(Xh).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Hr(!1,r):Wt(!1,r)}}function TE(t){const{drag:e,layout:n}=Wr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function EE(t){function e(r,o={}){return xE(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const CE=["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 zl(t){return typeof t!="string"||t.includes("-")?!1:!!(CE.indexOf(t)>-1||/[A-Z]/u.test(t))}const fs={};function AE(t){Object.assign(fs,t)}const $o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rn=new Set($o);function ap(t,{layout:e,layoutId:n}){return Rn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!fs[t]||t==="opacity")}const ct=t=>!!(t&&t.getVelocity),_E={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PE=$o.length;function OE(t,e,n){let r="";for(let o=0;o<PE;o++){const i=$o[o];if(t[i]!==void 0){const s=_E[i]||i;r+=`${s}(${t[i]}) `}}return r=r.trim(),n?r=n(t,e?"":r):e&&(r="none"),r}const lp=t=>e=>typeof e=="string"&&e.startsWith(t),cp=lp("--"),IE=lp("var(--"),Wl=t=>IE(t)?kE.test(t.split("/*")[0].trim()):!1,kE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,DE=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ln=(t,e,n)=>n>e?e:n<t?t:n,Ur={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},jo={...Ur,transform:t=>Ln(0,1,t)},ds={...Ur,default:1},Bo=t=>Math.round(t*1e5)/1e5,Hl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ME=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,FE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function zo(t){return typeof t=="string"}function RE(t){return t==null}const Wo=t=>({test:e=>zo(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Nn=Wo("deg"),Jt=Wo("%"),ce=Wo("px"),LE=Wo("vh"),NE=Wo("vw"),up={...Jt,parse:t=>Jt.parse(t)/100,transform:t=>Jt.transform(t*100)},fp={...Ur,transform:Math.round},dp={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Nn,rotateX:Nn,rotateY:Nn,rotateZ:Nn,scale:ds,scaleX:ds,scaleY:ds,scaleZ:ds,skew:Nn,skewX:Nn,skewY:Nn,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:jo,originX:up,originY:up,originZ:ce,zIndex:fp,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:jo,strokeOpacity:jo,numOctaves:fp};function Ul(t,e,n){const{style:r,vars:o,transform:i,transformOrigin:s}=t;let a=!1,l=!1,c=!0;for(const u in e){const f=e[u];if(cp(u)){o[u]=f;continue}const d=dp[u],h=DE(f,d);if(Rn.has(u)){if(a=!0,i[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=h):r[u]=h}if(e.transform||(a||n?r.transform=OE(t.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=s;r.transformOrigin=`${u} ${f} ${d}`}}const Gl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hp(t,e,n){for(const r in e)!ct(e[r])&&!ap(r,n)&&(t[r]=e[r])}function VE({transformTemplate:t},e){return x.useMemo(()=>{const n=Gl();return Ul(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $E(t,e){const n=t.style||{},r={};return hp(r,n,t),Object.assign(r,VE(t,e)),r}function jE(t,e){const n={},r=$E(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const BE=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 hs(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||BE.has(t)}let pp=t=>!hs(t);function zE(t){t&&(pp=e=>e.startsWith("on")?!hs(e):t(e))}try{zE(require("@emotion/is-prop-valid").default)}catch{}function WE(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(pp(o)||n===!0&&hs(o)||!e&&!hs(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function mp(t,e,n){return typeof t=="string"?t:ce.transform(e+n*t)}function HE(t,e,n){const r=mp(e,t.x,t.width),o=mp(n,t.y,t.height);return`${r} ${o}`}const UE={offset:"stroke-dashoffset",array:"stroke-dasharray"},GE={offset:"strokeDashoffset",array:"strokeDasharray"};function KE(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?UE:GE;t[i.offset]=ce.transform(-r);const s=ce.transform(e),a=ce.transform(n);t[i.array]=`${s} ${a}`}function Kl(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Ul(t,c,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=HE(p,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&KE(d,s,a,l,!1)}const gp=()=>({...Gl(),attrs:{}}),Zl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ZE(t,e,n,r){const o=x.useMemo(()=>{const i=gp();return Kl(i,e,Zl(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};hp(i,t.style,t),o.style={...i,...o.style}}return o}function qE(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(zl(n)?ZE:jE)(r,i,s,n),c=WE(r,typeof n=="string",t),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=x.useMemo(()=>ct(f)?f.get():f,[f]);return x.createElement(n,{...u,children:d})}}function yp(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const vp=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 bp(t,e,n,r){yp(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(vp.has(o)?o:ls(o),e.attrs[o])}function ql(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ct(o[s])||e.style&&ct(e.style[s])||ap(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function xp(t,e,n){const r=ql(t,e,n);for(const o in t)if(ct(t[o])||ct(e[o])){const i=$o.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function wp(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Yl(t,e,n,r){if(typeof e=="function"){const[o,i]=wp(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=wp(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function ir(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Xl=t=>Array.isArray(t),YE=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),XE=t=>Xl(t)?t[t.length-1]||0:t;function ps(t){const e=ct(t)?t.get():t;return YE(e)?e.toValue():e}const Sp=new Set(["opacity","clipPath","filter","transform"]);function Tp(t){if(Rn.has(t))return"transform";if(Sp.has(t)||t==="backgroundColor")return ls(t)}function ms(t,e){t.indexOf(e)===-1&&t.push(e)}function gs(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function JE([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}function QE({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:e1(o,i,s,a?!1:t,e),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Ep=t=>(e,n)=>{const r=x.useContext(is),o=x.useContext(ss),i=()=>QE(t,e,r,o,n);return n?i():ir(i)};function Cp(t,e){const n=Tp(e);n&&ms(t,n)}function Ap(t,e,n){const r=Array.isArray(e)?e:[e];for(let o=0;o<r.length;o++){const i=Yl(t,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function e1(t,e,n,r,o){var i;const s={},a=[],l=r&&((i=t.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(t,{});for(const y in c)s[y]=ps(c[y]),l&&Cp(a,y);let{initial:u,animate:f}=t;const d=us(t),h=op(t);e&&h&&!d&&t.inherit!==!1&&(u===void 0&&(u=e.initial),f===void 0&&(f=e.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!No(m)&&Ap(t,m,(y,v)=>{for(const b in y){let g=y[b];if(Array.isArray(g)){const S=p?g.length-1:0;g=g[S]}g!==null&&(s[b]=g)}for(const b in v)s[b]=v[b]}),l&&(f&&u!==!1&&!No(f)&&Ap(t,f,y=>{for(const v in y)Cp(a,v)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:_e,cancel:Qt,state:ut,steps:Jl}=ep(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0),t1={useVisualState:Ep({scrapeMotionValuesFromProps:xp,createRenderState:gp,onMount:(t,e,{renderState:n,latestValues:r})=>{_e.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_e.render(()=>{Kl(n,r,Zl(e.tagName),t.transformTemplate),bp(e,n)})}})},n1={useVisualState:Ep({applyWillChange:!0,scrapeMotionValuesFromProps:ql,createRenderState:Gl})};function r1(t,{forwardMotionProps:e=!1},n,r){return{...zl(t)?t1:n1,preloadedFeatures:n,useRender:qE(e),createVisualElement:r,Component:t}}function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const _p=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ys(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const o1=t=>e=>_p(e)&&t(e,ys(e));function mn(t,e,n,r){return pn(t,e,o1(n),r)}const i1=(t,e)=>n=>e(t(n)),gn=(...t)=>t.reduce(i1);function Pp(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Op=Pp("dragHorizontal"),Ip=Pp("dragVertical");function kp(t){let e=!1;if(t==="y")e=Ip();else if(t==="x")e=Op();else{const n=Op(),r=Ip();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Dp(){const t=kp(!0);return t?(t(),!1):!0}class Vn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Mp(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Dp())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&_e.postRender(()=>l(i,s))};return mn(t.current,n,o,{passive:!t.getProps()[r]})}class s1 extends Vn{mount(){this.unmount=gn(Mp(this.node,!0),Mp(this.node,!1))}unmount(){}}class a1 extends Vn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gn(pn(this.node.current,"focus",()=>this.onFocus()),pn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Fp=(t,e)=>e?t===e?!0:Fp(t,e.parentElement):!1;function Ql(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ys(n))}class l1 extends Vn{constructor(){super(...arguments),this.removeStartListeners=lt,this.removeEndListeners=lt,this.removeAccessibleListeners=lt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=mn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Fp(this.node.current,a.target)?u:c;d&&_e.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=mn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ql("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&_e.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=pn(this.node.current,"keyup",s),Ql("down",(a,l)=>{this.startPress(a,l)})},n=pn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Ql("cancel",(i,s)=>this.cancelPress(i,s))},o=pn(this.node.current,"blur",r);this.removeAccessibleListeners=gn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_e.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Dp()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_e.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=mn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=pn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ec=new WeakMap,tc=new WeakMap,c1=t=>{const e=ec.get(t.target);e&&e(t)},u1=t=>{t.forEach(c1)};function f1({root:t,...e}){const n=t||document;tc.has(n)||tc.set(n,{});const r=tc.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(u1,{root:t,...e})),r[o]}function d1(t,e,n){const r=f1(e);return ec.set(t,n),r.observe(t),()=>{ec.delete(t),r.unobserve(t)}}const h1={some:0,all:1};class p1 extends Vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:h1[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return d1(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(m1(e,n))&&this.startObserver()}unmount(){}}function m1({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const g1={inView:{Feature:p1},tap:{Feature:l1},focus:{Feature:a1},hover:{Feature:s1}};function Rp(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function vs(t,e,n){const r=t.getProps();return Yl(r,e,n!==void 0?n:r.custom,t)}const yn=t=>t*1e3,vn=t=>t/1e3,y1={type:"spring",stiffness:500,damping:25,restSpeed:10},v1=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),b1={type:"keyframes",duration:.8},x1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},w1=(t,{keyframes:e})=>e.length>2?b1:Rn.has(t)?t.startsWith("scale")?v1(e[1]):y1:x1;function S1({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function nc(t,e){return t[e]||t.default||t}const T1=t=>t!==null;function bs(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(T1),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let xs;function E1(){xs=void 0}const $n={now:()=>(xs===void 0&&$n.set(ut.isProcessing||cE.useManualTiming?ut.timestamp:performance.now()),xs),set:t=>{xs=t,queueMicrotask(E1)}},Lp=t=>/^0[^.\s]+$/u.test(t);function C1(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Lp(t):!0}const Np=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),A1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _1(t){const e=A1.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const P1=4;function Vp(t,e,n=1){Wt(n<=P1,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=_1(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return Np(s)?parseFloat(s):s}return Wl(o)?Vp(o,e,n+1):o}const O1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),$p=t=>t===Ur||t===ce,jp=(t,e)=>parseFloat(t.split(", ")[e]),Bp=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return jp(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?jp(i[1],t):0}},I1=new Set(["x","y","z"]),k1=$o.filter(t=>!I1.has(t));function D1(t){const e=[];return k1.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Gr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Bp(4,13),y:Bp(5,14)};Gr.translateX=Gr.x,Gr.translateY=Gr.y;const zp=t=>e=>e.test(t),Wp=[Ur,ce,Jt,Nn,NE,LE,{test:t=>t==="auto",parse:t=>t}],Hp=t=>Wp.find(zp(t)),sr=new Set;let rc=!1,oc=!1;function Up(){if(oc){const t=Array.from(sr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=D1(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}oc=!1,rc=!1,sr.forEach(t=>t.complete()),sr.clear()}function Gp(){sr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(oc=!0)})}function M1(){Gp(),Up()}class ic{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(sr.add(this),rc||(rc=!0,_e.read(Gp),_e.resolveKeyframes(Up))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),sr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,sr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sc=(t,e)=>n=>!!(zo(n)&&FE.test(n)&&n.startsWith(t)||e&&!RE(n)&&Object.prototype.hasOwnProperty.call(n,e)),Kp=(t,e,n)=>r=>{if(!zo(r))return r;const[o,i,s,a]=r.match(Hl);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},F1=t=>Ln(0,255,t),ac={...Ur,transform:t=>Math.round(F1(t))},ar={test:sc("rgb","red"),parse:Kp("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ac.transform(t)+", "+ac.transform(e)+", "+ac.transform(n)+", "+Bo(jo.transform(r))+")"};function R1(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const lc={test:sc("#"),parse:R1,transform:ar.transform},Kr={test:sc("hsl","hue"),parse:Kp("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Jt.transform(Bo(e))+", "+Jt.transform(Bo(n))+", "+Bo(jo.transform(r))+")"},mt={test:t=>ar.test(t)||lc.test(t)||Kr.test(t),parse:t=>ar.test(t)?ar.parse(t):Kr.test(t)?Kr.parse(t):lc.parse(t),transform:t=>zo(t)?t:t.hasOwnProperty("red")?ar.transform(t):Kr.transform(t)};function L1(t){var e,n;return isNaN(t)&&zo(t)&&(((e=t.match(Hl))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(ME))===null||n===void 0?void 0:n.length)||0)>0}const Zp="number",qp="color",N1="var",V1="var(",Yp="${}",$1=/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 Ho(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace($1,l=>(mt.test(l)?(r.color.push(i),o.push(qp),n.push(mt.parse(l))):l.startsWith(V1)?(r.var.push(i),o.push(N1),n.push(l)):(r.number.push(i),o.push(Zp),n.push(parseFloat(l))),++i,Yp)).split(Yp);return{values:n,split:a,indexes:r,types:o}}function Xp(t){return Ho(t).values}function Jp(t){const{split:e,types:n}=Ho(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===Zp?i+=Bo(o[s]):a===qp?i+=mt.transform(o[s]):i+=o[s]}return i}}const j1=t=>typeof t=="number"?0:t;function B1(t){const e=Xp(t);return Jp(t)(e.map(j1))}const jn={test:L1,parse:Xp,createTransformer:Jp,getAnimatableNone:B1},z1=new Set(["brightness","contrast","saturate","opacity"]);function W1(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Hl)||[];if(!r)return t;const o=n.replace(r,"");let i=z1.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const H1=/\b([a-z-]*)\(.*?\)/gu,cc={...jn,getAnimatableNone:t=>{const e=t.match(H1);return e?e.map(W1).join(" "):t}},U1={...dp,color:mt,backgroundColor:mt,outlineColor:mt,fill:mt,stroke:mt,borderColor:mt,borderTopColor:mt,borderRightColor:mt,borderBottomColor:mt,borderLeftColor:mt,filter:cc,WebkitFilter:cc},uc=t=>U1[t];function Qp(t,e){let n=uc(t);return n!==cc&&(n=jn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const G1=new Set(["auto","none","0"]);function K1(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!G1.has(i)&&Ho(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=Qp(n,o)}class em extends ic{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Wl(c))){const u=Vp(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!O1.has(r)||e.length!==2)return;const[o,i]=e,s=Hp(o),a=Hp(i);if(s!==a)if($p(s)&&$p(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)C1(e[o])&&r.push(o);r.length&&K1(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Gr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function tm(t){let e;return()=>(e===void 0&&(e=t()),e)}const nm=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(jn.test(t)||t==="0")&&!t.startsWith("url("));function Z1(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function q1(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=nm(o,e),a=nm(i,e);return Hr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:Z1(t)||n==="spring"&&r}class rm{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&M1(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!q1(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(bs(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function om(t,e){return e?t*(1e3/e):0}const Y1=5;function im(t,e,n){const r=Math.max(e-Y1,0);return om(n-t(r),e-r)}const fc=.001,X1=.01,sm=10,J1=.05,Q1=1;function eC({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Hr(t<=yn(sm),"Spring duration must be 10 seconds or less");let s=1-e;s=Ln(J1,Q1,s),t=Ln(X1,sm,vn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=dc(c,s),p=Math.exp(-f);return fc-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=dc(Math.pow(c,2),s);return(-o(c)+fc>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-fc+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=nC(o,i,a);if(t=yn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const tC=12;function nC(t,e,n){let r=n;for(let o=1;o<tC;o++)r=r-t(r)/e(r);return r}function dc(t,e){return t*Math.sqrt(1-e*e)}const rC=["duration","bounce"],oC=["stiffness","damping","mass"];function am(t,e){return e.some(n=>t[n]!==void 0)}function iC(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!am(t,oC)&&am(t,rC)){const n=eC(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function lm({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=iC({...r,velocity:-vn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,y=vn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(p<1){const g=dc(y,p);b=S=>{const w=Math.exp(-p*y*S);return i-w*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)b=g=>i-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=S=>{const w=Math.exp(-p*y*S),T=Math.min(g*S,300);return i-w*((h+p*y*m)*Math.sinh(T)+g*m*Math.cosh(T))/g}}return{calculatedDuration:d&&u||null,next:g=>{const S=b(g);if(d)s.done=g>=u;else{let w=h;g!==0&&(p<1?w=im(b,g,S):w=0);const T=Math.abs(w)<=n,P=Math.abs(i-S)<=e;s.done=T&&P}return s.value=s.done?i:S,s}}}function cm({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=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*e;const y=f+m,v=s===void 0?y:s(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),S=O=>{const k=b(O),D=g(O);d.done=Math.abs(k)<=c,d.value=d.done?v:D};let w,T;const P=O=>{h(d.value)&&(w=O,T=lm({keyframes:[d.value,p(d.value)],velocity:im(g,O,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:O=>{let k=!1;return!T&&w===void 0&&(k=!0,S(O),P(O)),w!==void 0&&O>=w?T.next(O-w):(!k&&S(O),d)}}}const um=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,sC=1e-7,aC=12;function lC(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=um(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>sC&&++a<aC);return s}function Uo(t,e,n,r){if(t===e&&n===r)return lt;const o=i=>lC(i,0,1,t,n);return i=>i===0||i===1?i:um(o(i),e,r)}const cC=Uo(.42,0,1,1),uC=Uo(0,0,.58,1),fm=Uo(.42,0,.58,1),fC=t=>Array.isArray(t)&&typeof t[0]!="number",dm=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,hm=t=>e=>1-t(1-e),hc=t=>1-Math.sin(Math.acos(t)),pm=hm(hc),dC=dm(hc),mm=Uo(.33,1.53,.69,.99),pc=hm(mm),hC=dm(pc),gm={linear:lt,easeIn:cC,easeInOut:fm,easeOut:uC,circIn:hc,circInOut:dC,circOut:pm,backIn:pc,backInOut:hC,backOut:mm,anticipate:t=>(t*=2)<1?.5*pc(t):.5*(2-Math.pow(2,-10*(t-1)))},ym=t=>{if(Array.isArray(t)){Wt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return Uo(e,n,r,o)}else if(typeof t=="string")return Wt(gm[t]!==void 0,`Invalid easing type '${t}'`),gm[t];return t},Go=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Be=(t,e,n)=>t+(e-t)*n;function mc(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function pC({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=mc(l,a,t+1/3),i=mc(l,a,t),s=mc(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function ws(t,e){return n=>n>0?e:t}const gc=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},mC=[lc,ar,Kr],gC=t=>mC.find(e=>e.test(t));function vm(t){const e=gC(t);if(Hr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===Kr&&(n=pC(n)),n}const bm=(t,e)=>{const n=vm(t),r=vm(e);if(!n||!r)return ws(t,e);const o={...n};return i=>(o.red=gc(n.red,r.red,i),o.green=gc(n.green,r.green,i),o.blue=gc(n.blue,r.blue,i),o.alpha=Be(n.alpha,r.alpha,i),ar.transform(o))},yc=new Set(["none","hidden"]);function yC(t,e){return yc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function vC(t,e){return n=>Be(t,e,n)}function vc(t){return typeof t=="number"?vC:typeof t=="string"?Wl(t)?ws:mt.test(t)?bm:wC:Array.isArray(t)?xm:typeof t=="object"?mt.test(t)?bm:bC:ws}function xm(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>vc(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function bC(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=vc(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function xC(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const wC=(t,e)=>{const n=jn.createTransformer(e),r=Ho(t),o=Ho(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?yc.has(t)&&!o.values.length||yc.has(e)&&!r.values.length?yC(t,e):gn(xm(xC(r,o),o.values),n):(Hr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ws(t,e))};function wm(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Be(t,e,n):vc(t)(t,e)}function SC(t,e,n){const r=[],o=n||wm,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||lt:e;a=gn(l,a)}r.push(a)}return r}function Sm(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Wt(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=SC(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Go(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Ln(t[0],t[i-1],c)):l}function TC(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=Go(0,e,r);t.push(Be(n,1,o))}}function EC(t){const e=[0];return TC(e,t.length-1),e}function CC(t,e){return t.map(n=>n*e)}function AC(t,e){return t.map(()=>e||fm).splice(0,t.length-1)}function Ss({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=fC(r)?r.map(ym):ym(r),i={done:!1,value:e[0]},s=CC(n&&n.length===e.length?n:EC(e),t),a=Sm(s,e,{ease:Array.isArray(o)?o:AC(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Tm=2e4;function _C(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Tm;)e+=n,r=t.next(e);return e>=Tm?1/0:e}const PC=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_e.update(e,!0),stop:()=>Qt(e),now:()=>ut.isProcessing?ut.timestamp:$n.now()}},OC={decay:cm,inertia:cm,tween:Ss,keyframes:Ss,spring:lm},IC=t=>t/100;class bc extends rm{constructor({KeyframeResolver:e=ic,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=OC[n]||Ss;let l,c;a!==Ss&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Wt(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=gn(IC,wm(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=_C(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),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,S=i;if(h){const O=Math.min(this.currentTime,u)/f;let k=Math.floor(O),D=O%1;!D&&O>=1&&(D=1),D===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(D=1-D,m&&(D-=m/f)):p==="mirror"&&(S=s)),g=Ln(0,1,D)*f}const w=b?{done:!1,value:l[0]}:S.next(g);a&&(w.value=a(w.value));let{done:T}=w;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&o!==void 0&&(w.value=bs(l,this.options,o)),y&&y(w.value),P&&this.finish(),w}get duration(){const{resolved:e}=this;return e?vn(e.calculatedDuration):0}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=PC,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Em=t=>Array.isArray(t)&&typeof t[0]=="number";function Cm(t){return!!(!t||typeof t=="string"&&t in xc||Em(t)||Array.isArray(t)&&t.every(Cm))}const Ko=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,xc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ko([0,.65,.55,1]),circOut:Ko([.55,0,1,.45]),backIn:Ko([.31,.01,.66,-.59]),backOut:Ko([.33,1.53,.69,.99])};function kC(t){return Am(t)||xc.easeOut}function Am(t){if(t)return Em(t)?Ko(t):Array.isArray(t)?t.map(kC):xc[t]}function DC(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Am(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const MC=tm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ts=10,FC=2e4;function RC(t){return t.type==="spring"||t.name==="backgroundColor"||!Cm(t.ease)}function LC(t,e){const n=new bc({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<FC;)r=n.sample(i),o.push(r.value),i+=Ts;return{times:void 0,keyframes:o,duration:i-Ts,ease:"linear"}}class _m extends rm{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new em(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(RC(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=LC(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=DC(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=$n.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(bs(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return vn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return vn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return lt;const{animation:r}=n;r.timeline=e,r.onfinish=null}return lt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new bc({...d,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=yn(this.time);c.setWithVelocity(h.sample(p-Ts).value,h.sample(p).value,Ts)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return MC()&&r&&Sp.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function NC(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return _e.update(r,!0),()=>Qt(r)}const VC=tm(()=>window.ScrollTimeline!==void 0);class $C{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(VC()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),NC(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const wc=(t,e,n,r={},o,i,s)=>a=>{const l=nc(r,t)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-yn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:h=>{e.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:t,motionValue:e,element:i?void 0:o};S1(l)||(f={...f,...w1(t,f)}),f.duration&&(f.duration=yn(f.duration)),f.repeatDelay&&(f.repeatDelay=yn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&e.get()!==void 0){const h=bs(f.keyframes,l);if(h!==void 0)return _e.update(()=>{f.onUpdate(h),f.onComplete()}),new $C([])}return!i&&_m.supports(f)?new _m(f):new bc(f)};class Sc{constructor(){this.subscriptions=[]}add(e){return ms(this.subscriptions,e),()=>gs(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pm=new Set;function Tc(t,e,n){t||Pm.has(e)||(console.warn(e),Pm.add(e))}const Om=30,jC=t=>!isNaN(parseFloat(t)),Zo={current:void 0};class Im{constructor(e,n={}){this.version="11.3.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=$n.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=$n.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=jC(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Tc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Sc);const r=this.events[e].add(n);return e==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Zo.current&&Zo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=$n.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Om)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Om);return om(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zr(t,e){return new Im(t,e)}function BC(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Zr(n))}function zC(t,e){const n=vs(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XE(i[s]);BC(t,s,a)}}function km(t){return t.getProps()[Jh]}class WC extends Im{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const n=Tp(e);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(gs(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function HC(t){return!!(ct(t)&&t.add)}function Ec(t,e){var n;if(!t.applyWillChange)return;let r=t.getValue("willChange");if(!r&&!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&(r=new WC("auto"),t.addValue("willChange",r)),HC(r))return r.add(e)}function UC({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Dm(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(s=r);const c=[],u=o&&t.animationState&&t.animationState.getState()[o];for(const f in l){const d=t.getValue(f,(i=t.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||u&&UC(u,f))continue;const p={delay:n,elapsed:0,...nc(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=km(t);if(v){const b=window.HandoffAppearAnimations(v,f,d,_e);b!==null&&(p.elapsed=b,m=!0)}}d.start(wc(f,d,h,t.shouldReduceMotion&&Rn.has(f)?{type:!1}:p,t,m,Ec(t,f)));const y=d.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{_e.update(()=>{a&&zC(t,a)})}),c}function Cc(t,e,n={}){var r;const o=vs(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Dm(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return GC(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function GC(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(KC).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(Cc(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function KC(t,e){return t.sortNodePosition(e)}function ZC(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>Cc(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=Cc(t,e,n);else{const o=typeof e=="function"?vs(t,e,n.custom):e;r=Promise.all(Dm(t,o,n))}return r.then(()=>{_e.postRender(()=>{t.notify("AnimationComplete",e)})})}const qC=[...jl].reverse(),YC=jl.length;function XC(t){return e=>Promise.all(e.map(({animation:n,options:r})=>ZC(t,n,r)))}function JC(t){let e=XC(t),n=Mm(),r=!0;const o=l=>(c,u)=>{var f;const d=vs(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<YC;y++){const v=qC[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],S=Lo(g),w=v===l?b.isActive:null;w===!1&&(p=y);let T=g===u[v]&&g!==c[v]&&S;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...h},!b.isActive&&w===null||!g&&!b.prevProp||No(g)||typeof g=="boolean")continue;let O=QC(b.prevProp,g)||v===l&&b.isActive&&!T&&S||y>p&&S,k=!1;const D=Array.isArray(g)?g:[g];let L=D.reduce(o(v),{});w===!1&&(L={});const{prevResolvedValues:A={}}=b,j={...A,...L},R=_=>{O=!0,d.has(_)&&(k=!0,d.delete(_)),b.needsAnimating[_]=!0;const M=t.getValue(_);M&&(M.liveStyle=!1)};for(const _ in j){const M=L[_],N=A[_];if(h.hasOwnProperty(_))continue;let z=!1;Xl(M)&&Xl(N)?z=!Rp(M,N):z=M!==N,z?M!=null?R(_):d.add(_):M!==void 0&&d.has(_)?R(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&t.blockInitialAnimation&&(O=!1),O&&(!T||k)&&f.push(...D.map(_=>({animation:_,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Mm(),r=!0}}}function QC(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Rp(e,t):!1}function lr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mm(){return{animate:lr(!0),whileInView:lr(),whileHover:lr(),whileTap:lr(),whileDrag:lr(),whileFocus:lr(),exit:lr()}}class eA extends Vn{constructor(e){super(e),e.animationState||(e.animationState=JC(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();No(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let tA=0;class nA extends Vn{constructor(){super(...arguments),this.id=tA++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const rA={animation:{Feature:eA},exit:{Feature:nA}},Fm=(t,e)=>Math.abs(t-e);function oA(t,e){const n=Fm(t.x,e.x),r=Fm(t.y,e.y);return Math.sqrt(n**2+r**2)}class Rm{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=_c(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=oA(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=ut;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=Ac(d,this.transformPagePoint),_e.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=_c(f.type==="pointercancel"?this.lastMoveEventInfo:Ac(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!_p(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=ys(e),a=Ac(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ut;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,_c(a,this.history)),this.removeListeners=gn(mn(this.contextWindow,"pointermove",this.handlePointerMove),mn(this.contextWindow,"pointerup",this.handlePointerUp),mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Qt(this.updatePoint)}}function Ac(t,e){return e?{point:e(t.point)}:t}function Lm(t,e){return{x:t.x-e.x,y:t.y-e.y}}function _c({point:t},e){return{point:t,delta:Lm(t,Nm(e)),offset:Lm(t,iA(e)),velocity:sA(e,.1)}}function iA(t){return t[0]}function Nm(t){return t[t.length-1]}function sA(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=Nm(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>yn(e)));)n--;if(!r)return{x:0,y:0};const i=vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mt(t){return t.max-t.min}function Pc(t,e=0,n=.01){return Math.abs(t-e)<=n}function Vm(t,e,n,r=.5){t.origin=r,t.originPoint=Be(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(Pc(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(Pc(t.translate)||isNaN(t.translate))&&(t.translate=0)}function qo(t,e,n,r){Vm(t.x,e.x,n.x,r?r.originX:void 0),Vm(t.y,e.y,n.y,r?r.originY:void 0)}function $m(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function aA(t,e,n){$m(t.x,e.x,n.x),$m(t.y,e.y,n.y)}function jm(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function Yo(t,e,n){jm(t.x,e.x,n.x),jm(t.y,e.y,n.y)}function lA(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Be(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Be(n,t,r.max):Math.min(t,n)),t}function Bm(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function cA(t,{top:e,left:n,bottom:r,right:o}){return{x:Bm(t.x,n,o),y:Bm(t.y,e,r)}}function zm(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function uA(t,e){return{x:zm(t.x,e.x),y:zm(t.y,e.y)}}function fA(t,e){let n=.5;const r=Mt(t),o=Mt(e);return o>r?n=Go(e.min,e.max-r,t.min):r>o&&(n=Go(t.min,t.max-o,e.min)),Ln(0,1,n)}function dA(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Oc=.35;function hA(t=Oc){return t===!1?t=0:t===!0&&(t=Oc),{x:Wm(t,"left","right"),y:Wm(t,"top","bottom")}}function Wm(t,e,n){return{min:Hm(t,e),max:Hm(t,n)}}function Hm(t,e){return typeof t=="number"?t:t[e]||0}const Um=()=>({translate:0,scale:1,origin:0,originPoint:0}),qr=()=>({x:Um(),y:Um()}),Gm=()=>({min:0,max:0}),qe=()=>({x:Gm(),y:Gm()});function Vt(t){return[t("x"),t("y")]}function Km({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function pA({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function mA(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ic(t){return t===void 0||t===1}function kc({scale:t,scaleX:e,scaleY:n}){return!Ic(t)||!Ic(e)||!Ic(n)}function cr(t){return kc(t)||Zm(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Zm(t){return qm(t.x)||qm(t.y)}function qm(t){return t&&t!=="0%"}function Es(t,e,n){const r=t-n,o=e*r;return n+o}function Ym(t,e,n,r,o){return o!==void 0&&(t=Es(t,o,r)),Es(t,n,r)+e}function Dc(t,e=0,n=1,r,o){t.min=Ym(t.min,e,n,r,o),t.max=Ym(t.max,e,n,r,o)}function Xm(t,{x:e,y:n}){Dc(t.x,e.translate,e.scale,e.originPoint),Dc(t.y,n.translate,n.scale,n.originPoint)}function gA(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Yr(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Xm(t,s)),r&&cr(i.latestValues)&&Yr(t,i.latestValues))}e.x=Jm(e.x),e.y=Jm(e.y)}function Jm(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Bn(t,e){t.min=t.min+e,t.max=t.max+e}function Qm(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=Be(t.min,t.max,i);Dc(t,e[n],e[r],s,e.scale)}const yA=["x","scaleX","originX"],vA=["y","scaleY","originY"];function Yr(t,e){Qm(t.x,e,yA),Qm(t.y,e,vA)}function eg(t,e){return Km(mA(t.getBoundingClientRect(),e))}function bA(t,e,n){const r=eg(t,n),{scroll:o}=e;return o&&(Bn(r.x,o.offset.x),Bn(r.y,o.offset.y)),r}const tg=({current:t})=>t?t.ownerDocument.defaultView:null,xA=new WeakMap;class wA{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ys(u,"page").point)},i=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=kp(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),Vt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Jt.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[v];S&&(b=Mt(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&_e.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=Ec(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(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=SA(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=()=>Vt(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 Rm(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:tg(this.visualElement)})}stop(e,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&_e.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!Cs(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=lA(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&zr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=cA(o.layoutBox,n):this.constraints=!1,this.elastic=hA(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Vt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=dA(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!zr(e))return!1;const r=e.current;Wt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=bA(r,o.root,this.visualElement.getTransformPagePoint());let s=uA(o.layout.layoutBox,i);if(n){const a=n(pA(s));this.hasMutatedConstraints=!!a,a&&(s=Km(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Vt(u=>{if(!Cs(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(wc(e,r,0,n,this.visualElement,!1,Ec(this.visualElement,e)))}stopAnimation(){Vt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Vt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Vt(n=>{const{drag:r}=this.getProps();if(!Cs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-Be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Vt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=fA({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Vt(s=>{if(!Cs(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Be(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;xA.set(this.visualElement,this);const e=this.visualElement.current,n=mn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();zr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_e.read(r);const s=pn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Vt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Oc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Cs(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function SA(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class TA extends Vn{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new wA(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ng=t=>(e,n)=>{t&&_e.postRender(()=>t(e,n))};class EA extends Vn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new Rm(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tg(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ng(e),onStart:ng(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&_e.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=mn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function CA(){const t=x.useContext(ss);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=x.useId();return x.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const As={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rg(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Xo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const n=rg(t,e.target.x),r=rg(t,e.target.y);return`${n}% ${r}%`}},AA={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=jn.parse(t);if(o.length>5)return r;const i=jn.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=Be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class _A extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;AE(PA),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),As.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||_e.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),$l.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function og(t){const[e,n]=CA(),r=x.useContext(Vo);return E.jsx(_A,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(tp),isPresent:e,safeToRemove:n})}const PA={borderRadius:{...Xo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xo,borderTopRightRadius:Xo,borderBottomLeftRadius:Xo,borderBottomRightRadius:Xo,boxShadow:AA},ig=["TopLeft","TopRight","BottomLeft","BottomRight"],OA=ig.length,sg=t=>typeof t=="string"?parseFloat(t):t,ag=t=>typeof t=="number"||ce.test(t);function IA(t,e,n,r,o,i){o?(t.opacity=Be(0,n.opacity!==void 0?n.opacity:1,kA(r)),t.opacityExit=Be(e.opacity!==void 0?e.opacity:1,0,DA(r))):i&&(t.opacity=Be(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<OA;s++){const a=`border${ig[s]}Radius`;let l=lg(e,a),c=lg(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ag(l)===ag(c)?(t[a]=Math.max(Be(sg(l),sg(c),r),0),(Jt.test(c)||Jt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Be(e.rotate||0,n.rotate||0,r))}function lg(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const kA=cg(0,.5,pm),DA=cg(.5,.95,lt);function cg(t,e,n){return r=>r<t?0:r>e?1:n(Go(t,e,r))}function ug(t,e){t.min=e.min,t.max=e.max}function $t(t,e){ug(t.x,e.x),ug(t.y,e.y)}function fg(t,e,n,r,o){return t-=e,t=Es(t,1/n,r),o!==void 0&&(t=Es(t,1/o,r)),t}function MA(t,e=0,n=1,r=.5,o,i=t,s=t){if(Jt.test(e)&&(e=parseFloat(e),e=Be(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Be(i.min,i.max,r);t===i&&(a-=e),t.min=fg(t.min,e,n,a,o),t.max=fg(t.max,e,n,a,o)}function dg(t,e,[n,r,o],i,s){MA(t,e[n],e[r],e[o],e.scale,i,s)}const FA=["x","scaleX","originX"],RA=["y","scaleY","originY"];function hg(t,e,n,r){dg(t.x,e,FA,n?n.x:void 0,r?r.x:void 0),dg(t.y,e,RA,n?n.y:void 0,r?r.y:void 0)}function pg(t){return t.translate===0&&t.scale===1}function mg(t){return pg(t.x)&&pg(t.y)}function LA(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function gg(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function yg(t){return Mt(t.x)/Mt(t.y)}class NA{constructor(){this.members=[]}add(e){ms(this.members,e),e.scheduleRender()}remove(e){if(gs(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vg(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const VA=(t,e)=>t.depth-e.depth;class $A{constructor(){this.children=[],this.isDirty=!1}add(e){ms(this.children,e),this.isDirty=!0}remove(e){gs(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(VA),this.isDirty=!1,this.children.forEach(e)}}function jA(t,e){const n=$n.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(Qt(r),t(i-e))};return _e.read(r,!0),()=>Qt(r)}function BA(t){window.MotionDebug&&window.MotionDebug.record(t)}function zA(t){return t instanceof SVGElement&&t.tagName!=="svg"}function WA(t,e,n){const r=ct(t)?t:Zr(t);return r.start(wc("",r,e,n)),r.animation}const Mc=["","X","Y","Z"],HA={visibility:"hidden"},bg=1e3;let UA=0;const ur={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Fc(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function xg(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?km(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?xg(t.parent):!1:!1}function wg({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=UA++,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,ur.totalNodes=ur.resolvedTargetDeltas=ur.recalculatedProjection=0,this.nodes.forEach(ZA),this.nodes.forEach(QA),this.nodes.forEach(e_),this.nodes.forEach(qA),BA(ur)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new $A)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Sc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=zA(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=jA(d,250),As.hasAnimatedSinceResize&&(As.hasAnimatedSinceResize=!1,this.nodes.forEach(Tg))})}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()||i_,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!gg(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const S={...nc(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Tg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Qt(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(t_),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&xg(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sg);return}this.isUpdating||this.nodes.forEach(XA),this.isUpdating=!1,this.nodes.forEach(JA),this.nodes.forEach(GA),this.nodes.forEach(KA),this.clearAllSnapshots();const a=$n.now();ut.delta=Ln(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,Jl.update.process(ut),Jl.preRender.process(ut),Jl.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$l.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YA),this.sharedNodes.forEach(n_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!mg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||cr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),s_(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return qe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Bn(a.x,l.offset.x),Bn(a.y,l.offset.y)),a}removeElementScroll(s){const a=qe();$t(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){$t(a,s);const{scroll:d}=this.root;d&&(Bn(a.x,-d.offset.x),Bn(a.y,-d.offset.y))}Bn(a.x,u.offset.x),Bn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=qe();$t(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Yr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),cr(u.latestValues)&&Yr(l,u.latestValues)}return cr(this.latestValues)&&Yr(l,this.latestValues),l}removeTransform(s){const a=qe();$t(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!cr(c.latestValues))continue;kc(c.latestValues)&&c.updateSnapshot();const u=qe(),f=c.measurePageBox();$t(u,f),hg(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return cr(this.latestValues)&&hg(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=ut.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),Yo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),aA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$t(this.target,this.layout.layoutBox),Xm(this.target,this.targetDelta)):$t(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=qe(),this.relativeTargetOrigin=qe(),Yo(this.relativeTargetOrigin,this.target,h.target),$t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ur.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||kc(this.parent.latestValues)||Zm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.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;$t(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;gA(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=qe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=qr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=qr(),this.projectionDeltaWithTransform=qr());const m=this.projectionTransform;qo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=vg(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ur.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=qr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=qe(),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(o_));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const w=S/1e3;Eg(f.x,s.x,w),Eg(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),r_(this.relativeTarget,this.relativeTargetOrigin,d,w),g&&LA(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=qe()),$t(g,this.relativeTarget)),m&&(this.animationValues=u,IA(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{As.hasAnimatedSinceResize=!0,this.currentAnimation=WA(0,bg,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Og(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||qe();const f=Mt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=Mt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}$t(a,l),Yr(a,u),qo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new NA),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Fc("z",s,c,this.animationValues);for(let u=0;u<Mc.length;u++)Fc(`rotate${Mc[u]}`,s,c,this.animationValues),Fc(`skew${Mc[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HA;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ps(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ps(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!cr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=vg(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 fs){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=fs[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ps(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Sg),this.root.sharedNodes.clear()}}}function GA(t){t.updateLayout()}function KA(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Vt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(d);d.min=r[f].min,d.max=d.min+h}):Og(i,n.layoutBox,r)&&Vt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=qr();qo(a,r,n.layoutBox);const l=qr();s?qo(l,t.applyTransform(o,!0),n.measuredBox):qo(l,r,n.layoutBox);const c=!mg(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=qe();Yo(p,n.layoutBox,d.layoutBox);const m=qe();Yo(m,r,h.layoutBox),gg(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function ZA(t){ur.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function qA(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function YA(t){t.clearSnapshot()}function Sg(t){t.clearMeasurements()}function XA(t){t.isLayoutDirty=!1}function JA(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Tg(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function QA(t){t.resolveTargetDelta()}function e_(t){t.calcProjection()}function t_(t){t.resetSkewAndRotation()}function n_(t){t.removeLeadSnapshot()}function Eg(t,e,n){t.translate=Be(e.translate,0,n),t.scale=Be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cg(t,e,n,r){t.min=Be(e.min,n.min,r),t.max=Be(e.max,n.max,r)}function r_(t,e,n,r){Cg(t.x,e.x,n.x,r),Cg(t.y,e.y,n.y,r)}function o_(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const i_={duration:.45,ease:[.4,0,.1,1]},Ag=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),_g=Ag("applewebkit/")&&!Ag("chrome/")?Math.round:lt;function Pg(t){t.min=_g(t.min),t.max=_g(t.max)}function s_(t){Pg(t.x),Pg(t.y)}function Og(t,e,n){return t==="position"||t==="preserve-aspect"&&!Pc(yg(e),yg(n),.2)}const a_=wg({attachResizeListener:(t,e)=>pn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rc={current:void 0},Ig=wg({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rc.current){const t=new a_({});t.mount(window),t.setOptions({layoutScroll:!0}),Rc.current=t}return Rc.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),l_={pan:{Feature:EA},drag:{Feature:TA,ProjectionNode:Ig,MeasureLayout:og}},Lc={current:null},kg={current:!1};function c_(){if(kg.current=!0,!!Vl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Lc.current=t.matches;t.addListener(e),e()}else Lc.current=!1}function u_(t,e,n){for(const r in e){const o=e[r],i=n[r];if(ct(o))t.addValue(r,o),process.env.NODE_ENV==="development"&&Tc(o.version==="11.3.0",`Attempting to mix Framer Motion versions ${o.version} with 11.3.0 may not work as expected.`);else if(ct(i))t.addValue(r,Zr(o,{owner:t}));else if(i!==o)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=t.getStaticValue(r);t.addValue(r,Zr(s!==void 0?s:o,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Dg=new WeakMap,f_=[...Wp,mt,jn],d_=t=>f_.find(zp(t)),Mg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],h_=Bl.length;class p_{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ic,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_e.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=us(n),this.isVariantNode=op(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ct(h)&&h.set(l[d],!1)}}mount(e){this.current=e,Dg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),kg.current||c_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Lc.current,process.env.NODE_ENV!=="production"&&Tc(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(){Dg.delete(this.current),this.projection&&this.projection.unmount(),Qt(this.notifyUpdate),Qt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=Rn.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Wr){const n=Wr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Mg.length;r++){const o=Mg[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=u_(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<h_;r++){const o=Bl[r],i=this.props[o];(Lo(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Zr(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(Np(o)||Lp(o))?o=parseFloat(o):!d_(o)&&jn.test(n)&&(o=Qp(e,n)),this.setBaseTarget(e,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Yl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ct(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Sc),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Fg extends p_{constructor(){super(...arguments),this.KeyframeResolver=em}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function m_(t){return window.getComputedStyle(t)}class g_ extends Fg{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0}readValueFromInstance(e,n){if(Rn.has(n)){const r=uc(n);return r&&r.default||0}else{const r=m_(e),o=(cp(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return eg(e,n)}build(e,n,r){Ul(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ql(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){yp(e,n,r,o)}}class y_ extends Fg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Rn.has(n)){const r=uc(n);return r&&r.default||0}return n=vp.has(n)?n:ls(n),e.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(e,n,r){return xp(e,n,r)}build(e,n,r){Kl(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,o){bp(e,n,r,o)}mount(e){this.isSVGTag=Zl(e.tagName),super.mount(e)}}const v_=(t,e)=>zl(t)?new y_(e):new g_(e,{allowProjection:t!==x.Fragment}),b_={...rA,...g1,...l_,...{layout:{ProjectionNode:Ig,MeasureLayout:og}}},Nc=EE((t,e)=>r1(t,e,b_,v_));function Rg(){const t=x.useRef(!1);return as(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Lg(){const t=Rg(),[e,n]=x.useState(0),r=x.useCallback(()=>{t.current&&n(e+1)},[e]);return[x.useCallback(()=>_e.postRender(r),[r]),e]}class x_ extends F.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function w_({children:t,isPresent:e}){const n=x.useId(),r=x.useRef(null),o=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(os);return x.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
108
111
  [data-motion-pop-id="${n}"] {
109
112
  position: absolute !important;
110
113
  width: ${s}px !important;
@@ -112,10 +115,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
112
115
  top: ${l}px !important;
113
116
  left: ${c}px !important;
114
117
  }
115
- `),()=>{document.head.removeChild(u)}},[e]),E.jsx(dC,{isPresent:e,childRef:r,sizeRef:o,children:R.cloneElement(t,{ref:r})})}const dc=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=nr(pC),l=w.useId(),c=w.useMemo(()=>({id:l,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),R.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=E.jsx(hC,{isPresent:n,children:t})),E.jsx(Yi.Provider,{value:c,children:t})};function pC(){return new Map}function mC(t){return w.useEffect(()=>()=>t(),[])}const lr=t=>t.key||"";function gC(t,e){t.forEach(n=>{const r=lr(n);e.set(r,n)})}function yC(t){const e=[];return w.Children.forEach(t,n=>{w.isValidElement(n)&&e.push(n)}),e}const Hm=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Wt(!o,"Replace exitBeforeEnter with mode='wait'");const a=w.useContext(ko).forceRender||Wm()[0],l=zm(),c=yC(t);let u=c;const f=w.useRef(new Map).current,d=w.useRef(u),h=w.useRef(new Map).current,p=w.useRef(!0);if(Xi(()=>{p.current=!1,gC(c,h),d.current=u}),mC(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return E.jsx(E.Fragment,{children:u.map(b=>E.jsx(dc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:b},lr(b)))});u=[...u];const m=d.current.map(lr),y=c.map(lr),v=m.length;for(let b=0;b<v;b++){const g=m[b];y.indexOf(g)===-1&&!f.has(g)&&f.set(g,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((b,g)=>{if(y.indexOf(g)!==-1)return;const S=h.get(g);if(!S)return;const x=m.indexOf(g);let T=b;if(!T){const P=()=>{f.delete(g);const O=Array.from(h.keys()).filter(k=>!y.includes(k));if(O.forEach(k=>h.delete(k)),d.current=c.filter(k=>{const D=lr(k);return D===g||O.includes(D)}),!f.size){if(l.current===!1)return;a(),r&&r()}};T=E.jsx(dc,{isPresent:!1,onExitComplete:P,custom:e,presenceAffectsLayout:i,mode:s,children:S},lr(S)),f.set(g,T)}u.splice(x,0,T)}),u=u.map(b=>{const g=b.key;return f.has(g)?b:E.jsx(dc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:b},lr(b))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),E.jsx(E.Fragment,{children:f.size?u:u.map(b=>w.cloneElement(b))})},vC=w.createContext(null),bC=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Um(){const t=new Set,e=new WeakMap,n=()=>t.forEach(bC);return{add:r=>{t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:r=>{t.delete(r);const o=e.get(r);o&&(o(),e.delete(r)),n()},dirty:n}}const Gm=t=>t===!0,xC=t=>Gm(t===!0)||t==="id",wC=({children:t,id:e,inherit:n=!0})=>{const r=w.useContext(ko),o=w.useContext(vC),[i,s]=Wm(),a=w.useRef(null),l=r.id||o;a.current===null&&(xC(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:Gm(n)&&r.group||Um()});const c=w.useMemo(()=>({...a.current,forceRender:i}),[s]);return E.jsx(ko.Provider,{value:c,children:t})},Km=w.createContext(null);function SC(t,e,n,r){if(!r)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=r>0?1:-1,s=t[o+i];if(!s)return t;const a=t[o],l=s.layout,c=Be(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?HS(t,o,o+i):t}function TC({children:t,as:e="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=nr(()=>fc(e)),l=[],c=w.useRef(!1);Wt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const h=l.findIndex(p=>f===p.value);h!==-1?l[h].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(AC)},updateOrder:(f,d,h)=>{if(c.current)return;const p=SC(l,f,d,h);l!==p&&(c.current=!0,r(p.map(CC).filter(m=>o.indexOf(m)!==-1)))}};return w.useEffect(()=>{c.current=!1}),E.jsx(a,{...i,ref:s,ignoreStrict:!0,children:E.jsx(Km.Provider,{value:u,children:t})})}const EC=w.forwardRef(TC);function CC(t){return t.value}function AC(t,e){return t.layout.min-e.layout.min}function hc(t){const e=nr(()=>jr(t)),{isStatic:n}=w.useContext(Zi);if(n){const[,r]=w.useState(t);w.useEffect(()=>e.on("change",r),[])}return e}const _C=t=>t&&typeof t=="object"&&t.mix,PC=t=>_C(t)?t.mix:void 0;function OC(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],o=t[1+n],i=t[2+n],s=t[3+n],a=Op(o,i,{mixer:PC(i[0]),...s});return e?a(r):a}function Zm(t,e){const n=hc(e()),r=()=>n.set(e());return r(),Xi(()=>{const o=()=>_e.preRender(r,!1,!0),i=t.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),Xt(r)}}),n}function IC(t){Bo.current=[],t();const e=Zm(Bo.current,t);return Bo.current=void 0,e}function kC(t,e,n,r){if(typeof t=="function")return IC(t);const o=typeof e=="function"?e:OC(e,n,r);return Array.isArray(t)?qm(t,o):qm([t],([i])=>o(i))}function qm(t,e){const n=nr(()=>[]);return Zm(t,()=>{n.length=0;const r=t.length;for(let o=0;o<r;o++)n[o]=t[o].get();return e(n)})}function Ym(t,e=0){return ct(t)?t:hc(e)}function DC({children:t,style:e={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=nr(()=>fc(r)),c=w.useContext(Km),u={x:Ym(e.x),y:Ym(e.y)},f=kC([u.x,u.y],([m,y])=>m||y?1:"unset");Wt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:h,updateOrder:p}=c;return E.jsx(l,{drag:d,...s,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,y)=>{const{velocity:v}=y;v[d]&&p(n,u[d].get(),v[d]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:t})}const MC=w.forwardRef(DC),ys={Group:EC,Item:MC};class RC{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const FC=()=>new RC;function LC(){return nr(FC)}var NC=Object.defineProperty,Xm=Object.getOwnPropertySymbols,VC=Object.prototype.hasOwnProperty,$C=Object.prototype.propertyIsEnumerable,Jm=(t,e,n)=>e in t?NC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jC=(t,e)=>{for(var n in e||(e={}))VC.call(e,n)&&Jm(t,n,e[n]);if(Xm)for(var n of Xm(e))$C.call(e,n)&&Jm(t,n,e[n]);return t},pc=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return!0;return!1},BC=(t,e,n,r)=>bs(pc,t,e,n,r),Wr=t=>typeof t=="object",$n=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(!t||!e||!Wr(t)&&!Wr(e))return t===e;if(t.prototype!==e.prototype)return!1;const n=Object.keys(t);return n.length!==Object.keys(e).length?!1:n.every(r=>$n(t[r],e[r]))},zC=(t,e)=>(Wr(t)||Array.isArray(t))&&e?t[e]:t,WC=t=>(e,n)=>e[t]===n[t]?0:e[t]>n[t]?1:-1,vs=t=>/[0-9.]+/.test(t),Qm=t=>["string","number"].includes(typeof t),eg=t=>t==null||(t==null?void 0:t.length)===0||t==="",tg={eq:$n,is:Object.is,"!=":(t,e)=>t!=e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"==":(t,e)=>t==e,"===":(t,e)=>t===e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,includes:(t,e)=>`${t}`.includes(e),notIncludes:(t,e)=>!`${t}`.includes(e),startsWith:(t,e)=>`${t}`.startsWith(e),endsWith:(t,e)=>`${t}`.endsWith(e),like:(t,e)=>new RegExp(`.*${e}.*`,"gi").test(`${t}`),alphabetical:(t,e)=>t.toString().localeCompare(e.toString()),empty:eg,notEmpty:t=>!eg(t),in:(t,e)=>pc(e,n=>$n(t,n)),notIn:(t,e)=>ng(e,n=>!$n(t,n))},HC=t=>{if(t in tg)return tg[t];throw new Error("Linq - Symbol not found")},Hr=(t,e)=>{const n=[],r=t.length;for(let o=0;o<r;o++)e(t[o],o,t)&&n.push(t[o]);return n},bs=(t,e,n,r,o)=>{if(typeof n=="function")return t(e,n);const i=HC(r);return n&&r&&o!==void 0?t(e,s=>i(s[n],o)):t(e,s=>i(s,o))},UC=(t,e,n,r)=>bs(Hr,t,e,n,r),ng=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},GC=(t,e,n,r)=>bs(ng,t,e,n,r),rg=t=>{if(t===null)return null;const e=jC({},t);return Object.keys(e).forEach(n=>e[n]=Wr(t[n])?rg(t[n]):t[n]),Array.isArray(t)&&t.length?(e.length=t.length)&&Array.from(e):Array.isArray(t)?Array.from(t):e},og=(t,e)=>{if(Wr(e)){for(let n=0;n<t.length;n++){const r=t[n];if($n(e,r))return!0}return!1}for(let n=0;n<t.length;n++){const r=t[n];if($n(e,r))return!0}return!1},KC=(t,e)=>{const n=new Map(t.map(r=>[r[e],r]));return Object.fromEntries(n.entries())},ZC=t=>Hr(t,(e,n,r)=>Wr(e)?n===r.findIndex(o=>$n(o,e)):n===r.indexOf(e)),qC=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return t[r]},ig=(t,e)=>{const n=new Map;return t.forEach(r=>{const o=e(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},YC=(t,e)=>ig(t,n=>n[e]),sg=(t,e)=>{const n=[];let r=0;const o=t.length;for(r;r<o;r++){const i=e(t[r],r,t);n.push(i)}return n},XC=(t,e)=>{let n=Number.parseInt(t,10),r=Number.parseInt(e,10);return n>r?[r,n]:[n,r]},JC=(t,e,n=1)=>{const r=[];let o=t.charCodeAt(0);const i=e.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return vs(t)&&vs(e)?r.map(s=>Number.parseInt(s)):r},mc=(t,e,n=1)=>{let r=Math.abs(n);if((t.length>1||e.length>1)&&vs(t)&&vs(e)){const o=[],[i,s]=XC(t,e);for(let a=i;a<=s;a+=r)o.push(a);return o}return JC(t,e,r)},QC=(t,e,n=1)=>{if(e===void 0){const[r,o,i]=t.split("..");return i===void 0?mc(r,o,1):mc(r,i,Number.parseInt(o,10))}return Qm(t)&&Qm(e)?mc(`${t}`,`${e}`,n):Array.from({length:t},(r,o)=>o*Math.abs(e))},gc=(t,e,n)=>{let r=e;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=t(r,s,i,n)}return r},ag=t=>{const e=Array.from(t.values());let n=null,r=null,o=e.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=e[n];e[n]=e[r],e[r]=i}return e},eA=(t,e)=>{if(typeof e=="number")return t.slice(e);let n=t.length;for(let r=0;r<n;r++){const o=t[r];if(e(o,r,t))return t.slice(r)}return t.slice(0)},tA=(t,e,n,r)=>bs(eA,t,e,n,r),lg=(t,e)=>{const n=[...t];return e===void 0?n.sort():typeof e=="function"?n.toSorted(e):n.toSorted(WC(e))},nA=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),rA=(t,e)=>t.sort(nA(e)),oA=(t,e)=>{if(e===void 0)return[...new Set(t).values()];const n=new Set;return Array.isArray(e)?[...new Set(e)]:Hr(t,r=>{const o=e?n.has(r[e]):n.has(e);return e&&(o||n.add(r[e])),!o})},iA=class Lu{constructor(e=[]){this.array=e}static Range(...e){return QC(...e)}static New(e){return new Lu(e)}Where(e,n,r){return this.array=UC(this.array,e,n,r),this}Some(e,n,r){return BC(this.array,e,n,r)}All(e,n,r){return GC(this.array,e,n,r)}Reverse(){return this.array=ag(this.array),this}Add(e){return this.array=Array.isArray(e)?this.array.concat(e):this.array.concat([e]),this}Prepend(e){return this.array=Array.isArray(e)?e.concat(this.array):[e].concat(this.array),this}Select(e){return e===void 0?this.array:this.array.map(e)}Take(e,n){return n!==void 0?this.array=this.array.slice(e,Math.max(0,n)):this.array=this.array.slice(e),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(e,n,r){return this.array=tA(this.array,e,n,r),this}Distinct(){return this.array=ZC(this.array),this}First(e){return e===void 0?this.array[0]:qC(this.array,e)||null}Last(e){const n=this.array.length;if(e===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(e(this.array[r],r,this.array))return this.array[r]}Sum(e){return e===void 0?gc((n,r)=>n+r,0,this.array):gc((n,r)=>n+zC(r,e),0,this.array)}Average(e){return this.Sum(e)/this.array.length}GroupBy(e){return YC(this.array,e)}GroupWith(e){return ig(this.array,e)}Except(e){return Hr(this.array,n=>!og(e,n))}Intersect(e){return Hr(this.array,n=>og(e,n))}OrderBy(e,n){let r;return r=e?lg(this.array,e):this.array.toSorted(),this.array=n==="desc"?ag(r):r,this}Includes(e){return pc(this.array,n=>$n(n,e))}In(e){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(this.Includes(o))return!0}return!1}Reduce(e,n){return gc(e,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(e){return new Map(sg(this.array,n=>[e,n]))}Zip(e,n){return sg(this.array,(r,o)=>n(r,e[o]))}Count(e){return e===void 0?this.array.length:Hr(this.array,e).length}Get(e){return this.array[e]}Clone(){return new Lu(rg(this.array))}ToObject(e){return KC(this.array,e)}Sort(e){return Array.isArray(e)?rA(this.array,e):lg(this.array,e)}Unique(e){return oA(this.array,e)}},cg=iA;const xs=0,jn=1,Ur=2,ug=4;function ws(t,e){return n=>t(e(n))}function sA(t,e){return e(t)}function fg(t,e){return n=>t(e,n)}function dg(t,e){return()=>t(e)}function Ss(t,e){return e(t),t}function ze(...t){return t}function aA(t){t()}function hg(t){return()=>t}function lA(...t){return()=>{t.map(aA)}}function yc(t){return t!==void 0}function Uo(){}function De(t,e){return t(jn,e)}function ve(t,e){t(xs,e)}function vc(t){t(Ur)}function mt(t){return t(ug)}function ae(t,e){return De(t,fg(e,xs))}function Jt(t,e){const n=t(jn,r=>{n(),e(r)});return n}function Te(){const t=[];return(e,n)=>{switch(e){case Ur:t.splice(0,t.length);return;case jn:return t.push(n),()=>{const r=t.indexOf(n);r>-1&&t.splice(r,1)};case xs:t.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function J(t){let e=t;const n=Te();return(r,o)=>{switch(r){case jn:o(e);break;case xs:e=o;break;case ug:return e}return n(r,o)}}function cA(t){let e,n;const r=()=>e&&e();return function(o,i){switch(o){case jn:return i?n===i?void 0:(r(),n=i,e=De(t,i),e):(r(),Uo);case Ur:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Rt(t){return Ss(Te(),e=>ae(t,e))}function bt(t,e){return Ss(J(e),n=>ae(t,n))}function uA(...t){return e=>t.reduceRight(sA,e)}function U(t,...e){const n=uA(...e);return(r,o)=>{switch(r){case jn:return De(t,n(o));case Ur:vc(t);return}}}function pg(t,e){return t===e}function We(t=pg){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function fe(t){return e=>n=>{t(n)&&e(n)}}function ne(t){return e=>ws(e,t)}function Qt(t){return e=>()=>e(t)}function en(t,e){return n=>r=>n(e=t(e,r))}function Gr(t){return e=>n=>{t>0?t--:e(n)}}function Bn(t){let e=null,n;return r=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,r(e)},t))}}function mg(t){let e,n;return r=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function be(...t){const e=new Array(t.length);let n=0,r=null;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{const c=n;n=n|a,e[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(e));n===o?a():r=a}}function gg(...t){return function(e,n){switch(e){case jn:return lA(...t.map(r=>De(r,n)));case Ur:return;default:throw new Error(`unrecognized action ${e}`)}}}function he(t,e=pg){return U(t,We(e))}function rt(...t){const e=Te(),n=new Array(t.length);let r=0;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{n[s]=l,r=r|a,r===o&&ve(e,n)})}),function(i,s){switch(i){case jn:return r===o&&s(n),De(e,s);case Ur:return vc(e);default:throw new Error(`unrecognized action ${i}`)}}}function Me(t,e=[],{singleton:n}={singleton:!0}){return{id:fA(),constructor:t,dependencies:e,singleton:n}}const fA=()=>Symbol();function dA(t){const e=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&e.has(r))return e.get(r);const a=o(i.map(l=>n(l)));return s&&e.set(r,a),a};return n(t)}function hA(t,e){const n={},r={};let o=0;const i=t.length;for(;o<i;)r[t[o]]=1,o+=1;for(const s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n}const Ts=typeof document<"u"?w.useLayoutEffect:w.useEffect;function yg(t,e,n){const r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),s=Object.keys(e.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&ve(v.propsReady,!1);for(const g of r){const S=v[e.required[g]];ve(S,b[g])}for(const g of o)if(g in b){const S=v[e.optional[g]];ve(S,b[g])}v.propsReady&&ve(v.propsReady,!0)}function c(v){return i.reduce((b,g)=>(b[g]=S=>{const x=v[e.methods[g]];ve(x,S)},b),{})}function u(v){return s.reduce((b,g)=>(b[g]=cA(v[e.events[g]]),b),{})}const f=w.forwardRef((v,b)=>{const{children:g,...S}=v,[x]=w.useState(()=>Ss(dA(t),P=>l(P,S))),[T]=w.useState(dg(u,x));return Ts(()=>{for(const P of s)P in S&&De(T[P],S[P]);return()=>{Object.values(T).map(vc)}},[S,T,x]),Ts(()=>{l(x,S)}),w.useImperativeHandle(b,hg(c(x))),w.createElement(a.Provider,{value:x},n?w.createElement(n,hA([...r,...o,...s],S),g):g)}),d=v=>w.useCallback(fg(ve,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],S=w.useCallback(x=>De(g,x),[g]);return w.useSyncExternalStore(S,()=>mt(g),()=>mt(g))},p=v=>{const g=w.useContext(a)[v],[S,x]=w.useState(dg(mt,g));return Ts(()=>De(g,T=>{T!==S&&x(hg(T))}),[g,S]),S},m=w.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,b)=>{const S=w.useContext(a)[v];Ts(()=>De(S,b),[b,S])}}}const pA=typeof document<"u"?w.useLayoutEffect:w.useEffect;var $t=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))($t||{});const mA={0:"debug",1:"log",2:"warn",3:"error"},gA=()=>typeof globalThis>"u"?window:globalThis,zn=Me(()=>{const t=J(3);return{log:J((n,r,o=1)=>{var i;const s=(i=gA().VIRTUOSO_LOG_LEVEL)!=null?i:mt(t);o>=s&&console[mA[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:t}},[],{singleton:!0});function bc(t,e=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&t(s)})}),[t]);r=i=>{i&&e?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function cr(t,e=!0){return bc(t,e).callbackRef}function yA(t,e,n,r,o,i,s){const a=w.useCallback(l=>{const c=vA(l.children,e,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),c!==null&&t(c)},[t,e,o,i,s,r]);return bc(a,n)}function vA(t,e,n,r){const o=t.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=t.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=e(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},$t.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function Wn(t,e){return Math.round(t.getBoundingClientRect()[e])}function vg(t,e){return Math.abs(t-e)<1.01}function bg(t,e,n,r=Uo,o){const i=w.useRef(null),s=w.useRef(null),a=w.useRef(null),l=w.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=()=>{t({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():Nu.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-y)&&(s.current=null,e(!0),a.current&&(clearTimeout(a.current),a.current=null))},[t,e]);w.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const d=i.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,y;d===window?(m=Math.max(Wn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,p=Wn(d,"height"),y=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),vg(p,m)||f.top===y){t({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&e(!0);return}h?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,e(!0)},1e3)):s.current=null,d.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const xt=Me(()=>{const t=Te(),e=Te(),n=J(0),r=Te(),o=J(0),i=Te(),s=Te(),a=J(0),l=J(0),c=J(0),u=J(0),f=Te(),d=Te(),h=J(!1);return ae(U(t,ne(({scrollTop:p})=>p)),e),ae(U(t,ne(({scrollHeight:p})=>p)),s),ae(e,o),{scrollContainerState:t,scrollTop:e,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Go={lvl:0};function xg(t,e,n,r=Go,o=Go){return{k:t,v:e,lvl:n,l:r,r:o}}function Ne(t){return t===Go}function Kr(){return Go}function xc(t,e){if(Ne(t))return Go;const{k:n,l:r,r:o}=t;if(e===n){if(Ne(r))return o;if(Ne(o))return r;{const[i,s]=wg(r);return Es(Qe(t,{k:i,v:s,l:Sg(r)}))}}else return e<n?Es(Qe(t,{l:xc(r,e)})):Es(Qe(t,{r:xc(o,e)}))}function Ko(t,e){if(!Ne(t))return e===t.k?t.v:e<t.k?Ko(t.l,e):Ko(t.r,e)}function Ht(t,e,n="k"){if(Ne(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const r=Ht(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return Ht(t.l,e,n)}function Ft(t,e,n){return Ne(t)?xg(e,n,1):e===t.k?Qe(t,{k:e,v:n}):e<t.k?Tg(Qe(t,{l:Ft(t.l,e,n)})):Tg(Qe(t,{r:Ft(t.r,e,n)}))}function wc(t,e,n){if(Ne(t))return[];const{k:r,v:o,l:i,r:s}=t;let a=[];return r>e&&(a=a.concat(wc(i,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(wc(s,e,n))),a}function ur(t){return Ne(t)?[]:[...ur(t.l),{k:t.k,v:t.v},...ur(t.r)]}function wg(t){return Ne(t.r)?[t.k,t.v]:wg(t.r)}function Sg(t){return Ne(t.r)?t.l:Es(Qe(t,{r:Sg(t.r)}))}function Qe(t,e){return xg(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function Sc(t){return Ne(t)||t.lvl>t.r.lvl}function Tg(t){return Tc(Cg(t))}function Es(t){const{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(Sc(e))return Cg(Qe(t,{lvl:r-1}));if(!Ne(e)&&!Ne(e.r))return Qe(e.r,{l:Qe(e,{r:e.r.l}),r:Qe(t,{l:e.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Sc(t))return Tc(Qe(t,{lvl:r-1}));if(!Ne(n)&&!Ne(n.l)){const o=n.l,i=Sc(o)?n.lvl-1:n.lvl;return Qe(o,{l:Qe(t,{r:o.l,lvl:r-1}),r:Tc(Qe(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Cs(t,e,n){if(Ne(t))return[];const r=Ht(t,e)[0];return bA(wc(t,r,n))}function Eg(t,e){const n=t.length;if(n===0)return[];let{index:r,value:o}=e(t[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=e(t[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function bA(t){return Eg(t,({k:e,v:n})=>({index:e,value:n}))}function Tc(t){const{r:e,lvl:n}=t;return!Ne(e)&&!Ne(e.r)&&e.lvl===n&&e.r.lvl===n?Qe(e,{l:Qe(t,{r:e.l}),lvl:n+1}):t}function Cg(t){const{l:e}=t;return!Ne(e)&&e.lvl===t.lvl?Qe(e,{r:Qe(t,{l:e.r})}):t}function As(t,e,n,r=0){let o=t.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=t[i],a=n(s,e);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Ag(t,e,n){return t[As(t,e,n)]}function xA(t,e,n,r){const o=As(t,e,r),i=As(t,n,r,o);return t.slice(o,i+1)}const Ec=Me(()=>({recalcInProgress:J(!1)}),[],{singleton:!0});function wA(t){const{size:e,startIndex:n,endIndex:r}=t;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===e}function _g(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function SA(t,e){let n=Ne(t)?0:1/0;for(const r of e){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Ne(t)){t=Ft(t,0,o);continue}const a=Cs(t,i-1,s+1);if(a.some(wA(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(s>=u||o===d)&&(t=xc(t,u)):(c=d!==o,l=!0),f>s&&s>=u&&d!==o&&(t=Ft(t,s+1,d));c&&(t=Ft(t,i,o))}return[t,n]}function TA(){return{offsetTree:[],sizeTree:Kr(),groupOffsetTree:Kr(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Cc({index:t},e){return e===t?0:e<t?-1:1}function EA({offset:t},e){return e===t?0:e<t?-1:1}function CA(t){return{index:t.index,value:t}}function AA(t,e,n,r=0){return r>0&&(e=Math.max(e,Ag(t,r,Cc).offset)),Eg(xA(t,e,n,EA),CA)}function Ac(t,e,n,r){let o=t,i=0,s=0,a=0,l=0;if(e!==0){l=As(o,e-1,Cc),a=o[l].offset;const u=Ht(n,e-1);i=u[0],s=u[1],o.length&&o[l].size===Ht(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Cs(n,e,1/0)){const f=c-i,d=f*s+a+f*r;o.push({offset:d,size:u,index:c}),i=c,a=d,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function _A(t,[e,n,r,o]){e.length>0&&r("received item sizes",e,$t.DEBUG);const i=t.sizeTree;let s=i,a=0;if(n.length>0&&Ne(i)&&e.length===2){const d=e[0].size,h=e[1].size;s=n.reduce((p,m)=>Ft(Ft(p,m,d),m+1,h),s)}else[s,a]=SA(s,e);if(s===i)return t;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ac(t.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>Ft(d,h,Zo(h,l,o)),Kr()),groupIndices:n}}function Zo(t,e,n){if(e.length===0)return 0;const{offset:r,index:o,size:i}=Ag(e,t,Cc),s=t-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function PA(t){return typeof t.groupIndex<"u"}function Pg(t,e,n){if(PA(t))return e.groupIndices[t.groupIndex]+1;{const r=t.index==="LAST"?n:t.index;let o=Og(r,e);return o=Math.max(0,o,Math.min(n,o)),o}}function Og(t,e){if(!_s(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function _s(t){return!Ne(t.groupOffsetTree)}function OA(t){return ur(t).map(({k:e,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:e,endIndex:s,size:n}})}const IA={offsetHeight:"height",offsetWidth:"width"},tn=Me(([{log:t},{recalcInProgress:e}])=>{const n=Te(),r=Te(),o=bt(r,0),i=Te(),s=Te(),a=J(0),l=J([]),c=J(void 0),u=J(void 0),f=J((x,T)=>Wn(x,IA[T])),d=J(void 0),h=J(0),p=TA(),m=bt(U(n,be(l,t,h),en(_A,p),We()),p),y=bt(U(l,We(),en((x,T)=>({prev:x.current,current:T}),{prev:[],current:[]}),ne(({prev:x})=>x)),[]);ae(U(l,fe(x=>x.length>0),be(m,h),ne(([x,T,P])=>{const O=x.reduce((k,D,L)=>Ft(k,D,Zo(D,T.offsetTree,P)||L),Kr());return{...T,groupIndices:x,groupOffsetTree:O}})),m),ae(U(r,be(m),fe(([x,{lastIndex:T}])=>x<T),ne(([x,{lastIndex:T,lastSize:P}])=>[{startIndex:x,endIndex:T,size:P}])),n),ae(c,u);const v=bt(U(c,ne(x=>x===void 0)),!0);ae(U(u,fe(x=>x!==void 0&&Ne(mt(m).sizeTree)),ne(x=>[{startIndex:0,endIndex:0,size:x}])),n);const b=Rt(U(n,be(m),en(({sizes:x},[T,P])=>({changed:P!==x,sizes:P}),{changed:!1,sizes:p}),ne(x=>x.changed)));De(U(a,en((x,T)=>({diff:x.prev-T,prev:T}),{diff:0,prev:0}),ne(x=>x.diff)),x=>{const{groupIndices:T}=mt(m);if(x>0)ve(e,!0),ve(i,x+_g(x,T));else if(x<0){const P=mt(y);P.length>0&&(x-=_g(-x,P)),ve(s,x)}}),De(U(a,be(t)),([x,T])=>{x<0&&T("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},$t.ERROR)});const g=Rt(i);ae(U(i,be(m),ne(([x,T])=>{const P=T.groupIndices.length>0,O=[],k=T.lastSize;if(P){const D=Ko(T.sizeTree,0);let L=0,A=0;for(;L<x;){const _=T.groupIndices[A],M=T.groupIndices.length===A+1?1/0:T.groupIndices[A+1]-_-1;O.push({startIndex:_,endIndex:_,size:D}),O.push({startIndex:_+1,endIndex:_+1+M-1,size:k}),A++,L+=M+1}const j=ur(T.sizeTree);return L!==x&&j.shift(),j.reduce((_,{k:M,v:N})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:M+x-1,size:_.prevSize}]),{ranges:z,prevIndex:M+x,prevSize:N}},{ranges:O,prevIndex:x,prevSize:0}).ranges}return ur(T.sizeTree).reduce((D,{k:L,v:A})=>({ranges:[...D.ranges,{startIndex:D.prevIndex,endIndex:L+x-1,size:D.prevSize}],prevIndex:L+x,prevSize:A}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=Rt(U(s,be(m,h),ne(([x,{offsetTree:T},P])=>{const O=-x;return Zo(O,T,P)})));return ae(U(s,be(m,h),ne(([x,T,P])=>{if(T.groupIndices.length>0){if(Ne(T.sizeTree))return T;let k=Kr();const D=mt(y);let L=0,A=0,j=0;for(;L<-x;){j=D[A];const _=D[A+1]-j-1;A++,L+=_+1}if(k=ur(T.sizeTree).reduce((_,{k:M,v:N})=>Ft(_,Math.max(0,M+x),N),k),L!==-x){const _=Ko(T.sizeTree,j);k=Ft(k,0,_);const M=Ht(T.sizeTree,-x+1)[1];k=Ft(k,1,M)}return{...T,sizeTree:k,...Ac(T.offsetTree,0,k,P)}}else{const k=ur(T.sizeTree).reduce((D,{k:L,v:A})=>Ft(D,Math.max(0,L+x),A),Kr());return{...T,sizeTree:k,...Ac(T.offsetTree,0,k,P)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},ze(zn,Ec),{singleton:!0}),kA=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ig(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!kA)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const qo=Me(([{sizes:t,totalCount:e,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Te(),p=Te(),m=J(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ve(o,!1)}return ae(U(h,be(t,i,e,m,l,c,d),be(r,u,f),ne(([[S,x,T,P,O,k,D,L],A,j,F])=>{const _=Ig(S),{align:M,behavior:N,offset:z}=_,q=P-1,C=Pg(_,x,q);let $=Zo(C,x.offsetTree,A)+k;M==="end"?($+=j+Ht(x.sizeTree,C)[1]-T+F,C===q&&($+=D)):M==="center"?$+=(j+Ht(x.sizeTree,C)[1]-T+F)/2:$-=O,z&&($+=z);const Y=re=>{g(),re?(L("retrying to scroll to",{location:S},$t.DEBUG),ve(h,S)):(ve(p,!0),L("list did not change, scroll successful",{},$t.DEBUG))};if(g(),N==="smooth"){let re=!1;b=De(n,ee=>{re=re||ee}),y=Jt(a,()=>{Y(re)})}else y=Jt(U(n,DA(150)),Y);return v=setTimeout(()=>{g()},1200),ve(o,!0),L("scrolling from index to",{index:C,top:$,behavior:N},$t.DEBUG),{top:$,behavior:N}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},ze(tn,xt,zn),{singleton:!0});function DA(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return r=>{r&&(e(!0),clearTimeout(n))}}}const Yo="up",Xo="down",MA="none",RA={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},FA=0,Jo=Me(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=J(!1),a=J(!0),l=Te(),c=Te(),u=J(4),f=J(FA),d=bt(U(gg(U(he(e),Gr(1),Qt(!0)),U(he(e),Gr(1),Qt(!1),mg(100))),We()),!1),h=bt(U(gg(U(i,Qt(!0)),U(i,Qt(!1),mg(200))),We()),!1);ae(U(rt(he(e),he(f)),ne(([b,g])=>b<=g),We()),a),ae(U(a,Bn(50)),c);const p=Rt(U(rt(t,he(n),he(r),he(o),he(u)),en((b,[{scrollTop:g,scrollHeight:S},x,T,P,O])=>{const k=g+x-S>-O,D={viewportHeight:x,scrollTop:g,scrollHeight:S};if(k){let A,j;return g>b.state.scrollTop?(A="SCROLLED_DOWN",j=b.state.scrollTop-g):(A="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:D,atBottomBecause:A,scrollTopDelta:j}}let L;return D.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":x<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:D}},RA),We((b,g)=>b&&b.atBottom===g.atBottom))),m=bt(U(t,en((b,{scrollTop:g,scrollHeight:S,viewportHeight:x})=>{if(vg(b.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const T=S-(g+x)<1;return b.scrollTop!==g&&T?{scrollHeight:S,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),fe(b=>b.changed),ne(b=>b.jump)),0);ae(U(p,ne(b=>b.atBottom)),s),ae(U(s,Bn(50)),l);const y=J(Xo);ae(U(t,ne(({scrollTop:b})=>b),We(),en((b,g)=>mt(h)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?Yo:Xo,prevScrollTop:g},{direction:Xo,prevScrollTop:0}),ne(b=>b.direction)),y),ae(U(t,Bn(50),Qt(MA)),y);const v=J(0);return ae(U(d,fe(b=>!b),Qt(0)),v),ae(U(e,Bn(100),be(d),fe(([b,g])=>!!g),en(([b,g],[S])=>[g,S],[0,0]),ne(([b,g])=>g-b)),v),{isScrolling:d,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},ze(xt)),Hn=Me(([{log:t}])=>{const e=J(!1),n=Rt(U(e,fe(r=>r),We()));return De(e,r=>{r&&mt(t)("props updated",{},$t.DEBUG)}),{propsReady:e,didMount:n}},ze(zn),{singleton:!0});function _c(t,e){t==0?e():requestAnimationFrame(()=>_c(t-1,e))}function Pc(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const Qo=Me(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=J(!0),l=J(0),c=J(!0);return ae(U(s,be(l),fe(([u,f])=>!!f),Qt(!1)),a),ae(U(s,be(l),fe(([u,f])=>!!f),Qt(!1)),c),De(U(rt(e,s),be(a,t,n,c),fe(([[,u],f,{sizeTree:d},h,p])=>u&&(!Ne(d)||yc(h))&&!f&&!p),be(l)),([,u])=>{Jt(i,()=>{ve(c,!0)}),_c(4,()=>{Jt(r,()=>{ve(a,!0)}),ve(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},ze(tn,xt,qo,Hn),{singleton:!0});function kg(t){return t?t==="smooth"?"smooth":"auto":!1}const LA=(t,e)=>typeof t=="function"?kg(t(e)):e&&kg(t),NA=Me(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=J(!1),f=Te();let d=null;function h(m){ve(o,{index:"LAST",align:"end",behavior:m})}De(U(rt(U(he(t),Gr(1)),a),be(he(u),n,i,c),ne(([[m,y],v,b,g,S])=>{let x=y&&g,T="auto";return x&&(T=LA(v,b||S),x=x&&!!T),{totalCount:m,shouldFollow:x,followOutputBehavior:T}}),fe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=Jt(e,()=>{mt(l)("following output to ",{totalCount:m},$t.DEBUG),h(y),d=null})});function p(m){const y=Jt(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(mt(l)("scrolling to bottom due to increased size",{},$t.DEBUG),h("auto"))});setTimeout(y,100)}return De(U(rt(he(u),t,s),fe(([m,,y])=>m&&y),en(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),fe(({refreshed:m})=>m),be(u,t)),([,m])=>{mt(i)&&p(m!==!1)}),De(f,()=>{p(mt(u)!==!1)}),De(rt(he(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},ze(tn,Jo,qo,Qo,Hn,zn,xt));function VA(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const Dg=Me(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Te(),s=Te(),a=Rt(U(i,ne(VA)));return ae(U(a,ne(l=>l.totalCount)),t),ae(U(a,ne(l=>l.groupIndices)),e),ae(U(rt(r,n,o),fe(([l,c])=>_s(c)),ne(([l,c,u])=>Ht(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),We(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ze(tn,xt));function ei(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Mg(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const Ps="top",Os="bottom",Rg="none";function Fg(t,e,n){return typeof t=="number"?n===Yo&&e===Ps||n===Xo&&e===Os?t:0:n===Yo?e===Ps?t.main:t.reverse:e===Os?t.main:t.reverse}function Lg(t,e){return typeof t=="number"?t:t[e]||0}const Oc=Me(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Te(),s=J(0),a=J(0),l=J(0),c=bt(U(rt(he(t),he(e),he(r),he(i,ei),he(l),he(s),he(o),he(n),he(a)),ne(([u,f,d,[h,p],m,y,v,b,g])=>{const S=u-b,x=y+v,T=Math.max(d-S,0);let P=Rg;const O=Lg(g,Ps),k=Lg(g,Os);return h-=b,h+=d+v,p+=d+v,p-=b,h>u+x-O&&(P=Yo),p<u-T+f+k&&(P=Xo),P!==Rg?[Math.max(S-d-Fg(m,Ps,P)-O,0),S-T-v+f+Fg(m,Os,P)+k]:null}),fe(u=>u!=null),We(ei)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},ze(xt),{singleton:!0});function $A(t,e,n){if(_s(e)){const r=Og(t,e);return[{index:Ht(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const Ic={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Ng(t,e,n){if(t.length===0)return[];if(!_s(e))return t.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=t[0].index,o=t[t.length-1].index,i=[],s=Cs(e.groupOffsetTree,r,o);let a,l=0;for(const c of t){(!a||a.end<c.index)&&(a=s.shift(),l=e.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function Is(t,e,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(t.length>0){c=t[0].offset;const m=t[t.length-1];u=m.offset+m.size}const f=n-l,d=a+f*s+(f-1)*r,h=c,p=d-u;return{items:Ng(t,o,i),topItems:Ng(e,o,i),topListHeight:e.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function Vg(t,e,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=t)break;s++}const a=t+s,l=Pc(e,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return Is(c,[],a,o,n,r)}const fr=Me(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=J([]),y=J(0),v=Te();ae(i.topItemsIndexes,m);const b=bt(U(rt(h,p,he(s,ei),he(e),he(t),he(u),c,he(m),he(r),he(o),n),fe(([T,P,,O,,,,,,,k])=>{const D=k&&k.length!==O;return T&&!P&&!D}),ne(([,,[T,P],O,k,D,L,A,j,F,_])=>{const M=k,{sizeTree:N,offsetTree:z}=M,q=mt(y);if(O===0)return{...Ic,totalCount:O};if(T===0&&P===0)return q===0?{...Ic,totalCount:O}:Vg(q,D,k,j,F,_||[]);if(Ne(N))return q>0?null:Is($A(Pc(D,O),M,_),[],O,F,M,j);const C=[];if(A.length>0){const W=A[0],I=A[A.length-1];let V=0;for(const H of Cs(N,W,I)){const K=H.value,X=Math.max(H.start,W),le=Math.min(H.end,I);for(let B=X;B<=le;B++)C.push({index:B,size:K,offset:V,data:_&&_[B]}),V+=K}}if(!L)return Is([],C,O,F,M,j);const $=A.length>0?A[A.length-1]+1:0,Y=AA(z,T,P,$);if(Y.length===0)return null;const re=O-1,ee=Ss([],W=>{for(const I of Y){const V=I.value;let H=V.offset,K=I.start;const X=V.size;if(V.offset<T){K+=Math.floor((T-V.offset+F)/(X+F));const B=K-I.start;H+=B*X+B*F}K<$&&(H+=($-K)*X,K=$);const le=Math.min(I.end,re);for(let B=K;B<=le&&!(H>=P);B++)W.push({index:B,size:X,offset:H,data:_&&_[B]}),H+=X+F}});return Is(ee,C,O,F,M,j)}),fe(T=>T!==null),We()),Ic);ae(U(n,fe(yc),ne(T=>T==null?void 0:T.length)),e),ae(U(b,ne(T=>T.topListHeight)),f),ae(f,l),ae(U(b,ne(T=>[T.top,T.bottom])),a),ae(U(b,ne(T=>T.items)),v);const g=Rt(U(b,fe(({items:T})=>T.length>0),be(e,n),fe(([{items:T},P])=>T[T.length-1].originalIndex===P-1),ne(([,T,P])=>[T-1,P]),We(ei),ne(([T])=>T))),S=Rt(U(b,Bn(200),fe(({items:T,topItems:P})=>T.length>0&&T[0].originalIndex===P.length),ne(({items:T})=>T[0].index),We())),x=Rt(U(b,fe(({items:T})=>T.length>0),ne(({items:T})=>{let P=0,O=T.length-1;for(;T[P].type==="group"&&P<O;)P++;for(;T[O].type==="group"&&O>P;)O--;return{startIndex:T[P].index,endIndex:T[O].index}}),We(Mg)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:x,itemsRendered:v,initialItemCount:y,...d}},ze(tn,Dg,Oc,Qo,qo,Jo,Hn,Ec),{singleton:!0}),jA=Me(([{sizes:t,firstItemIndex:e,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ae(U(a,be(i),fe(([,l])=>l!==0),be(o,t,e,r,n),ne(([[,l],c,u,f,d,h=[]])=>Vg(l,c,u,f,d,h))),s),{}),ze(tn,Qo,fr,Hn),{singleton:!0}),$g=Me(([{scrollVelocity:t}])=>{const e=J(!1),n=Te(),r=J(!1);return ae(U(t,be(r,e,n),fe(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),We()),e),De(U(rt(e,t,n),be(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},ze(Jo),{singleton:!0}),BA=Me(([{topItemsIndexes:t}])=>{const e=J(0);return ae(U(e,fe(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),t),{topItemCount:e}},ze(fr)),jg=Me(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Te(),s=bt(U(rt(t,r,e,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ae(he(s),i),{totalListHeight:s,totalListHeightChanged:i}},ze(xt,fr),{singleton:!0});function Bg(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const zA=Bg(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WA=Me(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Rt(U(l,be(a),en(([,v,b,g],[{items:S,totalCount:x,bottom:T,offsetBottom:P},O])=>{const k=T+P;let D=0;return b===x&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(D=k-g,D!==0&&(D+=O))),[D,S,x,k]},[0,[],0,0]),fe(([v])=>v!==0),be(e,s,r,i,h,p),fe(([,v,b,g,,,S])=>!S&&!g&&v!==0&&b===Yo),ne(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},$t.DEBUG),v))));function y(v){v>0?(ve(t,{top:-v,behavior:"auto"}),ve(n,0)):(ve(n,0),ve(t,{top:-v,behavior:"auto"}))}return De(U(m,be(n,o)),([v,b,g])=>{g&&zA()?ve(n,b-v):y(-v)}),De(U(rt(bt(o,!1),n,p),fe(([v,b,g])=>!v&&!g&&b!==0),ne(([v,b])=>b),Bn(1)),y),ae(U(u,ne(v=>({top:-v}))),t),De(U(c,be(f,d),ne(([v,{lastSize:b,groupIndices:g,sizeTree:S},x])=>{function T(P){return P*(b+x)}if(g.length===0)return T(v);{let P=0;const O=Ko(S,0);let k=0,D=0;for(;k<v;){k++,P+=O;let L=g.length===D+1?1/0:g[D+1]-g[D]-1;k+L>v&&(P-=O,L=v-k+1),k+=L,P+=T(L),D++}return P}})),v=>{ve(n,v),requestAnimationFrame(()=>{ve(t,{top:v}),requestAnimationFrame(()=>{ve(n,0),ve(p,!1)})})}),{deviation:n}},ze(xt,Jo,fr,tn,zn,Ec)),HA=Me(([{didMount:t},{scrollTo:e},{listState:n}])=>{const r=J(0);return De(U(t,be(r),fe(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{Jt(U(n,Gr(1),fe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ve(e,o)})})}),{initialScrollTop:r}},ze(Hn,xt,fr),{singleton:!0}),UA=Me(([{viewportHeight:t},{totalListHeight:e}])=>{const n=J(!1),r=bt(U(rt(n,t,e),fe(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),Bn(0),We()),0);return{alignToBottom:n,paddingTopAddition:r}},ze(xt,jg),{singleton:!0}),kc=Me(([{scrollTo:t,scrollContainerState:e}])=>{const n=Te(),r=Te(),o=Te(),i=J(!1),s=J(void 0);return ae(U(rt(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),e),ae(U(t,be(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},ze(xt)),GA=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>t<n?{...s,behavior:o,align:i??"start"}:e>r?{...s,behavior:o,align:i??"end"}:null,KA=Me(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Te();return ae(U(u,be(t,o,e,i,s,a,r),be(n),ne(([[f,d,h,p,m,y,v,b],g])=>{const{done:S,behavior:x,align:T,calculateViewLocation:P=GA,...O}=f,k=Pg(f,d,p-1),D=Zo(k,d.offsetTree,g)+m+y,L=D+Ht(d.sizeTree,k)[1],A=b+y,j=b+h-v,F=P({itemTop:D,itemBottom:L,viewportTop:A,viewportBottom:j,locationParams:{behavior:x,align:T,...O}});return F?S&&Jt(U(l,fe(_=>_===!1),Gr(mt(l)?1:2)),S):S&&S(),F}),fe(f=>f!==null)),c),{scrollIntoView:u}},ze(tn,xt,qo,fr,zn),{singleton:!0}),ZA=Me(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Te(),c=J(void 0),u=J(null),f=J(null);return ae(s,u),ae(a,f),De(U(l,be(t,n,i,u,f)),([d,h,p,m,y,v])=>{const b=OA(h.sizeTree);m&&y!==null&&v!==null&&(p=y.scrollTop-v.offsetTop),d({ranges:b,scrollTop:p})}),ae(U(c,fe(yc),ne(qA)),r),ae(U(o,be(c),fe(([,d])=>d!==void 0),We(),ne(([,d])=>d.ranges)),e),{getState:l,restoreStateFrom:c}},ze(tn,xt,Qo,Hn,kc));function qA(t){return{offset:t.scrollTop,index:0,align:"start"}}const YA=Me(([t,e,n,r,o,i,s,a,l,c])=>({...t,...e,...n,...r,...o,...i,...s,...a,...l,...c}),ze(Oc,jA,Hn,$g,jg,HA,UA,kc,KA,zn)),XA=Me(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:b,topItemsIndexes:g,...S},{scrollToIndex:x},T,{topItemCount:P},{groupCounts:O},k])=>(ae(S.rangeChanged,k.scrollSeekRangeChanged),ae(U(k.windowViewportRect,ne(D=>D.visibleHeight)),m.viewportHeight),{totalCount:t,data:s,firstItemIndex:a,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:P,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:x,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...k,...m,sizes:f,...y}),ze(tn,Qo,xt,ZA,NA,fr,qo,WA,BA,Dg,YA)),Dc="-webkit-sticky",zg="sticky",Wg=Bg(()=>{if(typeof document>"u")return zg;const t=document.createElement("div");return t.style.position=Dc,t.style.position===Dc?Dc:zg});function Hg(t,e){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(e){const d=e.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+e.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},t(n.current)},[t,e]),{callbackRef:o,ref:i}=bc(r),s=w.useCallback(()=>{r(i.current)},[r,i]);return w.useEffect(()=>{if(e){e.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(e),()=>{e.removeEventListener("scroll",s),a.unobserve(e)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,e]),o}const Ug=w.createContext(void 0),Gg=w.createContext(void 0);function Kg(t){return t}Wg();const JA={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ks=t=>({width:"100%",height:"100%",position:"absolute",top:0});Wg();function Pt(t,e){if(typeof t!="string")return{context:e}}function QA(t,e){return{item:typeof t=="string"?void 0:e}}function Zg({usePublisher:t,useEmitter:e,useEmitterValue:n}){return w.memo(function({style:i,children:s,...a}){const l=t("scrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=bg(l,u,c,f);return e("scrollTo",m),e("scrollBy",p),w.createElement(c,{ref:h,style:{...JA,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Pt(c,d)},s)})}function qg({usePublisher:t,useEmitter:e,useEmitterValue:n}){return w.memo(function({style:i,children:s,...a}){const l=t("windowScrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=bg(l,u,c,Uo,h);return pA(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),e("windowScrollTo",v),e("scrollBy",y),w.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...Pt(c,p)},s)})}const Yg={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},e_={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Xg,ceil:Jg,floor:Ds,min:Mc,max:ti}=Math;function t_(t){return{...e_,items:t}}function Qg(t,e,n){return Array.from({length:e-t+1}).map((r,o)=>{const i=n===null?null:n[o+t];return{index:o+t,data:i}})}function n_(t,e){return t&&t.column===e.column&&t.row===e.row}function Ms(t,e){return t&&t.width===e.width&&t.height===e.height}const r_=Me(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},S])=>{const x=J(0),T=J(0),P=J(Yg),O=J({height:0,width:0}),k=J({height:0,width:0}),D=Te(),L=Te(),A=J(0),j=J(null),F=J({row:0,column:0}),_=Te(),M=Te(),N=J(!1),z=J(0),q=J(!0),C=J(!1);De(U(p,be(z),fe(([I,V])=>!!V)),()=>{ve(q,!1),ve(T,0)}),De(U(rt(p,q,k,O,z,C),fe(([I,V,H,K,,X])=>I&&!V&&H.height!==0&&K.height!==0&&!X)),([,,,,I])=>{ve(C,!0),_c(1,()=>{ve(D,I)}),Jt(U(r),()=>{ve(n,[0,0]),ve(q,!0)})}),ae(U(M,fe(I=>I!=null&&I.scrollTop>0),Qt(0)),T),De(U(p,be(M),fe(([,I])=>I!=null)),([,I])=>{I&&(ve(O,I.viewport),ve(k,I==null?void 0:I.item),ve(F,I.gap),I.scrollTop>0&&(ve(N,!0),Jt(U(r,Gr(1)),V=>{ve(N,!1)}),ve(s,{top:I.scrollTop})))}),ae(U(O,ne(({height:I})=>I)),o),ae(U(rt(he(O,Ms),he(k,Ms),he(F,(I,V)=>I&&I.column===V.column&&I.row===V.row),he(r)),ne(([I,V,H,K])=>({viewport:I,item:V,gap:H,scrollTop:K}))),_),ae(U(rt(he(x),e,he(F,n_),he(k,Ms),he(O,Ms),he(j),he(T),he(N),he(q),he(z)),fe(([,,,,,,,I])=>!I),ne(([I,[V,H],K,X,le,B,ke,,He,Xe])=>{const{row:se,column:Ae}=K,{height:Se,width:Ce}=X,{width:me}=le;if(ke===0&&(I===0||me===0))return Yg;if(Ce===0){const nt=Pc(Xe,I),cn=nt===0?Math.max(ke-1,0):nt;return t_(Qg(nt,cn,B))}const Pe=ty(me,Ce,Ae);let tt,Tt;He?V===0&&H===0&&ke>0?(tt=0,Tt=ke-1):(tt=Pe*Ds((V+se)/(Se+se)),Tt=Pe*Jg((H+se)/(Se+se))-1,Tt=Mc(I-1,ti(Tt,Pe-1)),tt=Mc(Tt,ti(0,tt))):(tt=0,Tt=-1);const Z=Qg(tt,Tt,B),{top:oe,bottom:Fe}=ey(le,K,X,Z),Ke=Jg(I/Pe),ln=Ke*Se+(Ke-1)*se-Fe;return{items:Z,offsetTop:oe,offsetBottom:ln,top:oe,bottom:Fe,itemHeight:Se,itemWidth:Ce}})),P),ae(U(j,fe(I=>I!==null),ne(I=>I.length)),x),ae(U(rt(O,k,P,F),fe(([I,V,{items:H}])=>H.length>0&&V.height!==0&&I.height!==0),ne(([I,V,{items:H},K])=>{const{top:X,bottom:le}=ey(I,K,V,H);return[X,le]}),We(ei)),n);const $=J(!1);ae(U(r,be($),ne(([I,V])=>V||I!==0)),$);const Y=Rt(U(he(P),fe(({items:I})=>I.length>0),be(x,$),fe(([{items:I},V,H])=>H&&I[I.length-1].index===V-1),ne(([,I])=>I-1),We())),re=Rt(U(he(P),fe(({items:I})=>I.length>0&&I[0].index===0),Qt(0),We())),ee=Rt(U(he(P),be(N),fe(([{items:I},V])=>I.length>0&&!V),ne(([{items:I}])=>({startIndex:I[0].index,endIndex:I[I.length-1].index})),We(Mg),Bn(0)));ae(ee,d.scrollSeekRangeChanged),ae(U(D,be(O,k,x,F),ne(([I,V,H,K,X])=>{const le=Ig(I),{align:B,behavior:ke,offset:He}=le;let Xe=le.index;Xe==="LAST"&&(Xe=K-1),Xe=ti(0,Xe,Mc(K-1,Xe));let se=Rc(V,X,H,Xe);return B==="end"?se=Xg(se-V.height+H.height):B==="center"&&(se=Xg(se-V.height/2+H.height/2)),He&&(se+=He),{top:se,behavior:ke}})),s);const W=bt(U(P,ne(I=>I.offsetBottom+I.bottom)),0);return ae(U(m,ne(I=>({width:I.visibleWidth,height:I.visibleHeight}))),O),{data:j,totalCount:x,viewportDimensions:O,itemDimensions:k,scrollTop:r,scrollHeight:L,overscan:t,scrollBy:i,scrollTo:s,scrollToIndex:D,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:A,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:T,gap:F,restoreStateFrom:M,...d,initialTopMostItemIndex:z,gridState:P,totalListHeight:W,...f,startReached:re,endReached:Y,rangeChanged:ee,stateChanged:_,propsReady:h,stateRestoreInProgress:N,...S}},ze(Oc,xt,Jo,$g,Hn,kc,zn));function ey(t,e,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=Rc(t,e,n,r[0].index),s=Rc(t,e,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function Rc(t,e,n,r){const o=ty(t.width,n.width,e.column),i=Ds(r/o),s=i*n.height+ti(0,i-1)*e.row;return s>0?s+e.row:s}function ty(t,e,n){return ti(1,Ds((t+n)/(Ds(e)+n)))}const o_=Me(([t,e])=>({...t,...e}),ze(r_,Me(()=>{const t=J(c=>`Item ${c}`),e=J({}),n=J(null),r=J("virtuoso-grid-item"),o=J("virtuoso-grid-list"),i=J(Kg),s=J("div"),a=J(Uo),l=(c,u=null)=>bt(U(e,ne(f=>f[c]),We()),u);return{context:n,itemContent:t,components:e,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),i_=w.memo(function(){const e=Ge("gridState"),n=Ge("listClassName"),r=Ge("itemClassName"),o=Ge("itemContent"),i=Ge("computeItemKey"),s=Ge("isSeeking"),a=Ut("scrollHeight"),l=Ge("ItemComponent"),c=Ge("ListComponent"),u=Ge("ScrollSeekPlaceholder"),f=Ge("context"),d=Ut("itemDimensions"),h=Ut("gap"),p=Ge("log"),m=Ge("stateRestoreInProgress"),y=cr(v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:S,height:x}=g.getBoundingClientRect();d({width:S,height:x})}h({row:ry("row-gap",getComputedStyle(v).rowGap,p),column:ry("column-gap",getComputedStyle(v).columnGap,p)})});return m?null:w.createElement(c,{ref:y,className:n,...Pt(c,f),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-testid":"virtuoso-item-list"},e.items.map(v=>{const b=i(v.index,v.data,f);return s?w.createElement(u,{key:b,...Pt(u,f),index:v.index,height:e.itemHeight,width:e.itemWidth}):w.createElement(l,{...Pt(l,f),className:r,"data-index":v.index,key:b},o(v.index,v.data,f))}))}),s_=w.memo(function(){const e=Ge("HeaderComponent"),n=Ut("headerHeight"),r=Ge("headerFooterTag"),o=cr(s=>n(Wn(s,"height"))),i=Ge("context");return e?w.createElement(r,{ref:o},w.createElement(e,Pt(e,i))):null}),a_=w.memo(function(){const e=Ge("FooterComponent"),n=Ut("footerHeight"),r=Ge("headerFooterTag"),o=cr(s=>n(Wn(s,"height"))),i=Ge("context");return e?w.createElement(r,{ref:o},w.createElement(e,Pt(e,i))):null}),l_=({children:t})=>{const e=w.useContext(Gg),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=cr(i=>{r(i.getBoundingClientRect())});return w.useEffect(()=>{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),w.createElement("div",{style:ks(),ref:o},t)},c_=({children:t})=>{const e=w.useContext(Gg),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=Ge("customScrollParent"),i=Hg(n,o);return w.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),w.createElement("div",{ref:i,style:ks()},t)},u_=w.memo(function({...e}){const n=Ge("useWindowScroll"),r=Ge("customScrollParent"),o=r||n?d_:f_,i=r||n?c_:l_;return w.createElement(o,{...e},w.createElement(i,null,w.createElement(s_,null),w.createElement(i_,null),w.createElement(a_,null)))}),{Component:Sk,usePublisher:Ut,useEmitterValue:Ge,useEmitter:ny}=yg(o_,{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"}},u_),f_=Zg({usePublisher:Ut,useEmitterValue:Ge,useEmitter:ny}),d_=qg({usePublisher:Ut,useEmitterValue:Ge,useEmitter:ny});function ry(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,$t.WARN),e==="normal"?0:parseInt(e??"0",10)}const h_=Me(([t,e])=>({...t,...e}),ze(XA,Me(()=>{const t=J(l=>w.createElement("td",null,"Item $",l)),e=J(null),n=J(null),r=J(null),o=J({}),i=J(Kg),s=J(Uo),a=(l,c=null)=>bt(U(o,ne(u=>u[l]),We()),c);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),p_=({height:t})=>w.createElement("tr",null,w.createElement("td",{style:{height:t}})),m_=({height:t})=>w.createElement("tr",null,w.createElement("td",{style:{height:t,padding:0,border:0}})),g_={overflowAnchor:"none"},y_=w.memo(function(){const e=Re("listState"),n=Gt("sizeRanges"),r=Re("useWindowScroll"),o=Re("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,l=Re("itemContent"),c=Re("trackItemSizes"),u=Re("itemSize"),f=Re("log"),{callbackRef:d,ref:h}=yA(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);Fc("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const y=Re("EmptyPlaceholder"),v=Re("ScrollSeekPlaceholder")||p_,b=Re("FillerRow")||m_,g=Re("TableBodyComponent"),S=Re("TableRowComponent"),x=Re("computeItemKey"),T=Re("isSeeking"),P=Re("paddingTopAddition"),O=Re("firstItemIndex"),k=Re("statefulTotalCount"),D=Re("context");if(k===0&&y)return w.createElement(y,Pt(y,D));const L=e.offsetTop+P+p,A=e.offsetBottom,j=L>0?w.createElement(b,{height:L,key:"padding-top",context:D}):null,F=A>0?w.createElement(b,{height:A,key:"padding-bottom",context:D}):null,_=e.items.map(M=>{const N=M.originalIndex,z=x(N+O,M.data,D);return T?w.createElement(v,{...Pt(v,D),key:z,index:M.index,height:M.size,type:M.type||"item"}):w.createElement(S,{...Pt(S,D),...QA(S,M.data),key:z,"data-index":N,"data-known-size":M.size,"data-item-index":M.index,style:g_},l(M.index,M.data,D))});return w.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...Pt(g,D)},[j,..._,F])}),v_=({children:t})=>{const e=w.useContext(Ug),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=cr(ws(n,i=>Wn(i,"height")));return w.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),w.createElement("div",{style:ks(),ref:o,"data-viewport-type":"element"},t)},b_=({children:t})=>{const e=w.useContext(Ug),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Re("customScrollParent"),i=Hg(n,o);return w.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),w.createElement("div",{ref:i,style:ks(),"data-viewport-type":"window"},t)},x_=w.memo(function(e){const n=Re("useWindowScroll"),r=Re("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Re("fixedHeaderContent"),a=Re("fixedFooterContent"),l=Re("context"),c=cr(ws(o,b=>Wn(b,"height"))),u=cr(ws(i,b=>Wn(b,"height"))),f=r||n?T_:S_,d=r||n?b_:v_,h=Re("TableComponent"),p=Re("TableHeadComponent"),m=Re("TableFooterComponent"),y=s?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Pt(p,l)},s()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Pt(m,l)},a()):null;return w.createElement(f,{...e},w.createElement(d,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Pt(h,l)},[y,w.createElement(y_,{key:"TableBody"}),v])))}),{Component:w_,usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}=yg(h_,{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"}},x_),S_=Zg({usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}),T_=qg({usePublisher:Gt,useEmitterValue:Re,useEmitter:Fc}),E_=w_;var C_=Error,A_=EvalError,__=RangeError,P_=ReferenceError,oy=SyntaxError,ni=TypeError,O_=URIError,I_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},iy=typeof Symbol<"u"&&Symbol,k_=I_,D_=function(){return typeof iy!="function"||typeof Symbol!="function"||typeof iy("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:k_()},Lc={__proto__:null,foo:{}},M_=Object,R_=function(){return{__proto__:Lc}.foo===Lc.foo&&!(Lc instanceof M_)},F_="Function.prototype.bind called on incompatible ",L_=Object.prototype.toString,N_=Math.max,V_="[object Function]",sy=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},$_=function(e,n){for(var r=[],o=n,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},j_=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},B_=function(e){var n=this;if(typeof n!="function"||L_.apply(n)!==V_)throw new TypeError(F_+n);for(var r=$_(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,sy(r,arguments));return Object(u)===u?u:this}return n.apply(e,sy(r,arguments))},s=N_(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+j_(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},z_=B_,Nc=Function.prototype.bind||z_,W_=Function.prototype.call,H_=Object.prototype.hasOwnProperty,U_=Nc,G_=U_.call(W_,H_),we,K_=C_,Z_=A_,q_=__,Y_=P_,Zr=oy,qr=ni,X_=O_,ay=Function,Vc=function(t){try{return ay('"use strict"; return ('+t+").constructor;")()}catch{}},dr=Object.getOwnPropertyDescriptor;if(dr)try{dr({},"")}catch{dr=null}var $c=function(){throw new qr},J_=dr?function(){try{return arguments.callee,$c}catch{try{return dr(arguments,"callee").get}catch{return $c}}}():$c,Yr=D_(),Q_=R_(),ot=Object.getPrototypeOf||(Q_?function(t){return t.__proto__}:null),Xr={},eP=typeof Uint8Array>"u"||!ot?we:ot(Uint8Array),hr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Yr&&ot?ot([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":Xr,"%AsyncGenerator%":Xr,"%AsyncGeneratorFunction%":Xr,"%AsyncIteratorPrototype%":Xr,"%Atomics%":typeof Atomics>"u"?we:Atomics,"%BigInt%":typeof BigInt>"u"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":K_,"%eval%":eval,"%EvalError%":Z_,"%Float32Array%":typeof Float32Array>"u"?we:Float32Array,"%Float64Array%":typeof Float64Array>"u"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?we:FinalizationRegistry,"%Function%":ay,"%GeneratorFunction%":Xr,"%Int8Array%":typeof Int8Array>"u"?we:Int8Array,"%Int16Array%":typeof Int16Array>"u"?we:Int16Array,"%Int32Array%":typeof Int32Array>"u"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yr&&ot?ot(ot([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map>"u"?we:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Yr||!ot?we:ot(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?we:Promise,"%Proxy%":typeof Proxy>"u"?we:Proxy,"%RangeError%":q_,"%ReferenceError%":Y_,"%Reflect%":typeof Reflect>"u"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?we:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Yr||!ot?we:ot(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yr&&ot?ot(""[Symbol.iterator]()):we,"%Symbol%":Yr?Symbol:we,"%SyntaxError%":Zr,"%ThrowTypeError%":J_,"%TypedArray%":eP,"%TypeError%":qr,"%Uint8Array%":typeof Uint8Array>"u"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?we:Uint32Array,"%URIError%":X_,"%WeakMap%":typeof WeakMap>"u"?we:WeakMap,"%WeakRef%":typeof WeakRef>"u"?we:WeakRef,"%WeakSet%":typeof WeakSet>"u"?we:WeakSet};if(ot)try{null.error}catch(t){var tP=ot(ot(t));hr["%Error.prototype%"]=tP}var nP=function t(e){var n;if(e==="%AsyncFunction%")n=Vc("async function () {}");else if(e==="%GeneratorFunction%")n=Vc("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Vc("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&ot&&(n=ot(o.prototype))}return hr[e]=n,n},ly={__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"]},ri=Nc,Rs=G_,rP=ri.call(Function.call,Array.prototype.concat),oP=ri.call(Function.apply,Array.prototype.splice),cy=ri.call(Function.call,String.prototype.replace),Fs=ri.call(Function.call,String.prototype.slice),iP=ri.call(Function.call,RegExp.prototype.exec),sP=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,aP=/\\(\\)?/g,lP=function(e){var n=Fs(e,0,1),r=Fs(e,-1);if(n==="%"&&r!=="%")throw new Zr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Zr("invalid intrinsic syntax, expected opening `%`");var o=[];return cy(e,sP,function(i,s,a,l){o[o.length]=a?cy(l,aP,"$1"):s||i}),o},cP=function(e,n){var r=e,o;if(Rs(ly,r)&&(o=ly[r],r="%"+o[0]+"%"),Rs(hr,r)){var i=hr[r];if(i===Xr&&(i=nP(r)),typeof i>"u"&&!n)throw new qr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Zr("intrinsic "+e+" does not exist!")},Jr=function(e,n){if(typeof e!="string"||e.length===0)throw new qr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new qr('"allowMissing" argument must be a boolean');if(iP(/^%?[^%]*%?$/,e)===null)throw new Zr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=lP(e),o=r.length>0?r[0]:"",i=cP("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],oP(r,rP([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Fs(d,0,1),p=Fs(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new Zr("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,s="%"+o+"%",Rs(hr,s))a=hr[s];else if(a!=null){if(!(d in a)){if(!n)throw new qr("base intrinsic for "+e+" exists, but the property is not available.");return}if(dr&&u+1>=r.length){var m=dr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Rs(a,d),a=a[d];f&&!l&&(hr[s]=a)}}return a},uy={exports:{}},jc,fy;function Bc(){if(fy)return jc;fy=1;var t=Jr,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return jc=e,jc}var uP=Jr,Ls=uP("%Object.getOwnPropertyDescriptor%",!0);if(Ls)try{Ls([],"length")}catch{Ls=null}var dy=Ls,hy=Bc(),fP=oy,Qr=ni,py=dy,dP=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Qr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Qr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!py&&py(e,n);if(hy)hy(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[n]=r;else throw new fP("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},zc=Bc(),my=function(){return!!zc};my.hasArrayLengthDefineBug=function(){if(!zc)return null;try{return zc([],"length",{value:1}).length!==1}catch{return!0}};var hP=my,pP=Jr,gy=dP,mP=hP(),yy=dy,vy=ni,gP=pP("%Math.floor%"),yP=function(e,n){if(typeof e!="function")throw new vy("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||gP(n)!==n)throw new vy("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&yy){var s=yy(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(mP?gy(e,"length",n,!0,!0):gy(e,"length",n)),e};(function(t){var e=Nc,n=Jr,r=yP,o=ni,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||e.call(s,i),l=Bc(),c=n("%Math.max%");t.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(e,s,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:u}):t.exports.apply=u})(uy);var vP=uy.exports,by=Jr,xy=vP,bP=xy(by("String.prototype.indexOf")),xP=function(e,n){var r=by(e,!!n);return typeof r=="function"&&bP(e,".prototype.")>-1?xy(r):r};const wP=Nx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Wc=typeof Map=="function"&&Map.prototype,Hc=Object.getOwnPropertyDescriptor&&Wc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ns=Wc&&Hc&&typeof Hc.get=="function"?Hc.get:null,wy=Wc&&Map.prototype.forEach,Uc=typeof Set=="function"&&Set.prototype,Gc=Object.getOwnPropertyDescriptor&&Uc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Vs=Uc&&Gc&&typeof Gc.get=="function"?Gc.get:null,Sy=Uc&&Set.prototype.forEach,SP=typeof WeakMap=="function"&&WeakMap.prototype,oi=SP?WeakMap.prototype.has:null,TP=typeof WeakSet=="function"&&WeakSet.prototype,ii=TP?WeakSet.prototype.has:null,EP=typeof WeakRef=="function"&&WeakRef.prototype,Ty=EP?WeakRef.prototype.deref:null,CP=Boolean.prototype.valueOf,AP=Object.prototype.toString,_P=Function.prototype.toString,PP=String.prototype.match,Kc=String.prototype.slice,Un=String.prototype.replace,OP=String.prototype.toUpperCase,Ey=String.prototype.toLowerCase,Cy=RegExp.prototype.test,Ay=Array.prototype.concat,nn=Array.prototype.join,IP=Array.prototype.slice,_y=Math.floor,Zc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qc=Object.getOwnPropertySymbols,Yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,eo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===eo||!0)?Symbol.toStringTag:null,Py=Object.prototype.propertyIsEnumerable,Oy=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Iy(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Cy.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-_y(-t):_y(t);if(r!==t){var o=String(r),i=Kc.call(e,o.length+1);return Un.call(o,n,"$&_")+"."+Un.call(Un.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Un.call(e,n,"$&_")}var Xc=wP,ky=Xc.custom,Dy=Fy(ky)?ky:null,kP=function t(e,n,r,o){var i=n||{};if(Gn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Gn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Gn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Gn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Gn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ny(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Iy(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?Iy(e,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof e=="object")return Jc(e)?"[Array]":"[Object]";var f=qP(i,r);if(typeof o>"u")o=[];else if(Ly(o,e)>=0)return"[Circular]";function d(j,F,_){if(F&&(o=IP.call(o),o.push(F)),_){var M={depth:i.depth};return Gn(i,"quoteStyle")&&(M.quoteStyle=i.quoteStyle),t(j,M,r+1,o)}return t(j,i,r+1,o)}if(typeof e=="function"&&!Ry(e)){var h=jP(e),p=$s(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+nn.call(p,", ")+" }":"")}if(Fy(e)){var m=eo?Un.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Yc.call(e);return typeof e=="object"&&!eo?si(m):m}if(GP(e)){for(var y="<"+Ey.call(String(e.nodeName)),v=e.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+My(DP(v[b].value),"double",i);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+Ey.call(String(e.nodeName))+">",y}if(Jc(e)){if(e.length===0)return"[]";var g=$s(e,d);return f&&!ZP(g)?"["+eu(g,f)+"]":"[ "+nn.call(g,", ")+" ]"}if(RP(e)){var S=$s(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Py.call(e,"cause")?"{ ["+String(e)+"] "+nn.call(Ay.call("[cause]: "+d(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+nn.call(S,", ")+" }"}if(typeof e=="object"&&s){if(Dy&&typeof e[Dy]=="function"&&Xc)return Xc(e,{depth:u-r});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(BP(e)){var x=[];return wy&&wy.call(e,function(j,F){x.push(d(F,e,!0)+" => "+d(j,e))}),Vy("Map",Ns.call(e),x,f)}if(HP(e)){var T=[];return Sy&&Sy.call(e,function(j){T.push(d(j,e))}),Vy("Set",Vs.call(e),T,f)}if(zP(e))return Qc("WeakMap");if(UP(e))return Qc("WeakSet");if(WP(e))return Qc("WeakRef");if(LP(e))return si(d(Number(e)));if(VP(e))return si(d(Zc.call(e)));if(NP(e))return si(CP.call(e));if(FP(e))return si(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof bd<"u"&&e===bd)return"{ [object globalThis] }";if(!MP(e)&&!Ry(e)){var P=$s(e,d),O=Oy?Oy(e)===Object.prototype:e instanceof Object||e.constructor===Object,k=e instanceof Object?"":"null prototype",D=!O&&gt&&Object(e)===e&&gt in e?Kc.call(Kn(e),8,-1):k?"Object":"",L=O||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",A=L+(D||k?"["+nn.call(Ay.call([],D||[],k||[]),": ")+"] ":"");return P.length===0?A+"{}":f?A+"{"+eu(P,f)+"}":A+"{ "+nn.call(P,", ")+" }"}return String(e)};function My(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function DP(t){return Un.call(String(t),/"/g,"&quot;")}function Jc(t){return Kn(t)==="[object Array]"&&(!gt||!(typeof t=="object"&&gt in t))}function MP(t){return Kn(t)==="[object Date]"&&(!gt||!(typeof t=="object"&&gt in t))}function Ry(t){return Kn(t)==="[object RegExp]"&&(!gt||!(typeof t=="object"&&gt in t))}function RP(t){return Kn(t)==="[object Error]"&&(!gt||!(typeof t=="object"&&gt in t))}function FP(t){return Kn(t)==="[object String]"&&(!gt||!(typeof t=="object"&&gt in t))}function LP(t){return Kn(t)==="[object Number]"&&(!gt||!(typeof t=="object"&&gt in t))}function NP(t){return Kn(t)==="[object Boolean]"&&(!gt||!(typeof t=="object"&&gt in t))}function Fy(t){if(eo)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Yc)return!1;try{return Yc.call(t),!0}catch{}return!1}function VP(t){if(!t||typeof t!="object"||!Zc)return!1;try{return Zc.call(t),!0}catch{}return!1}var $P=Object.prototype.hasOwnProperty||function(t){return t in this};function Gn(t,e){return $P.call(t,e)}function Kn(t){return AP.call(t)}function jP(t){if(t.name)return t.name;var e=PP.call(_P.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Ly(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function BP(t){if(!Ns||!t||typeof t!="object")return!1;try{Ns.call(t);try{Vs.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function zP(t){if(!oi||!t||typeof t!="object")return!1;try{oi.call(t,oi);try{ii.call(t,ii)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function WP(t){if(!Ty||!t||typeof t!="object")return!1;try{return Ty.call(t),!0}catch{}return!1}function HP(t){if(!Vs||!t||typeof t!="object")return!1;try{Vs.call(t);try{Ns.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function UP(t){if(!ii||!t||typeof t!="object")return!1;try{ii.call(t,ii);try{oi.call(t,oi)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function GP(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ny(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ny(Kc.call(t,0,e.maxStringLength),e)+r}var o=Un.call(Un.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,KP);return My(o,"single",e)}function KP(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+OP.call(e.toString(16))}function si(t){return"Object("+t+")"}function Qc(t){return t+" { ? }"}function Vy(t,e,n,r){var o=r?eu(n,r):nn.call(n,", ");return t+" ("+e+") {"+o+"}"}function ZP(t){for(var e=0;e<t.length;e++)if(Ly(t[e],`
116
- `)>=0)return!1;return!0}function qP(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=nn.call(Array(t.indent+1)," ");else return null;return{base:n,prev:nn.call(Array(e+1),n)}}function eu(t,e){if(t.length===0)return"";var n=`
117
- `+e.prev+e.base;return n+nn.call(t,","+n)+`
118
- `+e.prev}function $s(t,e){var n=Jc(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=Gn(t,o)?e(t[o],t):""}var i=typeof qc=="function"?qc(t):[],s;if(eo){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in t)Gn(t,l)&&(n&&String(Number(l))===l&&l<t.length||eo&&s["$"+l]instanceof Symbol||(Cy.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if(typeof qc=="function")for(var c=0;c<i.length;c++)Py.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}var $y=Jr,to=xP,YP=kP,XP=ni,js=$y("%WeakMap%",!0),Bs=$y("%Map%",!0),JP=to("WeakMap.prototype.get",!0),QP=to("WeakMap.prototype.set",!0),eO=to("WeakMap.prototype.has",!0),tO=to("Map.prototype.get",!0),nO=to("Map.prototype.set",!0),rO=to("Map.prototype.has",!0),tu=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},oO=function(t,e){var n=tu(t,e);return n&&n.value},iO=function(t,e,n){var r=tu(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},sO=function(t,e){return!!tu(t,e)},aO=function(){var e,n,r,o={assert:function(i){if(!o.has(i))throw new XP("Side channel does not contain "+YP(i))},get:function(i){if(js&&i&&(typeof i=="object"||typeof i=="function")){if(e)return JP(e,i)}else if(Bs){if(n)return tO(n,i)}else if(r)return oO(r,i)},has:function(i){if(js&&i&&(typeof i=="object"||typeof i=="function")){if(e)return eO(e,i)}else if(Bs){if(n)return rO(n,i)}else if(r)return sO(r,i);return!1},set:function(i,s){js&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new js),QP(e,i,s)):Bs?(n||(n=new Bs),nO(n,i,s)):(r||(r={key:{},next:null}),iO(r,i,s))}};return o},lO=String.prototype.replace,cO=/%20/g,nu={RFC1738:"RFC1738",RFC3986:"RFC3986"},jy={default:nu.RFC3986,formatters:{RFC1738:function(t){return lO.call(t,cO,"+")},RFC3986:function(t){return String(t)}},RFC1738:nu.RFC1738,RFC3986:nu.RFC3986},uO=jy,ru=Object.prototype.hasOwnProperty,pr=Array.isArray,rn=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),fO=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(pr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},By=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},dO=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(pr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!ru.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return pr(e)&&!pr(n)&&(o=By(e,r)),pr(e)&&pr(n)?(n.forEach(function(i,s){if(ru.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return ru.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},hO=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},pO=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},mO=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var c=s.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===uO.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+rn[c];continue}if(c<2048){a=a+(rn[192|c>>6]+rn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(rn[224|c>>12]+rn[128|c>>6&63]+rn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=rn[240|c>>18]+rn[128|c>>12&63]+rn[128|c>>6&63]+rn[128|c&63]}return a},gO=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return fO(n),e},yO=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},vO=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},bO=function(e,n){return[].concat(e,n)},xO=function(e,n){if(pr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},zy={arrayToObject:By,assign:hO,combine:bO,compact:gO,decode:pO,encode:mO,isBuffer:vO,isRegExp:yO,maybeMap:xO,merge:dO},wO=zy,Wy=jy,SO=Date.prototype.toISOString,Hy=Wy.default;wO.encode,Wy.formatters[Hy];var TO=zy;TO.decode;var Uy=t=>Array.isArray(t),ou=t=>t===void 0,iu=t=>t===null,EO=Function.bind.call(Function.call,Object.prototype.toString),CO=t=>!!t&&EO(t)==="[object Error]"||t instanceof Error,Gy=(t,e)=>t instanceof e,AO=t=>{const e=typeof t;return e==="undefined"||e===null||e==="number"||e==="string"||e==="boolean"||e==="bigint"},_O=t=>Object.prototype.toString.call(t)==="[object Date]"&&Gy(t,Date),zs={array:Uy,date:_O,empty:t=>iu(t)||ou(t)?!0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t==="":Array.isArray(t)?t.length===0:Number.isNaN(t),function:t=>typeof t=="function",instance:Gy,isError:CO,keyof:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nan:t=>Number.isNaN(t),nil:t=>iu(t)||ou(t),null:iu,number:t=>typeof t=="number"||!Number.isNaN(t),object:t=>!Uy(t)&&typeof t=="object",primitive:AO,string:t=>typeof t=="string",undefined:ou},su=(t,e,n)=>{const[r,...o]=e;if(o.length>0){if(!t[r]){const i=`${+o[0]}`===o[0];t[r]=i?[]:{}}if(typeof t[r]!="object"){const i=`${+o[0]}`===o[0];t[r]=su(i?[]:{},o,n)}else t[r]=su(t[r],o,n)}else t[r]=n;return t},PO=t=>Object.keys(t),OO=t=>t.replace("[",".").replace("]","").split("."),Ky=(t,e,n)=>{const r=Array.isArray(e)?e:OO(e),o=structuredClone(t);return su(o,r,n),o},au={},lu={exports:{}},cu={};/**
118
+ `),()=>{document.head.removeChild(u)}},[e]),E.jsx(x_,{isPresent:e,childRef:r,sizeRef:o,children:F.cloneElement(t,{ref:r})})}const Vc=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=ir(S_),l=x.useId(),c=x.useMemo(()=>({id:l,initial:e,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?[Math.random()]:[n]);return x.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),F.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(t=E.jsx(w_,{isPresent:n,children:t})),E.jsx(ss.Provider,{value:c,children:t})};function S_(){return new Map}function T_(t){return x.useEffect(()=>()=>t(),[])}const fr=t=>t.key||"";function E_(t,e){t.forEach(n=>{const r=fr(n);e.set(r,n)})}function C_(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const Ng=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Wt(!o,"Replace exitBeforeEnter with mode='wait'");const a=x.useContext(Vo).forceRender||Lg()[0],l=Rg(),c=C_(t);let u=c;const f=x.useRef(new Map).current,d=x.useRef(u),h=x.useRef(new Map).current,p=x.useRef(!0);if(as(()=>{p.current=!1,E_(c,h),d.current=u}),T_(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return E.jsx(E.Fragment,{children:u.map(b=>E.jsx(Vc,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:b},fr(b)))});u=[...u];const m=d.current.map(fr),y=c.map(fr),v=m.length;for(let b=0;b<v;b++){const g=m[b];y.indexOf(g)===-1&&!f.has(g)&&f.set(g,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((b,g)=>{if(y.indexOf(g)!==-1)return;const S=h.get(g);if(!S)return;const w=m.indexOf(g);let T=b;if(!T){const P=()=>{f.delete(g);const O=Array.from(h.keys()).filter(k=>!y.includes(k));if(O.forEach(k=>h.delete(k)),d.current=c.filter(k=>{const D=fr(k);return D===g||O.includes(D)}),!f.size){if(l.current===!1)return;a(),r&&r()}};T=E.jsx(Vc,{isPresent:!1,onExitComplete:P,custom:e,presenceAffectsLayout:i,mode:s,children:S},fr(S)),f.set(g,T)}u.splice(w,0,T)}),u=u.map(b=>{const g=b.key;return f.has(g)?b:E.jsx(Vc,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:b},fr(b))}),process.env.NODE_ENV!=="production"&&s==="wait"&&u.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),E.jsx(E.Fragment,{children:f.size?u:u.map(b=>x.cloneElement(b))})},A_=x.createContext(null),__=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Vg(){const t=new Set,e=new WeakMap,n=()=>t.forEach(__);return{add:r=>{t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:r=>{t.delete(r);const o=e.get(r);o&&(o(),e.delete(r)),n()},dirty:n}}const $g=t=>t===!0,P_=t=>$g(t===!0)||t==="id",O_=({children:t,id:e,inherit:n=!0})=>{const r=x.useContext(Vo),o=x.useContext(A_),[i,s]=Lg(),a=x.useRef(null),l=r.id||o;a.current===null&&(P_(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:$g(n)&&r.group||Vg()});const c=x.useMemo(()=>({...a.current,forceRender:i}),[s]);return E.jsx(Vo.Provider,{value:c,children:t})},jg=x.createContext(null);function I_(t,e,n,r){if(!r)return t;const o=t.findIndex(u=>u.value===e);if(o===-1)return t;const i=r>0?1:-1,s=t[o+i];if(!s)return t;const a=t[o],l=s.layout,c=Be(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?JE(t,o,o+i):t}function k_({children:t,as:e="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=ir(()=>Nc(e)),l=[],c=x.useRef(!1);Wt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const h=l.findIndex(p=>f===p.value);h!==-1?l[h].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(F_)},updateOrder:(f,d,h)=>{if(c.current)return;const p=I_(l,f,d,h);l!==p&&(c.current=!0,r(p.map(M_).filter(m=>o.indexOf(m)!==-1)))}};return x.useEffect(()=>{c.current=!1}),E.jsx(a,{...i,ref:s,ignoreStrict:!0,children:E.jsx(jg.Provider,{value:u,children:t})})}const D_=x.forwardRef(k_);function M_(t){return t.value}function F_(t,e){return t.layout.min-e.layout.min}function $c(t){const e=ir(()=>Zr(t)),{isStatic:n}=x.useContext(os);if(n){const[,r]=x.useState(t);x.useEffect(()=>e.on("change",r),[])}return e}const R_=t=>t&&typeof t=="object"&&t.mix,L_=t=>R_(t)?t.mix:void 0;function N_(...t){const e=!Array.isArray(t[0]),n=e?0:-1,r=t[0+n],o=t[1+n],i=t[2+n],s=t[3+n],a=Sm(o,i,{mixer:L_(i[0]),...s});return e?a(r):a}function Bg(t,e){const n=$c(e()),r=()=>n.set(e());return r(),as(()=>{const o=()=>_e.preRender(r,!1,!0),i=t.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),Qt(r)}}),n}function V_(t){Zo.current=[],t();const e=Bg(Zo.current,t);return Zo.current=void 0,e}function $_(t,e,n,r){if(typeof t=="function")return V_(t);const o=typeof e=="function"?e:N_(e,n,r);return Array.isArray(t)?zg(t,o):zg([t],([i])=>o(i))}function zg(t,e){const n=ir(()=>[]);return Bg(t,()=>{n.length=0;const r=t.length;for(let o=0;o<r;o++)n[o]=t[o].get();return e(n)})}function Wg(t,e=0){return ct(t)?t:$c(e)}function j_({children:t,style:e={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=ir(()=>Nc(r)),c=x.useContext(jg),u={x:Wg(e.x),y:Wg(e.y)},f=$_([u.x,u.y],([m,y])=>m||y?1:"unset");Wt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:h,updateOrder:p}=c;return E.jsx(l,{drag:d,...s,dragSnapToOrigin:!0,style:{...e,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,y)=>{const{velocity:v}=y;v[d]&&p(n,u[d].get(),v[d]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:t})}const B_=x.forwardRef(j_),_s={Group:D_,Item:B_};class z_{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(r=>{r.start(e.nativeEvent||e,n)})}}const W_=()=>new z_;function H_(){return ir(W_)}var U_=Object.defineProperty,Hg=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,K_=Object.prototype.propertyIsEnumerable,Ug=(t,e,n)=>e in t?U_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z_=(t,e)=>{for(var n in e||(e={}))G_.call(e,n)&&Ug(t,n,e[n]);if(Hg)for(var n of Hg(e))K_.call(e,n)&&Ug(t,n,e[n]);return t},jc=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return!0;return!1},q_=(t,e,n,r)=>Os(jc,t,e,n,r),Xr=t=>typeof t=="object",zn=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(!t||!e||!Xr(t)&&!Xr(e))return t===e;if(t.prototype!==e.prototype)return!1;const n=Object.keys(t);return n.length!==Object.keys(e).length?!1:n.every(r=>zn(t[r],e[r]))},Y_=(t,e)=>(Xr(t)||Array.isArray(t))&&e?t[e]:t,X_=t=>(e,n)=>e[t]===n[t]?0:e[t]>n[t]?1:-1,Ps=t=>/[0-9.]+/.test(t),Gg=t=>["string","number"].includes(typeof t),Kg=t=>t==null||(t==null?void 0:t.length)===0||t==="",Zg={eq:zn,is:Object.is,"!=":(t,e)=>t!=e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"==":(t,e)=>t==e,"===":(t,e)=>t===e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,includes:(t,e)=>`${t}`.includes(e),notIncludes:(t,e)=>!`${t}`.includes(e),startsWith:(t,e)=>`${t}`.startsWith(e),endsWith:(t,e)=>`${t}`.endsWith(e),like:(t,e)=>new RegExp(`.*${e}.*`,"gi").test(`${t}`),alphabetical:(t,e)=>t.toString().localeCompare(e.toString()),empty:Kg,notEmpty:t=>!Kg(t),in:(t,e)=>jc(e,n=>zn(t,n)),notIn:(t,e)=>qg(e,n=>!zn(t,n))},J_=t=>{if(t in Zg)return Zg[t];throw new Error("Linq - Symbol not found")},Jr=(t,e)=>{const n=[],r=t.length;for(let o=0;o<r;o++)e(t[o],o,t)&&n.push(t[o]);return n},Os=(t,e,n,r,o)=>{if(typeof n=="function")return t(e,n);const i=J_(r);return n&&r&&o!==void 0?t(e,s=>i(s[n],o)):t(e,s=>i(s,o))},Q_=(t,e,n,r)=>Os(Jr,t,e,n,r),qg=(t,e)=>{for(let n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0},eP=(t,e,n,r)=>Os(qg,t,e,n,r),Yg=t=>{if(t===null)return null;const e=Z_({},t);return Object.keys(e).forEach(n=>e[n]=Xr(t[n])?Yg(t[n]):t[n]),Array.isArray(t)&&t.length?(e.length=t.length)&&Array.from(e):Array.isArray(t)?Array.from(t):e},Xg=(t,e)=>{if(Xr(e)){for(let n=0;n<t.length;n++){const r=t[n];if(zn(e,r))return!0}return!1}for(let n=0;n<t.length;n++){const r=t[n];if(zn(e,r))return!0}return!1},tP=(t,e)=>{const n=new Map(t.map(r=>[r[e],r]));return Object.fromEntries(n.entries())},nP=t=>Jr(t,(e,n,r)=>Xr(e)?n===r.findIndex(o=>zn(o,e)):n===r.indexOf(e)),rP=(t,e)=>{const n=t.length;for(let r=0;r<n;r++)if(e(t[r],r,t))return t[r]},Jg=(t,e)=>{const n=new Map;return t.forEach(r=>{const o=e(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},oP=(t,e)=>Jg(t,n=>n[e]),Qg=(t,e)=>{const n=[];let r=0;const o=t.length;for(r;r<o;r++){const i=e(t[r],r,t);n.push(i)}return n},iP=(t,e)=>{let n=Number.parseInt(t,10),r=Number.parseInt(e,10);return n>r?[r,n]:[n,r]},sP=(t,e,n=1)=>{const r=[];let o=t.charCodeAt(0);const i=e.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ps(t)&&Ps(e)?r.map(s=>Number.parseInt(s)):r},Bc=(t,e,n=1)=>{let r=Math.abs(n);if((t.length>1||e.length>1)&&Ps(t)&&Ps(e)){const o=[],[i,s]=iP(t,e);for(let a=i;a<=s;a+=r)o.push(a);return o}return sP(t,e,r)},aP=(t,e,n=1)=>{if(e===void 0){const[r,o,i]=t.split("..");return i===void 0?Bc(r,o,1):Bc(r,i,Number.parseInt(o,10))}return Gg(t)&&Gg(e)?Bc(`${t}`,`${e}`,n):Array.from({length:t},(r,o)=>o*Math.abs(e))},zc=(t,e,n)=>{let r=e;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=t(r,s,i,n)}return r},ey=t=>{const e=Array.from(t.values());let n=null,r=null,o=e.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=e[n];e[n]=e[r],e[r]=i}return e},lP=(t,e)=>{if(typeof e=="number")return t.slice(e);let n=t.length;for(let r=0;r<n;r++){const o=t[r];if(e(o,r,t))return t.slice(r)}return t.slice(0)},cP=(t,e,n,r)=>Os(lP,t,e,n,r),ty=(t,e)=>{const n=[...t];return e===void 0?n.sort():typeof e=="function"?n.toSorted(e):n.toSorted(X_(e))},uP=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),fP=(t,e)=>t.sort(uP(e)),dP=(t,e)=>{if(e===void 0)return[...new Set(t).values()];const n=new Set;return Array.isArray(e)?[...new Set(e)]:Jr(t,r=>{const o=e?n.has(r[e]):n.has(e);return e&&(o||n.add(r[e])),!o})},hP=class Vu{constructor(e=[]){this.array=e}static Range(...e){return aP(...e)}static New(e){return new Vu(e)}Where(e,n,r){return this.array=Q_(this.array,e,n,r),this}Some(e,n,r){return q_(this.array,e,n,r)}All(e,n,r){return eP(this.array,e,n,r)}Reverse(){return this.array=ey(this.array),this}Add(e){return this.array=Array.isArray(e)?this.array.concat(e):this.array.concat([e]),this}Prepend(e){return this.array=Array.isArray(e)?e.concat(this.array):[e].concat(this.array),this}Select(e){return e===void 0?this.array:this.array.map(e)}Take(e,n){return n!==void 0?this.array=this.array.slice(e,Math.max(0,n)):this.array=this.array.slice(e),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(e,n,r){return this.array=cP(this.array,e,n,r),this}Distinct(){return this.array=nP(this.array),this}First(e){return e===void 0?this.array[0]:rP(this.array,e)||null}Last(e){const n=this.array.length;if(e===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(e(this.array[r],r,this.array))return this.array[r]}Sum(e){return e===void 0?zc((n,r)=>n+r,0,this.array):zc((n,r)=>n+Y_(r,e),0,this.array)}Average(e){return this.Sum(e)/this.array.length}GroupBy(e){return oP(this.array,e)}GroupWith(e){return Jg(this.array,e)}Except(e){return Jr(this.array,n=>!Xg(e,n))}Intersect(e){return Jr(this.array,n=>Xg(e,n))}OrderBy(e,n){let r;return r=e?ty(this.array,e):this.array.toSorted(),this.array=n==="desc"?ey(r):r,this}Includes(e){return jc(this.array,n=>zn(n,e))}In(e){const n=e.length;for(let r=0;r<n;r++){const o=e[r];if(this.Includes(o))return!0}return!1}Reduce(e,n){return zc(e,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(e){return new Map(Qg(this.array,n=>[e,n]))}Zip(e,n){return Qg(this.array,(r,o)=>n(r,e[o]))}Count(e){return e===void 0?this.array.length:Jr(this.array,e).length}Get(e){return this.array[e]}Clone(){return new Vu(Yg(this.array))}ToObject(e){return tP(this.array,e)}Sort(e){return Array.isArray(e)?fP(this.array,e):ty(this.array,e)}Unique(e){return dP(this.array,e)}},ny=hP;const Is=0,Wn=1,Qr=2,ry=4;function ks(t,e){return n=>t(e(n))}function pP(t,e){return e(t)}function oy(t,e){return n=>t(e,n)}function iy(t,e){return()=>t(e)}function Ds(t,e){return e(t),t}function ze(...t){return t}function mP(t){t()}function sy(t){return()=>t}function gP(...t){return()=>{t.map(mP)}}function Wc(t){return t!==void 0}function Jo(){}function De(t,e){return t(Wn,e)}function ve(t,e){t(Is,e)}function Hc(t){t(Qr)}function gt(t){return t(ry)}function ae(t,e){return De(t,oy(e,Is))}function en(t,e){const n=t(Wn,r=>{n(),e(r)});return n}function Te(){const t=[];return(e,n)=>{switch(e){case Qr:t.splice(0,t.length);return;case Wn:return t.push(n),()=>{const r=t.indexOf(n);r>-1&&t.splice(r,1)};case Is:t.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${e}`)}}}function J(t){let e=t;const n=Te();return(r,o)=>{switch(r){case Wn:o(e);break;case Is:e=o;break;case ry:return e}return n(r,o)}}function yP(t){let e,n;const r=()=>e&&e();return function(o,i){switch(o){case Wn:return i?n===i?void 0:(r(),n=i,e=De(t,i),e):(r(),Jo);case Qr:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Ft(t){return Ds(Te(),e=>ae(t,e))}function bt(t,e){return Ds(J(e),n=>ae(t,n))}function vP(...t){return e=>t.reduceRight(pP,e)}function U(t,...e){const n=vP(...e);return(r,o)=>{switch(r){case Wn:return De(t,n(o));case Qr:Hc(t);return}}}function ay(t,e){return t===e}function We(t=ay){let e;return n=>r=>{t(e,r)||(e=r,n(r))}}function de(t){return e=>n=>{t(n)&&e(n)}}function ne(t){return e=>ks(e,t)}function tn(t){return e=>()=>e(t)}function nn(t,e){return n=>r=>n(e=t(e,r))}function eo(t){return e=>n=>{t>0?t--:e(n)}}function Hn(t){let e=null,n;return r=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,r(e)},t))}}function ly(t){let e,n;return r=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{r(e)},t)}}function be(...t){const e=new Array(t.length);let n=0,r=null;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{const c=n;n=n|a,e[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(e));n===o?a():r=a}}function cy(...t){return function(e,n){switch(e){case Wn:return gP(...t.map(r=>De(r,n)));case Qr:return;default:throw new Error(`unrecognized action ${e}`)}}}function pe(t,e=ay){return U(t,We(e))}function ot(...t){const e=Te(),n=new Array(t.length);let r=0;const o=Math.pow(2,t.length)-1;return t.forEach((i,s)=>{const a=Math.pow(2,s);De(i,l=>{n[s]=l,r=r|a,r===o&&ve(e,n)})}),function(i,s){switch(i){case Wn:return r===o&&s(n),De(e,s);case Qr:return Hc(e);default:throw new Error(`unrecognized action ${i}`)}}}function Me(t,e=[],{singleton:n}={singleton:!0}){return{id:bP(),constructor:t,dependencies:e,singleton:n}}const bP=()=>Symbol();function xP(t){const e=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&e.has(r))return e.get(r);const a=o(i.map(l=>n(l)));return s&&e.set(r,a),a};return n(t)}function wP(t,e){const n={},r={};let o=0;const i=t.length;for(;o<i;)r[t[o]]=1,o+=1;for(const s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n}const Ms=typeof document<"u"?x.useLayoutEffect:x.useEffect;function uy(t,e,n){const r=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),s=Object.keys(e.events||{}),a=x.createContext({});function l(v,b){v.propsReady&&ve(v.propsReady,!1);for(const g of r){const S=v[e.required[g]];ve(S,b[g])}for(const g of o)if(g in b){const S=v[e.optional[g]];ve(S,b[g])}v.propsReady&&ve(v.propsReady,!0)}function c(v){return i.reduce((b,g)=>(b[g]=S=>{const w=v[e.methods[g]];ve(w,S)},b),{})}function u(v){return s.reduce((b,g)=>(b[g]=yP(v[e.events[g]]),b),{})}const f=x.forwardRef((v,b)=>{const{children:g,...S}=v,[w]=x.useState(()=>Ds(xP(t),P=>l(P,S))),[T]=x.useState(iy(u,w));return Ms(()=>{for(const P of s)P in S&&De(T[P],S[P]);return()=>{Object.values(T).map(Hc)}},[S,T,w]),Ms(()=>{l(w,S)}),x.useImperativeHandle(b,sy(c(w))),x.createElement(a.Provider,{value:w},n?x.createElement(n,wP([...r,...o,...s],S),g):g)}),d=v=>x.useCallback(oy(ve,x.useContext(a)[v]),[v]),h=v=>{const g=x.useContext(a)[v],S=x.useCallback(w=>De(g,w),[g]);return x.useSyncExternalStore(S,()=>gt(g),()=>gt(g))},p=v=>{const g=x.useContext(a)[v],[S,w]=x.useState(iy(gt,g));return Ms(()=>De(g,T=>{T!==S&&w(sy(T))}),[g,S]),S},m=x.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,b)=>{const S=x.useContext(a)[v];Ms(()=>De(S,b),[b,S])}}}const SP=typeof document<"u"?x.useLayoutEffect:x.useEffect;var jt=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t))(jt||{});const TP={0:"debug",1:"log",2:"warn",3:"error"},EP=()=>typeof globalThis>"u"?window:globalThis,Un=Me(()=>{const t=J(3);return{log:J((n,r,o=1)=>{var i;const s=(i=EP().VIRTUOSO_LOG_LEVEL)!=null?i:gt(t);o>=s&&console[TP[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:t}},[],{singleton:!0});function Uc(t,e=!0){const n=x.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=x.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&t(s)})}),[t]);r=i=>{i&&e?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function dr(t,e=!0){return Uc(t,e).callbackRef}function CP(t,e,n,r,o,i,s){const a=x.useCallback(l=>{const c=AP(l.children,e,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),c!==null&&t(c)},[t,e,o,i,s,r]);return Uc(a,n)}function AP(t,e,n,r){const o=t.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=t.item(s);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=e(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},jt.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function Gn(t,e){return Math.round(t.getBoundingClientRect()[e])}function fy(t,e){return Math.abs(t-e)<1.01}function dy(t,e,n,r=Jo,o){const i=x.useRef(null),s=x.useRef(null),a=x.useRef(null),l=x.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=()=>{t({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():$u.flushSync(v),s.current!==null&&(p===s.current||p<=0||p===m-y)&&(s.current=null,e(!0),a.current&&(clearTimeout(a.current),a.current=null))},[t,e]);x.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const d=i.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,y;d===window?(m=Math.max(Gn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,p=Gn(d,"height"),y=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),fy(p,m)||f.top===y){t({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&e(!0);return}h?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,e(!0)},1e3)):s.current=null,d.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const xt=Me(()=>{const t=Te(),e=Te(),n=J(0),r=Te(),o=J(0),i=Te(),s=Te(),a=J(0),l=J(0),c=J(0),u=J(0),f=Te(),d=Te(),h=J(!1);return ae(U(t,ne(({scrollTop:p})=>p)),e),ae(U(t,ne(({scrollHeight:p})=>p)),s),ae(e,o),{scrollContainerState:t,scrollTop:e,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),Qo={lvl:0};function hy(t,e,n,r=Qo,o=Qo){return{k:t,v:e,lvl:n,l:r,r:o}}function Ne(t){return t===Qo}function to(){return Qo}function Gc(t,e){if(Ne(t))return Qo;const{k:n,l:r,r:o}=t;if(e===n){if(Ne(r))return o;if(Ne(o))return r;{const[i,s]=py(r);return Fs(Qe(t,{k:i,v:s,l:my(r)}))}}else return e<n?Fs(Qe(t,{l:Gc(r,e)})):Fs(Qe(t,{r:Gc(o,e)}))}function ei(t,e){if(!Ne(t))return e===t.k?t.v:e<t.k?ei(t.l,e):ei(t.r,e)}function Ht(t,e,n="k"){if(Ne(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const r=Ht(t.r,e,n);return r[0]===-1/0?[t.k,t.v]:r}return Ht(t.l,e,n)}function Rt(t,e,n){return Ne(t)?hy(e,n,1):e===t.k?Qe(t,{k:e,v:n}):e<t.k?gy(Qe(t,{l:Rt(t.l,e,n)})):gy(Qe(t,{r:Rt(t.r,e,n)}))}function Kc(t,e,n){if(Ne(t))return[];const{k:r,v:o,l:i,r:s}=t;let a=[];return r>e&&(a=a.concat(Kc(i,e,n))),r>=e&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Kc(s,e,n))),a}function hr(t){return Ne(t)?[]:[...hr(t.l),{k:t.k,v:t.v},...hr(t.r)]}function py(t){return Ne(t.r)?[t.k,t.v]:py(t.r)}function my(t){return Ne(t.r)?t.l:Fs(Qe(t,{r:my(t.r)}))}function Qe(t,e){return hy(e.k!==void 0?e.k:t.k,e.v!==void 0?e.v:t.v,e.lvl!==void 0?e.lvl:t.lvl,e.l!==void 0?e.l:t.l,e.r!==void 0?e.r:t.r)}function Zc(t){return Ne(t)||t.lvl>t.r.lvl}function gy(t){return qc(vy(t))}function Fs(t){const{l:e,r:n,lvl:r}=t;if(n.lvl>=r-1&&e.lvl>=r-1)return t;if(r>n.lvl+1){if(Zc(e))return vy(Qe(t,{lvl:r-1}));if(!Ne(e)&&!Ne(e.r))return Qe(e.r,{l:Qe(e,{r:e.r.l}),r:Qe(t,{l:e.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Zc(t))return qc(Qe(t,{lvl:r-1}));if(!Ne(n)&&!Ne(n.l)){const o=n.l,i=Zc(o)?n.lvl-1:n.lvl;return Qe(o,{l:Qe(t,{r:o.l,lvl:r-1}),r:qc(Qe(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Rs(t,e,n){if(Ne(t))return[];const r=Ht(t,e)[0];return _P(Kc(t,r,n))}function yy(t,e){const n=t.length;if(n===0)return[];let{index:r,value:o}=e(t[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=e(t[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function _P(t){return yy(t,({k:e,v:n})=>({index:e,value:n}))}function qc(t){const{r:e,lvl:n}=t;return!Ne(e)&&!Ne(e.r)&&e.lvl===n&&e.r.lvl===n?Qe(e,{l:Qe(t,{r:e.l}),lvl:n+1}):t}function vy(t){const{l:e}=t;return!Ne(e)&&e.lvl===t.lvl?Qe(e,{r:Qe(t,{l:e.r})}):t}function Ls(t,e,n,r=0){let o=t.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=t[i],a=n(s,e);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function by(t,e,n){return t[Ls(t,e,n)]}function PP(t,e,n,r){const o=Ls(t,e,r),i=Ls(t,n,r,o);return t.slice(o,i+1)}const Yc=Me(()=>({recalcInProgress:J(!1)}),[],{singleton:!0});function OP(t){const{size:e,startIndex:n,endIndex:r}=t;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===e}function xy(t,e){let n=0,r=0;for(;n<t;)n+=e[r+1]-e[r]-1,r++;return r-(n===t?0:1)}function IP(t,e){let n=Ne(t)?0:1/0;for(const r of e){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Ne(t)){t=Rt(t,0,o);continue}const a=Rs(t,i-1,s+1);if(a.some(OP(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(s>=u||o===d)&&(t=Gc(t,u)):(c=d!==o,l=!0),f>s&&s>=u&&d!==o&&(t=Rt(t,s+1,d));c&&(t=Rt(t,i,o))}return[t,n]}function kP(){return{offsetTree:[],sizeTree:to(),groupOffsetTree:to(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Xc({index:t},e){return e===t?0:e<t?-1:1}function DP({offset:t},e){return e===t?0:e<t?-1:1}function MP(t){return{index:t.index,value:t}}function FP(t,e,n,r=0){return r>0&&(e=Math.max(e,by(t,r,Xc).offset)),yy(PP(t,e,n,DP),MP)}function Jc(t,e,n,r){let o=t,i=0,s=0,a=0,l=0;if(e!==0){l=Ls(o,e-1,Xc),a=o[l].offset;const u=Ht(n,e-1);i=u[0],s=u[1],o.length&&o[l].size===Ht(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Rs(n,e,1/0)){const f=c-i,d=f*s+a+f*r;o.push({offset:d,size:u,index:c}),i=c,a=d,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function RP(t,[e,n,r,o]){e.length>0&&r("received item sizes",e,jt.DEBUG);const i=t.sizeTree;let s=i,a=0;if(n.length>0&&Ne(i)&&e.length===2){const d=e[0].size,h=e[1].size;s=n.reduce((p,m)=>Rt(Rt(p,m,d),m+1,h),s)}else[s,a]=IP(s,e);if(s===i)return t;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Jc(t.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>Rt(d,h,ti(h,l,o)),to()),groupIndices:n}}function ti(t,e,n){if(e.length===0)return 0;const{offset:r,index:o,size:i}=by(e,t,Xc),s=t-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function LP(t){return typeof t.groupIndex<"u"}function wy(t,e,n){if(LP(t))return e.groupIndices[t.groupIndex]+1;{const r=t.index==="LAST"?n:t.index;let o=Sy(r,e);return o=Math.max(0,o,Math.min(n,o)),o}}function Sy(t,e){if(!Ns(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function Ns(t){return!Ne(t.groupOffsetTree)}function NP(t){return hr(t).map(({k:e,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:e,endIndex:s,size:n}})}const VP={offsetHeight:"height",offsetWidth:"width"},rn=Me(([{log:t},{recalcInProgress:e}])=>{const n=Te(),r=Te(),o=bt(r,0),i=Te(),s=Te(),a=J(0),l=J([]),c=J(void 0),u=J(void 0),f=J((w,T)=>Gn(w,VP[T])),d=J(void 0),h=J(0),p=kP(),m=bt(U(n,be(l,t,h),nn(RP,p),We()),p),y=bt(U(l,We(),nn((w,T)=>({prev:w.current,current:T}),{prev:[],current:[]}),ne(({prev:w})=>w)),[]);ae(U(l,de(w=>w.length>0),be(m,h),ne(([w,T,P])=>{const O=w.reduce((k,D,L)=>Rt(k,D,ti(D,T.offsetTree,P)||L),to());return{...T,groupIndices:w,groupOffsetTree:O}})),m),ae(U(r,be(m),de(([w,{lastIndex:T}])=>w<T),ne(([w,{lastIndex:T,lastSize:P}])=>[{startIndex:w,endIndex:T,size:P}])),n),ae(c,u);const v=bt(U(c,ne(w=>w===void 0)),!0);ae(U(u,de(w=>w!==void 0&&Ne(gt(m).sizeTree)),ne(w=>[{startIndex:0,endIndex:0,size:w}])),n);const b=Ft(U(n,be(m),nn(({sizes:w},[T,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:p}),ne(w=>w.changed)));De(U(a,nn((w,T)=>({diff:w.prev-T,prev:T}),{diff:0,prev:0}),ne(w=>w.diff)),w=>{const{groupIndices:T}=gt(m);if(w>0)ve(e,!0),ve(i,w+xy(w,T));else if(w<0){const P=gt(y);P.length>0&&(w-=xy(-w,P)),ve(s,w)}}),De(U(a,be(t)),([w,T])=>{w<0&&T("`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},jt.ERROR)});const g=Ft(i);ae(U(i,be(m),ne(([w,T])=>{const P=T.groupIndices.length>0,O=[],k=T.lastSize;if(P){const D=ei(T.sizeTree,0);let L=0,A=0;for(;L<w;){const _=T.groupIndices[A],M=T.groupIndices.length===A+1?1/0:T.groupIndices[A+1]-_-1;O.push({startIndex:_,endIndex:_,size:D}),O.push({startIndex:_+1,endIndex:_+1+M-1,size:k}),A++,L+=M+1}const j=hr(T.sizeTree);return L!==w&&j.shift(),j.reduce((_,{k:M,v:N})=>{let z=_.ranges;return _.prevSize!==0&&(z=[..._.ranges,{startIndex:_.prevIndex,endIndex:M+w-1,size:_.prevSize}]),{ranges:z,prevIndex:M+w,prevSize:N}},{ranges:O,prevIndex:w,prevSize:0}).ranges}return hr(T.sizeTree).reduce((D,{k:L,v:A})=>({ranges:[...D.ranges,{startIndex:D.prevIndex,endIndex:L+w-1,size:D.prevSize}],prevIndex:L+w,prevSize:A}),{ranges:[],prevIndex:0,prevSize:k}).ranges})),n);const S=Ft(U(s,be(m,h),ne(([w,{offsetTree:T},P])=>{const O=-w;return ti(O,T,P)})));return ae(U(s,be(m,h),ne(([w,T,P])=>{if(T.groupIndices.length>0){if(Ne(T.sizeTree))return T;let k=to();const D=gt(y);let L=0,A=0,j=0;for(;L<-w;){j=D[A];const _=D[A+1]-j-1;A++,L+=_+1}if(k=hr(T.sizeTree).reduce((_,{k:M,v:N})=>Rt(_,Math.max(0,M+w),N),k),L!==-w){const _=ei(T.sizeTree,j);k=Rt(k,0,_);const M=Ht(T.sizeTree,-w+1)[1];k=Rt(k,1,M)}return{...T,sizeTree:k,...Jc(T.offsetTree,0,k,P)}}else{const k=hr(T.sizeTree).reduce((D,{k:L,v:A})=>Rt(D,Math.max(0,L+w),A),to());return{...T,sizeTree:k,...Jc(T.offsetTree,0,k,P)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:S,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},ze(Un,Yc),{singleton:!0}),$P=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Ty(t){const e=typeof t=="number"?{index:t}:t;return e.align||(e.align="start"),(!e.behavior||!$P)&&(e.behavior="auto"),e.offset||(e.offset=0),e}const ni=Me(([{sizes:t,totalCount:e,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Te(),p=Te(),m=J(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),ve(o,!1)}return ae(U(h,be(t,i,e,m,l,c,d),be(r,u,f),ne(([[S,w,T,P,O,k,D,L],A,j,R])=>{const _=Ty(S),{align:M,behavior:N,offset:z}=_,q=P-1,C=wy(_,w,q);let $=ti(C,w.offsetTree,A)+k;M==="end"?($+=j+Ht(w.sizeTree,C)[1]-T+R,C===q&&($+=D)):M==="center"?$+=(j+Ht(w.sizeTree,C)[1]-T+R)/2:$-=O,z&&($+=z);const Y=re=>{g(),re?(L("retrying to scroll to",{location:S},jt.DEBUG),ve(h,S)):(ve(p,!0),L("list did not change, scroll successful",{},jt.DEBUG))};if(g(),N==="smooth"){let re=!1;b=De(n,ee=>{re=re||ee}),y=en(a,()=>{Y(re)})}else y=en(U(n,jP(150)),Y);return v=setTimeout(()=>{g()},1200),ve(o,!0),L("scrolling from index to",{index:C,top:$,behavior:N},jt.DEBUG),{top:$,behavior:N}})),s),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},ze(rn,xt,Un),{singleton:!0});function jP(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return r=>{r&&(e(!0),clearTimeout(n))}}}const ri="up",oi="down",BP="none",zP={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},WP=0,ii=Me(([{scrollContainerState:t,scrollTop:e,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=J(!1),a=J(!0),l=Te(),c=Te(),u=J(4),f=J(WP),d=bt(U(cy(U(pe(e),eo(1),tn(!0)),U(pe(e),eo(1),tn(!1),ly(100))),We()),!1),h=bt(U(cy(U(i,tn(!0)),U(i,tn(!1),ly(200))),We()),!1);ae(U(ot(pe(e),pe(f)),ne(([b,g])=>b<=g),We()),a),ae(U(a,Hn(50)),c);const p=Ft(U(ot(t,pe(n),pe(r),pe(o),pe(u)),nn((b,[{scrollTop:g,scrollHeight:S},w,T,P,O])=>{const k=g+w-S>-O,D={viewportHeight:w,scrollTop:g,scrollHeight:S};if(k){let A,j;return g>b.state.scrollTop?(A="SCROLLED_DOWN",j=b.state.scrollTop-g):(A="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:D,atBottomBecause:A,scrollTopDelta:j}}let L;return D.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":w<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:D}},zP),We((b,g)=>b&&b.atBottom===g.atBottom))),m=bt(U(t,nn((b,{scrollTop:g,scrollHeight:S,viewportHeight:w})=>{if(fy(b.scrollHeight,S))return{scrollTop:g,scrollHeight:S,jump:0,changed:!1};{const T=S-(g+w)<1;return b.scrollTop!==g&&T?{scrollHeight:S,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:S,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),de(b=>b.changed),ne(b=>b.jump)),0);ae(U(p,ne(b=>b.atBottom)),s),ae(U(s,Hn(50)),l);const y=J(oi);ae(U(t,ne(({scrollTop:b})=>b),We(),nn((b,g)=>gt(h)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?ri:oi,prevScrollTop:g},{direction:oi,prevScrollTop:0}),ne(b=>b.direction)),y),ae(U(t,Hn(50),tn(BP)),y);const v=J(0);return ae(U(d,de(b=>!b),tn(0)),v),ae(U(e,Hn(100),be(d),de(([b,g])=>!!g),nn(([b,g],[S])=>[g,S],[0,0]),ne(([b,g])=>g-b)),v),{isScrolling:d,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},ze(xt)),Kn=Me(([{log:t}])=>{const e=J(!1),n=Ft(U(e,de(r=>r),We()));return De(e,r=>{r&&gt(t)("props updated",{},jt.DEBUG)}),{propsReady:e,didMount:n}},ze(Un),{singleton:!0});function Qc(t,e){t==0?e():requestAnimationFrame(()=>Qc(t-1,e))}function eu(t,e){const n=e-1;return typeof t=="number"?t:t.index==="LAST"?n:t.index}const si=Me(([{sizes:t,listRefresh:e,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=J(!0),l=J(0),c=J(!0);return ae(U(s,be(l),de(([u,f])=>!!f),tn(!1)),a),ae(U(s,be(l),de(([u,f])=>!!f),tn(!1)),c),De(U(ot(e,s),be(a,t,n,c),de(([[,u],f,{sizeTree:d},h,p])=>u&&(!Ne(d)||Wc(h))&&!f&&!p),be(l)),([,u])=>{en(i,()=>{ve(c,!0)}),Qc(4,()=>{en(r,()=>{ve(a,!0)}),ve(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},ze(rn,xt,ni,Kn),{singleton:!0});function Ey(t){return t?t==="smooth"?"smooth":"auto":!1}const HP=(t,e)=>typeof t=="function"?Ey(t(e)):e&&Ey(t),UP=Me(([{totalCount:t,listRefresh:e},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=J(!1),f=Te();let d=null;function h(m){ve(o,{index:"LAST",align:"end",behavior:m})}De(U(ot(U(pe(t),eo(1)),a),be(pe(u),n,i,c),ne(([[m,y],v,b,g,S])=>{let w=y&&g,T="auto";return w&&(T=HP(v,b||S),w=w&&!!T),{totalCount:m,shouldFollow:w,followOutputBehavior:T}}),de(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=en(e,()=>{gt(l)("following output to ",{totalCount:m},jt.DEBUG),h(y),d=null})});function p(m){const y=en(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(gt(l)("scrolling to bottom due to increased size",{},jt.DEBUG),h("auto"))});setTimeout(y,100)}return De(U(ot(pe(u),t,s),de(([m,,y])=>m&&y),nn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),de(({refreshed:m})=>m),be(u,t)),([,m])=>{gt(i)&&p(m!==!1)}),De(f,()=>{p(gt(u)!==!1)}),De(ot(pe(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},ze(rn,ii,ni,si,Kn,Un,xt));function GP(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{totalCount:0,groupIndices:[]})}const Cy=Me(([{totalCount:t,groupIndices:e,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=Te(),s=Te(),a=Ft(U(i,ne(GP)));return ae(U(a,ne(l=>l.totalCount)),t),ae(U(a,ne(l=>l.groupIndices)),e),ae(U(ot(r,n,o),de(([l,c])=>Ns(c)),ne(([l,c,u])=>Ht(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),We(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},ze(rn,xt));function ai(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}function Ay(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}const Vs="top",$s="bottom",_y="none";function Py(t,e,n){return typeof t=="number"?n===ri&&e===Vs||n===oi&&e===$s?t:0:n===ri?e===Vs?t.main:t.reverse:e===$s?t.main:t.reverse}function Oy(t,e){return typeof t=="number"?t:t[e]||0}const tu=Me(([{scrollTop:t,viewportHeight:e,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=Te(),s=J(0),a=J(0),l=J(0),c=bt(U(ot(pe(t),pe(e),pe(r),pe(i,ai),pe(l),pe(s),pe(o),pe(n),pe(a)),ne(([u,f,d,[h,p],m,y,v,b,g])=>{const S=u-b,w=y+v,T=Math.max(d-S,0);let P=_y;const O=Oy(g,Vs),k=Oy(g,$s);return h-=b,h+=d+v,p+=d+v,p-=b,h>u+w-O&&(P=ri),p<u-T+f+k&&(P=oi),P!==_y?[Math.max(S-d-Py(m,Vs,P)-O,0),S-T-v+f+Py(m,$s,P)+k]:null}),de(u=>u!=null),We(ai)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},ze(xt),{singleton:!0});function KP(t,e,n){if(Ns(e)){const r=Sy(t,e);return[{index:Ht(e.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:t,size:0,offset:0,data:n&&n[0]}]}const nu={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Iy(t,e,n){if(t.length===0)return[];if(!Ns(e))return t.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=t[0].index,o=t[t.length-1].index,i=[],s=Rs(e.groupOffsetTree,r,o);let a,l=0;for(const c of t){(!a||a.end<c.index)&&(a=s.shift(),l=e.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function js(t,e,n,r,o,i){const{lastSize:s,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(t.length>0){c=t[0].offset;const m=t[t.length-1];u=m.offset+m.size}const f=n-l,d=a+f*s+(f-1)*r,h=c,p=d-u;return{items:Iy(t,o,i),topItems:Iy(e,o,i),topListHeight:e.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:i}}function ky(t,e,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=t)break;s++}const a=t+s,l=eu(e,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return js(c,[],a,o,n,r)}const pr=Me(([{sizes:t,totalCount:e,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=J([]),y=J(0),v=Te();ae(i.topItemsIndexes,m);const b=bt(U(ot(h,p,pe(s,ai),pe(e),pe(t),pe(u),c,pe(m),pe(r),pe(o),n),de(([T,P,,O,,,,,,,k])=>{const D=k&&k.length!==O;return T&&!P&&!D}),ne(([,,[T,P],O,k,D,L,A,j,R,_])=>{const M=k,{sizeTree:N,offsetTree:z}=M,q=gt(y);if(O===0)return{...nu,totalCount:O};if(T===0&&P===0)return q===0?{...nu,totalCount:O}:ky(q,D,k,j,R,_||[]);if(Ne(N))return q>0?null:js(KP(eu(D,O),M,_),[],O,R,M,j);const C=[];if(A.length>0){const W=A[0],I=A[A.length-1];let V=0;for(const H of Rs(N,W,I)){const K=H.value,X=Math.max(H.start,W),le=Math.min(H.end,I);for(let B=X;B<=le;B++)C.push({index:B,size:K,offset:V,data:_&&_[B]}),V+=K}}if(!L)return js([],C,O,R,M,j);const $=A.length>0?A[A.length-1]+1:0,Y=FP(z,T,P,$);if(Y.length===0)return null;const re=O-1,ee=Ds([],W=>{for(const I of Y){const V=I.value;let H=V.offset,K=I.start;const X=V.size;if(V.offset<T){K+=Math.floor((T-V.offset+R)/(X+R));const B=K-I.start;H+=B*X+B*R}K<$&&(H+=($-K)*X,K=$);const le=Math.min(I.end,re);for(let B=K;B<=le&&!(H>=P);B++)W.push({index:B,size:X,offset:H,data:_&&_[B]}),H+=X+R}});return js(ee,C,O,R,M,j)}),de(T=>T!==null),We()),nu);ae(U(n,de(Wc),ne(T=>T==null?void 0:T.length)),e),ae(U(b,ne(T=>T.topListHeight)),f),ae(f,l),ae(U(b,ne(T=>[T.top,T.bottom])),a),ae(U(b,ne(T=>T.items)),v);const g=Ft(U(b,de(({items:T})=>T.length>0),be(e,n),de(([{items:T},P])=>T[T.length-1].originalIndex===P-1),ne(([,T,P])=>[T-1,P]),We(ai),ne(([T])=>T))),S=Ft(U(b,Hn(200),de(({items:T,topItems:P})=>T.length>0&&T[0].originalIndex===P.length),ne(({items:T})=>T[0].index),We())),w=Ft(U(b,de(({items:T})=>T.length>0),ne(({items:T})=>{let P=0,O=T.length-1;for(;T[P].type==="group"&&P<O;)P++;for(;T[O].type==="group"&&O>P;)O--;return{startIndex:T[P].index,endIndex:T[O].index}}),We(Ay)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:S,rangeChanged:w,itemsRendered:v,initialItemCount:y,...d}},ze(rn,Cy,tu,si,ni,ii,Kn,Yc),{singleton:!0}),ZP=Me(([{sizes:t,firstItemIndex:e,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(ae(U(a,be(i),de(([,l])=>l!==0),be(o,t,e,r,n),ne(([[,l],c,u,f,d,h=[]])=>ky(l,c,u,f,d,h))),s),{}),ze(rn,si,pr,Kn),{singleton:!0}),Dy=Me(([{scrollVelocity:t}])=>{const e=J(!1),n=Te(),r=J(!1);return ae(U(t,be(r,e,n),de(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),We()),e),De(U(ot(e,t,n),be(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:e,scrollSeekConfiguration:r,scrollVelocity:t,scrollSeekRangeChanged:n}},ze(ii),{singleton:!0}),qP=Me(([{topItemsIndexes:t}])=>{const e=J(0);return ae(U(e,de(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),t),{topItemCount:e}},ze(pr)),My=Me(([{footerHeight:t,headerHeight:e,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=Te(),s=bt(U(ot(t,r,e,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ae(pe(s),i),{totalListHeight:s,totalListHeightChanged:i}},ze(xt,pr),{singleton:!0});function Fy(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const YP=Fy(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),XP=Me(([{scrollBy:t,scrollTop:e,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Ft(U(l,be(a),nn(([,v,b,g],[{items:S,totalCount:w,bottom:T,offsetBottom:P},O])=>{const k=T+P;let D=0;return b===w&&v.length>0&&S.length>0&&(S[0].originalIndex===0&&v[0].originalIndex===0||(D=k-g,D!==0&&(D+=O))),[D,S,w,k]},[0,[],0,0]),de(([v])=>v!==0),be(e,s,r,i,h,p),de(([,v,b,g,,,S])=>!S&&!g&&v!==0&&b===ri),ne(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},jt.DEBUG),v))));function y(v){v>0?(ve(t,{top:-v,behavior:"auto"}),ve(n,0)):(ve(n,0),ve(t,{top:-v,behavior:"auto"}))}return De(U(m,be(n,o)),([v,b,g])=>{g&&YP()?ve(n,b-v):y(-v)}),De(U(ot(bt(o,!1),n,p),de(([v,b,g])=>!v&&!g&&b!==0),ne(([v,b])=>b),Hn(1)),y),ae(U(u,ne(v=>({top:-v}))),t),De(U(c,be(f,d),ne(([v,{lastSize:b,groupIndices:g,sizeTree:S},w])=>{function T(P){return P*(b+w)}if(g.length===0)return T(v);{let P=0;const O=ei(S,0);let k=0,D=0;for(;k<v;){k++,P+=O;let L=g.length===D+1?1/0:g[D+1]-g[D]-1;k+L>v&&(P-=O,L=v-k+1),k+=L,P+=T(L),D++}return P}})),v=>{ve(n,v),requestAnimationFrame(()=>{ve(t,{top:v}),requestAnimationFrame(()=>{ve(n,0),ve(p,!1)})})}),{deviation:n}},ze(xt,ii,pr,rn,Un,Yc)),JP=Me(([{didMount:t},{scrollTo:e},{listState:n}])=>{const r=J(0);return De(U(t,be(r),de(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{en(U(n,eo(1),de(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ve(e,o)})})}),{initialScrollTop:r}},ze(Kn,xt,pr),{singleton:!0}),QP=Me(([{viewportHeight:t},{totalListHeight:e}])=>{const n=J(!1),r=bt(U(ot(n,t,e),de(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),Hn(0),We()),0);return{alignToBottom:n,paddingTopAddition:r}},ze(xt,My),{singleton:!0}),ru=Me(([{scrollTo:t,scrollContainerState:e}])=>{const n=Te(),r=Te(),o=Te(),i=J(!1),s=J(void 0);return ae(U(ot(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),e),ae(U(t,be(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},ze(xt)),eO=({itemTop:t,itemBottom:e,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>t<n?{...s,behavior:o,align:i??"start"}:e>r?{...s,behavior:o,align:i??"end"}:null,tO=Me(([{sizes:t,totalCount:e,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Te();return ae(U(u,be(t,o,e,i,s,a,r),be(n),ne(([[f,d,h,p,m,y,v,b],g])=>{const{done:S,behavior:w,align:T,calculateViewLocation:P=eO,...O}=f,k=wy(f,d,p-1),D=ti(k,d.offsetTree,g)+m+y,L=D+Ht(d.sizeTree,k)[1],A=b+y,j=b+h-v,R=P({itemTop:D,itemBottom:L,viewportTop:A,viewportBottom:j,locationParams:{behavior:w,align:T,...O}});return R?S&&en(U(l,de(_=>_===!1),eo(gt(l)?1:2)),S):S&&S(),R}),de(f=>f!==null)),c),{scrollIntoView:u}},ze(rn,xt,ni,pr,Un),{singleton:!0}),nO=Me(([{sizes:t,sizeRanges:e},{scrollTop:n},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:i,windowScrollContainerState:s,windowViewportRect:a}])=>{const l=Te(),c=J(void 0),u=J(null),f=J(null);return ae(s,u),ae(a,f),De(U(l,be(t,n,i,u,f)),([d,h,p,m,y,v])=>{const b=NP(h.sizeTree);m&&y!==null&&v!==null&&(p=y.scrollTop-v.offsetTop),d({ranges:b,scrollTop:p})}),ae(U(c,de(Wc),ne(rO)),r),ae(U(o,be(c),de(([,d])=>d!==void 0),We(),ne(([,d])=>d.ranges)),e),{getState:l,restoreStateFrom:c}},ze(rn,xt,si,Kn,ru));function rO(t){return{offset:t.scrollTop,index:0,align:"start"}}const oO=Me(([t,e,n,r,o,i,s,a,l,c])=>({...t,...e,...n,...r,...o,...i,...s,...a,...l,...c}),ze(tu,ZP,Kn,Dy,My,JP,QP,ru,tO,Un)),iO=Me(([{totalCount:t,sizeRanges:e,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:b,topItemsIndexes:g,...S},{scrollToIndex:w},T,{topItemCount:P},{groupCounts:O},k])=>(ae(S.rangeChanged,k.scrollSeekRangeChanged),ae(U(k.windowViewportRect,ne(D=>D.visibleHeight)),m.viewportHeight),{totalCount:t,data:s,firstItemIndex:a,sizeRanges:e,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:P,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:w,trackItemSizes:o,itemSize:i,groupIndices:l,...S,...k,...m,sizes:f,...y}),ze(rn,si,xt,nO,UP,pr,ni,XP,qP,Cy,oO)),ou="-webkit-sticky",Ry="sticky",Ly=Fy(()=>{if(typeof document>"u")return Ry;const t=document.createElement("div");return t.style.position=ou,t.style.position===ou?ou:Ry});function Ny(t,e){const n=x.useRef(null),r=x.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(e){const d=e.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+e.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},t(n.current)},[t,e]),{callbackRef:o,ref:i}=Uc(r),s=x.useCallback(()=>{r(i.current)},[r,i]);return x.useEffect(()=>{if(e){e.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(e),()=>{e.removeEventListener("scroll",s),a.unobserve(e)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,e]),o}const Vy=x.createContext(void 0),$y=x.createContext(void 0);function jy(t){return t}Ly();const sO={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Bs=t=>({width:"100%",height:"100%",position:"absolute",top:0});Ly();function Pt(t,e){if(typeof t!="string")return{context:e}}function aO(t,e){return{item:typeof t=="string"?void 0:e}}function By({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:i,children:s,...a}){const l=t("scrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=dy(l,u,c,f);return e("scrollTo",m),e("scrollBy",p),x.createElement(c,{ref:h,style:{...sO,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...Pt(c,d)},s)})}function zy({usePublisher:t,useEmitter:e,useEmitterValue:n}){return x.memo(function({style:i,children:s,...a}){const l=t("windowScrollContainerState"),c=n("ScrollerComponent"),u=t("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=dy(l,u,c,Jo,h);return SP(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),e("windowScrollTo",v),e("scrollBy",y),x.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...Pt(c,p)},s)})}const Wy={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},lO={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Hy,ceil:Uy,floor:zs,min:iu,max:li}=Math;function cO(t){return{...lO,items:t}}function Gy(t,e,n){return Array.from({length:e-t+1}).map((r,o)=>{const i=n===null?null:n[o+t];return{index:o+t,data:i}})}function uO(t,e){return t&&t.column===e.column&&t.row===e.row}function Ws(t,e){return t&&t.width===e.width&&t.height===e.height}const fO=Me(([{overscan:t,visibleRange:e,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},S])=>{const w=J(0),T=J(0),P=J(Wy),O=J({height:0,width:0}),k=J({height:0,width:0}),D=Te(),L=Te(),A=J(0),j=J(null),R=J({row:0,column:0}),_=Te(),M=Te(),N=J(!1),z=J(0),q=J(!0),C=J(!1);De(U(p,be(z),de(([I,V])=>!!V)),()=>{ve(q,!1),ve(T,0)}),De(U(ot(p,q,k,O,z,C),de(([I,V,H,K,,X])=>I&&!V&&H.height!==0&&K.height!==0&&!X)),([,,,,I])=>{ve(C,!0),Qc(1,()=>{ve(D,I)}),en(U(r),()=>{ve(n,[0,0]),ve(q,!0)})}),ae(U(M,de(I=>I!=null&&I.scrollTop>0),tn(0)),T),De(U(p,be(M),de(([,I])=>I!=null)),([,I])=>{I&&(ve(O,I.viewport),ve(k,I==null?void 0:I.item),ve(R,I.gap),I.scrollTop>0&&(ve(N,!0),en(U(r,eo(1)),V=>{ve(N,!1)}),ve(s,{top:I.scrollTop})))}),ae(U(O,ne(({height:I})=>I)),o),ae(U(ot(pe(O,Ws),pe(k,Ws),pe(R,(I,V)=>I&&I.column===V.column&&I.row===V.row),pe(r)),ne(([I,V,H,K])=>({viewport:I,item:V,gap:H,scrollTop:K}))),_),ae(U(ot(pe(w),e,pe(R,uO),pe(k,Ws),pe(O,Ws),pe(j),pe(T),pe(N),pe(q),pe(z)),de(([,,,,,,,I])=>!I),ne(([I,[V,H],K,X,le,B,ke,,He,Xe])=>{const{row:se,column:Ae}=K,{height:Se,width:Ce}=X,{width:me}=le;if(ke===0&&(I===0||me===0))return Wy;if(Ce===0){const nt=eu(Xe,I),cn=nt===0?Math.max(ke-1,0):nt;return cO(Gy(nt,cn,B))}const Pe=Zy(me,Ce,Ae);let tt,Tt;He?V===0&&H===0&&ke>0?(tt=0,Tt=ke-1):(tt=Pe*zs((V+se)/(Se+se)),Tt=Pe*Uy((H+se)/(Se+se))-1,Tt=iu(I-1,li(Tt,Pe-1)),tt=iu(Tt,li(0,tt))):(tt=0,Tt=-1);const Z=Gy(tt,Tt,B),{top:oe,bottom:Re}=Ky(le,K,X,Z),Ke=Uy(I/Pe),ln=Ke*Se+(Ke-1)*se-Re;return{items:Z,offsetTop:oe,offsetBottom:ln,top:oe,bottom:Re,itemHeight:Se,itemWidth:Ce}})),P),ae(U(j,de(I=>I!==null),ne(I=>I.length)),w),ae(U(ot(O,k,P,R),de(([I,V,{items:H}])=>H.length>0&&V.height!==0&&I.height!==0),ne(([I,V,{items:H},K])=>{const{top:X,bottom:le}=Ky(I,K,V,H);return[X,le]}),We(ai)),n);const $=J(!1);ae(U(r,be($),ne(([I,V])=>V||I!==0)),$);const Y=Ft(U(pe(P),de(({items:I})=>I.length>0),be(w,$),de(([{items:I},V,H])=>H&&I[I.length-1].index===V-1),ne(([,I])=>I-1),We())),re=Ft(U(pe(P),de(({items:I})=>I.length>0&&I[0].index===0),tn(0),We())),ee=Ft(U(pe(P),be(N),de(([{items:I},V])=>I.length>0&&!V),ne(([{items:I}])=>({startIndex:I[0].index,endIndex:I[I.length-1].index})),We(Ay),Hn(0)));ae(ee,d.scrollSeekRangeChanged),ae(U(D,be(O,k,w,R),ne(([I,V,H,K,X])=>{const le=Ty(I),{align:B,behavior:ke,offset:He}=le;let Xe=le.index;Xe==="LAST"&&(Xe=K-1),Xe=li(0,Xe,iu(K-1,Xe));let se=su(V,X,H,Xe);return B==="end"?se=Hy(se-V.height+H.height):B==="center"&&(se=Hy(se-V.height/2+H.height/2)),He&&(se+=He),{top:se,behavior:ke}})),s);const W=bt(U(P,ne(I=>I.offsetBottom+I.bottom)),0);return ae(U(m,ne(I=>({width:I.visibleWidth,height:I.visibleHeight}))),O),{data:j,totalCount:w,viewportDimensions:O,itemDimensions:k,scrollTop:r,scrollHeight:L,overscan:t,scrollBy:i,scrollTo:s,scrollToIndex:D,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:A,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:T,gap:R,restoreStateFrom:M,...d,initialTopMostItemIndex:z,gridState:P,totalListHeight:W,...f,startReached:re,endReached:Y,rangeChanged:ee,stateChanged:_,propsReady:h,stateRestoreInProgress:N,...S}},ze(tu,xt,ii,Dy,Kn,ru,Un));function Ky(t,e,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=su(t,e,n,r[0].index),s=su(t,e,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function su(t,e,n,r){const o=Zy(t.width,n.width,e.column),i=zs(r/o),s=i*n.height+li(0,i-1)*e.row;return s>0?s+e.row:s}function Zy(t,e,n){return li(1,zs((t+n)/(zs(e)+n)))}const dO=Me(([t,e])=>({...t,...e}),ze(fO,Me(()=>{const t=J(c=>`Item ${c}`),e=J({}),n=J(null),r=J("virtuoso-grid-item"),o=J("virtuoso-grid-list"),i=J(jy),s=J("div"),a=J(Jo),l=(c,u=null)=>bt(U(e,ne(f=>f[c]),We()),u);return{context:n,itemContent:t,components:e,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),hO=x.memo(function(){const e=Ge("gridState"),n=Ge("listClassName"),r=Ge("itemClassName"),o=Ge("itemContent"),i=Ge("computeItemKey"),s=Ge("isSeeking"),a=Ut("scrollHeight"),l=Ge("ItemComponent"),c=Ge("ListComponent"),u=Ge("ScrollSeekPlaceholder"),f=Ge("context"),d=Ut("itemDimensions"),h=Ut("gap"),p=Ge("log"),m=Ge("stateRestoreInProgress"),y=dr(v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:S,height:w}=g.getBoundingClientRect();d({width:S,height:w})}h({row:Yy("row-gap",getComputedStyle(v).rowGap,p),column:Yy("column-gap",getComputedStyle(v).columnGap,p)})});return m?null:x.createElement(c,{ref:y,className:n,...Pt(c,f),style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-testid":"virtuoso-item-list"},e.items.map(v=>{const b=i(v.index,v.data,f);return s?x.createElement(u,{key:b,...Pt(u,f),index:v.index,height:e.itemHeight,width:e.itemWidth}):x.createElement(l,{...Pt(l,f),className:r,"data-index":v.index,key:b},o(v.index,v.data,f))}))}),pO=x.memo(function(){const e=Ge("HeaderComponent"),n=Ut("headerHeight"),r=Ge("headerFooterTag"),o=dr(s=>n(Gn(s,"height"))),i=Ge("context");return e?x.createElement(r,{ref:o},x.createElement(e,Pt(e,i))):null}),mO=x.memo(function(){const e=Ge("FooterComponent"),n=Ut("footerHeight"),r=Ge("headerFooterTag"),o=dr(s=>n(Gn(s,"height"))),i=Ge("context");return e?x.createElement(r,{ref:o},x.createElement(e,Pt(e,i))):null}),gO=({children:t})=>{const e=x.useContext($y),n=Ut("itemDimensions"),r=Ut("viewportDimensions"),o=dr(i=>{r(i.getBoundingClientRect())});return x.useEffect(()=>{e&&(r({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,r,n]),x.createElement("div",{style:Bs(),ref:o},t)},yO=({children:t})=>{const e=x.useContext($y),n=Ut("windowViewportRect"),r=Ut("itemDimensions"),o=Ge("customScrollParent"),i=Ny(n,o);return x.useEffect(()=>{e&&(r({height:e.itemHeight,width:e.itemWidth}),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,r]),x.createElement("div",{ref:i,style:Bs()},t)},vO=x.memo(function({...e}){const n=Ge("useWindowScroll"),r=Ge("customScrollParent"),o=r||n?xO:bO,i=r||n?yO:gO;return x.createElement(o,{...e},x.createElement(i,null,x.createElement(pO,null),x.createElement(hO,null),x.createElement(mO,null)))}),{Component:Pk,usePublisher:Ut,useEmitterValue:Ge,useEmitter:qy}=uy(dO,{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"}},vO),bO=By({usePublisher:Ut,useEmitterValue:Ge,useEmitter:qy}),xO=zy({usePublisher:Ut,useEmitterValue:Ge,useEmitter:qy});function Yy(t,e,n){return e!=="normal"&&!(e!=null&&e.endsWith("px"))&&n(`${t} was not resolved to pixel value correctly`,e,jt.WARN),e==="normal"?0:parseInt(e??"0",10)}const wO=Me(([t,e])=>({...t,...e}),ze(iO,Me(()=>{const t=J(l=>x.createElement("td",null,"Item $",l)),e=J(null),n=J(null),r=J(null),o=J({}),i=J(jy),s=J(Jo),a=(l,c=null)=>bt(U(o,ne(u=>u[l]),We()),c);return{context:e,itemContent:t,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),SO=({height:t})=>x.createElement("tr",null,x.createElement("td",{style:{height:t}})),TO=({height:t})=>x.createElement("tr",null,x.createElement("td",{style:{height:t,padding:0,border:0}})),EO={overflowAnchor:"none"},CO=x.memo(function(){const e=Fe("listState"),n=Gt("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("trackItemSizes"),u=Fe("itemSize"),f=Fe("log"),{callbackRef:d,ref:h}=CP(n,u,c,a,f,void 0,o),[p,m]=x.useState(0);au("deviation",M=>{p!==M&&(h.current.style.marginTop=`${M}px`,m(M))});const y=Fe("EmptyPlaceholder"),v=Fe("ScrollSeekPlaceholder")||SO,b=Fe("FillerRow")||TO,g=Fe("TableBodyComponent"),S=Fe("TableRowComponent"),w=Fe("computeItemKey"),T=Fe("isSeeking"),P=Fe("paddingTopAddition"),O=Fe("firstItemIndex"),k=Fe("statefulTotalCount"),D=Fe("context");if(k===0&&y)return x.createElement(y,Pt(y,D));const L=e.offsetTop+P+p,A=e.offsetBottom,j=L>0?x.createElement(b,{height:L,key:"padding-top",context:D}):null,R=A>0?x.createElement(b,{height:A,key:"padding-bottom",context:D}):null,_=e.items.map(M=>{const N=M.originalIndex,z=w(N+O,M.data,D);return T?x.createElement(v,{...Pt(v,D),key:z,index:M.index,height:M.size,type:M.type||"item"}):x.createElement(S,{...Pt(S,D),...aO(S,M.data),key:z,"data-index":N,"data-known-size":M.size,"data-item-index":M.index,style:EO},l(M.index,M.data,D))});return x.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...Pt(g,D)},[j,..._,R])}),AO=({children:t})=>{const e=x.useContext(Vy),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=dr(ks(n,i=>Gn(i,"height")));return x.useEffect(()=>{e&&(n(e.viewportHeight),r(e.itemHeight))},[e,n,r]),x.createElement("div",{style:Bs(),ref:o,"data-viewport-type":"element"},t)},_O=({children:t})=>{const e=x.useContext(Vy),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Fe("customScrollParent"),i=Ny(n,o);return x.useEffect(()=>{e&&(r(e.itemHeight),n({offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,r]),x.createElement("div",{ref:i,style:Bs(),"data-viewport-type":"window"},t)},PO=x.memo(function(e){const n=Fe("useWindowScroll"),r=Fe("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),l=Fe("context"),c=dr(ks(o,b=>Gn(b,"height"))),u=dr(ks(i,b=>Gn(b,"height"))),f=r||n?kO:IO,d=r||n?_O:AO,h=Fe("TableComponent"),p=Fe("TableHeadComponent"),m=Fe("TableFooterComponent"),y=s?x.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...Pt(p,l)},s()):null,v=a?x.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...Pt(m,l)},a()):null;return x.createElement(f,{...e},x.createElement(d,null,x.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...Pt(h,l)},[y,x.createElement(CO,{key:"TableBody"}),v])))}),{Component:OO,usePublisher:Gt,useEmitterValue:Fe,useEmitter:au}=uy(wO,{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"}},PO),IO=By({usePublisher:Gt,useEmitterValue:Fe,useEmitter:au}),kO=zy({usePublisher:Gt,useEmitterValue:Fe,useEmitter:au}),DO=OO;var lu={},cu={exports:{}},uu={};/**
119
119
  * @license React
120
120
  * use-sync-external-store-shim.production.min.js
121
121
  *
@@ -123,7 +123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
123
123
  *
124
124
  * This source code is licensed under the MIT license found in the
125
125
  * LICENSE file in the root directory of this source tree.
126
- */var Zy;function IO(){if(Zy)return cu;Zy=1;var t=w;function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,y=p[1];return i(function(){m.value=h,m.getSnapshot=d,l(m)&&y({inst:m})},[f,h,d]),o(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),s(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return cu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,cu}var qy={};/**
126
+ */var Xy;function MO(){if(Xy)return uu;Xy=1;var t=x;function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,y=p[1];return i(function(){m.value=h,m.getSnapshot=d,l(m)&&y({inst:m})},[f,h,d]),o(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),s(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return uu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,uu}var Jy={};/**
127
127
  * @license React
128
128
  * use-sync-external-store-shim.development.js
129
129
  *
@@ -131,7 +131,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
131
131
  *
132
132
  * This source code is licensed under the MIT license found in the
133
133
  * LICENSE file in the root directory of this source tree.
134
- */var Yy;function kO(){return Yy||(Yy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=w,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var S=arguments.length,x=new Array(S>1?S-1:0),T=1;T<S;T++)x[T-1]=arguments[T];r("error",g,x)}}function r(g,S,x){{var T=e.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(S+="%s",x=x.concat([P]));var O=x.map(function(k){return String(k)});O.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,O)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,f=!1;function d(g,S,x){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=S();if(!f){var P=S();i(T,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var O=s({inst:{value:T,getSnapshot:S}}),k=O[0].inst,D=O[1];return l(function(){k.value=T,k.getSnapshot=S,h(k)&&D({inst:k})},[g,T,S]),a(function(){h(k)&&D({inst:k});var L=function(){h(k)&&D({inst:k})};return g(L)},[g]),c(T),T}function h(g){var S=g.getSnapshot,x=g.value;try{var T=S();return!i(x,T)}catch{return!0}}function p(g,S,x){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?p:d,b=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v;qy.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),qy}var Xy;function Jy(){return Xy||(Xy=1,process.env.NODE_ENV==="production"?lu.exports=IO():lu.exports=kO()),lu.exports}/**
134
+ */var Qy;function FO(){return Qy||(Qy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=x,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var S=arguments.length,w=new Array(S>1?S-1:0),T=1;T<S;T++)w[T-1]=arguments[T];r("error",g,w)}}function r(g,S,w){{var T=e.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(S+="%s",w=w.concat([P]));var O=w.map(function(k){return String(k)});O.unshift("Warning: "+S),Function.prototype.apply.call(console[g],console,O)}}function o(g,S){return g===S&&(g!==0||1/g===1/S)||g!==g&&S!==S}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,f=!1;function d(g,S,w){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=S();if(!f){var P=S();i(T,P)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var O=s({inst:{value:T,getSnapshot:S}}),k=O[0].inst,D=O[1];return l(function(){k.value=T,k.getSnapshot=S,h(k)&&D({inst:k})},[g,T,S]),a(function(){h(k)&&D({inst:k});var L=function(){h(k)&&D({inst:k})};return g(L)},[g]),c(T),T}function h(g){var S=g.getSnapshot,w=g.value;try{var T=S();return!i(w,T)}catch{return!0}}function p(g,S,w){return S()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?p:d,b=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v;Jy.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jy}var ev;function tv(){return ev||(ev=1,process.env.NODE_ENV==="production"?cu.exports=MO():cu.exports=FO()),cu.exports}/**
135
135
  * @license React
136
136
  * use-sync-external-store-shim/with-selector.production.min.js
137
137
  *
@@ -139,7 +139,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
139
139
  *
140
140
  * This source code is licensed under the MIT license found in the
141
141
  * LICENSE file in the root directory of this source tree.
142
- */var Qy;function DO(){if(Qy)return au;Qy=1;var t=w,e=Jy();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return au.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(T){if(!b){if(b=!0,g=T,T=d(T),h!==void 0&&m.hasValue){var P=m.value;if(h(P,T))return S=P}return S=T}if(P=S,r(g,T))return P;var O=d(T);return h!==void 0&&h(P,O)?P:(g=T,S=O)}var b=!1,g,S,x=f===void 0?null:f;return[function(){return v(u())},x===null?void 0:function(){return v(x())}]},[u,f,d,h]);var y=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},au}var ev={};/**
142
+ */var nv;function RO(){if(nv)return lu;nv=1;var t=x,e=tv();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return lu.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(T){if(!b){if(b=!0,g=T,T=d(T),h!==void 0&&m.hasValue){var P=m.value;if(h(P,T))return S=P}return S=T}if(P=S,r(g,T))return P;var O=d(T);return h!==void 0&&h(P,O)?P:(g=T,S=O)}var b=!1,g,S,w=f===void 0?null:f;return[function(){return v(u())},w===null?void 0:function(){return v(w())}]},[u,f,d,h]);var y=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},lu}var rv={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim/with-selector.development.js
145
145
  *
@@ -147,5 +147,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var tv;function MO(){return tv||(tv=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=w,e=Jy();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,f,d,h,p){var m=i(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var x=!1,T,P,O=function(A){if(!x){x=!0,T=A;var j=h(A);if(p!==void 0&&y.hasValue){var F=y.value;if(p(F,j))return P=F,F}return P=j,j}var _=T,M=P;if(r(_,A))return M;var N=h(A);return p!==void 0&&p(M,N)?M:(T=A,P=N,N)},k=d===void 0?null:d,D=function(){return O(f())},L=k===null?void 0:function(){return O(k())};return[D,L]},[f,d,h,p]),b=v[0],g=v[1],S=o(u,b,g);return s(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}ev.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ev}process.env.NODE_ENV==="production"?DO():MO();const no=t=>{const e=w.useRef(t??{});return w.useEffect(()=>void(e.current=t),[t]),e},RO=t=>{const e=w.useRef();return w.useEffect(()=>{e.current=t},[t]),e.current},FO=t=>Object.entries(t),nv=t=>t instanceof Promise,rv=(t,e,n,r)=>e===t?n.reduce((o,i)=>i(o,e,r),t):t.constructor.name===Object.name?n.reduce((o,i)=>i(o,e,r),{...e,...t}):n.reduce((o,i)=>i(o,e,r),t),LO=(t,e,n,r,o,i)=>(...s)=>{const a=performance.now(),l=e(...s),c=(u,f)=>n(d=>rv(u,d,i,f));return nv(l)?l.then(u=>{o.current={method:t,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:t,props:r(),time:performance.now()-a},void c(l,o.current))},NO=(t,e,n,r,o,i)=>(...s)=>{o.current={method:t,time:0,props:r()};const a=e(...s),l=c=>n(u=>rv(c,u,i,o.current));return nv(a)?a.then(c=>l(c)):l(a)},VO=(t,e,n)=>{const[r,o]=w.useState(()=>t),i=no(r),s=no((n==null?void 0:n.props)??{}),a=no(e),l=no((n==null?void 0:n.postMiddleware)??[]),c=no((n==null?void 0:n.interceptor)??[]),u=w.useRef(t),f=RO(r),d=no(f),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[p]=w.useState(()=>{const m=()=>s.current,y=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>d.current});return FO(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?LO(b,g,o,m,h,c.current):NO(b,g,o,m,h,c.current)}),{})});return[r,p,s.current]},Ws=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),ov=(t,e,n)=>t.split(e).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),iv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},sv=(t,e)=>{const n=ov(e,iv.basic,t)||ov(e,iv.extend,t);return n===void 0||n===t?void 0:n},$O=()=>typeof window>"u";var jO={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=(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}},i=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),s=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=${s(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${s(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,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((x,T)=>{const P=T.parse(b);return P===""?x:x.concat(P)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},h=y=>{const v=new Set,b=g=>{y().removeItem(g);const S=i(y());v.forEach(x=>x(S))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?i(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{e(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),v.forEach(x=>x(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);t.Cookie=d,t.LocalStorage=m,t.SessionStorage=p,t.createStorage=h})(jO);const av=t=>t.headerLabel??t.thead??t.id,lv=t=>t.map(e=>({value:e.id,label:e.thead??e.headerLabel??e.id}));var ai=(t=>(t.Boolean="boolean",t.Number="number",t.Select="select",t.Text="text",t))(ai||{});const uu=t=>t.type==="number"?t.valueAsNumber:t.value,wt={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"}},fu={[ai.Text]:[wt.is,wt.isNot,wt.contains,wt.notContains,wt.startsWith,wt.endsWith],[ai.Boolean]:[wt.is,wt.isNot],[ai.Number]:[wt.is,wt.isNot,wt.greaterThan,wt.lessThan]},Hs=(t,e={})=>{var s;const n=t.id,r=t.type??ai.Text,o=(s=fu[r])==null?void 0:s[0].value,i=wt[o];return{id:Ws(),operation:i,label:av(t),name:n,type:r,value:"",...e}},BO=t=>{const e=()=>{const s=t.cols.at(0);t.set(a=>[...a,Hs(s)])},n=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>{if(a!==u.id)return u;const f=t.cols.find(d=>l===d.id);return Hs(f,{value:""})}))},r=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>u.id===a?{...u,operation:wt[l]}:u))},o=s=>{const a=s.currentTarget.dataset.id||"";console.log({id:a,f:t.filters}),t.set(l=>l.filter(c=>c.id!==a))},i=s=>{const a=s.target.dataset.id||"",l=uu(s.target);t.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return E.jsx(w.Fragment,{children:E.jsx(Po,{arrow:!1,title:"Filters",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(Kf,{size:14}),"Filtros ",t.filters.length===0?"":` (${t.filters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.filters.map(s=>{const a=fu[s.type];return E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(er,{title:"Filtro",options:t.options,placeholder:"Seleciona um campo...",value:s.name,"data-id":s.id,onChange:n}),E.jsx(er,{title:"Tipo do filtro","data-id":s.id,onChange:r,value:s.operation.value,options:a,placeholder:"Operação..."}),E.jsx(Ya,{"data-id":s.id,onChange:i,placeholder:"Buscar por...",title:"Valor do filtro",type:s.type,value:s.value}),E.jsx("div",{className:"flex items-center justify-center mt-5",children:E.jsx("button",{"data-id":s.id,type:"button",onClick:o,children:E.jsx(xo,{className:"text-danger",size:16})})})]},`filter-select-${s.id}`)}),E.jsx("li",{children:E.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(ja,{size:14})," Adicionar novo filtro"]})})]})})})},zO=({filter:t,set:e})=>{const n=o=>{const i=o.target.value,s=o.target.dataset.id||"";e(a=>a.map(l=>l.id===s?{...l,operation:wt[i]}:l))},r=o=>{const i=o.target.dataset.id||"",s=uu(o.target);e(a=>a.map(l=>l.id===i?{...l,value:s}:l))};return E.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[E.jsx(er,{onChange:n,value:t.operation.value,options:fu[t.type],placeholder:"Operation..."}),E.jsx(Ya,{type:t.type,"data-id":t.id,onChange:r,placeholder:"Looking for...",value:t.value})]})},WO=({item:t,onPointerDown:e})=>{const n=hc(0);return E.jsxs(ys.Item,{onPointerDown:e,id:t.groupId,className:"flex flex-row items-center gap-2",value:t,style:{y:n},children:[E.jsx("button",{className:"cursor-grab",children:E.jsx(_0,{size:14})}),E.jsx("span",{children:t.groupName})]},t.groupId)},HO=t=>{var a;const e=lv(t.cols),n=LC(),[r,o]=w.useState(((a=t.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new cg(t.rows).GroupBy(u),p=t.cols.find(y=>y.id===u);t.setGroups(PO(h).map((y,v)=>{const b=h[y];return{...p,groupId:Ws(),groupKey:u,index:v,rows:b,groupName:y}}))},s=l=>t.setGroups([]);return E.jsx(w.Fragment,{children:E.jsxs(Po,{arrow:!1,title:"Groups",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(P0,{size:14}),"Groups",t.groups.length>0?` - ${r}(${t.groups.length})`:""]}),children:[E.jsxs("div",{className:"flex flex-nowrap items-center",children:[E.jsx(er,{value:r,title:"Tipo de agrupamento",onChange:i,options:e,placeholder:"Agrupar por..."}),E.jsx(Ki,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:E.jsx(xo,{size:16,className:"text-danger"})})]}),t.groups.length>0?E.jsxs("section",{className:"my-4",children:[E.jsx("header",{children:E.jsx("h2",{className:"text-xl font-medium",children:"Ordenar grupos"})}),E.jsx(wC,{children:E.jsx(ys.Group,{axis:"y",className:"relative space-y-2",dragListener:!1,dragControls:n,drag:!0,layoutScroll:!0,onReorder:t.setGroups,values:t.groups,children:t.groups.map(l=>E.jsx(WO,{item:l,onPointerDown:c=>{n.start(c),t.setGroups([...t.groups])}},l.groupId))})})]}):null]})})},UO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),GO=(t,e)=>t.sort(UO(e)),du={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},KO=[du.asc,du.desc],hu=(t,e="asc")=>({id:Ws(),type:e,value:t.id,label:du.asc.label}),ZO=t=>{const e=()=>{const i=t.cols[0];i&&t.set(s=>[...s,hu(i)])},n=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,value:a}:c))},r=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,type:a}:c))},o=i=>{const s=i.currentTarget.dataset.id||"";t.set(a=>a.filter(l=>l.id!==s))};return E.jsx(w.Fragment,{children:E.jsx(Po,{arrow:!1,title:"Order By",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[E.jsx(Gf,{size:14}),"Order by ",t.sorters.length===0?"":` (${t.sorters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.sorters.map(i=>E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(er,{onChange:n(i.id),options:t.options,placeholder:"Selecione um campo...",value:i.value}),E.jsx(er,{onChange:r(i.id),value:i.type,options:KO,placeholder:"Operação..."}),E.jsx("button",{className:"mt-4","data-id":i.id,onClick:o,children:E.jsx(xo,{className:"text-danger",size:14})})]},`sorter-select-${i.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(ja,{size:14})," Adicionar ordenação"]})})]})})})},qO=t=>{const e=t.sorters.find(i=>i.id===t.col.id),[n,r]=w.useState(e?e.type:"undefined"),o=()=>r(i=>i==="undefined"?"asc":i==="asc"?"desc":"undefined");return w.useEffect(()=>{t.setSorters(i=>{if(n==="undefined")return i.filter(a=>a.value!==t.col.id);const s=i.findIndex(a=>a.value===t.col.id);return s===-1?[...i,hu(t.col,n)]:(i[s]=hu(t.col,n),[...i])})},[n,t.col]),E.jsxs("button",{className:"isolate flex items-center",onClick:o,children:[n==="asc"?E.jsx($a,{size:14}):null,n==="desc"?E.jsx(T0,{size:14}):null,n==="undefined"?E.jsx(Gf,{size:14}):null]})},YO=t=>E.jsx("header",{className:"min-w-full mb-1",children:E.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[E.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[E.jsx("p",{children:E.jsx(BO,{cols:t.cols,options:t.options,filters:t.filters,set:t.setFilters})}),E.jsx("p",{children:E.jsx(ZO,{options:t.options,cols:t.cols,sorters:t.sorters,set:t.setSorters})}),E.jsx("p",{children:E.jsx(HO,{rows:t.rows,groups:t.groups,setGroups:t.setGroups,options:t.options,cols:t.cols})})]}),E.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:t.filters.map(e=>E.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[E.jsxs("span",{children:[E.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),e.label," ",e.operation.label.toLowerCase(),":"]}),E.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[E.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:e.value||" "}),E.jsx("input",{type:e.type,value:e.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=uu(n.target);t.setFilters(o=>o.map(i=>e.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${e.id}`))})]})}),cv=(t,e)=>{const[n,r]=w.useState(()=>e||t);return w.useEffect(()=>{r(t)},[t]),[n,r]},XO={opacity:1},JO={opacity:.75,backgroundColor:"#a1a1aa"},QO={opacity:0,transition:{duration:.4,type:"spring"}},eI=t=>{var n;const e=t.filters.filter(r=>r.name===t.header.id);return E.jsx(ys.Item,{...t.header.thProps,as:"th",exit:QO,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:t.header,whileDrag:JO,animate:XO,className:`hidden px-2 py-4 first:table-cell md:table-cell ${((n=t.header.thProps)==null?void 0:n.className)??""}`,children:E.jsx("span",{className:"flex items-center justify-between",children:E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsxs(Po,{arrow:!0,trigger:E.jsx(Kf,{size:14}),onChange:r=>{r&&t.setFilters(o=>o.concat(Hs(t.header,{})))},children:["Filter by: ",av(t.header),e.length===0===null?null:E.jsxs("ul",{children:[e.map(r=>E.jsx("li",{className:"my-1",children:E.jsx(zO,{filter:r,set:t.setFilters})},`thead-filter-${r.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:()=>t.setFilters(r=>r.concat(Hs(t.header))),className:"text-primary-muted flex items-center",children:[E.jsx(ja,{size:14})," Add"]})})]})]}),E.jsx("span",{className:"pointer-events-auto text-balance text-base",children:t.header.thead}),E.jsx(qO,{col:t.header,setSorters:t.setSorters,sorters:t.sorters})]})})})},tI=t=>{const[e,n]=cv(t.headers),r=()=>t.setCols(e);return E.jsx(ys.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e,onReorder:n,onPointerUp:r,className:"bg-table-background border-none text-lg",children:E.jsx(Hm,{children:e.map(o=>E.jsx(eI,{setFilters:t.setFilters,filters:t.filters,setSorters:t.setSorters,sorters:t.sorters,header:o},`header-child-item-${o.id}`))})})},nI=w.forwardRef((t,e)=>E.jsx("tbody",{...t,className:`divide-y divide-table-row ${t.className??""}`,ref:e,children:E.jsx(Hm,{children:t.children})})),rI=w.forwardRef((t,e)=>E.jsx("table",{...t,ref:e,className:`table min-w-full divide-y divide-table-border table-auto text-left ${t.className??""}`})),oI=w.forwardRef((t,e)=>E.jsx("thead",{...t,className:"bg-content-bg shadow-xs group:sticky top-0",ref:e})),iI=w.forwardRef((t,e)=>E.jsx("tr",{...t,ref:e,className:`table-row ${t.className??""}`})),sI={TableHead:oI,Table:rI,TableBody:nI,TableRow:iI},aI=[0,0,0,0,0,0,0,0,0,0],uv=({filters:t,setCols:e,setFilters:n,sorters:r,cols:o,setSorters:i,...s})=>{const a=w.useMemo(()=>{if(s.loading)return aI;const l=new cg(s.rows);return t.length>0&&t.forEach(c=>c.value===""||Number.isNaN(c.value)?void 0:l.Where(c.name,c.operation.symbol,c.value)),r.length===0?l.Select():GO(l.Select(),r)},[s.rows,t,r,s.loading]);return E.jsx("div",{className:"group border border-table-border rounded-lg px-1 min-w-full",children:E.jsx(E_,{data:a,totalCount:a.length,useWindowScroll:!0,components:sI,fixedHeaderContent:()=>E.jsx(tI,{sorters:r,setSorters:i,filters:t,setFilters:n,headers:o,setCols:e}),itemContent:(l,c)=>o.map((u,f)=>{const d=`${f},${l}`,h=sv(c,u.id),p=u.Element;return w.createElement("td",{...u.cellProps,"data-matrix":d,key:`accessor-${l}-${f}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},s.loading?E.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):p?E.jsx(p,{row:c,matrix:d,col:u,rowIndex:l,value:h}):E.jsx(w.Fragment,{children:zs.nil(h)?"":h}))})})})},lI=(t,e)=>typeof e=="function"?e(t):e,cI=t=>{const e=w.useMemo(()=>lv(t.cols),[t.cols]),[n,r]=VO({cols:t.cols,filters:t.filters??[],groups:t.groups??[],sorters:t.sorters??[]},o=>{const i=s=>a=>{const l=o.state();return{...l,[s]:lI(l[s],a)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{interceptor:[o=>{var i;return(i=t.set)==null||i.call(t,o),o}]});return E.jsxs("div",{className:"relative min-w-full",children:[E.jsx(YO,{setCols:r.cols,rows:t.rows,cols:n.cols,filters:n.filters,groups:n.groups,options:e,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}),n.groups.length===0?E.jsx(uv,{...t,cols:n.cols,filters:n.filters,groups:n.groups,index:0,optionCols:e,options:e,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}):E.jsx("div",{className:"flex flex-wrap gap-4",children:n.groups.map((o,i)=>E.jsx(fc.div,{className:"min-w-full",children:E.jsx(uv,{...t,cols:n.cols,filters:n.filters,group:o,groups:n.groups,index:i,optionCols:e,options:e,rows:o.rows,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters})},`group-${o.groupId}`))})]})};var uI=String.prototype.replace,fI=/%20/g,pu={RFC1738:"RFC1738",RFC3986:"RFC3986"},mu={default:pu.RFC3986,formatters:{RFC1738:function(t){return uI.call(t,fI,"+")},RFC3986:function(t){return String(t)}},RFC1738:pu.RFC1738,RFC3986:pu.RFC3986},dI=mu,gu=Object.prototype.hasOwnProperty,mr=Array.isArray,on=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),hI=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(mr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},fv=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},pI=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(mr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!gu.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return mr(e)&&!mr(n)&&(o=fv(e,r)),mr(e)&&mr(n)?(n.forEach(function(i,s){if(gu.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return gu.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},mI=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},gI=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},yu=1024,yI=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=yu){for(var c=s.length>=yu?s.slice(l,l+yu):s,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===dI.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=on[d];continue}if(d<2048){u[u.length]=on[192|d>>6]+on[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=on[224|d>>12]+on[128|d>>6&63]+on[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=on[240|d>>18]+on[128|d>>12&63]+on[128|d>>6&63]+on[128|d&63]}a+=u.join("")}return a},vI=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return hI(n),e},bI=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},xI=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},wI=function(e,n){return[].concat(e,n)},SI=function(e,n){if(mr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},dv={arrayToObject:fv,assign:mI,combine:wI,compact:vI,decode:gI,encode:yI,isBuffer:xI,isRegExp:bI,maybeMap:SI,merge:pI},hv=aO,Us=dv,li=mu,TI=Object.prototype.hasOwnProperty,pv={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},sn=Array.isArray,EI=Array.prototype.push,mv=function(t,e){EI.apply(t,sn(e)?e:[e])},CI=Date.prototype.toISOString,gv=li.default,et={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Us.encode,encodeValuesOnly:!1,format:gv,formatter:li.formatters[gv],indices:!1,serializeDate:function(e){return CI.call(e)},skipNulls:!1,strictNullHandling:!1},AI=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},vu={},_I=function t(e,n,r,o,i,s,a,l,c,u,f,d,h,p,m,y,v,b){for(var g=e,S=b,x=0,T=!1;(S=S.get(vu))!==void 0&&!T;){var P=S.get(e);if(x+=1,typeof P<"u"){if(P===x)throw new RangeError("Cyclic object value");T=!0}typeof S.get(vu)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&sn(g)&&(g=Us.maybeMap(g,function(C){return C instanceof Date?h(C):C})),g===null){if(s)return c&&!y?c(n,et.encoder,v,"key",p):n;g=""}if(AI(g)||Us.isBuffer(g)){if(c){var O=y?n:c(n,et.encoder,v,"key",p);return[m(O)+"="+m(c(g,et.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var k=[];if(typeof g>"u")return k;var D;if(r==="comma"&&sn(g))y&&c&&(g=Us.maybeMap(g,c)),D=[{value:g.length>0?g.join(",")||null:void 0}];else if(sn(u))D=u;else{var L=Object.keys(g);D=f?L.sort(f):L}var A=l?n.replace(/\./g,"%2E"):n,j=o&&sn(g)&&g.length===1?A+"[]":A;if(i&&sn(g)&&g.length===0)return j+"[]";for(var F=0;F<D.length;++F){var _=D[F],M=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&M===null)){var N=d&&l?_.replace(/\./g,"%2E"):_,z=sn(g)?typeof r=="function"?r(j,N):j:j+(d?"."+N:"["+N+"]");b.set(e,x);var q=hv();q.set(vu,b),mv(k,t(M,z,r,o,i,s,a,l,r==="comma"&&y&&sn(g)?null:c,u,f,d,h,p,m,y,v,q))}}return k},PI=function(e){if(!e)return et;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||et.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=li.default;if(typeof e.format<"u"){if(!TI.call(li.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=li.formatters[r],i=et.filter;(typeof e.filter=="function"||sn(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in pv?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=et.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:et.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:et.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:et.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:et.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?et.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:et.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:et.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:et.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:et.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:et.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:et.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:et.strictNullHandling}},OI=function(t,e){var n=t,r=PI(e),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):sn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=pv[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=hv(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||mv(s,_I(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},ro=dv,bu=Object.prototype.hasOwnProperty,II=Array.isArray,Ye={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},kI=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},yv=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},DI="utf8=%26%2310003%3B",MI="utf8=%E2%9C%93",RI=function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===MI?c="utf-8":s[l]===DI&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,Ye.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),Ye.decoder,c,"key"),p=ro.maybeMap(yv(u.slice(d+1),n),function(y){return n.decoder(y,Ye.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=kI(p)),u.indexOf("[]=")>-1&&(p=II(p)?[p]:p);var m=bu.call(r,h);m&&n.duplicates==="combine"?r[h]=ro.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},FI=function(t,e,n,r){for(var o=r?e:yv(e,n),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},LI=function(e,n,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&bu.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&bu.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),FI(u,n,r,o)}},NI=function(e){if(!e)return Ye;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?Ye.charset:e.charset,r=typeof e.duplicates>"u"?Ye.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Ye.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ye.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Ye.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Ye.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Ye.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ye.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Ye.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Ye.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Ye.decoder,delimiter:typeof e.delimiter=="string"||ro.isRegExp(e.delimiter)?e.delimiter:Ye.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Ye.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Ye.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Ye.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Ye.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ye.strictNullHandling}},VI=function(t,e){var n=NI(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?RI(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=LI(a,r[a],n,typeof t=="string");o=ro.merge(o,l,n)}return n.allowSparse===!0?o:ro.compact(o)},$I=OI,jI=VI,BI=mu,zI={formats:BI,parse:jI,stringify:$I},Ee;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ee||(Ee={}));var vv;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(vv||(vv={}));const te=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gr=t=>{switch(typeof t){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(t)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(t)?te.array:t===null?te.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.promise:typeof Map<"u"&&t instanceof Map?te.map:typeof Set<"u"&&t instanceof Set?te.set:typeof Date<"u"&&t instanceof Date?te.date:te.object;default:return te.unknown}},G=Ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class jt extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const ci=(t,e)=>{let n;switch(t.code){case G.invalid_type:t.received===te.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ee.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ee.joinValues(t.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ee.joinValues(t.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Ee.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ee.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case G.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case G.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ee.assertNever(t)}return{message:n}};let WI=ci;function xu(){return WI}const wu=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};function Q(t,e){const n=xu(),r=wu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ci?void 0:ci].filter(o=>!!o)});t.common.issues.push(r)}class St{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return de;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return St.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return de;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const de=Object.freeze({status:"aborted"}),ui=t=>({status:"dirty",value:t}),Ot=t=>({status:"valid",value:t}),bv=t=>t.status==="aborted",xv=t=>t.status==="dirty",Gs=t=>t.status==="valid",Ks=t=>typeof Promise<"u"&&t instanceof Promise;function Zs(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function wv(t,e,n,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ie;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ie||(ie={}));var fi,di;class an{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Sv=(t,e)=>{if(Gs(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new jt(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return gr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new St,ctx:{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Ks(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},i=this._parseSync({data:e,path:o.path,parent:o});return Sv(o,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Ks(o)?o:Promise.resolve(o));return Sv(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),a=()=>i.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Sn({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Tn.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return mi.create(this,this._def)}or(e){return Xs.create([this,e],this._def)}and(e){return Js.create(this,e,this._def)}transform(e){return new Sn({...ge(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ra({...ge(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new Av({typeName:ue.ZodBranded,type:this,...ge(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new oa({...ge(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ia.create(this,e)}readonly(){return sa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const HI=/^c[^\s-]{8,}$/i,UI=/^[0-9a-z]+$/,GI=/^[0-9A-HJKMNP-TV-Z]{26}$/,KI=/^[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,ZI=/^[a-z0-9_-]{21}$/i,qI=/^[-+]?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)?)??$/,YI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,XI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Su;const JI=/^(?:(?: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])$/,QI=/^(([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})))$/,ek=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Tv="((\\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])))",tk=new RegExp(`^${Tv}$`);function Ev(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function nk(t){return new RegExp(`^${Ev(t)}$`)}function rk(t){let e=`${Tv}T${Ev(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function ok(t,e){return!!((e==="v4"||!e)&&JI.test(t)||(e==="v6"||!e)&&QI.test(t))}class bn extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.string,received:i.parsedType}),de}const r=new St;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")YI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"email",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Su||(Su=new RegExp(XI,"u")),Su.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"emoji",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")KI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"uuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")ZI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"nanoid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")HI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")UI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid2",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")GI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ulid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Q(o,{validation:"url",code:G.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"regex",code:G.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?rk(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?tk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?nk(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?qI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"duration",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?ok(e.data,i.version)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ip",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ek.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"base64",code:G.invalid_string,message:i.message}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:G.invalid_string,...ie.errToObj(r)})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ie.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ie.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ie.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ie.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ie.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ie.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ie.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ie.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ie.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ie.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ie.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ie.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ie.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ie.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ie.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ie.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ie.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ie.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ie.errToObj(n)})}nonempty(e){return this.min(1,ie.errToObj(e))}trim(){return new bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}bn.create=t=>{var e;return new bn({checks:[],typeName:ue.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};function ik(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(t.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class yr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==te.number){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.number,received:i.parsedType}),de}let r;const o=new St;for(const i of this._def.checks)i.kind==="int"?Ee.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?ik(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_finite,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new yr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new yr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ie.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ie.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}yr.create=t=>new yr({checks:[],typeName:ue.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class oo extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==te.bigint){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.bigint,received:i.parsedType}),de}let r;const o=new St;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new oo({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new oo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}oo.create=t=>{var e;return new oo({checks:[],typeName:ue.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};class Tu extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),de}return Ot(e.data)}}Tu.create=t=>new Tu({typeName:ue.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class hi extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.date,received:i.parsedType}),de}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_date}),de}const r=new St;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new hi({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ie.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ie.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}hi.create=t=>new hi({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ue.ZodDate,...ge(t)});class Eu extends xe{_parse(e){if(this._getType(e)!==te.symbol){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),de}return Ot(e.data)}}Eu.create=t=>new Eu({typeName:ue.ZodSymbol,...ge(t)});class qs extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),de}return Ot(e.data)}}qs.create=t=>new qs({typeName:ue.ZodUndefined,...ge(t)});class Ys extends xe{_parse(e){if(this._getType(e)!==te.null){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),de}return Ot(e.data)}}Ys.create=t=>new Ys({typeName:ue.ZodNull,...ge(t)});class Cu extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return Ot(e.data)}}Cu.create=t=>new Cu({typeName:ue.ZodAny,...ge(t)});class io extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ot(e.data)}}io.create=t=>new io({typeName:ue.ZodUnknown,...ge(t)});class Zn extends xe{_parse(e){const n=this._getOrReturnCtx(e);return Q(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),de}}Zn.create=t=>new Zn({typeName:ue.ZodNever,...ge(t)});class Au extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),de}return Ot(e.data)}}Au.create=t=>new Au({typeName:ue.ZodVoid,...ge(t)});class Kt extends xe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==te.array)return Q(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),de;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(Q(n,{code:s?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Q(n,{code:G.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Q(n,{code:G.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new an(n,s,n.path,a)))).then(s=>St.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new an(n,s,n.path,a)));return St.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Kt({...this._def,minLength:{value:e,message:ie.toString(n)}})}max(e,n){return new Kt({...this._def,maxLength:{value:e,message:ie.toString(n)}})}length(e,n){return new Kt({...this._def,exactLength:{value:e,message:ie.toString(n)}})}nonempty(e){return this.min(1,e)}}Kt.create=(t,e)=>new Kt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...ge(e)});function so(t){if(t instanceof Ze){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Tn.create(so(r))}return new Ze({...t._def,shape:()=>e})}else return t instanceof Kt?new Kt({...t._def,type:so(t.element)}):t instanceof Tn?Tn.create(so(t.unwrap())):t instanceof br?br.create(so(t.unwrap())):t instanceof wn?wn.create(t.items.map(e=>so(e))):t}class Ze extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ee.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==te.object){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),de}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new an(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Zn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(Q(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new an(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=>St.mergeObjectSync(r,c)):St.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ie.errToObj,new Ze({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ze({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ze({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ze({...this._def,catchall:e})}pick(e){const n={};return Ee.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}omit(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return so(this)}partial(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}),new Ze({...this._def,shape:()=>n})}required(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Tn;)i=i._def.innerType;n[r]=i}}),new Ze({...this._def,shape:()=>n})}keyof(){return Cv(Ee.objectKeys(this.shape))}}Ze.create=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)}),Ze.strictCreate=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strict",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)}),Ze.lazycreate=(t,e)=>new Ze({shape:t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});class Xs extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new jt(a.ctx.common.issues));return Q(n,{code:G.invalid_union,unionErrors:s}),de}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new jt(l));return Q(n,{code:G.invalid_union,unionErrors:a}),de}}get options(){return this._def.options}}Xs.create=(t,e)=>new Xs({options:t,typeName:ue.ZodUnion,...ge(e)});const xn=t=>t instanceof ea?xn(t.schema):t instanceof Sn?xn(t.innerType()):t instanceof ta?[t.value]:t instanceof vr?t.options:t instanceof na?Ee.objectValues(t.enum):t instanceof ra?xn(t._def.innerType):t instanceof qs?[void 0]:t instanceof Ys?[null]:t instanceof Tn?[void 0,...xn(t.unwrap())]:t instanceof br?[null,...xn(t.unwrap())]:t instanceof Av||t instanceof sa?xn(t.unwrap()):t instanceof oa?xn(t._def.innerType):[];class _u extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.object)return Q(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),de;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Q(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),de)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const o=new Map;for(const i of n){const s=xn(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new _u({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...ge(r)})}}function Pu(t,e){const n=gr(t),r=gr(e);if(t===e)return{valid:!0,data:t};if(n===te.object&&r===te.object){const o=Ee.objectKeys(e),i=Ee.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(const a of i){const l=Pu(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===te.array&&r===te.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=e[i],l=Pu(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Js extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(bv(i)||bv(s))return de;const a=Pu(i.value,s.value);return a.valid?((xv(i)||xv(s))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:G.invalid_intersection_types}),de)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Js.create=(t,e,n)=>new Js({left:t,right:e,typeName:ue.ZodIntersection,...ge(n)});class wn extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.array)return Q(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),de;if(r.data.length<this._def.items.length)return Q(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),de;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new an(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>St.mergeArray(n,s)):St.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new wn({...this._def,rest:e})}}wn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn({items:t,typeName:ue.ZodTuple,rest:null,...ge(e)})};class Qs extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.object)return Q(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),de;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new an(r,a,r.path,a)),value:s._parse(new an(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?St.mergeObjectAsync(n,o):St.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof xe?new Qs({keyType:e,valueType:n,typeName:ue.ZodRecord,...ge(r)}):new Qs({keyType:bn.create(),valueType:e,typeName:ue.ZodRecord,...ge(n)})}}class Ou extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.map)return Q(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),de;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new an(r,a,r.path,[c,"key"])),value:i._parse(new an(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Ou.create=(t,e,n)=>new Ou({valueType:e,keyType:t,typeName:ue.ZodMap,...ge(n)});class ao extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.set)return Q(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),de;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(Q(r,{code:G.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(Q(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return de;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new an(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new ao({...this._def,minSize:{value:e,message:ie.toString(n)}})}max(e,n){return new ao({...this._def,maxSize:{value:e,message:ie.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}ao.create=(t,e)=>new ao({valueType:t,minSize:null,maxSize:null,typeName:ue.ZodSet,...ge(e)});class pi extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.function)return Q(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),de;function r(a,l){return wu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xu(),ci].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return wu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xu(),ci].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof mi){const a=this;return Ot(async function(...l){const c=new jt([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return Ot(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new jt([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new jt([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new pi({...this._def,args:wn.create(e).rest(io.create())})}returns(e){return new pi({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new pi({args:e||wn.create([]).rest(io.create()),returns:n||io.create(),typeName:ue.ZodFunction,...ge(r)})}}class ea extends xe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ea.create=(t,e)=>new ea({getter:t,typeName:ue.ZodLazy,...ge(e)});class ta extends xe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Q(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),de}return{status:"valid",value:e.data}}get value(){return this._def.value}}ta.create=(t,e)=>new ta({value:t,typeName:ue.ZodLiteral,...ge(e)});function Cv(t,e){return new vr({values:t,typeName:ue.ZodEnum,...ge(e)})}class vr extends xe{constructor(){super(...arguments),fi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{expected:Ee.joinValues(r),received:n.parsedType,code:G.invalid_type}),de}if(Zs(this,fi)||wv(this,fi,new Set(this._def.values)),!Zs(this,fi).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{received:n.data,code:G.invalid_enum_value,options:r}),de}return Ot(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return vr.create(e,{...this._def,...n})}exclude(e,n=this._def){return vr.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}fi=new WeakMap,vr.create=Cv;class na extends xe{constructor(){super(...arguments),di.set(this,void 0)}_parse(e){const n=Ee.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Ee.objectValues(n);return Q(r,{expected:Ee.joinValues(o),received:r.parsedType,code:G.invalid_type}),de}if(Zs(this,di)||wv(this,di,new Set(Ee.getValidEnumValues(this._def.values))),!Zs(this,di).has(e.data)){const o=Ee.objectValues(n);return Q(r,{received:r.data,code:G.invalid_enum_value,options:o}),de}return Ot(e.data)}get enum(){return this._def.values}}di=new WeakMap,na.create=(t,e)=>new na({values:t,typeName:ue.ZodNativeEnum,...ge(e)});class mi extends xe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.promise&&n.common.async===!1)return Q(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),de;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return Ot(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mi.create=(t,e)=>new mi({type:t,typeName:ue.ZodPromise,...ge(e)});class Sn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{Q(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return de;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?de:l.status==="dirty"||n.value==="dirty"?ui(l.value):l});{if(n.value==="aborted")return de;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?de:a.status==="dirty"||n.value==="dirty"?ui(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gs(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Gs(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ee.assertNever(o)}}Sn.create=(t,e,n)=>new Sn({schema:t,typeName:ue.ZodEffects,effect:e,...ge(n)}),Sn.createWithPreprocess=(t,e,n)=>new Sn({schema:e,effect:{type:"preprocess",transform:t},typeName:ue.ZodEffects,...ge(n)});class Tn extends xe{_parse(e){return this._getType(e)===te.undefined?Ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tn.create=(t,e)=>new Tn({innerType:t,typeName:ue.ZodOptional,...ge(e)});class br extends xe{_parse(e){return this._getType(e)===te.null?Ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}br.create=(t,e)=>new br({innerType:t,typeName:ue.ZodNullable,...ge(e)});class ra extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ra.create=(t,e)=>new ra({innerType:t,typeName:ue.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});class oa extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ks(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new jt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}oa.create=(t,e)=>new oa({innerType:t,typeName:ue.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});class Iu extends xe{_parse(e){if(this._getType(e)!==te.nan){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),de}return{status:"valid",value:e.data}}}Iu.create=t=>new Iu({typeName:ue.ZodNaN,...ge(t)});class Av extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ia extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?de:i.status==="dirty"?(n.dirty(),ui(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?de:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new ia({in:e,out:n,typeName:ue.ZodPipeline})}}class sa extends xe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(Gs(o)&&(o.value=Object.freeze(o.value)),o);return Ks(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}sa.create=(t,e)=>new sa({innerType:t,typeName:ue.ZodReadonly,...ge(e)}),Ze.lazycreate;var ue;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ue||(ue={})),bn.create,yr.create,Iu.create,oo.create,Tu.create,hi.create,Eu.create,qs.create,Ys.create,Cu.create,io.create,Zn.create,Au.create,Kt.create,Ze.create,Ze.strictCreate,Xs.create,_u.create,Js.create,wn.create,Qs.create,Ou.create,ao.create,pi.create,ea.create,ta.create,vr.create,na.create,mi.create,Sn.create,Tn.create,br.create,Sn.createWithPreprocess,ia.create;const sk={sort:(t,e)=>t.localeCompare(e),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},_v=t=>{const e=new FormData(t),n=new URLSearchParams(e);return zI.parse(n.toString(),sk)},Pv=t=>t.replace("[",".").replace("]","").split("."),ku=(t,e)=>Pv(t).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof Kt?o.element:o},e),aa=t=>t.type==="checkbox"?t.checked:t.type==="number"?t.valueAsNumber:t.value,ak=t=>{const[e,n]=w.useState(null),r=w.useRef({}),o=(l,c)=>{const u=ku(l,t);return{...c,name:l,id:l,error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},i=(l,c)=>{const u=ku(l,t);return{...c,name:l,id:l,type:zs.instance(u,yr)?"number":(c==null?void 0:c.type)??"text",error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};w.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(aa(u.element)),d=p=>{const m=u.schema.safeParse(aa(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...S}=b||{};return S===null||zs.empty(S)?null:S});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,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const s=w.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(aa(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=zs.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=_v(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=Ky(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=Ky(f,h.name,aa(h))}}),l({form:u,json:f,event:c,reset:()=>rh(u)})},[]);return{input:i,select:o,onSubmit:a,errors:e,onInvalid:s,disabled:e!==null}},lk={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},colors:{foreground:"#f8fafc",background:"#191817",accent:"#0ea5e9",disabled:"#52525b",primary:{foreground:"#f8fafc",DEFAULT:"#0ea5e9",subtle:"#bae6fd",hover:"#0284c7"},secondary:{DEFAULT:"#475569",subtle:"#cbd5e1",hover:"#334155"},info:{DEFAULT:"#3b82f6",subtle:"#93c5fd",hover:"#1d4ed8"},danger:{DEFAULT:"#ef4444",subtle:"#fca5a5",hover:"#dc2626"},success:{DEFAULT:"#10b981",subtle:"#6ee7b7",hover:"#047857"},input:{border:"#52525b",placeholder:"#94a3b8","mask-error":"#fca5a5","switch-bg":"#171717",switch:"#fff"},card:{background:"#27272a",border:"#3f3f46",overlay:"#00000080"},floating:{background:"#252525",border:"#3f3f46",overlay:"#00000080"},tooltip:{background:"#141414",border:"#27272a"},table:{background:"#27272a",border:"#52525b",row:"#3f3f46"}}},ck={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},colors:{foreground:"#334155",background:"#f1f5f9",accent:"#0ea5e9",disabled:"#52525b",primary:{foreground:"#f8fafc",DEFAULT:"#0ea5e9",subtle:"#bae6fd",hover:"#0284c7"},secondary:{DEFAULT:"#475569",subtle:"#cbd5e1",hover:"#334155"},info:{DEFAULT:"#3b82f6",subtle:"#93c5fd",hover:"#1d4ed8"},danger:{DEFAULT:"#ef4444",subtle:"#fca5a5",hover:"#dc2626"},success:{DEFAULT:"#10b981",subtle:"#6ee7b7",hover:"#047857"},input:{border:"#52525b",placeholder:"#94a3b8","mask-error":"#fca5a5","switch-bg":"#171717",switch:"#fff"},card:{background:"#ffffff",border:"#e2e8f0",overlay:"#00000080"},floating:{background:"#ffffff",border:"#e2e8f0",overlay:"#00000080"},tooltip:{background:"#141414",border:"#27272a"},table:{background:"#ffffff",border:"#e2e8f0",row:"#94a3b8"}}},uk={cssVariable:(t,e,n)=>`var(--${n})`,rgba:t=>`rgba(${t})`,rgb:t=>`rgb(${t})`,hsl:t=>`hsl(${t})`,hsla:t=>`hsla(${t})`,hex:t=>t,raw:t=>t},Ov=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(e(s,l,a))}return o.concat(Ov(s,e,n,a))},[]),Iv=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:e(s,i,a)}}return{...o,[i]:Iv(s,e,n,a)}},{}),kv={default:t=>`:root { ${t} }`,dark:t=>`html.dark {${t}}`},Dv=(t,e)=>{const n=t.map(r=>`${r.key}: ${r.value}`).join(";");return e(n)},fk={default:t=>Dv(t,kv.default),dark:t=>Dv(t,kv.dark)};pe.Autocomplete=hx,pe.Button=Ki,pe.ButtonGroup=Ww,pe.Card=Qw,pe.Dropdown=Po,pe.FileUpload=qw,pe.Form=Xw,pe.Input=Ya,pe.InputFeedback=nd,pe.InputField=Vi,pe.Option=od,pe.Polymorph=Gi,pe.Select=er,pe.Switch=Jw,pe.Table=cI,pe.Tooltip=eS,pe.convertPath=Pv,pe.createDesignTokens=Iv,pe.createStyles=fk,pe.css=zt,pe.defaultDarkTheme=lk,pe.defaultLightTheme=ck,pe.formReset=rh,pe.formToJson=_v,pe.getSchemaShape=ku,pe.isReactComponent=cx,pe.isSsr=$O,pe.mergeRefs=Wa,pe.parsers=uk,pe.path=sv,pe.reduceTokens=Ov,pe.useForm=ak,pe.usePrevious=rd,pe.useReactive=cv,pe.uuid=Ws,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})});
150
+ */var ov;function LO(){return ov||(ov=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=x,e=tv();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function c(u,f,d,h,p){var m=i(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var w=!1,T,P,O=function(A){if(!w){w=!0,T=A;var j=h(A);if(p!==void 0&&y.hasValue){var R=y.value;if(p(R,j))return P=R,R}return P=j,j}var _=T,M=P;if(r(_,A))return M;var N=h(A);return p!==void 0&&p(M,N)?M:(T=A,P=N,N)},k=d===void 0?null:d,D=function(){return O(f())},L=k===null?void 0:function(){return O(k())};return[D,L]},[f,d,h,p]),b=v[0],g=v[1],S=o(u,b,g);return s(function(){y.hasValue=!0,y.value=S},[S]),l(S),S}rv.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),rv}process.env.NODE_ENV==="production"?RO():LO();const no=t=>{const e=x.useRef(t??{});return x.useEffect(()=>void(e.current=t),[t]),e},NO=t=>{const e=x.useRef();return x.useEffect(()=>{e.current=t},[t]),e.current},VO=t=>Object.entries(t),iv=t=>t instanceof Promise,sv=(t,e,n,r)=>e===t?n.reduce((o,i)=>i(o,e,r),t):t.constructor.name===Object.name?n.reduce((o,i)=>i(o,e,r),{...e,...t}):n.reduce((o,i)=>i(o,e,r),t),$O=(t,e,n,r,o,i)=>(...s)=>{const a=performance.now(),l=e(...s),c=(u,f)=>n(d=>sv(u,d,i,f));return iv(l)?l.then(u=>{o.current={method:t,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:t,props:r(),time:performance.now()-a},void c(l,o.current))},jO=(t,e,n,r,o,i)=>(...s)=>{o.current={method:t,time:0,props:r()};const a=e(...s),l=c=>n(u=>sv(c,u,i,o.current));return iv(a)?a.then(c=>l(c)):l(a)},BO=(t,e,n)=>{const[r,o]=x.useState(()=>t),i=no(r),s=no((n==null?void 0:n.props)??{}),a=no(e),l=no((n==null?void 0:n.postMiddleware)??[]),c=no((n==null?void 0:n.interceptor)??[]),u=x.useRef(t),f=NO(r),d=no(f),h=x.useRef(null);x.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[p]=x.useState(()=>{const m=()=>s.current,y=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>d.current});return VO(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?$O(b,g,o,m,h,c.current):jO(b,g,o,m,h,c.current)}),{})});return[r,p,s.current]},Hs=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),av=(t,e,n)=>t.split(e).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),lv={basic:/[,[\]]+?/,extend:/[,[\].]+?/},cv=(t,e)=>{const n=av(e,lv.basic,t)||av(e,lv.extend,t);return n===void 0||n===t?void 0:n},zO=()=>typeof window>"u";var WO={};(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=(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}},i=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),s=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=${s(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${s(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,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),S=f.reduce((w,T)=>{const P=T.parse(b);return P===""?w:w.concat(P)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=S,u()}},h=y=>{const v=new Set,b=g=>{y().removeItem(g);const S=i(y());v.forEach(w=>w(S))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?i(y()):y(),has:g=>{const S=y().getItem(g);return!n(S)},deleteAll:()=>{e(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,S)=>{y().setItem(g,JSON.stringify(S)),v.forEach(w=>w(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);t.Cookie=d,t.LocalStorage=m,t.SessionStorage=p,t.createStorage=h})(WO);const uv=t=>t.headerLabel??t.thead??t.id,fv=t=>t.map(e=>({value:e.id,label:e.thead??e.headerLabel??e.id}));var ci=(t=>(t.Boolean="boolean",t.Number="number",t.Select="select",t.Text="text",t))(ci||{});const fu=t=>t.type==="number"?t.valueAsNumber:t.value,wt={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"}},du={[ci.Text]:[wt.is,wt.isNot,wt.contains,wt.notContains,wt.startsWith,wt.endsWith],[ci.Boolean]:[wt.is,wt.isNot],[ci.Number]:[wt.is,wt.isNot,wt.greaterThan,wt.lessThan]},Us=(t,e={})=>{var s;const n=t.id,r=t.type??ci.Text,o=(s=du[r])==null?void 0:s[0].value,i=wt[o];return{id:Hs(),operation:i,label:uv(t),name:n,type:r,value:"",...e}},HO=t=>{const e=()=>{const s=t.cols.at(0);t.set(a=>[...a,Us(s)])},n=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>{if(a!==u.id)return u;const f=t.cols.find(d=>l===d.id);return Us(f,{value:""})}))},r=s=>{const a=s.target.dataset.id||"",l=s.target.value;t.set(c=>c.map(u=>u.id===a?{...u,operation:wt[l]}:u))},o=s=>{const a=s.currentTarget.dataset.id||"";t.set(l=>l.filter(c=>c.id!==a))},i=s=>{const a=s.target.dataset.id||"",l=fu(s.target);t.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return E.jsx(x.Fragment,{children:E.jsx(Ro,{arrow:!1,title:"Filters",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(qf,{size:14}),"Filtros ",t.filters.length===0?"":` (${t.filters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.filters.map(s=>{const a=du[s.type];return E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(rr,{title:"Filtro",options:t.options,placeholder:"Seleciona um campo...",value:s.name,"data-id":s.id,onChange:n}),E.jsx(rr,{title:"Tipo do filtro","data-id":s.id,onChange:r,value:s.operation.value,options:a,placeholder:"Operação..."}),E.jsx(Sl,{"data-id":s.id,onChange:i,placeholder:"Buscar por...",title:"Valor do filtro",type:s.type,value:s.value}),E.jsx("div",{className:"flex items-center justify-center mt-5",children:E.jsx("button",{"data-id":s.id,type:"button",onClick:o,children:E.jsx(xo,{className:"text-danger",size:16})})})]},`filter-select-${s.id}`)}),E.jsx("li",{children:E.jsxs("button",{type:"button",onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(Ba,{size:14})," Adicionar novo filtro"]})})]})})})},UO=({filter:t,set:e})=>{const n=o=>{const i=o.target.value,s=o.target.dataset.id||"";e(a=>a.map(l=>l.id===s?{...l,operation:wt[i]}:l))},r=o=>{const i=o.target.dataset.id||"",s=fu(o.target);e(a=>a.map(l=>l.id===i?{...l,value:s}:l))};return E.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[E.jsx(rr,{onChange:n,value:t.operation.value,options:du[t.type],placeholder:"Operation..."}),E.jsx(Sl,{type:t.type,"data-id":t.id,onChange:r,placeholder:"Looking for...",value:t.value})]})},GO=({item:t,onPointerDown:e})=>{const n=$c(0);return E.jsxs(_s.Item,{onPointerDown:e,id:t.groupId,className:"flex flex-row items-center gap-2",value:t,style:{y:n},children:[E.jsx("button",{className:"cursor-grab",children:E.jsx(P0,{size:14})}),E.jsx("span",{children:t.groupName})]},t.groupId)},KO=t=>{var a;const e=fv(t.cols),n=H_(),[r,o]=x.useState(((a=t.groups[0])==null?void 0:a.thead)||""),i=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new ny(t.rows).GroupBy(u),p=t.cols.find(y=>y.id===u);t.setGroups(Nw(h).map((y,v)=>{const b=h[y];return{...p,groupId:Hs(),groupKey:u,index:v,rows:b,groupName:y}}))},s=l=>t.setGroups([]);return E.jsx(x.Fragment,{children:E.jsxs(Ro,{arrow:!1,title:"Groups",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[E.jsx(O0,{size:14}),"Groups",t.groups.length>0?` - ${r}(${t.groups.length})`:""]}),children:[E.jsxs("div",{className:"flex flex-nowrap items-center",children:[E.jsx(rr,{value:r,title:"Tipo de agrupamento",onChange:i,options:e,placeholder:"Agrupar por..."}),E.jsx(rs,{className:"mt-4",onClick:s,theme:"raw","data-id":r,children:E.jsx(xo,{size:16,className:"text-danger"})})]}),t.groups.length>0?E.jsxs("section",{className:"my-4",children:[E.jsx("header",{children:E.jsx("h2",{className:"text-xl font-medium",children:"Ordenar grupos"})}),E.jsx(O_,{children:E.jsx(_s.Group,{axis:"y",className:"relative space-y-2",dragListener:!1,dragControls:n,drag:!0,layoutScroll:!0,onReorder:t.setGroups,values:t.groups,children:t.groups.map(l=>E.jsx(GO,{item:l,onPointerDown:c=>{n.start(c),t.setGroups([...t.groups])}},l.groupId))})})]}):null]})})},ZO=t=>(e,n)=>t.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=e[s]>n[s]?i:e[s]<n[s]?-i:0;return r!==0?r:a},0),qO=(t,e)=>t.sort(ZO(e)),hu={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},YO=[hu.asc,hu.desc],pu=(t,e="asc")=>({id:Hs(),type:e,value:t.id,label:hu.asc.label}),XO=t=>{const e=()=>{const i=t.cols[0];i&&t.set(s=>[...s,pu(i)])},n=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,value:a}:c))},r=i=>s=>{const a=s.target.value;t.set(l=>l.map(c=>c.id===i?{...c,type:a}:c))},o=i=>{const s=i.currentTarget.dataset.id||"";t.set(a=>a.filter(l=>l.id!==s))};return E.jsx(x.Fragment,{children:E.jsx(Ro,{arrow:!1,title:"Order By",trigger:E.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[E.jsx(Zf,{size:14}),"Order by ",t.sorters.length===0?"":` (${t.sorters.length})`]}),children:E.jsxs("ul",{className:"mt-4 space-y-2",children:[t.sorters.map(i=>E.jsxs("li",{className:"flex flex-nowrap gap-3",children:[E.jsx(rr,{onChange:n(i.id),options:t.options,placeholder:"Selecione um campo...",value:i.value}),E.jsx(rr,{onChange:r(i.id),value:i.type,options:YO,placeholder:"Operação..."}),E.jsx("button",{className:"mt-4","data-id":i.id,onClick:o,children:E.jsx(xo,{className:"text-danger",size:14})})]},`sorter-select-${i.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:e,className:"text-primary flex items-center gap-1",children:[E.jsx(Ba,{size:14})," Adicionar ordenação"]})})]})})})},JO=t=>{const e=t.sorters.find(i=>i.id===t.col.id),[n,r]=x.useState(e?e.type:"undefined"),o=()=>r(i=>i==="undefined"?"asc":i==="asc"?"desc":"undefined");return x.useEffect(()=>{t.setSorters(i=>{if(n==="undefined")return i.filter(a=>a.value!==t.col.id);const s=i.findIndex(a=>a.value===t.col.id);return s===-1?[...i,pu(t.col,n)]:(i[s]=pu(t.col,n),[...i])})},[n,t.col]),E.jsxs("button",{className:"isolate flex items-center",onClick:o,children:[n==="asc"?E.jsx(ja,{size:14}):null,n==="desc"?E.jsx(E0,{size:14}):null,n==="undefined"?E.jsx(Zf,{size:14}):null]})},QO=t=>E.jsx("header",{className:"min-w-full mb-1",children:E.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[E.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[E.jsx("p",{children:E.jsx(HO,{cols:t.cols,options:t.options,filters:t.filters,set:t.setFilters})}),E.jsx("p",{children:E.jsx(XO,{options:t.options,cols:t.cols,sorters:t.sorters,set:t.setSorters})}),E.jsx("p",{children:E.jsx(KO,{rows:t.rows,groups:t.groups,setGroups:t.setGroups,options:t.options,cols:t.cols})})]}),E.jsx("ul",{className:"flex flex-wrap w-full flex-1 flex-grow flex-row items-center md:justify-end gap-4",children:t.filters.map(e=>E.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[E.jsxs("span",{children:[E.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),e.label," ",e.operation.label.toLowerCase(),":"]}),E.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[E.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:e.value||" "}),E.jsx("input",{type:e.type,value:e.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=fu(n.target);t.setFilters(o=>o.map(i=>e.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${e.id}`))})]})}),dv=(t,e)=>{const[n,r]=x.useState(()=>e||t);return x.useEffect(()=>{r(t)},[t]),[n,r]},eI={opacity:1},tI={opacity:.75,backgroundColor:"#a1a1aa"},nI={opacity:0,transition:{duration:.4,type:"spring"}},rI=t=>{var n;const e=t.filters.filter(r=>r.name===t.header.id);return E.jsx(_s.Item,{...t.header.thProps,as:"th",exit:nI,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:t.header,whileDrag:tI,animate:eI,className:`hidden px-2 py-4 first:table-cell md:table-cell ${((n=t.header.thProps)==null?void 0:n.className)??""}`,children:E.jsx("span",{className:"flex items-center justify-between",children:E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsxs(Ro,{arrow:!0,trigger:E.jsx(qf,{size:14}),onChange:r=>{r&&t.setFilters(o=>o.concat(Us(t.header,{})))},children:["Filter by: ",uv(t.header),e.length===0===null?null:E.jsxs("ul",{children:[e.map(r=>E.jsx("li",{className:"my-1",children:E.jsx(UO,{filter:r,set:t.setFilters})},`thead-filter-${r.id}`)),E.jsx("li",{children:E.jsxs("button",{onClick:()=>t.setFilters(r=>r.concat(Us(t.header))),className:"text-primary-muted flex items-center",children:[E.jsx(Ba,{size:14})," Add"]})})]})]}),E.jsx("span",{className:"pointer-events-auto text-balance text-base",children:t.header.thead}),E.jsx(JO,{col:t.header,setSorters:t.setSorters,sorters:t.sorters})]})})})},oI=t=>{const[e,n]=dv(t.headers),r=()=>t.setCols(e);return E.jsx(_s.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e,onReorder:n,onPointerUp:r,className:"bg-table-background border-none text-lg",children:E.jsx(Ng,{children:e.map(o=>E.jsx(rI,{setFilters:t.setFilters,filters:t.filters,setSorters:t.setSorters,sorters:t.sorters,header:o},`header-child-item-${o.id}`))})})},iI=x.forwardRef((t,e)=>E.jsx("tbody",{...t,className:`divide-y divide-table-row ${t.className??""}`,ref:e,children:E.jsx(Ng,{children:t.children})})),sI=x.forwardRef((t,e)=>E.jsx("table",{...t,ref:e,className:`table min-w-full divide-y divide-table-border table-auto text-left ${t.className??""}`})),aI=x.forwardRef((t,e)=>E.jsx("thead",{...t,className:"bg-content-bg shadow-xs group:sticky top-0",ref:e})),lI=x.forwardRef((t,e)=>E.jsx("tr",{...t,ref:e,className:`table-row ${t.className??""}`})),cI={TableHead:aI,Table:sI,TableBody:iI,TableRow:lI},uI=[0,0,0,0,0,0,0,0,0,0],hv=({filters:t,setCols:e,setFilters:n,sorters:r,cols:o,setSorters:i,...s})=>{const a=x.useMemo(()=>{if(s.loading)return uI;const l=new ny(s.rows);return t.length>0&&t.forEach(c=>c.value===""||Number.isNaN(c.value)?void 0:l.Where(c.name,c.operation.symbol,c.value)),r.length===0?l.Select():qO(l.Select(),r)},[s.rows,t,r,s.loading]);return E.jsx("div",{className:"group border border-table-border rounded-lg px-1 min-w-full",children:E.jsx(DO,{data:a,totalCount:a.length,useWindowScroll:!0,components:cI,fixedHeaderContent:()=>E.jsx(oI,{sorters:r,setSorters:i,filters:t,setFilters:n,headers:o,setCols:e}),itemContent:(l,c)=>o.map((u,f)=>{const d=`${f},${l}`,h=cv(c,u.id),p=u.Element;return x.createElement("td",{...u.cellProps,"data-matrix":d,key:`accessor-${l}-${f}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},s.loading?E.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):p?E.jsx(p,{row:c,matrix:d,col:u,rowIndex:l,value:h}):E.jsx(x.Fragment,{children:Ao.nil(h)?"":h}))})})})},fI=(t,e)=>typeof e=="function"?e(t):e,dI=t=>{const e=x.useMemo(()=>fv(t.cols),[t.cols]),[n,r]=BO({cols:t.cols,filters:t.filters??[],groups:t.groups??[],sorters:t.sorters??[]},o=>{const i=s=>a=>{const l=o.state();return{...l,[s]:fI(l[s],a)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{interceptor:[o=>{var i;return(i=t.set)==null||i.call(t,o),o}]});return E.jsxs("div",{className:"relative min-w-full",children:[E.jsx(QO,{setCols:r.cols,rows:t.rows,cols:n.cols,filters:n.filters,groups:n.groups,options:e,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}),n.groups.length===0?E.jsx(hv,{...t,cols:n.cols,filters:n.filters,groups:n.groups,index:0,optionCols:e,options:e,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters}):E.jsx("div",{className:"flex flex-wrap gap-4",children:n.groups.map((o,i)=>E.jsx(Nc.div,{className:"min-w-full",children:E.jsx(hv,{...t,cols:n.cols,filters:n.filters,group:o,groups:n.groups,index:i,optionCols:e,options:e,rows:o.rows,setCols:r.cols,setFilters:r.filters,setGroups:r.groups,setSorters:r.sorters,sorters:n.sorters})},`group-${o.groupId}`))})]})};var hI=String.prototype.replace,pI=/%20/g,mu={RFC1738:"RFC1738",RFC3986:"RFC3986"},gu={default:mu.RFC3986,formatters:{RFC1738:function(t){return hI.call(t,pI,"+")},RFC3986:function(t){return String(t)}},RFC1738:mu.RFC1738,RFC3986:mu.RFC3986},mI=gu,yu=Object.prototype.hasOwnProperty,mr=Array.isArray,on=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),gI=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(mr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},pv=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(r[o]=e[o]);return r},yI=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(mr(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!yu.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var o=e;return mr(e)&&!mr(n)&&(o=pv(e,r)),mr(e)&&mr(n)?(n.forEach(function(i,s){if(yu.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return yu.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},o)},vI=function(e,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},e)},bI=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},vu=1024,xI=function(e,n,r,o,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=vu){for(var c=s.length>=vu?s.slice(l,l+vu):s,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===mI.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=on[d];continue}if(d<2048){u[u.length]=on[192|d>>6]+on[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=on[224|d>>12]+on[128|d>>6&63]+on[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=on[240|d>>18]+on[128|d>>12&63]+on[128|d>>6&63]+on[128|d&63]}a+=u.join("")}return a},wI=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return gI(n),e},SI=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},TI=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},EI=function(e,n){return[].concat(e,n)},CI=function(e,n){if(mr(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(n(e[o]));return r}return n(e)},mv={arrayToObject:pv,assign:vI,combine:EI,compact:wI,decode:bI,encode:xI,isBuffer:TI,isRegExp:SI,maybeMap:CI,merge:yI},gv=gw,Gs=mv,ui=gu,AI=Object.prototype.hasOwnProperty,yv={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,n){return e+"["+n+"]"},repeat:function(e){return e}},sn=Array.isArray,_I=Array.prototype.push,vv=function(t,e){_I.apply(t,sn(e)?e:[e])},PI=Date.prototype.toISOString,bv=ui.default,et={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Gs.encode,encodeValuesOnly:!1,format:bv,formatter:ui.formatters[bv],indices:!1,serializeDate:function(e){return PI.call(e)},skipNulls:!1,strictNullHandling:!1},OI=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},bu={},II=function t(e,n,r,o,i,s,a,l,c,u,f,d,h,p,m,y,v,b){for(var g=e,S=b,w=0,T=!1;(S=S.get(bu))!==void 0&&!T;){var P=S.get(e);if(w+=1,typeof P<"u"){if(P===w)throw new RangeError("Cyclic object value");T=!0}typeof S.get(bu)>"u"&&(w=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&sn(g)&&(g=Gs.maybeMap(g,function(C){return C instanceof Date?h(C):C})),g===null){if(s)return c&&!y?c(n,et.encoder,v,"key",p):n;g=""}if(OI(g)||Gs.isBuffer(g)){if(c){var O=y?n:c(n,et.encoder,v,"key",p);return[m(O)+"="+m(c(g,et.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var k=[];if(typeof g>"u")return k;var D;if(r==="comma"&&sn(g))y&&c&&(g=Gs.maybeMap(g,c)),D=[{value:g.length>0?g.join(",")||null:void 0}];else if(sn(u))D=u;else{var L=Object.keys(g);D=f?L.sort(f):L}var A=l?n.replace(/\./g,"%2E"):n,j=o&&sn(g)&&g.length===1?A+"[]":A;if(i&&sn(g)&&g.length===0)return j+"[]";for(var R=0;R<D.length;++R){var _=D[R],M=typeof _=="object"&&typeof _.value<"u"?_.value:g[_];if(!(a&&M===null)){var N=d&&l?_.replace(/\./g,"%2E"):_,z=sn(g)?typeof r=="function"?r(j,N):j:j+(d?"."+N:"["+N+"]");b.set(e,w);var q=gv();q.set(bu,b),vv(k,t(M,z,r,o,i,s,a,l,r==="comma"&&y&&sn(g)?null:c,u,f,d,h,p,m,y,v,q))}}return k},kI=function(e){if(!e)return et;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=e.charset||et.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ui.default;if(typeof e.format<"u"){if(!AI.call(ui.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=ui.formatters[r],i=et.filter;(typeof e.filter=="function"||sn(e.filter))&&(i=e.filter);var s;if(e.arrayFormat in yv?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=et.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:et.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:et.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:et.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:et.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?et.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:et.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:et.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:et.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:et.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:et.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:et.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:et.strictNullHandling}},DI=function(t,e){var n=t,r=kI(e),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):sn(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=yv[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=gv(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||vv(s,II(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=s.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},ro=mv,xu=Object.prototype.hasOwnProperty,MI=Array.isArray,Ye={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},FI=function(t){return t.replace(/&#(\d+);/g,function(e,n){return String.fromCharCode(parseInt(n,10))})},xv=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},RI="utf8=%26%2310003%3B",LI="utf8=%E2%9C%93",NI=function(e,n){var r={__proto__:null},o=n.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===LI?c="utf-8":s[l]===RI&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,Ye.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),Ye.decoder,c,"key"),p=ro.maybeMap(xv(u.slice(d+1),n),function(y){return n.decoder(y,Ye.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=FI(p)),u.indexOf("[]=")>-1&&(p=MI(p)?[p]:p);var m=xu.call(r,h);m&&n.duplicates==="combine"?r[h]=ro.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},VI=function(t,e,n,r){for(var o=r?e:xv(e,n),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},$I=function(e,n,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&xu.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&xu.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),VI(u,n,r,o)}},jI=function(e){if(!e)return Ye;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof e.charset>"u"?Ye.charset:e.charset,r=typeof e.duplicates>"u"?Ye.duplicates:e.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:Ye.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ye.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Ye.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Ye.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Ye.arrayLimit,charset:n,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ye.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Ye.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Ye.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Ye.decoder,delimiter:typeof e.delimiter=="string"||ro.isRegExp(e.delimiter)?e.delimiter:Ye.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Ye.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Ye.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Ye.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Ye.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ye.strictNullHandling}},BI=function(t,e){var n=jI(e);if(t===""||t===null||typeof t>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof t=="string"?NI(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=$I(a,r[a],n,typeof t=="string");o=ro.merge(o,l,n)}return n.allowSparse===!0?o:ro.compact(o)},zI=DI,WI=BI,HI=gu,UI={formats:HI,parse:WI,stringify:zI},Ee;(function(t){t.assertEqual=o=>o;function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},t.getValidEnumValues=o=>{const i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(const s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ee||(Ee={}));var wv;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(wv||(wv={}));const te=Ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gr=t=>{switch(typeof t){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(t)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(t)?te.array:t===null?te.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.promise:typeof Map<"u"&&t instanceof Map?te.map:typeof Set<"u"&&t instanceof Set?te.set:typeof Date<"u"&&t instanceof Date?te.date:te.object;default:return te.unknown}},G=Ee.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 Bt extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(e){if(!(e instanceof Bt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bt.create=t=>new Bt(t);const fi=(t,e)=>{let n;switch(t.code){case G.invalid_type:t.received===te.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ee.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ee.joinValues(t.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ee.joinValues(t.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Ee.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ee.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case G.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case G.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ee.assertNever(t)}return{message:n}};let GI=fi;function wu(){return GI}const Su=t=>{const{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}};function Q(t,e){const n=wu(),r=Su({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===fi?void 0:fi].filter(o=>!!o)});t.common.issues.push(r)}class St{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const o of n){if(o.status==="aborted")return he;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return St.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return he;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}}const he=Object.freeze({status:"aborted"}),di=t=>({status:"dirty",value:t}),Ot=t=>({status:"valid",value:t}),Sv=t=>t.status==="aborted",Tv=t=>t.status==="dirty",Ks=t=>t.status==="valid",Zs=t=>typeof Promise<"u"&&t instanceof Promise;function qs(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Ev(t,e,n,r,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var ie;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ie||(ie={}));var hi,pi;class an{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cv=(t,e)=>{if(Ks(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bt(t.common.issues);return this._error=n,this._error}}};function ge(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{var l,c;const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return gr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new St,ctx:{common:e.parent.common,data:e.data,parsedType:gr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Zs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},i=this._parseSync({data:e,path:o.path,parent:o});return Cv(o,i)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:gr(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Zs(o)?o:Promise.resolve(o));return Cv(r,i)}refine(e,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=e(o),a=()=>i.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Sn({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Tn.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return yi.create(this,this._def)}or(e){return Js.create([this,e],this._def)}and(e){return Qs.create(this,e,this._def)}transform(e){return new Sn({...ge(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new oa({...ge(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new Ov({typeName:ue.ZodBranded,type:this,...ge(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ia({...ge(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return sa.create(this,e)}readonly(){return aa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const KI=/^c[^\s-]{8,}$/i,ZI=/^[0-9a-z]+$/,qI=/^[0-9A-HJKMNP-TV-Z]{26}$/,YI=/^[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,XI=/^[a-z0-9_-]{21}$/i,JI=/^[-+]?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)?)??$/,QI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ek="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Tu;const tk=/^(?:(?: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])$/,nk=/^(([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})))$/,rk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Av="((\\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])))",ok=new RegExp(`^${Av}$`);function _v(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function ik(t){return new RegExp(`^${_v(t)}$`)}function sk(t){let e=`${Av}T${_v(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function ak(t,e){return!!((e==="v4"||!e)&&tk.test(t)||(e==="v6"||!e)&&nk.test(t))}class bn extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.string,received:i.parsedType}),he}const r=new St;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?Q(o,{code:G.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&Q(o,{code:G.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")QI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"email",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Tu||(Tu=new RegExp(ek,"u")),Tu.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"emoji",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")YI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"uuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")XI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"nanoid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")KI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")ZI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"cuid2",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")qI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ulid",code:G.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),Q(o,{validation:"url",code:G.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"regex",code:G.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?sk(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ok.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?ik(i).test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{code:G.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?JI.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"duration",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?ak(e.data,i.version)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"ip",code:G.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?rk.test(e.data)||(o=this._getOrReturnCtx(e,o),Q(o,{validation:"base64",code:G.invalid_string,message:i.message}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:G.invalid_string,...ie.errToObj(r)})}_addCheck(e){return new bn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ie.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ie.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ie.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ie.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ie.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ie.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ie.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ie.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ie.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ie.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...ie.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ie.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ie.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ie.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ie.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ie.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ie.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ie.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ie.errToObj(n)})}nonempty(e){return this.min(1,ie.errToObj(e))}trim(){return new bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}bn.create=t=>{var e;return new bn({checks:[],typeName:ue.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};function lk(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(t.toFixed(o).replace(".","")),s=parseInt(e.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}class yr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==te.number){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.number,received:i.parsedType}),he}let r;const o=new St;for(const i of this._def.checks)i.kind==="int"?Ee.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?lk(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_finite,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new yr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new yr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ie.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ie.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ee.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}yr.create=t=>new yr({checks:[],typeName:ue.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class oo extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==te.bigint){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.bigint,received:i.parsedType}),he}let r;const o=new St;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Q(r,{code:G.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ee.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ie.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ie.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ie.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ie.toString(n))}setLimit(e,n,r,o){return new oo({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ie.toString(o)}]})}_addCheck(e){return new oo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ie.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}oo.create=t=>{var e;return new oo({checks:[],typeName:ue.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...ge(t)})};class Eu extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),he}return Ot(e.data)}}Eu.create=t=>new Eu({typeName:ue.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ge(t)});class mi extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_type,expected:te.date,received:i.parsedType}),he}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return Q(i,{code:G.invalid_date}),he}const r=new St;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),Q(o,{code:G.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ee.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mi({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ie.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ie.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}mi.create=t=>new mi({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ue.ZodDate,...ge(t)});class Cu extends xe{_parse(e){if(this._getType(e)!==te.symbol){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),he}return Ot(e.data)}}Cu.create=t=>new Cu({typeName:ue.ZodSymbol,...ge(t)});class Ys extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),he}return Ot(e.data)}}Ys.create=t=>new Ys({typeName:ue.ZodUndefined,...ge(t)});class Xs extends xe{_parse(e){if(this._getType(e)!==te.null){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),he}return Ot(e.data)}}Xs.create=t=>new Xs({typeName:ue.ZodNull,...ge(t)});class Au extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return Ot(e.data)}}Au.create=t=>new Au({typeName:ue.ZodAny,...ge(t)});class io extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ot(e.data)}}io.create=t=>new io({typeName:ue.ZodUnknown,...ge(t)});class Zn extends xe{_parse(e){const n=this._getOrReturnCtx(e);return Q(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),he}}Zn.create=t=>new Zn({typeName:ue.ZodNever,...ge(t)});class _u extends xe{_parse(e){if(this._getType(e)!==te.undefined){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),he}return Ot(e.data)}}_u.create=t=>new _u({typeName:ue.ZodVoid,...ge(t)});class Kt extends xe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==te.array)return Q(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),he;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(Q(n,{code:s?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(Q(n,{code:G.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(Q(n,{code:G.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new an(n,s,n.path,a)))).then(s=>St.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new an(n,s,n.path,a)));return St.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new Kt({...this._def,minLength:{value:e,message:ie.toString(n)}})}max(e,n){return new Kt({...this._def,maxLength:{value:e,message:ie.toString(n)}})}length(e,n){return new Kt({...this._def,exactLength:{value:e,message:ie.toString(n)}})}nonempty(e){return this.min(1,e)}}Kt.create=(t,e)=>new Kt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...ge(e)});function so(t){if(t instanceof Ze){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Tn.create(so(r))}return new Ze({...t._def,shape:()=>e})}else return t instanceof Kt?new Kt({...t._def,type:so(t.element)}):t instanceof Tn?Tn.create(so(t.unwrap())):t instanceof br?br.create(so(t.unwrap())):t instanceof wn?wn.create(t.items.map(e=>so(e))):t}class Ze extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ee.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==te.object){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),he}const{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new an(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Zn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(Q(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new an(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=>St.mergeObjectSync(r,c)):St.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ie.errToObj,new Ze({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var o,i,s,a;const l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ze({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ze({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ue.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ze({...this._def,catchall:e})}pick(e){const n={};return Ee.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}omit(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return so(this)}partial(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}),new Ze({...this._def,shape:()=>n})}required(e){const n={};return Ee.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Tn;)i=i._def.innerType;n[r]=i}}),new Ze({...this._def,shape:()=>n})}keyof(){return Pv(Ee.objectKeys(this.shape))}}Ze.create=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)}),Ze.strictCreate=(t,e)=>new Ze({shape:()=>t,unknownKeys:"strict",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)}),Ze.lazycreate=(t,e)=>new Ze({shape:t,unknownKeys:"strip",catchall:Zn.create(),typeName:ue.ZodObject,...ge(e)});class Js extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Bt(a.ctx.common.issues));return Q(n,{code:G.invalid_union,unionErrors:s}),he}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Bt(l));return Q(n,{code:G.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}}Js.create=(t,e)=>new Js({options:t,typeName:ue.ZodUnion,...ge(e)});const xn=t=>t instanceof ta?xn(t.schema):t instanceof Sn?xn(t.innerType()):t instanceof na?[t.value]:t instanceof vr?t.options:t instanceof ra?Ee.objectValues(t.enum):t instanceof oa?xn(t._def.innerType):t instanceof Ys?[void 0]:t instanceof Xs?[null]:t instanceof Tn?[void 0,...xn(t.unwrap())]:t instanceof br?[null,...xn(t.unwrap())]:t instanceof Ov||t instanceof aa?xn(t.unwrap()):t instanceof ia?xn(t._def.innerType):[];class Pu extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.object)return Q(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),he;const r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Q(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),he)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const o=new Map;for(const i of n){const s=xn(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new Pu({typeName:ue.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...ge(r)})}}function Ou(t,e){const n=gr(t),r=gr(e);if(t===e)return{valid:!0,data:t};if(n===te.object&&r===te.object){const o=Ee.objectKeys(e),i=Ee.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(const a of i){const l=Ou(t[a],e[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===te.array&&r===te.array){if(t.length!==e.length)return{valid:!1};const o=[];for(let i=0;i<t.length;i++){const s=t[i],a=e[i],l=Ou(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Qs extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Sv(i)||Sv(s))return he;const a=Ou(i.value,s.value);return a.valid?((Tv(i)||Tv(s))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:G.invalid_intersection_types}),he)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Qs.create=(t,e,n)=>new Qs({left:t,right:e,typeName:ue.ZodIntersection,...ge(n)});class wn extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.array)return Q(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),he;if(r.data.length<this._def.items.length)return Q(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new an(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>St.mergeArray(n,s)):St.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new wn({...this._def,rest:e})}}wn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wn({items:t,typeName:ue.ZodTuple,rest:null,...ge(e)})};class ea extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.object)return Q(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),he;const o=[],i=this._def.keyType,s=this._def.valueType;for(const a in r.data)o.push({key:i._parse(new an(r,a,r.path,a)),value:s._parse(new an(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?St.mergeObjectAsync(n,o):St.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof xe?new ea({keyType:e,valueType:n,typeName:ue.ZodRecord,...ge(r)}):new ea({keyType:bn.create(),valueType:e,typeName:ue.ZodRecord,...ge(n)})}}class Iu extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.map)return Q(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),he;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new an(r,a,r.path,[c,"key"])),value:i._parse(new an(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return he;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Iu.create=(t,e,n)=>new Iu({valueType:e,keyType:t,typeName:ue.ZodMap,...ge(n)});class ao extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==te.set)return Q(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),he;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(Q(r,{code:G.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(Q(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return he;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new an(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(e,n){return new ao({...this._def,minSize:{value:e,message:ie.toString(n)}})}max(e,n){return new ao({...this._def,maxSize:{value:e,message:ie.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}ao.create=(t,e)=>new ao({valueType:t,minSize:null,maxSize:null,typeName:ue.ZodSet,...ge(e)});class gi extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.function)return Q(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),he;function r(a,l){return Su({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wu(),fi].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Su({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wu(),fi].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof yi){const a=this;return Ot(async function(...l){const c=new Bt([]),u=await a._def.args.parseAsync(l,i).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return Ot(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new Bt([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new Bt([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new gi({...this._def,args:wn.create(e).rest(io.create())})}returns(e){return new gi({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new gi({args:e||wn.create([]).rest(io.create()),returns:n||io.create(),typeName:ue.ZodFunction,...ge(r)})}}class ta extends xe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ta.create=(t,e)=>new ta({getter:t,typeName:ue.ZodLazy,...ge(e)});class na extends xe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Q(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:e.data}}get value(){return this._def.value}}na.create=(t,e)=>new na({value:t,typeName:ue.ZodLiteral,...ge(e)});function Pv(t,e){return new vr({values:t,typeName:ue.ZodEnum,...ge(e)})}class vr extends xe{constructor(){super(...arguments),hi.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{expected:Ee.joinValues(r),received:n.parsedType,code:G.invalid_type}),he}if(qs(this,hi)||Ev(this,hi,new Set(this._def.values)),!qs(this,hi).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return Q(n,{received:n.data,code:G.invalid_enum_value,options:r}),he}return Ot(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return vr.create(e,{...this._def,...n})}exclude(e,n=this._def){return vr.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}hi=new WeakMap,vr.create=Pv;class ra extends xe{constructor(){super(...arguments),pi.set(this,void 0)}_parse(e){const n=Ee.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Ee.objectValues(n);return Q(r,{expected:Ee.joinValues(o),received:r.parsedType,code:G.invalid_type}),he}if(qs(this,pi)||Ev(this,pi,new Set(Ee.getValidEnumValues(this._def.values))),!qs(this,pi).has(e.data)){const o=Ee.objectValues(n);return Q(r,{received:r.data,code:G.invalid_enum_value,options:o}),he}return Ot(e.data)}get enum(){return this._def.values}}pi=new WeakMap,ra.create=(t,e)=>new ra({values:t,typeName:ue.ZodNativeEnum,...ge(e)});class yi extends xe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==te.promise&&n.common.async===!1)return Q(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),he;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return Ot(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}yi.create=(t,e)=>new yi({type:t,typeName:ue.ZodPromise,...ge(e)});class Sn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{Q(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return he;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?he:l.status==="dirty"||n.value==="dirty"?di(l.value):l});{if(n.value==="aborted")return he;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?he:a.status==="dirty"||n.value==="dirty"?di(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ks(s))return s;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Ks(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):s);Ee.assertNever(o)}}Sn.create=(t,e,n)=>new Sn({schema:t,typeName:ue.ZodEffects,effect:e,...ge(n)}),Sn.createWithPreprocess=(t,e,n)=>new Sn({schema:e,effect:{type:"preprocess",transform:t},typeName:ue.ZodEffects,...ge(n)});class Tn extends xe{_parse(e){return this._getType(e)===te.undefined?Ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tn.create=(t,e)=>new Tn({innerType:t,typeName:ue.ZodOptional,...ge(e)});class br extends xe{_parse(e){return this._getType(e)===te.null?Ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}br.create=(t,e)=>new br({innerType:t,typeName:ue.ZodNullable,...ge(e)});class oa extends xe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}oa.create=(t,e)=>new oa({innerType:t,typeName:ue.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});class ia extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Zs(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Bt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Bt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ia.create=(t,e)=>new ia({innerType:t,typeName:ue.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});class ku extends xe{_parse(e){if(this._getType(e)!==te.nan){const r=this._getOrReturnCtx(e);return Q(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),he}return{status:"valid",value:e.data}}}ku.create=t=>new ku({typeName:ue.ZodNaN,...ge(t)});class Ov extends xe{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class sa extends xe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?he:i.status==="dirty"?(n.dirty(),di(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?he:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new sa({in:e,out:n,typeName:ue.ZodPipeline})}}class aa extends xe{_parse(e){const n=this._def.innerType._parse(e),r=o=>(Ks(o)&&(o.value=Object.freeze(o.value)),o);return Zs(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}aa.create=(t,e)=>new aa({innerType:t,typeName:ue.ZodReadonly,...ge(e)}),Ze.lazycreate;var ue;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ue||(ue={})),bn.create,yr.create,ku.create,oo.create,Eu.create,mi.create,Cu.create,Ys.create,Xs.create,Au.create,io.create,Zn.create,_u.create,Kt.create,Ze.create,Ze.strictCreate,Js.create,Pu.create,Qs.create,wn.create,ea.create,Iu.create,ao.create,gi.create,ta.create,na.create,vr.create,ra.create,yi.create,Sn.create,Tn.create,br.create,Sn.createWithPreprocess,sa.create;const ck={sort:(t,e)=>t.localeCompare(e),allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},Iv=t=>{const e=new FormData(t),n=new URLSearchParams(e);return UI.parse(n.toString(),ck)},kv=t=>t.replace("[",".").replace("]","").split("."),Du=(t,e)=>kv(t).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o instanceof Kt?o.element:o},e),la=t=>t.type==="checkbox"?t.checked:t.type==="number"?t.valueAsNumber:t.value,uk=t=>{const[e,n]=x.useState(null),r=x.useRef({}),o=(l,c)=>{const u=Du(l,t);return{...c,name:l,id:l,error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},i=(l,c)=>{const u=Du(l,t);return{...c,name:l,id:l,type:Ao.instance(u,yr)?"number":(c==null?void 0:c.type)??"text",error:e==null?void 0:e[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};x.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(la(u.element)),d=p=>{const m=u.schema.safeParse(la(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...S}=b||{};return S===null||Ao.empty(S)?null:S});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,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const s=x.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(la(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=Ao.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=x.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=Iv(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=Bd(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=Bd(f,h.name,la(h))}}),l({form:u,json:f,event:c,reset:()=>Yh(u)})},[]);return{input:i,select:o,onSubmit:a,errors:e,onInvalid:s,disabled:e!==null}},fk={name:"dark",rounded:{pill:"2rem"},spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},colors:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 9%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(25, 95%, 53%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(35, 92%, 41%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},input:{border:"hsla(240, 4%, 33%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)",row:"hsla(240, 7%, 27%)"}}},dk={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem"},colors:{foreground:"hsla(210, 14%, 27%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 14%, 35%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(25, 95%, 53%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(35, 92%, 41%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(240, 4%, 33%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",row:"hsla(210, 24%, 71%)"}}},hk={cssVariable:(t,e,n)=>`var(--${n})`,rgba:t=>`rgba(${t})`,rgb:t=>`rgb(${t})`,hsl:t=>`hsl(${t})`,hsla:t=>`hsla(${t})`,hex:t=>t,raw:t=>t,formatWithVar:t=>(e,n,r)=>`${t}(var(--${r}), <alpha-value>)`},vi=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(e(s,l,a))}return o.concat(vi(s,e,n,a))},[]),Dv=(t,e,n="",r="")=>Object.entries(t).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:e(s,i,a)}}return{...o,[i]:Dv(s,e,n,a)}},{}),Mv={default:t=>`:root { ${t} }`,dark:t=>`html.dark {${t}}`},Mu=(t,e)=>{const n=e.value||((o,i)=>i),r=t.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return e.result(r)},pk={default:t=>Mu(t,{result:Mv.default}),dark:t=>Mu(t,{result:Mv.dark})},mk=(t,e)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=vi(t.colors,n),o=vi(t.spacing,n),i=vi(t.rounded,n);return Mu(r.concat(o,i),{result:s=>`html${e?`.${e}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})};fe.Autocomplete=SS,fe.Button=rs,fe.ButtonGroup=qT,fe.Card=aE,fe.Dropdown=Ro,fe.FileUpload=tE,fe.Form=rE,fe.Input=Sl,fe.InputFeedback=qd,fe.InputField=qi,fe.Option=Xd,fe.Polymorph=Fo,fe.Select=rr,fe.Switch=oE,fe.Table=dI,fe.Tag=sE,fe.Tooltip=lE,fe.convertPath=kv,fe.createDesignTokens=Dv,fe.createStyles=pk,fe.createTheme=mk,fe.css=Nt,fe.defaultDarkTheme=fk,fe.defaultLightTheme=dk,fe.formReset=Yh,fe.formToJson=Iv,fe.getSchemaShape=Du,fe.isReactComponent=yS,fe.isReactFC=vS,fe.isSsr=zO,fe.mergeRefs=ml,fe.parsers=hk,fe.path=cv,fe.reduceTokens=vi,fe.useForm=uk,fe.usePrevious=Yd,fe.useReactive=dv,fe.uuid=Hs,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
151
151
  //# sourceMappingURL=index.umd.js.map