@tapflowio/relay 0.20.0 → 0.21.0

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 (120) hide show
  1. package/dist/RelayServer.d.ts +31 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +159 -22
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/api/auth.d.ts +2 -2
  6. package/dist/api/auth.d.ts.map +1 -1
  7. package/dist/api/auth.js +22 -33
  8. package/dist/api/auth.js.map +1 -1
  9. package/dist/lib/adminAccount.d.ts +24 -0
  10. package/dist/lib/adminAccount.d.ts.map +1 -0
  11. package/dist/lib/adminAccount.js +61 -0
  12. package/dist/lib/adminAccount.js.map +1 -0
  13. package/dist/lib/adminBootstrap.d.ts +48 -0
  14. package/dist/lib/adminBootstrap.d.ts.map +1 -0
  15. package/dist/lib/adminBootstrap.js +68 -0
  16. package/dist/lib/adminBootstrap.js.map +1 -0
  17. package/dist/lib/buildTickets.d.ts +50 -0
  18. package/dist/lib/buildTickets.d.ts.map +1 -0
  19. package/dist/lib/buildTickets.js +47 -0
  20. package/dist/lib/buildTickets.js.map +1 -0
  21. package/dist/lib/config.d.ts +4 -4
  22. package/dist/lib/loadEnvFile.d.ts +1 -1
  23. package/dist/lib/loadEnvFile.d.ts.map +1 -1
  24. package/dist/lib/loadEnvFile.js +11 -1
  25. package/dist/lib/loadEnvFile.js.map +1 -1
  26. package/dist/server.js +22 -0
  27. package/dist/server.js.map +1 -1
  28. package/package.json +6 -6
  29. package/public/assets/{AppCenter-Dg4dscW-.js → AppCenter-BkSQFKRv.js} +5 -5
  30. package/public/assets/AppCenter-BkSQFKRv.js.br +0 -0
  31. package/public/assets/AppCenter-BkSQFKRv.js.gz +0 -0
  32. package/public/assets/{Default-Dxi8aZ1t.js → Default-D1inA8sU.js} +1 -1
  33. package/public/assets/Default-D1inA8sU.js.br +0 -0
  34. package/public/assets/Default-D1inA8sU.js.gz +0 -0
  35. package/public/assets/{Invite-0EwoClX6.js → Invite-ChaVEWvP.js} +1 -1
  36. package/public/assets/Invite-ChaVEWvP.js.br +0 -0
  37. package/public/assets/Invite-ChaVEWvP.js.gz +0 -0
  38. package/public/assets/MacResources-CLChFyJW.js +1 -0
  39. package/public/assets/MacResources-CLChFyJW.js.br +0 -0
  40. package/public/assets/MacResources-CLChFyJW.js.gz +0 -0
  41. package/public/assets/NotFound-BoDDivK5.js.gz +0 -0
  42. package/public/assets/QASession-DICynZa0.js +140 -0
  43. package/public/assets/QASession-DICynZa0.js.br +0 -0
  44. package/public/assets/QASession-DICynZa0.js.gz +0 -0
  45. package/public/assets/{ResetPassword-CXU2bRry.js → ResetPassword-Ut9BFums.js} +1 -1
  46. package/public/assets/ResetPassword-Ut9BFums.js.br +0 -0
  47. package/public/assets/ResetPassword-Ut9BFums.js.gz +0 -0
  48. package/public/assets/{Setup-XXChRxeL.js → Setup-CoHwaxo7.js} +1 -1
  49. package/public/assets/Setup-CoHwaxo7.js.br +0 -0
  50. package/public/assets/Setup-CoHwaxo7.js.gz +0 -0
  51. package/public/assets/{Team-D0bXpmEY.js → Team-DaVY1DGm.js} +2 -2
  52. package/public/assets/Team-DaVY1DGm.js.br +0 -0
  53. package/public/assets/Team-DaVY1DGm.js.gz +0 -0
  54. package/public/assets/Tokens-_KZJ7AZ9.js +1 -0
  55. package/public/assets/Tokens-_KZJ7AZ9.js.br +0 -0
  56. package/public/assets/Tokens-_KZJ7AZ9.js.gz +0 -0
  57. package/public/assets/{alert-dialog-CgatMXjB.js → alert-dialog-Cc_pQpe6.js} +1 -1
  58. package/public/assets/alert-dialog-Cc_pQpe6.js.br +0 -0
  59. package/public/assets/alert-dialog-Cc_pQpe6.js.gz +0 -0
  60. package/public/assets/{badge-B6Nf3A0Y.js → badge-CikXk90N.js} +1 -1
  61. package/public/assets/badge-CikXk90N.js.br +0 -0
  62. package/public/assets/badge-CikXk90N.js.gz +0 -0
  63. package/public/assets/{build-format-BFC8gLoh.js → build-format-DsApFPHy.js} +3 -3
  64. package/public/assets/build-format-DsApFPHy.js.br +0 -0
  65. package/public/assets/build-format-DsApFPHy.js.gz +0 -0
  66. package/public/assets/{dialog-DK9a3b4z.js → dialog-B4Wg7TCg.js} +3 -3
  67. package/public/assets/dialog-B4Wg7TCg.js.br +0 -0
  68. package/public/assets/dialog-B4Wg7TCg.js.gz +0 -0
  69. package/public/assets/index-CBfjqtE-.js +198 -0
  70. package/public/assets/index-CBfjqtE-.js.br +0 -0
  71. package/public/assets/index-CBfjqtE-.js.gz +0 -0
  72. package/public/assets/index-ClHUQm-F.css.gz +0 -0
  73. package/public/assets/{pencil-BeLNLEKe.js → pencil-DMswV31e.js} +2 -2
  74. package/public/assets/pencil-DMswV31e.js.br +0 -0
  75. package/public/assets/pencil-DMswV31e.js.gz +0 -0
  76. package/public/assets/{table-DW57-o1p.js → table-dbLmBL_w.js} +1 -1
  77. package/public/assets/table-dbLmBL_w.js.br +0 -0
  78. package/public/assets/table-dbLmBL_w.js.gz +0 -0
  79. package/public/assets/{tabs-Xlttuqxh.js → tabs-pPYCRfmT.js} +1 -1
  80. package/public/assets/tabs-pPYCRfmT.js.br +0 -0
  81. package/public/assets/tabs-pPYCRfmT.js.gz +0 -0
  82. package/public/assets/tinyh264.worker-DiJ50Hai.js.gz +0 -0
  83. package/public/assets/{trash-2-CGxISX8x.js → trash-VgeHmI8N.js} +4 -4
  84. package/public/assets/trash-VgeHmI8N.js.br +0 -0
  85. package/public/assets/trash-VgeHmI8N.js.gz +0 -0
  86. package/public/assets/vendor-charts-DyX5CBcf.js.gz +0 -0
  87. package/public/assets/vendor-react-AJpf4YZ0.js.gz +0 -0
  88. package/public/assets/vendor-router-BFibuab1.js +12 -0
  89. package/public/assets/vendor-router-BFibuab1.js.br +0 -0
  90. package/public/assets/vendor-router-BFibuab1.js.gz +0 -0
  91. package/public/favicon.svg.gz +0 -0
  92. package/public/index.html +2 -2
  93. package/public/index.html.br +0 -0
  94. package/public/index.html.gz +0 -0
  95. package/public/logo-dark.svg.gz +0 -0
  96. package/public/logo.svg.gz +0 -0
  97. package/public/assets/AppCenter-Dg4dscW-.js.br +0 -0
  98. package/public/assets/Default-Dxi8aZ1t.js.br +0 -0
  99. package/public/assets/Invite-0EwoClX6.js.br +0 -0
  100. package/public/assets/MacResources-Dy1M3EqK.js +0 -1
  101. package/public/assets/MacResources-Dy1M3EqK.js.br +0 -0
  102. package/public/assets/QASession-DqMj8JL1.js +0 -140
  103. package/public/assets/QASession-DqMj8JL1.js.br +0 -0
  104. package/public/assets/ResetPassword-CXU2bRry.js.br +0 -0
  105. package/public/assets/Setup-XXChRxeL.js.br +0 -0
  106. package/public/assets/Team-D0bXpmEY.js.br +0 -0
  107. package/public/assets/Tokens-D0YNHS5e.js +0 -1
  108. package/public/assets/Tokens-D0YNHS5e.js.br +0 -0
  109. package/public/assets/alert-dialog-CgatMXjB.js.br +0 -0
  110. package/public/assets/badge-B6Nf3A0Y.js.br +0 -0
  111. package/public/assets/build-format-BFC8gLoh.js.br +0 -0
  112. package/public/assets/dialog-DK9a3b4z.js.br +0 -0
  113. package/public/assets/index-9vdYIm7s.js +0 -210
  114. package/public/assets/index-9vdYIm7s.js.br +0 -0
  115. package/public/assets/pencil-BeLNLEKe.js.br +0 -0
  116. package/public/assets/table-DW57-o1p.js.br +0 -0
  117. package/public/assets/tabs-Xlttuqxh.js.br +0 -0
  118. package/public/assets/trash-2-CGxISX8x.js.br +0 -0
  119. package/public/assets/vendor-router-ChFy8CZ1.js +0 -12
  120. package/public/assets/vendor-router-ChFy8CZ1.js.br +0 -0
