@tapflowio/relay 0.20.0 → 0.20.1

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 (83) hide show
  1. package/dist/api/auth.d.ts +2 -2
  2. package/dist/api/auth.d.ts.map +1 -1
  3. package/dist/api/auth.js +22 -33
  4. package/dist/api/auth.js.map +1 -1
  5. package/dist/lib/adminAccount.d.ts +24 -0
  6. package/dist/lib/adminAccount.d.ts.map +1 -0
  7. package/dist/lib/adminAccount.js +61 -0
  8. package/dist/lib/adminAccount.js.map +1 -0
  9. package/dist/lib/adminBootstrap.d.ts +48 -0
  10. package/dist/lib/adminBootstrap.d.ts.map +1 -0
  11. package/dist/lib/adminBootstrap.js +68 -0
  12. package/dist/lib/adminBootstrap.js.map +1 -0
  13. package/dist/lib/config.d.ts +4 -4
  14. package/dist/lib/loadEnvFile.d.ts +1 -1
  15. package/dist/lib/loadEnvFile.d.ts.map +1 -1
  16. package/dist/lib/loadEnvFile.js +11 -1
  17. package/dist/lib/loadEnvFile.js.map +1 -1
  18. package/dist/server.js +22 -0
  19. package/dist/server.js.map +1 -1
  20. package/package.json +6 -6
  21. package/public/assets/{AppCenter-Dg4dscW-.js → AppCenter-DtF_g4F7.js} +5 -5
  22. package/public/assets/AppCenter-DtF_g4F7.js.br +0 -0
  23. package/public/assets/{Default-Dxi8aZ1t.js → Default-C_p-ZWS6.js} +1 -1
  24. package/public/assets/Default-C_p-ZWS6.js.br +0 -0
  25. package/public/assets/{Invite-0EwoClX6.js → Invite-DKT4qT6M.js} +1 -1
  26. package/public/assets/Invite-DKT4qT6M.js.br +0 -0
  27. package/public/assets/MacResources-D8T_KpPV.js +1 -0
  28. package/public/assets/MacResources-D8T_KpPV.js.br +0 -0
  29. package/public/assets/QASession-Daup7RGP.js +140 -0
  30. package/public/assets/QASession-Daup7RGP.js.br +0 -0
  31. package/public/assets/{ResetPassword-CXU2bRry.js → ResetPassword-BnmE9MfY.js} +1 -1
  32. package/public/assets/ResetPassword-BnmE9MfY.js.br +0 -0
  33. package/public/assets/{Setup-XXChRxeL.js → Setup-I6nFcwNZ.js} +1 -1
  34. package/public/assets/Setup-I6nFcwNZ.js.br +0 -0
  35. package/public/assets/{Team-D0bXpmEY.js → Team-JhXhGt1H.js} +2 -2
  36. package/public/assets/Team-JhXhGt1H.js.br +0 -0
  37. package/public/assets/{Tokens-D0YNHS5e.js → Tokens-KAKIDZ0V.js} +1 -1
  38. package/public/assets/Tokens-KAKIDZ0V.js.br +0 -0
  39. package/public/assets/{alert-dialog-CgatMXjB.js → alert-dialog-CLhPOSdB.js} +1 -1
  40. package/public/assets/alert-dialog-CLhPOSdB.js.br +0 -0
  41. package/public/assets/{badge-B6Nf3A0Y.js → badge-CP-xbjo3.js} +1 -1
  42. package/public/assets/badge-CP-xbjo3.js.br +0 -0
  43. package/public/assets/{build-format-BFC8gLoh.js → build-format-DO1zN4vW.js} +3 -3
  44. package/public/assets/build-format-DO1zN4vW.js.br +0 -0
  45. package/public/assets/{dialog-DK9a3b4z.js → dialog-BGH9MPcH.js} +3 -3
  46. package/public/assets/dialog-BGH9MPcH.js.br +0 -0
  47. package/public/assets/index-O-Temo_p.js +198 -0
  48. package/public/assets/index-O-Temo_p.js.br +0 -0
  49. package/public/assets/{pencil-BeLNLEKe.js → pencil-0UYCdq7e.js} +2 -2
  50. package/public/assets/pencil-0UYCdq7e.js.br +0 -0
  51. package/public/assets/{table-DW57-o1p.js → table-4DnBixRm.js} +1 -1
  52. package/public/assets/table-4DnBixRm.js.br +0 -0
  53. package/public/assets/{tabs-Xlttuqxh.js → tabs-DwiCx3dV.js} +1 -1
  54. package/public/assets/tabs-DwiCx3dV.js.br +0 -0
  55. package/public/assets/{trash-2-CGxISX8x.js → trash-2-CAhMuWgg.js} +3 -3
  56. package/public/assets/trash-2-CAhMuWgg.js.br +0 -0
  57. package/public/assets/vendor-router-BFibuab1.js +12 -0
  58. package/public/assets/vendor-router-BFibuab1.js.br +0 -0
  59. package/public/index.html +2 -2
  60. package/public/index.html.br +0 -0
  61. package/public/assets/AppCenter-Dg4dscW-.js.br +0 -0
  62. package/public/assets/Default-Dxi8aZ1t.js.br +0 -0
  63. package/public/assets/Invite-0EwoClX6.js.br +0 -0
  64. package/public/assets/MacResources-Dy1M3EqK.js +0 -1
  65. package/public/assets/MacResources-Dy1M3EqK.js.br +0 -0
  66. package/public/assets/QASession-DqMj8JL1.js +0 -140
  67. package/public/assets/QASession-DqMj8JL1.js.br +0 -0
  68. package/public/assets/ResetPassword-CXU2bRry.js.br +0 -0
  69. package/public/assets/Setup-XXChRxeL.js.br +0 -0
  70. package/public/assets/Team-D0bXpmEY.js.br +0 -0
  71. package/public/assets/Tokens-D0YNHS5e.js.br +0 -0
  72. package/public/assets/alert-dialog-CgatMXjB.js.br +0 -0
  73. package/public/assets/badge-B6Nf3A0Y.js.br +0 -0
  74. package/public/assets/build-format-BFC8gLoh.js.br +0 -0
  75. package/public/assets/dialog-DK9a3b4z.js.br +0 -0
  76. package/public/assets/index-9vdYIm7s.js +0 -210
  77. package/public/assets/index-9vdYIm7s.js.br +0 -0
  78. package/public/assets/pencil-BeLNLEKe.js.br +0 -0
  79. package/public/assets/table-DW57-o1p.js.br +0 -0
  80. package/public/assets/tabs-Xlttuqxh.js.br +0 -0
  81. package/public/assets/trash-2-CGxISX8x.js.br +0 -0
  82. package/public/assets/vendor-router-ChFy8CZ1.js +0 -12
  83. package/public/assets/vendor-router-ChFy8CZ1.js.br +0 -0