@@ -0,0 +1,198 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-CoHwaxo7.js","assets/vendor-react-AJpf4YZ0.js","assets/vendor-router-BFibuab1.js","assets/Invite-ChaVEWvP.js","assets/pencil-DMswV31e.js","assets/ResetPassword-Ut9BFums.js","assets/AppCenter-BkSQFKRv.js","assets/build-format-DsApFPHy.js","assets/dialog-B4Wg7TCg.js","assets/trash-VgeHmI8N.js","assets/badge-CikXk90N.js","assets/alert-dialog-Cc_pQpe6.js","assets/QASession-DICynZa0.js","assets/tabs-pPYCRfmT.js","assets/MacResources-CLChFyJW.js","assets/vendor-charts-DyX5CBcf.js","assets/Default-D1inA8sU.js","assets/Team-DaVY1DGm.js","assets/table-dbLmBL_w.js","assets/Tokens-_KZJ7AZ9.js","assets/NotFound-BoDDivK5.js"])))=>i.map(i=>d[i]);
2
+ var Us=e=>{throw TypeError(e)};var Bs=(e,t,n)=>t.has(e)||Us("Cannot "+n);var Ze=(e,t,n)=>(Bs(e,t,"read from private field"),n?n.call(e):t.get(e)),Ws=(e,t,n)=>t.has(e)?Us("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Yr=(e,t,n,r)=>(Bs(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{i as d,R as P,b as Zu,a as gn,j as h,r as da,u as Uu,o as Bu,s as Wu,f as Hu,k as Ku,c as Gu,h as Yu,l as Ju,d as qu,e as Xu}from"./vendor-react-AJpf4YZ0.js";import{b as es,u as fa,L as Kn,N as pa,O as Qu,B as ed,a as td,R as Xe}from"./vendor-router-BFibuab1.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var nd=(e,t,n,r,o,s,i,a)=>{let l=document.documentElement,u=["light","dark"];function f(g){(Array.isArray(e)?e:[e]).forEach(m=>{let v=m==="class",y=v&&s?o.map(x=>s[x]||x):o;v?(l.classList.remove(...y),l.classList.add(s&&s[g]?s[g]:g)):l.setAttribute(m,g)}),c(g)}function c(g){a&&u.includes(g)&&(l.style.colorScheme=g)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let g=localStorage.getItem(t)||n,m=i&&g==="system"?p():g;f(m)}catch{}},Hs=["light","dark"],ha="(prefers-color-scheme: dark)",rd=typeof window>"u",ts=d.createContext(void 0),od={setTheme:e=>{},themes:[]},Pr=()=>{var e;return(e=d.useContext(ts))!=null?e:od},sd=e=>d.useContext(ts)?d.createElement(d.Fragment,null,e.children):d.createElement(ad,{...e}),id=["light","dark"],ad=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=id,defaultTheme:i=n?"system":"light",attribute:a="data-theme",value:l,children:u,nonce:f,scriptProps:c})=>{let[p,g]=d.useState(()=>ld(o,i)),[m,v]=d.useState(()=>p==="system"?Jr():p),y=l?Object.values(l):s,x=d.useCallback(C=>{let T=C;if(!T)return;C==="system"&&n&&(T=Jr());let N=l?l[T]:T,F=t?ud(f):null,A=document.documentElement,W=H=>{H==="class"?(A.classList.remove(...y),N&&A.classList.add(N)):H.startsWith("data-")&&(N?A.setAttribute(H,N):A.removeAttribute(H))};if(Array.isArray(a)?a.forEach(W):W(a),r){let H=Hs.includes(i)?i:null,$=Hs.includes(T)?T:H;A.style.colorScheme=$}F==null||F()},[f]),w=d.useCallback(C=>{let T=typeof C=="function"?C(p):C;g(T);try{localStorage.setItem(o,T)}catch{}},[p]),k=d.useCallback(C=>{let T=Jr(C);v(T),p==="system"&&n&&!e&&x("system")},[p,e]);d.useEffect(()=>{let C=window.matchMedia(ha);return C.addListener(k),k(C),()=>C.removeListener(k)},[k]),d.useEffect(()=>{let C=T=>{T.key===o&&(T.newValue?g(T.newValue):w(i))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[w]),d.useEffect(()=>{x(e??p)},[e,p]);let E=d.useMemo(()=>({theme:p,setTheme:w,forcedTheme:e,resolvedTheme:p==="system"?m:p,themes:n?[...s,"system"]:s,systemTheme:n?m:void 0}),[p,w,e,m,n,s]);return d.createElement(ts.Provider,{value:E},d.createElement(cd,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:n,enableColorScheme:r,defaultTheme:i,value:l,themes:s,nonce:f,scriptProps:c}),u)},cd=d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:a,nonce:l,scriptProps:u})=>{let f=JSON.stringify([n,t,s,e,a,i,r,o]).slice(1,-1);return d.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${nd.toString()})(${f})`}})}),ld=(e,t)=>{if(rd)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ud=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Jr=e=>(e||(e=window.matchMedia(ha)),e.matches?"dark":"light");const dd="modulepreload",fd=function(e){return"/"+e},Ks={},St=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=i(n.map(u=>{if(u=fd(u),u in Ks)return;Ks[u]=!0;const f=u.endsWith(".css"),c=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":dd,f||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((g,m)=>{p.addEventListener("load",g),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function pd(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const hd=e=>{switch(e){case"success":return vd;case"info":return yd;case"warning":return bd;case"error":return wd;default:return null}},md=Array(12).fill(0),gd=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},md.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),vd=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},P.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),bd=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},P.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),yd=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),wd=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xd=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_d=()=>{const[e,t]=P.useState(document.hidden);return P.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let Sd=1;const Ed=100,Gs=e=>{var t;return typeof(e==null?void 0:e.id)=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:Sd++};class Cd{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(n=>t(n)),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-Ed;t<=0||(this.toasts=this.toasts.filter(n=>t>0&&this.dismissedToasts.has(n.id)?(this.dismissedToasts.delete(n.id),t--,!1):!0))},this.create=t=>{const{message:n,...r}=t,o=Gs(t),s=this.pendingDismissals.get(o);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const i=this.dismissedToasts.has(o),a=t.dismissible===void 0?!0:t.dismissible;return i&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(u=>u.id!==o)),(i?void 0:this.toasts.find(u=>u.id===o))?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...t,id:o,title:n}),{...u,...t,id:o,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const n=this.pendingDismissals.get(t);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(r=>r({id:t,dismiss:!0}))})),t},this.message=(t,n)=>this.create({...n,message:t,type:void 0}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async u=>{if(i=["resolve",u],P.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(Pd(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,m=typeof c=="object"&&!P.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!P.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...m})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,m=typeof c=="object"&&!P.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...m})}}).catch(async u=>{if(i=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,g=typeof f=="object"&&!P.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...g})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=Gs(n);return this.create({...n,jsx:t(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Ge=new Cd,kd=(e,t)=>Ge.message(e,t),Pd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Od=kd,Rd=()=>Ge.toasts,Td=()=>Ge.getActiveToasts(),D_=Object.assign(Od,{success:Ge.success,info:Ge.info,warning:Ge.warning,error:Ge.error,custom:Ge.custom,message:Ge.message,promise:Ge.promise,dismiss:Ge.dismiss,loading:Ge.loading},{getHistory:Rd,getToasts:Td});pd("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Gn(e){return e.label!==void 0}const Id=3,Ad="24px",Dd="16px",Ys=4e3,jd=356,Nd=14,Md=45,zd=200;function yt(...e){return e.filter(Boolean).join(" ")}function $d(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Fd=e=>{var t,n,r,o,s,i,a,l,u;const{invert:f,toast:c,unstyled:p,interacting:g,setHeights:m,visibleToasts:v,heights:y,index:x,toasts:w,expanded:k,removeToast:E,defaultRichColors:C,closeButton:T,style:N,cancelButtonStyle:F,actionButtonStyle:A,className:W="",descriptionClassName:H="",duration:$,position:U,gap:L,expandByDefault:q,classNames:B,icons:G,closeButtonAriaLabel:oe="Close toast"}=e,[re,V]=P.useState(null),[ee,me]=P.useState(null),[ge,ne]=P.useState(!1),[ce,se]=P.useState(!1),[xe,Pe]=P.useState(!1),[ie,_e]=P.useState(!1),[rt,gt]=P.useState(!1),[lt,Ct]=P.useState(0),[kt,Nt]=P.useState(0),ut=P.useRef(c.duration||$||Ys),nn=P.useRef(null),Be=P.useRef(null),rn=x===0,Kt=x+1<=v,ve=c.type,Bn=ve??"default",Pt=c.dismissible!==!1,Wr=c.className||"",Wn=c.descriptionClassName||"",Gt=P.useMemo(()=>y.findIndex(Y=>Y.toastId===c.id)||0,[y,c.id]),Hr=P.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:T},[c.closeButton,T]),_n=P.useMemo(()=>c.duration||$||Ys,[c.duration,$]),Hn=P.useRef(0),Yt=P.useRef(0),Sn=P.useRef(0),b=P.useRef(null),[S,_]=U.split("-"),O=P.useMemo(()=>y.reduce((Y,Oe,Se)=>Se>=Gt?Y:Y+Oe.height,0),[y,Gt]),I=_d(),D=P.useMemo(()=>{var Y;return(Y=e.swipeDirections)!=null?Y:$d(U)},[e.swipeDirections,U]),z=c.invert||f,M=ve==="loading";Yt.current=P.useMemo(()=>Gt*L+O,[Gt,O]),P.useEffect(()=>{ut.current=_n},[_n]),P.useEffect(()=>{ne(!0)},[]),P.useEffect(()=>{const Y=Be.current;if(Y){const Oe=Y.getBoundingClientRect().height;return Nt(Oe),m(Se=>[{toastId:c.id,height:Oe,position:c.position},...Se]),()=>m(Se=>Se.filter(Ve=>Ve.toastId!==c.id))}},[m,c.id]),P.useLayoutEffect(()=>{if(!ge)return;const Y=Be.current,Oe=Y.style.height;Y.style.height="auto";const Se=Y.getBoundingClientRect().height;Y.style.height=Oe,Nt(Se),m(Ve=>Ve.find(ze=>ze.toastId===c.id)?Ve.map(ze=>ze.toastId===c.id?{...ze,height:Se}:ze):[{toastId:c.id,height:Se,position:c.position},...Ve])},[ge,c.title,c.description,m,c.id,c.jsx,c.action,c.cancel]);const Z=P.useCallback(()=>{se(!0),Ct(Yt.current),m(Y=>Y.filter(Oe=>Oe.toastId!==c.id)),setTimeout(()=>{E(c)},zd)},[c,E,m,Yt]);P.useEffect(()=>{if(c.promise&&ve==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return k||g||I?(()=>{if(Sn.current<Hn.current){const Ve=new Date().getTime()-Hn.current;ut.current=ut.current-Ve}Sn.current=new Date().getTime()})():(()=>{ut.current!==1/0&&(Hn.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Z()},ut.current))})(),()=>clearTimeout(Y)},[k,g,c,ve,I,Z]),P.useEffect(()=>{c.delete&&(Z(),c.onDismiss==null||c.onDismiss.call(c,c))},[Z,c.delete]);function K(){var Y;if(G!=null&&G.loading){var Oe;return P.createElement("div",{className:yt(B==null?void 0:B.loader,c==null||(Oe=c.classNames)==null?void 0:Oe.loader,"sonner-loader"),"data-visible":ve==="loading"},G.loading)}return P.createElement(gd,{className:yt(B==null?void 0:B.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:ve==="loading"})}const pe=c.icon||(G==null?void 0:G[ve])||hd(ve);var Le,Ke;return P.createElement("li",{tabIndex:0,ref:Be,className:yt(W,Wr,B==null?void 0:B.toast,c==null||(t=c.classNames)==null?void 0:t.toast,B==null?void 0:B[Bn],c==null||(n=c.classNames)==null?void 0:n[Bn]),"data-sonner-toast":"","data-rich-colors":(Le=c.richColors)!=null?Le:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":ge,"data-promise":!!c.promise,"data-swiped":rt,"data-removed":ce,"data-visible":Kt,"data-y-position":S,"data-x-position":_,"data-index":x,"data-front":rn,"data-swiping":xe,"data-dismissible":Pt,"data-type":ve,"data-invert":z,"data-swipe-out":ie,"data-swipe-direction":ee,"data-expanded":!!(k||q&&ge),"data-testid":c.testId,style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${ce?lt:Yt.current}px`,"--initial-height":q?"auto":`${kt}px`,...N,...c.style},onDragEnd:()=>{Pe(!1),V(null),b.current=null},onPointerDown:Y=>{Y.button!==2&&(M||!Pt||(nn.current=new Date,Ct(Yt.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(Pe(!0),b.current={x:Y.clientX,y:Y.clientY})))},onPointerUp:()=>{var Y,Oe,Se;if(ie||!Pt)return;b.current=null;const Ve=Number(((Y=Be.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Mt=Number(((Oe=Be.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ze=new Date().getTime()-((Se=nn.current)==null?void 0:Se.getTime()),ot=re==="x"?Ve:Mt,vt=Math.abs(ot)/ze;if((re==="x"?D.includes(Ve>0?"right":"left"):D.includes(Mt>0?"bottom":"top"))&&(Math.abs(ot)>=Md||vt>.11)){Ct(Yt.current),c.onDismiss==null||c.onDismiss.call(c,c),me(re==="x"?Ve>0?"right":"left":Mt>0?"down":"up"),Z(),_e(!0);return}else{var bt,Gr;(bt=Be.current)==null||bt.style.setProperty("--swipe-amount-x","0px"),(Gr=Be.current)==null||Gr.style.setProperty("--swipe-amount-y","0px")}gt(!1),Pe(!1),V(null)},onPointerMove:Y=>{var Oe,Se,Ve;if(!b.current||!Pt||((Oe=window.getSelection())==null?void 0:Oe.toString().length)>0)return;const ze=Y.clientY-b.current.y,ot=Y.clientX-b.current.x;!re&&(Math.abs(ot)>1||Math.abs(ze)>1)&&V(Math.abs(ot)>Math.abs(ze)?"x":"y");let vt={x:0,y:0};const Kr=bt=>1/(1.5+Math.abs(bt)/20);if(re==="y"){if(D.includes("top")||D.includes("bottom"))if(D.includes("top")&&ze<0||D.includes("bottom")&&ze>0)vt.y=ze;else{const bt=ze*Kr(ze);vt.y=Math.abs(bt)<Math.abs(ze)?bt:ze}}else if(re==="x"&&(D.includes("left")||D.includes("right")))if(D.includes("left")&&ot<0||D.includes("right")&&ot>0)vt.x=ot;else{const bt=ot*Kr(ot);vt.x=Math.abs(bt)<Math.abs(ot)?bt:ot}(Math.abs(vt.x)>0||Math.abs(vt.y)>0)&&gt(!0),(Se=Be.current)==null||Se.style.setProperty("--swipe-amount-x",`${vt.x}px`),(Ve=Be.current)==null||Ve.style.setProperty("--swipe-amount-y",`${vt.y}px`)}},Hr&&!c.jsx&&ve!=="loading"?P.createElement("button",{"aria-label":oe,"data-disabled":M,"data-close-button":!0,onClick:M||!Pt?()=>{}:()=>{Z(),c.onDismiss==null||c.onDismiss.call(c,c)},className:yt(B==null?void 0:B.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Ke=G==null?void 0:G.close)!=null?Ke:xd):null,(ve||c.icon||c.promise)&&c.icon!==null&&((G==null?void 0:G[ve])!==null||c.icon)?P.createElement("div",{"data-icon":"",className:yt(B==null?void 0:B.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},ve==="loading"?c.icon||K():c.promise?K():null,ve!=="loading"?pe:null):null,P.createElement("div",{"data-content":"",className:yt(B==null?void 0:B.content,c==null||(s=c.classNames)==null?void 0:s.content)},P.createElement("div",{"data-title":"",className:yt(B==null?void 0:B.title,c==null||(i=c.classNames)==null?void 0:i.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?P.createElement("div",{"data-description":"",className:yt(H,Wn,B==null?void 0:B.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),P.isValidElement(c.cancel)?c.cancel:c.cancel&&Gn(c.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||F,onClick:Y=>{Gn(c.cancel)&&Pt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),Z())},className:yt(B==null?void 0:B.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,P.isValidElement(c.action)?c.action:c.action&&Gn(c.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||A,onClick:Y=>{Gn(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&Z())},className:yt(B==null?void 0:B.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Js(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ld(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?Dd:Ad;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const Vd=P.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:f,mobileOffset:c,theme:p="light",richColors:g,duration:m,style:v,visibleToasts:y=Id,toastOptions:x,dir:w=Js(),gap:k=Nd,icons:E,customAriaLabel:C,containerAriaLabel:T="Notifications"}=t,[N,F]=P.useState([]),A=P.useMemo(()=>r?N.filter(ne=>ne.toasterId===r):N.filter(ne=>!ne.toasterId),[N,r]),W=P.useMemo(()=>Array.from(new Set([s].concat(A.filter(ne=>ne.position).map(ne=>ne.position)))),[A,s]),[H,$]=P.useState([]),[U,L]=P.useState(!1),[q,B]=P.useState(!1),[G,oe]=P.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=P.useRef(null),V=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=P.useRef(null),me=P.useRef(!1),ge=P.useCallback(ne=>{F(ce=>{var se;return(se=ce.find(xe=>xe.id===ne.id))!=null&&se.delete||Ge.dismiss(ne.id),ce.filter(({id:xe})=>xe!==ne.id)})},[]);return P.useEffect(()=>Ge.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{F(ce=>ce.map(se=>se.id===ne.id?{...se,delete:!0}:se))});return}setTimeout(()=>{Zu.flushSync(()=>{F(ce=>{const se=ce.findIndex(xe=>xe.id===ne.id);return se!==-1?[...ce.slice(0,se),{...ce[se],...ne},...ce.slice(se+1)]:[ne,...ce]})})})}),[]),P.useEffect(()=>{if(p!=="system"){oe(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?oe("dark"):oe("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:ce})=>{oe(ce?"dark":"light")})}catch{ne.addListener(({matches:se})=>{try{oe(se?"dark":"light")}catch(xe){console.error(xe)}})}},[p]),P.useEffect(()=>{N.length<=1&&L(!1)},[N]),P.useEffect(()=>{const ne=ce=>{var se;if(i.length>0&&i.every(ie=>ce[ie]||ce.code===ie)){var Pe;L(!0),(Pe=re.current)==null||Pe.focus()}ce.code==="Escape"&&(document.activeElement===re.current||(se=re.current)!=null&&se.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[i]),P.useEffect(()=>{if(re.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,me.current=!1)}},[re.current]),P.createElement("section",{ref:n,"aria-label":C??`${T} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},W.map((ne,ce)=>{var se;const[xe,Pe]=ne.split("-");return A.length?P.createElement("ol",{key:ne,dir:w==="auto"?Js():w,tabIndex:-1,ref:re,className:u,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":xe,"data-x-position":Pe,style:{"--front-toast-height":`${((se=H[0])==null?void 0:se.height)||0}px`,"--width":`${jd}px`,"--gap":`${k}px`,...v,...Ld(f,c)},onBlur:ie=>{me.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(me.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||me.current||(me.current=!0,ee.current=ie.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{q||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},A.filter(ie=>!ie.position&&ce===0||ie.position===ne).map((ie,_e)=>{var rt,gt;return P.createElement(Fd,{key:ie.id,icons:E,index:_e,toast:ie,defaultRichColors:g,duration:(rt=x==null?void 0:x.duration)!=null?rt:m,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:o,visibleToasts:y,closeButton:(gt=x==null?void 0:x.closeButton)!=null?gt:l,interacting:q,position:ne,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:ge,toasts:A.filter(lt=>lt.position==ie.position),heights:H.filter(lt=>lt.position==ie.position),setHeights:$,expandByDefault:a,gap:k,expanded:U,swipeDirections:t.swipeDirections})})):null}))});var Zd=Object.defineProperty,ns=(e,t)=>Zd(e,"name",{value:t,configurable:!0});function bo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ns(bo,"setRef");function ma(...e){return t=>{let n=!1;const r=e.map(o=>{const s=bo(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():bo(e[o],null)}}}}ns(ma,"composeRefs");function be(...e){return d.useCallback(ma(...e),e)}ns(be,"useComposedRefs");var Ud=Object.defineProperty,ht=(e,t)=>Ud(e,"name",{value:t,configurable:!0});function Tt(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const l=[];yo(o)&&typeof Yn=="function"&&(o=Yn(o._payload)),d.Children.forEach(o,p=>{var g;if(wa(p)){a=!0;const m=p;let v="child"in m.props?m.props.child:m.props.children;yo(v)&&typeof Yn=="function"&&(v=Yn(v._payload)),i=Bd(m,v),l.push((g=i==null?void 0:i.props)==null?void 0:g.children)}else l.push(p)}),i?i=d.cloneElement(i,void 0,l):!a&&d.Children.count(o)===1&&d.isValidElement(o)&&(i=o);const u=i?ya(i):void 0,f=be(r,u);if(!i){if(o||o===0)throw new Error(a?Kd(e):Hd(e));return o}const c=ba(s,i.props??{});return i.type!==d.Fragment&&(c.ref=r?f:u),d.cloneElement(i,c)});return t.displayName=`${e}.Slot`,t}ht(Tt,"createSlot");var vn=Tt("Slot"),ga=Symbol.for("radix.slottable");function va(e){const t=ht(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=ga,t}ht(va,"createSlottable");var Bd=ht((e,t)=>{if("child"in e.props){const n=e.props.child;return d.isValidElement(n)?d.cloneElement(n,void 0,e.props.children(n.props.children)):null}return d.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function ba(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}ht(ba,"mergeProps");function ya(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ht(ya,"getElementRef");function wa(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ga}ht(wa,"isSlottable");var Wd=Symbol.for("react.lazy");function yo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wd&&"_payload"in e&&xa(e._payload)}ht(yo,"isLazyComponent");function xa(e){return typeof e=="object"&&e!==null&&"then"in e}ht(xa,"isPromiseLike");var Hd=ht(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Kd=ht(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Yn=gn[" use ".trim().toString()];function _a(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=_a(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sa(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=_a(e))&&(r&&(r+=" "),r+=t);return r}const qs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xs=Sa,zn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xs(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],c=s==null?void 0:s[u];if(f===null)return null;const p=qs(f)||qs(c);return o[u][p]}),a=n&&Object.entries(n).reduce((u,f)=>{let[c,p]=f;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:p,...g}=f;return Object.entries(g).every(m=>{let[v,y]=m;return Array.isArray(y)?y.includes({...s,...a}[v]):{...s,...a}[v]===y})?[...u,c,p]:u},[]);return Xs(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
3
+ * @license lucide-react v1.41.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const Ea=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
8
+ * @license lucide-react v1.41.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */const Gd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
13
+ * @license lucide-react v1.41.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */const Yd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
18
+ * @license lucide-react v1.41.0 - ISC
19
+ *
20
+ * This source code is licensed under the ISC license.
21
+ * See the LICENSE file in the root directory of this source tree.
22
+ */const Qs=e=>{const t=Yd(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
23
+ * @license lucide-react v1.41.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */var qr={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"};/**
28
+ * @license lucide-react v1.41.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const Jd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},qd=d.createContext({}),Xd=()=>d.useContext(qd),Qd=d.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>{const{size:u=24,strokeWidth:f=2,absoluteStrokeWidth:c=!1,color:p="currentColor",className:g=""}=Xd()??{},m=r??c?Number(n??f)*24/Number(t??u):n??f;return d.createElement("svg",{ref:l,...qr,width:t??u??qr.width,height:t??u??qr.height,stroke:e??p,strokeWidth:m,className:Ea("lucide",g,o),...!s&&!Jd(a)&&{"aria-hidden":"true"},...a},[...i.map(([v,y])=>d.createElement(v,y)),...Array.isArray(s)?s:[s]])});/**
33
+ * @license lucide-react v1.41.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const qe=(e,t)=>{const n=d.forwardRef(({className:r,...o},s)=>d.createElement(Qd,{ref:s,iconNode:t,className:Ea(`lucide-${Gd(Qs(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Qs(e),n};/**
38
+ * @license lucide-react v1.41.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const ef=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],tf=qe("book-open",ef);/**
43
+ * @license lucide-react v1.41.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const nf=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rf=qe("check",nf);/**
48
+ * @license lucide-react v1.41.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const of=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sf=qe("chevron-right",of);/**
53
+ * @license lucide-react v1.41.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const af=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cf=qe("circle",af);/**
58
+ * @license lucide-react v1.41.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const lf=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],uf=qe("key-round",lf);/**
63
+ * @license lucide-react v1.41.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const df=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],ff=qe("layout-grid",df);/**
68
+ * @license lucide-react v1.41.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const pf=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],hf=qe("log-out",pf);/**
73
+ * @license lucide-react v1.41.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const mf=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],gf=qe("monitor",mf);/**
78
+ * @license lucide-react v1.41.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const vf=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],bf=qe("moon",vf);/**
83
+ * @license lucide-react v1.41.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const yf=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],wf=qe("panel-left",yf);/**
88
+ * @license lucide-react v1.41.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const xf=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ca=qe("settings",xf);/**
93
+ * @license lucide-react v1.41.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const _f=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Sf=qe("sun",_f);/**
98
+ * @license lucide-react v1.41.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const Ef=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Cf=qe("users",Ef);/**
103
+ * @license lucide-react v1.41.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const kf=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pf=qe("x",kf),Xr=768;function Of(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Xr-1}px)`),r=()=>{t(window.innerWidth<Xr)};return n.addEventListener("change",r),t(window.innerWidth<Xr),()=>n.removeEventListener("change",r)},[]),!!e}const rs="-",Rf=e=>{const t=If(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(rs);return a[0]===""&&a.length!==1&&a.shift(),ka(a,t)||Tf(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},ka=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ka(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(rs);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ei=/^\[(.+)\]$/,Tf=e=>{if(ei.test(e)){const t=ei.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},If=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Df(Object.entries(e.classGroups),n).forEach(([s,i])=>{wo(i,r,s,t)}),r},wo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:ti(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Af(o)){wo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{wo(i,ti(t,s),n,r)})})},ti=(e,t)=>{let n=e;return t.split(rs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Af=e=>e.isThemeGetter,Df=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,jf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Pa="!",Nf=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let u=0,f=0,c;for(let y=0;y<a.length;y++){let x=a[y];if(u===0){if(x===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(f,y)),f=y+s;continue}if(x==="/"){c=y;continue}}x==="["?u++:x==="]"&&u--}const p=l.length===0?a:a.substring(f),g=p.startsWith(Pa),m=g?p.substring(1):p,v=c&&c>f?c-f:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:i}):i},Mf=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},zf=e=>({cache:jf(e.cacheSize),parseClassName:Nf(e),...Rf(e)}),$f=/\s+/,Ff=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split($f);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:f,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:g}=n(u);let m=!!g,v=r(m?p.substring(0,g):p);if(!v){if(!m){a=u+(a.length>0?" "+a:a);continue}if(v=r(p),!v){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=Mf(f).join(":"),x=c?y+Pa:y,w=x+v;if(s.includes(w))continue;s.push(w);const k=o(v,m);for(let E=0;E<k.length;++E){const C=k[E];s.push(x+C)}a=u+(a.length>0?" "+a:a)}return a};function Lf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Oa(t))&&(r&&(r+=" "),r+=n);return r}const Oa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Oa(e[r]))&&(n&&(n+=" "),n+=t);return n};function Vf(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((f,c)=>c(f),e());return n=zf(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=Ff(l,n);return o(l,f),f}return function(){return s(Lf.apply(null,arguments))}}const he=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ra=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zf=/^\d+\/\d+$/,Uf=new Set(["px","full","screen"]),Bf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wf=/\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$/,Hf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ot=e=>dn(e)||Uf.has(e)||Zf.test(e),zt=e=>bn(e,"length",np),dn=e=>!!e&&!Number.isNaN(Number(e)),Qr=e=>bn(e,"number",dn),En=e=>!!e&&Number.isInteger(Number(e)),Yf=e=>e.endsWith("%")&&dn(e.slice(0,-1)),te=e=>Ra.test(e),$t=e=>Bf.test(e),Jf=new Set(["length","size","percentage"]),qf=e=>bn(e,Jf,Ta),Xf=e=>bn(e,"position",Ta),Qf=new Set(["image","url"]),ep=e=>bn(e,Qf,op),tp=e=>bn(e,"",rp),Cn=()=>!0,bn=(e,t,n)=>{const r=Ra.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},np=e=>Wf.test(e)&&!Hf.test(e),Ta=()=>!1,rp=e=>Kf.test(e),op=e=>Gf.test(e),sp=()=>{const e=he("colors"),t=he("spacing"),n=he("blur"),r=he("brightness"),o=he("borderColor"),s=he("borderRadius"),i=he("borderSpacing"),a=he("borderWidth"),l=he("contrast"),u=he("grayscale"),f=he("hueRotate"),c=he("invert"),p=he("gap"),g=he("gradientColorStops"),m=he("gradientColorStopPositions"),v=he("inset"),y=he("margin"),x=he("opacity"),w=he("padding"),k=he("saturate"),E=he("scale"),C=he("sepia"),T=he("skew"),N=he("space"),F=he("translate"),A=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",te,t],$=()=>[te,t],U=()=>["",Ot,zt],L=()=>["auto",dn,te],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",te],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>[dn,te];return{cacheSize:500,separator:":",theme:{colors:[Cn],spacing:[Ot,zt],blur:["none","",$t,te],brightness:ee(),borderColor:[e],borderRadius:["none","","full",$t,te],borderSpacing:$(),borderWidth:U(),contrast:ee(),grayscale:re(),hueRotate:ee(),invert:re(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Yf,zt],inset:H(),margin:H(),opacity:ee(),padding:$(),saturate:ee(),scale:ee(),sepia:re(),skew:ee(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[$t]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...q(),te]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",En,te]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",En,te]}],"grid-cols":[{"grid-cols":[Cn]}],"col-start-end":[{col:["auto",{span:["full",En,te]},te]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Cn]}],"row-start-end":[{row:["auto",{span:[En,te]},te]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...oe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...oe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...oe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[$t]},$t]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$t,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qr]}],"font-family":[{font:[Cn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",dn,Qr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ot,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ot,zt]}],"underline-offset":[{"underline-offset":["auto",Ot,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],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",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Xf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ep]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...B(),"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":[x]}],"divide-style":[{divide:B()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[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:["",...B()]}],"outline-offset":[{"outline-offset":[Ot,te]}],"outline-w":[{outline:[Ot,zt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ot,zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$t,tp]}],"shadow-color":[{shadow:[Cn]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$t,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[k]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[En,te]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"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",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ot,zt,Qr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"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"]}}},ip=Vf(sp);function J(...e){return ip(Sa(e))}const ap=zn("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8","icon-sm":"h-9 w-9",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),Or=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?vn:"button";return h.jsx(i,{className:J(ap({variant:t,size:n,className:e})),ref:s,...o})});Or.displayName="Button";const yr=d.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:J("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));yr.displayName="Input";var cp=Object.defineProperty,lp=(e,t)=>cp(e,"name",{value:t,configurable:!0}),up=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=up.reduce((e,t)=>{const n=Tt(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function os(e,t){e&&da.flushSync(()=>e.dispatchEvent(t))}lp(os,"dispatchDiscreteCustomEvent");var dp=Object.defineProperty,Ia=(e,t)=>dp(e,"name",{value:t,configurable:!0}),ni="horizontal",fp=["horizontal","vertical"],pp=d.forwardRef(Ia(function(t,n){const{decorative:r,orientation:o=ni,...s}=t,i=Aa(o)?o:ni,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return h.jsx(ke.div,{"data-orientation":i,...l,...s,ref:n})},"Separator"));function Aa(e){return fp.includes(e)}Ia(Aa,"isValidOrientation");var Da=pp;const wr=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(Da,{ref:o,decorative:n,orientation:t,className:J("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));wr.displayName=Da.displayName;var hp=Object.defineProperty,yn=(e,t)=>hp(e,"name",{value:t,configurable:!0}),ja=!!(typeof window<"u"&&window.document&&window.document.createElement);function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return yn(function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)},"handleEvent")}yn(Q,"composeEventHandlers");function mp(e){var t;if(!ja)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}yn(mp,"getOwnerWindow");function xo(e){if(!ja)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}yn(xo,"getOwnerDocument");function Na(e,t=!1){const{activeElement:n}=xo(e);if(!(n!=null&&n.nodeName))return null;if(Ma(n)&&n.contentDocument)return Na(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=xo(n).getElementById(r);if(o)return o}}return n}yn(Na,"getActiveElement");function Ma(e){return e.tagName==="IFRAME"}yn(Ma,"isFrame");var gp=Object.defineProperty,st=(e,t)=>gp(e,"name",{value:t,configurable:!0});function vp(e,t){const n=d.createContext(t);n.displayName=e+"Context";const r=st(s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function o(s,i={}){const{optional:a=!1}=i,l=d.useContext(n);if(l)return l;if(t!==void 0)return t;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return st(o,"useContext"),[r,o]}st(vp,"createContext");function Dt(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const u=st(c=>{var x;const{scope:p,children:g,...m}=c,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||a,y=d.useMemo(()=>m,Object.values(m));return h.jsx(v.Provider,{value:y,children:g})},"Provider");u.displayName=s+"Provider";function f(c,p,g={}){var x;const{optional:m=!1}=g,v=((x=p==null?void 0:p[e])==null?void 0:x[l])||a,y=d.useContext(v);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${c}\` must be used within \`${s}\``)}return st(f,"useContext"),[u,f]}st(r,"createContext");const o=st(()=>{const s=n.map(i=>d.createContext(i));return st(function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return o.scopeName=e,[r,za(o,...t)]}st(Dt,"createContextScope");function za(...e){const t=e[0];if(e.length===1)return t;const n=st(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return st(function(s){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}st(za,"composeContextScopes");var Je=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},bp=Object.defineProperty,yp=(e,t)=>bp(e,"name",{value:t,configurable:!0}),wp=gn[" useId ".trim().toString()]||(()=>{}),xp=0;function Zt(e){const[t,n]=d.useState(wp());return Je(()=>{e||n(r=>r??String(xp++))},[e]),e||(t?`radix-${t}`:"")}yp(Zt,"useId");var _p=Object.defineProperty,Sp=(e,t)=>_p(e,"name",{value:t,configurable:!0}),ri=gn[" useEffectEvent ".trim().toString()],oi=gn[" useInsertionEffect ".trim().toString()];function $a(e){if(typeof ri=="function")return ri(e);const t=d.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof oi=="function"?oi(()=>{t.current=e}):Je(()=>{t.current=e}),d.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}Sp($a,"useEffectEvent");var Ep=Object.defineProperty,$n=(e,t)=>Ep(e,"name",{value:t,configurable:!0}),Cp=gn[" useInsertionEffect ".trim().toString()]||Je;function Fn({prop:e,defaultProp:t,onChange:n=$n(()=>{},"onChange"),caller:r}){const[o,s,i]=Fa({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o,u=d.useCallback(f=>{var c;if(a){const p=La(f)?f(e):f;p!==e&&((c=i.current)==null||c.call(i,p))}else s(f)},[a,e,s,i]);return[l,u]}$n(Fn,"useControllableState");function Fa({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return Cp(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}$n(Fa,"useUncontrolledState");function La(e){return typeof e=="function"}$n(La,"isFunction");var si=Symbol("RADIX:SYNC_STATE");function kp(e,t,n,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=t,l=o!==void 0,u=$a(i),f=[{...n,state:s}];r&&f.push(r);const[c,p]=d.useReducer((y,x)=>{if(x.type===si)return{...y,state:x.state};const w=e(y,x);return l&&!Object.is(w.state,y.state)&&u(w.state),w},...f),g=c.state,m=d.useRef(g);d.useEffect(()=>{m.current!==g&&(m.current=g,l||u(g))},[g,m,l]);const v=d.useMemo(()=>o!==void 0?{...c,state:o}:c,[c,o]);return d.useEffect(()=>{l&&!Object.is(o,c.state)&&p({type:si,state:o})},[o,c.state,l]),[v,p]}$n(kp,"useControllableStateReducer");var Pp=Object.defineProperty,Op=(e,t)=>Pp(e,"name",{value:t,configurable:!0});function It(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}Op(It,"useCallbackRef");var Rp=Object.defineProperty,De=(e,t)=>Rp(e,"name",{value:t,configurable:!0}),_o="dismissableLayer.update",Tp="dismissableLayer.pointerDownOutside",Ip="dismissableLayer.focusOutside",ii,Va=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ss=d.forwardRef(De(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...f}=t,c=d.useContext(Va),[p,g]=d.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=d.useState({}),y=be(n,g),x=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),k=w?x.indexOf(w):-1,E=p?x.indexOf(p):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,T=E>=k,N=d.useRef(!1),F=Ua($=>{i==null||i($),l==null||l($),$.defaultPrevented||u==null||u()},{ownerDocument:m,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback($=>{if(!($ instanceof Node))return!1;const U=[...c.branches].some(L=>L.contains($));return T&&!U},[c.branches,T])}),A=Ba($=>{if(o&&N.current)return;const U=$.target;[...c.branches].some(q=>q.contains(U))||(a==null||a($),l==null||l($),$.defaultPrevented||u==null||u())},m),W=p?E===x.length-1:!1,H=It($=>{$.key==="Escape"&&(s==null||s($),!$.defaultPrevented&&u&&($.preventDefault(),u()))});return d.useEffect(()=>{if(W)return m.addEventListener("keydown",H,{capture:!0}),()=>m.removeEventListener("keydown",H,{capture:!0})},[m,W,H]),d.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ii=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),So(),()=>{r&&(c.layersWithOutsidePointerEventsDisabled.delete(p),c.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=ii))}},[p,m,r,c]),d.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),So())},[p,c]),d.useEffect(()=>{const $=De(()=>v({}),"handleUpdate");return document.addEventListener(_o,$),()=>document.removeEventListener(_o,$)},[]),h.jsx(ke.div,{...f,ref:y,style:{pointerEvents:C?T?"auto":"none":void 0,...t.style},onFocusCapture:Q(t.onFocusCapture,A.onFocusCapture),onBlurCapture:Q(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Q(t.onPointerDownCapture,F.onPointerDownCapture)})},"DismissableLayer"));function Za(){const e=d.useContext(Va),[t,n]=d.useState(null);return d.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}De(Za,"useDismissableLayerSurface");var Ap=De(()=>!0,"IS_TRUE");function Ua(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=Ap}=t,a=It(e),l=d.useRef(!1),u=d.useRef(!1),f=d.useRef(new Map),c=d.useRef(()=>{});return d.useEffect(()=>{function p(){u.current=!1,o.current=!1,f.current.clear()}De(p,"resetOutsideInteraction");function g(){return Array.from(f.current.values()).some(Boolean)}De(g,"isOutsideInteractionIntercepted");function m(k){if(!u.current)return;const E=k.target;E instanceof Node&&[...s].some(T=>T.contains(E))||f.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{u.current&&c.current()},0)}De(m,"handleInteractionCapture");function v(k){u.current&&f.current.set(k.type,!1)}De(v,"handleInteractionBubble");const y=De(k=>{if(k.target&&!l.current){let E=function(){n.removeEventListener("click",c.current);const T=g();p(),T||is(Tp,a,C,{discrete:!0})};if(De(E,"handleAndDispatchPointerDownOutsideEvent"),!i(k.target)){n.removeEventListener("click",c.current),p(),l.current=!1;return}const C={originalEvent:k};u.current=!0,o.current=r&&k.button===0,f.current.clear(),!r||k.button!==0?E():(n.removeEventListener("click",c.current),c.current=E,n.addEventListener("click",c.current,{once:!0}))}else n.removeEventListener("click",c.current),p();l.current=!1},"handlePointerDown"),x=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of x)n.addEventListener(k,m,!0),n.addEventListener(k,v);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",y),n.removeEventListener("click",c.current);for(const k of x)n.removeEventListener(k,m,!0),n.removeEventListener(k,v)}},[n,a,r,o,s,i]),{onPointerDownCapture:De(()=>l.current=!0,"onPointerDownCapture")}}De(Ua,"usePointerDownOutside");function Ba(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=d.useRef(!1);return d.useEffect(()=>{const o=De(s=>{s.target&&!r.current&&is(Ip,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:De(()=>r.current=!0,"onFocusCapture"),onBlurCapture:De(()=>r.current=!1,"onBlurCapture")}}De(Ba,"useFocusOutside");function So(){const e=new CustomEvent(_o);document.dispatchEvent(e)}De(So,"dispatchUpdate");function is(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?os(o,s):o.dispatchEvent(s)}De(is,"handleAndDispatchCustomEvent");var Dp=Object.defineProperty,He=(e,t)=>Dp(e,"name",{value:t,configurable:!0}),eo="focusScope.autoFocusOnMount",to="focusScope.autoFocusOnUnmount",ai={bubbles:!1,cancelable:!0},Wa=d.forwardRef(He(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[l,u]=d.useState(null),f=It(s),c=It(i),p=d.useRef(null),g=be(n,u),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(o){let y=function(E){if(m.paused||!l)return;const C=E.target;l.contains(C)?p.current=C:Rt(p.current,{select:!0})},x=function(E){if(m.paused||!l)return;const C=E.relatedTarget;C!==null&&(l.contains(C)||Rt(p.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const T of E)T.removedNodes.length>0&&Rt(l)};He(y,"handleFocusIn"),He(x,"handleFocusOut"),He(w,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",x);const k=new MutationObserver(w);return l&&k.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),k.disconnect()}}},[o,l,m.paused]),d.useEffect(()=>{if(l){ci.add(m);const y=document.activeElement;if(!l.contains(y)){const w=new CustomEvent(eo,ai);l.addEventListener(eo,f),l.dispatchEvent(w),w.defaultPrevented||(Ha(qa(as(l)),{select:!0}),document.activeElement===y&&Rt(l))}return()=>{l.removeEventListener(eo,f),setTimeout(()=>{const w=new CustomEvent(to,ai);l.addEventListener(to,c),l.dispatchEvent(w),w.defaultPrevented||Rt(y??document.body,{select:!0}),l.removeEventListener(to,c),ci.remove(m)},0)}}},[l,f,c,m]);const v=d.useCallback(y=>{if(!r&&!o||m.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,w=document.activeElement;if(x&&w){const k=y.currentTarget,[E,C]=Ka(k);E&&C?!y.shiftKey&&w===C?(y.preventDefault(),r&&Rt(E,{select:!0})):y.shiftKey&&w===E&&(y.preventDefault(),r&&Rt(C,{select:!0})):w===k&&y.preventDefault()}},[r,o,m.paused]);return h.jsx(ke.div,{tabIndex:-1,...a,ref:g,onKeyDown:v})},"FocusScope"));function Ha(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rt(r,{select:t}),document.activeElement!==n)return}He(Ha,"focusFirst");function Ka(e){const t=as(e),n=Eo(t,e),r=Eo(t.reverse(),e);return[n,r]}He(Ka,"getTabbableEdges");function as(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:He(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}He(as,"getTabbableCandidates");function Eo(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Ga(r,{upTo:t})))return r}He(Eo,"findVisible");function Ga(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}He(Ga,"isHidden");function Ya(e){return e instanceof HTMLInputElement&&"select"in e}He(Ya,"isSelectableInput");function Rt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ya(e)&&t&&e.select()}}He(Rt,"focus");var ci=Ja();function Ja(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Co(e,t),e.unshift(t)},remove(t){var n;e=Co(e,t),(n=e[0])==null||n.resume()}}}He(Ja,"createFocusScopesStack");function Co(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}He(Co,"arrayRemove");function qa(e){return e.filter(t=>t.tagName!=="A")}He(qa,"removeLinks");var jp=Object.defineProperty,Np=(e,t)=>jp(e,"name",{value:t,configurable:!0}),cs=d.forwardRef(Np(function(t,n){var l;const{container:r,...o}=t,[s,i]=d.useState(!1);Je(()=>i(!0),[]);const a=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?da.createPortal(h.jsx(ke.div,{...o,ref:n}),a):null},"Portal")),Mp=Object.defineProperty,At=(e,t)=>Mp(e,"name",{value:t,configurable:!0});function Xa(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}At(Xa,"useStateMachine");var jt=At(e=>{const{present:t,children:n}=e,r=Qa(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=ec(r.ref,tc(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence");function Qa(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=d.useRef(void 0),a=e?"mounted":"unmounted",[l,u]=Xa(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{l==="mounted"?(s.current=i.current??ln(r.current),i.current=void 0):s.current="none"},[l]),Je(()=>{const f=r.current,c=o.current;if(c!==e){const g=s.current,m=ln(f);e?(i.current=m,u("MOUNT")):m==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(c&&g!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Je(()=>{if(t){let f;const c=t.ownerDocument.defaultView??window,p=At(m=>{const y=ln(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},"handleAnimationEnd"),g=At(m=>{m.target===t&&(s.current=ln(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{c.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(f=>{if(f){const c=getComputedStyle(f);r.current=c,i.current=ln(c)}else r.current=null;n(f)},[])}}At(Qa,"usePresence");function ko(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}At(ko,"setRef");function ec(...e){const t=d.useRef(e);return t.current=e,d.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const a=ko(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():ko(r[i],null)}}},[])}At(ec,"useStableComposedRefs");function ln(e){return(e==null?void 0:e.animationName)||"none"}At(ln,"getAnimationName");function tc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}At(tc,"getElementRef");var zp=Object.defineProperty,ls=(e,t)=>zp(e,"name",{value:t,configurable:!0}),Jn=0,wt=null;function $p(e){return Rr(),e.children}ls($p,"FocusGuards");function Rr(){d.useEffect(()=>{wt||(wt={start:Po(),end:Po()});const{start:e,end:t}=wt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Jn++,()=>{Jn===1&&(wt==null||wt.start.remove(),wt==null||wt.end.remove(),wt=null),Jn=Math.max(0,Jn-1)}},[])}ls(Rr,"useFocusGuards");function Po(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}ls(Po,"createFocusGuard");var xt=function(){return xt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},xt.apply(this,arguments)};function nc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Fp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var ur="right-scroll-bar-position",dr="width-before-scroll-bar",Lp="with-scroll-bars-hidden",Vp="--removed-body-scroll-bar-size";function no(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zp(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Up=typeof window<"u"?d.useLayoutEffect:d.useEffect,li=new WeakMap;function Bp(e,t){var n=Zp(null,function(r){return e.forEach(function(o){return no(o,r)})});return Up(function(){var r=li.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||no(a,null)}),s.forEach(function(a){o.has(a)||no(a,i)})}li.set(n,e)},[e]),n}function Wp(e){return e}function Hp(e,t){t===void 0&&(t=Wp);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Kp(e){e===void 0&&(e={});var t=Hp(null);return t.options=xt({async:!0,ssr:!1},e),t}var rc=function(e){var t=e.sideCar,n=nc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,xt({},n))};rc.isSideCarExport=!0;function Gp(e,t){return e.useMedium(t),rc}var oc=Kp(),ro=function(){},Tr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,g=e.noRelative,m=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,k=e.gapMode,E=nc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,T=Bp([n,t]),N=xt(xt({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(C,{sideCar:oc,removeScrollBar:u,shards:c,noRelative:g,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:k}),i?d.cloneElement(d.Children.only(a),xt(xt({},N),{ref:T})):d.createElement(w,xt({},N,{className:l,ref:T}),a))});Tr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Tr.classNames={fullWidth:dr,zeroRight:ur};var Yp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yp();return t&&e.setAttribute("nonce",t),e}function qp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Xp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Qp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Jp())&&(qp(t,n),Xp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eh=function(){var e=Qp();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sc=function(){var e=eh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},th={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},nh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[oo(n),oo(r),oo(o)]},rh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return th;var t=nh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oh=sc(),fn="data-scroll-locked",sh=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
108
+ .`.concat(Lp,` {
109
+ overflow: hidden `).concat(r,`;
110
+ padding-right: `).concat(a,"px ").concat(r,`;
111
+ }
112
+ body[`).concat(fn,`] {
113
+ overflow: hidden `).concat(r,`;
114
+ overscroll-behavior: contain;
115
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
116
+ padding-left: `.concat(o,`px;
117
+ padding-top: `).concat(s,`px;
118
+ padding-right: `).concat(i,`px;
119
+ margin-left:0;
120
+ margin-top:0;
121
+ margin-right: `).concat(a,"px ").concat(r,`;
122
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
123
+ }
124
+
125
+ .`).concat(ur,` {
126
+ right: `).concat(a,"px ").concat(r,`;
127
+ }
128
+
129
+ .`).concat(dr,` {
130
+ margin-right: `).concat(a,"px ").concat(r,`;
131
+ }
132
+
133
+ .`).concat(ur," .").concat(ur,` {
134
+ right: 0 `).concat(r,`;
135
+ }
136
+
137
+ .`).concat(dr," .").concat(dr,` {
138
+ margin-right: 0 `).concat(r,`;
139
+ }
140
+
141
+ body[`).concat(fn,`] {
142
+ `).concat(Vp,": ").concat(a,`px;
143
+ }
144
+ `)},ui=function(){var e=parseInt(document.body.getAttribute(fn)||"0",10);return isFinite(e)?e:0},ih=function(){d.useEffect(function(){return document.body.setAttribute(fn,(ui()+1).toString()),function(){var e=ui()-1;e<=0?document.body.removeAttribute(fn):document.body.setAttribute(fn,e.toString())}},[])},ah=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ih();var s=d.useMemo(function(){return rh(o)},[o]);return d.createElement(oh,{styles:sh(s,!t,o,n?"":"!important")})},Oo=!1;if(typeof window<"u")try{var qn=Object.defineProperty({},"passive",{get:function(){return Oo=!0,!0}});window.addEventListener("test",qn,qn),window.removeEventListener("test",qn,qn)}catch{Oo=!1}var on=Oo?{passive:!1}:!1,ch=function(e){return e.tagName==="TEXTAREA"},ic=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ch(e)&&n[t]==="visible")},lh=function(e){return ic(e,"overflowY")},uh=function(e){return ic(e,"overflowX")},di=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ac(e,r);if(o){var s=cc(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},fh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ac=function(e,t){return e==="v"?lh(t):uh(t)},cc=function(e,t){return e==="v"?dh(t):fh(t)},ph=function(e,t){return e==="h"&&t==="rtl"?-1:1},hh=function(e,t,n,r,o){var s=ph(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,f=i>0,c=0,p=0;do{if(!a)break;var g=cc(e,a),m=g[0],v=g[1],y=g[2],x=v-y-s*m;(m||x)&&ac(e,a)&&(c+=x,p+=m);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(c)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Xn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fi=function(e){return[e.deltaX,e.deltaY]},pi=function(e){return e&&"current"in e?e.current:e},mh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gh=function(e){return`
145
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
146
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
147
+ `)},vh=0,sn=[];function bh(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(vh++)[0],s=d.useState(sc)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Fp([e.lockRef.current],(e.shards||[]).map(pi),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var x=Xn(v),w=n.current,k="deltaX"in v?v.deltaX:w[0]-x[0],E="deltaY"in v?v.deltaY:w[1]-x[1],C,T=v.target,N=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in v&&N==="h"&&T.type==="range")return!1;var F=window.getSelection(),A=F&&F.anchorNode,W=A?A===T||A.contains(T):!1;if(W)return!1;var H=di(N,T);if(!H)return!0;if(H?C=N:(C=N==="v"?"h":"v",H=di(N,T)),!H)return!1;if(!r.current&&"changedTouches"in v&&(k||E)&&(r.current=C),!C)return!0;var $=r.current||C;return hh($,y,v,$==="h"?k:E)},[]),l=d.useCallback(function(v){var y=v;if(!(!sn.length||sn[sn.length-1]!==s)){var x="deltaY"in y?fi(y):Xn(y),w=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&mh(C.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var k=(i.current.shards||[]).map(pi).filter(Boolean).filter(function(C){return C.contains(y.target)}),E=k.length>0?a(y,k[0]):!i.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),u=d.useCallback(function(v,y,x,w){var k={name:v,delta:y,target:x,should:w,shadowParent:yh(x)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(E){return E!==k})},1)},[]),f=d.useCallback(function(v){n.current=Xn(v),r.current=void 0},[]),c=d.useCallback(function(v){u(v.type,fi(v),v.target,a(v,e.lockRef.current))},[]),p=d.useCallback(function(v){u(v.type,Xn(v),v.target,a(v,e.lockRef.current))},[]);d.useEffect(function(){return sn.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,on),document.addEventListener("touchmove",l,on),document.addEventListener("touchstart",f,on),function(){sn=sn.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,on),document.removeEventListener("touchmove",l,on),document.removeEventListener("touchstart",f,on)}},[]);var g=e.removeScrollBar,m=e.inert;return d.createElement(d.Fragment,null,m?d.createElement(s,{styles:gh(o)}):null,g?d.createElement(ah,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wh=Gp(oc,bh);var us=d.forwardRef(function(e,t){return d.createElement(Tr,xt({},e,{ref:t,sideCar:wh}))});us.classNames=Tr.classNames;var xh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},an=new WeakMap,Qn=new WeakMap,er={},so=0,lc=function(e){return e&&(e.host||lc(e.parentNode))},_h=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=lc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Sh=function(e,t,n,r){var o=_h(t,Array.isArray(e)?e:[e]);er[n]||(er[n]=new WeakMap);var s=er[n],i=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(a.has(p))f(p);else try{var g=p.getAttribute(r),m=g!==null&&g!=="false",v=(an.get(p)||0)+1,y=(s.get(p)||0)+1;an.set(p,v),s.set(p,y),i.push(p),v===1&&m&&Qn.set(p,!0),y===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return f(t),a.clear(),so++,function(){i.forEach(function(c){var p=an.get(c)-1,g=s.get(c)-1;an.set(c,p),s.set(c,g),p||(Qn.has(c)||c.removeAttribute(r),Qn.delete(c)),g||c.removeAttribute(n)}),so--,so||(an=new WeakMap,an=new WeakMap,Qn=new WeakMap,er={})}},uc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=xh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Sh(r,o,n,"aria-hidden")):function(){return null}},Eh=Object.defineProperty,nt=(e,t)=>Eh(e,"name",{value:t,configurable:!0}),ds="Dialog",[dc,j_]=Dt(ds),[Ch,mt]=dc(ds),kh=nt(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=d.useRef(null),l=d.useRef(null),[u,f]=Fn({prop:r,defaultProp:o??!1,onChange:s,caller:ds}),[c,p]=d.useState(0),[g,m]=d.useState(0);return h.jsx(Ch,{scope:t,triggerRef:a,contentRef:l,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),titlePresent:c>0,descriptionPresent:g>0,setTitleCount:p,setDescriptionCount:m,open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(v=>!v),[f]),modal:i,children:n})},"Dialog"),Ph="DialogTrigger",N_=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Ph,r),i=be(n,s.triggerRef);return h.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Ir(s.open),...o,ref:i,onClick:Q(t.onClick,s.onOpenToggle)})},"DialogTrigger")),fc="DialogPortal",[Oh,pc]=dc(fc,{forceMount:void 0}),Rh=nt(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=mt(fc,t);return h.jsx(Oh,{scope:t,forceMount:n,children:d.Children.map(r,i=>h.jsx(jt,{present:n||s.open,children:h.jsx(cs,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),Ro="DialogOverlay",hc=d.forwardRef(nt(function(t,n){const r=pc(Ro,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,i=mt(Ro,t.__scopeDialog);return i.modal?h.jsx(jt,{present:o||i.open,children:h.jsx(Ih,{...s,ref:n})}):null},"DialogOverlay")),Th=Tt("DialogOverlay.RemoveScroll"),Ih=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Ro,r),i=Za(),a=be(n,i);return h.jsx(us,{as:Th,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(ke.div,{"data-state":Ir(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),In="DialogContent",mc=d.forwardRef(nt(function(t,n){const r=pc(In,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,i=mt(In,t.__scopeDialog);return h.jsx(jt,{present:o||i.open,children:i.modal?h.jsx(Ah,{...s,ref:n}):h.jsx(Dh,{...s,ref:n})})},"DialogContent")),Ah=d.forwardRef(nt(function(t,n){const r=mt(In,t.__scopeDialog),o=d.useRef(null),s=be(n,r.contentRef,o);return d.useEffect(()=>{const i=o.current;if(i)return uc(i)},[]),h.jsx(gc,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Q(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Q(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:Q(t.onFocusOutside,i=>i.preventDefault())})},"DialogContentModal")),Dh=d.forwardRef(nt(function(t,n){const r=mt(In,t.__scopeDialog),o=d.useRef(!1),s=d.useRef(!1);return h.jsx(gc,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:i=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((f=r.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})},"DialogContentNonModal")),gc=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,l=mt(In,r);return Rr(),h.jsx(h.Fragment,{children:h.jsx(Wa,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(ss,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Ir(l.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),jh="DialogTitle",vc=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(jh,r),{setTitleCount:i}=s;return Je(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),h.jsx(ke.h2,{id:s.titleId,...o,ref:n})},"DialogTitle")),Nh="DialogDescription",bc=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Nh,r),{setDescriptionCount:i}=s;return Je(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),h.jsx(ke.p,{id:s.descriptionId,...o,ref:n})},"DialogDescription")),Mh="DialogClose",zh=d.forwardRef(nt(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Mh,r);return h.jsx(ke.button,{type:"button",...o,ref:n,onClick:Q(t.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function Ir(e){return e?"open":"closed"}nt(Ir,"getState");const $h=kh,Fh=Rh,yc=d.forwardRef(({className:e,...t},n)=>h.jsx(hc,{className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));yc.displayName=hc.displayName;const Lh=zn("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),wc=d.forwardRef(({side:e="right",className:t,children:n,...r},o)=>h.jsxs(Fh,{children:[h.jsx(yc,{}),h.jsxs(mc,{ref:o,className:J(Lh({side:e}),t),...r,children:[n,h.jsxs(zh,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[h.jsx(Pf,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wc.displayName=mc.displayName;const xc=({className:e,...t})=>h.jsx("div",{className:J("flex flex-col space-y-2 text-center sm:text-left",e),...t});xc.displayName="SheetHeader";const _c=d.forwardRef(({className:e,...t},n)=>h.jsx(vc,{ref:n,className:J("text-lg font-semibold text-foreground",e),...t}));_c.displayName=vc.displayName;const Sc=d.forwardRef(({className:e,...t},n)=>h.jsx(bc,{ref:n,className:J("text-sm text-muted-foreground",e),...t}));Sc.displayName=bc.displayName;function hi({className:e,...t}){return h.jsx("div",{className:J("animate-pulse rounded-md bg-muted",e),...t})}var Vh=Object.defineProperty,Zh=(e,t)=>Vh(e,"name",{value:t,configurable:!0});function Ec(e){const[t,n]=d.useState(void 0);return Je(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}Zh(Ec,"useSize");var Uh=Object.defineProperty,Ut=(e,t)=>Uh(e,"name",{value:t,configurable:!0}),Cc="Popper",[kc,Ar]=Dt(Cc),[Bh,Pc]=kc(Cc),Wh=Ut(e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null),[s,i]=d.useState(void 0);return h.jsx(Bh,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),Hh="PopperAnchor",Kh=d.forwardRef(Ut(function(t,n){const{__scopePopper:r,virtualRef:o,...s}=t,i=Pc(Hh,r),a=d.useRef(null),l=i.onAnchorChange,u=d.useCallback(v=>{a.current=v,v&&l(v)},[l]),f=be(n,u),c=d.useRef(null);d.useEffect(()=>{if(!o)return;const v=c.current;c.current=o.current,v!==c.current&&l(c.current)});const p=i.placementState&&Dr(i.placementState),g=p==null?void 0:p[0],m=p==null?void 0:p[1];return o?null:h.jsx(ke.div,{"data-radix-popper-side":g,"data-radix-popper-align":m,...s,ref:f})},"PopperAnchor")),Oc="PopperContent",[Gh,M_]=kc(Oc),Yh=d.forwardRef(Ut(function(t,n){var ie,_e,rt,gt,lt,Ct,kt;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:c=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...y}=t,x=Pc(Oc,r),[w,k]=d.useState(null),E=be(n,k),[C,T]=d.useState(null),N=Ec(C),F=(N==null?void 0:N.width)??0,A=(N==null?void 0:N.height)??0,W=o+(i!=="center"?"-"+i:""),H=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(f)?f:[f],U=$.length>0,L={padding:H,boundary:$.filter(Rc),altBoundary:U},{refs:q,floatingStyles:B,placement:G,isPositioned:oe,middlewareData:re}=Uu({strategy:"fixed",placement:W,whileElementsMounted:Ut((...Nt)=>qu(...Nt,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:x.anchor},middleware:[Bu({mainAxis:s+A,alignmentAxis:a}),u&&Wu({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ju():void 0,...L}),u&&Hu({...L}),Ku({...L,apply:Ut(({elements:Nt,rects:ut,availableWidth:nn,availableHeight:Be})=>{const{width:rn,height:Kt}=ut.reference,ve=Nt.floating.style;ve.setProperty("--radix-popper-available-width",`${nn}px`),ve.setProperty("--radix-popper-available-height",`${Be}px`),ve.setProperty("--radix-popper-anchor-width",`${rn}px`),ve.setProperty("--radix-popper-anchor-height",`${Kt}px`)},"apply")}),C&&Gu({element:C,padding:l}),Jh({arrowWidth:F,arrowHeight:A}),g&&Yu({strategy:"referenceHidden",...L,boundary:U?L.boundary:void 0})]}),V=x.setPlacementState;Je(()=>(V(G),()=>{V(void 0)}),[G,V]);const[ee,me]=Dr(G),ge=It(v);Je(()=>{oe&&(ge==null||ge())},[oe,ge]);const ne=(ie=re.arrow)==null?void 0:ie.x,ce=(_e=re.arrow)==null?void 0:_e.y,se=((rt=re.arrow)==null?void 0:rt.centerOffset)!==0,[xe,Pe]=d.useState();return Je(()=>{w&&Pe(window.getComputedStyle(w).zIndex)},[w]),h.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:oe?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(gt=re.transformOrigin)==null?void 0:gt.x,(lt=re.transformOrigin)==null?void 0:lt.y].join(" "),...((Ct=re.hide)==null?void 0:Ct.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(Gh,{scope:r,placedSide:ee,placedAlign:me,onArrowChange:T,arrowX:ne,arrowY:ce,shouldHideArrow:se,children:h.jsx(ke.div,{"data-side":ee,"data-align":me,...y,ref:E,style:{...y.style,animation:oe?(kt=y.style)==null?void 0:kt.animation:"none"}})})})},"PopperContent"));function Rc(e){return e!==null}Ut(Rc,"isNotNull");var Jh=Ut(e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=Dr(n),c={start:"0%",center:"50%",end:"100%"}[f],p=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let m="",v="";return u==="bottom"?(m=i?c:`${p}px`,v=`${-l}px`):u==="top"?(m=i?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,v=i?c:`${g}px`):u==="left"&&(m=`${r.floating.width+l}px`,v=i?c:`${g}px`),{data:{x:m,y:v}}}}),"transformOrigin");function Dr(e){const[t,n="center"]=e.split("-");return[t,n]}Ut(Dr,"getSideAndAlignFromPlacement");var Tc=Wh,Ic=Kh,Ac=Yh,qh=Object.defineProperty,Xh=(e,t)=>qh(e,"name",{value:t,configurable:!0}),Qh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),em=d.forwardRef(Xh(function(t,n){return h.jsx(ke.span,{...t,ref:n,style:{...Qh,...t.style}})},"VisuallyHidden")),tm=em,nm=Object.defineProperty,Me=(e,t)=>nm(e,"name",{value:t,configurable:!0}),[fs,z_]=Dt("Tooltip",[Ar]),ps=Ar(),rm="TooltipProvider",om=700,To="tooltip.open",[sm,hs]=fs(rm),im=Me(e=>{const{__scopeTooltip:t,delayDuration:n=om,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),h.jsx(sm,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),i.current=!1)},[r]),onClose:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),Io="Tooltip",[am,Ln]=fs(Io),cm=Me(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=hs(Io,e.__scopeTooltip),u=ps(t),[f,c]=d.useState(null),[p,g]=d.useState(void 0),m=Zt(),v=d.useRef(0),y=i??l.disableHoverableContent,x=a??l.delayDuration,w=d.useRef(!1),[k,E]=Fn({prop:r,defaultProp:o??!1,onChange:Me(W=>{W?(l.onOpen(),document.dispatchEvent(new CustomEvent(To))):l.onClose(),s==null||s(W)},"onChange"),caller:Io}),C=d.useMemo(()=>k?w.current?"delayed-open":"instant-open":"closed",[k]),T=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w.current=!1,E(!0)},[E]),N=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),F=d.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{w.current=!0,E(!0),v.current=0},x)},[x,E]);d.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const A=p??m;return h.jsx(Tc,{...u,children:h.jsx(am,{scope:t,contentId:A,setContentId:g,open:k,stateAttribute:C,trigger:f,onTriggerChange:c,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?F():T()},[l.isOpenDelayedRef,F,T]),onTriggerLeave:d.useCallback(()=>{y?N():(window.clearTimeout(v.current),v.current=0)},[N,y]),onOpen:T,onClose:N,disableHoverableContent:y,children:n})})},"Tooltip"),mi="TooltipTrigger",lm=d.forwardRef(Me(function(t,n){const{__scopeTooltip:r,...o}=t,s=Ln(mi,r),i=hs(mi,r),a=ps(r),l=d.useRef(null),u=be(n,l,s.onTriggerChange),f=d.useRef(!1),c=d.useRef(!1),p=d.useCallback(()=>f.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),h.jsx(Ic,{asChild:!0,...a,children:h.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:Q(t.onPointerMove,g=>{g.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Q(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Q(t.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Q(t.onFocus,()=>{f.current||s.onOpen()}),onBlur:Q(t.onBlur,s.onClose),onClick:Q(t.onClick,s.onClose)})})},"TooltipTrigger")),Dc="TooltipPortal",[um,dm]=fs(Dc,{forceMount:void 0}),fm=Me(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Ln(Dc,t);return h.jsx(um,{scope:t,forceMount:n,children:h.jsx(jt,{present:n||s.open,children:h.jsx(cs,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),An="TooltipContent",pm=d.forwardRef(Me(function(t,n){const r=dm(An,t.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=t,a=Ln(An,t.__scopeTooltip);return h.jsx(jt,{present:o||a.open,children:a.disableHoverableContent?h.jsx(jc,{side:s,...i,ref:n}):h.jsx(hm,{side:s,...i,ref:n})})},"TooltipContent")),hm=d.forwardRef(Me(function(t,n){const r=Ln(An,t.__scopeTooltip),o=hs(An,t.__scopeTooltip),s=d.useRef(null),i=be(n,s),[a,l]=d.useState(null),{trigger:u,onClose:f}=r,c=s.current,{onPointerInTransitChange:p}=o,g=d.useCallback(()=>{l(null),p(!1)},[p]),m=d.useCallback((v,y)=>{const x=v.currentTarget,w={x:v.clientX,y:v.clientY},k=Nc(w,x.getBoundingClientRect()),E=Mc(w,k),C=zc(y.getBoundingClientRect()),T=Fc([...E,...C]);l(T),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(u&&c){const v=Me(x=>m(x,c),"handleTriggerLeave"),y=Me(x=>m(x,u),"handleContentLeave");return u.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[u,c,m,g]),d.useEffect(()=>{if(a){const v=Me(y=>{const x=y.target,w={x:y.clientX,y:y.clientY},k=(u==null?void 0:u.contains(x))||(c==null?void 0:c.contains(x)),E=!$c(w,a);k?g():E&&(g(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,c,a,f,g]),h.jsx(jc,{...t,ref:i})},"TooltipContentHoverable")),mm=va("TooltipContent"),jc=d.forwardRef(Me(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=t,f=Ln(An,r),c=ps(r),{onClose:p}=f;d.useEffect(()=>(document.addEventListener(To,p),()=>document.removeEventListener(To,p)),[p]),d.useEffect(()=>{if(f.trigger){const m=Me(v=>{v.target instanceof Node&&v.target.contains(f.trigger)&&p()},"handleScroll");return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,p]);const{setContentId:g}=f;return Je(()=>(g(i),()=>{g(void 0)}),[i,g]),h.jsx(ss,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:h.jsxs(Ac,{"data-state":f.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:f.contentId,...c,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(mm,{children:o}),s?h.jsx(tm,{id:f.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Nc(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}Me(Nc,"getExitSideFromRect");function Mc(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}Me(Mc,"getPaddedExitPoints");function zc(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}Me(zc,"getPointsFromRect");function $c(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}Me($c,"isPointInPolygon");function Fc(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Lc(t)}Me(Fc,"getHull");function Lc(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Me(Lc,"getHullPresorted");var gm=im,vm=cm,bm=lm,ym=fm,Vc=pm;const wm=gm,xm=vm,_m=bm,Zc=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(ym,{children:h.jsx(Vc,{ref:r,sideOffset:t,"data-slot":"tooltip-content",className:J("z-[50] overflow-hidden rounded-lg bg-foreground/85 px-[7px] py-1.5 text-[11px] text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Zc.displayName=Vc.displayName;const Sm="sidebar_state",Em=3600*24*7,Cm="16rem",km="18rem",Pm="3rem",Om="b",Uc=d.createContext(null);function jr(){const e=d.useContext(Uc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Bc=d.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...i},a)=>{const l=Of(),[u,f]=d.useState(!1),[c,p]=d.useState(e),g=t??c,m=d.useCallback(w=>{const k=typeof w=="function"?w(g):w;n?n(k):p(k),document.cookie=`${Sm}=${k}; path=/; max-age=${Em}`},[n,g]),v=d.useCallback(()=>l?f(w=>!w):m(w=>!w),[l,m,f]);d.useEffect(()=>{const w=k=>{k.key===Om&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),v())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[v]);const y=g?"expanded":"collapsed",x=d.useMemo(()=>({state:y,open:g,setOpen:m,isMobile:l,openMobile:u,setOpenMobile:f,toggleSidebar:v}),[y,g,m,l,u,f,v]);return h.jsx(Uc.Provider,{value:x,children:h.jsx(wm,{delayDuration:0,children:h.jsx("div",{style:{"--sidebar-width":Cm,"--sidebar-width-icon":Pm,...o},className:J("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:a,...i,children:s})})})});Bc.displayName="SidebarProvider";const Wc=d.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s},i)=>{const{isMobile:a,state:l,openMobile:u,setOpenMobile:f}=jr();return n==="none"?h.jsx("div",{className:J("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...s,children:o}):a?h.jsx($h,{open:u,onOpenChange:f,...s,children:h.jsxs(wc,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":km},side:e,children:[h.jsxs(xc,{className:"sr-only",children:[h.jsx(_c,{children:"Sidebar"}),h.jsx(Sc,{children:"Displays the mobile sidebar."})]}),h.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):h.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[h.jsx("div",{className:J("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),h.jsx("div",{className:J("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:h.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});Wc.displayName="Sidebar";const Hc=d.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=jr();return h.jsxs(Or,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:J("h-7 w-7",e),onClick:s=>{t==null||t(s),o()},...n,children:[h.jsx(wf,{}),h.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Hc.displayName="SidebarTrigger";const Rm=d.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=jr();return h.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:J("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Rm.displayName="SidebarRail";const Kc=d.forwardRef(({className:e,...t},n)=>h.jsx("main",{ref:n,className:J("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Kc.displayName="SidebarInset";const Tm=d.forwardRef(({className:e,...t},n)=>h.jsx(yr,{ref:n,"data-sidebar":"input",className:J("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Tm.displayName="SidebarInput";const Gc=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"header",className:J("flex flex-col gap-2 p-2",e),...t}));Gc.displayName="SidebarHeader";const Yc=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"footer",className:J("flex flex-col gap-2 p-2",e),...t}));Yc.displayName="SidebarFooter";const Im=d.forwardRef(({className:e,...t},n)=>h.jsx(wr,{ref:n,"data-sidebar":"separator",className:J("mx-2 w-auto bg-sidebar-border",e),...t}));Im.displayName="SidebarSeparator";const Jc=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"content",className:J("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Jc.displayName="SidebarContent";const fr=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group",className:J("relative flex w-full min-w-0 flex-col p-2",e),...t}));fr.displayName="SidebarGroup";const Ao=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?vn:"div";return h.jsx(o,{ref:r,"data-sidebar":"group-label",className:J("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});Ao.displayName="SidebarGroupLabel";const Am=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?vn:"button";return h.jsx(o,{ref:r,"data-sidebar":"group-action",className:J("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});Am.displayName="SidebarGroupAction";const pr=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group-content",className:J("w-full text-sm",e),...t}));pr.displayName="SidebarGroupContent";const hr=d.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu",className:J("flex w-full min-w-0 flex-col gap-1",e),...t}));hr.displayName="SidebarMenu";const mr=d.forwardRef(({className:e,...t},n)=>h.jsx("li",{ref:n,"data-sidebar":"menu-item",className:J("group/menu-item relative",e),...t}));mr.displayName="SidebarMenuItem";const Dm=zn("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),gr=d.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...i},a)=>{const l=e?vn:"button",{isMobile:u,state:f}=jr(),c=h.jsx(l,{ref:a,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:J(Dm({variant:n,size:r}),s),...i});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(xm,{children:[h.jsx(_m,{asChild:!0,children:c}),h.jsx(Zc,{side:"right",align:"center",hidden:f!=="collapsed"||u,...o})]})):c});gr.displayName="SidebarMenuButton";const jm=d.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const s=t?vn:"button";return h.jsx(s,{ref:o,"data-sidebar":"menu-action",className:J("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});jm.displayName="SidebarMenuAction";const Nm=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:J("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Nm.displayName="SidebarMenuBadge";const Mm=d.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=d.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return h.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:J("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&h.jsx(hi,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),h.jsx(hi,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});Mm.displayName="SidebarMenuSkeleton";const zm=d.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:J("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));zm.displayName="SidebarMenuSub";const $m=d.forwardRef(({...e},t)=>h.jsx("li",{ref:t,...e}));$m.displayName="SidebarMenuSubItem";const Fm=d.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},s)=>{const i=e?vn:"a";return h.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:J("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})});Fm.displayName="SidebarMenuSubButton";var Lm=Object.defineProperty,Ne=(e,t)=>Lm(e,"name",{value:t,configurable:!0});function ms(e){const t=e+"CollectionProvider",[n,r]=Dt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=Ne(v=>{const{scope:y,children:x}=v,w=d.useRef(null),k=d.useRef(new Map).current;return h.jsx(o,{scope:y,itemMap:k,collectionRef:w,children:x})},"CollectionProvider");i.displayName=t;const a=e+"CollectionSlot",l=Tt(a),u=d.forwardRef((v,y)=>{const{scope:x,children:w}=v,k=s(a,x),E=be(y,k.collectionRef);return h.jsx(l,{ref:E,children:w})});u.displayName=a;const f=e+"CollectionItemSlot",c="data-radix-collection-item",p=Tt(f),g=d.forwardRef((v,y)=>{const{scope:x,children:w,...k}=v,E=d.useRef(null),C=be(y,E),T=s(f,x);return d.useEffect(()=>(T.itemMap.set(E,{ref:E,...k}),()=>void T.itemMap.delete(E))),h.jsx(p,{[c]:"",ref:C,children:w})});g.displayName=f;function m(v){const y=s(e+"CollectionConsumer",v);return d.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const k=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(y.itemMap.values()).sort((T,N)=>k.indexOf(T.ref.current)-k.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return Ne(m,"useCollection"),[{Provider:i,Slot:u,ItemSlot:g},m,r]}Ne(ms,"createCollection");var gi=new WeakMap,Re,Qe,io=(Qe=class extends Map{constructor(n){super(n);Ws(this,Re);Yr(this,Re,[...super.keys()]),gi.set(this,!0)}set(n,r){return gi.get(this)&&(this.has(n)?Ze(this,Re)[Ze(this,Re).indexOf(n)]=n:Ze(this,Re).push(n)),super.set(n,r),this}insert(n,r,o){const s=this.has(r),i=Ze(this,Re).length,a=gs(n);let l=a>=0?a:i+a;const u=l<0||l>=i?-1:l;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const f=this.size+(s?0:1);a<0&&l++;const c=[...Ze(this,Re)];let p,g=!1;for(let m=l;m<f;m++)if(l===m){let v=c[m];c[m]===r&&(v=c[m+1]),s&&this.delete(r),p=this.get(v),this.set(r,o)}else{!g&&c[m-1]===r&&(g=!0);const v=c[g?m:m-1],y=p;p=this.get(v),this.delete(v),this.set(v,y)}return this}with(n,r,o){const s=new Qe(this);return s.insert(n,r,o),s}before(n){const r=Ze(this,Re).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const s=Ze(this,Re).indexOf(n);return s===-1?this:this.insert(s,r,o)}after(n){let r=Ze(this,Re).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const s=Ze(this,Re).indexOf(n);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Yr(this,Re,[]),super.clear()}delete(n){const r=super.delete(n);return r&&Ze(this,Re).splice(Ze(this,Re).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=vr(Ze(this,Re),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=vr(Ze(this,Re),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return Ze(this,Re).indexOf(n)}keyAt(n){return vr(Ze(this,Re),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return s;o++}}findIndex(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return o;o++}return-1}filter(n,r){const o=[];let s=0;for(const i of this)Reflect.apply(n,r,[i,s,this])&&o.push(i),s++;return new Qe(o)}map(n,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,r,[i,s,this])]),s++;return new Qe(o)}reduce(...n){const[r,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[r,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new Qe(r)}toReversed(){const n=new Qe;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),s=this.get(o);n.set(o,s)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Qe(r)}slice(n,r){const o=new Qe;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),l=this.get(a);o.set(a,l)}return o}every(n,r){let o=0;for(const s of this){if(!Reflect.apply(n,r,[s,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return!0;o++}return!1}},Re=new WeakMap,Ne(Qe,"OrderedDict"),Qe);function vr(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=qc(e,t);return n===-1?void 0:e[n]}Ne(vr,"at");function qc(e,t){const n=e.length,r=gs(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}Ne(qc,"toSafeIndex");function gs(e){return e!==e||e===0?0:Math.trunc(e)}Ne(gs,"toSafeInteger");function Vm(e){const t=e+"CollectionProvider",[n,r]=Dt(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new io,setItemMap:Ne(()=>{},"setItemMap")}),i=Ne(({state:k,...E})=>k?h.jsx(l,{...E,state:k}):h.jsx(a,{...E}),"CollectionProvider");i.displayName=t;const a=Ne(k=>{const E=y();return h.jsx(l,{...k,state:E})},"CollectionInit");a.displayName=t+"Init";const l=Ne(k=>{const{scope:E,children:C,state:T}=k,N=d.useRef(null),[F,A]=d.useState(null),W=be(N,A),[H,$]=T;return d.useEffect(()=>{if(!F)return;const U=el(()=>{});return U.observe(F,{childList:!0,subtree:!0}),()=>{U.disconnect()}},[F]),h.jsx(o,{scope:E,itemMap:H,setItemMap:$,collectionRef:W,collectionRefObject:N,collectionElement:F,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";const u=e+"CollectionSlot",f=Tt(u),c=d.forwardRef((k,E)=>{const{scope:C,children:T}=k,N=s(u,C),F=be(E,N.collectionRef);return h.jsx(f,{ref:F,children:T})});c.displayName=u;const p=e+"CollectionItemSlot",g="data-radix-collection-item",m=Tt(p),v=d.forwardRef((k,E)=>{const{scope:C,children:T,...N}=k,F=d.useRef(null),[A,W]=d.useState(null),H=be(E,F,W),$=s(p,C),{setItemMap:U}=$,L=d.useRef(N);Xc(L.current,N)||(L.current=N);const q=L.current;return d.useEffect(()=>{const B=q;return U(G=>A?G.has(A)?G.set(A,{...B,element:A}).toSorted(Do):(G.set(A,{...B,element:A}),G.toSorted(Do)):G),()=>{U(G=>!A||!G.has(A)?G:(G.delete(A),new io(G)))}},[A,q,U]),h.jsx(m,{[g]:"",ref:H,children:T})});v.displayName=p;function y(){return d.useState(new io)}Ne(y,"useInitCollection");function x(k){const{itemMap:E}=s(e+"CollectionConsumer",k);return E}return Ne(x,"useCollection"),[{Provider:i,Slot:c,ItemSlot:v},{createCollectionScope:r,useCollection:x,useInitCollection:y}]}Ne(Vm,"createCollection");function Xc(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||e[o]!==t[o])return!1;return!0}Ne(Xc,"shallowEqual");function Qc(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ne(Qc,"isElementPreceding");function Do(e,t){return!e[1].element||!t[1].element?0:Qc(e[1].element,t[1].element)?-1:1}Ne(Do,"sortByDocumentPosition");function el(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}Ne(el,"getChildListObserver");var Zm=Object.defineProperty,Um=(e,t)=>Zm(e,"name",{value:t,configurable:!0}),Bm=d.createContext(void 0);function vs(e){const t=d.useContext(Bm);return e||t||"ltr"}Um(vs,"useDirection");var Wm=Object.defineProperty,bs=(e,t)=>Wm(e,"name",{value:t,configurable:!0}),ao=!1;function tl(){const[e,t]=d.useState(ao);return d.useEffect(()=>{ao||(ao=!0,t(!0))},[]),e}bs(tl,"useIsHydrated");var nl=gn[" useSyncExternalStore ".trim().toString()];function rl(){return()=>{}}bs(rl,"subscribe");function ol(){return nl(rl,()=>!0,()=>!1)}bs(ol,"useIsHydratedModern");var Hm=typeof nl=="function"?ol:tl,Km=Object.defineProperty,Qt=(e,t)=>Km(e,"name",{value:t,configurable:!0}),co="rovingFocusGroup.onEntryFocus",Gm={bubbles:!1,cancelable:!0},Nr="RovingFocusGroup",[jo,sl,Ym]=ms(Nr),[Jm,il]=Dt(Nr,[Ym]),[qm,Xm]=Jm(Nr),Qm=d.forwardRef(Qt(function(t,n){return h.jsx(jo.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(jo.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(eg,{...t,ref:n})})})},"RovingFocusGroup")),eg=d.forwardRef(Qt(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:c=!1,...p}=t,g=d.useRef(null),m=be(n,g),v=vs(i),[y,x]=Fn({prop:a,defaultProp:l??null,onChange:u,caller:Nr}),[w,k]=d.useState(!1),E=It(f),C=sl(r),T=d.useRef(!1),[N,F]=d.useState(0);return d.useEffect(()=>{const A=g.current;if(A)return A.addEventListener(co,E),()=>A.removeEventListener(co,E)},[E]),h.jsx(qm,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:d.useCallback(A=>x(A),[x]),onItemShiftTab:d.useCallback(()=>k(!0),[]),onFocusableItemAdd:d.useCallback(()=>F(A=>A+1),[]),onFocusableItemRemove:d.useCallback(()=>F(A=>A-1),[]),children:h.jsx(ke.div,{tabIndex:w||N===0?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:Q(t.onMouseDown,()=>{T.current=!0}),onFocus:Q(t.onFocus,A=>{const W=!T.current;if(A.target===A.currentTarget&&W&&!w){const H=new CustomEvent(co,Gm);if(A.currentTarget.dispatchEvent(H),!H.defaultPrevented){const $=C().filter(G=>G.focusable),U=$.find(G=>G.active),L=$.find(G=>G.id===y),B=[U,L,...$].filter(Boolean).map(G=>G.ref.current);ys(B,c)}}T.current=!1}),onBlur:Q(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),tg="RovingFocusGroupItem",ng=d.forwardRef(Qt(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...l}=t,u=Zt(),f=i||u,c=Xm(tg,r),p=c.currentTabStopId===f,g=sl(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:y}=c,x=Hm();return Je(()=>{if(!(!x||!o))return m(),()=>v()},[x,o,m,v]),d.useEffect(()=>{if(!(x||!o))return m(),()=>v()},[x,o,m,v]),h.jsx(jo.ItemSlot,{scope:r,id:f,focusable:o,active:s,children:h.jsx(ke.span,{tabIndex:p?0:-1,"data-orientation":c.orientation,...l,ref:n,onMouseDown:Q(t.onMouseDown,w=>{o?c.onItemFocus(f):w.preventDefault()}),onFocus:Q(t.onFocus,()=>c.onItemFocus(f)),onKeyDown:Q(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const k=cl(w,c.orientation,c.dir);if(k!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=g().filter(T=>T.focusable).map(T=>T.ref.current);if(k==="last")C.reverse();else if(k==="prev"||k==="next"){k==="prev"&&C.reverse();const T=C.indexOf(w.currentTarget);C=c.loop?ll(C,T+1):C.slice(T+1)}setTimeout(()=>ys(C))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})},"RovingFocusGroupItem")),rg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function al(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Qt(al,"getDirectionAwareKey");function cl(e,t,n){const r=al(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rg[r]}Qt(cl,"getFocusIntent");function ys(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Qt(ys,"focusFirst");function ll(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Qt(ll,"wrapArray");var og=Qm,sg=ng,ig=Object.defineProperty,ae=(e,t)=>ig(e,"name",{value:t,configurable:!0}),No=["Enter"," "],ag=["ArrowDown","PageUp","Home"],ul=["ArrowUp","PageDown","End"],cg=[...ag,...ul],lg={ltr:[...No,"ArrowRight"],rtl:[...No,"ArrowLeft"]},ug={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Mr="Menu",[Dn,dg,fg]=ms(Mr),[en,dl]=Dt(Mr,[fg,Ar,il]),ws=Ar(),fl=il(),[pg,tn]=en(Mr),[hg,Vn]=en(Mr),mg=ae(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=ws(t),[l,u]=d.useState(null),f=d.useRef(!1),c=It(s),p=vs(o);return d.useEffect(()=>{const g=ae(()=>{f.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=ae(()=>f.current=!1,"handlePointer");return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),d.useEffect(()=>{if(!n)return;const g=ae(()=>c(!1),"handleBlur");return window.addEventListener("blur",g),()=>window.removeEventListener("blur",g)},[n,c]),h.jsx(Tc,{...a,children:h.jsx(pg,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:h.jsx(hg,{scope:t,onClose:d.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})},"Menu"),pl=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t,s=ws(r);return h.jsx(Ic,{...s,...o,ref:n})},"MenuAnchor")),hl="MenuPortal",[gg,ml]=en(hl,{forceMount:void 0}),vg=ae(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=tn(hl,t);return h.jsx(gg,{scope:t,forceMount:n,children:h.jsx(jt,{present:n||s.open,children:h.jsx(cs,{asChild:!0,container:o,children:r})})})},"MenuPortal"),pt="MenuContent",[bg,xs]=en(pt),yg=d.forwardRef(ae(function(t,n){const r=ml(pt,t.__scopeMenu),{forceMount:o=r.forceMount,...s}=t,i=tn(pt,t.__scopeMenu),a=Vn(pt,t.__scopeMenu);return h.jsx(Dn.Provider,{scope:t.__scopeMenu,children:h.jsx(jt,{present:o||i.open,children:h.jsx(Dn.Slot,{scope:t.__scopeMenu,children:a.modal?h.jsx(wg,{...s,ref:n}):h.jsx(xg,{...s,ref:n})})})})},"MenuContent")),wg=d.forwardRef(ae(function(t,n){const r=tn(pt,t.__scopeMenu),o=d.useRef(null),s=be(n,o);return d.useEffect(()=>{const i=o.current;if(i)return uc(i)},[]),h.jsx(_s,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Q(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),xg=d.forwardRef(ae(function(t,n){const r=tn(pt,t.__scopeMenu);return h.jsx(_s,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),_g=Tt("MenuContent.ScrollLock"),_s=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:v,...y}=t,x=tn(pt,r),w=Vn(pt,r),k=ws(r),E=fl(r),C=dg(r),[T,N]=d.useState(null),F=d.useRef(null),A=be(n,F,x.onContentChange),W=d.useRef(0),H=d.useRef(""),$=d.useRef(0),U=d.useRef(null),L=d.useRef("right"),q=d.useRef(0),B=v?us:d.Fragment,G=v?{as:_g,allowPinchZoom:!0}:void 0,oe=ae(V=>{var Pe,ie;const ee=H.current+V,me=C().filter(_e=>!_e.disabled),ge=document.activeElement,ne=(Pe=me.find(_e=>_e.ref.current===ge))==null?void 0:Pe.textValue,ce=me.map(_e=>_e.textValue),se=_l(ce,ee,ne),xe=(ie=me.find(_e=>_e.textValue===se))==null?void 0:ie.ref.current;ae((function _e(rt){H.current=rt,window.clearTimeout(W.current),rt!==""&&(W.current=window.setTimeout(()=>_e(""),1e3))}),"updateSearch")(ee),xe&&setTimeout(()=>xe.focus())},"handleTypeaheadSearch");d.useEffect(()=>()=>window.clearTimeout(W.current),[]),Rr();const re=d.useCallback(V=>{var me,ge;return L.current===((me=U.current)==null?void 0:me.side)&&El(V,(ge=U.current)==null?void 0:ge.area)},[]);return h.jsx(bg,{scope:r,searchRef:H,onItemEnter:d.useCallback(V=>{re(V)&&V.preventDefault()},[re]),onItemLeave:d.useCallback(V=>{var ee;re(V)||((ee=F.current)==null||ee.focus(),N(null))},[re]),onTriggerLeave:d.useCallback(V=>{re(V)&&V.preventDefault()},[re]),pointerGraceTimerRef:$,onPointerGraceIntentChange:d.useCallback(V=>{U.current=V},[]),children:h.jsx(B,{...G,children:h.jsx(Wa,{asChild:!0,trapped:s,onMountAutoFocus:Q(i,V=>{var ee;V.preventDefault(),(ee=F.current)==null||ee.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(ss,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:h.jsx(og,{asChild:!0,...E,dir:w.dir,orientation:"vertical",loop:o,currentTabStopId:T,onCurrentTabStopIdChange:N,onEntryFocus:Q(u,V=>{w.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Ac,{role:"menu","aria-orientation":"vertical","data-state":Es(x.open),"data-radix-menu-content":"",dir:w.dir,...k,...y,ref:A,style:{outline:"none",...y.style},onKeyDown:Q(y.onKeyDown,V=>{const me=V.target.closest("[data-radix-menu-content]")===V.currentTarget,ge=V.ctrlKey||V.altKey||V.metaKey,ne=V.key.length===1;me&&(V.key==="Tab"&&V.preventDefault(),!ge&&ne&&oe(V.key));const ce=F.current;if(V.target!==ce||!cg.includes(V.key))return;V.preventDefault();const xe=C().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);ul.includes(V.key)&&xe.reverse(),wl(xe)}),onBlur:Q(t.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(W.current),H.current="")}),onPointerMove:Q(t.onPointerMove,hn(V=>{const ee=V.target,me=q.current!==V.clientX;if(V.currentTarget.contains(ee)&&me){const ge=V.clientX>q.current?"right":"left";L.current=ge,q.current=V.clientX}}))})})})})})})},"MenuContentImpl")),Sg=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t;return h.jsx(ke.div,{...o,ref:n})},"MenuLabel")),Mo="MenuItem",vi="menu.itemSelect",Ss=d.forwardRef(ae(function(t,n){const{disabled:r=!1,onSelect:o,...s}=t,i=d.useRef(null),a=Vn(Mo,t.__scopeMenu),l=xs(Mo,t.__scopeMenu),u=be(n,i),f=d.useRef(!1),c=ae(()=>{const p=i.current;if(!r&&p){const g=new CustomEvent(vi,{bubbles:!0,cancelable:!0});p.addEventListener(vi,m=>o==null?void 0:o(m),{once:!0}),os(p,g),g.defaultPrevented?f.current=!1:a.onClose()}},"handleSelect");return h.jsx(gl,{...s,ref:u,disabled:r,onClick:Q(t.onClick,c),onPointerDown:p=>{var g;(g=t.onPointerDown)==null||g.call(t,p),f.current=!0},onPointerUp:Q(t.onPointerUp,p=>{var g;f.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:Q(t.onKeyDown,p=>{r||p.target!==p.currentTarget||l.searchRef.current!==""&&p.key===" "||No.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})},"MenuItem")),gl=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=t,a=xs(Mo,r),l=fl(r),u=d.useRef(null),f=be(n,u),[c,p]=d.useState(!1),[g,m]=d.useState("");return d.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[i.children]),h.jsx(Dn.ItemSlot,{scope:r,disabled:o,textValue:s??g,children:h.jsx(sg,{asChild:!0,...l,focusable:!o,children:h.jsx(ke.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:f,onPointerMove:Q(t.onPointerMove,hn(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Q(t.onPointerLeave,hn(v=>a.onItemLeave(v))),onFocus:Q(t.onFocus,()=>p(!0)),onBlur:Q(t.onBlur,()=>p(!1))})})})},"MenuItemImpl")),Eg=d.forwardRef(ae(function(t,n){const{checked:r=!1,onCheckedChange:o,...s}=t;return h.jsx(bl,{scope:t.__scopeMenu,checked:r,children:h.jsx(Ss,{role:"menuitemcheckbox","aria-checked":jn(r)?"mixed":r,...s,ref:n,"data-state":zr(r),onSelect:Q(s.onSelect,()=>o==null?void 0:o(jn(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Cg="MenuRadioGroup",[$_,kg]=en(Cg,{value:void 0,onValueChange:ae(()=>{},"onValueChange")}),Pg="MenuRadioItem",Og=d.forwardRef(ae(function(t,n){const{value:r,...o}=t,s=kg(Pg,t.__scopeMenu),i=r===s.value;return h.jsx(bl,{scope:t.__scopeMenu,checked:i,children:h.jsx(Ss,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":zr(i),onSelect:Q(o.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,r)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),vl="MenuItemIndicator",[bl,Rg]=en(vl,{checked:!1}),Tg=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,forceMount:o,...s}=t,i=Rg(vl,r);return h.jsx(jt,{present:o||jn(i.checked)||i.checked===!0,children:h.jsx(ke.span,{...s,ref:n,"data-state":zr(i.checked)})})},"MenuItemIndicator")),Ig=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t;return h.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),Ag="MenuSub",[F_,yl]=en(Ag),tr="MenuSubTrigger",Dg=d.forwardRef(ae(function(t,n){const r=tn(tr,t.__scopeMenu),o=Vn(tr,t.__scopeMenu),s=yl(tr,t.__scopeMenu),i=xs(tr,t.__scopeMenu),a=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,f={__scopeMenu:t.__scopeMenu},c=d.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);d.useEffect(()=>c,[c]),d.useEffect(()=>{const g=l.current;return()=>{window.clearTimeout(g),u(null)}},[l,u]);const p=be(n,s.onTriggerChange);return h.jsx(pl,{asChild:!0,...f,children:h.jsx(gl,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":Es(r.open),...t,ref:p,onClick:g=>{var m;(m=t.onClick)==null||m.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Q(t.onPointerMove,hn(g=>{i.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:Q(t.onPointerLeave,hn(g=>{var v,y;c();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const x=(y=r.content)==null?void 0:y.dataset.side,w=x==="right",k=w?-5:5,E=m[w?"left":"right"],C=m[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:g.clientX+k,y:g.clientY},{x:E,y:m.top},{x:C,y:m.top},{x:C,y:m.bottom},{x:E,y:m.bottom}],side:x}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(g),g.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Q(t.onKeyDown,g=>{var v;t.disabled||g.target!==g.currentTarget||i.searchRef.current!==""&&g.key===" "||lg[o.dir].includes(g.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),g.preventDefault())})})})},"MenuSubTrigger")),jg="MenuSubContent",Ng=d.forwardRef(ae(function(t,n){const r=ml(pt,t.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...i}=t,a=tn(pt,t.__scopeMenu),l=Vn(pt,t.__scopeMenu),u=yl(jg,t.__scopeMenu),f=d.useRef(null),c=be(n,f);return h.jsx(Dn.Provider,{scope:t.__scopeMenu,children:h.jsx(jt,{present:o||a.open,children:h.jsx(Dn.Slot,{scope:t.__scopeMenu,children:h.jsx(_s,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:c,align:s,side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var g;l.isUsingKeyboardRef.current&&((g=f.current)==null||g.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Q(t.onFocusOutside,p=>{p.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Q(t.onEscapeKeyDown,p=>{l.onClose(),p.preventDefault()}),onKeyDown:Q(t.onKeyDown,p=>{var v;const g=p.currentTarget.contains(p.target),m=ug[l.dir].includes(p.key);g&&m&&(a.onOpenChange(!1),(v=u.trigger)==null||v.focus(),p.preventDefault())})})})})})},"MenuSubContent"));function Es(e){return e?"open":"closed"}ae(Es,"getOpenState");function jn(e){return e==="indeterminate"}ae(jn,"isIndeterminate");function zr(e){return jn(e)?"indeterminate":e?"checked":"unchecked"}ae(zr,"getCheckedState");function wl(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}ae(wl,"focusFirst");function xl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ae(xl,"wrapArray");function _l(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=xl(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}ae(_l,"getNextMatch");function Sl(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}ae(Sl,"isPointInPolygon");function El(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Sl(n,t)}ae(El,"isPointerInGraceArea");function hn(e){return t=>t.pointerType==="mouse"?e(t):void 0}ae(hn,"whenMouse");var Mg=mg,zg=pl,$g=vg,Fg=yg,Lg=Sg,Vg=Ss,Zg=Eg,Ug=Og,Bg=Tg,Wg=Ig,Hg=Dg,Kg=Ng,Gg=Object.defineProperty,it=(e,t)=>Gg(e,"name",{value:t,configurable:!0}),Cs="DropdownMenu",[Yg,L_]=Dt(Cs,[dl]),at=dl(),[Jg,Cl]=Yg(Cs),qg=it(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=at(t),u=d.useRef(null),[f,c]=Fn({prop:o,defaultProp:s??!1,onChange:i,caller:Cs});return h.jsx(Jg,{scope:t,triggerId:Zt(),triggerRef:u,contentId:Zt(),open:f,onOpenChange:c,onOpenToggle:d.useCallback(()=>c(p=>!p),[c]),modal:a,children:h.jsx(Mg,{...l,open:f,onOpenChange:c,dir:r,modal:a,children:n})})},"DropdownMenu"),Xg="DropdownMenuTrigger",Qg=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=t,i=Cl(Xg,r),a=at(r),l=be(n,i.triggerRef);return h.jsx(zg,{asChild:!0,...a,children:h.jsx(ke.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:l,onPointerDown:Q(t.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:Q(t.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),ev=it(e=>{const{__scopeDropdownMenu:t,...n}=e,r=at(t);return h.jsx($g,{...r,...n})},"DropdownMenuPortal"),tv="DropdownMenuContent",nv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=Cl(tv,r),i=at(r),a=d.useRef(!1);return h.jsx(Fg,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:Q(t.onCloseAutoFocus,l=>{var u;a.current||(u=s.triggerRef.current)==null||u.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Q(t.onInteractOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,c=u.button===2||f;(!s.modal||c)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),rv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Lg,{...s,...o,ref:n})},"DropdownMenuLabel")),ov=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Vg,{...s,...o,ref:n})},"DropdownMenuItem")),sv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Zg,{...s,...o,ref:n})},"DropdownMenuCheckboxItem")),iv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Ug,{...s,...o,ref:n})},"DropdownMenuRadioItem")),av=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Bg,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),cv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Wg,{...s,...o,ref:n})},"DropdownMenuSeparator")),lv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Hg,{...s,...o,ref:n})},"DropdownMenuSubTrigger")),uv=d.forwardRef(it(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return h.jsx(Kg,{...s,...o,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),dv=qg,fv=Qg,pv=ev,kl=nv,Pl=rv,Ol=ov,Rl=sv,Tl=iv,Il=av,Al=cv,Dl=lv,jl=uv;const hv=dv,mv=fv,gv=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsxs(Dl,{ref:o,className:J("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,h.jsx(sf,{className:"ml-auto"})]}));gv.displayName=Dl.displayName;const vv=d.forwardRef(({className:e,...t},n)=>h.jsx(jl,{ref:n,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));vv.displayName=jl.displayName;const Nl=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(pv,{children:h.jsx(kl,{ref:r,sideOffset:t,className:J("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Nl.displayName=kl.displayName;const zo=d.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(Ol,{ref:r,className:J("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));zo.displayName=Ol.displayName;const bv=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(Rl,{ref:o,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(Il,{children:h.jsx(rf,{className:"h-4 w-4"})})}),t]}));bv.displayName=Rl.displayName;const yv=d.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(Tl,{ref:r,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(Il,{children:h.jsx(cf,{className:"h-2 w-2 fill-current"})})}),t]}));yv.displayName=Tl.displayName;const wv=d.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(Pl,{ref:r,className:J("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));wv.displayName=Pl.displayName;const Ml=d.forwardRef(({className:e,...t},n)=>h.jsx(Al,{ref:n,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));Ml.displayName=Al.displayName;const $o="";async function nr(e,t,n,r){const o=await fetch(`${$o}${t}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:n!=null?JSON.stringify(n):void 0});if(o.status===204)return{data:null,status:204};const s=await o.json().catch(()=>null);return o.ok?{data:s,status:o.status}:{data:null,status:o.status,error:(s==null?void 0:s.error)??"Request failed"}}const zl={get:e=>nr("GET",e),post:(e,t)=>nr("POST",e,t),patch:(e,t)=>nr("PATCH",e,t),delete:e=>nr("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${$o}${e}`,{method:"POST",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,t)=>{const n=await fetch(`${$o}${e}`,{method:"PATCH",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}}};function $l(){const[e,t]=d.useState({user:null,loading:!0}),n=es();return d.useEffect(()=>{let r=!1;return zl.get("/api/v1/auth/me").then(({data:o,status:s})=>{r||(s===401||!o?(t({user:null,loading:!1}),n("/login",{replace:!0})):t({user:o,loading:!1}))}),()=>{r=!0}},[n]),e}const xv=6;function _v(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function Sv(e){const t=_v(e)%xv+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function Ev({name:e,avatarUrl:t,size:n=28}){const r=((e==null?void 0:e[0])??"?").toUpperCase(),o={width:n,height:n,borderRadius:"50%",flexShrink:0};if(t)return h.jsx("img",{src:t,alt:e,style:{...o,objectFit:"cover"}});const{bg:s,fg:i}=Sv(e);return h.jsx("span",{style:{...o,background:s,display:"inline-flex",alignItems:"center",justifyContent:"center",color:i,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const Cv=[{label:"App Center",href:"/app-center",icon:ff},{label:"Mac Resources",href:"/mac-resources",icon:gf}],kv=[{label:"Default",href:"/settings/default",icon:Ca,adminOnly:!1},{label:"Team",href:"/settings/team",icon:Cf,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:uf,adminOnly:!0}],Pv=[{label:"Docs",href:"https://www.tapflow.dev",icon:tf}];function Ov(){const{pathname:e}=fa(),t=es(),{user:n}=$l(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:o}=Pr(),s=o==="dark"?"/logo-dark.svg":"/logo.svg",[i,a]=d.useState(null),[l,u]=d.useState("tapflow");d.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(c=>c.ok?c.json():null).then(c=>{c!=null&&c.logo_url&&a(c.logo_url),c!=null&&c.team_name&&u(c.team_name)})},[]);async function f(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return h.jsxs(Wc,{collapsible:"icon",children:[h.jsx(Gc,{className:"p-2",children:h.jsxs(Kn,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[h.jsx("img",{src:i??s,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),h.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:l})]})}),h.jsxs(Jc,{children:[h.jsx(fr,{children:h.jsx(pr,{children:h.jsx(hr,{children:Cv.map(c=>h.jsx(mr,{children:h.jsx(gr,{asChild:!0,isActive:e.startsWith(c.href),tooltip:c.label,children:h.jsxs(Kn,{to:c.href,children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})}),h.jsxs(fr,{children:[h.jsx(Ao,{children:"Settings"}),h.jsx(pr,{children:h.jsx(hr,{children:kv.filter(c=>!c.adminOnly||r).map(c=>h.jsx(mr,{children:h.jsx(gr,{asChild:!0,isActive:e===c.href,tooltip:c.label,children:h.jsxs(Kn,{to:c.href,children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})]}),h.jsxs(fr,{children:[h.jsx(Ao,{children:"Reference"}),h.jsx(pr,{children:h.jsx(hr,{children:Pv.map(c=>h.jsx(mr,{children:h.jsx(gr,{asChild:!0,tooltip:c.label,children:h.jsxs("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})]})]}),n&&h.jsx(Yc,{className:"px-3 py-3",children:h.jsxs(hv,{children:[h.jsx(mv,{asChild:!0,children:h.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[h.jsx(Ev,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),h.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[h.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),h.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),h.jsxs(Nl,{side:"top",align:"start",className:"w-56",children:[h.jsx(zo,{asChild:!0,children:h.jsxs(Kn,{to:"/settings/default",children:[h.jsx(Ca,{className:"mr-2 h-4 w-4"}),"Settings"]})}),h.jsx(Ml,{}),h.jsxs(zo,{onClick:f,className:"text-destructive focus:text-destructive",children:[h.jsx(hf,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function Rv(){const{theme:e,setTheme:t}=Pr();return h.jsxs(Or,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[h.jsx(Sf,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),h.jsx(bf,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const Fl=d.createContext({node:null,setNode:()=>{}});function Tv({children:e}){const[t,n]=d.useState(null),r=d.useMemo(()=>({node:t,setNode:n}),[t]);return h.jsx(Fl.Provider,{value:r,children:e})}function Iv(){return d.useContext(Fl)}function Av(){const{node:e}=Iv();return h.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[h.jsx(Hc,{className:"-ml-1"}),h.jsx(wr,{orientation:"vertical",className:"h-4"}),e,h.jsx("div",{className:"flex-1"}),h.jsx(Rv,{}),h.jsx(wr,{orientation:"vertical",className:"h-4"}),h.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:h.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:h.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})})]})}function Dv(){const{user:e,loading:t}=$l(),n=fa();return t?null:e?["/settings/team","/settings/tokens"].some(o=>n.pathname.startsWith(o))&&e.role!=="Admin"?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):h.jsx(Tv,{children:h.jsxs(Bc,{children:[h.jsx(Ov,{}),h.jsxs(Kc,{children:[h.jsx(Av,{}),h.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:h.jsx(d.Suspense,{fallback:h.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:h.jsx(Qu,{})})})]})]})}):h.jsx(pa,{to:"/login",replace:!0})}var Zn=e=>e.type==="checkbox",$r=e=>e.type==="file",Vt=e=>e instanceof Date,Ae=e=>e==null;const ks=e=>typeof e=="object";var Ee=e=>!Ae(e)&&!Array.isArray(e)&&ks(e)&&!Vt(e),Fo=e=>Ee(e)&&e.target?Zn(e.target)?e.target.checked:$r(e.target)?e.target.files:e.target.value:e;const jv=/[.[\]'"]/;var qt=e=>e.split(jv).filter(Boolean);function Nv(e,t){const n=qt(t);let r=e._formValues,o=e._defaultValues;for(let s=0;s<n.length-1;s++){const i=n[s];if(r=r==null?r:r[i],o=o==null?o:o[i],r===null||o===null)return null}}var Ll=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),Fr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fe(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Fr&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&e.constructor!==Object)return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=fe(e[o]));return r}const Lt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},ft={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},dt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Vl="root",Ps=["__proto__","constructor","prototype"],Mv=/^\w*$/;var Xt=e=>Mv.test(e),ue=e=>e===void 0,j=(e,t,n)=>{if(!t||!Ee(e))return n;const r=Xt(t)?[t]:qt(t);if(r.some(s=>Ps.includes(s)))return n;const o=r.reduce((s,i)=>Ae(s)?void 0:s[i],e);return ue(o)||o===e?ue(e[t])?n:e[t]:o},et=e=>typeof e=="boolean",Ue=e=>typeof e=="function",le=(e,t,n)=>{let r=-1;const o=Xt(t)?[t]:qt(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const u=e[a];l=Ee(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(Ps.includes(a))return;e[a]=l,e=e[a]}};const Zl=P.createContext(null);Zl.displayName="HookFormControlContext";const Os=()=>P.useContext(Zl);var Ul=(e,t,n,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==ft.all&&(t._proxyFormState[i]=!r||ft.all),n&&(n[i]=!0),e[i]}});return o};const Rs=Fr?P.useLayoutEffect:P.useEffect;var zv=e=>{const t=e.constructor&&e.constructor.prototype;return Ee(t)&&t.hasOwnProperty("isPrototypeOf")},Lo=e=>Ae(e)||!ks(e);const bi=(e,t)=>t.length===0&&!Array.isArray(e)&&!zv(e);function Ye(e,t,n=new WeakMap){if(e===t)return!0;if(Lo(e)||Lo(t))return Object.is(e,t);if(Vt(e)&&Vt(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(bi(e,r)||bi(t,o))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const s=n.get(e);if(s&&s.has(t))return!0;if(s)s.add(t);else{const i=new WeakSet;i.add(t),n.set(e,i)}for(const i of r){const a=e[i];if(!(i in t))return!1;if(i!=="ref"){const l=t[i];if(Vt(a)&&Vt(l)||(Ee(a)||Array.isArray(a))&&(Ee(l)||Array.isArray(l))?!Ye(a,l,n):!Object.is(a,l))return!1}}return!0}function Ts(e){const t=P.useRef(!1),n=P.useRef(!1),r=P.useRef(void 0),o=P.useRef(0);o.current++,!n.current&&e&&(n.current=!0,r.current=fe(e()));const s=P.useCallback((a,l,u)=>{if(a&&(t.current||n.current&&o.current>1)){const f=l();Ye(r.current,f)||u(f)}t.current=!0},[]),i=P.useCallback((a,l)=>{a&&(r.current=fe(l()))},[]);return{resyncIfNeeded:s,snapshot:i}}function $v(e){const t=Os(),{control:n=t,disabled:r,name:o,exact:s}=e||{},i=()=>({...n._formState,defaultValues:n._defaultValues}),[a,l]=P.useState(i),u=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:f,snapshot:c}=Ts(i);return Rs(()=>{f(!r,i,l);const p=n._subscribe({name:o,formState:u.current,exact:s,callback:g=>{!r&&l({...n._formState,...g,defaultValues:n._defaultValues})}});return()=>{p(),c(!r,i)}},[o,r,s,f,c]),P.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),P.useMemo(()=>Ul(a,n,u.current,!1),[a,n])}var je=e=>typeof e=="string",Vo=(e,t,n,r,o)=>je(e)?(r&&t.watch.add(e),j(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),j(n,s,j(o,s)))):(r&&(t.watchAll=!0),n);function Fv(e){const t=Os(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},l=P.useRef(o),u=P.useRef(a),f=P.useRef(void 0),c=P.useRef(n),p=P.useRef(r);u.current=a;const g=()=>{const A=n._getWatch(r,l.current);return u.current?u.current(A):A},[m,v]=P.useState(g),y=P.useCallback(A=>{const W=Vo(r,n._names,A||n._formValues,!1,l.current);return u.current?u.current(W):W},[n._formValues,n._names,r]),x=P.useCallback(A=>{if(!s){const W=Vo(r,n._names,A||n._formValues,!1,l.current);if(u.current){const H=u.current(W);Ye(H,f.current)||(v(H),f.current=H)}else v(W)}},[n._formValues,n._names,s,r]),{resyncIfNeeded:w,snapshot:k}=Ts(g),E=P.useRef(x);E.current=x;const C=P.useRef(y);C.current=y,Rs(()=>{c.current!==n||!Ye(p.current,r)?(c.current=n,p.current=r,E.current()):w(!s,()=>C.current(),W=>{v(W),f.current=W});const A=n._subscribe({name:r,formState:{values:!0},exact:i,callback:W=>{E.current(W.values)}});return()=>{A(),k(!s,()=>C.current())}},[n,i,r,s,w,k]),P.useEffect(()=>n._removeUnmounted());const T=c.current!==n,N=p.current;return P.useMemo(()=>{if(s)return!1;const A=!T&&!Ye(N,r);return T||A},[s,T,r,N])?y():m}function Lv(e){const t=Os(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,l=Ll(o._names.array,n),u=P.useMemo(()=>{const E=j(o._formValues,n,j(o._defaultValues,n,i));return ue(E)?Nv(o,n):E},[o,n,i]),f=Fv({control:o,name:n,defaultValue:u,exact:a}),c=$v({control:o,name:n,exact:a}),p=P.useRef(e),g=P.useRef(null),m=P.useRef(o.register(n,{...e.rules,value:f,...et(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const v=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!j(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!j(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!j(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!j(c.validatingFields,n)},error:{enumerable:!0,get:()=>j(c.errors,n)}}),[c,n]),y=P.useCallback(E=>{const C=Fo(E);return j(o._fields,n)||(m.current=o.register(n,{...p.current.rules,value:C})),m.current.onChange({target:{value:Fo(E),name:n},type:Lt.CHANGE})},[n,o]),x=P.useCallback(()=>m.current.onBlur({target:{value:j(o._formValues,n),name:n},type:Lt.BLUR}),[n,o._formValues]),w=P.useCallback(E=>{E&&(g.current={focus:()=>Ue(E.focus)&&E.focus(),select:()=>Ue(E.select)&&E.select(),setCustomValidity:T=>Ue(E.setCustomValidity)&&E.setCustomValidity(T),reportValidity:()=>Ue(E.reportValidity)&&E.reportValidity()});const C=j(o._fields,n);C&&C._f&&E&&(C._f.ref=g.current)},[o._fields,n]),k=P.useMemo(()=>({name:n,value:f,...et(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:y,onBlur:x,ref:w}),[n,r,c.disabled,y,x,w,f]);return P.useEffect(()=>{const E=o._options.shouldUnregister||s;m.current=o.register(n,{...p.current.rules,...et(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(T,N)=>{const F=j(o._fields,T);F&&F._f&&(F._f.mount=N)};if(C(n,!0),E){const T=fe(j(s?o._defaultValues:o._options.values||o._defaultValues,n,j(o._options.defaultValues,n,p.current.defaultValue)));le(o._defaultValues,n,T),ue(j(o._formValues,n))&&le(o._formValues,n,T)}if(!l&&o.register(n),g.current){const T=j(o._fields,n);T&&T._f&&(T._f.ref=g.current)}return()=>{(l?E&&!o._state.action:E)?o.unregister(n):C(n,!1)}},[n,o,l,s]),P.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),P.useMemo(()=>({field:k,formState:c,fieldState:v}),[k,c,v])}const V_=e=>e.render(Lv(e));var rr=e=>({isOnSubmit:!e||e===ft.onSubmit,isOnBlur:e===ft.onBlur,isOnChange:e===ft.onChange,isOnAll:e===ft.all,isOnTouch:e===ft.onTouched}),lo=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};const Rn=(e,t,n,r)=>{for(const o of n||Object.keys(e)){if(o==="_f")continue;const s=n?j(e,o):e[o];if(s){const{_f:i}=s;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],o)&&!r)return!0;if(i.ref&&t(i.ref,i.name)&&!r)return!0;if(Rn(s,t))break}else if((Ee(s)||Array.isArray(s))&&Rn(s,t))break}}};var yi=(e,t,n)=>{const r=j(e,n),o=Array.isArray(r)?r:[];return le(o,Vl,t[n]),le(e,n,o),e},$e=e=>Ee(e)&&!Object.keys(e).length,xr=e=>{if(!Fr)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Is=e=>e.type==="radio",_r=e=>e instanceof RegExp,As=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{};const wi={value:!1,isValid:!1},xi={value:!0,isValid:!0};var Bl=e=>{if(!Array.isArray(e))return wi;if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}const t=e[0];return!t||!t.checked||t.disabled?wi:!t.attributes||!("value"in t.attributes)||ue(t.value)||t.value===""?xi:{value:t.value,isValid:!0}};const _i={isValid:!1,value:null};var Wl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,_i):_i;function Si(e,t,n="validate"){if(je(e)||Array.isArray(e)&&e.every(je)||et(e)&&!e)return{type:n,message:je(e)?e:"",ref:t}}var cn=e=>Ee(e)&&!_r(e)?e:{value:e,message:""},Ei=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:u,minLength:f,min:c,max:p,pattern:g,validate:m,name:v,valueAsNumber:y,mount:x}=e._f,w=j(n,v);if(!x||t.has(v))return{};const k=a?a[0]:i,E=U=>{if(o&&k.reportValidity){const L=et(U)?"":U||"";a?a.forEach(q=>q.setCustomValidity(L)):k.setCustomValidity(L),k.reportValidity()}},C={},T=Is(i),N=Zn(i),F=T||N,A=(y||$r(i))&&ue(i.value)&&ue(w)||xr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,W=As.bind(null,v,r,C),H=(U,L,q,B=dt.maxLength,G=dt.minLength)=>{const oe=U?L:q;C[v]={type:U?B:G,message:oe,ref:i,...W(U?B:G,oe)}};if(s?!Array.isArray(w)||!w.length:l&&(!F&&(A||Ae(w))||et(w)&&!w||N&&!Bl(a).isValid||T&&!Wl(a).isValid)){const{value:U,message:L}=je(l)?{value:!!l,message:l}:cn(l);if(U&&(C[v]={type:dt.required,message:L,ref:k,...W(dt.required,L)},!r))return E(L),C}if(!A&&(!Ae(c)||!Ae(p))){let U,L;const q=cn(p),B=cn(c);if(!Ae(w)&&!Vt(w)&&!isNaN(w)){const G=i.valueAsNumber||w&&+w;Ae(q.value)||(U=G>q.value),Ae(B.value)||(L=G<B.value)}else{const G=i.valueAsDate||new Date(w),oe=ee=>new Date(new Date().toDateString()+" "+ee),re=i.type=="time",V=i.type=="week";je(q.value)&&w&&(U=re?oe(w)>oe(q.value):V?w>q.value:G>new Date(q.value)),je(B.value)&&w&&(L=re?oe(w)<oe(B.value):V?w<B.value:G<new Date(B.value))}if((U||L)&&(H(!!U,q.message,B.message,dt.max,dt.min),!r))return E(C[v].message),C}if((u||f)&&!A&&(je(w)||s&&Array.isArray(w))){const U=cn(u),L=cn(f),q=!Ae(U.value)&&w.length>+U.value,B=!Ae(L.value)&&w.length<+L.value;if((q||B)&&(H(q,U.message,L.message),!r))return E(C[v].message),C}if(g&&!A&&je(w)){const{value:U,message:L}=cn(g);if(_r(U)&&!w.match(U)&&(C[v]={type:dt.pattern,message:L,ref:i,...W(dt.pattern,L)},!r))return E(L),C}if(m){if(Ue(m)){const U=await m(w,n),L=Si(U,k);if(L&&(C[v]={...L,...W(dt.validate,L.message)},!r))return E(L.message),C}else if(Ee(m)){let U={};for(const L in m){if(!$e(U)&&!r)break;const q=Si(await m[L](w,n),k,L);q&&(U={...q,...W(L,q.message)},E(q.message),r&&(C[v]=U))}if(!$e(U)&&(C[v]={ref:k,...U},!r))return C}}const $=C[v];return E($?$.message:!0),C},br=e=>Array.isArray(e)?e:[e],Hl=e=>Array.isArray(e)?e.filter(Boolean):[];function Vv(e,t){const n=t.length-1;let r=0;for(;r<n;){if(Ae(e)){e=void 0;break}e=e[t[r]],r++}return e}function Zv(e){for(const t in e)if(e.hasOwnProperty(t)&&!ue(e[t]))return!1;return!0}function Ce(e,t){if(je(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:Xt(t)?[t]:qt(t);if(n.some(i=>Ps.includes(String(i))))return e;const r=n.length===1?e:Vv(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Ee(r)&&$e(r)||Array.isArray(r)&&Zv(r))&&Ce(e,n.slice(0,-1)),e}const Uv=P.createContext(null);Uv.displayName="HookFormContext";var Ci=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Kl(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&Ee(o)&&s){const i=Kl(o,s);Ee(i)&&(n[r]=i)}else e[r]&&(n[r]=s)}return n}const ki=(e,t)=>e!==null&&ks(e)&&Object.prototype.hasOwnProperty.call(e,t);var Bv=(e,t)=>{if(!t)return!1;let n=e;for(const r of Xt(t)?[t]:qt(t)){if(!ki(n,r))return ki(e,t);n=n[r]}return!0},Gl=e=>e.type==="select-multiple",Wv=e=>Is(e)||Zn(e),uo=e=>xr(e)&&e.isConnected;function Pi(e){return Array.isArray(e)||Ee(e)}function Yl(e,t,n="",r=[]){for(const o in e){const s=n?`${n}.${o}`:o,i=e[o];Pi(i)&&Pi(j(t,s))?Yl(i,t,s,r):r.push(s)}return r}var Hv=e=>{for(const t in e)if(Ue(e[t]))return!0;return!1};function Jl(e){return Array.isArray(e)||Ee(e)&&!Hv(e)}function ql(e){return!!(e&&"_f"in e)}function Xl(e){return Array.isArray(e)?!e.some(t=>!ue(t)):!Object.keys(e).length}function Zo(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function Uo(e,t={},n){for(const r in e){const o=e[r],s=n&&n[r];Jl(o)&&(!Array.isArray(o)||!ql(s))?(t[r]=Array.isArray(o)?[]:{},Uo(o,t[r],s),Xl(t[r])&&Zo(t,r)):ue(o)||(t[r]=!0)}return t}function Jt(e,t,n,r){n||(n=Uo(t,{},r));for(const o in e){const s=e[o],i=r&&r[o];Jl(s)&&(!Array.isArray(s)||!ql(i))?(ue(t)||Lo(n[o])?n[o]=Uo(s,Array.isArray(s)?[]:{},i):Jt(s,Ae(t)?{}:t[o],n[o],i),Xl(n[o])&&Zo(n,o)):Ye(s,t[o])?Zo(n,o):n[o]=!0}return n}var Kv=(e,t)=>{const n=t.split("."),r=[];let o=n[0];for(let s=1;s<n.length;o+="."+n[s++])!isNaN(+n[s])&&e.has(o)&&r.push(`${o}.${n[s]}`);return r},Ql=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ue(e)?e:t?e===""?NaN:e&&+e:n&&je(e)?new Date(e):r?r(e):e;function Oi(e){const t=e.ref;return $r(t)?t.files:Is(t)?Wl(e.refs).value:Gl(t)?[...t.selectedOptions].map(({value:n})=>n):Zn(t)?Bl(e.refs).value:Ql(t.value,e)}var Gv=(e,t,n,r)=>{const o={};for(const s of e){const i=j(t,s);i&&le(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},kn=e=>ue(e)?e:_r(e)?e.source:Ee(e)?_r(e.value)?e.value.source:e.value:e;const Ri="AsyncFunction";var Yv=e=>{if(!e||!e.validate)return!1;if(Ue(e.validate))return e.validate.constructor.name===Ri;if(Ee(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Ri)return!0}return!1},Jv=e=>e.mount&&(e.required||!ue(e.required)&&e.required!==!1||!ue(e.min)||!ue(e.max)||!ue(e.maxLength)||!ue(e.minLength)||e.pattern||e.validate);function Ti(e,t,n){const r=j(e,n);if(r||Xt(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=j(t,s),a=j(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:n}}var qv=(e,t,n,r)=>{n(e);const o=Object.keys(e).filter(s=>s!=="name");return!o.length||r&&o.length>=Object.keys(t).length||o.find(s=>t[s]===(!r||ft.all))},Xv=(e,t,n)=>!e||!t||e===t||br(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),Qv=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,eb=(e,t)=>{const n=j(e,t);!Hl(n).length&&!(n!=null&&n.root)&&Ce(e,t)};const tb={mode:ft.onSubmit,reValidateMode:ft.onChange,shouldFocusError:!0},fo="form",nb=(e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},eu={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function rb(e={}){let t={...tb,...e},n={...fe(eu),isLoading:Ue(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},o=Ee(t.defaultValues)||Ee(t.values)?fe(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:fe(o),i={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const l={},u={};let f=0,c=rr(t.mode),p=rr(t.reValidateMode);const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...g};let v={...m};const y={array:Ci(),state:Ci()};let x=0;const w=t.criteriaMode===ft.all,k=(b,S)=>_=>{clearTimeout(u[b]),u[b]=setTimeout(S,_)},E=async b=>{if(!i.keepIsValid&&!t.disabled&&(m.isValid||v.isValid||b)){const S=++x;let _;t.resolver?(_=$e((await q()).errors),S===x&&C()):_=await oe({fields:r,onlyCheckValid:!0,eventType:Lt.VALID}),S===x&&_!==n.isValid&&y.state.next({isValid:_})}},C=(b,S)=>{!t.disabled&&(m.isValidating||m.validatingFields||v.isValidating||v.validatingFields)&&((b||a.mount).forEach(_=>{_&&(S?le(n.validatingFields,_,S):Ce(n.validatingFields,_))}),y.state.next({validatingFields:n.validatingFields,isValidating:!$e(n.validatingFields)}))},T=()=>{n.dirtyFields=Jt(o,s,void 0,r)},N=(b,S=[],_,O,I=!0,D=!0)=>{if(O&&_&&!t.disabled){i.action=!0;const z=j(r,b);if(i.actionArrayLengths.has(b)||i.actionArrayLengths.set(b,Array.isArray(z)?z.length:0),D&&Array.isArray(z)){const K=_(z,O.argA,O.argB);I&&le(r,b,K)}const M=j(n.errors,b);if(D&&Array.isArray(M)){const K=M.root,pe=_(M,O.argA,O.argB)||M;K&&(pe.root=K),I&&le(n.errors,b,pe),eb(n.errors,b)}const Z=j(n.touchedFields,b);if((m.touchedFields||v.touchedFields)&&D&&Array.isArray(Z)){const K=_(Z,O.argA,O.argB);I&&le(n.touchedFields,b,K)}(m.dirtyFields||v.dirtyFields)&&T(),y.state.next({name:b,isDirty:V(b,S),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else le(s,b,S)},F=(b,S)=>{le(n.errors,b,S),n.errors={...n.errors},y.state.next({errors:n.errors})},A=b=>{n.errors=b,y.state.next({errors:n.errors,isValid:!1})},W=b=>{const S=Xt(b)?[b]:qt(b);let _=s,O=o;for(let I=0;I<S.length-1;I++){const D=S[I];if(_=Ae(_)?_:_[D],O=Ae(O)?O:O[D],_===null&&O!==null)return!0}return!1},H=b=>{if(!i.actionArrayLengths.size)return!1;const S=Xt(b)?[b]:qt(b);let _=s,O="",I=-1,D=0;for(let z=0;z<S.length;z++){if(Ae(_))return!1;const M=S[z];if(O=O?`${O}.${M}`:M,Array.isArray(_)&&+M>=_.length)return I===-1?!1:z===I?+M<D:!0;i.actionArrayLengths.has(O)&&(I=z+1,D=i.actionArrayLengths.get(O)),_=_[M]}return!1},$=(b,S,_,O)=>{const I=j(r,b);if(I){if(W(b)||H(b))return;const D=ue(j(s,b)),z=j(s,b,ue(_)?j(o,b):_);ue(z)||O&&O.defaultChecked||S?le(s,b,S?z:Oi(I._f)):ge(b,z),i.mount&&!i.action&&(E(),D&&n.isDirty&&(m.isDirty||v.isDirty)&&(V()||(n.isDirty=!1,y.state.next({...n}))),e.shouldUnregister&&D&&!ue(j(s,b))&&lo(b,a)&&(i.watch=!0))}},U=(b,S,_,O,I)=>{let D=!1,z=!1;const M={name:b};if(!t.disabled||O===!0){if(!_||O){const Z=Ye(j(o,b),S);(m.isDirty||v.isDirty)&&(z=n.isDirty,n.isDirty=M.isDirty=!Z||V(),D=z!==M.isDirty),z=!!j(n.dirtyFields,b),Z!==n.isDirty?nb(n.dirtyFields,Jt(o,s,void 0,r)):Z?Ce(n.dirtyFields,b):le(n.dirtyFields,b,!0),M.dirtyFields=n.dirtyFields,D=D||(m.dirtyFields||v.dirtyFields)&&z!==!Z}if(_){const Z=j(n.touchedFields,b);Z||(le(n.touchedFields,b,_),M.touchedFields=n.touchedFields,D=D||(m.touchedFields||v.touchedFields)&&Z!==_)}D&&I&&y.state.next(M)}return D?M:{}},L=(b,S,_,O)=>{const I=j(n.errors,b),D=(m.isValid||v.isValid)&&et(S)&&n.isValid!==S;if(t.delayError&&_?(l[b]=k(b,()=>F(b,_)),l[b](t.delayError)):(clearTimeout(u[b]),delete l[b],_?le(n.errors,b,_):Ce(n.errors,b),n.errors={...n.errors}),(_?!Ye(I,_):I)||!$e(O)||D){const z={...O,...D&&et(S)?{isValid:S}:{},errors:n.errors,name:b};y.state.next(z)}},q=async b=>(C(b,!0),await t.resolver(s,t.context,Gv(b||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),B=async b=>{const{errors:S}=await q(b);if(C(b),b){for(const _ of b){const O=j(S,_);O?a.array.has(_)&&Ee(O)&&!Object.keys(O).some(I=>!Number.isNaN(Number(I)))?yi(n.errors,{[_]:O},_):le(n.errors,_,O):Ce(n.errors,_)}n.errors={...n.errors}}else n.errors=S;return S},G=async({name:b,eventType:S})=>{if(e.validate){const _=await e.validate({formValues:s,formState:n,name:b,eventType:S});if(Ee(_))for(const O in _){const I=_[O];I&&kt(`${fo}.${O}`,{message:je(I.message)?I.message:"",type:I.type||dt.validate})}else je(_)||!_?kt(fo,{message:_||"",type:dt.validate}):Ct(fo);return _}return!0},oe=async({fields:b,onlyCheckValid:S,name:_,eventType:O,context:I={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(I.runRootValidation=!0,!await G({name:_,eventType:O})&&(I.valid=!1,S)))return I.valid;for(const D in b){const z=b[D];if(z){const{_f:M,...Z}=z;if(M){const K=a.array.has(M.name),pe=z._f&&Yv(z._f),Le=m.validatingFields||m.isValidating||v.validatingFields||v.isValidating;pe&&Le&&C([M.name],!0);const Ke=await Ei(z,a.disabled,s,w,t.shouldUseNativeValidation&&!S,K);if(pe&&Le&&C([M.name]),Ke[M.name]&&(I.valid=!1,S)||(!S&&(j(Ke,M.name)?K?yi(n.errors,Ke,M.name):le(n.errors,M.name,Ke[M.name]):Ce(n.errors,M.name)),e.shouldUseNativeValidation&&Ke[M.name]))break}!$e(Z)&&await oe({context:I,onlyCheckValid:S,fields:Z,name:D,eventType:O})}}return I.valid},re=()=>{for(const b of a.unMount){const S=j(r,b);S&&(S._f.refs?S._f.refs.every(_=>!uo(_)):!uo(S._f.ref))&&Be(b)}a.unMount=new Set},V=(b,S)=>(b&&S&&le(s,b,S),!Ye(i.mount?s:o,o)),ee=(b,S,_)=>Vo(b,a,{...i.mount?s:ue(S)||je(b)?o:S},_,S),me=b=>Hl(j(i.mount?s:o,b,t.shouldUnregister?j(o,b,[]):[])),ge=(b,S,_={},O=!1,I=!1,D=!1)=>{const z=j(r,b);let M=S;if(z){const Z=z._f;Z&&(!Z.disabled&&le(s,b,Ql(S,Z)),M=xr(Z.ref)&&Ae(S)?"":S,Gl(Z.ref)?[...Z.ref.options].forEach(K=>K.selected=M.includes(K.value)):Z.refs?Zn(Z.ref)?Z.refs.forEach(K=>{(!K.defaultChecked||!K.disabled)&&(Array.isArray(M)?K.checked=!!M.find(pe=>pe===K.value):K.checked=M===K.value||!!M)}):Z.refs.forEach(K=>K.checked=K.value===M):$r(Z.ref)?Z.ref.value="":(Z.ref.value=M,!Z.ref.type&&!I&&!D&&y.state.next({name:b,values:O?s:fe(s)})))}(_.shouldDirty||_.shouldTouch)&&U(b,M,_.shouldTouch,_.shouldDirty,!I),_.shouldValidate&&_e(b,{delayError:_.delayError})},ne=(b,S,_,O=!1,I=!1,D=!1)=>{a.array.has(b)&&y.array.next({name:b,values:O?s:fe(s)});for(const z in S){if(!S.hasOwnProperty(z))continue;const M=S[z],Z=b+"."+z,K=j(r,Z);(a.array.has(b)||Ee(M)||K&&!K._f)&&!Vt(M)?ne(Z,M,_,O,I,D):ge(Z,M,_,O,I,D)}},ce=(b,S,_,O,I=!1)=>{const D=j(r,b),z=a.array.has(b),M=O?S:fe(S),Z=j(s,b),K=Ye(Z,M);if(K||le(s,b,M),z)y.array.next({name:b,values:O?s:fe(s)}),(m.isDirty||m.dirtyFields||v.isDirty||v.dirtyFields)&&_.shouldDirty&&(T(),I||y.state.next({name:b,dirtyFields:n.dirtyFields,isDirty:V(b,M)}));else{const pe=Array.isArray(M)&&!M.length||$e(M),Le=!K&&!I;!D||D._f||Ae(M)||pe?ge(b,M,_,O,I,Le):ne(b,M,_,O,I,Le)}if(!K&&!I){const pe=lo(b,a),Le=O?s:fe(s);if(y.state.next({...pe&&n,name:i.mount||pe?b:void 0,values:Le}),!z)for(const Ke of Kv(a.array,b))y.state.next({name:Ke,values:Le})}},se=(b,S,_={})=>ce(b,S,_,!1),xe=(b,S={})=>{const _=Ue(b)?b(s):b;if(!Ye(s,_)){s={...s,..._};for(const O of a.mount)Bv(_,O)&&ce(O,j(_,O),S,!0,!0);y.state.next({...n,name:void 0,type:void 0,...f?{values:s}:{}}),S.shouldValidate&&E()}},Pe=async b=>{i.mount=!0;const S=b.target;let _=S.name,O=!0;const I=j(r,_),D=z=>{O=Number.isNaN(z)||Vt(z)&&isNaN(z.getTime())||Ye(z,j(s,_,z))};if(I){let z,M;const Z=S.type?Oi(I._f):Fo(b),K=b.type===Lt.BLUR||b.type===Lt.FOCUS_OUT,pe=!Jv(I._f)&&!e.validate&&!t.resolver&&!j(n.errors,_)&&!I._f.deps,Le=pe||Qv(K,j(n.touchedFields,_),n.isSubmitted,p,c),Ke=lo(_,a,K);if(le(s,_,fe(Z)),K){if(!S||!S.readOnly){I._f.onBlur&&I._f.onBlur(b);const Se=l[_];Se&&Se(0)}}else I._f.onChange&&I._f.onChange(b);const Y=U(_,Z,K),Oe=!$e(Y)||Ke;if(!K&&y.state.next({name:_,type:b.type,...f?{values:fe(s)}:{}}),Le)return(!pe||!n.isValid)&&(m.isValid||v.isValid)&&(t.mode==="onBlur"?K&&E():K||E()),Oe&&y.state.next({name:_,...Ke?{}:Y});if(!t.resolver&&e.validate&&await G({name:_,eventType:b.type}),!K&&Ke&&y.state.next({...n}),t.resolver){const{errors:Se}=await q([_]);if(C([_]),D(Z),!O){!$e(Y)&&y.state.next(Y);return}const Ve=Ti(n.errors,r,_),Mt=Ti(Se,r,Ve.name||_);z=Mt.error,_=Mt.name,M=$e(Se)}else C([_],!0),z=(await Ei(I,a.disabled,s,w,t.shouldUseNativeValidation))[_],C([_]),D(Z),O&&(z?M=!1:(m.isValid||v.isValid)&&(M=await oe({fields:r,onlyCheckValid:!0,name:_,eventType:b.type})));O&&(I._f.deps&&(!Array.isArray(I._f.deps)||I._f.deps.length>0)&&_e(I._f.deps),L(_,M,z,Y))}},ie=(b,S)=>{if(j(n.errors,S)&&b.focus)return b.focus(),1},_e=async(b,S={})=>{let _,O;const I=br(b);if(t.resolver){const D=await B(ue(b)?b:I);_=$e(D),O=b?!I.some(z=>j(D,z)):_}else b?(O=(await Promise.all(I.map(async D=>{const z=j(r,D);return await oe({fields:z&&z._f?{[D]:z}:z,eventType:Lt.TRIGGER})}))).every(Boolean),!(!O&&!n.isValid)&&E()):O=_=await oe({fields:r,name:b,eventType:Lt.TRIGGER});if(S.delayError&&t.delayError&&je(b)){const D=j(n.errors,b);D?(Ce(n.errors,b),l[b]=k(b,()=>F(b,D)),l[b](t.delayError)):(clearTimeout(u[b]),delete l[b])}if(S.shouldTouch)for(const D of b?I:a.mount)!a.array.has(D)&&le(n.touchedFields,D,!0);return y.state.next({...!je(b)||(m.isValid||v.isValid)&&_!==n.isValid?{}:{name:b},...t.resolver||!b?{isValid:_}:{},...S.shouldTouch&&(m.touchedFields||v.touchedFields)?{touchedFields:n.touchedFields}:{},errors:n.errors}),S.shouldFocus&&!O&&Rn(r,ie,b?I:a.mount),O},rt=(b,S)=>{let _={...i.mount?s:o};return S&&(_=Kl(S.dirtyFields?n.dirtyFields:n.touchedFields,_)),ue(b)?_:je(b)?j(_,b):b.map(O=>j(_,O))},gt=b=>ue(b)?{...n.errors}:je(b)?j(n.errors,b):b.map(S=>j(n.errors,S)),lt=(b,S)=>{const _=S||n,O=j(_.errors,b);return{invalid:!!O,isDirty:!!j(_.dirtyFields,b),error:O,isValidating:!!j(n.validatingFields,b),isTouched:!!j(_.touchedFields,b)}},Ct=b=>{const S=b?br(b):void 0;S==null||S.forEach(_=>Ce(n.errors,_)),S?S.forEach(_=>{y.state.next({name:_,errors:n.errors})}):(n.errors={},y.state.next({errors:n.errors}))},kt=(b,S,_)=>{const O=(j(r,b,{_f:{}})._f||{}).ref,I=j(n.errors,b)||{},{ref:D,message:z,type:M,...Z}=I;le(n.errors,b,{...Z,...S,ref:O}),y.state.next({name:b,errors:n.errors,isValid:!1}),_&&_.shouldFocus&&O&&O.focus&&O.focus()},Nt=(b,S)=>{if(Ue(b)){f++;const{unsubscribe:_}=y.state.subscribe({next:I=>"values"in I&&b(I.values||ee(void 0,S),I)});let O=!1;return{unsubscribe:()=>{O||(O=!0,f--,_())}}}return ee(b,S,!0)},ut=b=>{var S;const _=!!(!((S=b.formState)===null||S===void 0)&&S.values);_&&f++;const{unsubscribe:O}=y.state.subscribe({next:D=>{if(Xv(b.name,D.name,b.exact)&&qv(D,b.formState||m,_n,b.reRenderRoot)){const z={...s};b.callback({values:z,...n,...D,defaultValues:o})}}});if(!_)return O;let I=!1;return()=>{I||(I=!0,f--,O())}},nn=b=>(i.mount=!0,v={...v,...b.formState},ut({...b,formState:{...g,...b.formState}})),Be=(b,S={})=>{for(const _ of b?br(b):a.mount)a.mount.delete(_),a.array.delete(_),S.keepValue||(Ce(r,_),Ce(s,_)),!S.keepError&&Ce(n.errors,_),!S.keepDirty&&Ce(n.dirtyFields,_),!S.keepTouched&&Ce(n.touchedFields,_),!S.keepIsValidating&&Ce(n.validatingFields,_),!t.shouldUnregister&&!S.keepDefaultValue&&Ce(o,_);f&&y.state.next({values:fe(s)}),y.state.next({...n,...S.keepDirty?{}:{isDirty:V()}}),!S.keepIsValid&&E()},rn=({disabled:b,name:S})=>{if(et(b)&&i.mount||b||a.disabled.has(S)){const I=a.disabled.has(S)!==!!b;b?a.disabled.add(S):a.disabled.delete(S),I&&i.mount&&!i.action&&E()}},Kt=(b,S={})=>{let _=j(r,b);const O=et(S.disabled)||et(t.disabled),I=!a.registerName.has(b)&&_&&_._f&&!_._f.mount;return le(r,b,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:b}},name:b,mount:!0,...S}}),a.mount.add(b),_&&!I?rn({disabled:et(S.disabled)?S.disabled:t.disabled,name:b}):$(b,!0,S.value),{...O?{disabled:S.disabled||t.disabled}:{},...t.progressive?{required:!!S.required,min:kn(S.min),max:kn(S.max),minLength:kn(S.minLength),maxLength:kn(S.maxLength),pattern:kn(S.pattern)}:{},name:b,onChange:Pe,onBlur:Pe,ref:D=>{if(D){a.registerName.add(b),Kt(b,S),a.registerName.delete(b),_=j(r,b);const z=ue(D.value)&&D.querySelectorAll&&D.querySelectorAll("input,select,textarea")[0]||D,M=Wv(z),Z=_._f.refs||[];if(M?Z.find(pe=>pe===z):z===_._f.ref)return;const K={..._._f};M?(K.refs=[...Z.filter(uo),z,...Array.isArray(j(o,b))?[{}]:[]],K.ref={type:z.type,name:b}):(K.ref=z,delete K.refs),le(r,b,{_f:K}),$(b,!1,void 0,z)}else _=j(r,b,{}),_._f&&(_._f.mount=!1),(t.shouldUnregister||S.shouldUnregister)&&!(Ll(a.array,b)&&i.action)&&a.unMount.add(b)}}},ve=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Rn(r,ie,a.mount),Bn=b=>{et(b)&&(y.state.next({disabled:b}),Rn(r,(S,_)=>{const O=j(r,_);O&&(S.disabled=O._f.disabled||b,Array.isArray(O._f.refs)&&O._f.refs.forEach(I=>{I.disabled=O._f.disabled||b}))},0,!1))},Pt=(b,S)=>async _=>{let O,I;_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let D=fe(s);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:z,values:M}=await q();C(),n.errors=z,D=fe(M)}else await oe({fields:r,eventType:Lt.SUBMIT});if(a.disabled.size)for(const z of a.disabled)Ce(D,z);if(Ce(n.errors,Vl),$e(n.errors)){y.state.next({errors:{}});try{O=await b(D,_)}catch(z){I=z}}else S&&await S({...n.errors},_),ve(),setTimeout(ve);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$e(n.errors)&&!I,submitCount:n.submitCount+1,errors:n.errors}),I)throw I;return O},Wr=(b,S={})=>{j(r,b)&&(ue(S.defaultValue)?se(b,fe(j(o,b))):(se(b,S.defaultValue),le(o,b,fe(S.defaultValue))),S.keepTouched||Ce(n.touchedFields,b),S.keepDirty||(Ce(n.dirtyFields,b),n.isDirty=S.defaultValue?V(b,fe(j(o,b))):V()),S.keepError||(Ce(n.errors,b),E()),y.state.next({...n}))},Wn=(b,S={})=>{const _=b?fe(b):o,O=fe(_),I=$e(b),D=O,z=r;if(S.keepDefaultValues||(o=_),!S.keepValues){if(S.keepDirtyValues){const M=new Set([...a.mount,...Yl(Jt(o,s,void 0,z),n.dirtyFields)]);for(const Z of M){const K=j(n.dirtyFields,Z),pe=j(s,Z),Le=j(D,Z);K&&!ue(pe)?le(D,Z,pe):!K&&!ue(Le)&&se(Z,Le)}}else{if(Fr&&ue(b))for(const M of a.mount){const Z=j(r,M);if(Z&&Z._f){const K=Array.isArray(Z._f.refs)?Z._f.refs[0]:Z._f.ref;if(xr(K)){const pe=K.closest("form");if(pe){pe.reset();break}}}}if(S.keepFieldsRef)for(const M of a.mount)se(M,j(D,M));else r={}}if(t.shouldUnregister){if(s=S.keepDefaultValues?fe(o):{},S.keepFieldsRef)for(const M of a.mount)le(s,M,j(D,M))}else s=fe(D);y.array.next({values:{...D}}),y.state.next({name:void 0,type:void 0,values:{...D}})}a={mount:S.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!m.isValid||!!S.keepIsValid||!!S.keepDirtyValues||!t.shouldUnregister&&!$e(D),i.watch=!!t.shouldUnregister,i.keepIsValid=!!S.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),S.keepErrors||(n.errors={}),y.state.next({submitCount:S.keepSubmitCount?n.submitCount:0,isDirty:I?!1:S.keepDirty?n.isDirty:S.keepValues?V():!!(S.keepDefaultValues&&!Ye(b,o)),isSubmitted:S.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:I?{}:S.keepDirtyValues?S.keepDefaultValues&&s?Jt(o,s,void 0,z):n.dirtyFields:S.keepDefaultValues&&b?Jt(o,b,void 0,z):S.keepDirty?n.dirtyFields:{},touchedFields:S.keepTouched?n.touchedFields:{},errors:S.keepErrors?n.errors:{},isSubmitSuccessful:S.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Gt=(b,S)=>Wn(Ue(b)?b(s):b,{...t.resetOptions,...S}),Hr=(b,S={})=>{const _=j(r,b),O=_&&_._f;if(O){const I=O.refs?O.refs[0]:O.ref;I.focus&&setTimeout(()=>{I.focus(),S.shouldSelect&&Ue(I.select)&&I.select()})}},_n=b=>{const{name:S,type:_,values:O,...I}=b;n={...n,...I}};y.state.subscribe({next:_n});const Sn={control:{register:Kt,unregister:Be,getFieldState:lt,handleSubmit:Pt,setError:kt,_subscribe:ut,_runSchema:q,_updateIsValidating:C,_focusError:ve,_getWatch:ee,_getDirty:V,_setValid:E,_setFieldArray:N,_setDisabledField:rn,_setErrors:A,_getFieldArray:me,_reset:Wn,_resetDefaultValues:()=>Ue(t.defaultValues)&&t.defaultValues().then(b=>{Gt(b,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:re,_disableForm:Bn,_subjects:y,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(b){i=b},get _defaultValues(){return o},get _names(){return a},set _names(b){a=b},get _formState(){return n},get _options(){return t},set _options(b){t={...t,...b},c=rr(t.mode),p=rr(t.reValidateMode)}},subscribe:nn,trigger:_e,register:Kt,handleSubmit:Pt,watch:Nt,setValue:se,setValues:xe,getValues:rt,getErrors:gt,reset:Gt,resetField:Wr,resetDefaultValues:(b,S={})=>{if(o=fe(b),!S.keepDirty){const _=Jt(o,s,void 0,r);n.dirtyFields=_,n.isDirty=!$e(_)}S.keepIsValid||E(),y.state.next({...n,defaultValues:o})},clearErrors:Ct,unregister:Be,setError:kt,setFocus:Hr,getFieldState:lt};return{...Sn,formControl:Sn}}function ob(e={}){const t=P.useRef(void 0),n=P.useRef(void 0),r=P.useRef(e.formControl),[o,s]=P.useState(()=>({...fe(eu),isLoading:Ue(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ue(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:o},e.defaultValues&&!Ue(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...f}=rb(e);t.current={...f,formState:o}}const i=t.current.control;i._options=e;const{resyncIfNeeded:a,snapshot:l}=Ts();return Rs(()=>{const u=()=>({...i._formState,defaultValues:i._defaultValues});a(!0,u,s);const f=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState,defaultValues:i._defaultValues}),reRenderRoot:!0});return s(c=>({...c,isReady:!0})),i._formState.isReady=!0,()=>{f(),l(!0,u)}},[i,a,l]),P.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),P.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),P.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),P.useEffect(()=>{if(i._proxyFormState.isDirty){const u=i._getDirty();u!==o.isDirty&&i._subjects.state.next({isDirty:u})}},[i,o.isDirty]),P.useEffect(()=>{var u;e.values&&!Ye(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((u=i._options.resetOptions)===null||u===void 0)&&u.keepIsValid||i._setValid(),n.current=e.values,s(f=>({...f}))):i._resetDefaultValues()},[i,e.values]),P.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=P.useMemo(()=>Ul(o,i),[i,o]),t.current}const Ii=(e,t,n)=>{if(e&&"reportValidity"in e){const r=j(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Bo=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Ii(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Ii(o,n,e))}},Ai=(e,t)=>{t.shouldUseNativeValidation&&Bo(e,t);const n={};for(const r in e){const o=j(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.refs?o.refs[0]:o&&o.ref});if(sb(t.names||Object.keys(e),r)){const i=Object.assign({},j(n,r));le(i,"root",s),le(n,r,i)}else le(n,r,s)}return n},sb=(e,t)=>{const n=Di(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>Di(r).match(`^${n}\\.\\d+`))};function Di(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wo.apply(null,arguments)}function ji(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function ib(e,t){for(var n=Object.create(null);e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a,l,u=r.unionErrors.reduce(function(p,g){return g.errors.length<p.errors.length?g:p}).errors[0];n[i]={message:(a=u==null?void 0:u.message)!=null?a:s,type:(l=u==null?void 0:u.code)!=null?l:o}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(g){return e.push(g)})}),t){var f=n[i].types,c=f&&f[r.code];n[i]=As(i,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n}function ab(e,t){for(var n=Object.create(null),r=function(){var o=e[0],s=o.code,i=o.message,a=o.path.join(".");if(!n[a])if(o.code==="invalid_union"&&o.errors.length>0){var l,u,f=o.errors.reduce(function(g,m){return m.length<g.length?m:g})[0];n[a]={message:(l=f==null?void 0:f.message)!=null?l:i,type:(u=f==null?void 0:f.code)!=null?u:s}}else n[a]={message:i,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(g){return g.forEach(function(m){return e.push(Wo({},m,{path:[].concat(o.path,m.path)}))})}),t){var c=n[a].types,p=c&&c[o.code];n[a]=As(a,t,n,s,p?[].concat(p,o.message):o.message)}e.shift()};e.length;)r();return n}function cb(e,t,n){if(n===void 0&&(n={}),(function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(ji(function(){function i(l){return s.shouldUseNativeValidation&&Bo({},s),{errors:{},values:n.raw?Object.assign({},r):l}}var a=e;return n.mode==="sync"?i(a.parse(r,t)):Promise.resolve(a.parseAsync(r,t)).then(i)},function(i){if((function(a){var l;return!(a==null||(l=a._zod)==null||(l=l.traits)==null||!l.has("$ZodError"))})(i))return{values:{},errors:Ai(ab(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_def"in r&&typeof r._def=="object"})(e))return function(r,o,s){try{return Promise.resolve(ji(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return s.shouldUseNativeValidation&&Bo({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(i))return{values:{},errors:Ai(ib(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}function tu(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Ni(e,t="|"){return e.map(n=>ou(n)).join(t)}function Ho(e,t){return typeof t=="bigint"?t.toString():t}function Ds(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function lb(e){return e==null}function js(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function tt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Bt(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ub(e){return JSON.stringify(e)}function db(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const nu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Sr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const fb=Ds(()=>{var e;if(_t.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Nn(e){if(Sr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Sr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ru(e){return Nn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const pb=new Set(["string","number","symbol"]);function Lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wt(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function X(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ou(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function hb(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function mb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Bt(e._zod.def,{get shape(){const i={};for(const a of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,a))throw new Error(`Unrecognized key: "${String(a)}"`);t[a]&&tt(i,a,n.shape[a])}return tt(this,"shape",i),i},checks:[]});return Wt(e,s)}function gb(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Bt(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,a))throw new Error(`Unrecognized key: "${String(a)}"`);t[a]&&delete i[a]}return tt(this,"shape",i),i},checks:[]});return Wt(e,s)}function vb(e,t){if(!Nn(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Bt(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return tt(this,"shape",s),s}});return Wt(e,o)}function bb(e,t){if(!Nn(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Bt(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return tt(this,"shape",r),r}});return Wt(e,n)}function yb(e,t){var r,o;if(!((r=t==null?void 0:t._zod)!=null&&r.def))throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((o=e._zod.def.checks)!=null&&o.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Bt(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return tt(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Wt(e,n)}function Mi(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const a=Bt(t._zod.def,{get shape(){const l=t._zod.def.shape,u={...l};if(n)for(const f of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(l,f))throw new Error(`Unrecognized key: "${String(f)}"`);n[f]&&(u[f]=e?new e({type:"optional",innerType:l[f]}):l[f])}else for(const f of Reflect.ownKeys(l))u[f]=e?new e({type:"optional",innerType:l[f]}):l[f];return tt(this,"shape",u),u},checks:[]});return Wt(t,a)}function wb(e,t,n){const r=Bt(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const i of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(s,i))throw new Error(`Unrecognized key: "${String(i)}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i of Reflect.ownKeys(o))s[i]=new e({type:"nonoptional",innerType:o[i]});return tt(this,"shape",s),s}});return Wt(t,r)}function un(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function xb(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function su(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Pn(e){return typeof e=="string"?e:e==null?void 0:e.message}function zi(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function wn(e,t,n){var p,g,m,v,y,x,w,k,E,C;var r;const o=(g=(p=e.inst)==null?void 0:p._zod)==null?void 0:g.traits;o!=null&&o.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?(v=(m=e.schema)==null?void 0:m._zod.def)==null?void 0:v.error:void 0,i=e.message?e.message:Pn((w=(x=(y=e.inst)==null?void 0:y._zod.def)==null?void 0:x.error)==null?void 0:w.call(x,e))??Pn(s==null?void 0:s(e))??Pn((k=t==null?void 0:t.error)==null?void 0:k.call(t,e))??Pn((E=n.customError)==null?void 0:E.call(n,e))??Pn((C=n.localeError)==null?void 0:C.call(n,e))??"Invalid input",{inst:a,schema:l,continue:u,input:f,...c}=e;return c.path??(c.path=[]),c.message=i,t!=null&&t.reportInput&&(c.input=f),c}const _b=/[\uD800-\uDBFF]/;function Ns(e){const t=e.length;if(!_b.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Ms(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Sb(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Mn(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Eb(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Cb(e,n,r.value)}}function mn(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function iu(e,t,n){return mn(e,t,n,!1)}function Cb(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:mn(this,t,n.bind(this))},set(r){mn(this,t,r)}})}function kb(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let po,Ft=!1;const Pb={configurable:!0,get(){Ft=!0}};function de(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&po!==e._zod){po=void 0;return}po=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Pb);const o=Ft;Ft=!1;try{const s=n(this);return Ft?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Ft=Ft||o,s}catch(s){throw delete this[t],Ft=Ft||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Ob(e,t,n,r){const o=kb(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const Rb="~constantCatch";function Tb(e){const t=()=>e;return t[Rb]=!0,t}var $i;const ho={value:void 0,enumerable:!1};let Fi="captureStackTrace"in Error?Error:null;function Ib(e){const t=Fi;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Fi=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function R(e,t,n,r){const o={};function s(p){this.def=p,this.constr=c,this.traits=new Set}s.prototype=o;const i=n,a=i&&new WeakSet;function l(p,g){if(!p._zod){ho.value=new s(g);try{Object.defineProperty(p,"_zod",ho)}finally{ho.value=void 0}}if(p._zod.traits.has(e))return;if(p._zod.traits.add(e),t(p,g),a){const v=Object.getPrototypeOf(p),y=p._zod.constr.prototype;let x=v;for(;x&&x!==y;)x=Object.getPrototypeOf(x);const w=x??v;a.has(w)||(a.add(w),Eb(w,i))}const m=c.prototype;for(const v in m)Object.prototype.hasOwnProperty.call(m,v)&&(v in p||(p[v]=m[v].bind(p)))}const u=(r==null?void 0:r.Parent)??Object;class f extends u{}Object.defineProperty(f,"name",{value:e});function c(p){var y;const g=r!=null&&r.Parent?Ib(f):this;l(g,p);const m=g._zod.deferred;if(m){for(const x of m)x();g._zod.deferred=void 0}const v=(y=globalThis.__zod_globalConfig)==null?void 0:y.postProcessor;return v&&v(g),g}return Object.defineProperty(c,"init",{value:l}),Object.defineProperty(c,Symbol.hasInstance,{value:p=>{var g,m;return r!=null&&r.Parent&&p instanceof r.Parent?!0:(m=(g=p==null?void 0:p._zod)==null?void 0:g.traits)==null?void 0:m.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class pn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class au extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}($i=globalThis).__zod_globalConfig??($i.__zod_globalConfig={});const _t=globalThis.__zod_globalConfig;function Ht(e){return e&&Object.assign(_t,e),_t}function Ab(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ho,2)),e.message}function Db(e){this._zod.message=e}const jb={get:Ab,set:Db,enumerable:!0,configurable:!0},mo={value:void 0,enumerable:!1},go={value:void 0,enumerable:!1},Li=new WeakSet([Object.prototype,Error.prototype]),cu=(e,t)=>{e.name="$ZodError",mo.value=e._zod,Object.defineProperty(e,"_zod",mo),go.value=t,Object.defineProperty(e,"issues",go),mo.value=void 0,go.value=void 0,Object.defineProperty(e,"message",jb);const n=Object.getPrototypeOf(e);Li.has(n)||(Li.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},lu=R("$ZodError",cu),uu=R("$ZodError",cu,void 0,{Parent:Error});function Nb(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Mb(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?Nb(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function zb(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<a.length;){const f=a[u],c=u===a.length-1;if(f==="_errors"){c&&l._errors.push(t(i)),u++;continue}Object.prototype.hasOwnProperty.call(l,f)||Object.defineProperty(l,f,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const p=l[f];c&&p._errors.push(t(i)),l=p,u++}}}};return r(e),n}function Vr(e,t){return{callee:(t==null?void 0:t.callee)??e,Err:t==null?void 0:t.Err}}const zs=e=>{const t=(n,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new pn;if(a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>wn(u,i,Ht())));throw nu(l,(s==null?void 0:s.callee)??t),l}return a.value};return t},$s=e=>{const t=async(n,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>wn(u,i,Ht())));throw nu(l,(s==null?void 0:s.callee)??t),l}return a.value};return t},Zr=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new pn;return s.issues.length?{success:!1,error:new(e??lu)(s.issues.map(i=>wn(i,o,Ht())))}:{success:!0,data:s.value}},$b=Zr(uu),Ur=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>wn(i,o,Ht())))}:{success:!0,data:s.value}},Fb=Ur(uu),Lb=e=>{const t=zs(e),n=(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,a,Vr(n,i))};return n},Vb=e=>{const t=zs(e),n=(r,o,s,i)=>t(r,o,s,Vr(n,i));return n},Zb=e=>{const t=$s(e),n=async(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,a,Vr(n,i))};return n},Ub=e=>{const t=$s(e),n=async(r,o,s,i)=>await t(r,o,s,Vr(n,i));return n},Bb=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Zr(e)(t,n,o)},Wb=e=>(t,n,r)=>Zr(e)(t,n,r),Hb=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Ur(e)(t,n,o)},Kb=e=>async(t,n,r)=>Ur(e)(t,n,r),Gb=/^[cC][0-9a-z]{6,}$/,Yb=/^[0-9a-z]+$/,Jb=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,qb=/^[0-9a-vA-V]{20}$/,Xb=/^[A-Za-z0-9]{27}$/,Qb=/^[a-zA-Z0-9_-]{21}$/;function ey(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const ty=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ny=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Vi=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ry=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,oy="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function sy(){return new RegExp(oy,"u")}const iy=/^(?:(?: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])$/,ay=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,cy=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,ly=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,du=/^[A-Za-z0-9_-]*$/,dy=/^https?$/,fy=/^\+[1-9]\d{6,14}$/,fu="(?:(?:\\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])))";function py(e){return new RegExp(`^${e}$`)}const hy=py(fu);function Ko(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function my(e){return new RegExp(`^${Ko(e)}$`)}function gy(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Ko({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Ko({precision:e.precision})}`:n;return new RegExp(`^${fu}T(?:${r})$`)}const vy=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},by=/^(?:true|false)$/i,yy=/^[^A-Z]*$/,wy=/^[^a-z]*$/,Et=R("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Fs=e=>{const t=e.value;return!lb(t)&&t.length!==void 0},xy=R("$ZodCheckMaxLength",(e,t)=>{var n;Et.init(e,t),(n=e._zod.def).when??(n.when=Fs),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?Ns(o):s)<=t.maximum)return;const a=Ms(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_y=R("$ZodCheckMinLength",(e,t)=>{var n;Et.init(e,t),(n=e._zod.def).when??(n.when=Fs),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?Ns(o):s)>=t.minimum)return;const a=Ms(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Sy=R("$ZodCheckLengthEquals",(e,t)=>{var n;Et.init(e,t),(n=e._zod.def).when??(n.when=Fs),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=t.length&&s<=t.length*2?Ns(o):s;if(i===t.length)return;const a=Ms(o),l=i>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Br=R("$ZodCheckStringFormat",(e,t)=>{var n,r;Et.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ey=R("$ZodCheckRegex",(e,t)=>{Br.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Cy=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=yy),Br.init(e,t)}),ky=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=wy),Br.init(e,t)}),Py=R("$ZodCheckIncludes",(e,t)=>{Et.init(e,t);const n=Lr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Oy=R("$ZodCheckStartsWith",(e,t)=>{Et.init(e,t);const n=new RegExp(`^${Lr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ry=R("$ZodCheckEndsWith",(e,t)=>{Et.init(e,t);const n=new RegExp(`.*${Lr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Ty=R("$ZodCheckOverwrite",(e,t)=>{Et.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Iy{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
148
+ `).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=(this==null?void 0:this.content)??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
149
+ ${n.join(`
150
+ `)}
151
+ };`)(...Object.values(this.closed))}}const Ay={major:4,minor:5,patch:4},Te=R("$ZodType",(e,t)=>{var s;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ay;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,u,f)=>{if(l.memo)return l;let c=un(l),p;for(const g of u){if(g._zod.def.when){if(xb(l)||!g._zod.def.when(l))continue}else if(c)continue;const m=l.issues.length,v=g._zod.check(l);if(v instanceof Promise&&(f==null?void 0:f.async)===!1)throw new pn;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==m&&(zi(l.issues,m,e),c||(c=un(l,m)))});else{if(l.issues.length===m)continue;zi(l.issues,m,e),c||(c=un(l,m))}}return p?p.then(()=>l):l},a=(l,u,f)=>{if(un(l))return l.aborted=!0,l;const c=i(u,o,f);if(c instanceof Promise){if(f.async===!1)throw new pn;return c.then(p=>e._zod.parse(p,f))}return e._zod.parse(c,f)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return c instanceof Promise?c.then(p=>a(p,l,u)):a(c,l,u)}const f=e._zod.parse(l,u);if(f instanceof Promise){if(u.async===!1)throw new pn;return f.then(c=>i(c,o,u))}return i(f,o,u)}}},{get"~standard"(){return iu(this,"~standard",pu(this))},set"~standard"(e){mn(this,"~standard",e)}}),Zi=e=>{var t;return e.success?{value:e.data}:{issues:(t=e.error)==null?void 0:t.issues}};function pu(e){return{validate:t=>{try{return Zi($b(e,t))}catch{return Fb(e,t).then(Zi)}},vendor:"zod",version:1}}const Ls=R("$ZodString",(e,t)=>{var n;Te.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??vy(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ye=R("$ZodStringFormat",(e,t)=>{Br.init(e,t),Ls.init(e,t)}),Dy=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ny),ye.init(e,t)}),jy=R("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Vi(r))}else t.pattern??(t.pattern=Vi());ye.init(e,t)}),Ny=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ry),ye.init(e,t)}),hu=1,mu=2;function My(e,t){var n;if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===dy.source&&!/^https?:\/\//i.test(e))return hu;try{return new URL(e)}catch{return mu}}const zy=/[\t\n\r]/g;function $y(e){return e.replace(zy,"")}function Fy(e,t){return t.lastIndex=0,t.test(e.hostname)}function Ly(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Vy=R("$ZodURL",(e,t)=>{ye.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=My(r,t);if(o===hu){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===mu){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Fy(o,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Ly(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:$y(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Zy=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=sy()),ye.init(e,t)}),Uy=R("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Qb:ey(t.length)),ye.init(e,t)}),By=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Gb),ye.init(e,t)}),Wy=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Yb),ye.init(e,t)}),Hy=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Jb),ye.init(e,t)}),Ky=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qb),ye.init(e,t)}),Gy=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Xb),ye.init(e,t)}),Yy=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=gy(t)),ye.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(n=>{n._zod.bag.laxFormat=!0}))}),Jy=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=hy),ye.init(e,t)}),qy=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=my(t)),ye.init(e,t)}),Xy=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ty),ye.init(e,t)}),Qy=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=iy),ye.init(e,t),e._zod.bag.format="ipv4"}),ew=/^[0-9a-fA-F:.]+$/;function gu(e){if(!ew.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const tw=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ay),ye.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{gu(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),nw=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=cy),ye.init(e,t)});function rw(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:gu(n)}const ow=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ly),ye.init(e,t),e._zod.check=n=>{rw(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function vu(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const sw=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uy),ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{vu(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function iw(e){if(!du.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return vu(n)}const aw=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=du),ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{iw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),cw=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=fy),ye.init(e,t)});function lw(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const uw=R("$ZodJWT",(e,t)=>{ye.init(e,t),e._zod.check=n=>{lw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),dw=R("$ZodBoolean",(e,t)=>{Te.init(e,t),e._zod.pattern=by,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),fw=R("$ZodUnknown",(e,t)=>{Te.init(e,t),e._zod.parse=n=>n}),pw=R("$ZodNever",(e,t)=>{Te.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ui(e,t,n){e.issues.length&&t.issues.push(...su(n,e.issues)),t.value[n]=e.value}const hw=R("$ZodArray",(e,t)=>{Te.init(e,t);const n=_t.memoizer;n==null||n.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=n?n.alloc(e,r,Array(s.length),o):Array(s.length);const i=[];for(let a=0;a<s.length;a++){const l=s[a],u=t.element._zod.run({value:l,issues:[]},o);u instanceof Promise?i.push(u.then(f=>Ui(f,r,a))):Ui(u,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Er(e,t,n,r,o,s){const i=n in r,a=s==="optional";if(!(!i&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!i)return;t.issues.push(...su(n,e.issues))}if(!i&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?i&&(t.value[n]=void 0):t.value[n]=e.value}}const mw=[];function bu(e){var i,a,l,u;const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:mw,o=r.length?[...t,...r]:t;for(const f of o)if(!((u=(l=(a=(i=e.shape)==null?void 0:i[f])==null?void 0:a._zod)==null?void 0:l.traits)!=null&&u.has("$ZodType")))throw new Error(`Invalid element at key "${String(f)}": expected a Zod schema`);const s=hb(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function yu(e,t,n,r,o,s){const i=[],a=o.keySet,l=o.catchall._zod,u=l.def.type,f=l.optin,c=l.optout;for(const p in t){if(a.has(p))continue;if(p==="__proto__"){u==="never"&&i.push(p);continue}if(u==="never"){i.push(p);continue}const g=l.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(m=>Er(m,n,p,t,f,c))):Er(g,n,p,t,f,c)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const Bi=new WeakMap,gw=R("$ZodObject",(e,t)=>{Te.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const l=t.shape;Bi.set(t,l),Object.defineProperty(t,"shape",{get:()=>{const u={...l};return Object.defineProperty(t,"shape",{value:u}),Bi.set(t,u),u}})}const r=Ds(()=>bu(t));de(e,"propValues",l=>{const u=l.def.shape,f={};for(const c in u){const p=u[c]._zod;if(p.values){Object.prototype.hasOwnProperty.call(f,c)||tt(f,c,new Set);for(const g of p.values)f[c].add(g);p.optin!==void 0&&f[c].add(void 0)}}return f});const o=Sr,s=t.catchall;let i;const a=_t.memoizer;a==null||a.attach(e),e._zod.parse=(l,u)=>{i??(i=r.value);const f=l.value;if(!o(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l;l.value=a?a.alloc(e,l,{},u):{};const c=[],p=i.shape;for(const g of i.allKeys){if(g==="__proto__")continue;const m=p[g],v=m._zod.optin,y=m._zod.optout,x=m._zod.run({value:f[g],issues:[]},u);x instanceof Promise?c.push(x.then(w=>Er(w,l,g,f,v,y))):Er(x,l,g,f,v,y)}return s?yu(c,f,l,u,r.value,e):c.length?Promise.all(c).then(()=>l):l}}),vw=R("$ZodObjectJIT",(e,t)=>{gw.init(e,t);const n=e._zod.parse,r=Ds(()=>bu(t)),o=_t.memoizer,s=g=>{var C,T;const m=r.value,v=m.symbolKeys,y=new Iy(["payload","ctx"],{shape:g,inst:e,memo:o,syms:v}),x=N=>`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`,w=(N,F)=>`
152
+ for (let i = 0; i < ${N}.issues.length; i++) {
153
+ const iss = ${N}.issues[i];
154
+ iss.path = iss.path ? [${F}, ...iss.path] : [${F}];
155
+ payload.issues.push(iss);
156
+ }`;y.write("const input = payload.value;");const k=Object.create(null);let E=0;for(const N of m.allKeys)k[N]=`key_${E++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const N of m.allKeys){if(N==="__proto__")continue;const F=k[N],A=typeof N=="symbol"?`syms[${v.indexOf(N)}]`:ub(N),W=`${A} in input`,H=g[N],$=(C=H==null?void 0:H._zod)==null?void 0:C.optin,U=$!==void 0,L=((T=H==null?void 0:H._zod)==null?void 0:T.optout)==="optional";if(y.write(`const ${F} = ${x(A)};`),U&&L){const q=$==="optional"?`${F}_present`:`${F}.value !== undefined || ${F}_present`;y.write(`
157
+ const ${F}_present = ${W};
158
+ if (!${F}.issues.length || ${F}_present) {
159
+ if (${F}.issues.length) {${w(F,A)}
160
+ }
161
+
162
+ if (${q}) {
163
+ newResult[${A}] = ${F}.value;
164
+ }
165
+ }
166
+
167
+ `)}else U?y.write(`
168
+ if (${F}.issues.length) {${w(F,A)}
169
+ }
170
+
171
+ if (${F}.value === undefined) {
172
+ if (${W}) {
173
+ newResult[${A}] = undefined;
174
+ }
175
+ } else {
176
+ newResult[${A}] = ${F}.value;
177
+ }
178
+
179
+ `):y.write(`
180
+ const ${F}_present = ${W};
181
+ if (${F}.issues.length) {${w(F,A)}
182
+ }
183
+ if (!${F}_present && !${F}.issues.length) {
184
+ payload.issues.push({
185
+ code: "invalid_type",
186
+ expected: "nonoptional",
187
+ input: undefined,
188
+ path: [${A}]
189
+ });
190
+ }
191
+
192
+ if (${F}_present) {
193
+ newResult[${A}] = ${F}.value;
194
+ }
195
+
196
+ `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()};let i;const a=Sr,l=!_t.jitless,f=l&&fb.value,c=t.catchall;let p;e._zod.parse=(g,m)=>{p??(p=r.value);const v=g.value;return a(v)?l&&f&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(i||(i=s(t.shape)),g=i(g,m),c?yu([],v,g,m,p,e):g):n(g,m):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)}});function Wi(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!un(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>wn(i,r,Ht())))}),t)}const bw=R("$ZodUnion",(e,t)=>{Te.init(e,t),de(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),de(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),de(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),de(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>js(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const i=[];for(const a of t.options){const l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)i.push(l),s=!0;else{if(l.issues.length===0)return l;i.push(l)}}return s?Promise.all(i).then(a=>Wi(a,r,e,o)):Wi(i,r,e,o)}}),yw=R("$ZodIntersection",(e,t)=>{Te.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([l,u])=>Hi(n,l,u)):Hi(n,s,i)}});function Go(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Nn(e)&&Nn(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const i=Go(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=Go(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Hi(e,t,n){const r=new Map;let o;const s=new Map,i=(u,f)=>{var p,g;let c;if(u.code==="unrecognized_keys"&&!((p=u.path)!=null&&p.length))o??(o=u),c=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&((g=u.path)==null?void 0:g.length)===1){const m=String(u.path[0]);s.has(m)||s.set(m,u),c=[m]}else return!1;for(const m of c)r.has(m)||r.set(m,{}),r.get(m)[f]=!0;return!0};for(const u of t.issues)i(u,"l")||e.issues.push(u);for(const u of n.issues)i(u,"r")||e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){const u=o?a.filter(f=>o.keys.includes(f)):[];u.length&&e.issues.push({...o,keys:u});for(const f of a)!u.includes(f)&&s.has(f)&&e.issues.push(s.get(f))}const l=Go(t.value,n.value);if(!l.valid){if(un(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}const ww=R("$ZodEnum",(e,t)=>{Te.init(e,t);const n=tu(t.entries),r=new Set(n);e._zod.values=r;const o=n.filter(s=>pb.has(typeof s));e._zod.pattern=new RegExp(o.length?`^(${o.map(s=>Lr(s.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(s,i)=>{const a=s.value;return r.has(a)||s.issues.push({code:"invalid_value",values:n,input:a,inst:e}),s}}),xw=R("$ZodTransform",(e,t)=>{var n;Te.init(e,t),e._zod.optin="optional",(n=_t.memoizer)==null||n.guard(e),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new au(e.constructor.name);const s=t.transform(r.value,r);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(r.value=a,r));if(s instanceof Promise)throw new pn;return r.value=s,r}});function Ki(e,t){return e.value=t.issues.length?void 0:t.value,e}const wu=R("$ZodOptional",(e,t)=>{Te.init(e,t),de(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",de(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),de(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${js(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>Ki(n,s)):Ki(n,o)}return t.innerType._zod.run(n,r)}}),_w=R("$ZodExactOptional",(e,t)=>{wu.init(e,t),de(e,"values",n=>n.def.innerType._zod.values),de(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Sw=R("$ZodNullable",(e,t)=>{Te.init(e,t),de(e,"optin",n=>n.def.innerType._zod.optin),de(e,"optout",n=>n.def.innerType._zod.optout),de(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${js(r.source)}|null)$`):void 0}),de(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Ew=R("$ZodDefault",(e,t)=>{Te.init(e,t),e._zod.optin="defaulted",de(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Gi(s,t)):Gi(o,t)}});function Gi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Cw=R("$ZodPrefault",(e,t)=>{Te.init(e,t),e._zod.optin="defaulted",de(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),kw=R("$ZodNonOptional",(e,t)=>{Te.init(e,t),de(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Yi(s,e)):Yi(o,e)}});function Yi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Ji(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>wn(o,r,Ht()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Pw=R("$ZodCatch",(e,t)=>{Te.init(e,t),de(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),de(e,"optout",n=>n.def.innerType._zod.optout),de(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>Ji(n,s,t,r)):Ji(n,o,t,r)}}),Ow=R("$ZodPipe",(e,t)=>{Te.init(e,t),de(e,"values",n=>n.def.in._zod.values),de(e,"optin",n=>n.def.in._zod.optin),de(e,"optout",n=>n.def.out._zod.optout),de(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>or(i,t.in,r)):or(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>or(s,t.out,r)):or(o,t.out,r)}});function or(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Rw=R("$ZodReadonly",(e,t)=>{Te.init(e,t),de(e,"propValues",n=>n.def.innerType._zod.propValues),de(e,"values",n=>n.def.innerType._zod.values),de(e,"optin",n=>{var r,o;return(o=(r=n.def.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),de(e,"optout",n=>{var r,o;return(o=(r=n.def.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(qi):qi(o)}});function qi(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Tw=R("$ZodCustom",(e,t)=>{Et.init(e,t),Te.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>Xi(s,n,r,e));Xi(o,n,r,e)}});function Xi(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Mn(o))}}class Iw extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Yo="~memo",Qi=[];function vo(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const ea=new WeakMap;function xu(e,t){const n=ea.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1;const o=a=>{!r&&(a!=null&&a._zod)&&xu(a,t)&&(r=!0)},s=e._zod.def;switch(s.type){case"object":{for(const a of Reflect.ownKeys(s.shape))o(s.shape[a]);o(s.catchall);break}case"array":o(s.element);break;case"tuple":for(const a of s.items)o(a);o(s.rest);break;case"record":case"map":o(s.keyType),o(s.valueType);break;case"set":o(s.valueType);break;case"union":for(const a of s.options)o(a);break;case"intersection":o(s.left),o(s.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(s.innerType);break;case"pipe":o(s.in),o(s.out);break;case"function":o(s.input),o(s.output);break;case"lazy":o(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const a in s){const l=Object.getOwnPropertyDescriptor(s,a);if(!l||l.get)continue;const u=l.value;if(!(!u||typeof u!="object")){if(u._zod)o(u);else if(Array.isArray(u))for(const f of u)o(f)}}}return t.delete(e),ea.set(e,r),r}function Aw(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}let sr;const ir=[],Dw={alloc(e,t,n){const r=sr;if(!r)return n;sr=void 0;const o={value:n,issues:null};return r.set(t.value,o),ir.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&Nw(s,o.value))throw new Iw;return n(o,s)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const s=e._zod.parse,i=(a,l)=>{if(n===void 0&&(n=xu(e,new Set),!n))return e._zod.parse=s,e._zod.run===i&&(e._zod.run=s),s(a,l);const u=a.value;if(u===null||typeof u!="object")return s(a,l);let f=l[Yo];f||(f={buckets:new Map,backEdges:void 0},l[Yo]=f);let c;r===l?c=o:(c=Aw(f,e),r=l,o=c);const p=c.get(u);if(p)return a.value=p.value,p.issues?p.issues.length&&a.issues.push(...vo(p.issues)):(a.memo=!0,f.backEdges??(f.backEdges=new Set),f.backEdges.add(p.value)),a;sr=c;const g=ir.length,m=s(a,l);sr=void 0;const v=ir.length>g?ir.pop():void 0;return m instanceof Promise?m.then(y=>(v&&(v.issues=y.issues.length?vo(y.issues):Qi),y)):(v&&(v.issues=m.issues.length?vo(m.issues):Qi),m)};e._zod.parse=i,e._zod.run===s&&(e._zod.run=i)})}};function jw(){return Dw}function Nw(e,t){var r;const n=(r=e[Yo])==null?void 0:r.backEdges;return n!==void 0&&t!==null&&typeof t=="object"&&n.has(t)}const Mw=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(s){return e[s]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,i){return s==="number"&&typeof i=="number"&&!Number.isFinite(i)?String(i):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const i=o(s.expected),a=Sb(s.input),l=o(a,s.input);return`Invalid input: expected ${i}, received ${l}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${ou(s.values[0])}`:`Invalid option: expected one of ${Ni(s.values,"|")}`;case"too_big":{const i=s.exact?"exactly ":s.inclusive?"<=":"<",a=t(s.origin);return a?`Too big: expected ${s.origin??"value"} to have ${i}${s.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${i}${s.maximum.toString()}`}case"too_small":{const i=s.exact?"exactly ":s.inclusive?">=":">",a=t(s.origin);return a?`Too small: expected ${s.origin} to have ${i}${s.minimum.toString()} ${a.unit}`:`Too small: expected ${s.origin} to be ${i}${s.minimum.toString()}`}case"invalid_format":{const i=s;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Ni(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(a=>`'${a}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function zw(){return{localeError:Mw()}}var ta;class $w{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Fw(){return new $w}(ta=globalThis).__zod_globalRegistry??(ta.__zod_globalRegistry=Fw());const On=globalThis.__zod_globalRegistry;function Lw(e,t){return new e({type:"string",...X(t)})}function Vw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function Zw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function Uw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function Bw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function Ww(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function Hw(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function Kw(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function Gw(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function Yw(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function Jw(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function qw(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function Xw(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function Qw(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function ex(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function tx(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function nx(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function rx(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function ox(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function sx(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function ix(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function ax(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function cx(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}function lx(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function ux(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function dx(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function fx(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function px(e,t){return new e({type:"boolean",...X(t)})}function hx(e){return new e({type:"unknown"})}function mx(e,t){return new e({type:"never",...X(t)})}function _u(e,t){return new xy({check:"max_length",...X(t),maximum:e})}function Cr(e,t){return new _y({check:"min_length",...X(t),minimum:e})}function Su(e,t){return new Sy({check:"length_equals",...X(t),length:e})}function gx(e,t){return new Ey({check:"string_format",format:"regex",...X(t),pattern:e})}function vx(e){return new Cy({check:"string_format",format:"lowercase",...X(e)})}function bx(e){return new ky({check:"string_format",format:"uppercase",...X(e)})}function yx(e,t){return new Py({check:"string_format",format:"includes",...X(t),includes:e})}function wx(e,t){return new Oy({check:"string_format",format:"starts_with",...X(t),prefix:e})}function xx(e,t){return new Ry({check:"string_format",format:"ends_with",...X(t),suffix:e})}function xn(e){return new Ty({check:"overwrite",tx:e})}function _x(e){return xn(t=>t.normalize(e))}function Sx(){return xn(e=>e.trim())}function Ex(){return xn(e=>e.toLowerCase())}function Cx(){return xn(e=>e.toUpperCase())}function kx(){return xn(e=>db(e))}function Px(e,t,n){return new e({type:"array",element:t,...X(n)})}function Ox(e,t,n){return new e({type:"custom",check:"custom",fn:t,...X(n)})}function Rx(e,t){const n=Tx(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Mn(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(Mn(s))}},e(r.value,r)),t);return n}function Tx(e,t){const n=new Et({check:"custom",...X(t)});return n._zod.check=e,n}function Tn(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&tt(e,r,n[r]);return e}function Eu(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??On,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function Un(e,t,n,r,o){const s=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(n,s),!0}function Fe(e,t,n={path:[],schemaPath:[]}){var f,c;var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=(c=(f=e._zod).toJSONSchema)==null?void 0:c.call(f);if(a)i.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,p);else{const m=i.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,m,p)}const g=e._zod.parent;g&&(i.ref||(i.ref=g),Fe(g,t,p),t.seen.get(g).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Tn(i.schema,l),t.io==="input"&&We(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function na(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Cu(e,t){var i,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const f of e.seen.entries()){const c=(i=e.metadataRegistry.get(f[0]))==null?void 0:i.id;if(c){const p=r.get(c);if(p&&p!==f[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,f[0])}}const o=f=>{var v;const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(v=e.external.registry.get(f[0]))==null?void 0:v.id,x=e.external.uri??(k=>k);if(y)return{ref:x(y)};const w=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=w,{defId:w,ref:`${x("__shared")}#/${c}/${na(w)}`}}const p="#",g=`${p}/${c}/`;if(f[1]===n&&!f[1].schema.id)return{ref:p};const m=f[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:g+na(m)}},s=f=>{if(f[1].schema.$ref)return;const c=f[1],{ref:p,defId:g}=o(f);c.def={...c.schema},g&&(c.defId=g);const m=c.schema;for(const v in m)delete m[v];m.$ref=p};if(e.cycles==="throw")for(const f of e.seen.entries()){const c=f[1];if(c.cycle)throw new Error(`Cycle detected: #/${(a=c.cycle)==null?void 0:a.join("/")}/<root>
197
+
198
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const c=f[1];if(t===f[0]){s(f);continue}if(e.external){const g=(l=e.external.registry.get(f[0]))==null?void 0:l.id;if(t!==f[0]&&g){s(f);continue}}if((u=e.metadataRegistry.get(f[0]))==null?void 0:u.id){s(f);continue}if(c.cycle){s(f);continue}if(c.count>1&&e.reused==="ref"){s(f);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function ku(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;ku(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const i of Array.isArray(s)?s:[s]){if(typeof i!="string")return;n.includes(i)||n.push(i)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Pu=new Set(["type","properties","required","additionalProperties"]),ra=["oneOf","anyOf"];function oa(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Jo(e){var s;const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const a in i)if(!Pu.has(a))return null;t.push(i)}const n={},r=new Set;for(const i of t){for(const a in i.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;const l=[];for(const f of t){const c=((s=f.properties)==null?void 0:s[a])??oa(f);c!=null&&(l.some(p=>JSON.stringify(p)===JSON.stringify(c))||l.push(c))}const u=l.length===1?l[0]:Jo(l)??{allOf:l};tt(n,a,u)}for(const a of i.required??[])r.add(a)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const a of t){const l=oa(a);l&&!i.some(u=>JSON.stringify(u)===JSON.stringify(l))&&i.push(l)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Ix(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of Pu)if(o in e)return;const n=t.filter(o=>ra.some(s=>Array.isArray(o[s])));let r=null;if(!n.length)r=Jo(t);else{const o=n[0],s=ra.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;const i=t.filter(l=>l!==o),a=o[s].map(l=>Jo([...i,l]));if(a.some(l=>!l))return;r={[s]:a}}r&&(delete e.allOf,Tn(e,r))}function Ou(e,t){var a,l,u,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const p=e.seen.get(c);if(p.ref===null)return;const g=p.def??p.schema,m={...g},v=p.ref;if(p.ref=null,v){r(v);const x=e.seen.get(v),w=x.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(w)):Tn(g,w),Tn(g,m),c._zod.parent===v)for(const E in g)E==="$ref"||E==="allOf"||E in m||delete g[E];if(w.$ref&&x.def)for(const E in g)E==="$ref"||E==="allOf"||E in x.def&&JSON.stringify(g[E])===JSON.stringify(x.def[E])&&delete g[E]}const y=c._zod.parent;if(y&&y!==v){r(y);const x=e.seen.get(y);if(x!=null&&x.schema.$ref&&(g.$ref=x.schema.$ref,x.def))for(const w in g)w==="$ref"||w==="allOf"||w in x.def&&JSON.stringify(g[w])===JSON.stringify(x.def[w])&&delete g[w]}e.override({zodSchema:c,jsonSchema:g,path:p.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const c of[...e.seen.entries()].reverse())r(c[0]);if(e.target!=="openapi-3.0")for(const c of e.seen.entries())ku(c[1].def??c[1].schema);for(const c of e.deferred)c();if(e.intersections.length){const c=new Map;for(const p of e.seen.values())for(const g of[p.schema,p.def]){const m=g==null?void 0:g.allOf;if(!Array.isArray(m))continue;const v=c.get(m);v?v.push(g):c.set(m,[g])}for(const p of e.intersections)for(const g of c.get(p)??[])Ix(g)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(l=e.external.registry.get(t))==null?void 0:l.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Tn(o,n.defId?n.schema:n.def??n.schema);const s=(u=e.metadataRegistry.get(t))==null?void 0:u.id;s!==void 0&&o.id===s&&delete o.id;const i=((f=e.external)==null?void 0:f.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const c of e.seen.entries()){const p=c[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,tt(i,p.defId,p.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:kr(t,"input",e.processors),output:kr(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function We(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return We(r.element,n);if(r.type==="set")return We(r.valueType,n);if(r.type==="lazy")return We(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return We(r.innerType,n);if(r.type==="intersection")return We(r.left,n)||We(r.right,n);if(r.type==="record"||r.type==="map")return We(r.keyType,n)||We(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:We(r.in,n)||We(r.out,n);if(r.type==="object"){for(const o in r.shape)if(We(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(We(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(We(o,n))return!0;return!!(r.rest&&We(r.rest,n))}return!1}const Ax=(e,t={})=>n=>{const r=Eu({...n,processors:t});return Fe(e,r),Cu(r,e),Ou(r,e)},kr=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=Eu({...o??{},target:s,io:t,processors:n});return Fe(e,i),Cu(i,e),Ou(i,e)},Dx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},jx=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:l,contentEncoding:u,laxFormat:f}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=Dx[a]??a,o.format===""&&delete o.format,(a==="time"||f)&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?o.pattern=c[0].source:c.length>1&&(o.allOf=[...c.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Nx=(e,t,n,r)=>{n.type="boolean"},Mx=(e,t,n,r)=>{n.not={}},zx=(e,t,n,r)=>{},$x=(e,t,n,r)=>{const o=e._zod.def,s=tu(o.entries);if(s.length===0){n.not={};return}s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},Fx=(e,t,n,r)=>{Un(e,t,n,r,"Custom types cannot be represented in JSON Schema")},Lx=(e,t,n,r)=>{Un(e,t,n,r,"Transforms cannot be represented in JSON Schema")},Vx=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Fe(s.element,t,{...r,path:[...r.path,"items"]})};function qo(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?qo(t.out):t.type==="catch"?qo(t.innerType):e._zod.optin}const Zx=(e,t,n,r)=>{var f;const o=n,s=e._zod.def,i=s.shape;if(Object.getOwnPropertySymbols(i).length&&Un(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in i)tt(o.properties,c,Fe(i[c],t,{...r,path:[...r.path,"properties",c]}));const l=new Set(Object.keys(i)),u=new Set([...l].filter(c=>{const p=s.shape[c];return t.io==="input"?qo(p)===void 0:p._zod.optout===void 0}));u.size>0&&(o.required=Array.from(u)),((f=s.catchall)==null?void 0:f._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Fe(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Ux=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,l)=>Fe(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=i:n.anyOf=i},Bx=(e,t,n,r)=>{const o=e._zod.def,s=Fe(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Fe(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=l,t.intersections.push(l)},Wx=(e,t,n,r)=>{const o=e._zod.def,s=Fe(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},Hx=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Vs=Symbol();function Ru(e,t,n,r,o){let s=!1;const i=JSON.stringify(e,(a,l)=>typeof l!="bigint"?l:(s=!0,null));return s?(Un(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),Vs):JSON.parse(i)}const Kx=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;const i=Ru(o.defaultValue,e,t,n,r);i!==Vs&&(n.default=i)},Gx=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);if(s.ref=o.innerType,t.io!=="input")return;const i=Ru(o.defaultValue,e,t,n,r);i!==Vs&&(n._prefault=i)},Yx=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{Un(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},Jx=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?s?o.out:o.in:o.out;Fe(i,t,r);const a=t.seen.get(e);a.ref=i},qx=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Tu=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},sa=new WeakSet([Object.prototype,Error.prototype]);function ar(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const Xx=(e,t)=>{lu.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);sa.has(n)||(sa.add(n),ar(n,"format",r=>o=>zb(r,o)),ar(n,"flatten",r=>o=>Mb(r,o)),ar(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ho,2)}),ar(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ho,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ct=R("ZodError",Xx,void 0,{Parent:Error}),Qx=zs(ct),e0=$s(ct),t0=Zr(ct),n0=Ur(ct),r0=Lb(ct),o0=Vb(ct),s0=Zb(ct),i0=Ub(ct),a0=Bb(ct),c0=Wb(ct),l0=Hb(ct),u0=Kb(ct);function d0(){_t.localeError||Ht(zw())}function Zs(){_t.memoizer||Ht({memoizer:jw()})}const Ie=R("ZodType",(e,t)=>(d0(),Te.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Bt(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Wt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(c_(e,t))},superRefine(e,t){return this.check(l_(e,t))},overwrite(e){return this.check(xn(e))},optional(){return ca(this)},exactOptional(){return J0(this)},nullable(){return la(this)},nullish(){return ca(la(this))},nonoptional(e){return n_(this,e)},array(){return L0(this)},or(e){return B0([this,e])},and(e){return H0(this,e)},transform(e){return ua(this,Y0(e))},default(e){return Q0(this,e)},prefault(e){return t_(this,e)},catch(e){return o_(this,e)},pipe(e){return ua(this,e)},readonly(){return a_(this)},describe(e){const t=this.clone();return On.add(t,{description:e}),t},meta(...e){if(e.length===0)return On.get(this);const t=this.clone();return On.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return iu(this,"~standard",{...pu(this),jsonSchema:{input:kr(this,"input"),output:kr(this,"output")}})},set"~standard"(e){mn(this,"~standard",e)},parse:function e(t,n){return Qx(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await e0(this,t,n,{callee:e})},safeParse(e,t){return t0(this,e,t)},async safeParseAsync(e,t){return n0(this,e,t)},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){mn(this,"spa",e)},encode:function e(t,n){return r0(this,t,n,{callee:e})},decode:function e(t,n){return o0(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await s0(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await i0(this,t,n,{callee:e})},safeEncode(e,t){return a0(this,e,t)},safeDecode(e,t){return c0(this,e,t)},async safeEncodeAsync(e,t){return l0(this,e,t)},async safeDecodeAsync(e,t){return u0(this,e,t)},toJSONSchema(e){return Ax(this,{})(e)},get description(){var e;return(e=On.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Iu=R("_ZodString",(e,t)=>{Ls.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(r,o,s)=>jx(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(gx(...e))},includes(...e){return this.check(yx(...e))},startsWith(...e){return this.check(wx(...e))},endsWith(...e){return this.check(xx(...e))},min(...e){return this.check(Cr(...e))},max(...e){return this.check(_u(...e))},length(...e){return this.check(Su(...e))},nonempty(...e){return this.check(Cr(1,...e))},lowercase(e){return this.check(vx(e))},uppercase(e){return this.check(bx(e))},trim(){return this.check(Sx())},normalize(...e){return this.check(_x(...e))},toLowerCase(){return this.check(Ex())},toUpperCase(){return this.check(Cx())},slugify(){return this.check(kx())}}),f0=R("ZodString",(e,t)=>{Ls.init(e,t),Iu.init(e,t)},{email(e){return this.check(Vw(v0,e))},url(e){return this.check(Kw(y0,e))},jwt(e){return this.check(cx(j0,e))},emoji(e){return this.check(Gw(w0,e))},guid(e){return this.check(Zw(b0,e))},uuid(e){return this.check(Uw(cr,e))},uuidv4(e){return this.check(Bw(cr,e))},uuidv6(e){return this.check(Ww(cr,e))},uuidv7(e){return this.check(Hw(cr,e))},nanoid(e){return this.check(Yw(x0,e))},cuid(e){return this.check(Jw(_0,e))},cuid2(e){return this.check(qw(S0,e))},ulid(e){return this.check(Xw(E0,e))},base64(e){return this.check(sx(I0,e))},base64url(e){return this.check(ix(A0,e))},xid(e){return this.check(Qw(C0,e))},ksuid(e){return this.check(ex(k0,e))},ipv4(e){return this.check(tx(P0,e))},ipv6(e){return this.check(nx(O0,e))},cidrv4(e){return this.check(rx(R0,e))},cidrv6(e){return this.check(ox(T0,e))},e164(e){return this.check(ax(D0,e))},datetime(e){return this.check(lx(p0,e))},date(e){return this.check(ux(h0,e))},time(e){return this.check(dx(m0,e))},duration(e){return this.check(fx(g0,e))}});function ia(e){return Lw(f0,e)}const we=R("ZodStringFormat",(e,t)=>{ye.init(e,t),Iu.init(e,t)}),p0=R("ZodISODateTime",(e,t)=>{Yy.init(e,t),we.init(e,t)}),h0=R("ZodISODate",(e,t)=>{Jy.init(e,t),we.init(e,t)}),m0=R("ZodISOTime",(e,t)=>{qy.init(e,t),we.init(e,t)}),g0=R("ZodISODuration",(e,t)=>{Xy.init(e,t),we.init(e,t)}),v0=R("ZodEmail",(e,t)=>{Ny.init(e,t),we.init(e,t)}),b0=R("ZodGUID",(e,t)=>{Dy.init(e,t),we.init(e,t)}),cr=R("ZodUUID",(e,t)=>{jy.init(e,t),we.init(e,t)}),y0=R("ZodURL",(e,t)=>{Vy.init(e,t),we.init(e,t)}),w0=R("ZodEmoji",(e,t)=>{Zy.init(e,t),we.init(e,t)}),x0=R("ZodNanoID",(e,t)=>{Uy.init(e,t),we.init(e,t)}),_0=R("ZodCUID",(e,t)=>{By.init(e,t),we.init(e,t)}),S0=R("ZodCUID2",(e,t)=>{Wy.init(e,t),we.init(e,t)}),E0=R("ZodULID",(e,t)=>{Hy.init(e,t),we.init(e,t)}),C0=R("ZodXID",(e,t)=>{Ky.init(e,t),we.init(e,t)}),k0=R("ZodKSUID",(e,t)=>{Gy.init(e,t),we.init(e,t)}),P0=R("ZodIPv4",(e,t)=>{Qy.init(e,t),we.init(e,t)}),O0=R("ZodIPv6",(e,t)=>{tw.init(e,t),we.init(e,t)}),R0=R("ZodCIDRv4",(e,t)=>{nw.init(e,t),we.init(e,t)}),T0=R("ZodCIDRv6",(e,t)=>{ow.init(e,t),we.init(e,t)}),I0=R("ZodBase64",(e,t)=>{sw.init(e,t),we.init(e,t)}),A0=R("ZodBase64URL",(e,t)=>{aw.init(e,t),we.init(e,t)}),D0=R("ZodE164",(e,t)=>{cw.init(e,t),we.init(e,t)}),j0=R("ZodJWT",(e,t)=>{uw.init(e,t),we.init(e,t)}),N0=R("ZodBoolean",(e,t)=>{dw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nx(e,n,r)});function Z_(e){return px(N0,e)}const M0=R("ZodUnknown",(e,t)=>{fw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zx()});function aa(){return hx(M0)}const z0=R("ZodNever",(e,t)=>{pw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mx(e,n,r)});function $0(e){return mx(z0,e)}const F0=R("ZodArray",(e,t)=>{Zs(),hw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vx(e,n,r,o),e.element=t.element},{min(e,t){return this.check(Cr(e,t))},nonempty(e){return this.check(Cr(1,e))},max(e,t){return this.check(_u(e,t))},length(e,t){return this.check(Su(e,t))},unwrap(){return this.element}});function L0(e,t){return Px(F0,e,t)}const V0=R("ZodObject",(e,t)=>{Zs(),vw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zx(e,n,r,o),Ob(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return K0(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:aa()})},loose(){return this.clone({...this._zod.def,catchall:aa()})},strict(){return this.clone({...this._zod.def,catchall:$0()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return vb(this,e)},safeExtend(e){return bb(this,e)},merge(e){return yb(this,e)},pick(e){return mb(this,e)},omit(e){return gb(this,e)},partial(...e){return Mi(Au,this,e[0])},exactPartial(...e){return Mi(Du,this,e[0],"exactPartial")},required(...e){return wb(ju,this,e[0])}});function Z0(e,t){const n={type:"object",shape:e??{},...X(t)};return new V0(n)}const U0=R("ZodUnion",(e,t)=>{bw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ux(e,n,r,o),e.options=t.options});function B0(e,t){return new U0({type:"union",options:e,...X(t)})}const W0=R("ZodIntersection",(e,t)=>{yw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bx(e,n,r,o)});function H0(e,t){return new W0({type:"intersection",left:e,right:t})}const Xo=R("ZodEnum",(e,t)=>{ww.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(r,o,s)=>$x(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Xo({...t,checks:[],...X(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new Xo({...t,checks:[],...X(o),entries:s})}});function K0(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Xo({type:"enum",entries:n,...X(t)})}const G0=R("ZodTransform",(e,t)=>{Zs(),xw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lx(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new au(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Mn(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Mn(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function Y0(e){return new G0({type:"transform",transform:e})}const Au=R("ZodOptional",(e,t)=>{wu.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tu(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ca(e){return new Au({type:"optional",innerType:e})}const Du=R("ZodExactOptional",(e,t)=>{_w.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tu(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function J0(e){return new Du({type:"optional",innerType:e})}const q0=R("ZodNullable",(e,t)=>{Sw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function la(e){return new q0({type:"nullable",innerType:e})}const X0=R("ZodDefault",(e,t)=>{Ew.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Q0(e,t){return new X0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ru(t)}})}const e_=R("ZodPrefault",(e,t)=>{Cw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function t_(e,t){return new e_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ru(t)}})}const ju=R("ZodNonOptional",(e,t)=>{kw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function n_(e,t){return new ju({type:"nonoptional",innerType:e,...X(t)})}const r_=R("ZodCatch",(e,t)=>{Pw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function o_(e,t){return new r_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Tb(t)})}const s_=R("ZodPipe",(e,t)=>{Ow.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jx(e,n,r,o),e.in=t.in,e.out=t.out});function ua(e,t){return new s_({type:"pipe",in:e,out:t})}const i_=R("ZodReadonly",(e,t)=>{Rw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function a_(e){return new i_({type:"readonly",innerType:e})}const Nu=R("ZodCustom",(e,t)=>{Tw.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fx(e,n,r,o)});function c_(e,t={}){return Ox(Nu,e,t)}function l_(e,t){return Rx(e,t)}function U_(e,t={}){const n=new Nu({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...X(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var u_=Object.defineProperty,d_=(e,t)=>u_(e,"name",{value:t,configurable:!0}),f_=d.forwardRef(d_(function(t,n){return h.jsx(ke.label,{...t,ref:n,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),Mu=f_;const p_=zn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qo=d.forwardRef(({className:e,...t},n)=>h.jsx(Mu,{ref:n,className:J(p_(),e),...t}));Qo.displayName=Mu.displayName;const h_=zn("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),zu=d.forwardRef(({className:e,level:t,...n},r)=>h.jsx("div",{ref:r,className:J(h_({level:t}),e),...n}));zu.displayName="Card";const $u=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:J("flex flex-col space-y-1.5 p-6",e),...t}));$u.displayName="CardHeader";const Fu=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:J("text-2xl font-semibold leading-none tracking-tight",e),...t}));Fu.displayName="CardTitle";const Lu=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:J("text-sm text-muted-foreground",e),...t}));Lu.displayName="CardDescription";const Vu=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:J("p-6 pt-0",e),...t}));Vu.displayName="CardContent";const m_=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:J("flex items-center p-6 pt-0",e),...t}));m_.displayName="CardFooter";const g_=Z0({email:ia().email(),password:ia().min(8)});function v_(){const e=es(),{resolvedTheme:t}=Pr(),n=t==="dark"?"/logo-dark.svg":"/logo.svg";d.useEffect(()=>{fetch("/api/v1/auth/status").then(u=>u.json()).then(({initialized:u})=>{u||e("/setup",{replace:!0})}).catch(()=>{})},[e]);const{register:r,handleSubmit:o,setError:s,formState:{errors:i,isSubmitting:a}}=ob({resolver:cb(g_),mode:"onBlur"});async function l(u){try{const{status:f}=await zl.post("/api/v1/auth/login",{email:u.email,password:u.password});if(f!==200){s("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{s("root",{message:"Network error. Please try again."})}}return h.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:h.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),h.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),h.jsxs(zu,{level:4,className:"w-full",children:[h.jsxs($u,{className:"text-center",children:[h.jsx(Fu,{className:"text-2xl tracking-display-md",children:"Welcome back"}),h.jsx(Lu,{children:"Sign in to your team workspace"})]}),h.jsx(Vu,{children:h.jsxs("form",{onSubmit:o(l),className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Qo,{htmlFor:"email",children:"Email"}),h.jsx(yr,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),i.email&&h.jsx("p",{className:"text-sm text-destructive",children:i.email.message})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Qo,{htmlFor:"password",children:"Password"}),h.jsx(yr,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),i.password&&h.jsx("p",{className:"text-sm text-destructive",children:i.password.message})]}),i.root&&h.jsx("p",{className:"text-sm text-destructive",children:i.root.message}),h.jsx(Or,{type:"submit",size:"lg",disabled:a,className:"w-full mt-1",children:a?"Signing in…":"Sign in"})]})})]})]})})}const b_=d.lazy(()=>St(()=>import("./Setup-CoHwaxo7.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Setup}))),y_=d.lazy(()=>St(()=>import("./Invite-ChaVEWvP.js"),__vite__mapDeps([3,1,2,4])).then(e=>({default:e.Invite}))),w_=d.lazy(()=>St(()=>import("./ResetPassword-Ut9BFums.js"),__vite__mapDeps([5,1,2])).then(e=>({default:e.ResetPassword}))),x_=d.lazy(()=>St(()=>import("./AppCenter-BkSQFKRv.js"),__vite__mapDeps([6,1,7,8,9,10,11,2])).then(e=>({default:e.AppCenter}))),__=d.lazy(()=>St(()=>import("./QASession-DICynZa0.js"),__vite__mapDeps([12,1,7,13,2,11,8,10])).then(e=>({default:e.QASession}))),S_=d.lazy(()=>St(()=>import("./MacResources-CLChFyJW.js"),__vite__mapDeps([14,1,13,15,2])).then(e=>({default:e.MacResources}))),E_=d.lazy(()=>St(()=>import("./Default-D1inA8sU.js"),__vite__mapDeps([16,1,10,11,4,2])).then(e=>({default:e.DefaultSettings}))),C_=d.lazy(()=>St(()=>import("./Team-DaVY1DGm.js"),__vite__mapDeps([17,1,8,11,18,2])).then(e=>({default:e.TeamSettings}))),k_=d.lazy(()=>St(()=>import("./Tokens-_KZJ7AZ9.js"),__vite__mapDeps([19,1,10,11,8,18,9,2])).then(e=>({default:e.TokenSettings}))),P_=d.lazy(()=>St(()=>import("./NotFound-BoDDivK5.js"),__vite__mapDeps([20,1])).then(e=>({default:e.NotFound}))),O_=h.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),lr=e=>h.jsx(d.Suspense,{fallback:O_,children:e});function R_(){const{resolvedTheme:e}=Pr();return h.jsxs(ed,{children:[h.jsxs(td,{children:[h.jsx(Xe,{path:"/login",element:h.jsx(v_,{})}),h.jsx(Xe,{path:"/setup",element:lr(h.jsx(b_,{}))}),h.jsx(Xe,{path:"/invite",element:lr(h.jsx(y_,{}))}),h.jsx(Xe,{path:"/reset-password",element:lr(h.jsx(w_,{}))}),h.jsxs(Xe,{element:h.jsx(Dv,{}),children:[h.jsx(Xe,{index:!0,element:h.jsx(pa,{to:"/app-center",replace:!0})}),h.jsx(Xe,{path:"/app-center",element:h.jsx(x_,{})}),h.jsx(Xe,{path:"/app-center/build",element:h.jsx(__,{})}),h.jsx(Xe,{path:"/mac-resources",element:h.jsx(S_,{})}),h.jsx(Xe,{path:"/settings/default",element:h.jsx(E_,{})}),h.jsx(Xe,{path:"/settings/team",element:h.jsx(C_,{})}),h.jsx(Xe,{path:"/settings/tokens",element:h.jsx(k_,{})})]}),h.jsx(Xe,{path:"*",element:lr(h.jsx(P_,{}))})]}),h.jsx(Vd,{position:"bottom-right",richColors:!0,theme:e})]})}Xu.createRoot(document.getElementById("root")).render(h.jsx(d.StrictMode,{children:h.jsx(sd,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:h.jsx(R_,{})})}));export{Tt as $,Ic as A,Or as B,zu as C,kh as D,Sv as E,Wa as F,Z_ as G,ap as H,yr as I,J,Q as K,Qo as L,gf as M,ms as N,Dt as O,cs as P,j_ as Q,us as R,wr as S,xm as T,Ev as U,Qh as V,qe as W,Pf as X,Ar as Y,il as Z,U_ as _,Vu as a,zn as a0,uc as a1,Z0 as a2,ia as a3,D_ as a4,cb as a5,$l as a6,Iv as a7,It as a8,be as a9,Fn as aa,vs as ab,Rr as ac,ob as ad,Zt as ae,Je as af,Ec as ag,Fv as ah,Pr as ai,Lu as b,$u as c,Fu as d,rf as e,sf as f,Ac as g,V_ as h,zh as i,mc as j,bc as k,hc as l,Rh as m,vc as n,N_ as o,ss as p,sg as q,ff as r,jt as s,ke as t,og as u,Tc as v,vn as w,Zc as x,wm as y,_m as z};