@@ -1,210 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-XXChRxeL.js","assets/vendor-react-AJpf4YZ0.js","assets/vendor-router-ChFy8CZ1.js","assets/Invite-0EwoClX6.js","assets/pencil-BeLNLEKe.js","assets/ResetPassword-CXU2bRry.js","assets/AppCenter-Dg4dscW-.js","assets/build-format-BFC8gLoh.js","assets/dialog-DK9a3b4z.js","assets/trash-2-CGxISX8x.js","assets/badge-B6Nf3A0Y.js","assets/alert-dialog-CgatMXjB.js","assets/QASession-DqMj8JL1.js","assets/tabs-Xlttuqxh.js","assets/MacResources-Dy1M3EqK.js","assets/vendor-charts-DyX5CBcf.js","assets/Default-Dxi8aZ1t.js","assets/Team-D0bXpmEY.js","assets/table-DW57-o1p.js","assets/Tokens-D0YNHS5e.js","assets/NotFound-BoDDivK5.js"])))=>i.map(i=>d[i]);
2
- var Es=e=>{throw TypeError(e)};var Cs=(e,t,n)=>t.has(e)||Es("Cannot "+n);var Ve=(e,t,n)=>(Cs(e,t,"read from private field"),n?n.call(e):t.get(e)),ks=(e,t,n)=>t.has(e)?Es("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Vr=(e,t,n,r)=>(Cs(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{i as d,R,b as su,a as pn,j as f,r as ja,u as au,o as iu,s as cu,f as lu,k as uu,c as du,h as fu,l as pu,d as hu,e as mu}from"./vendor-react-AJpf4YZ0.js";import{b as zo,u as za,L as Zn,N as $a,O as gu,B as vu,a as bu,R as qe}from"./vendor-router-ChFy8CZ1.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 a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).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 yu=(e,t,n,r,o,s,a,i)=>{let l=document.documentElement,u=["light","dark"];function p(g){(Array.isArray(e)?e:[e]).forEach(b=>{let v=b==="class",y=v&&s?o.map(S=>s[S]||S):o;v?(l.classList.remove(...y),l.classList.add(s&&s[g]?s[g]:g)):l.setAttribute(b,g)}),c(g)}function c(g){i&&u.includes(g)&&(l.style.colorScheme=g)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)p(r);else try{let g=localStorage.getItem(t)||n,b=a&&g==="system"?h():g;p(b)}catch{}},Rs=["light","dark"],Fa="(prefers-color-scheme: dark)",wu=typeof window>"u",$o=d.createContext(void 0),xu={setTheme:e=>{},themes:[]},wr=()=>{var e;return(e=d.useContext($o))!=null?e:xu},_u=e=>d.useContext($o)?d.createElement(d.Fragment,null,e.children):d.createElement(Eu,{...e}),Su=["light","dark"],Eu=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=Su,defaultTheme:a=n?"system":"light",attribute:i="data-theme",value:l,children:u,nonce:p,scriptProps:c})=>{let[h,g]=d.useState(()=>ku(o,a)),[b,v]=d.useState(()=>h==="system"?Zr():h),y=l?Object.values(l):s,S=d.useCallback(C=>{let P=C;if(!P)return;C==="system"&&n&&(P=Zr());let M=l?l[P]:P,F=t?Ru(p):null,j=document.documentElement,q=X=>{X==="class"?(j.classList.remove(...y),M&&j.classList.add(M)):X.startsWith("data-")&&(M?j.setAttribute(X,M):j.removeAttribute(X))};if(Array.isArray(i)?i.forEach(q):q(i),r){let X=Rs.includes(a)?a:null,A=Rs.includes(P)?P:X;j.style.colorScheme=A}F==null||F()},[p]),x=d.useCallback(C=>{let P=typeof C=="function"?C(h):C;g(P);try{localStorage.setItem(o,P)}catch{}},[h]),k=d.useCallback(C=>{let P=Zr(C);v(P),h==="system"&&n&&!e&&S("system")},[h,e]);d.useEffect(()=>{let C=window.matchMedia(Fa);return C.addListener(k),k(C),()=>C.removeListener(k)},[k]),d.useEffect(()=>{let C=P=>{P.key===o&&(P.newValue?g(P.newValue):x(a))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[x]),d.useEffect(()=>{S(e??h)},[e,h]);let E=d.useMemo(()=>({theme:h,setTheme:x,forcedTheme:e,resolvedTheme:h==="system"?b:h,themes:n?[...s,"system"]:s,systemTheme:n?b:void 0}),[h,x,e,b,n,s]);return d.createElement($o.Provider,{value:E},d.createElement(Cu,{forcedTheme:e,storageKey:o,attribute:i,enableSystem:n,enableColorScheme:r,defaultTheme:a,value:l,themes:s,nonce:p,scriptProps:c}),u)},Cu=d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:a,themes:i,nonce:l,scriptProps:u})=>{let p=JSON.stringify([n,t,s,e,i,a,r,o]).slice(1,-1);return d.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${yu.toString()})(${p})`}})}),ku=(e,t)=>{if(wu)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Ru=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)}},Zr=e=>(e||(e=window.matchMedia(Fa)),e.matches?"dark":"light");const Pu="modulepreload",Tu=function(e){return"/"+e},Ps={},_t=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let a=function(u){return Promise.all(u.map(p=>Promise.resolve(p).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=a(n.map(u=>{if(u=Tu(u),u in Ps)return;Ps[u]=!0;const p=u.endsWith(".css"),c=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=p?"stylesheet":Pu,p||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),p)return new Promise((g,b)=>{h.addEventListener("load",g),h.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return o.then(a=>{for(const i of a||[])i.status==="rejected"&&s(i.reason);return t().catch(s)})};function Ou(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 Iu=e=>{switch(e){case"success":return Nu;case"info":return ju;case"warning":return Mu;case"error":return zu;default:return null}},Au=Array(12).fill(0),Du=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},Au.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Nu=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},R.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"})),Mu=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},R.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"})),ju=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},R.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"})),zu=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},R.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"})),$u=R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Fu=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let Lu=1;const Vu=100,Ts=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:Lu++};class Zu{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-Vu;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=Ts(t),s=this.pendingDismissals.get(o);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const a=this.dismissedToasts.has(o),i=t.dismissible===void 0?!0:t.dismissible;return a&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(u=>u.id!==o)),(a?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:i,title:n}):u):this.addToast({title:n,...r,dismissible:i,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,a;const i=o.then(async u=>{if(a=["resolve",u],R.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(Bu(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,b=typeof c=="object"&&!R.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,b=typeof c=="object"&&!R.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,b=typeof c=="object"&&!R.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...b})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const p=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!R.isValidElement(p)?p:{message:p};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,p)=>i.then(()=>a[0]==="reject"?p(a[1]):u(a[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=Ts(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 Zu,Uu=(e,t)=>Ge.message(e,t),Bu=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Wu=Uu,Hu=()=>Ge.toasts,Gu=()=>Ge.getActiveToasts(),m0=Object.assign(Wu,{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:Hu,getToasts:Gu});Ou("[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 Un(e){return e.label!==void 0}const Ku=3,Yu="24px",Ju="16px",Os=4e3,qu=356,Xu=14,Qu=45,ed=200;function yt(...e){return e.filter(Boolean).join(" ")}function td(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const nd=e=>{var t,n,r,o,s,a,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:g,setHeights:b,visibleToasts:v,heights:y,index:S,toasts:x,expanded:k,removeToast:E,defaultRichColors:C,closeButton:P,style:M,cancelButtonStyle:F,actionButtonStyle:j,className:q="",descriptionClassName:X="",duration:A,position:V,gap:U,expandByDefault:ee,classNames:W,icons:H,closeButtonAriaLabel:ce="Close toast"}=e,[re,L]=R.useState(null),[te,pe]=R.useState(null),[he,ne]=R.useState(!1),[ie,oe]=R.useState(!1),[_e,Re]=R.useState(!1),[se,Se]=R.useState(!1),[tt,ct]=R.useState(!1),[lt,ut]=R.useState(0),[Qt,Et]=R.useState(0),gt=R.useRef(c.duration||A||Os),Nt=R.useRef(null),We=R.useRef(null),Bt=S===0,Wt=S+1<=v,Ee=c.type,bn=Ee??"default",Mt=c.dismissible!==!1,$n=c.className||"",Fn=c.descriptionClassName||"",en=R.useMemo(()=>y.findIndex(Y=>Y.toastId===c.id)||0,[y,c.id]),Ln=R.useMemo(()=>{var Y;return(Y=c.closeButton)!=null?Y:P},[c.closeButton,P]),$r=R.useMemo(()=>c.duration||A||Os,[c.duration,A]),Vn=R.useRef(0),Ct=R.useRef(0),m=R.useRef(0),w=R.useRef(null),[_,O]=V.split("-"),I=R.useMemo(()=>y.reduce((Y,me,Ie)=>Ie>=en?Y:Y+me.height,0),[y,en]),z=Fu(),D=R.useMemo(()=>{var Y;return(Y=e.swipeDirections)!=null?Y:td(V)},[e.swipeDirections,V]),$=c.invert||p,Z=Ee==="loading";Ct.current=R.useMemo(()=>en*U+I,[en,I]),R.useEffect(()=>{gt.current=$r},[$r]),R.useEffect(()=>{ne(!0)},[]),R.useEffect(()=>{const Y=We.current;if(Y){const me=Y.getBoundingClientRect().height;return Et(me),b(Ie=>[{toastId:c.id,height:me,position:c.position},...Ie]),()=>b(Ie=>Ie.filter(je=>je.toastId!==c.id))}},[b,c.id]),R.useLayoutEffect(()=>{if(!he)return;const Y=We.current,me=Y.style.height;Y.style.height="auto";const Ie=Y.getBoundingClientRect().height;Y.style.height=me,Et(Ie),b(je=>je.find(ze=>ze.toastId===c.id)?je.map(ze=>ze.toastId===c.id?{...ze,height:Ie}:ze):[{toastId:c.id,height:Ie,position:c.position},...je])},[he,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const B=R.useCallback(()=>{oe(!0),ut(Ct.current),b(Y=>Y.filter(me=>me.toastId!==c.id)),setTimeout(()=>{E(c)},ed)},[c,E,b,Ct]);R.useEffect(()=>{if(c.promise&&Ee==="loading"||c.duration===1/0||c.type==="loading")return;let Y;return k||g||z?(()=>{if(m.current<Vn.current){const je=new Date().getTime()-Vn.current;gt.current=gt.current-je}m.current=new Date().getTime()})():(()=>{gt.current!==1/0&&(Vn.current=new Date().getTime(),Y=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),B()},gt.current))})(),()=>clearTimeout(Y)},[k,g,c,Ee,z,B]),R.useEffect(()=>{c.delete&&(B(),c.onDismiss==null||c.onDismiss.call(c,c))},[B,c.delete]);function ye(){var Y;if(H!=null&&H.loading){var me;return R.createElement("div",{className:yt(W==null?void 0:W.loader,c==null||(me=c.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":Ee==="loading"},H.loading)}return R.createElement(Du,{className:yt(W==null?void 0:W.loader,c==null||(Y=c.classNames)==null?void 0:Y.loader),visible:Ee==="loading"})}const He=c.icon||(H==null?void 0:H[Ee])||Iu(Ee);var nt,jt;return R.createElement("li",{tabIndex:0,ref:We,className:yt(q,$n,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W[bn],c==null||(n=c.classNames)==null?void 0:n[bn]),"data-sonner-toast":"","data-rich-colors":(nt=c.richColors)!=null?nt:C,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":he,"data-promise":!!c.promise,"data-swiped":tt,"data-removed":ie,"data-visible":Wt,"data-y-position":_,"data-x-position":O,"data-index":S,"data-front":Bt,"data-swiping":_e,"data-dismissible":Mt,"data-type":Ee,"data-invert":$,"data-swipe-out":se,"data-swipe-direction":te,"data-expanded":!!(k||ee&&he),"data-testid":c.testId,style:{"--index":S,"--toasts-before":S,"--z-index":x.length-S,"--offset":`${ie?lt:Ct.current}px`,"--initial-height":ee?"auto":`${Qt}px`,...M,...c.style},onDragEnd:()=>{Re(!1),L(null),w.current=null},onPointerDown:Y=>{Y.button!==2&&(Z||!Mt||(Nt.current=new Date,ut(Ct.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(Re(!0),w.current={x:Y.clientX,y:Y.clientY})))},onPointerUp:()=>{var Y,me,Ie;if(se||!Mt)return;w.current=null;const je=Number(((Y=We.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yn=Number(((me=We.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ze=new Date().getTime()-((Ie=Nt.current)==null?void 0:Ie.getTime()),rt=re==="x"?je:yn,vt=Math.abs(rt)/ze;if((re==="x"?D.includes(je>0?"right":"left"):D.includes(yn>0?"bottom":"top"))&&(Math.abs(rt)>=Qu||vt>.11)){ut(Ct.current),c.onDismiss==null||c.onDismiss.call(c,c),pe(re==="x"?je>0?"right":"left":yn>0?"down":"up"),B(),Se(!0);return}else{var bt,Lr;(bt=We.current)==null||bt.style.setProperty("--swipe-amount-x","0px"),(Lr=We.current)==null||Lr.style.setProperty("--swipe-amount-y","0px")}ct(!1),Re(!1),L(null)},onPointerMove:Y=>{var me,Ie,je;if(!w.current||!Mt||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const ze=Y.clientY-w.current.y,rt=Y.clientX-w.current.x;!re&&(Math.abs(rt)>1||Math.abs(ze)>1)&&L(Math.abs(rt)>Math.abs(ze)?"x":"y");let vt={x:0,y:0};const Fr=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*Fr(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")&&rt<0||D.includes("right")&&rt>0)vt.x=rt;else{const bt=rt*Fr(rt);vt.x=Math.abs(bt)<Math.abs(rt)?bt:rt}(Math.abs(vt.x)>0||Math.abs(vt.y)>0)&&ct(!0),(Ie=We.current)==null||Ie.style.setProperty("--swipe-amount-x",`${vt.x}px`),(je=We.current)==null||je.style.setProperty("--swipe-amount-y",`${vt.y}px`)}},Ln&&!c.jsx&&Ee!=="loading"?R.createElement("button",{"aria-label":ce,"data-disabled":Z,"data-close-button":!0,onClick:Z||!Mt?()=>{}:()=>{B(),c.onDismiss==null||c.onDismiss.call(c,c)},className:yt(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(jt=H==null?void 0:H.close)!=null?jt:$u):null,(Ee||c.icon||c.promise)&&c.icon!==null&&((H==null?void 0:H[Ee])!==null||c.icon)?R.createElement("div",{"data-icon":"",className:yt(W==null?void 0:W.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},Ee==="loading"?c.icon||ye():c.promise?ye():null,Ee!=="loading"?He:null):null,R.createElement("div",{"data-content":"",className:yt(W==null?void 0:W.content,c==null||(s=c.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:yt(W==null?void 0:W.title,c==null||(a=c.classNames)==null?void 0:a.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?R.createElement("div",{"data-description":"",className:yt(X,Fn,W==null?void 0:W.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),R.isValidElement(c.cancel)?c.cancel:c.cancel&&Un(c.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||F,onClick:Y=>{Un(c.cancel)&&Mt&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Y),B())},className:yt(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,R.isValidElement(c.action)?c.action:c.action&&Un(c.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:Y=>{Un(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Y),!Y.defaultPrevented&&B())},className:yt(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Is(){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 rd(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",i=s?Ju:Yu;function l(u){["top","right","bottom","left"].forEach(p=>{n[`${a}-${p}`]=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[`${a}-${u}`]=i:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const od=R.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:g,duration:b,style:v,visibleToasts:y=Ku,toastOptions:S,dir:x=Is(),gap:k=Xu,icons:E,customAriaLabel:C,containerAriaLabel:P="Notifications"}=t,[M,F]=R.useState([]),j=R.useMemo(()=>r?M.filter(ne=>ne.toasterId===r):M.filter(ne=>!ne.toasterId),[M,r]),q=R.useMemo(()=>Array.from(new Set([s].concat(j.filter(ne=>ne.position).map(ne=>ne.position)))),[j,s]),[X,A]=R.useState([]),[V,U]=R.useState(!1),[ee,W]=R.useState(!1),[H,ce]=R.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=R.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),te=R.useRef(null),pe=R.useRef(!1),he=R.useCallback(ne=>{F(ie=>{var oe;return(oe=ie.find(_e=>_e.id===ne.id))!=null&&oe.delete||Ge.dismiss(ne.id),ie.filter(({id:_e})=>_e!==ne.id)})},[]);return R.useEffect(()=>Ge.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{F(ie=>ie.map(oe=>oe.id===ne.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{su.flushSync(()=>{F(ie=>{const oe=ie.findIndex(_e=>_e.id===ne.id);return oe!==-1?[...ie.slice(0,oe),{...ie[oe],...ne},...ie.slice(oe+1)]:[ne,...ie]})})})}),[]),R.useEffect(()=>{if(h!=="system"){ce(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ce("dark"):ce("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:ie})=>{ce(ie?"dark":"light")})}catch{ne.addListener(({matches:oe})=>{try{ce(oe?"dark":"light")}catch(_e){console.error(_e)}})}},[h]),R.useEffect(()=>{M.length<=1&&U(!1)},[M]),R.useEffect(()=>{const ne=ie=>{var oe;if(a.length>0&&a.every(se=>ie[se]||ie.code===se)){var Re;U(!0),(Re=re.current)==null||Re.focus()}ie.code==="Escape"&&(document.activeElement===re.current||(oe=re.current)!=null&&oe.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[a]),R.useEffect(()=>{if(re.current)return()=>{te.current&&(te.current.focus({preventScroll:!0}),te.current=null,pe.current=!1)}},[re.current]),R.createElement("section",{ref:n,"aria-label":C??`${P} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},q.map((ne,ie)=>{var oe;const[_e,Re]=ne.split("-");return j.length?R.createElement("ol",{key:ne,dir:x==="auto"?Is():x,tabIndex:-1,ref:re,className:u,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":_e,"data-x-position":Re,style:{"--front-toast-height":`${((oe=X[0])==null?void 0:oe.height)||0}px`,"--width":`${qu}px`,"--gap":`${k}px`,...v,...rd(p,c)},onBlur:se=>{pe.current&&!se.currentTarget.contains(se.relatedTarget)&&(pe.current=!1,te.current&&(te.current.focus({preventScroll:!0}),te.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||pe.current||(pe.current=!0,te.current=se.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{ee||U(!1)},onDragEnd:()=>U(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},j.filter(se=>!se.position&&ie===0||se.position===ne).map((se,Se)=>{var tt,ct;return R.createElement(nd,{key:se.id,icons:E,index:Se,toast:se,defaultRichColors:g,duration:(tt=S==null?void 0:S.duration)!=null?tt:b,className:S==null?void 0:S.className,descriptionClassName:S==null?void 0:S.descriptionClassName,invert:o,visibleToasts:y,closeButton:(ct=S==null?void 0:S.closeButton)!=null?ct:l,interacting:ee,position:ne,style:S==null?void 0:S.style,unstyled:S==null?void 0:S.unstyled,classNames:S==null?void 0:S.classNames,cancelButtonStyle:S==null?void 0:S.cancelButtonStyle,actionButtonStyle:S==null?void 0:S.actionButtonStyle,closeButtonAriaLabel:S==null?void 0:S.closeButtonAriaLabel,removeToast:he,toasts:j.filter(lt=>lt.position==se.position),heights:X.filter(lt=>lt.position==se.position),setHeights:A,expandByDefault:i,gap:k,expanded:V,swipeDirections:t.swipeDirections})})):null}))});var sd=Object.defineProperty,Fo=(e,t)=>sd(e,"name",{value:t,configurable:!0});function oo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Fo(oo,"setRef");function La(...e){return t=>{let n=!1;const r=e.map(o=>{const s=oo(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():oo(e[o],null)}}}}Fo(La,"composeRefs");function ve(...e){return d.useCallback(La(...e),e)}Fo(ve,"useComposedRefs");var ad=Object.defineProperty,ht=(e,t)=>ad(e,"name",{value:t,configurable:!0});function Tt(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n,a=null,i=!1;const l=[];so(o)&&typeof Bn=="function"&&(o=Bn(o._payload)),d.Children.forEach(o,h=>{var g;if(Wa(h)){i=!0;const b=h;let v="child"in b.props?b.props.child:b.props.children;so(v)&&typeof Bn=="function"&&(v=Bn(v._payload)),a=id(b,v),l.push((g=a==null?void 0:a.props)==null?void 0:g.children)}else l.push(h)}),a?a=d.cloneElement(a,void 0,l):!i&&d.Children.count(o)===1&&d.isValidElement(o)&&(a=o);const u=a?Ba(a):void 0,p=ve(r,u);if(!a){if(o||o===0)throw new Error(i?ud(e):ld(e));return o}const c=Ua(s,a.props??{});return a.type!==d.Fragment&&(c.ref=r?p:u),d.cloneElement(a,c)});return t.displayName=`${e}.Slot`,t}ht(Tt,"createSlot");var hn=Tt("Slot"),Va=Symbol.for("radix.slottable");function Za(e){const t=ht(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Va,t}ht(Za,"createSlottable");var id=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 Ua(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]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}ht(Ua,"mergeProps");function Ba(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(Ba,"getElementRef");function Wa(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Va}ht(Wa,"isSlottable");var cd=Symbol.for("react.lazy");function so(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cd&&"_payload"in e&&Ha(e._payload)}ht(so,"isLazyComponent");function Ha(e){return typeof e=="object"&&e!==null&&"then"in e}ht(Ha,"isPromiseLike");var ld=ht(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ud=ht(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Bn=pn[" use ".trim().toString()];function Ga(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=Ga(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ka(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ga(e))&&(r&&(r+=" "),r+=t);return r}const As=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ds=Ka,An=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ds(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],c=s==null?void 0:s[u];if(p===null)return null;const h=As(p)||As(c);return o[u][h]}),i=n&&Object.entries(n).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:c,className:h,...g}=p;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...i}[v]):{...s,...i}[v]===y})?[...u,c,h]:u},[]);return Ds(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
3
- * @license lucide-react v1.33.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 Ya=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
8
- * @license lucide-react v1.33.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 dd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
13
- * @license lucide-react v1.33.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 fd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
18
- * @license lucide-react v1.33.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 Ns=e=>{const t=fd(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
23
- * @license lucide-react v1.33.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 Ur={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.33.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 pd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},hd=d.createContext({}),md=()=>d.useContext(hd),gd=d.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},l)=>{const{size:u=24,strokeWidth:p=2,absoluteStrokeWidth:c=!1,color:h="currentColor",className:g=""}=md()??{},b=r??c?Number(n??p)*24/Number(t??u):n??p;return d.createElement("svg",{ref:l,...Ur,width:t??u??Ur.width,height:t??u??Ur.height,stroke:e??h,strokeWidth:b,className:Ya("lucide",g,o),...!s&&!pd(i)&&{"aria-hidden":"true"},...i},[...a.map(([v,y])=>d.createElement(v,y)),...Array.isArray(s)?s:[s]])});/**
33
- * @license lucide-react v1.33.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 Je=(e,t)=>{const n=d.forwardRef(({className:r,...o},s)=>d.createElement(gd,{ref:s,iconNode:t,className:Ya(`lucide-${dd(Ns(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ns(e),n};/**
38
- * @license lucide-react v1.33.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 vd=[["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"}]],bd=Je("book-open",vd);/**
43
- * @license lucide-react v1.33.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 yd=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wd=Je("check",yd);/**
48
- * @license lucide-react v1.33.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 xd=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_d=Je("chevron-right",xd);/**
53
- * @license lucide-react v1.33.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 Sd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ed=Je("circle",Sd);/**
58
- * @license lucide-react v1.33.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 Cd=[["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"}]],kd=Je("key-round",Cd);/**
63
- * @license lucide-react v1.33.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 Rd=[["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"}]],Pd=Je("layout-grid",Rd);/**
68
- * @license lucide-react v1.33.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 Td=[["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"}]],Od=Je("log-out",Td);/**
73
- * @license lucide-react v1.33.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 Id=[["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"}]],Ad=Je("monitor",Id);/**
78
- * @license lucide-react v1.33.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 Dd=[["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"}]],Nd=Je("moon",Dd);/**
83
- * @license lucide-react v1.33.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 Md=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],jd=Je("panel-left",Md);/**
88
- * @license lucide-react v1.33.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 zd=[["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"}]],Ja=Je("settings",zd);/**
93
- * @license lucide-react v1.33.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 $d=[["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"}]],Fd=Je("sun",$d);/**
98
- * @license lucide-react v1.33.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 Ld=[["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"}]],Vd=Je("users",Ld);/**
103
- * @license lucide-react v1.33.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 Zd=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ud=Je("x",Zd),Br=768;function Bd(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Br-1}px)`),r=()=>{t(window.innerWidth<Br)};return n.addEventListener("change",r),t(window.innerWidth<Br),()=>n.removeEventListener("change",r)},[]),!!e}const Lo="-",Wd=e=>{const t=Gd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Lo);return i[0]===""&&i.length!==1&&i.shift(),qa(i,t)||Hd(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},qa=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?qa(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Lo);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},Ms=/^\[(.+)\]$/,Hd=e=>{if(Ms.test(e)){const t=Ms.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gd=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Yd(Object.entries(e.classGroups),n).forEach(([s,a])=>{ao(a,r,s,t)}),r},ao=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:js(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Kd(o)){ao(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{ao(a,js(t,s),n,r)})})},js=(e,t)=>{let n=e;return t.split(Lo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Kd=e=>e.isThemeGetter,Yd=(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(([a,i])=>[t+a,i])):s);return[n,o]}):e,Jd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Xa="!",qd=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=i=>{const l=[];let u=0,p=0,c;for(let y=0;y<i.length;y++){let S=i[y];if(u===0){if(S===o&&(r||i.slice(y,y+s)===t)){l.push(i.slice(p,y)),p=y+s;continue}if(S==="/"){c=y;continue}}S==="["?u++:S==="]"&&u--}const h=l.length===0?i:i.substring(p),g=h.startsWith(Xa),b=g?h.substring(1):h,v=c&&c>p?c-p:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:v}};return n?i=>n({className:i,parseClassName:a}):a},Xd=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},Qd=e=>({cache:Jd(e.cacheSize),parseClassName:qd(e),...Wd(e)}),ef=/\s+/,tf=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(ef);let i="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:p,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:g}=n(u);let b=!!g,v=r(b?h.substring(0,g):h);if(!v){if(!b){i=u+(i.length>0?" "+i:i);continue}if(v=r(h),!v){i=u+(i.length>0?" "+i:i);continue}b=!1}const y=Xd(p).join(":"),S=c?y+Xa:y,x=S+v;if(s.includes(x))continue;s.push(x);const k=o(v,b);for(let E=0;E<k.length;++E){const C=k[E];s.push(S+C)}i=u+(i.length>0?" "+i:i)}return i};function nf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qa(t))&&(r&&(r+=" "),r+=n);return r}const Qa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qa(e[r]))&&(n&&(n+=" "),n+=t);return n};function rf(e,...t){let n,r,o,s=a;function a(l){const u=t.reduce((p,c)=>c(p),e());return n=Qd(u),r=n.cache.get,o=n.cache.set,s=i,i(l)}function i(l){const u=r(l);if(u)return u;const p=tf(l,n);return o(l,p),p}return function(){return s(nf.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ei=/^\[(?:([a-z-]+):)?(.+)\]$/i,of=/^\d+\/\d+$/,sf=new Set(["px","full","screen"]),af=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cf=/\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$/,lf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,df=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>cn(e)||sf.has(e)||of.test(e),zt=e=>mn(e,"length",yf),cn=e=>!!e&&!Number.isNaN(Number(e)),Wr=e=>mn(e,"number",cn),wn=e=>!!e&&Number.isInteger(Number(e)),ff=e=>e.endsWith("%")&&cn(e.slice(0,-1)),Q=e=>ei.test(e),$t=e=>af.test(e),pf=new Set(["length","size","percentage"]),hf=e=>mn(e,pf,ti),mf=e=>mn(e,"position",ti),gf=new Set(["image","url"]),vf=e=>mn(e,gf,xf),bf=e=>mn(e,"",wf),xn=()=>!0,mn=(e,t,n)=>{const r=ei.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yf=e=>cf.test(e)&&!lf.test(e),ti=()=>!1,wf=e=>uf.test(e),xf=e=>df.test(e),_f=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),o=de("borderColor"),s=de("borderRadius"),a=de("borderSpacing"),i=de("borderWidth"),l=de("contrast"),u=de("grayscale"),p=de("hueRotate"),c=de("invert"),h=de("gap"),g=de("gradientColorStops"),b=de("gradientColorStopPositions"),v=de("inset"),y=de("margin"),S=de("opacity"),x=de("padding"),k=de("saturate"),E=de("scale"),C=de("sepia"),P=de("skew"),M=de("space"),F=de("translate"),j=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Q,t],A=()=>[Q,t],V=()=>["",kt,zt],U=()=>["auto",cn,Q],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Q],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[cn,Q];return{cacheSize:500,separator:":",theme:{colors:[xn],spacing:[kt,zt],blur:["none","",$t,Q],brightness:te(),borderColor:[e],borderRadius:["none","","full",$t,Q],borderSpacing:A(),borderWidth:V(),contrast:te(),grayscale:re(),hueRotate:te(),invert:re(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ff,zt],inset:X(),margin:X(),opacity:te(),padding:A(),saturate:te(),scale:te(),sepia:re(),skew:te(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[$t]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...ee(),Q]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],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",wn,Q]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",wn,Q]}],"grid-cols":[{"grid-cols":[xn]}],"col-start-end":[{col:["auto",{span:["full",wn,Q]},Q]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[xn]}],"row-start-end":[{row:["auto",{span:[wn,Q]},Q]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[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":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[$t]},$t]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,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",Wr]}],"font-family":[{font:[xn]}],"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",Q]}],"line-clamp":[{"line-clamp":["none",cn,Wr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kt,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kt,zt]}],"underline-offset":[{"underline-offset":["auto",kt,Q]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),mf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[kt,Q]}],"outline-w":[{outline:[kt,zt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[kt,zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$t,bf]}],"shadow-color":[{shadow:[xn]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",$t,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],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":[p]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[wn,Q]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],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",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kt,zt,Wr]}],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"]}}},Sf=rf(_f);function G(...e){return Sf(Ka(e))}const Ef=An("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"}}),xr=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const a=r?hn:"button";return f.jsx(a,{className:G(Ef({variant:t,size:n,className:e})),ref:s,...o})});xr.displayName="Button";const fr=d.forwardRef(({className:e,type:t,...n},r)=>f.jsx("input",{type:t,className:G("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}));fr.displayName="Input";var Cf=Object.defineProperty,kf=(e,t)=>Cf(e,"name",{value:t,configurable:!0}),Rf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=Rf.reduce((e,t)=>{const n=Tt(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vo(e,t){e&&ja.flushSync(()=>e.dispatchEvent(t))}kf(Vo,"dispatchDiscreteCustomEvent");var Pf=Object.defineProperty,ni=(e,t)=>Pf(e,"name",{value:t,configurable:!0}),zs="horizontal",Tf=["horizontal","vertical"],Of=d.forwardRef(ni(function(t,n){const{decorative:r,orientation:o=zs,...s}=t,a=ri(o)?o:zs,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return f.jsx(ke.div,{"data-orientation":a,...l,...s,ref:n})},"Separator"));function ri(e){return Tf.includes(e)}ni(ri,"isValidOrientation");var oi=Of;const pr=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>f.jsx(oi,{ref:o,decorative:n,orientation:t,className:G("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));pr.displayName=oi.displayName;var If=Object.defineProperty,gn=(e,t)=>If(e,"name",{value:t,configurable:!0}),si=!!(typeof window<"u"&&window.document&&window.document.createElement);function J(e,t,{checkForDefaultPrevented:n=!0}={}){return gn(function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)},"handleEvent")}gn(J,"composeEventHandlers");function Af(e){var t;if(!si)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}gn(Af,"getOwnerWindow");function io(e){if(!si)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}gn(io,"getOwnerDocument");function ai(e,t=!1){const{activeElement:n}=io(e);if(!(n!=null&&n.nodeName))return null;if(ii(n)&&n.contentDocument)return ai(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=io(n).getElementById(r);if(o)return o}}return n}gn(ai,"getActiveElement");function ii(e){return e.tagName==="IFRAME"}gn(ii,"isFrame");var Df=Object.defineProperty,ot=(e,t)=>Df(e,"name",{value:t,configurable:!0});function Nf(e,t){const n=d.createContext(t);n.displayName=e+"Context";const r=ot(s=>{const{children:a,...i}=s,l=d.useMemo(()=>i,Object.values(i));return f.jsx(n.Provider,{value:l,children:a})},"Provider");r.displayName=e+"Provider";function o(s,a={}){const{optional:i=!1}=a,l=d.useContext(n);if(l)return l;if(t!==void 0)return t;if(!i)throw new Error(`\`${s}\` must be used within \`${e}\``)}return ot(o,"useContext"),[r,o]}ot(Nf,"createContext");function At(e,t=[]){let n=[];function r(s,a){const i=d.createContext(a);i.displayName=s+"Context";const l=n.length;n=[...n,a];const u=ot(c=>{var S;const{scope:h,children:g,...b}=c,v=((S=h==null?void 0:h[e])==null?void 0:S[l])||i,y=d.useMemo(()=>b,Object.values(b));return f.jsx(v.Provider,{value:y,children:g})},"Provider");u.displayName=s+"Provider";function p(c,h,g={}){var S;const{optional:b=!1}=g,v=((S=h==null?void 0:h[e])==null?void 0:S[l])||i,y=d.useContext(v);if(y)return y;if(a!==void 0)return a;if(!b)throw new Error(`\`${c}\` must be used within \`${s}\``)}return ot(p,"useContext"),[u,p]}ot(r,"createContext");const o=ot(()=>{const s=n.map(a=>d.createContext(a));return ot(function(i){const l=(i==null?void 0:i[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])},"useScope")},"createScope");return o.scopeName=e,[r,ci(o,...t)]}ot(At,"createContextScope");function ci(...e){const t=e[0];if(e.length===1)return t;const n=ot(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return ot(function(s){const a=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...i,...c}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}ot(ci,"composeContextScopes");var Ye=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Mf=Object.defineProperty,jf=(e,t)=>Mf(e,"name",{value:t,configurable:!0}),zf=pn[" useId ".trim().toString()]||(()=>{}),$f=0;function Lt(e){const[t,n]=d.useState(zf());return Ye(()=>{e||n(r=>r??String($f++))},[e]),e||(t?`radix-${t}`:"")}jf(Lt,"useId");var Ff=Object.defineProperty,Lf=(e,t)=>Ff(e,"name",{value:t,configurable:!0}),$s=pn[" useEffectEvent ".trim().toString()],Fs=pn[" useInsertionEffect ".trim().toString()];function li(e){if(typeof $s=="function")return $s(e);const t=d.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Fs=="function"?Fs(()=>{t.current=e}):Ye(()=>{t.current=e}),d.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}Lf(li,"useEffectEvent");var Vf=Object.defineProperty,Dn=(e,t)=>Vf(e,"name",{value:t,configurable:!0}),Zf=pn[" useInsertionEffect ".trim().toString()]||Ye;function Nn({prop:e,defaultProp:t,onChange:n=Dn(()=>{},"onChange"),caller:r}){const[o,s,a]=ui({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o,u=d.useCallback(p=>{var c;if(i){const h=di(p)?p(e):p;h!==e&&((c=a.current)==null||c.call(a,h))}else s(p)},[i,e,s,a]);return[l,u]}Dn(Nn,"useControllableState");function ui({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return Zf(()=>{s.current=t},[t]),d.useEffect(()=>{var a;o.current!==n&&((a=s.current)==null||a.call(s,n),o.current=n)},[n,o]),[n,r,s]}Dn(ui,"useUncontrolledState");function di(e){return typeof e=="function"}Dn(di,"isFunction");var Ls=Symbol("RADIX:SYNC_STATE");function Uf(e,t,n,r){const{prop:o,defaultProp:s,onChange:a,caller:i}=t,l=o!==void 0,u=li(a),p=[{...n,state:s}];r&&p.push(r);const[c,h]=d.useReducer((y,S)=>{if(S.type===Ls)return{...y,state:S.state};const x=e(y,S);return l&&!Object.is(x.state,y.state)&&u(x.state),x},...p),g=c.state,b=d.useRef(g);d.useEffect(()=>{b.current!==g&&(b.current=g,l||u(g))},[g,b,l]);const v=d.useMemo(()=>o!==void 0?{...c,state:o}:c,[c,o]);return d.useEffect(()=>{l&&!Object.is(o,c.state)&&h({type:Ls,state:o})},[o,c.state,l]),[v,h]}Dn(Uf,"useControllableStateReducer");var Bf=Object.defineProperty,Wf=(e,t)=>Bf(e,"name",{value:t,configurable:!0});function Ot(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)}),[])}Wf(Ot,"useCallbackRef");var Hf=Object.defineProperty,De=(e,t)=>Hf(e,"name",{value:t,configurable:!0}),co="dismissableLayer.update",Gf="dismissableLayer.pointerDownOutside",Kf="dismissableLayer.focusOutside",Vs,fi=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Zo=d.forwardRef(De(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...p}=t,c=d.useContext(fi),[h,g]=d.useState(null),b=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=d.useState({}),y=ve(n,g),S=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),k=x?S.indexOf(x):-1,E=h?S.indexOf(h):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,P=E>=k,M=d.useRef(!1),F=hi(A=>{a==null||a(A),l==null||l(A),A.defaultPrevented||u==null||u()},{ownerDocument:b,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback(A=>{if(!(A instanceof Node))return!1;const V=[...c.branches].some(U=>U.contains(A));return P&&!V},[c.branches,P])}),j=mi(A=>{if(o&&M.current)return;const V=A.target;[...c.branches].some(ee=>ee.contains(V))||(i==null||i(A),l==null||l(A),A.defaultPrevented||u==null||u())},b),q=h?E===S.length-1:!1,X=Ot(A=>{A.key==="Escape"&&(s==null||s(A),!A.defaultPrevented&&u&&(A.preventDefault(),u()))});return d.useEffect(()=>{if(q)return b.addEventListener("keydown",X,{capture:!0}),()=>b.removeEventListener("keydown",X,{capture:!0})},[b,q,X]),d.useEffect(()=>{if(h)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Vs=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),lo(),()=>{r&&(c.layersWithOutsidePointerEventsDisabled.delete(h),c.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=Vs))}},[h,b,r,c]),d.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),lo())},[h,c]),d.useEffect(()=>{const A=De(()=>v({}),"handleUpdate");return document.addEventListener(co,A),()=>document.removeEventListener(co,A)},[]),f.jsx(ke.div,{...p,ref:y,style:{pointerEvents:C?P?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,j.onFocusCapture),onBlurCapture:J(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,F.onPointerDownCapture)})},"DismissableLayer"));function pi(){const e=d.useContext(fi),[t,n]=d.useState(null);return d.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}De(pi,"useDismissableLayerSurface");var Yf=De(()=>!0,"IS_TRUE");function hi(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=Yf}=t,i=Ot(e),l=d.useRef(!1),u=d.useRef(!1),p=d.useRef(new Map),c=d.useRef(()=>{});return d.useEffect(()=>{function h(){u.current=!1,o.current=!1,p.current.clear()}De(h,"resetOutsideInteraction");function g(){return Array.from(p.current.values()).some(Boolean)}De(g,"isOutsideInteractionIntercepted");function b(k){if(!u.current)return;const E=k.target;E instanceof Node&&[...s].some(P=>P.contains(E))||p.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{u.current&&c.current()},0)}De(b,"handleInteractionCapture");function v(k){u.current&&p.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 P=g();h(),P||Uo(Gf,i,C,{discrete:!0})};if(De(E,"handleAndDispatchPointerDownOutsideEvent"),!a(k.target)){n.removeEventListener("click",c.current),h(),l.current=!1;return}const C={originalEvent:k};u.current=!0,o.current=r&&k.button===0,p.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),h();l.current=!1},"handlePointerDown"),S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of S)n.addEventListener(k,b,!0),n.addEventListener(k,v);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",y),n.removeEventListener("click",c.current);for(const k of S)n.removeEventListener(k,b,!0),n.removeEventListener(k,v)}},[n,i,r,o,s,a]),{onPointerDownCapture:De(()=>l.current=!0,"onPointerDownCapture")}}De(hi,"usePointerDownOutside");function mi(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=d.useRef(!1);return d.useEffect(()=>{const o=De(s=>{s.target&&!r.current&&Uo(Kf,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(mi,"useFocusOutside");function lo(){const e=new CustomEvent(co);document.dispatchEvent(e)}De(lo,"dispatchUpdate");function Uo(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?Vo(o,s):o.dispatchEvent(s)}De(Uo,"handleAndDispatchCustomEvent");var Jf=Object.defineProperty,Be=(e,t)=>Jf(e,"name",{value:t,configurable:!0}),Hr="focusScope.autoFocusOnMount",Gr="focusScope.autoFocusOnUnmount",Zs={bubbles:!1,cancelable:!0},gi=d.forwardRef(Be(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=t,[l,u]=d.useState(null),p=Ot(s),c=Ot(a),h=d.useRef(null),g=ve(n,u),b=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(o){let y=function(E){if(b.paused||!l)return;const C=E.target;l.contains(C)?h.current=C:Rt(h.current,{select:!0})},S=function(E){if(b.paused||!l)return;const C=E.relatedTarget;C!==null&&(l.contains(C)||Rt(h.current,{select:!0}))},x=function(E){if(document.activeElement===document.body)for(const P of E)P.removedNodes.length>0&&Rt(l)};Be(y,"handleFocusIn"),Be(S,"handleFocusOut"),Be(x,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",S);const k=new MutationObserver(x);return l&&k.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),k.disconnect()}}},[o,l,b.paused]),d.useEffect(()=>{if(l){Us.add(b);const y=document.activeElement;if(!l.contains(y)){const x=new CustomEvent(Hr,Zs);l.addEventListener(Hr,p),l.dispatchEvent(x),x.defaultPrevented||(vi(_i(Bo(l)),{select:!0}),document.activeElement===y&&Rt(l))}return()=>{l.removeEventListener(Hr,p),setTimeout(()=>{const x=new CustomEvent(Gr,Zs);l.addEventListener(Gr,c),l.dispatchEvent(x),x.defaultPrevented||Rt(y??document.body,{select:!0}),l.removeEventListener(Gr,c),Us.remove(b)},0)}}},[l,p,c,b]);const v=d.useCallback(y=>{if(!r&&!o||b.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,x=document.activeElement;if(S&&x){const k=y.currentTarget,[E,C]=bi(k);E&&C?!y.shiftKey&&x===C?(y.preventDefault(),r&&Rt(E,{select:!0})):y.shiftKey&&x===E&&(y.preventDefault(),r&&Rt(C,{select:!0})):x===k&&y.preventDefault()}},[r,o,b.paused]);return f.jsx(ke.div,{tabIndex:-1,...i,ref:g,onKeyDown:v})},"FocusScope"));function vi(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rt(r,{select:t}),document.activeElement!==n)return}Be(vi,"focusFirst");function bi(e){const t=Bo(e),n=uo(t,e),r=uo(t.reverse(),e);return[n,r]}Be(bi,"getTabbableEdges");function Bo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Be(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}Be(Bo,"getTabbableCandidates");function uo(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):yi(r,{upTo:t})))return r}Be(uo,"findVisible");function yi(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}Be(yi,"isHidden");function wi(e){return e instanceof HTMLInputElement&&"select"in e}Be(wi,"isSelectableInput");function Rt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wi(e)&&t&&e.select()}}Be(Rt,"focus");var Us=xi();function xi(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fo(e,t),e.unshift(t)},remove(t){var n;e=fo(e,t),(n=e[0])==null||n.resume()}}}Be(xi,"createFocusScopesStack");function fo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Be(fo,"arrayRemove");function _i(e){return e.filter(t=>t.tagName!=="A")}Be(_i,"removeLinks");var qf=Object.defineProperty,Xf=(e,t)=>qf(e,"name",{value:t,configurable:!0}),Wo=d.forwardRef(Xf(function(t,n){var l;const{container:r,...o}=t,[s,a]=d.useState(!1);Ye(()=>a(!0),[]);const i=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?ja.createPortal(f.jsx(ke.div,{...o,ref:n}),i):null},"Portal")),Qf=Object.defineProperty,It=(e,t)=>Qf(e,"name",{value:t,configurable:!0});function Si(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}It(Si,"useStateMachine");var Dt=It(e=>{const{present:t,children:n}=e,r=Ei(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=Ci(r.ref,ki(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence");function Ei(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),a=d.useRef(void 0),i=e?"mounted":"unmounted",[l,u]=Si(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{l==="mounted"?(s.current=a.current??sn(r.current),a.current=void 0):s.current="none"},[l]),Ye(()=>{const p=r.current,c=o.current;if(c!==e){const g=s.current,b=sn(p);e?(a.current=b,u("MOUNT")):b==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(c&&g!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ye(()=>{if(t){let p;const c=t.ownerDocument.defaultView??window,h=It(b=>{const y=sn(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&y&&(u("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",p=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},"handleAnimationEnd"),g=It(b=>{b.target===t&&(s.current=sn(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{c.clearTimeout(p),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(p=>{if(p){const c=getComputedStyle(p);r.current=c,a.current=sn(c)}else r.current=null;n(p)},[])}}It(Ei,"usePresence");function po(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}It(po,"setRef");function Ci(...e){const t=d.useRef(e);return t.current=e,d.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(a=>{const i=po(a,n);return!o&&typeof i=="function"&&(o=!0),i});if(o)return()=>{for(let a=0;a<s.length;a++){const i=s[a];typeof i=="function"?i():po(r[a],null)}}},[])}It(Ci,"useStableComposedRefs");function sn(e){return(e==null?void 0:e.animationName)||"none"}It(sn,"getAnimationName");function ki(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)}It(ki,"getElementRef");var ep=Object.defineProperty,Ho=(e,t)=>ep(e,"name",{value:t,configurable:!0}),Wn=0,wt=null;function tp(e){return _r(),e.children}Ho(tp,"FocusGuards");function _r(){d.useEffect(()=>{wt||(wt={start:ho(),end:ho()});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),Wn++,()=>{Wn===1&&(wt==null||wt.start.remove(),wt==null||wt.end.remove(),wt=null),Wn=Math.max(0,Wn-1)}},[])}Ho(_r,"useFocusGuards");function ho(){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}Ho(ho,"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 Ri(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 np(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 rr="right-scroll-bar-position",or="width-before-scroll-bar",rp="with-scroll-bars-hidden",op="--removed-body-scroll-bar-size";function Kr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sp(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 ap=typeof window<"u"?d.useLayoutEffect:d.useEffect,Bs=new WeakMap;function ip(e,t){var n=sp(null,function(r){return e.forEach(function(o){return Kr(o,r)})});return ap(function(){var r=Bs.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||Kr(i,null)}),s.forEach(function(i){o.has(i)||Kr(i,a)})}Bs.set(n,e)},[e]),n}function cp(e){return e}function lp(e,t){t===void 0&&(t=cp);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 a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var l=function(){var p=a;a=[],p.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return o}function up(e){e===void 0&&(e={});var t=lp(null);return t.options=xt({async:!0,ssr:!1},e),t}var Pi=function(e){var t=e.sideCar,n=Ri(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))};Pi.isSideCarExport=!0;function dp(e,t){return e.useMedium(t),Pi}var Ti=up(),Yr=function(){},Sr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Yr,onWheelCapture:Yr,onTouchMoveCapture:Yr}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,g=e.noRelative,b=e.noIsolation,v=e.inert,y=e.allowPinchZoom,S=e.as,x=S===void 0?"div":S,k=e.gapMode,E=Ri(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,P=ip([n,t]),M=xt(xt({},E),o);return d.createElement(d.Fragment,null,p&&d.createElement(C,{sideCar:Ti,removeScrollBar:u,shards:c,noRelative:g,noIsolation:b,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:k}),a?d.cloneElement(d.Children.only(i),xt(xt({},M),{ref:P})):d.createElement(x,xt({},M,{className:l,ref:P}),i))});Sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sr.classNames={fullWidth:or,zeroRight:rr};var fp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fp();return t&&e.setAttribute("nonce",t),e}function hp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pp())&&(hp(t,n),mp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vp=function(){var e=gp();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Oi=function(){var e=vp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bp={left:0,top:0,right:0,gap:0},Jr=function(e){return parseInt(e||"",10)||0},yp=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[Jr(n),Jr(r),Jr(o)]},wp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bp;var t=yp(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])}},xp=Oi(),ln="data-scroll-locked",_p=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
108
- .`.concat(rp,` {
109
- overflow: hidden `).concat(r,`;
110
- padding-right: `).concat(i,"px ").concat(r,`;
111
- }
112
- body[`).concat(ln,`] {
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(a,`px;
119
- margin-left:0;
120
- margin-top:0;
121
- margin-right: `).concat(i,"px ").concat(r,`;
122
- `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
123
- }
124
-
125
- .`).concat(rr,` {
126
- right: `).concat(i,"px ").concat(r,`;
127
- }
128
-
129
- .`).concat(or,` {
130
- margin-right: `).concat(i,"px ").concat(r,`;
131
- }
132
-
133
- .`).concat(rr," .").concat(rr,` {
134
- right: 0 `).concat(r,`;
135
- }
136
-
137
- .`).concat(or," .").concat(or,` {
138
- margin-right: 0 `).concat(r,`;
139
- }
140
-
141
- body[`).concat(ln,`] {
142
- `).concat(op,": ").concat(i,`px;
143
- }
144
- `)},Ws=function(){var e=parseInt(document.body.getAttribute(ln)||"0",10);return isFinite(e)?e:0},Sp=function(){d.useEffect(function(){return document.body.setAttribute(ln,(Ws()+1).toString()),function(){var e=Ws()-1;e<=0?document.body.removeAttribute(ln):document.body.setAttribute(ln,e.toString())}},[])},Ep=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Sp();var s=d.useMemo(function(){return wp(o)},[o]);return d.createElement(xp,{styles:_p(s,!t,o,n?"":"!important")})},mo=!1;if(typeof window<"u")try{var Hn=Object.defineProperty({},"passive",{get:function(){return mo=!0,!0}});window.addEventListener("test",Hn,Hn),window.removeEventListener("test",Hn,Hn)}catch{mo=!1}var tn=mo?{passive:!1}:!1,Cp=function(e){return e.tagName==="TEXTAREA"},Ii=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Cp(e)&&n[t]==="visible")},kp=function(e){return Ii(e,"overflowY")},Rp=function(e){return Ii(e,"overflowX")},Hs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ai(e,r);if(o){var s=Di(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Pp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Tp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ai=function(e,t){return e==="v"?kp(t):Rp(t)},Di=function(e,t){return e==="v"?Pp(t):Tp(t)},Op=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ip=function(e,t,n,r,o){var s=Op(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,l=t.contains(i),u=!1,p=a>0,c=0,h=0;do{if(!i)break;var g=Di(e,i),b=g[0],v=g[1],y=g[2],S=v-y-s*b;(b||S)&&Ai(e,i)&&(c+=S,h+=b);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(c)<1||!p&&Math.abs(h)<1)&&(u=!0),u},Gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gs=function(e){return[e.deltaX,e.deltaY]},Ks=function(e){return e&&"current"in e?e.current:e},Ap=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Dp=function(e){return`
145
- .block-interactivity-`.concat(e,` {pointer-events: none;}
146
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
147
- `)},Np=0,nn=[];function Mp(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Np++)[0],s=d.useState(Oi)[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=np([e.lockRef.current],(e.shards||[]).map(Ks),!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 i=d.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var S=Gn(v),x=n.current,k="deltaX"in v?v.deltaX:x[0]-S[0],E="deltaY"in v?v.deltaY:x[1]-S[1],C,P=v.target,M=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in v&&M==="h"&&P.type==="range")return!1;var F=window.getSelection(),j=F&&F.anchorNode,q=j?j===P||j.contains(P):!1;if(q)return!1;var X=Hs(M,P);if(!X)return!0;if(X?C=M:(C=M==="v"?"h":"v",X=Hs(M,P)),!X)return!1;if(!r.current&&"changedTouches"in v&&(k||E)&&(r.current=C),!C)return!0;var A=r.current||C;return Ip(A,y,v,A==="h"?k:E)},[]),l=d.useCallback(function(v){var y=v;if(!(!nn.length||nn[nn.length-1]!==s)){var S="deltaY"in y?Gs(y):Gn(y),x=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&Ap(C.delta,S)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var k=(a.current.shards||[]).map(Ks).filter(Boolean).filter(function(C){return C.contains(y.target)}),E=k.length>0?i(y,k[0]):!a.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),u=d.useCallback(function(v,y,S,x){var k={name:v,delta:y,target:S,should:x,shadowParent:jp(S)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(E){return E!==k})},1)},[]),p=d.useCallback(function(v){n.current=Gn(v),r.current=void 0},[]),c=d.useCallback(function(v){u(v.type,Gs(v),v.target,i(v,e.lockRef.current))},[]),h=d.useCallback(function(v){u(v.type,Gn(v),v.target,i(v,e.lockRef.current))},[]);d.useEffect(function(){return nn.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,tn),document.addEventListener("touchmove",l,tn),document.addEventListener("touchstart",p,tn),function(){nn=nn.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,tn),document.removeEventListener("touchmove",l,tn),document.removeEventListener("touchstart",p,tn)}},[]);var g=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(s,{styles:Dp(o)}):null,g?d.createElement(Ep,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function jp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zp=dp(Ti,Mp);var Go=d.forwardRef(function(e,t){return d.createElement(Sr,xt({},e,{ref:t,sideCar:zp}))});Go.classNames=Sr.classNames;var $p=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rn=new WeakMap,Kn=new WeakMap,Yn={},qr=0,Ni=function(e){return e&&(e.host||Ni(e.parentNode))},Fp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ni(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})},Lp=function(e,t,n,r){var o=Fp(t,Array.isArray(e)?e:[e]);Yn[n]||(Yn[n]=new WeakMap);var s=Yn[n],a=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))p(h);else try{var g=h.getAttribute(r),b=g!==null&&g!=="false",v=(rn.get(h)||0)+1,y=(s.get(h)||0)+1;rn.set(h,v),s.set(h,y),a.push(h),v===1&&b&&Kn.set(h,!0),y===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",h,S)}})};return p(t),i.clear(),qr++,function(){a.forEach(function(c){var h=rn.get(c)-1,g=s.get(c)-1;rn.set(c,h),s.set(c,g),h||(Kn.has(c)||c.removeAttribute(r),Kn.delete(c)),g||c.removeAttribute(n)}),qr--,qr||(rn=new WeakMap,rn=new WeakMap,Kn=new WeakMap,Yn={})}},Mi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=$p(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Lp(r,o,n,"aria-hidden")):function(){return null}},Vp=Object.defineProperty,et=(e,t)=>Vp(e,"name",{value:t,configurable:!0}),Ko="Dialog",[ji,g0]=At(Ko),[Zp,mt]=ji(Ko),Up=et(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=d.useRef(null),l=d.useRef(null),[u,p]=Nn({prop:r,defaultProp:o??!1,onChange:s,caller:Ko}),[c,h]=d.useState(0),[g,b]=d.useState(0);return f.jsx(Zp,{scope:t,triggerRef:i,contentRef:l,contentId:Lt(),titleId:Lt(),descriptionId:Lt(),titlePresent:c>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:b,open:u,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(v=>!v),[p]),modal:a,children:n})},"Dialog"),Bp="DialogTrigger",v0=d.forwardRef(et(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Bp,r),a=ve(n,s.triggerRef);return f.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Er(s.open),...o,ref:a,onClick:J(t.onClick,s.onOpenToggle)})},"DialogTrigger")),zi="DialogPortal",[Wp,$i]=ji(zi,{forceMount:void 0}),Hp=et(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=mt(zi,t);return f.jsx(Wp,{scope:t,forceMount:n,children:d.Children.map(r,a=>f.jsx(Dt,{present:n||s.open,children:f.jsx(Wo,{asChild:!0,container:o,children:a})}))})},"DialogPortal"),go="DialogOverlay",Fi=d.forwardRef(et(function(t,n){const r=$i(go,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,a=mt(go,t.__scopeDialog);return a.modal?f.jsx(Dt,{present:o||a.open,children:f.jsx(Kp,{...s,ref:n})}):null},"DialogOverlay")),Gp=Tt("DialogOverlay.RemoveScroll"),Kp=d.forwardRef(et(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(go,r),a=pi(),i=ve(n,a);return f.jsx(Go,{as:Gp,allowPinchZoom:!0,shards:[s.contentRef],children:f.jsx(ke.div,{"data-state":Er(s.open),...o,ref:i,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Cn="DialogContent",Li=d.forwardRef(et(function(t,n){const r=$i(Cn,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,a=mt(Cn,t.__scopeDialog);return f.jsx(Dt,{present:o||a.open,children:a.modal?f.jsx(Yp,{...s,ref:n}):f.jsx(Jp,{...s,ref:n})})},"DialogContent")),Yp=d.forwardRef(et(function(t,n){const r=mt(Cn,t.__scopeDialog),o=d.useRef(null),s=ve(n,r.contentRef,o);return d.useEffect(()=>{const a=o.current;if(a)return Mi(a)},[]),f.jsx(Vi,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:J(t.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&a.preventDefault()}),onFocusOutside:J(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),Jp=d.forwardRef(et(function(t,n){const r=mt(Cn,t.__scopeDialog),o=d.useRef(!1),s=d.useRef(!1);return f.jsx(Vi,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,l;(i=t.onCloseAutoFocus)==null||i.call(t,a),a.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:a=>{var u,p;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=a.target;((p=r.triggerRef.current)==null?void 0:p.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"DialogContentNonModal")),Vi=d.forwardRef(et(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,...i}=t,l=mt(Cn,r);return _r(),f.jsx(f.Fragment,{children:f.jsx(gi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:a,children:f.jsx(Zo,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Er(l.open),...i,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),qp="DialogTitle",Zi=d.forwardRef(et(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(qp,r),{setTitleCount:a}=s;return Ye(()=>(a(i=>i+1),()=>a(i=>i-1)),[a]),f.jsx(ke.h2,{id:s.titleId,...o,ref:n})},"DialogTitle")),Xp="DialogDescription",Ui=d.forwardRef(et(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Xp,r),{setDescriptionCount:a}=s;return Ye(()=>(a(i=>i+1),()=>a(i=>i-1)),[a]),f.jsx(ke.p,{id:s.descriptionId,...o,ref:n})},"DialogDescription")),Qp="DialogClose",eh=d.forwardRef(et(function(t,n){const{__scopeDialog:r,...o}=t,s=mt(Qp,r);return f.jsx(ke.button,{type:"button",...o,ref:n,onClick:J(t.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function Er(e){return e?"open":"closed"}et(Er,"getState");const th=Up,nh=Hp,Bi=d.forwardRef(({className:e,...t},n)=>f.jsx(Fi,{className:G("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}));Bi.displayName=Fi.displayName;const rh=An("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"}}),Wi=d.forwardRef(({side:e="right",className:t,children:n,...r},o)=>f.jsxs(nh,{children:[f.jsx(Bi,{}),f.jsxs(Li,{ref:o,className:G(rh({side:e}),t),...r,children:[n,f.jsxs(eh,{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:[f.jsx(Ud,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Wi.displayName=Li.displayName;const Hi=({className:e,...t})=>f.jsx("div",{className:G("flex flex-col space-y-2 text-center sm:text-left",e),...t});Hi.displayName="SheetHeader";const Gi=d.forwardRef(({className:e,...t},n)=>f.jsx(Zi,{ref:n,className:G("text-lg font-semibold text-foreground",e),...t}));Gi.displayName=Zi.displayName;const Ki=d.forwardRef(({className:e,...t},n)=>f.jsx(Ui,{ref:n,className:G("text-sm text-muted-foreground",e),...t}));Ki.displayName=Ui.displayName;function Ys({className:e,...t}){return f.jsx("div",{className:G("animate-pulse rounded-md bg-muted",e),...t})}var oh=Object.defineProperty,sh=(e,t)=>oh(e,"name",{value:t,configurable:!0});function Yi(e){const[t,n]=d.useState(void 0);return Ye(()=>{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 a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}sh(Yi,"useSize");var ah=Object.defineProperty,Vt=(e,t)=>ah(e,"name",{value:t,configurable:!0}),Ji="Popper",[qi,Cr]=At(Ji),[ih,Xi]=qi(Ji),ch=Vt(e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null),[s,a]=d.useState(void 0);return f.jsx(ih,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:a,children:n})},"Popper"),lh="PopperAnchor",uh=d.forwardRef(Vt(function(t,n){const{__scopePopper:r,virtualRef:o,...s}=t,a=Xi(lh,r),i=d.useRef(null),l=a.onAnchorChange,u=d.useCallback(v=>{i.current=v,v&&l(v)},[l]),p=ve(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 h=a.placementState&&kr(a.placementState),g=h==null?void 0:h[0],b=h==null?void 0:h[1];return o?null:f.jsx(ke.div,{"data-radix-popper-side":g,"data-radix-popper-align":b,...s,ref:p})},"PopperAnchor")),Qi="PopperContent",[dh,b0]=qi(Qi),fh=d.forwardRef(Vt(function(t,n){var se,Se,tt,ct,lt,ut,Qt;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:c=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:b="optimized",onPlaced:v,...y}=t,S=Xi(Qi,r),[x,k]=d.useState(null),E=ve(n,k),[C,P]=d.useState(null),M=Yi(C),F=(M==null?void 0:M.width)??0,j=(M==null?void 0:M.height)??0,q=o+(a!=="center"?"-"+a:""),X=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},A=Array.isArray(p)?p:[p],V=A.length>0,U={padding:X,boundary:A.filter(ec),altBoundary:V},{refs:ee,floatingStyles:W,placement:H,isPositioned:ce,middlewareData:re}=au({strategy:"fixed",placement:q,whileElementsMounted:Vt((...Et)=>hu(...Et,{animationFrame:b==="always"}),"whileElementsMounted"),elements:{reference:S.anchor},middleware:[iu({mainAxis:s+j,alignmentAxis:i}),u&&cu({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?pu():void 0,...U}),u&&lu({...U}),uu({...U,apply:Vt(({elements:Et,rects:gt,availableWidth:Nt,availableHeight:We})=>{const{width:Bt,height:Wt}=gt.reference,Ee=Et.floating.style;Ee.setProperty("--radix-popper-available-width",`${Nt}px`),Ee.setProperty("--radix-popper-available-height",`${We}px`),Ee.setProperty("--radix-popper-anchor-width",`${Bt}px`),Ee.setProperty("--radix-popper-anchor-height",`${Wt}px`)},"apply")}),C&&du({element:C,padding:l}),ph({arrowWidth:F,arrowHeight:j}),g&&fu({strategy:"referenceHidden",...U,boundary:V?U.boundary:void 0})]}),L=S.setPlacementState;Ye(()=>(L(H),()=>{L(void 0)}),[H,L]);const[te,pe]=kr(H),he=Ot(v);Ye(()=>{ce&&(he==null||he())},[ce,he]);const ne=(se=re.arrow)==null?void 0:se.x,ie=(Se=re.arrow)==null?void 0:Se.y,oe=((tt=re.arrow)==null?void 0:tt.centerOffset)!==0,[_e,Re]=d.useState();return Ye(()=>{x&&Re(window.getComputedStyle(x).zIndex)},[x]),f.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:ce?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(ct=re.transformOrigin)==null?void 0:ct.x,(lt=re.transformOrigin)==null?void 0:lt.y].join(" "),...((ut=re.hide)==null?void 0:ut.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:f.jsx(dh,{scope:r,placedSide:te,placedAlign:pe,onArrowChange:P,arrowX:ne,arrowY:ie,shouldHideArrow:oe,children:f.jsx(ke.div,{"data-side":te,"data-align":pe,...y,ref:E,style:{...y.style,animation:ce?(Qt=y.style)==null?void 0:Qt.animation:"none"}})})})},"PopperContent"));function ec(e){return e!==null}Vt(ec,"isNotNull");var ph=Vt(e=>({name:"transformOrigin",options:e,fn(t){var y,S,x;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,p]=kr(n),c={start:"0%",center:"50%",end:"100%"}[p],h=(((S=o.arrow)==null?void 0:S.x)??0)+i/2,g=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let b="",v="";return u==="bottom"?(b=a?c:`${h}px`,v=`${-l}px`):u==="top"?(b=a?c:`${h}px`,v=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,v=a?c:`${g}px`):u==="left"&&(b=`${r.floating.width+l}px`,v=a?c:`${g}px`),{data:{x:b,y:v}}}}),"transformOrigin");function kr(e){const[t,n="center"]=e.split("-");return[t,n]}Vt(kr,"getSideAndAlignFromPlacement");var tc=ch,nc=uh,rc=fh,hh=Object.defineProperty,mh=(e,t)=>hh(e,"name",{value:t,configurable:!0}),gh=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"}),vh=d.forwardRef(mh(function(t,n){return f.jsx(ke.span,{...t,ref:n,style:{...gh,...t.style}})},"VisuallyHidden")),bh=vh,yh=Object.defineProperty,Me=(e,t)=>yh(e,"name",{value:t,configurable:!0}),[Yo,y0]=At("Tooltip",[Cr]),Jo=Cr(),wh="TooltipProvider",xh=700,vo="tooltip.open",[_h,qo]=Yo(wh),Sh=Me(e=>{const{__scopeTooltip:t,delayDuration:n=xh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=d.useRef(!0),i=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),f.jsx(_h,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),a.current=!1)},[r]),onClose:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r))},[r]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),bo="Tooltip",[Eh,Mn]=Yo(bo),Ch=Me(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,l=qo(bo,e.__scopeTooltip),u=Jo(t),[p,c]=d.useState(null),[h,g]=d.useState(void 0),b=Lt(),v=d.useRef(0),y=a??l.disableHoverableContent,S=i??l.delayDuration,x=d.useRef(!1),[k,E]=Nn({prop:r,defaultProp:o??!1,onChange:Me(q=>{q?(l.onOpen(),document.dispatchEvent(new CustomEvent(vo))):l.onClose(),s==null||s(q)},"onChange"),caller:bo}),C=d.useMemo(()=>k?x.current?"delayed-open":"instant-open":"closed",[k]),P=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,E(!0)},[E]),M=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),F=d.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,E(!0),v.current=0},S)},[S,E]);d.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const j=h??b;return f.jsx(tc,{...u,children:f.jsx(Eh,{scope:t,contentId:j,setContentId:g,open:k,stateAttribute:C,trigger:p,onTriggerChange:c,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?F():P()},[l.isOpenDelayedRef,F,P]),onTriggerLeave:d.useCallback(()=>{y?M():(window.clearTimeout(v.current),v.current=0)},[M,y]),onOpen:P,onClose:M,disableHoverableContent:y,children:n})})},"Tooltip"),Js="TooltipTrigger",kh=d.forwardRef(Me(function(t,n){const{__scopeTooltip:r,...o}=t,s=Mn(Js,r),a=qo(Js,r),i=Jo(r),l=d.useRef(null),u=ve(n,l,s.onTriggerChange),p=d.useRef(!1),c=d.useRef(!1),h=d.useCallback(()=>p.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),f.jsx(nc,{asChild:!0,...i,children:f.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:J(t.onPointerMove,g=>{g.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:J(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:J(t.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:J(t.onFocus,()=>{p.current||s.onOpen()}),onBlur:J(t.onBlur,s.onClose),onClick:J(t.onClick,s.onClose)})})},"TooltipTrigger")),oc="TooltipPortal",[Rh,Ph]=Yo(oc,{forceMount:void 0}),Th=Me(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Mn(oc,t);return f.jsx(Rh,{scope:t,forceMount:n,children:f.jsx(Dt,{present:n||s.open,children:f.jsx(Wo,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),kn="TooltipContent",Oh=d.forwardRef(Me(function(t,n){const r=Ph(kn,t.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...a}=t,i=Mn(kn,t.__scopeTooltip);return f.jsx(Dt,{present:o||i.open,children:i.disableHoverableContent?f.jsx(sc,{side:s,...a,ref:n}):f.jsx(Ih,{side:s,...a,ref:n})})},"TooltipContent")),Ih=d.forwardRef(Me(function(t,n){const r=Mn(kn,t.__scopeTooltip),o=qo(kn,t.__scopeTooltip),s=d.useRef(null),a=ve(n,s),[i,l]=d.useState(null),{trigger:u,onClose:p}=r,c=s.current,{onPointerInTransitChange:h}=o,g=d.useCallback(()=>{l(null),h(!1)},[h]),b=d.useCallback((v,y)=>{const S=v.currentTarget,x={x:v.clientX,y:v.clientY},k=ac(x,S.getBoundingClientRect()),E=ic(x,k),C=cc(y.getBoundingClientRect()),P=uc([...E,...C]);l(P),h(!0)},[h]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(u&&c){const v=Me(S=>b(S,c),"handleTriggerLeave"),y=Me(S=>b(S,u),"handleContentLeave");return u.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[u,c,b,g]),d.useEffect(()=>{if(i){const v=Me(y=>{const S=y.target,x={x:y.clientX,y:y.clientY},k=(u==null?void 0:u.contains(S))||(c==null?void 0:c.contains(S)),E=!lc(x,i);k?g():E&&(g(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,c,i,p,g]),f.jsx(sc,{...t,ref:a})},"TooltipContentHoverable")),Ah=Za("TooltipContent"),sc=d.forwardRef(Me(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":s,id:a,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=t,p=Mn(kn,r),c=Jo(r),{onClose:h}=p;d.useEffect(()=>(document.addEventListener(vo,h),()=>document.removeEventListener(vo,h)),[h]),d.useEffect(()=>{if(p.trigger){const b=Me(v=>{v.target instanceof Node&&v.target.contains(p.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[p.trigger,h]);const{setContentId:g}=p;return Ye(()=>(g(a),()=>{g(void 0)}),[a,g]),f.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:b=>b.preventDefault(),onDismiss:h,children:f.jsxs(rc,{"data-state":p.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:p.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:[f.jsx(Ah,{children:o}),s?f.jsx(bh,{id:p.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function ac(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(ac,"getExitSideFromRect");function ic(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(ic,"getPaddedExitPoints");function cc(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(cc,"getPointsFromRect");function lc(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}Me(lc,"isPointInPolygon");function uc(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),dc(t)}Me(uc,"getHull");function dc(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],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.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],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.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(dc,"getHullPresorted");var Dh=Sh,Nh=Ch,Mh=kh,jh=Th,fc=Oh;const zh=Dh,$h=Nh,Fh=Mh,pc=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(jh,{children:f.jsx(fc,{ref:r,sideOffset:t,"data-slot":"tooltip-content",className:G("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})}));pc.displayName=fc.displayName;const Lh="sidebar_state",Vh=3600*24*7,Zh="16rem",Uh="18rem",Bh="3rem",Wh="b",hc=d.createContext(null);function Rr(){const e=d.useContext(hc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const mc=d.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...a},i)=>{const l=Bd(),[u,p]=d.useState(!1),[c,h]=d.useState(e),g=t??c,b=d.useCallback(x=>{const k=typeof x=="function"?x(g):x;n?n(k):h(k),document.cookie=`${Lh}=${k}; path=/; max-age=${Vh}`},[n,g]),v=d.useCallback(()=>l?p(x=>!x):b(x=>!x),[l,b,p]);d.useEffect(()=>{const x=k=>{k.key===Wh&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),v())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[v]);const y=g?"expanded":"collapsed",S=d.useMemo(()=>({state:y,open:g,setOpen:b,isMobile:l,openMobile:u,setOpenMobile:p,toggleSidebar:v}),[y,g,b,l,u,p,v]);return f.jsx(hc.Provider,{value:S,children:f.jsx(zh,{delayDuration:0,children:f.jsx("div",{style:{"--sidebar-width":Zh,"--sidebar-width-icon":Bh,...o},className:G("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:i,...a,children:s})})})});mc.displayName="SidebarProvider";const gc=d.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s},a)=>{const{isMobile:i,state:l,openMobile:u,setOpenMobile:p}=Rr();return n==="none"?f.jsx("div",{className:G("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...s,children:o}):i?f.jsx(th,{open:u,onOpenChange:p,...s,children:f.jsxs(Wi,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Uh},side:e,children:[f.jsxs(Hi,{className:"sr-only",children:[f.jsx(Gi,{children:"Sidebar"}),f.jsx(Ki,{children:"Displays the mobile sidebar."})]}),f.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):f.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[f.jsx("div",{className:G("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]")}),f.jsx("div",{className:G("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:f.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})})]})});gc.displayName="Sidebar";const vc=d.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Rr();return f.jsxs(xr,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:G("h-7 w-7",e),onClick:s=>{t==null||t(s),o()},...n,children:[f.jsx(jd,{}),f.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});vc.displayName="SidebarTrigger";const Hh=d.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Rr();return f.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:G("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})});Hh.displayName="SidebarRail";const bc=d.forwardRef(({className:e,...t},n)=>f.jsx("main",{ref:n,className:G("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}));bc.displayName="SidebarInset";const Gh=d.forwardRef(({className:e,...t},n)=>f.jsx(fr,{ref:n,"data-sidebar":"input",className:G("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Gh.displayName="SidebarInput";const yc=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"header",className:G("flex flex-col gap-2 p-2",e),...t}));yc.displayName="SidebarHeader";const wc=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"footer",className:G("flex flex-col gap-2 p-2",e),...t}));wc.displayName="SidebarFooter";const Kh=d.forwardRef(({className:e,...t},n)=>f.jsx(pr,{ref:n,"data-sidebar":"separator",className:G("mx-2 w-auto bg-sidebar-border",e),...t}));Kh.displayName="SidebarSeparator";const xc=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"content",className:G("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));xc.displayName="SidebarContent";const sr=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"group",className:G("relative flex w-full min-w-0 flex-col p-2",e),...t}));sr.displayName="SidebarGroup";const yo=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?hn:"div";return f.jsx(o,{ref:r,"data-sidebar":"group-label",className:G("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})});yo.displayName="SidebarGroupLabel";const Yh=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?hn:"button";return f.jsx(o,{ref:r,"data-sidebar":"group-action",className:G("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})});Yh.displayName="SidebarGroupAction";const ar=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"group-content",className:G("w-full text-sm",e),...t}));ar.displayName="SidebarGroupContent";const ir=d.forwardRef(({className:e,...t},n)=>f.jsx("ul",{ref:n,"data-sidebar":"menu",className:G("flex w-full min-w-0 flex-col gap-1",e),...t}));ir.displayName="SidebarMenu";const cr=d.forwardRef(({className:e,...t},n)=>f.jsx("li",{ref:n,"data-sidebar":"menu-item",className:G("group/menu-item relative",e),...t}));cr.displayName="SidebarMenuItem";const Jh=An("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"}}),lr=d.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...a},i)=>{const l=e?hn:"button",{isMobile:u,state:p}=Rr(),c=f.jsx(l,{ref:i,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:G(Jh({variant:n,size:r}),s),...a});return o?(typeof o=="string"&&(o={children:o}),f.jsxs($h,{children:[f.jsx(Fh,{asChild:!0,children:c}),f.jsx(pc,{side:"right",align:"center",hidden:p!=="collapsed"||u,...o})]})):c});lr.displayName="SidebarMenuButton";const qh=d.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const s=t?hn:"button";return f.jsx(s,{ref:o,"data-sidebar":"menu-action",className:G("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})});qh.displayName="SidebarMenuAction";const Xh=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:G("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}));Xh.displayName="SidebarMenuBadge";const Qh=d.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=d.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return f.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:G("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&f.jsx(Ys,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),f.jsx(Ys,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});Qh.displayName="SidebarMenuSkeleton";const em=d.forwardRef(({className:e,...t},n)=>f.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:G("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}));em.displayName="SidebarMenuSub";const tm=d.forwardRef(({...e},t)=>f.jsx("li",{ref:t,...e}));tm.displayName="SidebarMenuSubItem";const nm=d.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},s)=>{const a=e?hn:"a";return f.jsx(a,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:G("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})});nm.displayName="SidebarMenuSubButton";var rm=Object.defineProperty,Ne=(e,t)=>rm(e,"name",{value:t,configurable:!0});function Xo(e){const t=e+"CollectionProvider",[n,r]=At(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=Ne(v=>{const{scope:y,children:S}=v,x=d.useRef(null),k=d.useRef(new Map).current;return f.jsx(o,{scope:y,itemMap:k,collectionRef:x,children:S})},"CollectionProvider");a.displayName=t;const i=e+"CollectionSlot",l=Tt(i),u=d.forwardRef((v,y)=>{const{scope:S,children:x}=v,k=s(i,S),E=ve(y,k.collectionRef);return f.jsx(l,{ref:E,children:x})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=Tt(p),g=d.forwardRef((v,y)=>{const{scope:S,children:x,...k}=v,E=d.useRef(null),C=ve(y,E),P=s(p,S);return d.useEffect(()=>(P.itemMap.set(E,{ref:E,...k}),()=>void P.itemMap.delete(E))),f.jsx(h,{[c]:"",ref:C,children:x})});g.displayName=p;function b(v){const y=s(e+"CollectionConsumer",v);return d.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const k=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(y.itemMap.values()).sort((P,M)=>k.indexOf(P.ref.current)-k.indexOf(M.ref.current))},[y.collectionRef,y.itemMap])}return Ne(b,"useCollection"),[{Provider:a,Slot:u,ItemSlot:g},b,r]}Ne(Xo,"createCollection");var qs=new WeakMap,Pe,Xe,Xr=(Xe=class extends Map{constructor(n){super(n);ks(this,Pe);Vr(this,Pe,[...super.keys()]),qs.set(this,!0)}set(n,r){return qs.get(this)&&(this.has(n)?Ve(this,Pe)[Ve(this,Pe).indexOf(n)]=n:Ve(this,Pe).push(n)),super.set(n,r),this}insert(n,r,o){const s=this.has(r),a=Ve(this,Pe).length,i=Qo(n);let l=i>=0?i:a+i;const u=l<0||l>=a?-1:l;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const p=this.size+(s?0:1);i<0&&l++;const c=[...Ve(this,Pe)];let h,g=!1;for(let b=l;b<p;b++)if(l===b){let v=c[b];c[b]===r&&(v=c[b+1]),s&&this.delete(r),h=this.get(v),this.set(r,o)}else{!g&&c[b-1]===r&&(g=!0);const v=c[g?b:b-1],y=h;h=this.get(v),this.delete(v),this.set(v,y)}return this}with(n,r,o){const s=new Xe(this);return s.insert(n,r,o),s}before(n){const r=Ve(this,Pe).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const s=Ve(this,Pe).indexOf(n);return s===-1?this:this.insert(s,r,o)}after(n){let r=Ve(this,Pe).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=Ve(this,Pe).indexOf(n);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Vr(this,Pe,[]),super.clear()}delete(n){const r=super.delete(n);return r&&Ve(this,Pe).splice(Ve(this,Pe).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=ur(Ve(this,Pe),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=ur(Ve(this,Pe),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return Ve(this,Pe).indexOf(n)}keyAt(n){return ur(Ve(this,Pe),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 a of this)Reflect.apply(n,r,[a,s,this])&&o.push(a),s++;return new Xe(o)}map(n,r){const o=[];let s=0;for(const a of this)o.push([a[0],Reflect.apply(n,r,[a,s,this])]),s++;return new Xe(o)}reduce(...n){const[r,o]=n;let s=0,a=o??this.at(0);for(const i of this)s===0&&n.length===1?a=i:a=Reflect.apply(r,this,[a,i,s,this]),s++;return a}reduceRight(...n){const[r,o]=n;let s=o??this.at(-1);for(let a=this.size-1;a>=0;a--){const i=this.at(a);a===this.size-1&&n.length===1?s=i:s=Reflect.apply(r,this,[s,i,a,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new Xe(r)}toReversed(){const n=new Xe;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 Xe(r)}slice(n,r){const o=new Xe;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 a=n;a<=s;a++){const i=this.keyAt(a),l=this.get(i);o.set(i,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}},Pe=new WeakMap,Ne(Xe,"OrderedDict"),Xe);function ur(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=_c(e,t);return n===-1?void 0:e[n]}Ne(ur,"at");function _c(e,t){const n=e.length,r=Qo(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}Ne(_c,"toSafeIndex");function Qo(e){return e!==e||e===0?0:Math.trunc(e)}Ne(Qo,"toSafeInteger");function om(e){const t=e+"CollectionProvider",[n,r]=At(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Xr,setItemMap:Ne(()=>{},"setItemMap")}),a=Ne(({state:k,...E})=>k?f.jsx(l,{...E,state:k}):f.jsx(i,{...E}),"CollectionProvider");a.displayName=t;const i=Ne(k=>{const E=y();return f.jsx(l,{...k,state:E})},"CollectionInit");i.displayName=t+"Init";const l=Ne(k=>{const{scope:E,children:C,state:P}=k,M=d.useRef(null),[F,j]=d.useState(null),q=ve(M,j),[X,A]=P;return d.useEffect(()=>{if(!F)return;const V=Cc(()=>{});return V.observe(F,{childList:!0,subtree:!0}),()=>{V.disconnect()}},[F]),f.jsx(o,{scope:E,itemMap:X,setItemMap:A,collectionRef:q,collectionRefObject:M,collectionElement:F,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";const u=e+"CollectionSlot",p=Tt(u),c=d.forwardRef((k,E)=>{const{scope:C,children:P}=k,M=s(u,C),F=ve(E,M.collectionRef);return f.jsx(p,{ref:F,children:P})});c.displayName=u;const h=e+"CollectionItemSlot",g="data-radix-collection-item",b=Tt(h),v=d.forwardRef((k,E)=>{const{scope:C,children:P,...M}=k,F=d.useRef(null),[j,q]=d.useState(null),X=ve(E,F,q),A=s(h,C),{setItemMap:V}=A,U=d.useRef(M);Sc(U.current,M)||(U.current=M);const ee=U.current;return d.useEffect(()=>{const W=ee;return V(H=>j?H.has(j)?H.set(j,{...W,element:j}).toSorted(wo):(H.set(j,{...W,element:j}),H.toSorted(wo)):H),()=>{V(H=>!j||!H.has(j)?H:(H.delete(j),new Xr(H)))}},[j,ee,V]),f.jsx(b,{[g]:"",ref:X,children:P})});v.displayName=h;function y(){return d.useState(new Xr)}Ne(y,"useInitCollection");function S(k){const{itemMap:E}=s(e+"CollectionConsumer",k);return E}return Ne(S,"useCollection"),[{Provider:a,Slot:c,ItemSlot:v},{createCollectionScope:r,useCollection:S,useInitCollection:y}]}Ne(om,"createCollection");function Sc(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(Sc,"shallowEqual");function Ec(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ne(Ec,"isElementPreceding");function wo(e,t){return!e[1].element||!t[1].element?0:Ec(e[1].element,t[1].element)?-1:1}Ne(wo,"sortByDocumentPosition");function Cc(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}Ne(Cc,"getChildListObserver");var sm=Object.defineProperty,am=(e,t)=>sm(e,"name",{value:t,configurable:!0}),im=d.createContext(void 0);function es(e){const t=d.useContext(im);return e||t||"ltr"}am(es,"useDirection");var cm=Object.defineProperty,ts=(e,t)=>cm(e,"name",{value:t,configurable:!0}),Qr=!1;function kc(){const[e,t]=d.useState(Qr);return d.useEffect(()=>{Qr||(Qr=!0,t(!0))},[]),e}ts(kc,"useIsHydrated");var Rc=pn[" useSyncExternalStore ".trim().toString()];function Pc(){return()=>{}}ts(Pc,"subscribe");function Tc(){return Rc(Pc,()=>!0,()=>!1)}ts(Tc,"useIsHydratedModern");var lm=typeof Rc=="function"?Tc:kc,um=Object.defineProperty,Yt=(e,t)=>um(e,"name",{value:t,configurable:!0}),eo="rovingFocusGroup.onEntryFocus",dm={bubbles:!1,cancelable:!0},Pr="RovingFocusGroup",[xo,Oc,fm]=Xo(Pr),[pm,Ic]=At(Pr,[fm]),[hm,mm]=pm(Pr),gm=d.forwardRef(Yt(function(t,n){return f.jsx(xo.Provider,{scope:t.__scopeRovingFocusGroup,children:f.jsx(xo.Slot,{scope:t.__scopeRovingFocusGroup,children:f.jsx(vm,{...t,ref:n})})})},"RovingFocusGroup")),vm=d.forwardRef(Yt(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:c=!1,...h}=t,g=d.useRef(null),b=ve(n,g),v=es(a),[y,S]=Nn({prop:i,defaultProp:l??null,onChange:u,caller:Pr}),[x,k]=d.useState(!1),E=Ot(p),C=Oc(r),P=d.useRef(!1),[M,F]=d.useState(0);return d.useEffect(()=>{const j=g.current;if(j)return j.addEventListener(eo,E),()=>j.removeEventListener(eo,E)},[E]),f.jsx(hm,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:d.useCallback(j=>S(j),[S]),onItemShiftTab:d.useCallback(()=>k(!0),[]),onFocusableItemAdd:d.useCallback(()=>F(j=>j+1),[]),onFocusableItemRemove:d.useCallback(()=>F(j=>j-1),[]),children:f.jsx(ke.div,{tabIndex:x||M===0?-1:0,"data-orientation":o,...h,ref:b,style:{outline:"none",...t.style},onMouseDown:J(t.onMouseDown,()=>{P.current=!0}),onFocus:J(t.onFocus,j=>{const q=!P.current;if(j.target===j.currentTarget&&q&&!x){const X=new CustomEvent(eo,dm);if(j.currentTarget.dispatchEvent(X),!X.defaultPrevented){const A=C().filter(H=>H.focusable),V=A.find(H=>H.active),U=A.find(H=>H.id===y),W=[V,U,...A].filter(Boolean).map(H=>H.ref.current);ns(W,c)}}P.current=!1}),onBlur:J(t.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),bm="RovingFocusGroupItem",ym=d.forwardRef(Yt(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:a,children:i,...l}=t,u=Lt(),p=a||u,c=mm(bm,r),h=c.currentTabStopId===p,g=Oc(r),{onFocusableItemAdd:b,onFocusableItemRemove:v,currentTabStopId:y}=c,S=lm();return Ye(()=>{if(!(!S||!o))return b(),()=>v()},[S,o,b,v]),d.useEffect(()=>{if(!(S||!o))return b(),()=>v()},[S,o,b,v]),f.jsx(xo.ItemSlot,{scope:r,id:p,focusable:o,active:s,children:f.jsx(ke.span,{tabIndex:h?0:-1,"data-orientation":c.orientation,...l,ref:n,onMouseDown:J(t.onMouseDown,x=>{o?c.onItemFocus(p):x.preventDefault()}),onFocus:J(t.onFocus,()=>c.onItemFocus(p)),onKeyDown:J(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const k=Dc(x,c.orientation,c.dir);if(k!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(P=>P.focusable).map(P=>P.ref.current);if(k==="last")C.reverse();else if(k==="prev"||k==="next"){k==="prev"&&C.reverse();const P=C.indexOf(x.currentTarget);C=c.loop?Nc(C,P+1):C.slice(P+1)}setTimeout(()=>ns(C))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:y!=null}):i})})},"RovingFocusGroupItem")),wm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ac(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Yt(Ac,"getDirectionAwareKey");function Dc(e,t,n){const r=Ac(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wm[r]}Yt(Dc,"getFocusIntent");function ns(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Yt(ns,"focusFirst");function Nc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Yt(Nc,"wrapArray");var xm=gm,_m=ym,Sm=Object.defineProperty,ae=(e,t)=>Sm(e,"name",{value:t,configurable:!0}),_o=["Enter"," "],Em=["ArrowDown","PageUp","Home"],Mc=["ArrowUp","PageDown","End"],Cm=[...Em,...Mc],km={ltr:[..._o,"ArrowRight"],rtl:[..._o,"ArrowLeft"]},Rm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Tr="Menu",[Rn,Pm,Tm]=Xo(Tr),[Jt,jc]=At(Tr,[Tm,Cr,Ic]),rs=Cr(),zc=Ic(),[Om,qt]=Jt(Tr),[Im,jn]=Jt(Tr),Am=ae(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=rs(t),[l,u]=d.useState(null),p=d.useRef(!1),c=Ot(s),h=es(o);return d.useEffect(()=>{const g=ae(()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},"handleKeyDown"),b=ae(()=>p.current=!1,"handlePointer");return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),d.useEffect(()=>{if(!n)return;const g=ae(()=>c(!1),"handleBlur");return window.addEventListener("blur",g),()=>window.removeEventListener("blur",g)},[n,c]),f.jsx(tc,{...i,children:f.jsx(Om,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:f.jsx(Im,{scope:t,onClose:d.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:p,dir:h,modal:a,children:r})})})},"Menu"),$c=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t,s=rs(r);return f.jsx(nc,{...s,...o,ref:n})},"MenuAnchor")),Fc="MenuPortal",[Dm,Lc]=Jt(Fc,{forceMount:void 0}),Nm=ae(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=qt(Fc,t);return f.jsx(Dm,{scope:t,forceMount:n,children:f.jsx(Dt,{present:n||s.open,children:f.jsx(Wo,{asChild:!0,container:o,children:r})})})},"MenuPortal"),pt="MenuContent",[Mm,os]=Jt(pt),jm=d.forwardRef(ae(function(t,n){const r=Lc(pt,t.__scopeMenu),{forceMount:o=r.forceMount,...s}=t,a=qt(pt,t.__scopeMenu),i=jn(pt,t.__scopeMenu);return f.jsx(Rn.Provider,{scope:t.__scopeMenu,children:f.jsx(Dt,{present:o||a.open,children:f.jsx(Rn.Slot,{scope:t.__scopeMenu,children:i.modal?f.jsx(zm,{...s,ref:n}):f.jsx($m,{...s,ref:n})})})})},"MenuContent")),zm=d.forwardRef(ae(function(t,n){const r=qt(pt,t.__scopeMenu),o=d.useRef(null),s=ve(n,o);return d.useEffect(()=>{const a=o.current;if(a)return Mi(a)},[]),f.jsx(ss,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:J(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),$m=d.forwardRef(ae(function(t,n){const r=qt(pt,t.__scopeMenu);return f.jsx(ss,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),Fm=Tt("MenuContent.ScrollLock"),ss=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:h,onInteractOutside:g,onDismiss:b,disableOutsideScroll:v,...y}=t,S=qt(pt,r),x=jn(pt,r),k=rs(r),E=zc(r),C=Pm(r),[P,M]=d.useState(null),F=d.useRef(null),j=ve(n,F,S.onContentChange),q=d.useRef(0),X=d.useRef(""),A=d.useRef(0),V=d.useRef(null),U=d.useRef("right"),ee=d.useRef(0),W=v?Go:d.Fragment,H=v?{as:Fm,allowPinchZoom:!0}:void 0,ce=ae(L=>{var Re,se;const te=X.current+L,pe=C().filter(Se=>!Se.disabled),he=document.activeElement,ne=(Re=pe.find(Se=>Se.ref.current===he))==null?void 0:Re.textValue,ie=pe.map(Se=>Se.textValue),oe=Gc(ie,te,ne),_e=(se=pe.find(Se=>Se.textValue===oe))==null?void 0:se.ref.current;ae((function Se(tt){X.current=tt,window.clearTimeout(q.current),tt!==""&&(q.current=window.setTimeout(()=>Se(""),1e3))}),"updateSearch")(te),_e&&setTimeout(()=>_e.focus())},"handleTypeaheadSearch");d.useEffect(()=>()=>window.clearTimeout(q.current),[]),_r();const re=d.useCallback(L=>{var pe,he;return U.current===((pe=V.current)==null?void 0:pe.side)&&Yc(L,(he=V.current)==null?void 0:he.area)},[]);return f.jsx(Mm,{scope:r,searchRef:X,onItemEnter:d.useCallback(L=>{re(L)&&L.preventDefault()},[re]),onItemLeave:d.useCallback(L=>{var te;re(L)||((te=F.current)==null||te.focus(),M(null))},[re]),onTriggerLeave:d.useCallback(L=>{re(L)&&L.preventDefault()},[re]),pointerGraceTimerRef:A,onPointerGraceIntentChange:d.useCallback(L=>{V.current=L},[]),children:f.jsx(W,{...H,children:f.jsx(gi,{asChild:!0,trapped:s,onMountAutoFocus:J(a,L=>{var te;L.preventDefault(),(te=F.current)==null||te.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Zo,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:p,onPointerDownOutside:c,onFocusOutside:h,onInteractOutside:g,onDismiss:b,children:f.jsx(xm,{asChild:!0,...E,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:P,onCurrentTabStopIdChange:M,onEntryFocus:J(u,L=>{x.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(rc,{role:"menu","aria-orientation":"vertical","data-state":is(S.open),"data-radix-menu-content":"",dir:x.dir,...k,...y,ref:j,style:{outline:"none",...y.style},onKeyDown:J(y.onKeyDown,L=>{const pe=L.target.closest("[data-radix-menu-content]")===L.currentTarget,he=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;pe&&(L.key==="Tab"&&L.preventDefault(),!he&&ne&&ce(L.key));const ie=F.current;if(L.target!==ie||!Cm.includes(L.key))return;L.preventDefault();const _e=C().filter(Re=>!Re.disabled).map(Re=>Re.ref.current);Mc.includes(L.key)&&_e.reverse(),Wc(_e)}),onBlur:J(t.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(q.current),X.current="")}),onPointerMove:J(t.onPointerMove,dn(L=>{const te=L.target,pe=ee.current!==L.clientX;if(L.currentTarget.contains(te)&&pe){const he=L.clientX>ee.current?"right":"left";U.current=he,ee.current=L.clientX}}))})})})})})})},"MenuContentImpl")),Lm=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t;return f.jsx(ke.div,{...o,ref:n})},"MenuLabel")),So="MenuItem",Xs="menu.itemSelect",as=d.forwardRef(ae(function(t,n){const{disabled:r=!1,onSelect:o,...s}=t,a=d.useRef(null),i=jn(So,t.__scopeMenu),l=os(So,t.__scopeMenu),u=ve(n,a),p=d.useRef(!1),c=ae(()=>{const h=a.current;if(!r&&h){const g=new CustomEvent(Xs,{bubbles:!0,cancelable:!0});h.addEventListener(Xs,b=>o==null?void 0:o(b),{once:!0}),Vo(h,g),g.defaultPrevented?p.current=!1:i.onClose()}},"handleSelect");return f.jsx(Vc,{...s,ref:u,disabled:r,onClick:J(t.onClick,c),onPointerDown:h=>{var g;(g=t.onPointerDown)==null||g.call(t,h),p.current=!0},onPointerUp:J(t.onPointerUp,h=>{var g;p.current||(g=h.currentTarget)==null||g.click()}),onKeyDown:J(t.onKeyDown,h=>{r||h.target!==h.currentTarget||l.searchRef.current!==""&&h.key===" "||_o.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),Vc=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:s,...a}=t,i=os(So,r),l=zc(r),u=d.useRef(null),p=ve(n,u),[c,h]=d.useState(!1),[g,b]=d.useState("");return d.useEffect(()=>{const v=u.current;v&&b((v.textContent??"").trim())},[a.children]),f.jsx(Rn.ItemSlot,{scope:r,disabled:o,textValue:s??g,children:f.jsx(_m,{asChild:!0,...l,focusable:!o,children:f.jsx(ke.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:p,onPointerMove:J(t.onPointerMove,dn(v=>{o?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(t.onPointerLeave,dn(v=>i.onItemLeave(v))),onFocus:J(t.onFocus,()=>h(!0)),onBlur:J(t.onBlur,()=>h(!1))})})})},"MenuItemImpl")),Vm=d.forwardRef(ae(function(t,n){const{checked:r=!1,onCheckedChange:o,...s}=t;return f.jsx(Uc,{scope:t.__scopeMenu,checked:r,children:f.jsx(as,{role:"menuitemcheckbox","aria-checked":Pn(r)?"mixed":r,...s,ref:n,"data-state":Or(r),onSelect:J(s.onSelect,()=>o==null?void 0:o(Pn(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Zm="MenuRadioGroup",[w0,Um]=Jt(Zm,{value:void 0,onValueChange:ae(()=>{},"onValueChange")}),Bm="MenuRadioItem",Wm=d.forwardRef(ae(function(t,n){const{value:r,...o}=t,s=Um(Bm,t.__scopeMenu),a=r===s.value;return f.jsx(Uc,{scope:t.__scopeMenu,checked:a,children:f.jsx(as,{role:"menuitemradio","aria-checked":a,...o,ref:n,"data-state":Or(a),onSelect:J(o.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Zc="MenuItemIndicator",[Uc,Hm]=Jt(Zc,{checked:!1}),Gm=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,forceMount:o,...s}=t,a=Hm(Zc,r);return f.jsx(Dt,{present:o||Pn(a.checked)||a.checked===!0,children:f.jsx(ke.span,{...s,ref:n,"data-state":Or(a.checked)})})},"MenuItemIndicator")),Km=d.forwardRef(ae(function(t,n){const{__scopeMenu:r,...o}=t;return f.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),Ym="MenuSub",[x0,Bc]=Jt(Ym),Jn="MenuSubTrigger",Jm=d.forwardRef(ae(function(t,n){const r=qt(Jn,t.__scopeMenu),o=jn(Jn,t.__scopeMenu),s=Bc(Jn,t.__scopeMenu),a=os(Jn,t.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,p={__scopeMenu:t.__scopeMenu},c=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);d.useEffect(()=>c,[c]),d.useEffect(()=>{const g=l.current;return()=>{window.clearTimeout(g),u(null)}},[l,u]);const h=ve(n,s.onTriggerChange);return f.jsx($c,{asChild:!0,...p,children:f.jsx(Vc,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":is(r.open),...t,ref:h,onClick:g=>{var b;(b=t.onClick)==null||b.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:J(t.onPointerMove,dn(g=>{a.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:J(t.onPointerLeave,dn(g=>{var v,y;c();const b=(v=r.content)==null?void 0:v.getBoundingClientRect();if(b){const S=(y=r.content)==null?void 0:y.dataset.side,x=S==="right",k=x?-5:5,E=b[x?"left":"right"],C=b[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:g.clientX+k,y:g.clientY},{x:E,y:b.top},{x:C,y:b.top},{x:C,y:b.bottom},{x:E,y:b.bottom}],side:S}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(g),g.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:J(t.onKeyDown,g=>{var v;t.disabled||g.target!==g.currentTarget||a.searchRef.current!==""&&g.key===" "||km[o.dir].includes(g.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),g.preventDefault())})})})},"MenuSubTrigger")),qm="MenuSubContent",Xm=d.forwardRef(ae(function(t,n){const r=Lc(pt,t.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...a}=t,i=qt(pt,t.__scopeMenu),l=jn(pt,t.__scopeMenu),u=Bc(qm,t.__scopeMenu),p=d.useRef(null),c=ve(n,p);return f.jsx(Rn.Provider,{scope:t.__scopeMenu,children:f.jsx(Dt,{present:o||i.open,children:f.jsx(Rn.Slot,{scope:t.__scopeMenu,children:f.jsx(ss,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:c,align:s,side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var g;l.isUsingKeyboardRef.current&&((g=p.current)==null||g.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:J(t.onFocusOutside,h=>{h.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:J(t.onEscapeKeyDown,h=>{l.onClose(),h.preventDefault()}),onKeyDown:J(t.onKeyDown,h=>{var v;const g=h.currentTarget.contains(h.target),b=Rm[l.dir].includes(h.key);g&&b&&(i.onOpenChange(!1),(v=u.trigger)==null||v.focus(),h.preventDefault())})})})})})},"MenuSubContent"));function is(e){return e?"open":"closed"}ae(is,"getOpenState");function Pn(e){return e==="indeterminate"}ae(Pn,"isIndeterminate");function Or(e){return Pn(e)?"indeterminate":e?"checked":"unchecked"}ae(Or,"getCheckedState");function Wc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}ae(Wc,"focusFirst");function Hc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ae(Hc,"wrapArray");function Gc(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 a=Hc(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}ae(Gc,"getNextMatch");function Kc(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&n<(c-u)*(r-p)/(h-p)+u&&(o=!o)}return o}ae(Kc,"isPointInPolygon");function Yc(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Kc(n,t)}ae(Yc,"isPointerInGraceArea");function dn(e){return t=>t.pointerType==="mouse"?e(t):void 0}ae(dn,"whenMouse");var Qm=Am,eg=$c,tg=Nm,ng=jm,rg=Lm,og=as,sg=Vm,ag=Wm,ig=Gm,cg=Km,lg=Jm,ug=Xm,dg=Object.defineProperty,st=(e,t)=>dg(e,"name",{value:t,configurable:!0}),cs="DropdownMenu",[fg,_0]=At(cs,[jc]),at=jc(),[pg,Jc]=fg(cs),hg=st(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,l=at(t),u=d.useRef(null),[p,c]=Nn({prop:o,defaultProp:s??!1,onChange:a,caller:cs});return f.jsx(pg,{scope:t,triggerId:Lt(),triggerRef:u,contentId:Lt(),open:p,onOpenChange:c,onOpenToggle:d.useCallback(()=>c(h=>!h),[c]),modal:i,children:f.jsx(Qm,{...l,open:p,onOpenChange:c,dir:r,modal:i,children:n})})},"DropdownMenu"),mg="DropdownMenuTrigger",gg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=t,a=Jc(mg,r),i=at(r),l=ve(n,a.triggerRef);return f.jsx(eg,{asChild:!0,...i,children:f.jsx(ke.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:l,onPointerDown:J(t.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:J(t.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),vg=st(e=>{const{__scopeDropdownMenu:t,...n}=e,r=at(t);return f.jsx(tg,{...r,...n})},"DropdownMenuPortal"),bg="DropdownMenuContent",yg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=Jc(bg,r),a=at(r),i=d.useRef(!1);return f.jsx(ng,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...o,ref:n,onCloseAutoFocus:J(t.onCloseAutoFocus,l=>{var u;i.current||(u=s.triggerRef.current)==null||u.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:J(t.onInteractOutside,l=>{const u=l.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0,c=u.button===2||p;(!s.modal||c)&&(i.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")),wg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(rg,{...s,...o,ref:n})},"DropdownMenuLabel")),xg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(og,{...s,...o,ref:n})},"DropdownMenuItem")),_g=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(sg,{...s,...o,ref:n})},"DropdownMenuCheckboxItem")),Sg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(ag,{...s,...o,ref:n})},"DropdownMenuRadioItem")),Eg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(ig,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),Cg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(cg,{...s,...o,ref:n})},"DropdownMenuSeparator")),kg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(lg,{...s,...o,ref:n})},"DropdownMenuSubTrigger")),Rg=d.forwardRef(st(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=at(r);return f.jsx(ug,{...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")),Pg=hg,Tg=gg,Og=vg,qc=yg,Xc=wg,Qc=xg,el=_g,tl=Sg,nl=Eg,rl=Cg,ol=kg,sl=Rg;const Ig=Pg,Ag=Tg,Dg=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>f.jsxs(ol,{ref:o,className:G("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,f.jsx(_d,{className:"ml-auto"})]}));Dg.displayName=ol.displayName;const Ng=d.forwardRef(({className:e,...t},n)=>f.jsx(sl,{ref:n,className:G("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}));Ng.displayName=sl.displayName;const al=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(Og,{children:f.jsx(qc,{ref:r,sideOffset:t,className:G("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})}));al.displayName=qc.displayName;const Eo=d.forwardRef(({className:e,inset:t,...n},r)=>f.jsx(Qc,{ref:r,className:G("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}));Eo.displayName=Qc.displayName;const Mg=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>f.jsxs(el,{ref:o,className:G("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:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(nl,{children:f.jsx(wd,{className:"h-4 w-4"})})}),t]}));Mg.displayName=el.displayName;const jg=d.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(tl,{ref:r,className:G("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:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(nl,{children:f.jsx(Ed,{className:"h-2 w-2 fill-current"})})}),t]}));jg.displayName=tl.displayName;const zg=d.forwardRef(({className:e,inset:t,...n},r)=>f.jsx(Xc,{ref:r,className:G("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));zg.displayName=Xc.displayName;const il=d.forwardRef(({className:e,...t},n)=>f.jsx(rl,{ref:n,className:G("-mx-1 my-1 h-px bg-muted",e),...t}));il.displayName=rl.displayName;const Co="";async function qn(e,t,n,r){const o=await fetch(`${Co}${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 cl={get:e=>qn("GET",e),post:(e,t)=>qn("POST",e,t),patch:(e,t)=>qn("PATCH",e,t),delete:e=>qn("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${Co}${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(`${Co}${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 ll(){const[e,t]=d.useState({user:null,loading:!0}),n=zo();return d.useEffect(()=>{let r=!1;return cl.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 $g=6;function Fg(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function Lg(e){const t=Fg(e)%$g+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function Vg({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 f.jsx("img",{src:t,alt:e,style:{...o,objectFit:"cover"}});const{bg:s,fg:a}=Lg(e);return f.jsx("span",{style:{...o,background:s,display:"inline-flex",alignItems:"center",justifyContent:"center",color:a,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const Zg=[{label:"App Center",href:"/app-center",icon:Pd},{label:"Mac Resources",href:"/mac-resources",icon:Ad}],Ug=[{label:"Default",href:"/settings/default",icon:Ja,adminOnly:!1},{label:"Team",href:"/settings/team",icon:Vd,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:kd,adminOnly:!0}],Bg=[{label:"Docs",href:"https://www.tapflow.dev",icon:bd}];function Wg(){const{pathname:e}=za(),t=zo(),{user:n}=ll(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:o}=wr(),s=o==="dark"?"/logo-dark.svg":"/logo.svg",[a,i]=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&&i(c.logo_url),c!=null&&c.team_name&&u(c.team_name)})},[]);async function p(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return f.jsxs(gc,{collapsible:"icon",children:[f.jsx(yc,{className:"p-2",children:f.jsxs(Zn,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[f.jsx("img",{src:a??s,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),f.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:l})]})}),f.jsxs(xc,{children:[f.jsx(sr,{children:f.jsx(ar,{children:f.jsx(ir,{children:Zg.map(c=>f.jsx(cr,{children:f.jsx(lr,{asChild:!0,isActive:e.startsWith(c.href),tooltip:c.label,children:f.jsxs(Zn,{to:c.href,children:[f.jsx(c.icon,{}),f.jsx("span",{children:c.label})]})})},c.href))})})}),f.jsxs(sr,{children:[f.jsx(yo,{children:"Settings"}),f.jsx(ar,{children:f.jsx(ir,{children:Ug.filter(c=>!c.adminOnly||r).map(c=>f.jsx(cr,{children:f.jsx(lr,{asChild:!0,isActive:e===c.href,tooltip:c.label,children:f.jsxs(Zn,{to:c.href,children:[f.jsx(c.icon,{}),f.jsx("span",{children:c.label})]})})},c.href))})})]}),f.jsxs(sr,{children:[f.jsx(yo,{children:"Reference"}),f.jsx(ar,{children:f.jsx(ir,{children:Bg.map(c=>f.jsx(cr,{children:f.jsx(lr,{asChild:!0,tooltip:c.label,children:f.jsxs("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",children:[f.jsx(c.icon,{}),f.jsx("span",{children:c.label})]})})},c.href))})})]})]}),n&&f.jsx(wc,{className:"px-3 py-3",children:f.jsxs(Ig,{children:[f.jsx(Ag,{asChild:!0,children:f.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:[f.jsx(Vg,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),f.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[f.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),f.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),f.jsxs(al,{side:"top",align:"start",className:"w-56",children:[f.jsx(Eo,{asChild:!0,children:f.jsxs(Zn,{to:"/settings/default",children:[f.jsx(Ja,{className:"mr-2 h-4 w-4"}),"Settings"]})}),f.jsx(il,{}),f.jsxs(Eo,{onClick:p,className:"text-destructive focus:text-destructive",children:[f.jsx(Od,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function Hg(){const{theme:e,setTheme:t}=wr();return f.jsxs(xr,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[f.jsx(Fd,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),f.jsx(Nd,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const ul=d.createContext({node:null,setNode:()=>{}});function Gg({children:e}){const[t,n]=d.useState(null),r=d.useMemo(()=>({node:t,setNode:n}),[t]);return f.jsx(ul.Provider,{value:r,children:e})}function Kg(){return d.useContext(ul)}function Yg(){const{node:e}=Kg();return f.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[f.jsx(vc,{className:"-ml-1"}),f.jsx(pr,{orientation:"vertical",className:"h-4"}),e,f.jsx("div",{className:"flex-1"}),f.jsx(Hg,{}),f.jsx(pr,{orientation:"vertical",className:"h-4"}),f.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:f.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:f.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 Jg(){const{user:e,loading:t}=ll(),n=za();return t?null:e?["/settings/team","/settings/tokens"].some(o=>n.pathname.startsWith(o))&&e.role!=="Admin"?f.jsx("div",{className:"flex h-screen items-center justify-center",children:f.jsxs("div",{className:"text-center space-y-2",children:[f.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):f.jsx(Gg,{children:f.jsxs(mc,{children:[f.jsx(Wg,{}),f.jsxs(bc,{children:[f.jsx(Yg,{}),f.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:f.jsx(d.Suspense,{fallback:f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:f.jsx(gu,{})})})]})]})}):f.jsx($a,{to:"/login",replace:!0})}var zn=e=>e.type==="checkbox",Ir=e=>e.type==="file",Pt=e=>e instanceof Date,Ae=e=>e==null;const ls=e=>typeof e=="object";var we=e=>!Ae(e)&&!Array.isArray(e)&&ls(e)&&!Pt(e),ko=e=>we(e)&&e.target?zn(e.target)?e.target.checked:Ir(e.target)?e.target.files:e.target.value:e,dl=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),fl=e=>{const t=e.constructor&&e.constructor.prototype;return we(t)&&t.hasOwnProperty("isPrototypeOf")},Ar=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ge(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ar&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(we(e)&&fl(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=ge(e[o]));return r}const Ft={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"},pl="root",us=["__proto__","constructor","prototype"],qg=/^\w*$/;var fn=e=>qg.test(e),fe=e=>e===void 0;const Xg=/[.[\]'"]/;var Tn=e=>e.split(Xg).filter(Boolean),N=(e,t,n)=>{if(!t||!we(e))return n;const r=fn(t)?[t]:Tn(t);if(r.some(s=>us.includes(s)))return n;const o=r.reduce((s,a)=>Ae(s)?void 0:s[a],e);return fe(o)||o===e?fe(e[t])?n:e[t]:o},Qe=e=>typeof e=="boolean",Ze=e=>typeof e=="function",le=(e,t,n)=>{let r=-1;const o=fn(t)?[t]:Tn(t),s=o.length,a=s-1;for(;++r<s;){const i=o[r];let l=n;if(r!==a){const u=e[i];l=we(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(us.includes(i))return;e[i]=l,e=e[i]}};const hl=R.createContext(null);hl.displayName="HookFormControlContext";const ds=()=>R.useContext(hl);var ml=(e,t,n,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==ft.all&&(t._proxyFormState[a]=!r||ft.all),n&&(n[a]=!0),e[a]}});return o};const fs=Ar?R.useLayoutEffect:R.useEffect;var Ro=e=>Ae(e)||!ls(e);const Qs=(e,t)=>t.length===0&&!Array.isArray(e)&&!fl(e);function Ke(e,t,n=new WeakMap){if(e===t)return!0;if(Ro(e)||Ro(t))return Object.is(e,t);if(Pt(e)&&Pt(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(Qs(e,r)||Qs(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 a=new WeakSet;a.add(t),n.set(e,a)}for(const a of r){const i=e[a];if(!(a in t))return!1;if(a!=="ref"){const l=t[a];if(Pt(i)&&Pt(l)||(we(i)||Array.isArray(i))&&(we(l)||Array.isArray(l))?!Ke(i,l,n):!Object.is(i,l))return!1}}return!0}function ps(){const e=R.useRef(!1),t=R.useRef(void 0),n=R.useCallback((o,s,a)=>{if(o&&e.current){const i=s();Ke(t.current,i)||a(i)}e.current=!0},[]),r=R.useCallback((o,s)=>{o&&(t.current=ge(s()))},[]);return{resyncIfNeeded:n,snapshot:r}}function Qg(e){const t=ds(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[a,i]=R.useState(()=>({...n._formState,defaultValues:n._defaultValues})),l=R.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:u,snapshot:p}=ps();return fs(()=>{const c=()=>({...n._formState,defaultValues:n._defaultValues});u(!r,c,i);const h=n._subscribe({name:o,formState:l.current,exact:s,callback:g=>{!r&&i({...n._formState,...g,defaultValues:n._defaultValues})}});return()=>{h(),p(!r,c)}},[o,r,s,u,p]),R.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),R.useMemo(()=>ml(a,n,l.current,!1),[a,n])}var Fe=e=>typeof e=="string",Po=(e,t,n,r,o)=>Fe(e)?(r&&t.watch.add(e),N(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),N(n,s))):(r&&(t.watchAll=!0),n);function ev(e){const t=ds(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},l=R.useRef(o),u=R.useRef(i),p=R.useRef(void 0),c=R.useRef(n),h=R.useRef(r);u.current=i;const[g,b]=R.useState(()=>{const F=n._getWatch(r,l.current);return u.current?u.current(F):F}),v=R.useCallback(F=>{const j=Po(r,n._names,F||n._formValues,!1,l.current);return u.current?u.current(j):j},[n._formValues,n._names,r]),y=R.useCallback(F=>{if(!s){const j=Po(r,n._names,F||n._formValues,!1,l.current);if(u.current){const q=u.current(j);Ke(q,p.current)||(b(q),p.current=q)}else b(j)}},[n._formValues,n._names,s,r]),{resyncIfNeeded:S,snapshot:x}=ps(),k=R.useRef(y);k.current=y;const E=R.useRef(v);E.current=v,fs(()=>{c.current!==n||!Ke(h.current,r)?(c.current=n,h.current=r,k.current()):S(!s,()=>E.current(),j=>{b(j),p.current=j});const F=n._subscribe({name:r,formState:{values:!0},exact:a,callback:j=>{k.current(j.values)}});return()=>{F(),x(!s,()=>E.current())}},[n,a,r,s,S,x]),R.useEffect(()=>n._removeUnmounted());const C=c.current!==n,P=h.current,M=R.useMemo(()=>{if(s)return null;const F=!C&&!Ke(P,r);return C||F?v():null},[s,C,r,P,v]);return M!==null?M:g}function tv(e){const t=ds(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:a,exact:i=!0}=e,l=dl(o._names.array,n),u=R.useMemo(()=>N(o._formValues,n,N(o._defaultValues,n,a)),[o,n,a]),p=ev({control:o,name:n,defaultValue:u,exact:i}),c=Qg({control:o,name:n,exact:i}),h=R.useRef(e),g=R.useRef(null),b=R.useRef(o.register(n,{...e.rules,value:p,...Qe(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const v=R.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!N(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!N(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!N(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!N(c.validatingFields,n)},error:{enumerable:!0,get:()=>N(c.errors,n)}}),[c,n]),y=R.useCallback(E=>{const C=ko(E);return N(o._fields,n)||(b.current=o.register(n,{...h.current.rules,value:C})),b.current.onChange({target:{value:ko(E),name:n},type:Ft.CHANGE})},[n,o]),S=R.useCallback(()=>b.current.onBlur({target:{value:N(o._formValues,n),name:n},type:Ft.BLUR}),[n,o._formValues]),x=R.useCallback(E=>{E&&(g.current={focus:()=>Ze(E.focus)&&E.focus(),select:()=>Ze(E.select)&&E.select(),setCustomValidity:P=>Ze(E.setCustomValidity)&&E.setCustomValidity(P),reportValidity:()=>Ze(E.reportValidity)&&E.reportValidity()});const C=N(o._fields,n);C&&C._f&&E&&(C._f.ref=g.current)},[o._fields,n]),k=R.useMemo(()=>({name:n,value:p,...Qe(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:y,onBlur:S,ref:x}),[n,r,c.disabled,y,S,x,p]);return R.useEffect(()=>{const E=o._options.shouldUnregister||s;b.current=o.register(n,{...h.current.rules,...Qe(h.current.disabled)?{disabled:h.current.disabled}:{}});const C=(P,M)=>{const F=N(o._fields,P);F&&F._f&&(F._f.mount=M)};if(C(n,!0),E){const P=ge(N(s?o._defaultValues:o._options.values||o._defaultValues,n,N(o._options.defaultValues,n,h.current.defaultValue)));le(o._defaultValues,n,P),fe(N(o._formValues,n))&&le(o._formValues,n,P)}if(!l&&o.register(n),g.current){const P=N(o._fields,n);P&&P._f&&(P._f.ref=g.current)}return()=>{(l?E&&!o._state.action:E)?o.unregister(n):C(n,!1)}},[n,o,l,s]),R.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),R.useMemo(()=>({field:k,formState:c,fieldState:v}),[k,c,v])}const S0=e=>e.render(tv(e));var Xn=e=>({isOnSubmit:!e||e===ft.onSubmit,isOnBlur:e===ft.onBlur,isOnChange:e===ft.onChange,isOnAll:e===ft.all,isOnTouch:e===ft.onTouched}),to=(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 En=(e,t,n,r)=>{for(const o of n||Object.keys(e)){if(o==="_f")continue;const s=n?N(e,o):e[o];if(s){const{_f:a}=s;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(En(s,t))break}else if((we(s)||Array.isArray(s))&&En(s,t))break}}};var ea=(e,t,n)=>{const r=N(e,n),o=Array.isArray(r)?r:[];return le(o,pl,t[n]),le(e,n,o),e},$e=e=>we(e)&&!Object.keys(e).length,hr=e=>{if(!Ar)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hs=e=>e.type==="radio",mr=e=>e instanceof RegExp,ms=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{};const ta={value:!1,isValid:!1},na={value:!0,isValid:!0};var gl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!fe(e[0].attributes.value)?fe(e[0].value)||e[0].value===""?na:{value:e[0].value,isValid:!0}:na:ta}return ta};const ra={isValid:!1,value:null};var vl=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ra):ra;function oa(e,t,n="validate"){if(Fe(e)||Array.isArray(e)&&e.every(Fe)||Qe(e)&&!e)return{type:n,message:Fe(e)?e:"",ref:t}}var on=e=>we(e)&&!mr(e)?e:{value:e,message:""},sa=async(e,t,n,r,o,s)=>{const{ref:a,refs:i,required:l,maxLength:u,minLength:p,min:c,max:h,pattern:g,validate:b,name:v,valueAsNumber:y,mount:S}=e._f,x=N(n,v);if(!S||t.has(v))return{};const k=i?i[0]:a,E=A=>{if(o&&k.reportValidity){const V=Qe(A)?"":A||"";i?i.forEach(U=>U.setCustomValidity(V)):k.setCustomValidity(V),k.reportValidity()}},C={},P=hs(a),M=zn(a),F=P||M,j=(y||Ir(a))&&fe(a.value)&&fe(x)||hr(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,q=ms.bind(null,v,r,C),X=(A,V,U,ee=dt.maxLength,W=dt.minLength)=>{const H=A?V:U;C[v]={type:A?ee:W,message:H,ref:a,...q(A?ee:W,H)}};if(s?!Array.isArray(x)||!x.length:l&&(!F&&(j||Ae(x))||Qe(x)&&!x||M&&!gl(i).isValid||P&&!vl(i).isValid)){const{value:A,message:V}=Fe(l)?{value:!!l,message:l}:on(l);if(A&&(C[v]={type:dt.required,message:V,ref:k,...q(dt.required,V)},!r))return E(V),C}if(!j&&(!Ae(c)||!Ae(h))){let A,V;const U=on(h),ee=on(c);if(!Ae(x)&&!Pt(x)&&!isNaN(x)){const W=a.valueAsNumber||x&&+x;Ae(U.value)||(A=W>U.value),Ae(ee.value)||(V=W<ee.value)}else{const W=a.valueAsDate||new Date(x),H=L=>new Date(new Date().toDateString()+" "+L),ce=a.type=="time",re=a.type=="week";Fe(U.value)&&x&&(A=ce?H(x)>H(U.value):re?x>U.value:W>new Date(U.value)),Fe(ee.value)&&x&&(V=ce?H(x)<H(ee.value):re?x<ee.value:W<new Date(ee.value))}if((A||V)&&(X(!!A,U.message,ee.message,dt.max,dt.min),!r))return E(C[v].message),C}if((u||p)&&!j&&(Fe(x)||s&&Array.isArray(x))){const A=on(u),V=on(p),U=!Ae(A.value)&&x.length>+A.value,ee=!Ae(V.value)&&x.length<+V.value;if((U||ee)&&(X(U,A.message,V.message),!r))return E(C[v].message),C}if(g&&!j&&Fe(x)){const{value:A,message:V}=on(g);if(mr(A)&&!x.match(A)&&(C[v]={type:dt.pattern,message:V,ref:a,...q(dt.pattern,V)},!r))return E(V),C}if(b){if(Ze(b)){const A=await b(x,n),V=oa(A,k);if(V&&(C[v]={...V,...q(dt.validate,V.message)},!r))return E(V.message),C}else if(we(b)){let A={};for(const V in b){if(!$e(A)&&!r)break;const U=oa(await b[V](x,n),k,V);U&&(A={...U,...q(V,U.message)},E(U.message),r&&(C[v]=A))}if(!$e(A)&&(C[v]={ref:k,...A},!r))return C}}return E(!0),C},dr=e=>Array.isArray(e)?e:[e],bl=e=>Array.isArray(e)?e.filter(Boolean):[];function nv(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 rv(e){for(const t in e)if(e.hasOwnProperty(t)&&!fe(e[t]))return!1;return!0}function Ce(e,t){if(Fe(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:fn(t)?[t]:Tn(t);if(n.some(a=>us.includes(String(a))))return e;const r=n.length===1?e:nv(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(we(r)&&$e(r)||Array.isArray(r)&&rv(r))&&Ce(e,n.slice(0,-1)),e}const yl=e=>{const t={};for(const n of Object.keys(e))if(ls(e[n])&&e[n]!==null&&!Pt(e[n])){const r=yl(e[n]);for(const o of Object.keys(r))t[`${n}.${o}`]=r[o]}else t[n]=e[n];return t},ov=R.createContext(null);ov.displayName="HookFormContext";var aa=()=>{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 wl(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&we(o)&&s){const a=wl(o,s);we(a)&&(n[r]=a)}else e[r]&&(n[r]=s)}return n}var xl=e=>e.type==="select-multiple",sv=e=>hs(e)||zn(e),no=e=>hr(e)&&e.isConnected;function ia(e){return Array.isArray(e)||we(e)}function _l(e,t,n="",r=[]){for(const o in e){const s=n?`${n}.${o}`:o,a=e[o];ia(a)&&ia(N(t,s))?_l(a,t,s,r):r.push(s)}return r}var av=e=>{for(const t in e)if(Ze(e[t]))return!0;return!1};function Sl(e){return Array.isArray(e)||we(e)&&!av(e)}function El(e){return!!(e&&"_f"in e)}function Cl(e){return Array.isArray(e)?!e.some(t=>!fe(t)):!Object.keys(e).length}function To(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function Oo(e,t={},n){for(const r in e){const o=e[r],s=n&&n[r];Sl(o)&&(!Array.isArray(o)||!El(s))?(t[r]=Array.isArray(o)?[]:{},Oo(o,t[r],s),Cl(t[r])&&To(t,r)):fe(o)||(t[r]=!0)}return t}function Ht(e,t,n,r){n||(n=Oo(t,{},r));for(const o in e){const s=e[o],a=r&&r[o];Sl(s)&&(!Array.isArray(s)||!El(a))?(fe(t)||Ro(n[o])?n[o]=Oo(s,Array.isArray(s)?[]:{},a):Ht(s,Ae(t)?{}:t[o],n[o],a),Cl(n[o])&&To(n,o)):Ke(s,t[o])?To(n,o):n[o]=!0}return n}var kl=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>fe(e)?e:t?e===""?NaN:e&&+e:n&&Fe(e)?new Date(e):r?r(e):e;function ca(e){const t=e.ref;return Ir(t)?t.files:hs(t)?vl(e.refs).value:xl(t)?[...t.selectedOptions].map(({value:n})=>n):zn(t)?gl(e.refs).value:kl(t.value,e)}var iv=(e,t,n,r)=>{const o={};for(const s of e){const a=N(t,s);a&&le(o,s,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},_n=e=>fe(e)?e:mr(e)?e.source:we(e)?mr(e.value)?e.value.source:e.value:e;const la="AsyncFunction";var cv=e=>{if(!e||!e.validate)return!1;if(Ze(e.validate))return e.validate.constructor.name===la;if(we(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===la)return!0}return!1},lv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ua(e,t,n){const r=N(e,n);if(r||fn(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),a=N(t,s),i=N(e,s);if(a&&!Array.isArray(a)&&n!==s)return{name:n};if(i&&i.type)return{name:s,error:i};if(i&&i.root&&i.root.type)return{name:`${s}.root`,error:i.root};o.pop()}return{name:n}}var uv=(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))},dv=(e,t,n)=>!e||!t||e===t||dr(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),fv=(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,pv=(e,t)=>{const n=N(e,t);!bl(n).length&&!(n!=null&&n.root)&&Ce(e,t)};const hv={mode:ft.onSubmit,reValidateMode:ft.onChange,shouldFocusError:!0},ro="form",mv=(e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},Rl={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function gv(e={}){let t={...hv,...e},n={...ge(Rl),isLoading:Ze(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},o=we(t.defaultValues)||we(t.values)?ge(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:ge(o),a={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},i={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const l={},u={};let p=0,c=Xn(t.mode),h=Xn(t.reValidateMode);const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={...g};let v={...b};const y={array:aa(),state:aa()};let S=0;const x=t.criteriaMode===ft.all,k=(m,w)=>_=>{clearTimeout(u[m]),u[m]=setTimeout(w,_)},E=async m=>{if(!a.keepIsValid&&!t.disabled&&(b.isValid||v.isValid||m)){const w=++S;let _;t.resolver?(_=$e((await ee()).errors),w===S&&C()):_=await ce({fields:r,onlyCheckValid:!0,eventType:Ft.VALID}),w===S&&_!==n.isValid&&y.state.next({isValid:_})}},C=(m,w)=>{!t.disabled&&(b.isValidating||b.validatingFields||v.isValidating||v.validatingFields)&&((m||Array.from(i.mount)).forEach(_=>{_&&(w?le(n.validatingFields,_,w):Ce(n.validatingFields,_))}),y.state.next({validatingFields:n.validatingFields,isValidating:!$e(n.validatingFields)}))},P=()=>{n.dirtyFields=Ht(o,s,void 0,r)},M=(m,w=[],_,O,I=!0,z=!0)=>{if(O&&_&&!t.disabled){if(a.action=!0,!a.actionArrayLengths.has(m)){const D=N(r,m);a.actionArrayLengths.set(m,Array.isArray(D)?D.length:0)}if(z&&Array.isArray(N(r,m))){const D=_(N(r,m),O.argA,O.argB);I&&le(r,m,D)}if(z&&Array.isArray(N(n.errors,m))){const D=N(n.errors,m),$=D.root,Z=_(D,O.argA,O.argB)||D;$&&(Z.root=$),I&&le(n.errors,m,Z),pv(n.errors,m)}if((b.touchedFields||v.touchedFields)&&z&&Array.isArray(N(n.touchedFields,m))){const D=_(N(n.touchedFields,m),O.argA,O.argB);I&&le(n.touchedFields,m,D)}(b.dirtyFields||v.dirtyFields)&&P(),y.state.next({name:m,isDirty:L(m,w),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else le(s,m,w)},F=(m,w)=>{le(n.errors,m,w),n.errors={...n.errors},y.state.next({errors:n.errors})},j=m=>{n.errors=m,y.state.next({errors:n.errors,isValid:!1})},q=m=>{const w=fn(m)?[m]:Tn(m);let _=s,O=o;for(let I=0;I<w.length-1;I++){const z=w[I];if(_=Ae(_)?_:_[z],O=Ae(O)?O:O[z],_===null&&O!==null)return!0}return!1},X=m=>{if(!a.actionArrayLengths.size)return!1;const w=fn(m)?[m]:Tn(m);let _=s,O="",I=-1,z=0;for(let D=0;D<w.length;D++){if(Ae(_))return!1;const $=w[D];if(O=O?`${O}.${$}`:$,Array.isArray(_)&&+$>=_.length)return I===-1?!1:D===I?+$<z:!0;a.actionArrayLengths.has(O)&&(I=D+1,z=a.actionArrayLengths.get(O)),_=_[$]}return!1},A=(m,w,_,O)=>{const I=N(r,m);if(I){if(q(m)||X(m))return;const z=fe(N(s,m)),D=N(s,m,fe(_)?N(o,m):_);fe(D)||O&&O.defaultChecked||w?le(s,m,w?D:ca(I._f)):he(m,D),a.mount&&!a.action&&(E(),z&&n.isDirty&&(b.isDirty||v.isDirty)&&(L()||(n.isDirty=!1,y.state.next({...n}))),e.shouldUnregister&&z&&!fe(N(s,m))&&to(m,i)&&(a.watch=!0))}},V=(m,w,_,O,I)=>{let z=!1,D=!1;const $={name:m};if(!t.disabled||O===!0){if(!_||O){const Z=Ke(N(o,m),w);(b.isDirty||v.isDirty)&&(D=n.isDirty,n.isDirty=$.isDirty=!Z||L(),z=D!==$.isDirty),D=!!N(n.dirtyFields,m),Z!==n.isDirty?mv(n.dirtyFields,Ht(o,s,void 0,r)):Z?Ce(n.dirtyFields,m):le(n.dirtyFields,m,!0),$.dirtyFields=n.dirtyFields,z=z||(b.dirtyFields||v.dirtyFields)&&D!==!Z}if(_){const Z=N(n.touchedFields,m);Z||(le(n.touchedFields,m,_),$.touchedFields=n.touchedFields,z=z||(b.touchedFields||v.touchedFields)&&Z!==_)}z&&I&&y.state.next($)}return z?$:{}},U=(m,w,_,O)=>{const I=N(n.errors,m),z=(b.isValid||v.isValid)&&Qe(w)&&n.isValid!==w;if(t.delayError&&_?(l[m]=k(m,()=>F(m,_)),l[m](t.delayError)):(clearTimeout(u[m]),delete l[m],_?le(n.errors,m,_):Ce(n.errors,m),n.errors={...n.errors}),(_?!Ke(I,_):I)||!$e(O)||z){const D={...O,...z&&Qe(w)?{isValid:w}:{},errors:n.errors,name:m};n={...n,...D},y.state.next(D)}},ee=async m=>(C(m,!0),await t.resolver(s,t.context,iv(m||i.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),W=async m=>{const{errors:w}=await ee(m);if(C(m),m){for(const _ of m){const O=N(w,_);O?i.array.has(_)&&we(O)&&!Object.keys(O).some(I=>!Number.isNaN(Number(I)))?ea(n.errors,{[_]:O},_):le(n.errors,_,O):Ce(n.errors,_)}n.errors={...n.errors}}else n.errors=w;return w},H=async({name:m,eventType:w})=>{if(e.validate){const _=await e.validate({formValues:s,formState:n,name:m,eventType:w});if(we(_))for(const O in _){const I=_[O];I&&ut(`${ro}.${O}`,{message:Fe(I.message)?I.message:"",type:I.type||dt.validate})}else Fe(_)||!_?ut(ro,{message:_||"",type:dt.validate}):lt(ro);return _}return!0},ce=async({fields:m,onlyCheckValid:w,name:_,eventType:O,context:I={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(I.runRootValidation=!0,!await H({name:_,eventType:O})&&(I.valid=!1,w)))return I.valid;for(const z in m){const D=m[z];if(D){const{_f:$,...Z}=D;if($){const B=i.array.has($.name),ye=D._f&&cv(D._f),He=b.validatingFields||b.isValidating||v.validatingFields||v.isValidating;ye&&He&&C([$.name],!0);const nt=await sa(D,i.disabled,s,x,t.shouldUseNativeValidation&&!w,B);if(ye&&He&&C([$.name]),nt[$.name]&&(I.valid=!1,w)||(!w&&(N(nt,$.name)?B?ea(n.errors,nt,$.name):le(n.errors,$.name,nt[$.name]):Ce(n.errors,$.name)),e.shouldUseNativeValidation&&nt[$.name]))break}!$e(Z)&&await ce({context:I,onlyCheckValid:w,fields:Z,name:z,eventType:O})}}return I.valid},re=()=>{for(const m of i.unMount){const w=N(r,m);w&&(w._f.refs?w._f.refs.every(_=>!no(_)):!no(w._f.ref))&&Nt(m)}i.unMount=new Set},L=(m,w)=>(m&&w&&le(s,m,w),!Ke(a.mount?s:o,o)),te=(m,w,_)=>Po(m,i,{...a.mount?s:fe(w)||Fe(m)?o:w},_,w),pe=m=>bl(N(a.mount?s:o,m,t.shouldUnregister?N(o,m,[]):[])),he=(m,w,_={},O=!1,I=!1,z=!1)=>{const D=N(r,m);let $=w;if(D){const Z=D._f;Z&&(!Z.disabled&&le(s,m,kl(w,Z)),$=hr(Z.ref)&&Ae(w)?"":w,xl(Z.ref)?[...Z.ref.options].forEach(B=>B.selected=$.includes(B.value)):Z.refs?zn(Z.ref)?Z.refs.forEach(B=>{(!B.defaultChecked||!B.disabled)&&(Array.isArray($)?B.checked=!!$.find(ye=>ye===B.value):B.checked=$===B.value||!!$)}):Z.refs.forEach(B=>B.checked=B.value===$):Ir(Z.ref)?Z.ref.value="":(Z.ref.value=$,!Z.ref.type&&!I&&!z&&y.state.next({name:m,values:O?s:ge(s)})))}(_.shouldDirty||_.shouldTouch)&&V(m,$,_.shouldTouch,_.shouldDirty,!I),_.shouldValidate&&Se(m,{delayError:_.delayError})},ne=(m,w,_,O=!1,I=!1,z=!1)=>{i.array.has(m)&&y.array.next({name:m,values:O?s:ge(s)});for(const D in w){if(!w.hasOwnProperty(D))return;const $=w[D],Z=m+"."+D,B=N(r,Z);(i.array.has(m)||we($)||B&&!B._f)&&!Pt($)?ne(Z,$,_,O,I,z):he(Z,$,_,O,I,z)}},ie=(m,w,_,O,I=!1)=>{const z=N(r,m),D=i.array.has(m),$=O?w:ge(w),Z=N(s,m),B=Ke(Z,$);if(B||le(s,m,$),D)y.array.next({name:m,values:O?s:ge(s)}),(b.isDirty||b.dirtyFields||v.isDirty||v.dirtyFields)&&_.shouldDirty&&(P(),I||y.state.next({name:m,dirtyFields:n.dirtyFields,isDirty:L(m,$)}));else{const ye=Array.isArray($)&&!$.length||$e($),He=!B&&!I;!z||z._f||Ae($)||ye?he(m,$,_,O,I,He):ne(m,$,_,O,I,He)}if(!B&&!I){const ye=to(m,i),He=O?s:ge(s);y.state.next({...ye&&n,name:a.mount||ye?m:void 0,values:He})}},oe=(m,w,_={})=>ie(m,w,_,!1),_e=(m,w={})=>{const _=Ze(m)?m(s):m;if(!Ke(s,_)){s={...s,..._};const O=yl(_);for(const I of i.mount)I in O&&ie(I,O[I],w,!0,!0);y.state.next({...n,name:void 0,type:void 0,...p?{values:s}:{}}),w.shouldValidate&&E()}},Re=async m=>{a.mount=!0;const w=m.target;let _=w.name,O=!0;const I=N(r,_),z=D=>{O=Number.isNaN(D)||Pt(D)&&isNaN(D.getTime())||Ke(D,N(s,_,D))};if(I){let D,$;const Z=w.type?ca(I._f):ko(m),B=m.type===Ft.BLUR||m.type===Ft.FOCUS_OUT,ye=!lv(I._f)&&!e.validate&&!t.resolver&&!N(n.errors,_)&&!I._f.deps,He=ye||fv(B,N(n.touchedFields,_),n.isSubmitted,h,c),nt=to(_,i,B);if(le(s,_,Z),B){if(!w||!w.readOnly){I._f.onBlur&&I._f.onBlur(m);const me=l[_];me&&me(0)}}else I._f.onChange&&I._f.onChange(m);const jt=V(_,Z,B),Y=!$e(jt)||nt;if(!B&&y.state.next({name:_,type:m.type,...p?{values:ge(s)}:{}}),He)return(!ye||!n.isValid)&&(b.isValid||v.isValid)&&(t.mode==="onBlur"?B&&E():B||E()),Y&&y.state.next({name:_,...nt?{}:jt});if(!t.resolver&&e.validate&&await H({name:_,eventType:m.type}),!B&&nt&&y.state.next({...n}),t.resolver){const{errors:me}=await ee([_]);if(C([_]),z(Z),!O){!$e(jt)&&y.state.next(jt);return}const Ie=ua(n.errors,r,_),je=ua(me,r,Ie.name||_);D=je.error,_=je.name,$=$e(me)}else C([_],!0),D=(await sa(I,i.disabled,s,x,t.shouldUseNativeValidation))[_],C([_]),z(Z),O&&(D?$=!1:(b.isValid||v.isValid)&&($=await ce({fields:r,onlyCheckValid:!0,name:_,eventType:m.type})));O&&(I._f.deps&&(!Array.isArray(I._f.deps)||I._f.deps.length>0)&&Se(I._f.deps),U(_,$,D,jt))}},se=(m,w)=>{if(N(n.errors,w)&&m.focus)return m.focus(),1},Se=async(m,w={})=>{let _,O;const I=dr(m);if(t.resolver){const z=await W(fe(m)?m:I);_=$e(z),O=m?!I.some(D=>N(z,D)):_}else m?(O=(await Promise.all(I.map(async z=>{const D=N(r,z);return await ce({fields:D&&D._f?{[z]:D}:D,eventType:Ft.TRIGGER})}))).every(Boolean),!(!O&&!n.isValid)&&E()):O=_=await ce({fields:r,name:m,eventType:Ft.TRIGGER});if(w.delayError&&t.delayError&&Fe(m)){const z=N(n.errors,m);z?(Ce(n.errors,m),l[m]=k(m,()=>F(m,z)),l[m](t.delayError)):(clearTimeout(u[m]),delete l[m])}return y.state.next({...!Fe(m)||(b.isValid||v.isValid)&&_!==n.isValid?{}:{name:m},...t.resolver||!m?{isValid:_}:{},errors:n.errors}),w.shouldFocus&&!O&&En(r,se,m?I:i.mount),O},tt=(m,w)=>{let _={...a.mount?s:o};return w&&(_=wl(w.dirtyFields?n.dirtyFields:n.touchedFields,_)),fe(m)?_:Fe(m)?N(_,m):m.map(O=>N(_,O))},ct=(m,w)=>({invalid:!!N((w||n).errors,m),isDirty:!!N((w||n).dirtyFields,m),error:N((w||n).errors,m),isValidating:!!N(n.validatingFields,m),isTouched:!!N((w||n).touchedFields,m)}),lt=m=>{const w=m?dr(m):void 0;w==null||w.forEach(_=>Ce(n.errors,_)),w?w.forEach(_=>{y.state.next({name:_,errors:n.errors})}):(n.errors={},y.state.next({errors:n.errors}))},ut=(m,w,_)=>{const O=(N(r,m,{_f:{}})._f||{}).ref,I=N(n.errors,m)||{},{ref:z,message:D,type:$,...Z}=I;le(n.errors,m,{...Z,...w,ref:O}),y.state.next({name:m,errors:n.errors,isValid:!1}),_&&_.shouldFocus&&O&&O.focus&&O.focus()},Qt=(m,w)=>{if(Ze(m)){p++;const{unsubscribe:_}=y.state.subscribe({next:I=>"values"in I&&m(I.values||te(void 0,w),I)});let O=!1;return{unsubscribe:()=>{O||(O=!0,p--,_())}}}return te(m,w,!0)},Et=m=>{var w;const _=!!(!((w=m.formState)===null||w===void 0)&&w.values);_&&p++;const{unsubscribe:O}=y.state.subscribe({next:z=>{if(dv(m.name,z.name,m.exact)&&uv(z,m.formState||b,Ln,m.reRenderRoot)){const D={...s};m.callback({values:D,...n,...z,defaultValues:o})}}});if(!_)return O;let I=!1;return()=>{I||(I=!0,p--,O())}},gt=m=>(a.mount=!0,v={...v,...m.formState},Et({...m,formState:{...g,...m.formState}})),Nt=(m,w={})=>{for(const _ of m?dr(m):i.mount)i.mount.delete(_),i.array.delete(_),w.keepValue||(Ce(r,_),Ce(s,_)),!w.keepError&&Ce(n.errors,_),!w.keepDirty&&Ce(n.dirtyFields,_),!w.keepTouched&&Ce(n.touchedFields,_),!w.keepIsValidating&&Ce(n.validatingFields,_),!t.shouldUnregister&&!w.keepDefaultValue&&Ce(o,_);y.state.next({values:ge(s)}),y.state.next({...n,...w.keepDirty?{isDirty:L()}:{}}),!w.keepIsValid&&E()},We=({disabled:m,name:w})=>{if(Qe(m)&&a.mount||m||i.disabled.has(w)){const I=i.disabled.has(w)!==!!m;m?i.disabled.add(w):i.disabled.delete(w),I&&a.mount&&!a.action&&E()}},Bt=(m,w={})=>{let _=N(r,m);const O=Qe(w.disabled)||Qe(t.disabled),I=!i.registerName.has(m)&&_&&_._f&&!_._f.mount;return le(r,m,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:m}},name:m,mount:!0,...w}}),i.mount.add(m),_&&!I?We({disabled:Qe(w.disabled)?w.disabled:t.disabled,name:m}):A(m,!0,w.value),{...O?{disabled:w.disabled||t.disabled}:{},...t.progressive?{required:!!w.required,min:_n(w.min),max:_n(w.max),minLength:_n(w.minLength),maxLength:_n(w.maxLength),pattern:_n(w.pattern)}:{},name:m,onChange:Re,onBlur:Re,ref:z=>{if(z){i.registerName.add(m),Bt(m,w),i.registerName.delete(m),_=N(r,m);const D=fe(z.value)&&z.querySelectorAll&&z.querySelectorAll("input,select,textarea")[0]||z,$=sv(D),Z=_._f.refs||[];if($?Z.find(ye=>ye===D):D===_._f.ref)return;const B={..._._f};$?(B.refs=[...Z.filter(no),D,...Array.isArray(N(o,m))?[{}]:[]],B.ref={type:D.type,name:m}):(B.ref=D,delete B.refs),le(r,m,{_f:B}),A(m,!1,void 0,D)}else _=N(r,m,{}),_._f&&(_._f.mount=!1),(t.shouldUnregister||w.shouldUnregister)&&!(dl(i.array,m)&&a.action)&&i.unMount.add(m)}}},Wt=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&En(r,se,i.mount),Ee=m=>{Qe(m)&&(y.state.next({disabled:m}),En(r,(w,_)=>{const O=N(r,_);O&&(w.disabled=O._f.disabled||m,Array.isArray(O._f.refs)&&O._f.refs.forEach(I=>{I.disabled=O._f.disabled||m}))},0,!1))},bn=(m,w)=>async _=>{let O,I;_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let z=ge(s);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:D,values:$}=await ee();C(),n.errors=D,z=ge($)}else await ce({fields:r,eventType:Ft.SUBMIT});if(i.disabled.size)for(const D of i.disabled)Ce(z,D);if(Ce(n.errors,pl),$e(n.errors)){y.state.next({errors:{}});try{O=await m(z,_)}catch(D){I=D}}else w&&await w({...n.errors},_),Wt(),setTimeout(Wt);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},Mt=(m,w={})=>{N(r,m)&&(fe(w.defaultValue)?oe(m,ge(N(o,m))):(oe(m,w.defaultValue),le(o,m,ge(w.defaultValue))),w.keepTouched||Ce(n.touchedFields,m),w.keepDirty||(Ce(n.dirtyFields,m),n.isDirty=w.defaultValue?L(m,ge(N(o,m))):L()),w.keepError||(Ce(n.errors,m),b.isValid&&E()),y.state.next({...n}))},$n=(m,w={})=>{const _=m?ge(m):o,O=ge(_),I=$e(m),z=O,D=r;if(w.keepDefaultValues||(o=_),!w.keepValues){if(w.keepDirtyValues){const $=new Set([...i.mount,..._l(Ht(o,s,void 0,D),n.dirtyFields)]);for(const Z of Array.from($)){const B=N(n.dirtyFields,Z),ye=N(s,Z),He=N(z,Z);B&&!fe(ye)?le(z,Z,ye):!B&&!fe(He)&&oe(Z,He)}}else{if(Ar&&fe(m))for(const $ of i.mount){const Z=N(r,$);if(Z&&Z._f){const B=Array.isArray(Z._f.refs)?Z._f.refs[0]:Z._f.ref;if(hr(B)){const ye=B.closest("form");if(ye){ye.reset();break}}}}if(w.keepFieldsRef)for(const $ of i.mount)oe($,N(z,$));else r={}}if(t.shouldUnregister){if(s=w.keepDefaultValues?ge(o):{},w.keepFieldsRef)for(const $ of i.mount)le(s,$,N(z,$))}else s=ge(z);y.array.next({values:{...z}}),y.state.next({name:void 0,type:void 0,values:{...z}})}i={mount:w.keepDirtyValues?i.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!b.isValid||!!w.keepIsValid||!!w.keepDirtyValues||!t.shouldUnregister&&!$e(z),a.watch=!!t.shouldUnregister,a.keepIsValid=!!w.keepIsValid,a.action=!1,a.actionArrayLengths.clear(),w.keepErrors||(n.errors={}),y.state.next({submitCount:w.keepSubmitCount?n.submitCount:0,isDirty:I?!1:w.keepDirty?n.isDirty:w.keepValues?L():!!(w.keepDefaultValues&&!Ke(m,o)),isSubmitted:w.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:I?{}:w.keepDirtyValues?w.keepDefaultValues&&s?Ht(o,s,void 0,D):n.dirtyFields:w.keepDefaultValues&&m?Ht(o,m,void 0,D):w.keepDirty?n.dirtyFields:{},touchedFields:w.keepTouched?n.touchedFields:{},errors:w.keepErrors?n.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Fn=(m,w)=>$n(Ze(m)?m(s):m,{...t.resetOptions,...w}),en=(m,w={})=>{const _=N(r,m),O=_&&_._f;if(O){const I=O.refs?O.refs[0]:O.ref;I.focus&&setTimeout(()=>{I.focus(),w.shouldSelect&&Ze(I.select)&&I.select()})}},Ln=m=>{const{name:w,type:_,values:O,...I}=m;n={...n,...I}};y.state.subscribe({next:Ln});const Ct={control:{register:Bt,unregister:Nt,getFieldState:ct,handleSubmit:bn,setError:ut,_subscribe:Et,_runSchema:ee,_updateIsValidating:C,_focusError:Wt,_getWatch:te,_getDirty:L,_setValid:E,_setFieldArray:M,_setDisabledField:We,_setErrors:j,_getFieldArray:pe,_reset:$n,_resetDefaultValues:()=>Ze(t.defaultValues)&&t.defaultValues().then(m=>{Fn(m,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:re,_disableForm:Ee,_subjects:y,_proxyFormState:b,get _fields(){return r},get _formValues(){return s},get _state(){return a},set _state(m){a=m},get _defaultValues(){return o},get _names(){return i},set _names(m){i=m},get _formState(){return n},get _options(){return t},set _options(m){t={...t,...m},c=Xn(t.mode),h=Xn(t.reValidateMode)}},subscribe:gt,trigger:Se,register:Bt,handleSubmit:bn,watch:Qt,setValue:oe,setValues:_e,getValues:tt,reset:Fn,resetField:Mt,resetDefaultValues:(m,w={})=>{if(o=ge(m),!w.keepDirty){const _=Ht(o,s,void 0,r);n.dirtyFields=_,n.isDirty=!$e(_)}w.keepIsValid||E(),y.state.next({...n,defaultValues:o})},clearErrors:lt,unregister:Nt,setError:ut,setFocus:en,getFieldState:ct};return{...Ct,formControl:Ct}}function vv(e={}){const t=R.useRef(void 0),n=R.useRef(void 0),r=R.useRef(e.formControl),[o,s]=R.useState(()=>({...ge(Rl),isLoading:Ze(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Ze(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&&!Ze(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:u,...p}=gv(e);t.current={...p,formState:o}}const a=t.current.control;a._options=e;const{resyncIfNeeded:i,snapshot:l}=ps();return fs(()=>{const u=()=>({...a._formState,defaultValues:a._defaultValues});i(!0,u,s);const p=a._subscribe({formState:a._proxyFormState,callback:()=>s({...a._formState,defaultValues:a._defaultValues}),reRenderRoot:!0});return s(c=>({...c,isReady:!0})),a._formState.isReady=!0,()=>{p(),l(!0,u)}},[a,i,l]),R.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),R.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),R.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),R.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),R.useEffect(()=>{if(a._proxyFormState.isDirty){const u=a._getDirty();u!==o.isDirty&&a._subjects.state.next({isDirty:u})}},[a,o.isDirty]),R.useEffect(()=>{var u;e.values&&!Ke(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((u=a._options.resetOptions)===null||u===void 0)&&u.keepIsValid||a._setValid(),n.current=e.values,s(p=>({...p}))):a._resetDefaultValues()},[a,e.values]),R.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=R.useMemo(()=>ml(o,a),[a,o]),t.current}const da=(e,t,n)=>{if(e&&"reportValidity"in e){const r=N(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Io=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?da(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>da(o,n,e))}},fa=(e,t)=>{t.shouldUseNativeValidation&&Io(e,t);const n={};for(const r in e){const o=N(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.refs?o.refs[0]:o&&o.ref});if(bv(t.names||Object.keys(e),r)){const a=Object.assign({},N(n,r));le(a,"root",s),le(n,r,a)}else le(n,r,s)}return n},bv=(e,t)=>{const n=pa(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>pa(r).match(`^${n}\\.\\d+`))};function pa(e){return e.replace(/[\[\]]/g,"")}function Ao(){return Ao=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},Ao.apply(null,arguments)}function ha(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function yv(e,t){for(var n=Object.create(null);e.length;){var r=e[0],o=r.code,s=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var i,l,u=r.unionErrors.reduce(function(h,g){return g.errors.length<h.errors.length?g:h}).errors[0];n[a]={message:(i=u==null?void 0:u.message)!=null?i:s,type:(l=u==null?void 0:u.code)!=null?l:o}}else n[a]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(h){return h.errors.forEach(function(g){return e.push(g)})}),t){var p=n[a].types,c=p&&p[r.code];n[a]=ms(a,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n}function wv(e,t){for(var n=Object.create(null),r=function(){var o=e[0],s=o.code,a=o.message,i=o.path.join(".");if(!n[i])if(o.code==="invalid_union"&&o.errors.length>0){var l,u,p=o.errors.reduce(function(g,b){return b.length<g.length?b:g})[0];n[i]={message:(l=p==null?void 0:p.message)!=null?l:a,type:(u=p==null?void 0:p.code)!=null?u:s}}else n[i]={message:a,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(g){return g.forEach(function(b){return e.push(Ao({},b,{path:[].concat(o.path,b.path)}))})}),t){var c=n[i].types,h=c&&c[o.code];n[i]=ms(i,t,n,s,h?[].concat(h,o.message):o.message)}e.shift()};e.length;)r();return n}function xv(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(ha(function(){function a(l){return s.shouldUseNativeValidation&&Io({},s),{errors:{},values:n.raw?Object.assign({},r):l}}var i=e;return n.mode==="sync"?a(i.parse(r,t)):Promise.resolve(i.parseAsync(r,t)).then(a)},function(a){if((function(i){var l;return!(i==null||(l=i._zod)==null||(l=l.traits)==null||!l.has("$ZodError"))})(a))return{values:{},errors:fa(wv(a.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};if((function(r){return"_def"in r&&typeof r._def=="object"})(e))return function(r,o,s){try{return Promise.resolve(ha(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(a){return s.shouldUseNativeValidation&&Io({},s),{errors:{},values:n.raw?Object.assign({},r):a}})},function(a){if((function(i){return Array.isArray(i==null?void 0:i.issues)})(a))return{values:{},errors:fa(yv(a.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}var ma;function T(e,t,n){function r(i,l){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,l);const u=a.prototype,p=Object.keys(u);for(let c=0;c<p.length;c++){const h=p[c];h in i||(i[h]=u[h].bind(i))}}const o=(n==null?void 0:n.Parent)??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function a(i){var l;const u=n!=null&&n.Parent?new s:this;r(u,i),(l=u._zod).deferred??(l.deferred=[]);for(const p of u._zod.deferred)p();return u}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>{var l,u;return n!=null&&n.Parent&&i instanceof n.Parent?!0:(u=(l=i==null?void 0:i._zod)==null?void 0:l.traits)==null?void 0:u.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class un extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pl extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(ma=globalThis).__zod_globalConfig??(ma.__zod_globalConfig={});const gs=globalThis.__zod_globalConfig;function Gt(e){return gs}function Tl(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 Do(e,t){return typeof t=="bigint"?t.toString():t}function vs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function bs(e){return e==null}function ys(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ga=Symbol("evaluating");function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ga)return r===void 0&&(r=ga,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Xt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zt(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function va(e){return JSON.stringify(e)}function _v(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ol="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Sv=vs(()=>{var e;if(gs.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 On(e){if(gr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(gr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Il(e){return On(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ev=new Set(["string","number","symbol"]);function Dr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ut(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 K(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 Cv(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function kv(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=Zt(e._zod.def,{get shape(){const a={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=n.shape[i])}return Xt(this,"shape",a),a},checks:[]});return Ut(e,s)}function Rv(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=Zt(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete a[i]}return Xt(this,"shape",a),a},checks:[]});return Ut(e,s)}function Pv(e,t){if(!On(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 a in t)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Zt(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Xt(this,"shape",s),s}});return Ut(e,o)}function Tv(e,t){if(!On(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Zt(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Xt(this,"shape",r),r}});return Ut(e,n)}function Ov(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Zt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Xt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ut(e,n)}function Iv(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Zt(t._zod.def,{get shape(){const i=t._zod.def.shape,l={...i};if(n)for(const u in n){if(!(u in i))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:i[u]}):i[u])}else for(const u in i)l[u]=e?new e({type:"optional",innerType:i[u]}):i[u];return Xt(this,"shape",l),l},checks:[]});return Ut(t,a)}function Av(e,t,n){const r=Zt(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const a in n){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)s[a]=new e({type:"nonoptional",innerType:o[a]});return Xt(this,"shape",s),s}});return Ut(t,r)}function an(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 Dv(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 Al(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Qn(e){return typeof e=="string"?e:e==null?void 0:e.message}function Kt(e,t,n){var l,u,p,c,h,g;const r=e.message?e.message:Qn((p=(u=(l=e.inst)==null?void 0:l._zod.def)==null?void 0:u.error)==null?void 0:p.call(u,e))??Qn((c=t==null?void 0:t.error)==null?void 0:c.call(t,e))??Qn((h=n.customError)==null?void 0:h.call(n,e))??Qn((g=n.localeError)==null?void 0:g.call(n,e))??"Invalid input",{inst:o,continue:s,input:a,...i}=e;return i.path??(i.path=[]),i.message=r,t!=null&&t.reportInput&&(i.input=a),i}function ws(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function In(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Dl=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Do,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Nl=T("$ZodError",Dl),Ml=T("$ZodError",Dl,{Parent:Error});function Nv(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Mv(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>r({issues:i},[...s,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...s,...a.path]);else{const i=[...s,...a.path];if(i.length===0)n._errors.push(t(a));else{let l=n,u=0;for(;u<i.length;){const p=i[u];u===i.length-1?(l[p]=l[p]||{_errors:[]},l[p]._errors.push(t(a))):l[p]=l[p]||{_errors:[]},l=l[p],u++}}}};return r(e),n}const xs=e=>(t,n,r,o)=>{const s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new un;if(a.issues.length){const i=new((o==null?void 0:o.Err)??e)(a.issues.map(l=>Kt(l,s,Gt())));throw Ol(i,o==null?void 0:o.callee),i}return a.value},_s=e=>async(t,n,r,o)=>{const s=r?{...r,async:!0}:{async:!0};let a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new((o==null?void 0:o.Err)??e)(a.issues.map(l=>Kt(l,s,Gt())));throw Ol(i,o==null?void 0:o.callee),i}return a.value},Nr=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 un;return s.issues.length?{success:!1,error:new(e??Nl)(s.issues.map(a=>Kt(a,o,Gt())))}:{success:!0,data:s.value}},jv=Nr(Ml),Mr=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(a=>Kt(a,o,Gt())))}:{success:!0,data:s.value}},zv=Mr(Ml),$v=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return xs(e)(t,n,o)},Fv=e=>(t,n,r)=>xs(e)(t,n,r),Lv=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return _s(e)(t,n,o)},Vv=e=>async(t,n,r)=>_s(e)(t,n,r),Zv=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Nr(e)(t,n,o)},Uv=e=>(t,n,r)=>Nr(e)(t,n,r),Bv=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Mr(e)(t,n,o)},Wv=e=>async(t,n,r)=>Mr(e)(t,n,r),Hv=/^[cC][0-9a-z]{6,}$/,Gv=/^[0-9a-z]+$/,Kv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Yv=/^[0-9a-vA-V]{20}$/,Jv=/^[A-Za-z0-9]{27}$/,qv=/^[a-zA-Z0-9_-]{21}$/,Xv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qv=/^([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})$/,ba=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)$/,eb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function nb(){return new RegExp(tb,"u")}const rb=/^(?:(?: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])$/,ob=/^(([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}|:))$/,sb=/^((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])$/,ab=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ib=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,jl=/^[A-Za-z0-9_-]*$/,cb=/^https?$/,lb=/^\+[1-9]\d{6,14}$/,zl="(?:(?:\\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])))",ub=new RegExp(`^${zl}$`);function $l(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function db(e){return new RegExp(`^${$l(e)}$`)}function fb(e){const t=$l({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${zl}T(?:${r})$`)}const pb=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}$`)},hb=/^(?:true|false)$/i,mb=/^[^A-Z]*$/,gb=/^[^a-z]*$/,St=T("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vb=T("$ZodCheckMaxLength",(e,t)=>{var n;St.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!bs(o)&&o.length!==void 0}),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;if(o.length<=t.maximum)return;const a=ws(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),bb=T("$ZodCheckMinLength",(e,t)=>{var n;St.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!bs(o)&&o.length!==void 0}),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;if(o.length>=t.minimum)return;const a=ws(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yb=T("$ZodCheckLengthEquals",(e,t)=>{var n;St.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!bs(o)&&o.length!==void 0}),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;if(s===t.length)return;const a=ws(o),i=s>t.length;r.issues.push({origin:a,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),jr=T("$ZodCheckStringFormat",(e,t)=>{var n,r;St.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=()=>{})}),wb=T("$ZodCheckRegex",(e,t)=>{jr.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})}}),xb=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mb),jr.init(e,t)}),_b=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=gb),jr.init(e,t)}),Sb=T("$ZodCheckIncludes",(e,t)=>{St.init(e,t);const n=Dr(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})}}),Eb=T("$ZodCheckStartsWith",(e,t)=>{St.init(e,t);const n=new RegExp(`^${Dr(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})}}),Cb=T("$ZodCheckEndsWith",(e,t)=>{St.init(e,t);const n=new RegExp(`.*${Dr(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})}}),kb=T("$ZodCheckOverwrite",(e,t)=>{St.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Rb{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}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(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
149
- `))}}const Pb={major:4,minor:4,patch:3},Te=T("$ZodType",(e,t)=>{var o;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pb;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const a of s._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const s=(i,l,u)=>{let p=an(i),c;for(const h of l){if(h._zod.def.when){if(Dv(i)||!h._zod.def.when(i))continue}else if(p)continue;const g=i.issues.length,b=h._zod.check(i);if(b instanceof Promise&&(u==null?void 0:u.async)===!1)throw new un;if(c||b instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await b,i.issues.length!==g&&(p||(p=an(i,g)))});else{if(i.issues.length===g)continue;p||(p=an(i,g))}}return c?c.then(()=>i):i},a=(i,l,u)=>{if(an(i))return i.aborted=!0,i;const p=s(l,r,u);if(p instanceof Promise){if(u.async===!1)throw new un;return p.then(c=>e._zod.parse(c,u))}return e._zod.parse(p,u)};e._zod.run=(i,l)=>{if(l.skipChecks)return e._zod.parse(i,l);if(l.direction==="backward"){const p=e._zod.parse({value:i.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(c=>a(c,i,l)):a(p,i,l)}const u=e._zod.parse(i,l);if(u instanceof Promise){if(l.async===!1)throw new un;return u.then(p=>s(p,r,l))}return s(u,r,l)}}ue(e,"~standard",()=>({validate:s=>{var a;try{const i=jv(e,s);return i.success?{value:i.data}:{issues:(a=i.error)==null?void 0:a.issues}}catch{return zv(e,s).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Ss=T("$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()??pb(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}}),be=T("$ZodStringFormat",(e,t)=>{jr.init(e,t),Ss.init(e,t)}),Tb=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qv),be.init(e,t)}),Ob=T("$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=ba(r))}else t.pattern??(t.pattern=ba());be.init(e,t)}),Ib=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=eb),be.init(e,t)}),Ab=T("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=n=>{var r;try{const o=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===cb.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.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&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Db=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nb()),be.init(e,t)}),Nb=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qv),be.init(e,t)}),Mb=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Hv),be.init(e,t)}),jb=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gv),be.init(e,t)}),zb=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kv),be.init(e,t)}),$b=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Yv),be.init(e,t)}),Fb=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jv),be.init(e,t)}),Lb=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fb(t)),be.init(e,t)}),Vb=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ub),be.init(e,t)}),Zb=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=db(t)),be.init(e,t)}),Ub=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xv),be.init(e,t)}),Bb=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rb),be.init(e,t),e._zod.bag.format="ipv4"}),Wb=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ob),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Hb=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sb),be.init(e,t)}),Gb=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ab),be.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Fl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Kb=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ib),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Fl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Yb(e){if(!jl.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fl(n)}const Jb=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=jl),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Yb(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),qb=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=lb),be.init(e,t)});function Xb(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 Qb=T("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=n=>{Xb(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),ey=T("$ZodBoolean",(e,t)=>{Te.init(e,t),e._zod.pattern=hb,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}}),ty=T("$ZodUnknown",(e,t)=>{Te.init(e,t),e._zod.parse=n=>n}),ny=T("$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 ya(e,t,n){e.issues.length&&t.issues.push(...Al(n,e.issues)),t.value[n]=e.value}const ry=T("$ZodArray",(e,t)=>{Te.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let a=0;a<o.length;a++){const i=o[a],l=t.element._zod.run({value:i,issues:[]},r);l instanceof Promise?s.push(l.then(u=>ya(u,n,a))):ya(l,n,a)}return s.length?Promise.all(s).then(()=>n):n}});function vr(e,t,n,r,o,s){const a=n in r;if(e.issues.length){if(o&&s&&!a)return;t.issues.push(...Al(n,e.issues))}if(!a&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Ll(e){var r,o,s,a;const t=Object.keys(e.shape);for(const i of t)if(!((a=(s=(o=(r=e.shape)==null?void 0:r[i])==null?void 0:o._zod)==null?void 0:s.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=Cv(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Vl(e,t,n,r,o,s){const a=[],i=o.keySet,l=o.catchall._zod,u=l.def.type,p=l.optin==="optional",c=l.optout==="optional";for(const h in t){if(h==="__proto__"||i.has(h))continue;if(u==="never"){a.push(h);continue}const g=l.run({value:t[h],issues:[]},r);g instanceof Promise?e.push(g.then(b=>vr(b,n,h,t,p,c))):vr(g,n,h,t,p,c)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const oy=T("$ZodObject",(e,t)=>{Te.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const i=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...i};return Object.defineProperty(t,"shape",{value:l}),l}})}const r=vs(()=>Ll(t));ue(e._zod,"propValues",()=>{const i=t.shape,l={};for(const u in i){const p=i[u]._zod;if(p.values){l[u]??(l[u]=new Set);for(const c of p.values)l[u].add(c)}}return l});const o=gr,s=t.catchall;let a;e._zod.parse=(i,l)=>{a??(a=r.value);const u=i.value;if(!o(u))return i.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),i;i.value={};const p=[],c=a.shape;for(const h of a.keys){const g=c[h],b=g._zod.optin==="optional",v=g._zod.optout==="optional",y=g._zod.run({value:u[h],issues:[]},l);y instanceof Promise?p.push(y.then(S=>vr(S,i,h,u,b,v))):vr(y,i,h,u,b,v)}return s?Vl(p,u,i,l,r.value,e):p.length?Promise.all(p).then(()=>i):i}}),sy=T("$ZodObjectJIT",(e,t)=>{oy.init(e,t);const n=e._zod.parse,r=vs(()=>Ll(t)),o=h=>{var k,E;const g=new Rb(["shape","payload","ctx"]),b=r.value,v=C=>{const P=va(C);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};g.write("const input = payload.value;");const y=Object.create(null);let S=0;for(const C of b.keys)y[C]=`key_${S++}`;g.write("const newResult = {};");for(const C of b.keys){const P=y[C],M=va(C),F=h[C],j=((k=F==null?void 0:F._zod)==null?void 0:k.optin)==="optional",q=((E=F==null?void 0:F._zod)==null?void 0:E.optout)==="optional";g.write(`const ${P} = ${v(C)};`),j&&q?g.write(`
150
- if (${P}.issues.length) {
151
- if (${M} in input) {
152
- payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
153
- ...iss,
154
- path: iss.path ? [${M}, ...iss.path] : [${M}]
155
- })));
156
- }
157
- }
158
-
159
- if (${P}.value === undefined) {
160
- if (${M} in input) {
161
- newResult[${M}] = undefined;
162
- }
163
- } else {
164
- newResult[${M}] = ${P}.value;
165
- }
166
-
167
- `):j?g.write(`
168
- if (${P}.issues.length) {
169
- payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
170
- ...iss,
171
- path: iss.path ? [${M}, ...iss.path] : [${M}]
172
- })));
173
- }
174
-
175
- if (${P}.value === undefined) {
176
- if (${M} in input) {
177
- newResult[${M}] = undefined;
178
- }
179
- } else {
180
- newResult[${M}] = ${P}.value;
181
- }
182
-
183
- `):g.write(`
184
- const ${P}_present = ${M} in input;
185
- if (${P}.issues.length) {
186
- payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
187
- ...iss,
188
- path: iss.path ? [${M}, ...iss.path] : [${M}]
189
- })));
190
- }
191
- if (!${P}_present && !${P}.issues.length) {
192
- payload.issues.push({
193
- code: "invalid_type",
194
- expected: "nonoptional",
195
- input: undefined,
196
- path: [${M}]
197
- });
198
- }
199
-
200
- if (${P}_present) {
201
- if (${P}.value === undefined) {
202
- newResult[${M}] = undefined;
203
- } else {
204
- newResult[${M}] = ${P}.value;
205
- }
206
- }
207
-
208
- `)}g.write("payload.value = newResult;"),g.write("return payload;");const x=g.compile();return(C,P)=>x(h,C,P)};let s;const a=gr,i=!gs.jitless,u=i&&Sv.value,p=t.catchall;let c;e._zod.parse=(h,g)=>{c??(c=r.value);const b=h.value;return a(b)?i&&u&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(s||(s=o(t.shape)),h=s(h,g),p?Vl([],b,h,g,c,e):h):n(h,g):(h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h)}});function wa(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=>!an(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(a=>Kt(a,r,Gt())))}),t)}const ay=T("$ZodUnion",(e,t)=>{Te.init(e,t),ue(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ue(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ue(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ue(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>ys(o.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 a=[];for(const i of t.options){const l=i._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(i=>wa(i,r,e,o)):wa(a,r,e,o)}}),iy=T("$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),a=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([l,u])=>xa(n,l,u)):xa(n,s,a)}});function No(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(On(e)&&On(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const a=No(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};o[s]=a.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],a=No(o,s);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function xa(e,t,n){const r=new Map;let o;for(const i of t.issues)if(i.code==="unrecognized_keys"){o??(o=i);for(const l of i.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(i);for(const i of n.issues)if(i.code==="unrecognized_keys")for(const l of i.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(i);const s=[...r].filter(([,i])=>i.l&&i.r).map(([i])=>i);if(s.length&&o&&e.issues.push({...o,keys:s}),an(e))return e;const a=No(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const cy=T("$ZodEnum",(e,t)=>{Te.init(e,t);const n=Tl(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Ev.has(typeof o)).map(o=>typeof o=="string"?Dr(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),ly=T("$ZodTransform",(e,t)=>{Te.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Pl(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n.fallback=!0,n));if(o instanceof Promise)throw new un;return n.value=o,n.fallback=!0,n}});function _a(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Zl=T("$ZodOptional",(e,t)=>{Te.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ue(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ys(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(a=>_a(a,o)):_a(s,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),uy=T("$ZodExactOptional",(e,t)=>{Zl.init(e,t),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),dy=T("$ZodNullable",(e,t)=>{Te.init(e,t),ue(e._zod,"optin",()=>t.innerType._zod.optin),ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${ys(n.source)}|null)$`):void 0}),ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),fy=T("$ZodDefault",(e,t)=>{Te.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.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=>Sa(s,t)):Sa(o,t)}});function Sa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const py=T("$ZodPrefault",(e,t)=>{Te.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.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))}),hy=T("$ZodNonOptional",(e,t)=>{Te.init(e,t),ue(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>Ea(s,e)):Ea(o,e)}});function Ea(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const my=T("$ZodCatch",(e,t)=>{Te.init(e,t),e._zod.optin="optional",ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"values",()=>t.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(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(a=>Kt(a,r,Gt()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Kt(s,r,Gt()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),gy=T("$ZodPipe",(e,t)=>{Te.init(e,t),ue(e._zod,"values",()=>t.in._zod.values),ue(e._zod,"optin",()=>t.in._zod.optin),ue(e._zod,"optout",()=>t.out._zod.optout),ue(e._zod,"propValues",()=>t.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(a=>er(a,t.in,r)):er(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>er(s,t.out,r)):er(o,t.out,r)}});function er(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const vy=T("$ZodReadonly",(e,t)=>{Te.init(e,t),ue(e._zod,"propValues",()=>t.innerType._zod.propValues),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ue(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.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(Ca):Ca(o)}});function Ca(e){return e.value=Object.freeze(e.value),e}const by=T("$ZodCustom",(e,t)=>{St.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=>ka(s,n,r,e));ka(o,n,r,e)}});function ka(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(In(o))}}var Ra;class yy{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 wy(){return new yy}(Ra=globalThis).__zod_globalRegistry??(Ra.__zod_globalRegistry=wy());const Sn=globalThis.__zod_globalRegistry;function xy(e,t){return new e({type:"string",...K(t)})}function _y(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...K(t)})}function Pa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...K(t)})}function Sy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...K(t)})}function Ey(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...K(t)})}function Cy(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...K(t)})}function ky(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...K(t)})}function Ry(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...K(t)})}function Py(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...K(t)})}function Ty(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...K(t)})}function Oy(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...K(t)})}function Iy(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...K(t)})}function Ay(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...K(t)})}function Dy(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...K(t)})}function Ny(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...K(t)})}function My(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...K(t)})}function jy(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...K(t)})}function zy(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...K(t)})}function $y(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...K(t)})}function Fy(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...K(t)})}function Ly(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...K(t)})}function Vy(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...K(t)})}function Zy(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...K(t)})}function Uy(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...K(t)})}function By(e,t){return new e({type:"string",format:"date",check:"string_format",...K(t)})}function Wy(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...K(t)})}function Hy(e,t){return new e({type:"string",format:"duration",check:"string_format",...K(t)})}function Gy(e,t){return new e({type:"boolean",...K(t)})}function Ky(e){return new e({type:"unknown"})}function Yy(e,t){return new e({type:"never",...K(t)})}function Ul(e,t){return new vb({check:"max_length",...K(t),maximum:e})}function br(e,t){return new bb({check:"min_length",...K(t),minimum:e})}function Bl(e,t){return new yb({check:"length_equals",...K(t),length:e})}function Jy(e,t){return new wb({check:"string_format",format:"regex",...K(t),pattern:e})}function qy(e){return new xb({check:"string_format",format:"lowercase",...K(e)})}function Xy(e){return new _b({check:"string_format",format:"uppercase",...K(e)})}function Qy(e,t){return new Sb({check:"string_format",format:"includes",...K(t),includes:e})}function ew(e,t){return new Eb({check:"string_format",format:"starts_with",...K(t),prefix:e})}function tw(e,t){return new Cb({check:"string_format",format:"ends_with",...K(t),suffix:e})}function vn(e){return new kb({check:"overwrite",tx:e})}function nw(e){return vn(t=>t.normalize(e))}function rw(){return vn(e=>e.trim())}function ow(){return vn(e=>e.toLowerCase())}function sw(){return vn(e=>e.toUpperCase())}function aw(){return vn(e=>_v(e))}function iw(e,t,n){return new e({type:"array",element:t,...K(n)})}function cw(e,t,n){return new e({type:"custom",check:"custom",fn:t,...K(n)})}function lw(e,t){const n=uw(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(In(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(In(s))}},e(r.value,r)),t);return n}function uw(e,t){const n=new St({check:"custom",...K(t)});return n._zod.check=e,n}function Wl(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)??Sn,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,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Le(e,t,n={path:[],schemaPath:[]}){var p,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 a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const i=(c=(p=e._zod).toJSONSchema)==null?void 0:c.call(p);if(i)a.schema=i;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const b=a.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,b,h)}const g=e._zod.parent;g&&(a.ref||(a.ref=g),Le(g,t,h),t.seen.get(g).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Ue(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Hl(e,t){var a,i,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const p of e.seen.entries()){const c=(a=e.metadataRegistry.get(p[0]))==null?void 0:a.id;if(c){const h=r.get(c);if(h&&h!==p[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,p[0])}}const o=p=>{var v;const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(v=e.external.registry.get(p[0]))==null?void 0:v.id,S=e.external.uri??(k=>k);if(y)return{ref:S(y)};const x=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=x,{defId:x,ref:`${S("__shared")}#/${c}/${x}`}}if(p[1]===n)return{ref:"#"};const g=`#/${c}/`,b=p[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:g+b}},s=p=>{if(p[1].schema.$ref)return;const c=p[1],{ref:h,defId:g}=o(p);c.def={...c.schema},g&&(c.defId=g);const b=c.schema;for(const v in b)delete b[v];b.$ref=h};if(e.cycles==="throw")for(const p of e.seen.entries()){const c=p[1];if(c.cycle)throw new Error(`Cycle detected: #/${(i=c.cycle)==null?void 0:i.join("/")}/<root>
209
-
210
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of e.seen.entries()){const c=p[1];if(t===p[0]){s(p);continue}if(e.external){const g=(l=e.external.registry.get(p[0]))==null?void 0:l.id;if(t!==p[0]&&g){s(p);continue}}if((u=e.metadataRegistry.get(p[0]))==null?void 0:u.id){s(p);continue}if(c.cycle){s(p);continue}if(c.count>1&&e.reused==="ref"){s(p);continue}}}function Gl(e,t){var i,l,u,p;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const h=e.seen.get(c);if(h.ref===null)return;const g=h.def??h.schema,b={...g},v=h.ref;if(h.ref=null,v){r(v);const S=e.seen.get(v),x=S.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(x)):Object.assign(g,x),Object.assign(g,b),c._zod.parent===v)for(const E in g)E==="$ref"||E==="allOf"||E in b||delete g[E];if(x.$ref&&S.def)for(const E in g)E==="$ref"||E==="allOf"||E in S.def&&JSON.stringify(g[E])===JSON.stringify(S.def[E])&&delete g[E]}const y=c._zod.parent;if(y&&y!==v){r(y);const S=e.seen.get(y);if(S!=null&&S.schema.$ref&&(g.$ref=S.schema.$ref,S.def))for(const x in g)x==="$ref"||x==="allOf"||x in S.def&&JSON.stringify(g[x])===JSON.stringify(S.def[x])&&delete g[x]}e.override({zodSchema:c,jsonSchema:g,path:h.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);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,(i=e.external)!=null&&i.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)}Object.assign(o,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 a=((p=e.external)==null?void 0:p.defs)??{};for(const c of e.seen.entries()){const h=c[1];h.def&&h.defId&&(h.def.id===h.defId&&delete h.def.id,a[h.defId]=h.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:yr(t,"input",e.processors),output:yr(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Ue(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 Ue(r.element,n);if(r.type==="set")return Ue(r.valueType,n);if(r.type==="lazy")return Ue(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")return Ue(r.innerType,n);if(r.type==="intersection")return Ue(r.left,n)||Ue(r.right,n);if(r.type==="record"||r.type==="map")return Ue(r.keyType,n)||Ue(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ue(r.in,n)||Ue(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Ue(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Ue(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Ue(o,n))return!0;return!!(r.rest&&Ue(r.rest,n))}return!1}const dw=(e,t={})=>n=>{const r=Wl({...n,processors:t});return Le(e,r),Hl(r,e),Gl(r,e)},yr=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},a=Wl({...o??{},target:s,io:t,processors:n});return Le(e,a),Hl(a,e),Gl(a,e)},fw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},pw=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:a,format:i,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof a=="number"&&(o.maxLength=a),i&&(o.format=fw[i]??i,o.format===""&&delete o.format,i==="time"&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){const p=[...l];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(c=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},hw=(e,t,n,r)=>{n.type="boolean"},mw=(e,t,n,r)=>{n.not={}},gw=(e,t,n,r)=>{},vw=(e,t,n,r)=>{const o=e._zod.def,s=Tl(o.entries);s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),n.enum=s},bw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},yw=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ww=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:a,maximum:i}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof i=="number"&&(o.maxItems=i),o.type="array",o.items=Le(s.element,t,{...r,path:[...r.path,"items"]})},xw=(e,t,n,r)=>{var u;const o=n,s=e._zod.def;o.type="object",o.properties={};const a=s.shape;for(const p in a)o.properties[p]=Le(a[p],t,{...r,path:[...r.path,"properties",p]});const i=new Set(Object.keys(a)),l=new Set([...i].filter(p=>{const c=s.shape[p]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));l.size>0&&(o.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Le(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},_w=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,a=o.options.map((i,l)=>Le(i,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=a:n.anyOf=a},Sw=(e,t,n,r)=>{const o=e._zod.def,s=Le(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Le(o.right,t,{...r,path:[...r.path,"allOf",1]}),i=u=>"allOf"in u&&Object.keys(u).length===1,l=[...i(s)?s.allOf:[s],...i(a)?a.allOf:[a]];n.allOf=l},Ew=(e,t,n,r)=>{const o=e._zod.def,s=Le(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},Cw=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},kw=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Rw=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Pw=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Tw=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?o.out:o.in:o.out;Le(a,t,r);const i=t.seen.get(e);i.ref=a},Ow=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},Kl=(e,t,n,r)=>{const o=e._zod.def;Le(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Iw=T("ZodISODateTime",(e,t)=>{Lb.init(e,t),xe.init(e,t)});function Aw(e){return Uy(Iw,e)}const Dw=T("ZodISODate",(e,t)=>{Vb.init(e,t),xe.init(e,t)});function Nw(e){return By(Dw,e)}const Mw=T("ZodISOTime",(e,t)=>{Zb.init(e,t),xe.init(e,t)});function jw(e){return Wy(Mw,e)}const zw=T("ZodISODuration",(e,t)=>{Ub.init(e,t),xe.init(e,t)});function $w(e){return Hy(zw,e)}const Fw=(e,t)=>{Nl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mv(e,n)},flatten:{value:n=>Nv(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Do,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Do,2)}},isEmpty:{get(){return e.issues.length===0}}})},it=T("ZodError",Fw,{Parent:Error}),Lw=xs(it),Vw=_s(it),Zw=Nr(it),Uw=Mr(it),Bw=$v(it),Ww=Fv(it),Hw=Lv(it),Gw=Vv(it),Kw=Zv(it),Yw=Uv(it),Jw=Bv(it),qw=Wv(it),Ta=new WeakMap;function zr(e,t,n){const r=Object.getPrototypeOf(e);let o=Ta.get(r);if(o||(o=new Set,Ta.set(r,o)),!o.has(t)){o.add(t);for(const s in n){const a=n[s];Object.defineProperty(r,s,{configurable:!0,enumerable:!1,get(){const i=a.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:i}),i},set(i){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:i})}})}}}const Oe=T("ZodType",(e,t)=>(Te.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:yr(e,"input"),output:yr(e,"output")}}),e.toJSONSchema=dw(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Lw(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Zw(e,n,r),e.parseAsync=async(n,r)=>Vw(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Uw(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Bw(e,n,r),e.decode=(n,r)=>Ww(e,n,r),e.encodeAsync=async(n,r)=>Hw(e,n,r),e.decodeAsync=async(n,r)=>Gw(e,n,r),e.safeEncode=(n,r)=>Kw(e,n,r),e.safeDecode=(n,r)=>Yw(e,n,r),e.safeEncodeAsync=async(n,r)=>Jw(e,n,r),e.safeDecodeAsync=async(n,r)=>qw(e,n,r),zr(e,"ZodType",{check(...n){const r=this.def;return this.clone(Zt(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Ut(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Bx(n,r))},superRefine(n,r){return this.check(Wx(n,r))},overwrite(n){return this.check(vn(n))},optional(){return Da(this)},exactOptional(){return Ax(this)},nullable(){return Na(this)},nullish(){return Da(Na(this))},nonoptional(n){return $x(this,n)},array(){return xx(this)},or(n){return Cx([this,n])},and(n){return Rx(this,n)},transform(n){return Ma(this,Ox(n))},default(n){return Mx(this,n)},prefault(n){return zx(this,n)},catch(n){return Lx(this,n)},pipe(n){return Ma(this,n)},readonly(){return Ux(this)},describe(n){const r=this.clone();return Sn.add(r,{description:n}),r},meta(...n){if(n.length===0)return Sn.get(this);const r=this.clone();return Sn.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Sn.get(e))==null?void 0:n.description},configurable:!0}),e)),Yl=T("_ZodString",(e,t)=>{Ss.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(r,o,s)=>pw(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,zr(e,"_ZodString",{regex(...r){return this.check(Jy(...r))},includes(...r){return this.check(Qy(...r))},startsWith(...r){return this.check(ew(...r))},endsWith(...r){return this.check(tw(...r))},min(...r){return this.check(br(...r))},max(...r){return this.check(Ul(...r))},length(...r){return this.check(Bl(...r))},nonempty(...r){return this.check(br(1,...r))},lowercase(r){return this.check(qy(r))},uppercase(r){return this.check(Xy(r))},trim(){return this.check(rw())},normalize(...r){return this.check(nw(...r))},toLowerCase(){return this.check(ow())},toUpperCase(){return this.check(sw())},slugify(){return this.check(aw())}})}),Xw=T("ZodString",(e,t)=>{Ss.init(e,t),Yl.init(e,t),e.email=n=>e.check(_y(Qw,n)),e.url=n=>e.check(Ry(ex,n)),e.jwt=n=>e.check(Zy(mx,n)),e.emoji=n=>e.check(Py(tx,n)),e.guid=n=>e.check(Pa(Ia,n)),e.uuid=n=>e.check(Sy(tr,n)),e.uuidv4=n=>e.check(Ey(tr,n)),e.uuidv6=n=>e.check(Cy(tr,n)),e.uuidv7=n=>e.check(ky(tr,n)),e.nanoid=n=>e.check(Ty(nx,n)),e.guid=n=>e.check(Pa(Ia,n)),e.cuid=n=>e.check(Oy(rx,n)),e.cuid2=n=>e.check(Iy(ox,n)),e.ulid=n=>e.check(Ay(sx,n)),e.base64=n=>e.check(Fy(fx,n)),e.base64url=n=>e.check(Ly(px,n)),e.xid=n=>e.check(Dy(ax,n)),e.ksuid=n=>e.check(Ny(ix,n)),e.ipv4=n=>e.check(My(cx,n)),e.ipv6=n=>e.check(jy(lx,n)),e.cidrv4=n=>e.check(zy(ux,n)),e.cidrv6=n=>e.check($y(dx,n)),e.e164=n=>e.check(Vy(hx,n)),e.datetime=n=>e.check(Aw(n)),e.date=n=>e.check(Nw(n)),e.time=n=>e.check(jw(n)),e.duration=n=>e.check($w(n))});function Oa(e){return xy(Xw,e)}const xe=T("ZodStringFormat",(e,t)=>{be.init(e,t),Yl.init(e,t)}),Qw=T("ZodEmail",(e,t)=>{Ib.init(e,t),xe.init(e,t)}),Ia=T("ZodGUID",(e,t)=>{Tb.init(e,t),xe.init(e,t)}),tr=T("ZodUUID",(e,t)=>{Ob.init(e,t),xe.init(e,t)}),ex=T("ZodURL",(e,t)=>{Ab.init(e,t),xe.init(e,t)}),tx=T("ZodEmoji",(e,t)=>{Db.init(e,t),xe.init(e,t)}),nx=T("ZodNanoID",(e,t)=>{Nb.init(e,t),xe.init(e,t)}),rx=T("ZodCUID",(e,t)=>{Mb.init(e,t),xe.init(e,t)}),ox=T("ZodCUID2",(e,t)=>{jb.init(e,t),xe.init(e,t)}),sx=T("ZodULID",(e,t)=>{zb.init(e,t),xe.init(e,t)}),ax=T("ZodXID",(e,t)=>{$b.init(e,t),xe.init(e,t)}),ix=T("ZodKSUID",(e,t)=>{Fb.init(e,t),xe.init(e,t)}),cx=T("ZodIPv4",(e,t)=>{Bb.init(e,t),xe.init(e,t)}),lx=T("ZodIPv6",(e,t)=>{Wb.init(e,t),xe.init(e,t)}),ux=T("ZodCIDRv4",(e,t)=>{Hb.init(e,t),xe.init(e,t)}),dx=T("ZodCIDRv6",(e,t)=>{Gb.init(e,t),xe.init(e,t)}),fx=T("ZodBase64",(e,t)=>{Kb.init(e,t),xe.init(e,t)}),px=T("ZodBase64URL",(e,t)=>{Jb.init(e,t),xe.init(e,t)}),hx=T("ZodE164",(e,t)=>{qb.init(e,t),xe.init(e,t)}),mx=T("ZodJWT",(e,t)=>{Qb.init(e,t),xe.init(e,t)}),gx=T("ZodBoolean",(e,t)=>{ey.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hw(e,n,r)});function E0(e){return Gy(gx,e)}const vx=T("ZodUnknown",(e,t)=>{ty.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gw()});function Aa(){return Ky(vx)}const bx=T("ZodNever",(e,t)=>{ny.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mw(e,n,r)});function yx(e){return Yy(bx,e)}const wx=T("ZodArray",(e,t)=>{ry.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ww(e,n,r,o),e.element=t.element,zr(e,"ZodArray",{min(n,r){return this.check(br(n,r))},nonempty(n){return this.check(br(1,n))},max(n,r){return this.check(Ul(n,r))},length(n,r){return this.check(Bl(n,r))},unwrap(){return this.element}})});function xx(e,t){return iw(wx,e,t)}const _x=T("ZodObject",(e,t)=>{sy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xw(e,n,r,o),ue(e,"shape",()=>t.shape),zr(e,"ZodObject",{keyof(){return Px(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},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:yx()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Pv(this,n)},safeExtend(n){return Tv(this,n)},merge(n){return Ov(this,n)},pick(n){return kv(this,n)},omit(n){return Rv(this,n)},partial(...n){return Iv(Jl,this,n[0])},required(...n){return Av(ql,this,n[0])}})});function Sx(e,t){const n={type:"object",shape:e??{},...K(t)};return new _x(n)}const Ex=T("ZodUnion",(e,t)=>{ay.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_w(e,n,r,o),e.options=t.options});function Cx(e,t){return new Ex({type:"union",options:e,...K(t)})}const kx=T("ZodIntersection",(e,t)=>{iy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sw(e,n,r,o)});function Rx(e,t){return new kx({type:"intersection",left:e,right:t})}const Mo=T("ZodEnum",(e,t)=>{cy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(r,o,s)=>vw(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 a of r)if(n.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Mo({...t,checks:[],...K(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const a of r)if(n.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new Mo({...t,checks:[],...K(o),entries:s})}});function Px(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Mo({type:"enum",entries:n,...K(t)})}const Tx=T("ZodTransform",(e,t)=>{ly.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yw(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Pl(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(In(s,n.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(In(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function Ox(e){return new Tx({type:"transform",transform:e})}const Jl=T("ZodOptional",(e,t)=>{Zl.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Da(e){return new Jl({type:"optional",innerType:e})}const Ix=T("ZodExactOptional",(e,t)=>{uy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ax(e){return new Ix({type:"optional",innerType:e})}const Dx=T("ZodNullable",(e,t)=>{dy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ew(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Na(e){return new Dx({type:"nullable",innerType:e})}const Nx=T("ZodDefault",(e,t)=>{fy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Mx(e,t){return new Nx({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Il(t)}})}const jx=T("ZodPrefault",(e,t)=>{py.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function zx(e,t){return new jx({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Il(t)}})}const ql=T("ZodNonOptional",(e,t)=>{hy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function $x(e,t){return new ql({type:"nonoptional",innerType:e,...K(t)})}const Fx=T("ZodCatch",(e,t)=>{my.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Lx(e,t){return new Fx({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Vx=T("ZodPipe",(e,t)=>{gy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tw(e,n,r,o),e.in=t.in,e.out=t.out});function Ma(e,t){return new Vx({type:"pipe",in:e,out:t})}const Zx=T("ZodReadonly",(e,t)=>{vy.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ow(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ux(e){return new Zx({type:"readonly",innerType:e})}const Xl=T("ZodCustom",(e,t)=>{by.init(e,t),Oe.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bw(e,n)});function Bx(e,t={}){return cw(Xl,e,t)}function Wx(e,t){return lw(e,t)}function C0(e,t={}){const n=new Xl({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...K(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 Hx=Object.defineProperty,Gx=(e,t)=>Hx(e,"name",{value:t,configurable:!0}),Kx=d.forwardRef(Gx(function(t,n){return f.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")),Ql=Kx;const Yx=An("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jo=d.forwardRef(({className:e,...t},n)=>f.jsx(Ql,{ref:n,className:G(Yx(),e),...t}));jo.displayName=Ql.displayName;const Jx=An("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}}),eu=d.forwardRef(({className:e,level:t,...n},r)=>f.jsx("div",{ref:r,className:G(Jx({level:t}),e),...n}));eu.displayName="Card";const tu=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:G("flex flex-col space-y-1.5 p-6",e),...t}));tu.displayName="CardHeader";const nu=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:G("text-2xl font-semibold leading-none tracking-tight",e),...t}));nu.displayName="CardTitle";const ru=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:G("text-sm text-muted-foreground",e),...t}));ru.displayName="CardDescription";const ou=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:G("p-6 pt-0",e),...t}));ou.displayName="CardContent";const qx=d.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:G("flex items-center p-6 pt-0",e),...t}));qx.displayName="CardFooter";const Xx=Sx({email:Oa().email(),password:Oa().min(8)});function Qx(){const e=zo(),{resolvedTheme:t}=wr(),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:a,isSubmitting:i}}=vv({resolver:xv(Xx),mode:"onBlur"});async function l(u){try{const{status:p}=await cl.post("/api/v1/auth/login",{email:u.email,password:u.password});if(p!==200){s("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{s("root",{message:"Network error. Please try again."})}}return f.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:f.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),f.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),f.jsxs(eu,{level:4,className:"w-full",children:[f.jsxs(tu,{className:"text-center",children:[f.jsx(nu,{className:"text-2xl tracking-display-md",children:"Welcome back"}),f.jsx(ru,{children:"Sign in to your team workspace"})]}),f.jsx(ou,{children:f.jsxs("form",{onSubmit:o(l),className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"grid gap-2",children:[f.jsx(jo,{htmlFor:"email",children:"Email"}),f.jsx(fr,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),a.email&&f.jsx("p",{className:"text-sm text-destructive",children:a.email.message})]}),f.jsxs("div",{className:"grid gap-2",children:[f.jsx(jo,{htmlFor:"password",children:"Password"}),f.jsx(fr,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),a.password&&f.jsx("p",{className:"text-sm text-destructive",children:a.password.message})]}),a.root&&f.jsx("p",{className:"text-sm text-destructive",children:a.root.message}),f.jsx(xr,{type:"submit",size:"lg",disabled:i,className:"w-full mt-1",children:i?"Signing in…":"Sign in"})]})})]})]})})}const e0=d.lazy(()=>_t(()=>import("./Setup-XXChRxeL.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Setup}))),t0=d.lazy(()=>_t(()=>import("./Invite-0EwoClX6.js"),__vite__mapDeps([3,1,2,4])).then(e=>({default:e.Invite}))),n0=d.lazy(()=>_t(()=>import("./ResetPassword-CXU2bRry.js"),__vite__mapDeps([5,1,2])).then(e=>({default:e.ResetPassword}))),r0=d.lazy(()=>_t(()=>import("./AppCenter-Dg4dscW-.js"),__vite__mapDeps([6,1,7,8,9,10,11,2])).then(e=>({default:e.AppCenter}))),o0=d.lazy(()=>_t(()=>import("./QASession-DqMj8JL1.js"),__vite__mapDeps([12,1,7,13,2,11,8,10])).then(e=>({default:e.QASession}))),s0=d.lazy(()=>_t(()=>import("./MacResources-Dy1M3EqK.js"),__vite__mapDeps([14,1,13,15,2])).then(e=>({default:e.MacResources}))),a0=d.lazy(()=>_t(()=>import("./Default-Dxi8aZ1t.js"),__vite__mapDeps([16,1,10,11,4,2])).then(e=>({default:e.DefaultSettings}))),i0=d.lazy(()=>_t(()=>import("./Team-D0bXpmEY.js"),__vite__mapDeps([17,1,8,11,18,2])).then(e=>({default:e.TeamSettings}))),c0=d.lazy(()=>_t(()=>import("./Tokens-D0YNHS5e.js"),__vite__mapDeps([19,1,10,11,8,18,9,2])).then(e=>({default:e.TokenSettings}))),l0=d.lazy(()=>_t(()=>import("./NotFound-BoDDivK5.js"),__vite__mapDeps([20,1])).then(e=>({default:e.NotFound}))),u0=f.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),nr=e=>f.jsx(d.Suspense,{fallback:u0,children:e});function d0(){const{resolvedTheme:e}=wr();return f.jsxs(vu,{children:[f.jsxs(bu,{children:[f.jsx(qe,{path:"/login",element:f.jsx(Qx,{})}),f.jsx(qe,{path:"/setup",element:nr(f.jsx(e0,{}))}),f.jsx(qe,{path:"/invite",element:nr(f.jsx(t0,{}))}),f.jsx(qe,{path:"/reset-password",element:nr(f.jsx(n0,{}))}),f.jsxs(qe,{element:f.jsx(Jg,{}),children:[f.jsx(qe,{index:!0,element:f.jsx($a,{to:"/app-center",replace:!0})}),f.jsx(qe,{path:"/app-center",element:f.jsx(r0,{})}),f.jsx(qe,{path:"/app-center/build",element:f.jsx(o0,{})}),f.jsx(qe,{path:"/mac-resources",element:f.jsx(s0,{})}),f.jsx(qe,{path:"/settings/default",element:f.jsx(a0,{})}),f.jsx(qe,{path:"/settings/team",element:f.jsx(i0,{})}),f.jsx(qe,{path:"/settings/tokens",element:f.jsx(c0,{})})]}),f.jsx(qe,{path:"*",element:nr(f.jsx(l0,{}))})]}),f.jsx(od,{position:"bottom-right",richColors:!0,theme:e})]})}mu.createRoot(document.getElementById("root")).render(f.jsx(d.StrictMode,{children:f.jsx(_u,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:f.jsx(d0,{})})}));export{Tt as $,nc as A,xr as B,eu as C,Up as D,Lg as E,gi as F,E0 as G,Ef as H,fr as I,G as J,J as K,jo as L,Ad as M,Xo as N,At as O,Wo as P,g0 as Q,Go as R,pr as S,$h as T,Vg as U,gh as V,Je as W,Ud as X,Cr as Y,Ic as Z,C0 as _,ou as a,An as a0,Mi as a1,Sx as a2,Oa as a3,m0 as a4,xv as a5,ll as a6,Kg as a7,Ot as a8,ve as a9,Nn as aa,es as ab,_r as ac,vv as ad,Lt as ae,Ye as af,Yi as ag,ev as ah,wr as ai,ru as b,tu as c,nu as d,wd as e,_d as f,rc as g,S0 as h,eh as i,Li as j,Ui as k,Fi as l,Hp as m,Zi as n,v0 as o,Zo as p,_m as q,Pd as r,Dt as s,ke as t,xm as u,tc as v,hn as w,pc as x,zh as y,Fh as z};