@tapflowio/relay 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RelayServer.d.ts.map +1 -1
- package/dist/RelayServer.js +18 -8
- package/dist/RelayServer.js.map +1 -1
- package/dist/api/auth.d.ts +1 -1
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +11 -3
- package/dist/api/auth.js.map +1 -1
- package/dist/api/builds.d.ts +1 -1
- package/dist/api/builds.d.ts.map +1 -1
- package/dist/api/builds.js +8 -2
- package/dist/api/builds.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/buildFiles.d.ts +23 -0
- package/dist/lib/buildFiles.d.ts.map +1 -0
- package/dist/lib/buildFiles.js +39 -0
- package/dist/lib/buildFiles.js.map +1 -0
- package/dist/lib/config.d.ts +26 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +81 -17
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/dataDir.d.ts +48 -1
- package/dist/lib/dataDir.d.ts.map +1 -1
- package/dist/lib/dataDir.js +108 -12
- package/dist/lib/dataDir.js.map +1 -1
- package/dist/middleware/auth.js +3 -3
- package/dist/middleware/auth.js.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/AppCenter-BHz6vh5p.js +26 -0
- package/public/assets/AppCenter-BHz6vh5p.js.br +0 -0
- package/public/assets/AppCenter-BHz6vh5p.js.gz +0 -0
- package/public/assets/Default-bCqU0Qz9.js +1 -0
- package/public/assets/Default-bCqU0Qz9.js.br +0 -0
- package/public/assets/Default-bCqU0Qz9.js.gz +0 -0
- package/public/assets/Invite-EVMTsuNz.js +1 -0
- package/public/assets/Invite-EVMTsuNz.js.br +0 -0
- package/public/assets/Invite-EVMTsuNz.js.gz +0 -0
- package/public/assets/MacResources-fCn40Tf5.js +1 -0
- package/public/assets/MacResources-fCn40Tf5.js.br +0 -0
- package/public/assets/MacResources-fCn40Tf5.js.gz +0 -0
- package/public/assets/NotFound-wHOnT2Fl.js +1 -0
- package/public/assets/NotFound-wHOnT2Fl.js.br +0 -0
- package/public/assets/NotFound-wHOnT2Fl.js.gz +0 -0
- package/public/assets/QASession-CL-eyFxG.js +150 -0
- package/public/assets/QASession-CL-eyFxG.js.br +0 -0
- package/public/assets/QASession-CL-eyFxG.js.gz +0 -0
- package/public/assets/ResetPassword-D-SFg4ap.js +1 -0
- package/public/assets/ResetPassword-D-SFg4ap.js.br +0 -0
- package/public/assets/ResetPassword-D-SFg4ap.js.gz +0 -0
- package/public/assets/Setup-ULjvIfAi.js +1 -0
- package/public/assets/Setup-ULjvIfAi.js.br +0 -0
- package/public/assets/Setup-ULjvIfAi.js.gz +0 -0
- package/public/assets/Team-DH91GD4w.js +6 -0
- package/public/assets/Team-DH91GD4w.js.br +0 -0
- package/public/assets/Team-DH91GD4w.js.gz +0 -0
- package/public/assets/Tokens-DImLpOVZ.js +1 -0
- package/public/assets/Tokens-DImLpOVZ.js.br +0 -0
- package/public/assets/Tokens-DImLpOVZ.js.gz +0 -0
- package/public/assets/alert-dialog-CwcUyDZQ.js +1 -0
- package/public/assets/alert-dialog-CwcUyDZQ.js.br +0 -0
- package/public/assets/alert-dialog-CwcUyDZQ.js.gz +0 -0
- package/public/assets/badge-B4QAWrzA.js +1 -0
- package/public/assets/badge-B4QAWrzA.js.br +0 -0
- package/public/assets/badge-B4QAWrzA.js.gz +0 -0
- package/public/assets/build-format-CtmRXihN.js +11 -0
- package/public/assets/build-format-CtmRXihN.js.br +0 -0
- package/public/assets/build-format-CtmRXihN.js.gz +0 -0
- package/public/assets/dialog-BAFN_ONP.js +11 -0
- package/public/assets/dialog-BAFN_ONP.js.br +0 -0
- package/public/assets/dialog-BAFN_ONP.js.gz +0 -0
- package/public/assets/index-COOWQXpW.js +218 -0
- package/public/assets/index-COOWQXpW.js.br +0 -0
- package/public/assets/index-COOWQXpW.js.gz +0 -0
- package/public/assets/index-ozCdBYxk.css +1 -0
- package/public/assets/index-ozCdBYxk.css.br +0 -0
- package/public/assets/index-ozCdBYxk.css.gz +0 -0
- package/public/assets/list-view-Rrqp8TkG.js +1 -0
- package/public/assets/list-view-Rrqp8TkG.js.br +0 -0
- package/public/assets/list-view-Rrqp8TkG.js.gz +0 -0
- package/public/assets/{pencil-CPaoEKFm.js → pencil-CAHyK7Qf.js} +2 -2
- package/public/assets/pencil-CAHyK7Qf.js.br +0 -0
- package/public/assets/pencil-CAHyK7Qf.js.gz +0 -0
- package/public/assets/resource-health-BRpSwarg.js +1 -0
- package/public/assets/resource-health-BRpSwarg.js.br +0 -0
- package/public/assets/resource-health-BRpSwarg.js.gz +0 -0
- package/public/assets/{trash-CD9Y9G-i.js → trash-CkO-5TRA.js} +3 -3
- package/public/assets/trash-CkO-5TRA.js.br +0 -0
- package/public/assets/trash-CkO-5TRA.js.gz +0 -0
- package/public/assets/useFocusAfterSwap-BY3N9f9v.js +1 -0
- package/public/assets/useFocusAfterSwap-BY3N9f9v.js.br +0 -0
- package/public/assets/useFocusAfterSwap-BY3N9f9v.js.gz +0 -0
- package/public/assets/{vendor-charts-YPhPkjLw.js → vendor-charts-BykzUV2D.js} +1 -1
- package/public/assets/vendor-charts-BykzUV2D.js.br +0 -0
- package/public/assets/vendor-charts-BykzUV2D.js.gz +0 -0
- package/public/assets/{vendor-react-C5H_1fOn.js → vendor-react-BlPSzrEe.js} +18 -10
- package/public/assets/vendor-react-BlPSzrEe.js.br +0 -0
- package/public/assets/vendor-react-BlPSzrEe.js.gz +0 -0
- package/public/assets/{vendor-router-CnmrRwJF.js → vendor-router-B_lVHrKl.js} +3 -3
- package/public/assets/vendor-router-B_lVHrKl.js.br +0 -0
- package/public/assets/vendor-router-B_lVHrKl.js.gz +0 -0
- package/public/index.html +4 -4
- package/public/index.html.br +0 -0
- package/public/index.html.gz +0 -0
- package/public/assets/AppCenter-OTDuqwSf.js +0 -21
- package/public/assets/AppCenter-OTDuqwSf.js.br +0 -0
- package/public/assets/AppCenter-OTDuqwSf.js.gz +0 -0
- package/public/assets/Default-D9GLpWlN.js +0 -1
- package/public/assets/Default-D9GLpWlN.js.br +0 -0
- package/public/assets/Default-D9GLpWlN.js.gz +0 -0
- package/public/assets/Invite-Bhiam8En.js +0 -1
- package/public/assets/Invite-Bhiam8En.js.br +0 -0
- package/public/assets/Invite-Bhiam8En.js.gz +0 -0
- package/public/assets/MacResources-DObzVJxQ.js +0 -3
- package/public/assets/MacResources-DObzVJxQ.js.br +0 -0
- package/public/assets/MacResources-DObzVJxQ.js.gz +0 -0
- package/public/assets/NotFound-Dz_k_Mzf.js +0 -1
- package/public/assets/NotFound-Dz_k_Mzf.js.br +0 -0
- package/public/assets/NotFound-Dz_k_Mzf.js.gz +0 -0
- package/public/assets/QASession-2crubOLY.js +0 -150
- package/public/assets/QASession-2crubOLY.js.br +0 -0
- package/public/assets/QASession-2crubOLY.js.gz +0 -0
- package/public/assets/ResetPassword-EUm12ojo.js +0 -1
- package/public/assets/ResetPassword-EUm12ojo.js.br +0 -0
- package/public/assets/ResetPassword-EUm12ojo.js.gz +0 -0
- package/public/assets/Setup-Fc_0RW0a.js +0 -1
- package/public/assets/Setup-Fc_0RW0a.js.br +0 -0
- package/public/assets/Setup-Fc_0RW0a.js.gz +0 -0
- package/public/assets/Team-Ac5aOGgx.js +0 -6
- package/public/assets/Team-Ac5aOGgx.js.br +0 -0
- package/public/assets/Team-Ac5aOGgx.js.gz +0 -0
- package/public/assets/Tokens-pEnCy-7l.js +0 -1
- package/public/assets/Tokens-pEnCy-7l.js.br +0 -0
- package/public/assets/Tokens-pEnCy-7l.js.gz +0 -0
- package/public/assets/alert-dialog-DhOTocMh.js +0 -1
- package/public/assets/alert-dialog-DhOTocMh.js.br +0 -0
- package/public/assets/alert-dialog-DhOTocMh.js.gz +0 -0
- package/public/assets/badge-B4gbViMs.js +0 -1
- package/public/assets/badge-B4gbViMs.js.br +0 -0
- package/public/assets/badge-B4gbViMs.js.gz +0 -0
- package/public/assets/build-format-DKGajT96.js +0 -11
- package/public/assets/build-format-DKGajT96.js.br +0 -0
- package/public/assets/build-format-DKGajT96.js.gz +0 -0
- package/public/assets/dialog-DEL1xxKJ.js +0 -11
- package/public/assets/dialog-DEL1xxKJ.js.br +0 -0
- package/public/assets/dialog-DEL1xxKJ.js.gz +0 -0
- package/public/assets/index-Bxs7CdEi.css +0 -1
- package/public/assets/index-Bxs7CdEi.css.br +0 -0
- package/public/assets/index-Bxs7CdEi.css.gz +0 -0
- package/public/assets/index-COIlCLCW.js +0 -218
- package/public/assets/index-COIlCLCW.js.br +0 -0
- package/public/assets/index-COIlCLCW.js.gz +0 -0
- package/public/assets/pencil-CPaoEKFm.js.br +0 -0
- package/public/assets/pencil-CPaoEKFm.js.gz +0 -0
- package/public/assets/resource-health-Ca4-5Rde.js +0 -1
- package/public/assets/resource-health-Ca4-5Rde.js.br +0 -0
- package/public/assets/resource-health-Ca4-5Rde.js.gz +0 -0
- package/public/assets/table-CSeGVnii.js +0 -1
- package/public/assets/table-CSeGVnii.js.br +0 -0
- package/public/assets/table-CSeGVnii.js.gz +0 -0
- package/public/assets/trash-CD9Y9G-i.js.br +0 -0
- package/public/assets/trash-CD9Y9G-i.js.gz +0 -0
- package/public/assets/vendor-charts-YPhPkjLw.js.br +0 -0
- package/public/assets/vendor-charts-YPhPkjLw.js.gz +0 -0
- package/public/assets/vendor-react-C5H_1fOn.js.br +0 -0
- package/public/assets/vendor-react-C5H_1fOn.js.gz +0 -0
- package/public/assets/vendor-router-CnmrRwJF.js.br +0 -0
- package/public/assets/vendor-router-CnmrRwJF.js.gz +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-Fc_0RW0a.js","assets/vendor-react-C5H_1fOn.js","assets/vendor-router-CnmrRwJF.js","assets/Invite-Bhiam8En.js","assets/pencil-CPaoEKFm.js","assets/ResetPassword-EUm12ojo.js","assets/AppCenter-OTDuqwSf.js","assets/build-format-DKGajT96.js","assets/dialog-DEL1xxKJ.js","assets/trash-CD9Y9G-i.js","assets/badge-B4gbViMs.js","assets/alert-dialog-DhOTocMh.js","assets/QASession-2crubOLY.js","assets/resource-health-Ca4-5Rde.js","assets/publicLink-D6zKS_wu.js","assets/MacResources-DObzVJxQ.js","assets/vendor-charts-YPhPkjLw.js","assets/Default-D9GLpWlN.js","assets/Team-Ac5aOGgx.js","assets/table-CSeGVnii.js","assets/Tokens-pEnCy-7l.js","assets/NotFound-Dz_k_Mzf.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ai=e=>{throw TypeError(e)};var ci=(e,t,n)=>t.has(e)||ai("Cannot "+n);var Ve=(e,t,n)=>(ci(e,t,"read from private field"),n?n.call(e):t.get(e)),li=(e,t,n)=>t.has(e)?ai("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ro=(e,t,n,r)=>(ci(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{i as d,R as k,b as Cd,a as wn,j as h,r as Ia,u as kd,o as Pd,s as Rd,f as Od,k as Td,c as Id,h as Ad,l as Dd,d as jd,e as Nd}from"./vendor-react-C5H_1fOn.js";import{b as ds,u as Aa,L as nr,N as Da,O as Md,B as zd,a as $d,R as Ye}from"./vendor-router-CnmrRwJF.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var Fd=(e,t,n,r,o,s,i,a)=>{let l=document.documentElement,u=["light","dark"];function f(m){(Array.isArray(e)?e:[e]).forEach(g=>{let v=g==="class",y=v&&s?o.map(w=>s[w]||w):o;v?(l.classList.remove(...y),l.classList.add(s&&s[m]?s[m]:m)):l.setAttribute(g,m)}),c(m)}function c(m){a&&u.includes(m)&&(l.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let m=localStorage.getItem(t)||n,g=i&&m==="system"?p():m;f(g)}catch{}},ui=["light","dark"],ja="(prefers-color-scheme: dark)",Ld=typeof window>"u",fs=d.createContext(void 0),Vd={setTheme:e=>{},themes:[]},Fr=()=>{var e;return(e=d.useContext(fs))!=null?e:Vd},Zd=e=>d.useContext(fs)?d.createElement(d.Fragment,null,e.children):d.createElement(Bd,{...e}),Ud=["light","dark"],Bd=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=Ud,defaultTheme:i=n?"system":"light",attribute:a="data-theme",value:l,children:u,nonce:f,scriptProps:c})=>{let[p,m]=d.useState(()=>Gd(o,i)),[g,v]=d.useState(()=>p==="system"?oo():p),y=l?Object.values(l):s,w=d.useCallback(P=>{let O=P;if(!O)return;P==="system"&&n&&(O=oo());let N=l?l[O]:O,z=t?Hd(f):null,D=document.documentElement,G=H=>{H==="class"?(D.classList.remove(...y),N&&D.classList.add(N)):H.startsWith("data-")&&(N?D.setAttribute(H,N):D.removeAttribute(H))};if(Array.isArray(a)?a.forEach(G):G(a),r){let H=ui.includes(i)?i:null,L=ui.includes(O)?O:H;D.style.colorScheme=L}z==null||z()},[f]),x=d.useCallback(P=>{let O=typeof P=="function"?P(p):P;m(O);try{localStorage.setItem(o,O)}catch{}},[p]),C=d.useCallback(P=>{let O=oo(P);v(O),p==="system"&&n&&!e&&w("system")},[p,e]);d.useEffect(()=>{let P=window.matchMedia(ja);return P.addListener(C),C(P),()=>P.removeListener(C)},[C]),d.useEffect(()=>{let P=O=>{O.key===o&&(O.newValue?m(O.newValue):x(i))};return window.addEventListener("storage",P),()=>window.removeEventListener("storage",P)},[x]),d.useEffect(()=>{w(e??p)},[e,p]);let E=d.useMemo(()=>({theme:p,setTheme:x,forcedTheme:e,resolvedTheme:p==="system"?g:p,themes:n?[...s,"system"]:s,systemTheme:n?g:void 0}),[p,x,e,g,n,s]);return d.createElement(fs.Provider,{value:E},d.createElement(Wd,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:n,enableColorScheme:r,defaultTheme:i,value:l,themes:s,nonce:f,scriptProps:c}),u)},Wd=d.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:a,nonce:l,scriptProps:u})=>{let f=JSON.stringify([n,t,s,e,a,i,r,o]).slice(1,-1);return d.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${Fd.toString()})(${f})`}})}),Gd=(e,t)=>{if(Ld)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Hd=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)}},oo=e=>(e||(e=window.matchMedia(ja)),e.matches?"dark":"light");const Kd="modulepreload",Yd=function(e){return"/"+e},di={},St=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=i(n.map(u=>{if(u=Yd(u),u in di)return;di[u]=!0;const f=u.endsWith(".css"),c=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${c}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":Kd,f||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((m,g)=>{p.addEventListener("load",m),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};function Jd(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 qd=e=>{switch(e){case"success":return ef;case"info":return nf;case"warning":return tf;case"error":return rf;default:return null}},Xd=Array(12).fill(0),Qd=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},Xd.map((n,r)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ef=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},k.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"})),tf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},k.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"})),nf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},k.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"})),rf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},k.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"})),of=k.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"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sf=()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let af=1;const cf=100,fi=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:af++};class lf{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-cf;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=fi(t),s=this.pendingDismissals.get(o);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const i=this.dismissedToasts.has(o),a=t.dismissible===void 0?!0:t.dismissible;return i&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(u=>u.id!==o)),(i?void 0:this.toasts.find(u=>u.id===o))?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...t,id:o,title:n}),{...u,...t,id:o,dismissible:a,title:n}):u):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const n=this.pendingDismissals.get(t);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(r=>r({id:t,dismiss:!0}))})),t},this.message=(t,n)=>this.create({...n,message:t,type:void 0}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async u=>{if(i=["resolve",u],k.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(df(u)&&!u.ok){s=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...g})}else if(u instanceof Error){s=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...g})}else if(n.success!==void 0){s=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...g})}}).catch(async u=>{if(i=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,m=typeof f=="object"&&!k.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:c,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>a.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=fi(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 We=new lf,uf=(e,t)=>We.message(e,t),df=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ff=uf,pf=()=>We.toasts,hf=()=>We.getActiveToasts(),IS=Object.assign(ff,{success:We.success,info:We.info,warning:We.warning,error:We.error,custom:We.custom,message:We.message,promise:We.promise,dismiss:We.dismiss,loading:We.loading},{getHistory:pf,getToasts:hf});Jd("[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 rr(e){return e.label!==void 0}const mf=3,gf="24px",vf="16px",pi=4e3,bf=356,yf=14,wf=45,xf=200;function bt(...e){return e.filter(Boolean).join(" ")}function _f(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Sf=e=>{var t,n,r,o,s,i,a,l,u;const{invert:f,toast:c,unstyled:p,interacting:m,setHeights:g,visibleToasts:v,heights:y,index:w,toasts:x,expanded:C,removeToast:E,defaultRichColors:P,closeButton:O,style:N,cancelButtonStyle:z,actionButtonStyle:D,className:G="",descriptionClassName:H="",duration:L,position:U,gap:V,expandByDefault:Q,classNames:W,icons:K,closeButtonAriaLabel:le="Close toast"}=e,[ee,B]=k.useState(null),[re,de]=k.useState(null),[Se,q]=k.useState(!1),[se,pe]=k.useState(!1),[ve,Pe]=k.useState(!1),[ie,be]=k.useState(!1),[nt,at]=k.useState(!1),[ct,gt]=k.useState(0),[nn,Nt]=k.useState(0),lt=k.useRef(c.duration||L||pi),Ht=k.useRef(null),Le=k.useRef(null),kn=w===0,rn=w+1<=v,Ee=c.type,on=Ee??"default",Et=c.dismissible!==!1,Pn=c.className||"",Rn=c.descriptionClassName||"",sn=k.useMemo(()=>y.findIndex(A=>A.toastId===c.id)||0,[y,c.id]),Qn=k.useMemo(()=>{var A;return(A=c.closeButton)!=null?A:O},[c.closeButton,O]),er=k.useMemo(()=>c.duration||L||pi,[c.duration,L]),an=k.useRef(0),Ct=k.useRef(0),tr=k.useRef(0),kt=k.useRef(null),[si,ii]=U.split("-"),On=k.useMemo(()=>y.reduce((A,te,ue)=>ue>=sn?A:A+te.height,0),[y,sn]),b=sf(),_=k.useMemo(()=>{var A;return(A=e.swipeDirections)!=null?A:_f(U)},[e.swipeDirections,U]),S=c.invert||f,T=Ee==="loading";Ct.current=k.useMemo(()=>sn*V+On,[sn,On]),k.useEffect(()=>{lt.current=er},[er]),k.useEffect(()=>{q(!0)},[]),k.useEffect(()=>{const A=Le.current;if(A){const te=A.getBoundingClientRect().height;return Nt(te),g(ue=>[{toastId:c.id,height:te,position:c.position},...ue]),()=>g(ue=>ue.filter(he=>he.toastId!==c.id))}},[g,c.id]),k.useLayoutEffect(()=>{if(!Se)return;const A=Le.current,te=A.style.height;A.style.height="auto";const ue=A.getBoundingClientRect().height;A.style.height=te,Nt(ue),g(he=>he.find(Ae=>Ae.toastId===c.id)?he.map(Ae=>Ae.toastId===c.id?{...Ae,height:ue}:Ae):[{toastId:c.id,height:ue,position:c.position},...he])},[Se,c.title,c.description,g,c.id,c.jsx,c.action,c.cancel]);const R=k.useCallback(()=>{pe(!0),gt(Ct.current),g(A=>A.filter(te=>te.toastId!==c.id)),setTimeout(()=>{E(c)},xf)},[c,E,g,Ct]);k.useEffect(()=>{if(c.promise&&Ee==="loading"||c.duration===1/0||c.type==="loading")return;let A;return C||m||b?(()=>{if(tr.current<an.current){const he=new Date().getTime()-an.current;lt.current=lt.current-he}tr.current=new Date().getTime()})():(()=>{lt.current!==1/0&&(an.current=new Date().getTime(),A=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),R()},lt.current))})(),()=>clearTimeout(A)},[C,m,c,Ee,b,R]),k.useEffect(()=>{c.delete&&(R(),c.onDismiss==null||c.onDismiss.call(c,c))},[R,c.delete]);function F(){var A;if(K!=null&&K.loading){var te;return k.createElement("div",{className:bt(W==null?void 0:W.loader,c==null||(te=c.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Ee==="loading"},K.loading)}return k.createElement(Qd,{className:bt(W==null?void 0:W.loader,c==null||(A=c.classNames)==null?void 0:A.loader),visible:Ee==="loading"})}const j=c.icon||(K==null?void 0:K[Ee])||qd(Ee);var $,Z;return k.createElement("li",{tabIndex:0,ref:Le,className:bt(G,Pn,W==null?void 0:W.toast,c==null||(t=c.classNames)==null?void 0:t.toast,W==null?void 0:W[on],c==null||(n=c.classNames)==null?void 0:n[on]),"data-sonner-toast":"","data-rich-colors":($=c.richColors)!=null?$:P,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":Se,"data-promise":!!c.promise,"data-swiped":nt,"data-removed":se,"data-visible":rn,"data-y-position":si,"data-x-position":ii,"data-index":w,"data-front":kn,"data-swiping":ve,"data-dismissible":Et,"data-type":Ee,"data-invert":S,"data-swipe-out":ie,"data-swipe-direction":re,"data-expanded":!!(C||Q&&Se),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${se?ct:Ct.current}px`,"--initial-height":Q?"auto":`${nn}px`,...N,...c.style},onDragEnd:()=>{Pe(!1),B(null),kt.current=null},onPointerDown:A=>{A.button!==2&&(T||!Et||(Ht.current=new Date,gt(Ct.current),A.target.setPointerCapture(A.pointerId),A.target.tagName!=="BUTTON"&&(Pe(!0),kt.current={x:A.clientX,y:A.clientY})))},onPointerUp:()=>{var A,te,ue;if(ie||!Et)return;kt.current=null;const he=Number(((A=Le.current)==null?void 0:A.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ut=Number(((te=Le.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ae=new Date().getTime()-((ue=Ht.current)==null?void 0:ue.getTime()),De=ee==="x"?he:ut,rt=Math.abs(De)/Ae;if((ee==="x"?_.includes(he>0?"right":"left"):_.includes(ut>0?"bottom":"top"))&&(Math.abs(De)>=wf||rt>.11)){gt(Ct.current),c.onDismiss==null||c.onDismiss.call(c,c),de(ee==="x"?he>0?"right":"left":ut>0?"down":"up"),R(),be(!0);return}else{var vt,no;(vt=Le.current)==null||vt.style.setProperty("--swipe-amount-x","0px"),(no=Le.current)==null||no.style.setProperty("--swipe-amount-y","0px")}at(!1),Pe(!1),B(null)},onPointerMove:A=>{var te,ue,he;if(!kt.current||!Et||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;const Ae=A.clientY-kt.current.y,De=A.clientX-kt.current.x;!ee&&(Math.abs(De)>1||Math.abs(Ae)>1)&&B(Math.abs(De)>Math.abs(Ae)?"x":"y");let rt={x:0,y:0};const cn=vt=>1/(1.5+Math.abs(vt)/20);if(ee==="y"){if(_.includes("top")||_.includes("bottom"))if(_.includes("top")&&Ae<0||_.includes("bottom")&&Ae>0)rt.y=Ae;else{const vt=Ae*cn(Ae);rt.y=Math.abs(vt)<Math.abs(Ae)?vt:Ae}}else if(ee==="x"&&(_.includes("left")||_.includes("right")))if(_.includes("left")&&De<0||_.includes("right")&&De>0)rt.x=De;else{const vt=De*cn(De);rt.x=Math.abs(vt)<Math.abs(De)?vt:De}(Math.abs(rt.x)>0||Math.abs(rt.y)>0)&&at(!0),(ue=Le.current)==null||ue.style.setProperty("--swipe-amount-x",`${rt.x}px`),(he=Le.current)==null||he.style.setProperty("--swipe-amount-y",`${rt.y}px`)}},Qn&&!c.jsx&&Ee!=="loading"?k.createElement("button",{"aria-label":le,"data-disabled":T,"data-close-button":!0,onClick:T||!Et?()=>{}:()=>{R(),c.onDismiss==null||c.onDismiss.call(c,c)},className:bt(W==null?void 0:W.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Z=K==null?void 0:K.close)!=null?Z:of):null,(Ee||c.icon||c.promise)&&c.icon!==null&&((K==null?void 0:K[Ee])!==null||c.icon)?k.createElement("div",{"data-icon":"",className:bt(W==null?void 0:W.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},Ee==="loading"?c.icon||F():c.promise?F():null,Ee!=="loading"?j:null):null,k.createElement("div",{"data-content":"",className:bt(W==null?void 0:W.content,c==null||(s=c.classNames)==null?void 0:s.content)},k.createElement("div",{"data-title":"",className:bt(W==null?void 0:W.title,c==null||(i=c.classNames)==null?void 0:i.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?k.createElement("div",{"data-description":"",className:bt(H,Rn,W==null?void 0:W.description,c==null||(a=c.classNames)==null?void 0:a.description)},typeof c.description=="function"?c.description():c.description):null),k.isValidElement(c.cancel)?c.cancel:c.cancel&&rr(c.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||z,onClick:A=>{rr(c.cancel)&&Et&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,A),R())},className:bt(W==null?void 0:W.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,k.isValidElement(c.action)?c.action:c.action&&rr(c.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||D,onClick:A=>{rr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,A),!A.defaultPrevented&&R())},className:bt(W==null?void 0:W.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function hi(){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 Ef(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?vf:gf;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}const Cf=k.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:f,mobileOffset:c,theme:p="light",richColors:m,duration:g,style:v,visibleToasts:y=mf,toastOptions:w,dir:x=hi(),gap:C=yf,icons:E,customAriaLabel:P,containerAriaLabel:O="Notifications"}=t,[N,z]=k.useState([]),D=k.useMemo(()=>r?N.filter(q=>q.toasterId===r):N.filter(q=>!q.toasterId),[N,r]),G=k.useMemo(()=>Array.from(new Set([s].concat(D.filter(q=>q.position).map(q=>q.position)))),[D,s]),[H,L]=k.useState([]),[U,V]=k.useState(!1),[Q,W]=k.useState(!1),[K,le]=k.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=k.useRef(null),B=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),re=k.useRef(null),de=k.useRef(!1),Se=k.useCallback(q=>{z(se=>{var pe;return(pe=se.find(ve=>ve.id===q.id))!=null&&pe.delete||We.dismiss(q.id),se.filter(({id:ve})=>ve!==q.id)})},[]);return k.useEffect(()=>We.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{z(se=>se.map(pe=>pe.id===q.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{Cd.flushSync(()=>{z(se=>{const pe=se.findIndex(ve=>ve.id===q.id);return pe!==-1?[...se.slice(0,pe),{...se[pe],...q},...se.slice(pe+1)]:[q,...se]})})})}),[]),k.useEffect(()=>{if(p!=="system"){le(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?le("dark"):le("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:se})=>{le(se?"dark":"light")})}catch{q.addListener(({matches:pe})=>{try{le(pe?"dark":"light")}catch(ve){console.error(ve)}})}},[p]),k.useEffect(()=>{N.length<=1&&V(!1)},[N]),k.useEffect(()=>{const q=se=>{var pe;if(i.length>0&&i.every(ie=>se[ie]||se.code===ie)){var Pe;V(!0),(Pe=ee.current)==null||Pe.focus()}se.code==="Escape"&&(document.activeElement===ee.current||(pe=ee.current)!=null&&pe.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[i]),k.useEffect(()=>{if(ee.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,de.current=!1)}},[ee.current]),k.createElement("section",{ref:n,"aria-label":P??`${O} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},G.map((q,se)=>{var pe;const[ve,Pe]=q.split("-");return D.length?k.createElement("ol",{key:q,dir:x==="auto"?hi():x,tabIndex:-1,ref:ee,className:u,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":ve,"data-x-position":Pe,style:{"--front-toast-height":`${((pe=H[0])==null?void 0:pe.height)||0}px`,"--width":`${bf}px`,"--gap":`${C}px`,...v,...Ef(f,c)},onBlur:ie=>{de.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(de.current=!1,re.current&&(re.current.focus({preventScroll:!0}),re.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||de.current||(de.current=!0,re.current=ie.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{Q||V(!1)},onDragEnd:()=>V(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(ie=>!ie.position&&se===0||ie.position===q).map((ie,be)=>{var nt,at;return k.createElement(Sf,{key:ie.id,icons:E,index:be,toast:ie,defaultRichColors:m,duration:(nt=w==null?void 0:w.duration)!=null?nt:g,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:o,visibleToasts:y,closeButton:(at=w==null?void 0:w.closeButton)!=null?at:l,interacting:Q,position:q,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:Se,toasts:D.filter(ct=>ct.position==ie.position),heights:H.filter(ct=>ct.position==ie.position),setHeights:L,expandByDefault:a,gap:C,expanded:U,swipeDirections:t.swipeDirections})})):null}))});var kf=Object.defineProperty,ps=(e,t)=>kf(e,"name",{value:t,configurable:!0});function ko(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ps(ko,"setRef");function Na(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ko(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():ko(e[o],null)}}}}ps(Na,"composeRefs");function we(...e){return d.useCallback(Na(...e),e)}ps(we,"useComposedRefs");var Pf=Object.defineProperty,pt=(e,t)=>Pf(e,"name",{value:t,configurable:!0});function Tt(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n,i=null,a=!1;const l=[];Po(o)&&typeof or=="function"&&(o=or(o._payload)),d.Children.forEach(o,p=>{var m;if(La(p)){a=!0;const g=p;let v="child"in g.props?g.props.child:g.props.children;Po(v)&&typeof or=="function"&&(v=or(v._payload)),i=Rf(g,v),l.push((m=i==null?void 0:i.props)==null?void 0:m.children)}else l.push(p)}),i?i=d.cloneElement(i,void 0,l):!a&&d.Children.count(o)===1&&d.isValidElement(o)&&(i=o);const u=i?Fa(i):void 0,f=we(r,u);if(!i){if(o||o===0)throw new Error(a?If(e):Tf(e));return o}const c=$a(s,i.props??{});return i.type!==d.Fragment&&(c.ref=r?f:u),d.cloneElement(i,c)});return t.displayName=`${e}.Slot`,t}pt(Tt,"createSlot");var xn=Tt("Slot"),Ma=Symbol.for("radix.slottable");function za(e){const t=pt(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Ma,t}pt(za,"createSlottable");var Rf=pt((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 $a(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}pt($a,"mergeProps");function Fa(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)}pt(Fa,"getElementRef");function La(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ma}pt(La,"isSlottable");var Of=Symbol.for("react.lazy");function Po(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Of&&"_payload"in e&&Va(e._payload)}pt(Po,"isLazyComponent");function Va(e){return typeof e=="object"&&e!==null&&"then"in e}pt(Va,"isPromiseLike");var Tf=pt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),If=pt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),or=wn[" use ".trim().toString()];function Za(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=Za(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ua(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Za(e))&&(r&&(r+=" "),r+=t);return r}const mi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gi=Ua,Gn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],c=s==null?void 0:s[u];if(f===null)return null;const p=mi(f)||mi(c);return o[u][p]}),a=n&&Object.entries(n).reduce((u,f)=>{let[c,p]=f;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:p,...m}=f;return Object.entries(m).every(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...s,...a}[v]):{...s,...a}[v]===y})?[...u,c,p]:u},[]);return gi(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
3
|
-
* @license lucide-react v1.45.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 Af=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
8
|
-
* @license lucide-react v1.45.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
|
-
*/function Df(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Af(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/**
|
|
13
|
-
* @license lucide-react v1.45.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 jf=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};/**
|
|
18
|
-
* @license lucide-react v1.45.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 Nf=e=>{const t=jf(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
23
|
-
* @license lucide-react v1.45.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
|
-
*/const Ro=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
28
|
-
* @license lucide-react v1.45.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 Kt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
33
|
-
* @license lucide-react v1.45.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
|
-
*/function so(e){return e!=null}function Mf(e,t={}){var p,m;const n=t.attributeNames??{},r=g=>n[g]??g,o=e.size??e.width??Kt.width,s=e.size??e.height??Kt.height,i=((p=e.aliases)==null?void 0:p.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`))??[],a=[...e.name?[`lucide-${e.name}`]:[],...i],l=((m=t.className)==null?void 0:m.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?Ro(...l):Ro("lucide",...a,...l),f=t.absoluteStrokeWidth?Number(t.strokeWidth??Kt["stroke-width"])*Number(e.size??e.width??Kt.width)/Number(t.size??t.width??Kt.width):t.strokeWidth??Kt["stroke-width"];return["svg",{...Object.entries(Kt).reduce((g,[v,y])=>(g[r(v)]=y,g),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&so(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&so(t.width)&&{[r("width")]:t.width},..."height"in t&&so(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:f,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${o} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(g=>{const[v,y,w]=g,x=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...y}:y;return w?[v,x,w]:[v,x]})]}/**
|
|
38
|
-
* @license lucide-react v1.45.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
|
-
*/function zf(e,t={}){return Mf(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
43
|
-
* @license lucide-react v1.45.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 $f=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ff=d.createContext({}),Lf=()=>d.useContext(Ff),Vf=d.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:i,className:a="",children:l,iconNode:u=[],icon:f={node:u,aliases:[],size:24},...c},p)=>{const{size:m=24,strokeWidth:g=2,absoluteStrokeWidth:v=!1,nonScalingStroke:y=!1,color:w="currentColor",className:x=""}=Lf()??{},C=!!l||$f(c),[E,P,O=[]]=zf(f,{color:e??w,width:n??t??m,height:r??t??m,strokeWidth:o??g,absoluteStrokeWidth:s??v,nonScalingStroke:i??y,className:Ro(x,a),hasA11yProp:C,attributes:c});return d.createElement(E,{ref:p,...P},[...O.map(([N,z])=>d.createElement(N,z)),...Array.isArray(l)?l:[l]])});/**
|
|
48
|
-
* @license lucide-react v1.45.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
|
-
*/function Ke(e,t=[],n=[]){const r=typeof e=="string"?Df(e,t,n):e,o=d.forwardRef(({className:s,...i},a)=>d.createElement(Vf,{ref:a,icon:r,className:s,...i}));return r.name&&(o.displayName=Nf(r.name)),o}/**
|
|
53
|
-
* @license lucide-react v1.45.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 Ba={name:"book-open",size:24,node:[["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"}]]};Ba.node;const Zf=Ke(Ba);/**
|
|
58
|
-
* @license lucide-react v1.45.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 Wa={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Wa.node;const Uf=Ke(Wa);/**
|
|
63
|
-
* @license lucide-react v1.45.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 Ga={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Ga.node;const Bf=Ke(Ga);/**
|
|
68
|
-
* @license lucide-react v1.45.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 Ha={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Ha.node;const Wf=Ke(Ha);/**
|
|
73
|
-
* @license lucide-react v1.45.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 Ka={name:"key-round",size:24,node:[["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"}]]};Ka.node;const Gf=Ke(Ka);/**
|
|
78
|
-
* @license lucide-react v1.45.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 Ya={name:"layout-grid",size:24,node:[["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"}]]};Ya.node;const Hf=Ke(Ya);/**
|
|
83
|
-
* @license lucide-react v1.45.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 Ja={name:"log-out",size:24,node:[["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"}]]};Ja.node;const Kf=Ke(Ja);/**
|
|
88
|
-
* @license lucide-react v1.45.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 qa={name:"monitor",size:24,node:[["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"}]]};qa.node;const Yf=Ke(qa);/**
|
|
93
|
-
* @license lucide-react v1.45.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 Xa={name:"moon",size:24,node:[["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"}]]};Xa.node;const Jf=Ke(Xa);/**
|
|
98
|
-
* @license lucide-react v1.45.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 Qa={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};Qa.node;const qf=Ke(Qa);/**
|
|
103
|
-
* @license lucide-react v1.45.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 ec={name:"settings",size:24,node:[["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"}]]};ec.node;const tc=Ke(ec);/**
|
|
108
|
-
* @license lucide-react v1.45.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const nc={name:"sun",size:24,node:[["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"}]]};nc.node;const Xf=Ke(nc);/**
|
|
113
|
-
* @license lucide-react v1.45.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const rc={name:"users",size:24,node:[["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"}]]};rc.node;const Qf=Ke(rc);/**
|
|
118
|
-
* @license lucide-react v1.45.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const oc={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};oc.node;const ep=Ke(oc),io=768;function tp(){const[e,t]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${io-1}px)`),r=()=>{t(window.innerWidth<io)};return n.addEventListener("change",r),t(window.innerWidth<io),()=>n.removeEventListener("change",r)},[]),!!e}const hs="-",np=e=>{const t=op(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(hs);return a[0]===""&&a.length!==1&&a.shift(),sc(a,t)||rp(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},sc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?sc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(hs);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},vi=/^\[(.+)\]$/,rp=e=>{if(vi.test(e)){const t=vi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},op=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ip(Object.entries(e.classGroups),n).forEach(([s,i])=>{Oo(i,r,s,t)}),r},Oo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:bi(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(sp(o)){Oo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Oo(i,bi(t,s),n,r)})})},bi=(e,t)=>{let n=e;return t.split(hs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sp=e=>e.isThemeGetter,ip=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,ap=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},ic="!",cp=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let u=0,f=0,c;for(let y=0;y<a.length;y++){let w=a[y];if(u===0){if(w===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(f,y)),f=y+s;continue}if(w==="/"){c=y;continue}}w==="["?u++:w==="]"&&u--}const p=l.length===0?a:a.substring(f),m=p.startsWith(ic),g=m?p.substring(1):p,v=c&&c>f?c-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:i}):i},lp=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},up=e=>({cache:ap(e.cacheSize),parseClassName:cp(e),...np(e)}),dp=/\s+/,fp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(dp);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:f,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let g=!!m,v=r(g?p.substring(0,m):p);if(!v){if(!g){a=u+(a.length>0?" "+a:a);continue}if(v=r(p),!v){a=u+(a.length>0?" "+a:a);continue}g=!1}const y=lp(f).join(":"),w=c?y+ic:y,x=w+v;if(s.includes(x))continue;s.push(x);const C=o(v,g);for(let E=0;E<C.length;++E){const P=C[E];s.push(w+P)}a=u+(a.length>0?" "+a:a)}return a};function pp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ac(t))&&(r&&(r+=" "),r+=n);return r}const ac=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ac(e[r]))&&(n&&(n+=" "),n+=t);return n};function hp(e,...t){let n,r,o,s=i;function i(l){const u=t.reduce((f,c)=>c(f),e());return n=up(u),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=fp(l,n);return o(l,f),f}return function(){return s(pp.apply(null,arguments))}}const ge=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cc=/^\[(?:([a-z-]+):)?(.+)\]$/i,mp=/^\d+\/\d+$/,gp=new Set(["px","full","screen"]),vp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bp=/\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$/,yp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=e=>hn(e)||gp.has(e)||mp.test(e),Mt=e=>_n(e,"length",Op),hn=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>_n(e,"number",hn),Tn=e=>!!e&&Number.isInteger(Number(e)),_p=e=>e.endsWith("%")&&hn(e.slice(0,-1)),ne=e=>cc.test(e),zt=e=>vp.test(e),Sp=new Set(["length","size","percentage"]),Ep=e=>_n(e,Sp,lc),Cp=e=>_n(e,"position",lc),kp=new Set(["image","url"]),Pp=e=>_n(e,kp,Ip),Rp=e=>_n(e,"",Tp),In=()=>!0,_n=(e,t,n)=>{const r=cc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Op=e=>bp.test(e)&&!yp.test(e),lc=()=>!1,Tp=e=>wp.test(e),Ip=e=>xp.test(e),Ap=()=>{const e=ge("colors"),t=ge("spacing"),n=ge("blur"),r=ge("brightness"),o=ge("borderColor"),s=ge("borderRadius"),i=ge("borderSpacing"),a=ge("borderWidth"),l=ge("contrast"),u=ge("grayscale"),f=ge("hueRotate"),c=ge("invert"),p=ge("gap"),m=ge("gradientColorStops"),g=ge("gradientColorStopPositions"),v=ge("inset"),y=ge("margin"),w=ge("opacity"),x=ge("padding"),C=ge("saturate"),E=ge("scale"),P=ge("sepia"),O=ge("skew"),N=ge("space"),z=ge("translate"),D=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",ne,t],L=()=>[ne,t],U=()=>["",Pt,Mt],V=()=>["auto",hn,ne],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",ne],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[hn,ne];return{cacheSize:500,separator:":",theme:{colors:[In],spacing:[Pt,Mt],blur:["none","",zt,ne],brightness:re(),borderColor:[e],borderRadius:["none","","full",zt,ne],borderSpacing:L(),borderWidth:U(),contrast:re(),grayscale:ee(),hueRotate:re(),invert:ee(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[_p,Mt],inset:H(),margin:H(),opacity:re(),padding:L(),saturate:re(),scale:re(),sepia:ee(),skew:re(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[zt]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),ne]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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",Tn,ne]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",Tn,ne]}],"grid-cols":[{"grid-cols":[In]}],"col-start-end":[{col:["auto",{span:["full",Tn,ne]},ne]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[In]}],"row-start-end":[{row:["auto",{span:[Tn,ne]},ne]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...le()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...le(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...le(),"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":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[zt]},zt]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zt,Mt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ao]}],"font-family":[{font:[In]}],"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",ne]}],"line-clamp":[{"line-clamp":["none",hn,ao]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Pt,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Pt,Mt]}],"underline-offset":[{"underline-offset":["auto",Pt,ne]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],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",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Cp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ep]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Pp]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"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":[Pt,ne]}],"outline-w":[{outline:[Pt,Mt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Pt,Mt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zt,Rp]}],"shadow-color":[{shadow:[In]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",zt,ne]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[C]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Tn,ne]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],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",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Pt,Mt,ao]}],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"]}}},Dp=hp(Ap);function Y(...e){return Dp(Ua(e))}const jp=Gn("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"}}),Lr=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?xn:"button";return h.jsx(i,{className:Y(jp({variant:t,size:n,className:e})),ref:s,...o})});Lr.displayName="Button";const Tr=d.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:Y("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}));Tr.displayName="Input";var Np=Object.defineProperty,Mp=(e,t)=>Np(e,"name",{value:t,configurable:!0}),zp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=zp.reduce((e,t)=>{const n=Tt(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ms(e,t){e&&Ia.flushSync(()=>e.dispatchEvent(t))}Mp(ms,"dispatchDiscreteCustomEvent");var $p=Object.defineProperty,uc=(e,t)=>$p(e,"name",{value:t,configurable:!0}),yi="horizontal",Fp=["horizontal","vertical"],Lp=d.forwardRef(uc(function(t,n){const{decorative:r,orientation:o=yi,...s}=t,i=dc(o)?o:yi,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return h.jsx(ke.div,{"data-orientation":i,...l,...s,ref:n})},"Separator"));function dc(e){return Fp.includes(e)}uc(dc,"isValidOrientation");var fc=Lp;const Ir=d.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>h.jsx(fc,{ref:o,decorative:n,orientation:t,className:Y("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ir.displayName=fc.displayName;var Vp=Object.defineProperty,Sn=(e,t)=>Vp(e,"name",{value:t,configurable:!0}),pc=!!(typeof window<"u"&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return Sn(function(o){if(e==null||e(o),n===!1||!o||!o.defaultPrevented)return t==null?void 0:t(o)},"handleEvent")}Sn(X,"composeEventHandlers");function Zp(e){var t;if(!pc)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Sn(Zp,"getOwnerWindow");function To(e){if(!pc)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Sn(To,"getOwnerDocument");function hc(e,t=!1){const{activeElement:n}=To(e);if(!(n!=null&&n.nodeName))return null;if(mc(n)&&n.contentDocument)return hc(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=To(n).getElementById(r);if(o)return o}}return n}Sn(hc,"getActiveElement");function mc(e){return e.tagName==="IFRAME"}Sn(mc,"isFrame");var Up=Object.defineProperty,ot=(e,t)=>Up(e,"name",{value:t,configurable:!0});function Bp(e,t){const n=d.createContext(t);n.displayName=e+"Context";const r=ot(s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function o(s,i={}){const{optional:a=!1}=i,l=d.useContext(n);if(l)return l;if(t!==void 0)return t;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return ot(o,"useContext"),[r,o]}ot(Bp,"createContext");function Dt(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const u=ot(c=>{var w;const{scope:p,children:m,...g}=c,v=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,y=d.useMemo(()=>g,Object.values(g));return h.jsx(v.Provider,{value:y,children:m})},"Provider");u.displayName=s+"Provider";function f(c,p,m={}){var w;const{optional:g=!1}=m,v=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,y=d.useContext(v);if(y)return y;if(i!==void 0)return i;if(!g)throw new Error(`\`${c}\` must be used within \`${s}\``)}return ot(f,"useContext"),[u,f]}ot(r,"createContext");const o=ot(()=>{const s=n.map(i=>d.createContext(i));return ot(function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return o.scopeName=e,[r,gc(o,...t)]}ot(Dt,"createContextScope");function gc(...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 i=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}ot(gc,"composeContextScopes");var He=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Wp=Object.defineProperty,Gp=(e,t)=>Wp(e,"name",{value:t,configurable:!0}),Hp=wn[" useId ".trim().toString()]||(()=>{}),Kp=0;function Zt(e){const[t,n]=d.useState(Hp());return He(()=>{e||n(r=>r??String(Kp++))},[e]),e||(t?`radix-${t}`:"")}Gp(Zt,"useId");var Yp=Object.defineProperty,Jp=(e,t)=>Yp(e,"name",{value:t,configurable:!0}),wi=wn[" useEffectEvent ".trim().toString()],xi=wn[" useInsertionEffect ".trim().toString()];function vc(e){if(typeof wi=="function")return wi(e);const t=d.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof xi=="function"?xi(()=>{t.current=e}):He(()=>{t.current=e}),d.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}Jp(vc,"useEffectEvent");var qp=Object.defineProperty,Hn=(e,t)=>qp(e,"name",{value:t,configurable:!0}),Xp=wn[" useInsertionEffect ".trim().toString()]||He;function Kn({prop:e,defaultProp:t,onChange:n=Hn(()=>{},"onChange"),caller:r}){const[o,s,i]=bc({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o,u=d.useCallback(f=>{var c;if(a){const p=yc(f)?f(e):f;p!==e&&((c=i.current)==null||c.call(i,p))}else s(f)},[a,e,s,i]);return[l,u]}Hn(Kn,"useControllableState");function bc({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return Xp(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}Hn(bc,"useUncontrolledState");function yc(e){return typeof e=="function"}Hn(yc,"isFunction");var _i=Symbol("RADIX:SYNC_STATE");function Qp(e,t,n,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=t,l=o!==void 0,u=vc(i),f=[{...n,state:s}];r&&f.push(r);const[c,p]=d.useReducer((y,w)=>{if(w.type===_i)return{...y,state:w.state};const x=e(y,w);return l&&!Object.is(x.state,y.state)&&u(x.state),x},...f),m=c.state,g=d.useRef(m);d.useEffect(()=>{g.current!==m&&(g.current=m,l||u(m))},[m,g,l]);const v=d.useMemo(()=>o!==void 0?{...c,state:o}:c,[c,o]);return d.useEffect(()=>{l&&!Object.is(o,c.state)&&p({type:_i,state:o})},[o,c.state,l]),[v,p]}Hn(Qp,"useControllableStateReducer");var eh=Object.defineProperty,th=(e,t)=>eh(e,"name",{value:t,configurable:!0});function xt(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)}),[])}th(xt,"useCallbackRef");var nh=Object.defineProperty,Ne=(e,t)=>nh(e,"name",{value:t,configurable:!0}),Io="dismissableLayer.update",rh="dismissableLayer.pointerDownOutside",oh="dismissableLayer.focusOutside",Si,wc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),gs=d.forwardRef(Ne(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...f}=t,c=d.useContext(wc),[p,m]=d.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=d.useState({}),y=we(n,m),w=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=x?w.indexOf(x):-1,E=p?w.indexOf(p):-1,P=c.layersWithOutsidePointerEventsDisabled.size>0,O=E>=C,N=d.useRef(!1),z=_c(L=>{i==null||i(L),l==null||l(L),L.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:d.useCallback(L=>{if(!(L instanceof Node))return!1;const U=[...c.branches].some(V=>V.contains(L));return O&&!U},[c.branches,O])}),D=Sc(L=>{if(o&&N.current)return;const U=L.target;[...c.branches].some(Q=>Q.contains(U))||(a==null||a(L),l==null||l(L),L.defaultPrevented||u==null||u())},g),G=p?E===w.length-1:!1,H=xt(L=>{L.key==="Escape"&&(s==null||s(L),!L.defaultPrevented&&u&&(L.preventDefault(),u()))});return d.useEffect(()=>{if(G)return g.addEventListener("keydown",H,{capture:!0}),()=>g.removeEventListener("keydown",H,{capture:!0})},[g,G,H]),d.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Si=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),Ao(),()=>{r&&(c.layersWithOutsidePointerEventsDisabled.delete(p),c.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=Si))}},[p,g,r,c]),d.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),Ao())},[p,c]),d.useEffect(()=>{const L=Ne(()=>v({}),"handleUpdate");return document.addEventListener(Io,L),()=>document.removeEventListener(Io,L)},[]),h.jsx(ke.div,{...f,ref:y,style:{pointerEvents:P?O?"auto":"none":void 0,...t.style},onFocusCapture:X(t.onFocusCapture,D.onFocusCapture),onBlurCapture:X(t.onBlurCapture,D.onBlurCapture),onPointerDownCapture:X(t.onPointerDownCapture,z.onPointerDownCapture)})},"DismissableLayer"));function xc(){const e=d.useContext(wc),[t,n]=d.useState(null);return d.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ne(xc,"useDismissableLayerSurface");var sh=Ne(()=>!0,"IS_TRUE");function _c(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=sh}=t,a=xt(e),l=d.useRef(!1),u=d.useRef(!1),f=d.useRef(new Map),c=d.useRef(()=>{});return d.useEffect(()=>{function p(){u.current=!1,o.current=!1,f.current.clear()}Ne(p,"resetOutsideInteraction");function m(){return Array.from(f.current.values()).some(Boolean)}Ne(m,"isOutsideInteractionIntercepted");function g(C){if(!u.current)return;const E=C.target;E instanceof Node&&[...s].some(O=>O.contains(E))||f.current.set(C.type,!0),C.type==="click"&&window.setTimeout(()=>{u.current&&c.current()},0)}Ne(g,"handleInteractionCapture");function v(C){u.current&&f.current.set(C.type,!1)}Ne(v,"handleInteractionBubble");const y=Ne(C=>{if(C.target&&!l.current){let E=function(){n.removeEventListener("click",c.current);const O=m();p(),O||vs(rh,a,P,{discrete:!0})};if(Ne(E,"handleAndDispatchPointerDownOutsideEvent"),!i(C.target)){n.removeEventListener("click",c.current),p(),l.current=!1;return}const P={originalEvent:C};u.current=!0,o.current=r&&C.button===0,f.current.clear(),!r||C.button!==0?E():(n.removeEventListener("click",c.current),c.current=E,n.addEventListener("click",c.current,{once:!0}))}else n.removeEventListener("click",c.current),p();l.current=!1},"handlePointerDown"),w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const C of w)n.addEventListener(C,g,!0),n.addEventListener(C,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 C of w)n.removeEventListener(C,g,!0),n.removeEventListener(C,v)}},[n,a,r,o,s,i]),{onPointerDownCapture:Ne(()=>l.current=!0,"onPointerDownCapture")}}Ne(_c,"usePointerDownOutside");function Sc(e,t=globalThis==null?void 0:globalThis.document){const n=xt(e),r=d.useRef(!1);return d.useEffect(()=>{const o=Ne(s=>{s.target&&!r.current&&vs(oh,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Ne(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Ne(()=>r.current=!1,"onBlurCapture")}}Ne(Sc,"useFocusOutside");function Ao(){const e=new CustomEvent(Io);document.dispatchEvent(e)}Ne(Ao,"dispatchUpdate");function vs(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?ms(o,s):o.dispatchEvent(s)}Ne(vs,"handleAndDispatchCustomEvent");var ih=Object.defineProperty,Be=(e,t)=>ih(e,"name",{value:t,configurable:!0}),co="focusScope.autoFocusOnMount",lo="focusScope.autoFocusOnUnmount",Ei={bubbles:!1,cancelable:!0},Ec=d.forwardRef(Be(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[l,u]=d.useState(null),f=xt(s),c=xt(i),p=d.useRef(null),m=we(n,u),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(o){let y=function(E){if(g.paused||!l)return;const P=E.target;l.contains(P)?p.current=P:Rt(p.current,{select:!0})},w=function(E){if(g.paused||!l)return;const P=E.relatedTarget;P!==null&&(l.contains(P)||Rt(p.current,{select:!0}))},x=function(E){if(document.activeElement===document.body)for(const O of E)O.removedNodes.length>0&&Rt(l)};Be(y,"handleFocusIn"),Be(w,"handleFocusOut"),Be(x,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",w);const C=new MutationObserver(x);return l&&C.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),C.disconnect()}}},[o,l,g.paused]),d.useEffect(()=>{if(l){Ci.add(g);const y=document.activeElement;if(!l.contains(y)){const x=new CustomEvent(co,Ei);l.addEventListener(co,f),l.dispatchEvent(x),x.defaultPrevented||(Cc(Tc(bs(l)),{select:!0}),document.activeElement===y&&Rt(l))}return()=>{l.removeEventListener(co,f),setTimeout(()=>{const x=new CustomEvent(lo,Ei);l.addEventListener(lo,c),l.dispatchEvent(x),x.defaultPrevented||Rt(y??document.body,{select:!0}),l.removeEventListener(lo,c),Ci.remove(g)},0)}}},[l,f,c,g]);const v=d.useCallback(y=>{if(!r&&!o||g.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,x=document.activeElement;if(w&&x){const C=y.currentTarget,[E,P]=kc(C);E&&P?!y.shiftKey&&x===P?(y.preventDefault(),r&&Rt(E,{select:!0})):y.shiftKey&&x===E&&(y.preventDefault(),r&&Rt(P,{select:!0})):x===C&&y.preventDefault()}},[r,o,g.paused]);return h.jsx(ke.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})},"FocusScope"));function Cc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rt(r,{select:t}),document.activeElement!==n)return}Be(Cc,"focusFirst");function kc(e){const t=bs(e),n=Do(t,e),r=Do(t.reverse(),e);return[n,r]}Be(kc,"getTabbableEdges");function bs(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(bs,"getTabbableCandidates");function Do(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Pc(r,{upTo:t})))return r}Be(Do,"findVisible");function Pc(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(Pc,"isHidden");function Rc(e){return e instanceof HTMLInputElement&&"select"in e}Be(Rc,"isSelectableInput");function Rt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rc(e)&&t&&e.select()}}Be(Rt,"focus");var Ci=Oc();function Oc(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jo(e,t),e.unshift(t)},remove(t){var n;e=jo(e,t),(n=e[0])==null||n.resume()}}}Be(Oc,"createFocusScopesStack");function jo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Be(jo,"arrayRemove");function Tc(e){return e.filter(t=>t.tagName!=="A")}Be(Tc,"removeLinks");var ah=Object.defineProperty,ch=(e,t)=>ah(e,"name",{value:t,configurable:!0}),ys=d.forwardRef(ch(function(t,n){var l;const{container:r,...o}=t,[s,i]=d.useState(!1);He(()=>i(!0),[]);const a=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Ia.createPortal(h.jsx(ke.div,{...o,ref:n}),a):null},"Portal")),lh=Object.defineProperty,It=(e,t)=>lh(e,"name",{value:t,configurable:!0});function Ic(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}It(Ic,"useStateMachine");var jt=It(e=>{const{present:t,children:n}=e,r=Ac(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=Dc(r.ref,jc(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence");function Ac(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=d.useRef(void 0),a=e?"mounted":"unmounted",[l,u]=Ic(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{l==="mounted"?(s.current=i.current??pn(r.current),i.current=void 0):s.current="none"},[l]),He(()=>{const f=r.current,c=o.current;if(c!==e){const m=s.current,g=pn(f);e?(i.current=g,u("MOUNT")):g==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(c&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),He(()=>{if(t){let f;const c=t.ownerDocument.defaultView??window,p=It(g=>{const y=pn(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&y&&(u("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},"handleAnimationEnd"),m=It(g=>{g.target===t&&(s.current=pn(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{c.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(f=>{if(f){const c=getComputedStyle(f);r.current=c,i.current=pn(c)}else r.current=null;n(f)},[])}}It(Ac,"usePresence");function No(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}It(No,"setRef");function Dc(...e){const t=d.useRef(e);return t.current=e,d.useCallback(n=>{const r=t.current;let o=!1;const s=r.map(i=>{const a=No(i,n);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():No(r[i],null)}}},[])}It(Dc,"useStableComposedRefs");function pn(e){return(e==null?void 0:e.animationName)||"none"}It(pn,"getAnimationName");function jc(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(jc,"getElementRef");var uh=Object.defineProperty,ws=(e,t)=>uh(e,"name",{value:t,configurable:!0}),sr=0,yt=null;function dh(e){return Vr(),e.children}ws(dh,"FocusGuards");function Vr(){d.useEffect(()=>{yt||(yt={start:Mo(),end:Mo()});const{start:e,end:t}=yt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),sr++,()=>{sr===1&&(yt==null||yt.start.remove(),yt==null||yt.end.remove(),yt=null),sr=Math.max(0,sr-1)}},[])}ws(Vr,"useFocusGuards");function Mo(){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}ws(Mo,"createFocusGuard");var wt=function(){return wt=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},wt.apply(this,arguments)};function Nc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function fh(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 yr="right-scroll-bar-position",wr="width-before-scroll-bar",ph="with-scroll-bars-hidden",hh="--removed-body-scroll-bar-size";function uo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mh(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 gh=typeof window<"u"?d.useLayoutEffect:d.useEffect,ki=new WeakMap;function vh(e,t){var n=mh(null,function(r){return e.forEach(function(o){return uo(o,r)})});return gh(function(){var r=ki.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||uo(a,null)}),s.forEach(function(a){o.has(a)||uo(a,i)})}ki.set(n,e)},[e]),n}function bh(e){return e}function yh(e,t){t===void 0&&(t=bh);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function wh(e){e===void 0&&(e={});var t=yh(null);return t.options=wt({async:!0,ssr:!1},e),t}var Mc=function(e){var t=e.sideCar,n=Nc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,wt({},n))};Mc.isSideCarExport=!0;function xh(e,t){return e.useMedium(t),Mc}var zc=wh(),fo=function(){},Zr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:fo,onWheelCapture:fo,onTouchMoveCapture:fo}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,v=e.inert,y=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,C=e.gapMode,E=Nc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,O=vh([n,t]),N=wt(wt({},E),o);return d.createElement(d.Fragment,null,f&&d.createElement(P,{sideCar:zc,removeScrollBar:u,shards:c,noRelative:m,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:C}),i?d.cloneElement(d.Children.only(a),wt(wt({},N),{ref:O})):d.createElement(x,wt({},N,{className:l,ref:O}),a))});Zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zr.classNames={fullWidth:wr,zeroRight:yr};var _h=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_h();return t&&e.setAttribute("nonce",t),e}function Eh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ch(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sh())&&(Eh(t,n),Ch(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ph=function(){var e=kh();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$c=function(){var e=Ph(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Rh={left:0,top:0,right:0,gap:0},po=function(e){return parseInt(e||"",10)||0},Oh=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[po(n),po(r),po(o)]},Th=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rh;var t=Oh(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])}},Ih=$c(),mn="data-scroll-locked",Ah=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
123
|
-
.`.concat(ph,` {
|
|
124
|
-
overflow: hidden `).concat(r,`;
|
|
125
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
126
|
-
}
|
|
127
|
-
body[`).concat(mn,`] {
|
|
128
|
-
overflow: hidden `).concat(r,`;
|
|
129
|
-
overscroll-behavior: contain;
|
|
130
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
131
|
-
padding-left: `.concat(o,`px;
|
|
132
|
-
padding-top: `).concat(s,`px;
|
|
133
|
-
padding-right: `).concat(i,`px;
|
|
134
|
-
margin-left:0;
|
|
135
|
-
margin-top:0;
|
|
136
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
137
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.`).concat(yr,` {
|
|
141
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.`).concat(wr,` {
|
|
145
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.`).concat(yr," .").concat(yr,` {
|
|
149
|
-
right: 0 `).concat(r,`;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.`).concat(wr," .").concat(wr,` {
|
|
153
|
-
margin-right: 0 `).concat(r,`;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
body[`).concat(mn,`] {
|
|
157
|
-
`).concat(hh,": ").concat(a,`px;
|
|
158
|
-
}
|
|
159
|
-
`)},Pi=function(){var e=parseInt(document.body.getAttribute(mn)||"0",10);return isFinite(e)?e:0},Dh=function(){d.useEffect(function(){return document.body.setAttribute(mn,(Pi()+1).toString()),function(){var e=Pi()-1;e<=0?document.body.removeAttribute(mn):document.body.setAttribute(mn,e.toString())}},[])},jh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Dh();var s=d.useMemo(function(){return Th(o)},[o]);return d.createElement(Ih,{styles:Ah(s,!t,o,n?"":"!important")})},zo=!1;if(typeof window<"u")try{var ir=Object.defineProperty({},"passive",{get:function(){return zo=!0,!0}});window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{zo=!1}var ln=zo?{passive:!1}:!1,Nh=function(e){return e.tagName==="TEXTAREA"},Fc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nh(e)&&n[t]==="visible")},Mh=function(e){return Fc(e,"overflowY")},zh=function(e){return Fc(e,"overflowX")},Ri=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Lc(e,r);if(o){var s=Vc(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$h=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Fh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Lc=function(e,t){return e==="v"?Mh(t):zh(t)},Vc=function(e,t){return e==="v"?$h(t):Fh(t)},Lh=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vh=function(e,t,n,r,o){var s=Lh(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),u=!1,f=i>0,c=0,p=0;do{if(!a)break;var m=Vc(e,a),g=m[0],v=m[1],y=m[2],w=v-y-s*g;(g||w)&&Lc(e,a)&&(c+=w,p+=g);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&Math.abs(c)<1||!f&&Math.abs(p)<1)&&(u=!0),u},ar=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oi=function(e){return[e.deltaX,e.deltaY]},Ti=function(e){return e&&"current"in e?e.current:e},Zh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Uh=function(e){return`
|
|
160
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
161
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
162
|
-
`)},Bh=0,un=[];function Wh(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Bh++)[0],s=d.useState($c)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=fh([e.lockRef.current],(e.shards||[]).map(Ti),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var w=ar(v),x=n.current,C="deltaX"in v?v.deltaX:x[0]-w[0],E="deltaY"in v?v.deltaY:x[1]-w[1],P,O=v.target,N=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in v&&N==="h"&&O.type==="range")return!1;var z=window.getSelection(),D=z&&z.anchorNode,G=D?D===O||D.contains(O):!1;if(G)return!1;var H=Ri(N,O);if(!H)return!0;if(H?P=N:(P=N==="v"?"h":"v",H=Ri(N,O)),!H)return!1;if(!r.current&&"changedTouches"in v&&(C||E)&&(r.current=P),!P)return!0;var L=r.current||P;return Vh(L,y,v,L==="h"?C:E)},[]),l=d.useCallback(function(v){var y=v;if(!(!un.length||un[un.length-1]!==s)){var w="deltaY"in y?Oi(y):ar(y),x=t.current.filter(function(P){return P.name===y.type&&(P.target===y.target||y.target===P.shadowParent)&&Zh(P.delta,w)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Ti).filter(Boolean).filter(function(P){return P.contains(y.target)}),E=C.length>0?a(y,C[0]):!i.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),u=d.useCallback(function(v,y,w,x){var C={name:v,delta:y,target:w,should:x,shadowParent:Gh(w)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),f=d.useCallback(function(v){n.current=ar(v),r.current=void 0},[]),c=d.useCallback(function(v){u(v.type,Oi(v),v.target,a(v,e.lockRef.current))},[]),p=d.useCallback(function(v){u(v.type,ar(v),v.target,a(v,e.lockRef.current))},[]);d.useEffect(function(){return un.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ln),document.addEventListener("touchmove",l,ln),document.addEventListener("touchstart",f,ln),function(){un=un.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,ln),document.removeEventListener("touchmove",l,ln),document.removeEventListener("touchstart",f,ln)}},[]);var m=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(s,{styles:Uh(o)}):null,m?d.createElement(jh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hh=xh(zc,Wh);var xs=d.forwardRef(function(e,t){return d.createElement(Zr,wt({},e,{ref:t,sideCar:Hh}))});xs.classNames=Zr.classNames;var Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,cr=new WeakMap,lr={},ho=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Yh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zc(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})},Jh=function(e,t,n,r){var o=Yh(t,Array.isArray(e)?e:[e]);lr[n]||(lr[n]=new WeakMap);var s=lr[n],i=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(a.has(p))f(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",v=(dn.get(p)||0)+1,y=(s.get(p)||0)+1;dn.set(p,v),s.set(p,y),i.push(p),v===1&&g&&cr.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),a.clear(),ho++,function(){i.forEach(function(c){var p=dn.get(c)-1,m=s.get(c)-1;dn.set(c,p),s.set(c,m),p||(cr.has(c)||c.removeAttribute(r),cr.delete(c)),m||c.removeAttribute(n)}),ho--,ho||(dn=new WeakMap,dn=new WeakMap,cr=new WeakMap,lr={})}},Uc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Kh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Jh(r,o,n,"aria-hidden")):function(){return null}},qh=Object.defineProperty,Qe=(e,t)=>qh(e,"name",{value:t,configurable:!0}),_s="Dialog",[Bc,AS]=Dt(_s),[Xh,ht]=Bc(_s),Qh=Qe(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=d.useRef(null),l=d.useRef(null),[u,f]=Kn({prop:r,defaultProp:o??!1,onChange:s,caller:_s}),[c,p]=d.useState(0),[m,g]=d.useState(0);return h.jsx(Xh,{scope:t,triggerRef:a,contentRef:l,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),titlePresent:c>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:g,open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(v=>!v),[f]),modal:i,children:n})},"Dialog"),em="DialogTrigger",DS=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,...o}=t,s=ht(em,r),i=we(n,s.triggerRef);return h.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Ur(s.open),...o,ref:i,onClick:X(t.onClick,s.onOpenToggle)})},"DialogTrigger")),Wc="DialogPortal",[tm,Gc]=Bc(Wc,{forceMount:void 0}),nm=Qe(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ht(Wc,t);return h.jsx(tm,{scope:t,forceMount:n,children:d.Children.map(r,i=>h.jsx(jt,{present:n||s.open,children:h.jsx(ys,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),$o="DialogOverlay",Hc=d.forwardRef(Qe(function(t,n){const r=Gc($o,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,i=ht($o,t.__scopeDialog);return i.modal?h.jsx(jt,{present:o||i.open,children:h.jsx(om,{...s,ref:n})}):null},"DialogOverlay")),rm=Tt("DialogOverlay.RemoveScroll"),om=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,...o}=t,s=ht($o,r),i=xc(),a=we(n,i);return h.jsx(xs,{as:rm,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(ke.div,{"data-state":Ur(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Ln="DialogContent",Kc=d.forwardRef(Qe(function(t,n){const r=Gc(Ln,t.__scopeDialog),{forceMount:o=r.forceMount,...s}=t,i=ht(Ln,t.__scopeDialog);return h.jsx(jt,{present:o||i.open,children:i.modal?h.jsx(sm,{...s,ref:n}):h.jsx(im,{...s,ref:n})})},"DialogContent")),sm=d.forwardRef(Qe(function(t,n){const r=ht(Ln,t.__scopeDialog),o=d.useRef(null),s=we(n,r.contentRef,o);return d.useEffect(()=>{const i=o.current;if(i)return Uc(i)},[]),h.jsx(Yc,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:X(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:X(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:X(t.onFocusOutside,i=>i.preventDefault())})},"DialogContentModal")),im=d.forwardRef(Qe(function(t,n){const r=ht(Ln,t.__scopeDialog),o=d.useRef(!1),s=d.useRef(!1);return h.jsx(Yc,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:i=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((f=r.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})},"DialogContentNonModal")),Yc=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,l=ht(Ln,r);return Vr(),h.jsx(h.Fragment,{children:h.jsx(Ec,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(gs,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionPresent?l.descriptionId:void 0,"aria-labelledby":l.titlePresent?l.titleId:void 0,"data-state":Ur(l.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})},"DialogContentImpl")),am="DialogTitle",Jc=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,...o}=t,s=ht(am,r),{setTitleCount:i}=s;return He(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),h.jsx(ke.h2,{id:s.titleId,...o,ref:n})},"DialogTitle")),cm="DialogDescription",qc=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,...o}=t,s=ht(cm,r),{setDescriptionCount:i}=s;return He(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),h.jsx(ke.p,{id:s.descriptionId,...o,ref:n})},"DialogDescription")),lm="DialogClose",um=d.forwardRef(Qe(function(t,n){const{__scopeDialog:r,...o}=t,s=ht(lm,r);return h.jsx(ke.button,{type:"button",...o,ref:n,onClick:X(t.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function Ur(e){return e?"open":"closed"}Qe(Ur,"getState");const dm=Qh,fm=nm,Xc=d.forwardRef(({className:e,...t},n)=>h.jsx(Hc,{className:Y("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}));Xc.displayName=Hc.displayName;const pm=Gn("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"}}),Qc=d.forwardRef(({side:e="right",className:t,children:n,...r},o)=>h.jsxs(fm,{children:[h.jsx(Xc,{}),h.jsxs(Kc,{ref:o,className:Y(pm({side:e}),t),...r,children:[n,h.jsxs(um,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[h.jsx(ep,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qc.displayName=Kc.displayName;const el=({className:e,...t})=>h.jsx("div",{className:Y("flex flex-col space-y-2 text-center sm:text-left",e),...t});el.displayName="SheetHeader";const tl=d.forwardRef(({className:e,...t},n)=>h.jsx(Jc,{ref:n,className:Y("text-lg font-semibold text-foreground",e),...t}));tl.displayName=Jc.displayName;const nl=d.forwardRef(({className:e,...t},n)=>h.jsx(qc,{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));nl.displayName=qc.displayName;function Ii({className:e,...t}){return h.jsx("div",{className:Y("animate-pulse rounded-md bg-muted",e),...t})}var hm=Object.defineProperty,mm=(e,t)=>hm(e,"name",{value:t,configurable:!0});function rl(e){const[t,n]=d.useState(void 0);return He(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}mm(rl,"useSize");var gm=Object.defineProperty,Ut=(e,t)=>gm(e,"name",{value:t,configurable:!0}),ol="Popper",[sl,Br]=Dt(ol),[vm,il]=sl(ol),bm=Ut(e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null),[s,i]=d.useState(void 0);return h.jsx(vm,{scope:t,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:n})},"Popper"),ym="PopperAnchor",wm=d.forwardRef(Ut(function(t,n){const{__scopePopper:r,virtualRef:o,...s}=t,i=il(ym,r),a=d.useRef(null),l=i.onAnchorChange,u=d.useCallback(v=>{a.current=v,v&&l(v)},[l]),f=we(n,u),c=d.useRef(null);d.useEffect(()=>{if(!o)return;const v=c.current;c.current=o.current,v!==c.current&&l(c.current)});const p=i.placementState&&Wr(i.placementState),m=p==null?void 0:p[0],g=p==null?void 0:p[1];return o?null:h.jsx(ke.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:f})},"PopperAnchor")),al="PopperContent",[xm,jS]=sl(al),_m=d.forwardRef(Ut(function(t,n){var ie,be,nt,at,ct,gt,nn;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:c=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:v,...y}=t,w=il(al,r),[x,C]=d.useState(null),E=we(n,C),[P,O]=d.useState(null),N=rl(P),z=(N==null?void 0:N.width)??0,D=(N==null?void 0:N.height)??0,G=o+(i!=="center"?"-"+i:""),H=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(f)?f:[f],U=L.length>0,V={padding:H,boundary:L.filter(cl),altBoundary:U},{refs:Q,floatingStyles:W,placement:K,isPositioned:le,middlewareData:ee}=kd({strategy:"fixed",placement:G,whileElementsMounted:Ut((...Nt)=>jd(...Nt,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:w.anchor},middleware:[Pd({mainAxis:s+D,alignmentAxis:a}),u&&Rd({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Dd():void 0,...V}),u&&Od({...V}),Td({...V,apply:Ut(({elements:Nt,rects:lt,availableWidth:Ht,availableHeight:Le})=>{const{width:kn,height:rn}=lt.reference,Ee=Nt.floating.style;Ee.setProperty("--radix-popper-available-width",`${Ht}px`),Ee.setProperty("--radix-popper-available-height",`${Le}px`),Ee.setProperty("--radix-popper-anchor-width",`${kn}px`),Ee.setProperty("--radix-popper-anchor-height",`${rn}px`)},"apply")}),P&&Id({element:P,padding:l}),Sm({arrowWidth:z,arrowHeight:D}),m&&Ad({strategy:"referenceHidden",...V,boundary:U?V.boundary:void 0})]}),B=w.setPlacementState;He(()=>(B(K),()=>{B(void 0)}),[K,B]);const[re,de]=Wr(K),Se=xt(v);He(()=>{le&&(Se==null||Se())},[le,Se]);const q=(ie=ee.arrow)==null?void 0:ie.x,se=(be=ee.arrow)==null?void 0:be.y,pe=((nt=ee.arrow)==null?void 0:nt.centerOffset)!==0,[ve,Pe]=d.useState();return He(()=>{x&&Pe(window.getComputedStyle(x).zIndex)},[x]),h.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:le?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(at=ee.transformOrigin)==null?void 0:at.x,(ct=ee.transformOrigin)==null?void 0:ct.y].join(" "),...((gt=ee.hide)==null?void 0:gt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(xm,{scope:r,placedSide:re,placedAlign:de,onArrowChange:O,arrowX:q,arrowY:se,shouldHideArrow:pe,children:h.jsx(ke.div,{"data-side":re,"data-align":de,...y,ref:E,style:{...y.style,animation:le?(nn=y.style)==null?void 0:nn.animation:"none"}})})})},"PopperContent"));function cl(e){return e!==null}Ut(cl,"isNotNull");var Sm=Ut(e=>({name:"transformOrigin",options:e,fn(t){var y,w,x;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=Wr(n),c={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+a/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let g="",v="";return u==="bottom"?(g=i?c:`${p}px`,v=`${-l}px`):u==="top"?(g=i?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=i?c:`${m}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=i?c:`${m}px`),{data:{x:g,y:v}}}}),"transformOrigin");function Wr(e){const[t,n="center"]=e.split("-");return[t,n]}Ut(Wr,"getSideAndAlignFromPlacement");var ll=bm,ul=wm,dl=_m,Em=Object.defineProperty,Cm=(e,t)=>Em(e,"name",{value:t,configurable:!0}),km=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"}),Pm=d.forwardRef(Cm(function(t,n){return h.jsx(ke.span,{...t,ref:n,style:{...km,...t.style}})},"VisuallyHidden")),Rm=Pm,Om=Object.defineProperty,$e=(e,t)=>Om(e,"name",{value:t,configurable:!0}),[Ss,NS]=Dt("Tooltip",[Br]),Es=Br(),Tm="TooltipProvider",Im=700,Fo="tooltip.open",[Am,Cs]=Ss(Tm),Dm=$e(e=>{const{__scopeTooltip:t,delayDuration:n=Im,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),h.jsx(Am,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),i.current=!1)},[r]),onClose:d.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),Lo="Tooltip",[jm,Yn]=Ss(Lo),Nm=$e(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Cs(Lo,e.__scopeTooltip),u=Es(t),[f,c]=d.useState(null),[p,m]=d.useState(void 0),g=Zt(),v=d.useRef(0),y=i??l.disableHoverableContent,w=a??l.delayDuration,x=d.useRef(!1),[C,E]=Kn({prop:r,defaultProp:o??!1,onChange:$e(G=>{G?(l.onOpen(),document.dispatchEvent(new CustomEvent(Fo))):l.onClose(),s==null||s(G)},"onChange"),caller:Lo}),P=d.useMemo(()=>C?x.current?"delayed-open":"instant-open":"closed",[C]),O=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,E(!0)},[E]),N=d.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),z=d.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,E(!0),v.current=0},w)},[w,E]);d.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const D=p??g;return h.jsx(ll,{...u,children:h.jsx(jm,{scope:t,contentId:D,setContentId:m,open:C,stateAttribute:P,trigger:f,onTriggerChange:c,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?z():O()},[l.isOpenDelayedRef,z,O]),onTriggerLeave:d.useCallback(()=>{y?N():(window.clearTimeout(v.current),v.current=0)},[N,y]),onOpen:O,onClose:N,disableHoverableContent:y,children:n})})},"Tooltip"),Ai="TooltipTrigger",Mm=d.forwardRef($e(function(t,n){const{__scopeTooltip:r,...o}=t,s=Yn(Ai,r),i=Cs(Ai,r),a=Es(r),l=d.useRef(null),u=we(n,l,s.onTriggerChange),f=d.useRef(!1),c=d.useRef(!1),p=d.useCallback(()=>f.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),h.jsx(ul,{asChild:!0,...a,children:h.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:X(t.onPointerMove,m=>{m.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:X(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:X(t.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:X(t.onFocus,()=>{f.current||s.onOpen()}),onBlur:X(t.onBlur,s.onClose),onClick:X(t.onClick,s.onClose)})})},"TooltipTrigger")),fl="TooltipPortal",[zm,$m]=Ss(fl,{forceMount:void 0}),Fm=$e(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Yn(fl,t);return h.jsx(zm,{scope:t,forceMount:n,children:h.jsx(jt,{present:n||s.open,children:h.jsx(ys,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Vn="TooltipContent",Lm=d.forwardRef($e(function(t,n){const r=$m(Vn,t.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=t,a=Yn(Vn,t.__scopeTooltip);return h.jsx(jt,{present:o||a.open,children:a.disableHoverableContent?h.jsx(pl,{side:s,...i,ref:n}):h.jsx(Vm,{side:s,...i,ref:n})})},"TooltipContent")),Vm=d.forwardRef($e(function(t,n){const r=Yn(Vn,t.__scopeTooltip),o=Cs(Vn,t.__scopeTooltip),s=d.useRef(null),i=we(n,s),[a,l]=d.useState(null),{trigger:u,onClose:f}=r,c=s.current,{onPointerInTransitChange:p}=o,m=d.useCallback(()=>{l(null),p(!1)},[p]),g=d.useCallback((v,y)=>{const w=v.currentTarget,x={x:v.clientX,y:v.clientY},C=hl(x,w.getBoundingClientRect()),E=ml(x,C),P=gl(y.getBoundingClientRect()),O=bl([...E,...P]);l(O),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(u&&c){const v=$e(w=>g(w,c),"handleTriggerLeave"),y=$e(w=>g(w,u),"handleContentLeave");return u.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[u,c,g,m]),d.useEffect(()=>{if(a){const v=$e(y=>{const w=y.target,x={x:y.clientX,y:y.clientY},C=(u==null?void 0:u.contains(w))||(c==null?void 0:c.contains(w)),E=!vl(x,a);C?m():E&&(m(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,c,a,f,m]),h.jsx(pl,{...t,ref:i})},"TooltipContentHoverable")),Zm=za("TooltipContent"),pl=d.forwardRef($e(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=t,f=Yn(Vn,r),c=Es(r),{onClose:p}=f;d.useEffect(()=>(document.addEventListener(Fo,p),()=>document.removeEventListener(Fo,p)),[p]),d.useEffect(()=>{if(f.trigger){const g=$e(v=>{v.target instanceof Node&&v.target.contains(f.trigger)&&p()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,p]);const{setContentId:m}=f;return He(()=>(m(i),()=>{m(void 0)}),[i,m]),h.jsx(gs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:g=>g.preventDefault(),onDismiss:p,children:h.jsxs(dl,{"data-state":f.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:f.contentId,...c,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(Zm,{children:o}),s?h.jsx(Rm,{id:f.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function hl(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")}}$e(hl,"getExitSideFromRect");function ml(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}$e(ml,"getPaddedExitPoints");function gl(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}]}$e(gl,"getPointsFromRect");function vl(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}$e(vl,"isPointInPolygon");function bl(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),yl(t)}$e(bl,"getHull");function yl(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}$e(yl,"getHullPresorted");var Um=Dm,Bm=Nm,Wm=Mm,Gm=Fm,wl=Lm;const Hm=Um,Km=Bm,Ym=Wm,xl=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(Gm,{children:h.jsx(wl,{ref:r,sideOffset:t,"data-slot":"tooltip-content",className:Y("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})}));xl.displayName=wl.displayName;const Jm="sidebar_state",qm=3600*24*7,Xm="16rem",Qm="18rem",eg="3rem",tg="b",_l=d.createContext(null);function Gr(){const e=d.useContext(_l);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Sl=d.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...i},a)=>{const l=tp(),[u,f]=d.useState(!1),[c,p]=d.useState(e),m=t??c,g=d.useCallback(x=>{const C=typeof x=="function"?x(m):x;n?n(C):p(C),document.cookie=`${Jm}=${C}; path=/; max-age=${qm}`},[n,m]),v=d.useCallback(()=>l?f(x=>!x):g(x=>!x),[l,g,f]);d.useEffect(()=>{const x=C=>{C.key===tg&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),v())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[v]);const y=m?"expanded":"collapsed",w=d.useMemo(()=>({state:y,open:m,setOpen:g,isMobile:l,openMobile:u,setOpenMobile:f,toggleSidebar:v}),[y,m,g,l,u,f,v]);return h.jsx(_l.Provider,{value:w,children:h.jsx(Hm,{delayDuration:0,children:h.jsx("div",{style:{"--sidebar-width":Xm,"--sidebar-width-icon":eg,...o},className:Y("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:a,...i,children:s})})})});Sl.displayName="SidebarProvider";const El=d.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...s},i)=>{const{isMobile:a,state:l,openMobile:u,setOpenMobile:f}=Gr();return n==="none"?h.jsx("div",{className:Y("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...s,children:o}):a?h.jsx(dm,{open:u,onOpenChange:f,...s,children:h.jsxs(Qc,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qm},side:e,children:[h.jsxs(el,{className:"sr-only",children:[h.jsx(tl,{children:"Sidebar"}),h.jsx(nl,{children:"Displays the mobile sidebar."})]}),h.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):h.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[h.jsx("div",{className:Y("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),h.jsx("div",{className:Y("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:h.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});El.displayName="Sidebar";const Cl=d.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Gr();return h.jsxs(Lr,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Y("h-7 w-7",e),onClick:s=>{t==null||t(s),o()},...n,children:[h.jsx(qf,{}),h.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Cl.displayName="SidebarTrigger";const ng=d.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Gr();return h.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:Y("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})});ng.displayName="SidebarRail";const kl=d.forwardRef(({className:e,...t},n)=>h.jsx("main",{ref:n,className:Y("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}));kl.displayName="SidebarInset";const rg=d.forwardRef(({className:e,...t},n)=>h.jsx(Tr,{ref:n,"data-sidebar":"input",className:Y("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));rg.displayName="SidebarInput";const Pl=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"header",className:Y("flex flex-col gap-2 p-2",e),...t}));Pl.displayName="SidebarHeader";const Rl=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"footer",className:Y("flex flex-col gap-2 p-2",e),...t}));Rl.displayName="SidebarFooter";const og=d.forwardRef(({className:e,...t},n)=>h.jsx(Ir,{ref:n,"data-sidebar":"separator",className:Y("mx-2 w-auto bg-sidebar-border",e),...t}));og.displayName="SidebarSeparator";const Ol=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"content",className:Y("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Ol.displayName="SidebarContent";const xr=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group",className:Y("relative flex w-full min-w-0 flex-col p-2",e),...t}));xr.displayName="SidebarGroup";const Vo=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?xn:"div";return h.jsx(o,{ref:r,"data-sidebar":"group-label",className:Y("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})});Vo.displayName="SidebarGroupLabel";const sg=d.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?xn:"button";return h.jsx(o,{ref:r,"data-sidebar":"group-action",className:Y("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})});sg.displayName="SidebarGroupAction";const _r=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"group-content",className:Y("w-full text-sm",e),...t}));_r.displayName="SidebarGroupContent";const Sr=d.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu",className:Y("flex w-full min-w-0 flex-col gap-1",e),...t}));Sr.displayName="SidebarMenu";const Er=d.forwardRef(({className:e,...t},n)=>h.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Y("group/menu-item relative",e),...t}));Er.displayName="SidebarMenuItem";const ig=Gn("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"}}),Cr=d.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...i},a)=>{const l=e?xn:"button",{isMobile:u,state:f}=Gr(),c=h.jsx(l,{ref:a,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:Y(ig({variant:n,size:r}),s),...i});return o?(typeof o=="string"&&(o={children:o}),h.jsxs(Km,{children:[h.jsx(Ym,{asChild:!0,children:c}),h.jsx(xl,{side:"right",align:"center",hidden:f!=="collapsed"||u,...o})]})):c});Cr.displayName="SidebarMenuButton";const ag=d.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const s=t?xn:"button";return h.jsx(s,{ref:o,"data-sidebar":"menu-action",className:Y("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})});ag.displayName="SidebarMenuAction";const cg=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Y("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}));cg.displayName="SidebarMenuBadge";const lg=d.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=d.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return h.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:Y("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&h.jsx(Ii,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),h.jsx(Ii,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});lg.displayName="SidebarMenuSkeleton";const ug=d.forwardRef(({className:e,...t},n)=>h.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Y("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}));ug.displayName="SidebarMenuSub";const dg=d.forwardRef(({...e},t)=>h.jsx("li",{ref:t,...e}));dg.displayName="SidebarMenuSubItem";const fg=d.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},s)=>{const i=e?xn:"a";return h.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Y("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})});fg.displayName="SidebarMenuSubButton";var pg=Object.defineProperty,ze=(e,t)=>pg(e,"name",{value:t,configurable:!0});function ks(e){const t=e+"CollectionProvider",[n,r]=Dt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=ze(v=>{const{scope:y,children:w}=v,x=d.useRef(null),C=d.useRef(new Map).current;return h.jsx(o,{scope:y,itemMap:C,collectionRef:x,children:w})},"CollectionProvider");i.displayName=t;const a=e+"CollectionSlot",l=Tt(a),u=d.forwardRef((v,y)=>{const{scope:w,children:x}=v,C=s(a,w),E=we(y,C.collectionRef);return h.jsx(l,{ref:E,children:x})});u.displayName=a;const f=e+"CollectionItemSlot",c="data-radix-collection-item",p=Tt(f),m=d.forwardRef((v,y)=>{const{scope:w,children:x,...C}=v,E=d.useRef(null),P=we(y,E),O=s(f,w);return d.useEffect(()=>(O.itemMap.set(E,{ref:E,...C}),()=>void O.itemMap.delete(E))),h.jsx(p,{[c]:"",ref:P,children:x})});m.displayName=f;function g(v){const y=s(e+"CollectionConsumer",v);return d.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(y.itemMap.values()).sort((O,N)=>C.indexOf(O.ref.current)-C.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return ze(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:m},g,r]}ze(ks,"createCollection");var Di=new WeakMap,Oe,Je,mo=(Je=class extends Map{constructor(n){super(n);li(this,Oe);ro(this,Oe,[...super.keys()]),Di.set(this,!0)}set(n,r){return Di.get(this)&&(this.has(n)?Ve(this,Oe)[Ve(this,Oe).indexOf(n)]=n:Ve(this,Oe).push(n)),super.set(n,r),this}insert(n,r,o){const s=this.has(r),i=Ve(this,Oe).length,a=Ps(n);let l=a>=0?a:i+a;const u=l<0||l>=i?-1:l;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const f=this.size+(s?0:1);a<0&&l++;const c=[...Ve(this,Oe)];let p,m=!1;for(let g=l;g<f;g++)if(l===g){let v=c[g];c[g]===r&&(v=c[g+1]),s&&this.delete(r),p=this.get(v),this.set(r,o)}else{!m&&c[g-1]===r&&(m=!0);const v=c[m?g:g-1],y=p;p=this.get(v),this.delete(v),this.set(v,y)}return this}with(n,r,o){const s=new Je(this);return s.insert(n,r,o),s}before(n){const r=Ve(this,Oe).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const s=Ve(this,Oe).indexOf(n);return s===-1?this:this.insert(s,r,o)}after(n){let r=Ve(this,Oe).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,Oe).indexOf(n);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ro(this,Oe,[]),super.clear()}delete(n){const r=super.delete(n);return r&&Ve(this,Oe).splice(Ve(this,Oe).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=kr(Ve(this,Oe),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=kr(Ve(this,Oe),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return Ve(this,Oe).indexOf(n)}keyAt(n){return kr(Ve(this,Oe),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return s;o++}}findIndex(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return o;o++}return-1}filter(n,r){const o=[];let s=0;for(const i of this)Reflect.apply(n,r,[i,s,this])&&o.push(i),s++;return new Je(o)}map(n,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,r,[i,s,this])]),s++;return new Je(o)}reduce(...n){const[r,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[r,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new Je(r)}toReversed(){const n=new Je;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 Je(r)}slice(n,r){const o=new Je;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),l=this.get(a);o.set(a,l)}return o}every(n,r){let o=0;for(const s of this){if(!Reflect.apply(n,r,[s,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const s of this){if(Reflect.apply(n,r,[s,o,this]))return!0;o++}return!1}},Oe=new WeakMap,ze(Je,"OrderedDict"),Je);function kr(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Tl(e,t);return n===-1?void 0:e[n]}ze(kr,"at");function Tl(e,t){const n=e.length,r=Ps(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}ze(Tl,"toSafeIndex");function Ps(e){return e!==e||e===0?0:Math.trunc(e)}ze(Ps,"toSafeInteger");function hg(e){const t=e+"CollectionProvider",[n,r]=Dt(t),[o,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new mo,setItemMap:ze(()=>{},"setItemMap")}),i=ze(({state:C,...E})=>C?h.jsx(l,{...E,state:C}):h.jsx(a,{...E}),"CollectionProvider");i.displayName=t;const a=ze(C=>{const E=y();return h.jsx(l,{...C,state:E})},"CollectionInit");a.displayName=t+"Init";const l=ze(C=>{const{scope:E,children:P,state:O}=C,N=d.useRef(null),[z,D]=d.useState(null),G=we(N,D),[H,L]=O;return d.useEffect(()=>{if(!z)return;const U=Dl(()=>{});return U.observe(z,{childList:!0,subtree:!0}),()=>{U.disconnect()}},[z]),h.jsx(o,{scope:E,itemMap:H,setItemMap:L,collectionRef:G,collectionRefObject:N,collectionElement:z,children:P})},"CollectionProviderImpl");l.displayName=t+"Impl";const u=e+"CollectionSlot",f=Tt(u),c=d.forwardRef((C,E)=>{const{scope:P,children:O}=C,N=s(u,P),z=we(E,N.collectionRef);return h.jsx(f,{ref:z,children:O})});c.displayName=u;const p=e+"CollectionItemSlot",m="data-radix-collection-item",g=Tt(p),v=d.forwardRef((C,E)=>{const{scope:P,children:O,...N}=C,z=d.useRef(null),[D,G]=d.useState(null),H=we(E,z,G),L=s(p,P),{setItemMap:U}=L,V=d.useRef(N);Il(V.current,N)||(V.current=N);const Q=V.current;return d.useEffect(()=>{const W=Q;return U(K=>D?K.has(D)?K.set(D,{...W,element:D}).toSorted(Zo):(K.set(D,{...W,element:D}),K.toSorted(Zo)):K),()=>{U(K=>!D||!K.has(D)?K:(K.delete(D),new mo(K)))}},[D,Q,U]),h.jsx(g,{[m]:"",ref:H,children:O})});v.displayName=p;function y(){return d.useState(new mo)}ze(y,"useInitCollection");function w(C){const{itemMap:E}=s(e+"CollectionConsumer",C);return E}return ze(w,"useCollection"),[{Provider:i,Slot:c,ItemSlot:v},{createCollectionScope:r,useCollection:w,useInitCollection:y}]}ze(hg,"createCollection");function Il(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}ze(Il,"shallowEqual");function Al(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}ze(Al,"isElementPreceding");function Zo(e,t){return!e[1].element||!t[1].element?0:Al(e[1].element,t[1].element)?-1:1}ze(Zo,"sortByDocumentPosition");function Dl(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}ze(Dl,"getChildListObserver");var mg=Object.defineProperty,gg=(e,t)=>mg(e,"name",{value:t,configurable:!0}),vg=d.createContext(void 0);function Rs(e){const t=d.useContext(vg);return e||t||"ltr"}gg(Rs,"useDirection");var bg=Object.defineProperty,Os=(e,t)=>bg(e,"name",{value:t,configurable:!0}),go=!1;function jl(){const[e,t]=d.useState(go);return d.useEffect(()=>{go||(go=!0,t(!0))},[]),e}Os(jl,"useIsHydrated");var Nl=wn[" useSyncExternalStore ".trim().toString()];function Ml(){return()=>{}}Os(Ml,"subscribe");function zl(){return Nl(Ml,()=>!0,()=>!1)}Os(zl,"useIsHydratedModern");var yg=typeof Nl=="function"?zl:jl,wg=Object.defineProperty,Xt=(e,t)=>wg(e,"name",{value:t,configurable:!0}),vo="rovingFocusGroup.onEntryFocus",xg={bubbles:!1,cancelable:!0},Hr="RovingFocusGroup",[Uo,$l,_g]=ks(Hr),[Sg,Fl]=Dt(Hr,[_g]),[Eg,Cg]=Sg(Hr),kg=d.forwardRef(Xt(function(t,n){return h.jsx(Uo.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(Uo.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(Pg,{...t,ref:n})})})},"RovingFocusGroup")),Pg=d.forwardRef(Xt(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:c=!1,...p}=t,m=d.useRef(null),g=we(n,m),v=Rs(i),[y,w]=Kn({prop:a,defaultProp:l??null,onChange:u,caller:Hr}),[x,C]=d.useState(!1),E=xt(f),P=$l(r),O=d.useRef(!1),[N,z]=d.useState(0);return d.useEffect(()=>{const D=m.current;if(D)return D.addEventListener(vo,E),()=>D.removeEventListener(vo,E)},[E]),h.jsx(Eg,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:d.useCallback(D=>w(D),[w]),onItemShiftTab:d.useCallback(()=>C(!0),[]),onFocusableItemAdd:d.useCallback(()=>z(D=>D+1),[]),onFocusableItemRemove:d.useCallback(()=>z(D=>D-1),[]),children:h.jsx(ke.div,{tabIndex:x||N===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...t.style},onMouseDown:X(t.onMouseDown,()=>{O.current=!0}),onFocus:X(t.onFocus,D=>{const G=!O.current;if(D.target===D.currentTarget&&G&&!x){const H=new CustomEvent(vo,xg);if(D.currentTarget.dispatchEvent(H),!H.defaultPrevented){const L=P().filter(K=>K.focusable),U=L.find(K=>K.active),V=L.find(K=>K.id===y),W=[U,V,...L].filter(Boolean).map(K=>K.ref.current);Ts(W,c)}}O.current=!1}),onBlur:X(t.onBlur,()=>C(!1))})})},"RovingFocusGroupImpl")),Rg="RovingFocusGroupItem",Og=d.forwardRef(Xt(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...l}=t,u=Zt(),f=i||u,c=Cg(Rg,r),p=c.currentTabStopId===f,m=$l(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=c,w=yg();return He(()=>{if(!(!w||!o))return g(),()=>v()},[w,o,g,v]),d.useEffect(()=>{if(!(w||!o))return g(),()=>v()},[w,o,g,v]),h.jsx(Uo.ItemSlot,{scope:r,id:f,focusable:o,active:s,children:h.jsx(ke.span,{tabIndex:p?0:-1,"data-orientation":c.orientation,...l,ref:n,onMouseDown:X(t.onMouseDown,x=>{o?c.onItemFocus(f):x.preventDefault()}),onFocus:X(t.onFocus,()=>c.onItemFocus(f)),onKeyDown:X(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=Vl(x,c.orientation,c.dir);if(C!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let P=m().filter(O=>O.focusable).map(O=>O.ref.current);if(C==="last")P.reverse();else if(C==="prev"||C==="next"){C==="prev"&&P.reverse();const O=P.indexOf(x.currentTarget);P=c.loop?Zl(P,O+1):P.slice(O+1)}setTimeout(()=>Ts(P))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:y!=null}):a})})},"RovingFocusGroupItem")),Tg={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ll(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Xt(Ll,"getDirectionAwareKey");function Vl(e,t,n){const r=Ll(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Tg[r]}Xt(Vl,"getFocusIntent");function Ts(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Xt(Ts,"focusFirst");function Zl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Xt(Zl,"wrapArray");var Ig=kg,Ag=Og,Dg=Object.defineProperty,oe=(e,t)=>Dg(e,"name",{value:t,configurable:!0}),Bo=["Enter"," "],jg=["ArrowDown","PageUp","Home"],Ul=["ArrowUp","PageDown","End"],Ng=[...jg,...Ul],Mg={ltr:[...Bo,"ArrowRight"],rtl:[...Bo,"ArrowLeft"]},zg={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Kr="Menu",[Zn,$g,Fg]=ks(Kr),[Qt,Bl]=Dt(Kr,[Fg,Br,Fl]),Is=Br(),Wl=Fl(),[Lg,en]=Qt(Kr),[Vg,Jn]=Qt(Kr),Zg=oe(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Is(t),[l,u]=d.useState(null),f=d.useRef(!1),c=xt(s),p=Rs(o);return d.useEffect(()=>{const m=oe(()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=oe(()=>f.current=!1,"handlePointer");return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),d.useEffect(()=>{if(!n)return;const m=oe(()=>c(!1),"handleBlur");return window.addEventListener("blur",m),()=>window.removeEventListener("blur",m)},[n,c]),h.jsx(ll,{...a,children:h.jsx(Lg,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:h.jsx(Vg,{scope:t,onClose:d.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})},"Menu"),Gl=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,...o}=t,s=Is(r);return h.jsx(ul,{...s,...o,ref:n})},"MenuAnchor")),Hl="MenuPortal",[Ug,Kl]=Qt(Hl,{forceMount:void 0}),Bg=oe(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=en(Hl,t);return h.jsx(Ug,{scope:t,forceMount:n,children:h.jsx(jt,{present:n||s.open,children:h.jsx(ys,{asChild:!0,container:o,children:r})})})},"MenuPortal"),ft="MenuContent",[Wg,As]=Qt(ft),Gg=d.forwardRef(oe(function(t,n){const r=Kl(ft,t.__scopeMenu),{forceMount:o=r.forceMount,...s}=t,i=en(ft,t.__scopeMenu),a=Jn(ft,t.__scopeMenu);return h.jsx(Zn.Provider,{scope:t.__scopeMenu,children:h.jsx(jt,{present:o||i.open,children:h.jsx(Zn.Slot,{scope:t.__scopeMenu,children:a.modal?h.jsx(Hg,{...s,ref:n}):h.jsx(Kg,{...s,ref:n})})})})},"MenuContent")),Hg=d.forwardRef(oe(function(t,n){const r=en(ft,t.__scopeMenu),o=d.useRef(null),s=we(n,o);return d.useEffect(()=>{const i=o.current;if(i)return Uc(i)},[]),h.jsx(Ds,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:X(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),Kg=d.forwardRef(oe(function(t,n){const r=en(ft,t.__scopeMenu);return h.jsx(Ds,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),Yg=Tt("MenuContent.ScrollLock"),Ds=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:m,onDismiss:g,disableOutsideScroll:v,...y}=t,w=en(ft,r),x=Jn(ft,r),C=Is(r),E=Wl(r),P=$g(r),[O,N]=d.useState(null),z=d.useRef(null),D=we(n,z,w.onContentChange),G=d.useRef(0),H=d.useRef(""),L=d.useRef(0),U=d.useRef(null),V=d.useRef("right"),Q=d.useRef(0),W=v?xs:d.Fragment,K=v?{as:Yg,allowPinchZoom:!0}:void 0,le=oe(B=>{var Pe,ie;const re=H.current+B,de=P().filter(be=>!be.disabled),Se=document.activeElement,q=(Pe=de.find(be=>be.ref.current===Se))==null?void 0:Pe.textValue,se=de.map(be=>be.textValue),pe=tu(se,re,q),ve=(ie=de.find(be=>be.textValue===pe))==null?void 0:ie.ref.current;oe((function be(nt){H.current=nt,window.clearTimeout(G.current),nt!==""&&(G.current=window.setTimeout(()=>be(""),1e3))}),"updateSearch")(re),ve&&setTimeout(()=>ve.focus())},"handleTypeaheadSearch");d.useEffect(()=>()=>window.clearTimeout(G.current),[]),Vr();const ee=d.useCallback(B=>{var de,Se;return V.current===((de=U.current)==null?void 0:de.side)&&ru(B,(Se=U.current)==null?void 0:Se.area)},[]);return h.jsx(Wg,{scope:r,searchRef:H,onItemEnter:d.useCallback(B=>{ee(B)&&B.preventDefault()},[ee]),onItemLeave:d.useCallback(B=>{var re;ee(B)||((re=z.current)==null||re.focus(),N(null))},[ee]),onTriggerLeave:d.useCallback(B=>{ee(B)&&B.preventDefault()},[ee]),pointerGraceTimerRef:L,onPointerGraceIntentChange:d.useCallback(B=>{U.current=B},[]),children:h.jsx(W,{...K,children:h.jsx(Ec,{asChild:!0,trapped:s,onMountAutoFocus:X(i,B=>{var re;B.preventDefault(),(re=z.current)==null||re.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(gs,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:p,onInteractOutside:m,onDismiss:g,children:h.jsx(Ig,{asChild:!0,...E,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:N,onEntryFocus:X(u,B=>{x.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(dl,{role:"menu","aria-orientation":"vertical","data-state":Ns(w.open),"data-radix-menu-content":"",dir:x.dir,...C,...y,ref:D,style:{outline:"none",...y.style},onKeyDown:X(y.onKeyDown,B=>{const de=B.target.closest("[data-radix-menu-content]")===B.currentTarget,Se=B.ctrlKey||B.altKey||B.metaKey,q=B.key.length===1;de&&(B.key==="Tab"&&B.preventDefault(),!Se&&q&&le(B.key));const se=z.current;if(B.target!==se||!Ng.includes(B.key))return;B.preventDefault();const ve=P().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);Ul.includes(B.key)&&ve.reverse(),Ql(ve)}),onBlur:X(t.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(G.current),H.current="")}),onPointerMove:X(t.onPointerMove,gn(B=>{const re=B.target,de=Q.current!==B.clientX;if(B.currentTarget.contains(re)&&de){const Se=B.clientX>Q.current?"right":"left";V.current=Se,Q.current=B.clientX}}))})})})})})})},"MenuContentImpl")),Jg=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,...o}=t;return h.jsx(ke.div,{role:"group",...o,ref:n})},"MenuGroup")),qg=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,...o}=t;return h.jsx(ke.div,{...o,ref:n})},"MenuLabel")),Wo="MenuItem",ji="menu.itemSelect",js=d.forwardRef(oe(function(t,n){const{disabled:r=!1,onSelect:o,...s}=t,i=d.useRef(null),a=Jn(Wo,t.__scopeMenu),l=As(Wo,t.__scopeMenu),u=we(n,i),f=d.useRef(!1),c=oe(()=>{const p=i.current;if(!r&&p){const m=new CustomEvent(ji,{bubbles:!0,cancelable:!0});p.addEventListener(ji,g=>o==null?void 0:o(g),{once:!0}),ms(p,m),m.defaultPrevented?f.current=!1:a.onClose()}},"handleSelect");return h.jsx(Yl,{...s,ref:u,disabled:r,onClick:X(t.onClick,c),onPointerDown:p=>{var m;(m=t.onPointerDown)==null||m.call(t,p),f.current=!0},onPointerUp:X(t.onPointerUp,p=>{var m;f.current||(m=p.currentTarget)==null||m.click()}),onKeyDown:X(t.onKeyDown,p=>{r||p.target!==p.currentTarget||l.searchRef.current!==""&&p.key===" "||Bo.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})},"MenuItem")),Yl=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=t,a=As(Wo,r),l=Wl(r),u=d.useRef(null),f=we(n,u),[c,p]=d.useState(!1),[m,g]=d.useState("");return d.useEffect(()=>{const v=u.current;v&&g((v.textContent??"").trim())},[i.children]),h.jsx(Zn.ItemSlot,{scope:r,disabled:o,textValue:s??m,children:h.jsx(Ag,{asChild:!0,...l,focusable:!o,children:h.jsx(ke.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:f,onPointerMove:X(t.onPointerMove,gn(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(t.onPointerLeave,gn(v=>a.onItemLeave(v))),onFocus:X(t.onFocus,()=>p(!0)),onBlur:X(t.onBlur,()=>p(!1))})})})},"MenuItemImpl")),Xg=d.forwardRef(oe(function(t,n){const{checked:r=!1,onCheckedChange:o,...s}=t;return h.jsx(ql,{scope:t.__scopeMenu,checked:r,children:h.jsx(js,{role:"menuitemcheckbox","aria-checked":Un(r)?"mixed":r,...s,ref:n,"data-state":Yr(r),onSelect:X(s.onSelect,()=>o==null?void 0:o(Un(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Qg="MenuRadioGroup",[ev,tv]=Qt(Qg,{value:void 0,onValueChange:oe(()=>{},"onValueChange")}),nv=d.forwardRef(oe(function(t,n){const{value:r,onValueChange:o,...s}=t,i=xt(o);return h.jsx(ev,{scope:t.__scopeMenu,value:r,onValueChange:i,children:h.jsx(Jg,{...s,ref:n})})},"MenuRadioGroup")),rv="MenuRadioItem",ov=d.forwardRef(oe(function(t,n){const{value:r,...o}=t,s=tv(rv,t.__scopeMenu),i=r===s.value;return h.jsx(ql,{scope:t.__scopeMenu,checked:i,children:h.jsx(js,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":Yr(i),onSelect:X(o.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,r)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Jl="MenuItemIndicator",[ql,sv]=Qt(Jl,{checked:!1}),iv=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,forceMount:o,...s}=t,i=sv(Jl,r);return h.jsx(jt,{present:o||Un(i.checked)||i.checked===!0,children:h.jsx(ke.span,{...s,ref:n,"data-state":Yr(i.checked)})})},"MenuItemIndicator")),av=d.forwardRef(oe(function(t,n){const{__scopeMenu:r,...o}=t;return h.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),cv="MenuSub",[MS,Xl]=Qt(cv),ur="MenuSubTrigger",lv=d.forwardRef(oe(function(t,n){const r=en(ur,t.__scopeMenu),o=Jn(ur,t.__scopeMenu),s=Xl(ur,t.__scopeMenu),i=As(ur,t.__scopeMenu),a=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=i,f={__scopeMenu:t.__scopeMenu},c=d.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);d.useEffect(()=>c,[c]),d.useEffect(()=>{const m=l.current;return()=>{window.clearTimeout(m),u(null)}},[l,u]);const p=we(n,s.onTriggerChange);return h.jsx(Gl,{asChild:!0,...f,children:h.jsx(Yl,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":Ns(r.open),...t,ref:p,onClick:m=>{var g;(g=t.onClick)==null||g.call(t,m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:X(t.onPointerMove,gn(m=>{i.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:X(t.onPointerLeave,gn(m=>{var v,y;c();const g=(v=r.content)==null?void 0:v.getBoundingClientRect();if(g){const w=(y=r.content)==null?void 0:y.dataset.side,x=w==="right",C=x?-5:5,E=g[x?"left":"right"],P=g[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:E,y:g.top},{x:P,y:g.top},{x:P,y:g.bottom},{x:E,y:g.bottom}],side:w}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:X(t.onKeyDown,m=>{var v;t.disabled||m.target!==m.currentTarget||i.searchRef.current!==""&&m.key===" "||Mg[o.dir].includes(m.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),m.preventDefault())})})})},"MenuSubTrigger")),uv="MenuSubContent",dv=d.forwardRef(oe(function(t,n){const r=Kl(ft,t.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...i}=t,a=en(ft,t.__scopeMenu),l=Jn(ft,t.__scopeMenu),u=Xl(uv,t.__scopeMenu),f=d.useRef(null),c=we(n,f);return h.jsx(Zn.Provider,{scope:t.__scopeMenu,children:h.jsx(jt,{present:o||a.open,children:h.jsx(Zn.Slot,{scope:t.__scopeMenu,children:h.jsx(Ds,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:c,align:s,side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var m;l.isUsingKeyboardRef.current&&((m=f.current)==null||m.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:X(t.onFocusOutside,p=>{p.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:X(t.onEscapeKeyDown,p=>{l.onClose(),p.preventDefault()}),onKeyDown:X(t.onKeyDown,p=>{var v;const m=p.currentTarget.contains(p.target),g=zg[l.dir].includes(p.key);m&&g&&(a.onOpenChange(!1),(v=u.trigger)==null||v.focus(),p.preventDefault())})})})})})},"MenuSubContent"));function Ns(e){return e?"open":"closed"}oe(Ns,"getOpenState");function Un(e){return e==="indeterminate"}oe(Un,"isIndeterminate");function Yr(e){return Un(e)?"indeterminate":e?"checked":"unchecked"}oe(Yr,"getCheckedState");function Ql(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}oe(Ql,"focusFirst");function eu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}oe(eu,"wrapArray");function tu(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=eu(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}oe(tu,"getNextMatch");function nu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],u=a.x,f=a.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}oe(nu,"isPointInPolygon");function ru(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return nu(n,t)}oe(ru,"isPointerInGraceArea");function gn(e){return t=>t.pointerType==="mouse"?e(t):void 0}oe(gn,"whenMouse");var fv=Zg,pv=Gl,hv=Bg,mv=Gg,gv=qg,vv=js,bv=Xg,yv=nv,wv=ov,xv=iv,_v=av,Sv=lv,Ev=dv,Cv=Object.defineProperty,et=(e,t)=>Cv(e,"name",{value:t,configurable:!0}),Ms="DropdownMenu",[kv,zS]=Dt(Ms,[Bl]),tt=Bl(),[Pv,ou]=kv(Ms),Rv=et(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=tt(t),u=d.useRef(null),[f,c]=Kn({prop:o,defaultProp:s??!1,onChange:i,caller:Ms});return h.jsx(Pv,{scope:t,triggerId:Zt(),triggerRef:u,contentId:Zt(),open:f,onOpenChange:c,onOpenToggle:d.useCallback(()=>c(p=>!p),[c]),modal:a,children:h.jsx(fv,{...l,open:f,onOpenChange:c,dir:r,modal:a,children:n})})},"DropdownMenu"),Ov="DropdownMenuTrigger",Tv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=t,i=ou(Ov,r),a=tt(r),l=we(n,i.triggerRef);return h.jsx(pv,{asChild:!0,...a,children:h.jsx(ke.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:l,onPointerDown:X(t.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:X(t.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),Iv=et(e=>{const{__scopeDropdownMenu:t,...n}=e,r=tt(t);return h.jsx(hv,{...r,...n})},"DropdownMenuPortal"),Av="DropdownMenuContent",Dv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=ou(Av,r),i=tt(r),a=d.useRef(!1);return h.jsx(mv,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:X(t.onCloseAutoFocus,l=>{var u;a.current||(u=s.triggerRef.current)==null||u.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:X(t.onInteractOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,c=u.button===2||f;(!s.modal||c)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),jv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(gv,{...s,...o,ref:n})},"DropdownMenuLabel")),Nv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(vv,{...s,...o,ref:n})},"DropdownMenuItem")),Mv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(bv,{...s,...o,ref:n})},"DropdownMenuCheckboxItem")),zv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(yv,{...s,...o,ref:n})},"DropdownMenuRadioGroup")),$v=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(wv,{...s,...o,ref:n})},"DropdownMenuRadioItem")),Fv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(xv,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),Lv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(_v,{...s,...o,ref:n})},"DropdownMenuSeparator")),Vv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(Sv,{...s,...o,ref:n})},"DropdownMenuSubTrigger")),Zv=d.forwardRef(et(function(t,n){const{__scopeDropdownMenu:r,...o}=t,s=tt(r);return h.jsx(Ev,{...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")),Uv=Rv,Bv=Tv,Wv=Iv,su=Dv,iu=jv,au=Nv,cu=Mv,Gv=zv,lu=$v,uu=Fv,du=Lv,fu=Vv,pu=Zv;const Hv=Uv,Kv=Bv,$S=Gv,Yv=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsxs(fu,{ref:o,className:Y("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,h.jsx(Bf,{className:"ml-auto"})]}));Yv.displayName=fu.displayName;const Jv=d.forwardRef(({className:e,...t},n)=>h.jsx(pu,{ref:n,className:Y("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}));Jv.displayName=pu.displayName;const hu=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(Wv,{children:h.jsx(su,{ref:r,sideOffset:t,className:Y("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})}));hu.displayName=su.displayName;const Go=d.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(au,{ref:r,className:Y("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}));Go.displayName=au.displayName;const qv=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(cu,{ref:o,className:Y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(uu,{children:h.jsx(Uf,{className:"h-4 w-4"})})}),t]}));qv.displayName=cu.displayName;const Xv=d.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(lu,{ref:r,className:Y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(uu,{children:h.jsx(Wf,{className:"h-2 w-2 fill-current"})})}),t]}));Xv.displayName=lu.displayName;const Qv=d.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(iu,{ref:r,className:Y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Qv.displayName=iu.displayName;const mu=d.forwardRef(({className:e,...t},n)=>h.jsx(du,{ref:n,className:Y("-mx-1 my-1 h-px bg-muted",e),...t}));mu.displayName=du.displayName;const Ho="";async function dr(e,t,n,r){const o=await fetch(`${Ho}${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 gu={get:e=>dr("GET",e),post:(e,t)=>dr("POST",e,t),patch:(e,t)=>dr("PATCH",e,t),delete:e=>dr("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${Ho}${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(`${Ho}${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 vu(){const[e,t]=d.useState({user:null,loading:!0}),n=ds();return d.useEffect(()=>{let r=!1;return gu.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 eb=6;function tb(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function nb(e){const t=tb(e)%eb+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function rb({name:e,avatarUrl:t,size:n=28}){const r=((e==null?void 0:e[0])??"?").toUpperCase(),o={width:n,height:n,borderRadius:"50%",flexShrink:0};if(t)return h.jsx("img",{src:t,alt:e,style:{...o,objectFit:"cover"}});const{bg:s,fg:i}=nb(e);return h.jsx("span",{style:{...o,background:s,display:"inline-flex",alignItems:"center",justifyContent:"center",color:i,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const ob=[{label:"App Center",href:"/app-center",icon:Hf},{label:"Mac Resources",href:"/mac-resources",icon:Yf}],sb=[{label:"Default",href:"/settings/default",icon:tc,adminOnly:!1},{label:"Team",href:"/settings/team",icon:Qf,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:Gf,adminOnly:!0}],ib=[{label:"Docs",href:"https://www.tapflow.dev",icon:Zf}];function ab(){const{pathname:e}=Aa(),t=ds(),{user:n}=vu(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:o}=Fr(),s=o==="dark"?"/logo-dark.svg":"/logo.svg",[i,a]=d.useState(null),[l,u]=d.useState("tapflow");d.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(c=>c.ok?c.json():null).then(c=>{c!=null&&c.logo_url&&a(c.logo_url),c!=null&&c.team_name&&u(c.team_name)})},[]);async function f(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return h.jsxs(El,{collapsible:"icon",children:[h.jsx(Pl,{className:"p-2",children:h.jsxs(nr,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[h.jsx("img",{src:i??s,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),h.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:l})]})}),h.jsxs(Ol,{children:[h.jsx(xr,{children:h.jsx(_r,{children:h.jsx(Sr,{children:ob.map(c=>h.jsx(Er,{children:h.jsx(Cr,{asChild:!0,isActive:e.startsWith(c.href),tooltip:c.label,children:h.jsxs(nr,{to:c.href,children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})}),h.jsxs(xr,{children:[h.jsx(Vo,{children:"Settings"}),h.jsx(_r,{children:h.jsx(Sr,{children:sb.filter(c=>!c.adminOnly||r).map(c=>h.jsx(Er,{children:h.jsx(Cr,{asChild:!0,isActive:e===c.href,tooltip:c.label,children:h.jsxs(nr,{to:c.href,children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})]}),h.jsxs(xr,{children:[h.jsx(Vo,{children:"Reference"}),h.jsx(_r,{children:h.jsx(Sr,{children:ib.map(c=>h.jsx(Er,{children:h.jsx(Cr,{asChild:!0,tooltip:c.label,children:h.jsxs("a",{href:c.href,target:"_blank",rel:"noopener noreferrer",children:[h.jsx(c.icon,{}),h.jsx("span",{children:c.label})]})})},c.href))})})]})]}),n&&h.jsx(Rl,{className:"px-3 py-3",children:h.jsxs(Hv,{children:[h.jsx(Kv,{asChild:!0,children:h.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[h.jsx(rb,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),h.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[h.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),h.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),h.jsxs(hu,{side:"top",align:"start",className:"w-56",children:[h.jsx(Go,{asChild:!0,children:h.jsxs(nr,{to:"/settings/default",children:[h.jsx(tc,{className:"mr-2 h-4 w-4"}),"Settings"]})}),h.jsx(mu,{}),h.jsxs(Go,{onClick:f,className:"text-destructive focus:text-destructive",children:[h.jsx(Kf,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function cb(){const{theme:e,setTheme:t}=Fr();return h.jsxs(Lr,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[h.jsx(Xf,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),h.jsx(Jf,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const bu=d.createContext({node:null,setNode:()=>{}});function lb({children:e}){const[t,n]=d.useState(null),r=d.useMemo(()=>({node:t,setNode:n}),[t]);return h.jsx(bu.Provider,{value:r,children:e})}function ub(){return d.useContext(bu)}function db(){const{node:e}=ub();return h.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[h.jsx(Cl,{className:"-ml-1"}),h.jsx(Ir,{orientation:"vertical",className:"h-4"}),e,h.jsx("div",{className:"flex-1"}),h.jsx(cb,{}),h.jsx(Ir,{orientation:"vertical",className:"h-4"}),h.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:h.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:h.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})})]})}function fb(){const{user:e,loading:t}=vu(),n=Aa();return t?null:e?["/settings/team","/settings/tokens"].some(o=>n.pathname.startsWith(o))&&e.role!=="Admin"?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):h.jsx(lb,{children:h.jsxs(Sl,{children:[h.jsx(ab,{}),h.jsxs(kl,{children:[h.jsx(db,{}),h.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:h.jsx(d.Suspense,{fallback:h.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:h.jsx(Md,{})})})]})]})}):h.jsx(Da,{to:"/login",replace:!0})}var qn=e=>e.type==="checkbox",Jr=e=>e.type==="file",Vt=e=>e instanceof Date,je=e=>e==null;const zs=e=>typeof e=="object";var ye=e=>!je(e)&&!Array.isArray(e)&&zs(e)&&!Vt(e),Ko=e=>ye(e)&&e.target?qn(e.target)?e.target.checked:Jr(e.target)?e.target.files:e.target.value:e;const pb=/[.[\]'"]/;var Jt=e=>e.split(pb).filter(Boolean);function hb(e,t){const n=Jt(t);let r=e._formValues,o=e._defaultValues;for(let s=0;s<n.length-1;s++){const i=n[s];if(r=r==null?r:r[i],o=o==null?o:o[i],r===null||o===null)return null}}var yu=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),qr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function me(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const t=typeof Blob<"u"&&e instanceof Blob,n=typeof FileList<"u"&&e instanceof FileList;if(qr&&(t||n))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const o=r?[]:Object.create(Object.getPrototypeOf(e));for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=me(e[s]));return o}const Lt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},st={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"},wu="root",$s=["__proto__","constructor","prototype"],mb=/^\w*$/;var vn=e=>mb.test(e),ae=e=>e===void 0,M=(e,t,n)=>{if(!t||!ye(e))return n;const r=vn(t)?[t]:Jt(t);if(r.some(s=>$s.includes(s)))return n;const o=r.reduce((s,i)=>je(s)?void 0:s[i],e);return ae(o)||o===e?ae(e[t])?n:e[t]:o},qe=e=>typeof e=="boolean",Ze=e=>typeof e=="function",ce=(e,t,n)=>{let r=-1;const o=vn(t)?[t]:Jt(t),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let l=n;if(r!==i){const u=e[a];l=ye(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if($s.includes(a))return;e[a]=l,e=e[a]}};const xu=k.createContext(null);xu.displayName="HookFormControlContext";const Fs=()=>k.useContext(xu);var _u=(e,t,n,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return t._proxyFormState[i]!==st.all&&(t._proxyFormState[i]=!r||st.all),n&&(n[i]=!0),e[i]}});return o};const Ls=qr?k.useLayoutEffect:k.useEffect;var gb=e=>{const t=e.constructor&&e.constructor.prototype;return ye(t)&&t.hasOwnProperty("isPrototypeOf")},Yo=e=>je(e)||!zs(e);const Ni=(e,t)=>t.length===0&&!Array.isArray(e)&&!gb(e);function Ge(e,t,n=new WeakMap){if(e===t)return!0;if(Yo(e)||Yo(t))return Object.is(e,t);if(Vt(e)&&Vt(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(Ni(e,r)||Ni(t,o))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const s=n.get(e);if(s&&s.has(t))return!0;if(s)s.add(t);else{const i=new WeakSet;i.add(t),n.set(e,i)}for(const i of r){const a=e[i];if(!(i in t))return!1;if(i!=="ref"){const l=t[i];if(Vt(a)&&Vt(l)||(ye(a)||Array.isArray(a))&&(ye(l)||Array.isArray(l))?!Ge(a,l,n):!Object.is(a,l))return!1}}return!0}function Vs(e){const t=k.useRef(!1),n=k.useRef(!1),r=k.useRef(void 0),o=k.useRef(0);o.current++,!n.current&&e&&(n.current=!0,r.current=me(e()));const s=k.useCallback((a,l,u)=>{if(a&&(t.current||n.current&&o.current>1)){const f=l();Ge(r.current,f)||u(f)}t.current=!0},[]),i=k.useCallback((a,l)=>{a&&(r.current=me(l()))},[]);return{resyncIfNeeded:s,snapshot:i}}function vb(e){const t=Fs(),{control:n=t,disabled:r,name:o,exact:s}=e||{},i=()=>({...n._formState,defaultValues:n._defaultValues}),[a,l]=k.useState(i),u=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:f,snapshot:c}=Vs(i);return Ls(()=>{f(!r,i,l);const p=n._subscribe({name:o,formState:u.current,exact:s,callback:m=>{!r&&l({...n._formState,...m,defaultValues:n._defaultValues})}});return()=>{p(),c(!r,i)}},[n,o,r,s,f,c]),k.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),k.useMemo(()=>_u(a,n,u.current,!1),[a,n])}var Me=e=>typeof e=="string",Jo=(e,t,n,r,o)=>Me(e)?(r&&t.watch.add(e),M(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),M(n,s,M(o,s)))):(r&&(t.watchAll=!0),n);function bb(e){const t=Fs(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},l=k.useRef(o),u=k.useRef(a),f=k.useRef(n),c=k.useRef(r);u.current=a;const p=()=>{const D=n._getWatch(r,l.current);return u.current?u.current(D):D},[m,g]=k.useState(p),v=k.useRef(m),y=k.useCallback(D=>{const G=Jo(r,n._names,D||n._formValues,!1,l.current);return u.current?u.current(G):G},[n._formValues,n._names,r]),w=k.useCallback(D=>{if(!s){const G=Jo(r,n._names,D||n._formValues,!1,l.current);if(u.current){const H=u.current(G);Ge(H,v.current)||(g(H),v.current=H)}else g(G)}},[n._formValues,n._names,s,r]),{resyncIfNeeded:x,snapshot:C}=Vs(p),E=k.useRef(w);E.current=w;const P=k.useRef(y);P.current=y,Ls(()=>{f.current!==n||!Ge(c.current,r)?(f.current=n,c.current=r,E.current()):x(!s,()=>P.current(),G=>{g(G),v.current=G});const D=n._subscribe({name:r,formState:{values:!0},exact:i,callback:G=>{E.current(G.values)}});return()=>{D(),C(!s,()=>P.current())}},[n,i,r,s,x,C]),k.useEffect(()=>n._removeUnmounted());const O=f.current!==n,N=c.current;return k.useMemo(()=>{if(s)return!1;const D=!O&&!Ge(N,r);return O||D},[s,O,r,N])?y():m}function yb(e){const t=Fs(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,l=yu(o._names.array,n),u=k.useMemo(()=>{const E=M(o._formValues,n,M(o._defaultValues,n,i));return ae(E)?hb(o,n):E},[o,n,i]),f=bb({control:o,name:n,defaultValue:u,exact:a}),c=vb({control:o,name:n,exact:a}),p=k.useRef(e),m=k.useRef(null),g=k.useRef(o.register(n,{...e.rules,value:f,...qe(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const v=k.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!M(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!M(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!M(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!M(c.validatingFields,n)},error:{enumerable:!0,get:()=>M(c.errors,n)}}),[c,n]),y=k.useCallback(E=>{const P=Ko(E);return M(o._fields,n)||(g.current=o.register(n,{...p.current.rules,value:P})),g.current.onChange({target:{value:Ko(E),name:n},type:Lt.CHANGE})},[n,o]),w=k.useCallback(()=>g.current.onBlur({target:{value:M(o._formValues,n),name:n},type:Lt.BLUR}),[n,o._formValues]),x=k.useCallback(E=>{E&&(m.current={focus:()=>Ze(E.focus)&&E.focus(),select:()=>Ze(E.select)&&E.select(),setCustomValidity:O=>Ze(E.setCustomValidity)&&E.setCustomValidity(O),reportValidity:()=>Ze(E.reportValidity)&&E.reportValidity()});const P=M(o._fields,n);P&&P._f&&E&&(P._f.ref=m.current)},[o._fields,n]),C=k.useMemo(()=>({name:n,value:f,...qe(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:y,onBlur:w,ref:x}),[n,r,c.disabled,y,w,x,f]);return k.useEffect(()=>{const E=o._options.shouldUnregister||s;g.current=o.register(n,{...p.current.rules,...qe(p.current.disabled)?{disabled:p.current.disabled}:{}});const P=(O,N)=>{const z=M(o._fields,O);z&&z._f&&(z._f.mount=N)};if(P(n,!0),E){const O=me(M(s?o._defaultValues:o._options.values||o._defaultValues,n,M(o._options.defaultValues,n,p.current.defaultValue)));ce(o._defaultValues,n,O),ae(M(o._formValues,n))&&ce(o._formValues,n,O)}if(!l&&o.register(n),m.current){const O=M(o._fields,n);O&&O._f&&(O._f.ref=m.current)}return()=>{(l?E&&!o._state.action:E)?o.unregister(n):P(n,!1)}},[n,o,l,s]),k.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),k.useMemo(()=>({field:C,formState:c,fieldState:v}),[C,c,v])}const FS=e=>e.render(yb(e));var fr=e=>({isOnSubmit:!e||e===st.onSubmit,isOnBlur:e===st.onBlur,isOnChange:e===st.onChange,isOnAll:e===st.all,isOnTouch:e===st.onTouched}),bo=(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 Mn=(e,t,n)=>{for(const r of n||Object.keys(e)){if(r==="_f")continue;const o=n?M(e,r):e[r];if(o){const{_f:s}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],s.name))return!0;if(s.ref&&t(s.ref,s.name))return!0;if(Mn(o,t))return!0}else if((ye(o)||Array.isArray(o))&&Mn(o,t))return!0}}};var Mi=(e,t,n)=>{const r=M(e,n),o=Array.isArray(r)?r:[];return ce(o,wu,t[n]),ce(e,n,o),e},Re=e=>ye(e)&&!Object.keys(e).length,Ar=e=>{if(!qr)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zs=e=>e.type==="radio",Dr=e=>e instanceof RegExp,Us=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{};const zi={value:!1,isValid:!1},$i={value:!0,isValid:!0};var Su=e=>{if(!Array.isArray(e))return zi;if(e.length>1){const n=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:n,isValid:!!n.length}}const t=e[0];return!t||!t.checked||t.disabled?zi:!t.attributes||!("value"in t.attributes)||ae(t.value)||t.value===""?$i:{value:t.value,isValid:!0}};const Fi={isValid:!1,value:null};var Eu=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Fi):Fi;function Li(e,t,n="validate"){if(Me(e)||Array.isArray(e)&&e.every(Me)||qe(e)&&!e)return{type:n,message:Me(e)?e:"",ref:t}}var fn=e=>ye(e)&&!Dr(e)?e:{value:e,message:""},Vi=async(e,t,n,r,o,s)=>{const{ref:i,refs:a,required:l,maxLength:u,minLength:f,min:c,max:p,pattern:m,validate:g,name:v,valueAsNumber:y,mount:w}=e._f,x=M(n,v);if(!w||t.has(v))return{};const C=a?a[0]:i,E=U=>{if(o&&C.reportValidity){const V=qe(U)?"":U||"";a?a.forEach(Q=>Q.setCustomValidity(V)):C.setCustomValidity(V),C.reportValidity()}},P={},O=Zs(i),N=qn(i),z=O||N,D=(y||Jr(i))&&ae(i.value)&&ae(x)||Ar(i)&&i.value===""||x===""||Array.isArray(x)&&!x.length,G=Us.bind(null,v,r,P),H=(U,V,Q,W=dt.maxLength,K=dt.minLength)=>{const le=U?V:Q;P[v]={type:U?W:K,message:le,ref:i,...G(U?W:K,le)}};if(s?!Array.isArray(x)||!x.length:l&&(!z&&(D||je(x))||qe(x)&&!x||N&&!Su(a).isValid||O&&!Eu(a).isValid)){const{value:U,message:V}=Me(l)?{value:!!l,message:l}:fn(l);if(U&&(P[v]={type:dt.required,message:V,ref:C,...G(dt.required,V)},!r))return E(V),P}if(!D&&(!je(c)||!je(p))){let U,V;const Q=fn(p),W=fn(c);if(!je(x)&&!Vt(x)&&!isNaN(x)){const K=i.valueAsNumber||x&&+x;je(Q.value)||(U=K>Q.value),je(W.value)||(V=K<W.value)}else{const K=i.valueAsDate||new Date(x),le=re=>new Date(new Date().toDateString()+" "+re),ee=i.type=="time",B=i.type=="week";Me(Q.value)&&x&&(U=ee?le(x)>le(Q.value):B?x>Q.value:K>new Date(Q.value)),Me(W.value)&&x&&(V=ee?le(x)<le(W.value):B?x<W.value:K<new Date(W.value))}if((U||V)&&(H(!!U,Q.message,W.message,dt.max,dt.min),!r))return E(P[v].message),P}if((u||f)&&!D&&(Me(x)||s&&Array.isArray(x))){const U=fn(u),V=fn(f),Q=!je(U.value)&&x.length>+U.value,W=!je(V.value)&&x.length<+V.value;if((Q||W)&&(H(Q,U.message,V.message),!r))return E(P[v].message),P}if(m&&!D&&Me(x)){const{value:U,message:V}=fn(m);if(Dr(U)&&!x.match(U)&&(P[v]={type:dt.pattern,message:V,ref:i,...G(dt.pattern,V)},!r))return E(V),P}if(g){if(Ze(g)){const U=await g(x,n),V=Li(U,C);if(V&&(P[v]={...V,...G(dt.validate,V.message)},!r))return E(V.message),P}else if(ye(g)){let U={};for(const V in g){if(!Re(U)&&!r)break;const Q=Li(await g[V](x,n),C,V);Q&&(U={...Q,...G(V,Q.message)},r||E(Q.message),r&&(P[v]=U))}if(!Re(U)&&(P[v]={ref:C,...U},!r))return P}}const L=P[v];return E(L?L.message:!0),P},Pr=e=>Array.isArray(e)?e:[e],Cu=e=>Array.isArray(e)?e.filter(Boolean):[];function wb(e,t){const n=t.length-1;let r=0;for(;r<n;){if(je(e)){e=void 0;break}e=e[t[r]],r++}return e}function xb(e){for(const t in e)if(e.hasOwnProperty(t)&&!ae(e[t]))return!1;return!0}function Ce(e,t){if(Me(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:vn(t)?[t]:Jt(t);if(n.some(i=>$s.includes(String(i))))return e;const r=n.length===1?e:wb(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(ye(r)&&Re(r)||Array.isArray(r)&&xb(r))&&Ce(e,n.slice(0,-1)),e}const _b=k.createContext(null);_b.displayName="HookFormContext";var Zi=()=>{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 ku(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&ye(o)&&s){const i=ku(o,s);ye(i)&&(n[r]=i)}else e[r]&&(n[r]=s)}return n}const Ui=(e,t)=>e!==null&&zs(e)&&Object.prototype.hasOwnProperty.call(e,t);var Sb=(e,t)=>{if(!t)return!1;let n=e;for(const r of vn(t)?[t]:Jt(t)){if(!Ui(n,r))return Ui(e,t);n=n[r]}return!0},Pu=e=>e.type==="select-multiple",Eb=e=>Zs(e)||qn(e),yo=e=>Ar(e)&&e.isConnected;function Bi(e){return Array.isArray(e)||ye(e)}function Ru(e,t,n="",r=[]){for(const o in e){const s=n?`${n}.${o}`:o,i=e[o];Bi(i)&&Bi(M(t,s))?Ru(i,t,s,r):r.push(s)}return r}var Cb=e=>{for(const t in e)if(Ze(e[t]))return!0;return!1};function Ou(e){return Array.isArray(e)||ye(e)&&!Cb(e)}function Tu(e){return!!(e&&"_f"in e)}function Iu(e){return Array.isArray(e)?!e.some(t=>!ae(t)):!Object.keys(e).length}function qo(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function Xo(e,t={},n){for(const r in e){const o=e[r],s=n&&n[r];Ou(o)&&(!Array.isArray(o)||!Tu(s))?(t[r]=Array.isArray(o)?[]:{},Xo(o,t[r],s),Iu(t[r])&&qo(t,r)):ae(o)||(t[r]=!0)}return t}function $t(e,t,n,r){n||(n=Xo(t,{},r));for(const o in e){const s=e[o],i=r&&r[o];Ou(s)&&(!Array.isArray(s)||!Tu(i))?(ae(t)||Yo(n[o])?n[o]=Xo(s,Array.isArray(s)?[]:{},i):$t(s,je(t)?{}:t[o],n[o],i),Iu(n[o])&&qo(n,o)):Ge(s,t[o])?qo(n,o):n[o]=!0}return n}var kb=(e,t)=>{const n=t.split("."),r=[];let o=n[0];for(let s=1;s<n.length;o+="."+n[s++])!isNaN(+n[s])&&e.has(o)&&r.push(`${o}.${n[s]}`);return r},Qo=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ae(e)?e:t?e===""?NaN:e&&+e:n&&Me(e)?new Date(e):r?r(e):e;function Wi(e){const t=e.ref;return Jr(t)?t.files:Zs(t)?Eu(e.refs).value:Pu(t)?[...t.selectedOptions].map(({value:n})=>n):qn(t)?Su(e.refs).value:Qo(t.value,e)}var Pb=(e,t,n,r)=>{const o={};for(const s of e){const i=M(t,s);i&&ce(o,s,i._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},An=e=>ae(e)?e:Dr(e)?e.source:ye(e)?Dr(e.value)?e.value.source:e.value:e;const Gi="AsyncFunction";var Rb=e=>{if(!e||!e.validate)return!1;if(Ze(e.validate))return e.validate.constructor.name===Gi;if(ye(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Gi)return!0}return!1},Ob=e=>e.mount&&(e.required||!ae(e.required)&&e.required!==!1||!ae(e.min)||!ae(e.max)||!ae(e.maxLength)||!ae(e.minLength)||e.pattern||e.validate);function Hi(e,t,n){const r=M(e,n);if(r!=null&&r.type||r!=null&&r.message||Array.isArray(r))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),i=M(t,s),a=M(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:n}}var Tb=(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||st.all))},Ib=(e,t,n)=>!e||!t||e===t||Pr(e).some(r=>r&&(n?r===t||r.startsWith(t+"."):r.startsWith(t)||t.startsWith(r))),Ab=(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,Db=(e,t)=>{const n=M(e,t);!Cu(n).length&&!(n!=null&&n.root)&&Ce(e,t)};const jb={mode:st.onSubmit,reValidateMode:st.onChange,shouldFocusError:!0},wo="form",Nb=(e,t)=>{for(const n in e)n in t||delete e[n];Object.assign(e,t)},Au={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Mb(e={}){let t={...jb,...e},n={...me(Au),isLoading:Ze(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},o=ye(t.defaultValues)||ye(t.values)?me(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:me(o),i={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const l={},u={};let f=0,c=fr(t.mode),p=fr(t.reValidateMode);const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={...m};let v={...g};const y=(...b)=>b.some(_=>g[_]||v[_]),w={array:Zi(),state:Zi()};let x=0,C=0,E=t.criteriaMode===st.all;const P=(b,_)=>S=>{clearTimeout(u[b]),u[b]=setTimeout(_,S)},O=b=>{clearTimeout(u[b]),delete u[b],delete l[b]},N=b=>{O(b);const _=`${b}.`;for(const S of Object.keys(l))S.startsWith(_)&&O(S)},z=async b=>{if(!i.keepIsValid&&!t.disabled&&(y("isValid")||b)){const _=++x;let S;t.resolver?(S=Re((await ee()).errors),_===x&&D()):S=await de({fields:r,onlyCheckValid:!0,eventType:Lt.VALID}),_===x&&S!==n.isValid&&w.state.next({isValid:S})}},D=(b,_)=>{!t.disabled&&y("isValidating","validatingFields")&&((b||a.mount).forEach(S=>{S&&(_?ce(n.validatingFields,S,_):Ce(n.validatingFields,S))}),w.state.next({validatingFields:n.validatingFields,isValidating:!Re(n.validatingFields)}))},G=()=>{n.dirtyFields=$t(o,s,void 0,r)},H=(b,_=[],S,T,R=!0,F=!0)=>{if(T&&S&&!t.disabled){i.action=!0;const j=M(r,b);if(i.actionArrayLengths.has(b)||i.actionArrayLengths.set(b,Array.isArray(j)?j.length:0),F&&Array.isArray(j)){const A=S(j,T.argA,T.argB);R&&ce(r,b,A)}const $=M(n.errors,b);if(F&&Array.isArray($)){const A=$.root,te=S($,T.argA,T.argB)||$;A&&(te.root=A),R&&ce(n.errors,b,te),Db(n.errors,b)}const Z=M(n.touchedFields,b);if(y("touchedFields")&&F&&Array.isArray(Z)){const A=S(Z,T.argA,T.argB);R&&ce(n.touchedFields,b,A)}y("dirtyFields")&&G(),w.state.next({name:b,isDirty:q(b,_),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ce(s,b,_)},L=(b,_)=>{ce(n.errors,b,_),n.errors={...n.errors},w.state.next({errors:n.errors})},U=b=>{Object.keys(l).forEach(O),n.errors=b,w.state.next({errors:n.errors,isValid:!1})},V=b=>{const _=vn(b)?[b]:Jt(b);let S=s,T=o;for(let R=0;R<_.length-1;R++){const F=_[R];if(S=je(S)?S:S[F],T=je(T)?T:T[F],S===null&&T!==null)return!0}return!1},Q=b=>{if(!i.actionArrayLengths.size)return!1;const _=vn(b)?[b]:Jt(b);let S=s,T="",R=-1,F=0;for(let j=0;j<_.length;j++){if(je(S))return!1;const $=_[j];if(T=T?`${T}.${$}`:$,Array.isArray(S)&&+$>=S.length)return R===-1?!1:j===R?+$<F:!0;if(i.actionArrayLengths.has(T)&&(R=j+1,F=i.actionArrayLengths.get(T)),S=S[$],ae(S)&&R!==-1&&j>R&&+_[R]<F)return!0}return!1},W=(b,_,S,T)=>{const R=M(r,b);if(R){if(V(b)||Q(b))return;const F=ae(M(s,b)),j=M(s,b,ae(S)?M(o,b):S);ae(j)||T&&T.defaultChecked||_?ce(s,b,_?j:Wi(R._f)):ve(b,j),i.mount&&!i.action&&(z(),F&&n.isDirty&&y("isDirty")&&(q()||(n.isDirty=!1,w.state.next({...n}))),e.shouldUnregister&&F&&!ae(M(s,b))&&bo(b,a)&&(i.watch=!0))}},K=(b,_,S,T,R)=>{let F=!1,j=!1;const $={name:b};if(!t.disabled||T===!0){if(!S||T){const Z=Ge(M(o,b),_);y("isDirty")&&(j=n.isDirty,n.isDirty=$.isDirty=!Z||q(),F=j!==$.isDirty),j=!!M(n.dirtyFields,b),Z!==n.isDirty?Nb(n.dirtyFields,$t(o,s,void 0,r)):Z?Ce(n.dirtyFields,b):ce(n.dirtyFields,b,!0),$.dirtyFields=n.dirtyFields,F=F||y("dirtyFields")&&j!==!Z}if(S){const Z=M(n.touchedFields,b);Z||(ce(n.touchedFields,b,S),$.touchedFields=n.touchedFields,F=F||y("touchedFields")&&Z!==S)}F&&R&&w.state.next($)}return F?$:{}},le=(b,_,S,T)=>{const R=M(n.errors,b),F=y("isValid")&&qe(_)&&n.isValid!==_;if(t.delayError&&S?(l[b]=P(b,()=>L(b,S)),l[b](t.delayError)):(O(b),S?ce(n.errors,b,S):Ce(n.errors,b),n.errors={...n.errors}),(S?!Ge(R,S):R)||!Re(T)||F){const j={...T,...F&&qe(_)?{isValid:_}:{},errors:n.errors,name:b};w.state.next(j)}},ee=async b=>(D(b,!0),await t.resolver(s,t.context,Pb(b||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),B=async b=>{const _=C,{errors:S}=await ee(b);if(_!==C)return S;if(D(b),b){for(const T of b){const R=M(S,T);O(T);const F=a.array.has(T)&&ye(R)&&!Object.keys(R).some(Z=>!Number.isNaN(Number(Z))),j=M(r,T),$=ye(j)&&Object.keys(j).some(Z=>Z!=="_f");F?Mi(n.errors,{[T]:R},T):R!=null&&R.type||R!=null&&R.message||Array.isArray(R)||ye(R)&&$?ce(n.errors,T,R):Ce(n.errors,T)}n.errors={...n.errors}}else Object.keys(l).forEach(O),n.errors=S;return S},re=async({name:b,eventType:_})=>{if(e.validate){const S=await e.validate({formValues:s,formState:n,name:b,eventType:_});if(ye(S))for(const T in S){const R=S[T];R&&Le(`${wo}.${T}`,{message:Me(R.message)?R.message:"",type:R.type||dt.validate})}else Me(S)||!S?Le(wo,{message:S||"",type:dt.validate}):Ht(wo);return S}return!0},de=async({fields:b,onlyCheckValid:_,name:S,eventType:T,context:R={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(R.runRootValidation=!0,!await re({name:S,eventType:T})&&(R.valid=!1,_)))return R.valid;for(const F in b){const j=b[F];if(j){const{_f:$,...Z}=j;if($){const A=a.array.has($.name),te=j._f&&Rb(j._f),ue=y("isValidating","validatingFields");te&&ue&&D([$.name],!0);const he=await Vi(j,a.disabled,s,E,t.shouldUseNativeValidation&&!_,A);if(te&&ue&&D([$.name]),he[$.name]&&(R.valid=!1,_)||(_||(O($.name),M(he,$.name)?A?Mi(n.errors,he,$.name):ce(n.errors,$.name,he[$.name]):Ce(n.errors,$.name)),e.shouldUseNativeValidation&&he[$.name]))break}!Re(Z)&&await de({context:R,onlyCheckValid:_,fields:Z,name:F,eventType:T})}}return R.valid},Se=()=>{for(const b of a.unMount){const _=M(r,b);_&&(_._f.refs?_._f.refs.every(S=>!yo(S)):!yo(_._f.ref))&&on(b)}a.unMount=new Set},q=(b,_)=>(b&&_&&ce(s,b,_),!Ge(i.mount?s:o,o)),se=(b,_,S)=>Jo(b,a,{...i.mount?s:ae(_)||Me(b)?o:_},S,_),pe=b=>Cu(M(i.mount?s:o,b,t.shouldUnregister?M(o,b,[]):[])),ve=(b,_,S={},T=!1,R=!1,F=!1)=>{const j=M(r,b);let $=_;if(j){const Z=j._f;Z&&(!Z.disabled&&ce(s,b,Qo(_,Z)),$=Ar(Z.ref)&&je(_)?"":_,Pu(Z.ref)?[...Z.ref.options].forEach(A=>A.selected=$.includes(A.value)):Z.refs?qn(Z.ref)?Z.refs.forEach(A=>{(!A.defaultChecked||!A.disabled)&&(Array.isArray($)?A.checked=!!$.find(te=>te===A.value):A.checked=$===A.value||!!$)}):Z.refs.forEach(A=>A.checked=A.value===$):Jr(Z.ref)?Z.ref.value="":(Z.ref.value=$,!Z.ref.type&&!R&&!F&&w.state.next({name:b,values:T?s:me(s)})))}(S.shouldDirty||S.shouldTouch)&&K(b,j&&j._f&&!j._f.disabled&&(j._f.valueAsNumber||j._f.valueAsDate||j._f.setValueAs)?Qo(_,j._f):$,S.shouldTouch,S.shouldDirty,!R),S.shouldValidate&>(b,{delayError:S.delayError})},Pe=(b,_,S,T=!1,R=!1,F=!1)=>{a.array.has(b)&&w.array.next({name:b,values:T?s:me(s)});for(const j in _){if(!_.hasOwnProperty(j))continue;const $=_[j],Z=b+"."+j,A=M(r,Z);(a.array.has(b)||ye($)||A&&!A._f)&&!Vt($)?Pe(Z,$,S,T,R,F):ve(Z,$,S,T,R,F)}},ie=(b,_,S,T,R=!1)=>{const F=M(r,b),j=a.array.has(b),$=T?_:me(_),Z=M(s,b),A=Ge(Z,$);if(A||ce(s,b,$),j)w.array.next({name:b,values:T?s:me(s)}),y("isDirty","dirtyFields")&&S.shouldDirty&&(G(),R||w.state.next({name:b,dirtyFields:n.dirtyFields,isDirty:q(b,$)}));else{const te=Array.isArray($)&&!$.length||Re($),ue=!A&&!R;!F||F._f||je($)||te?ve(b,$,S,T,R,ue):Pe(b,$,S,T,R,ue)}if(!A&&!R){const te=bo(b,a),ue=T?s:me(s);if(w.state.next({...te&&n,name:i.mount||te?b:void 0,values:ue}),!j)for(const he of kb(a.array,b))w.state.next({name:he,values:ue})}},be=(b,_,S={})=>ie(b,_,S,!1),nt=(b,_={})=>{const S=Ze(b)?b(s):b;if(!Ge(s,S)){s={...s,...S};for(const T of a.mount)Sb(S,T)&&ie(T,M(S,T),_,!0,!0);w.state.next({...n,name:void 0,type:void 0,...f?{values:s}:{}}),_.shouldValidate&&z()}},at=async b=>{i.mount=!0;const _=b.target;let S=_.name,T=!0;const R=M(r,S),F=j=>{T=Number.isNaN(j)||Vt(j)&&isNaN(j.getTime())||Ge(j,M(s,S,j))};if(R){let j,$;const Z=_.type?Wi(R._f):Ko(b),A=b.type===Lt.BLUR||b.type===Lt.FOCUS_OUT,te=!Ob(R._f)&&!e.validate&&!t.resolver&&!M(n.errors,S)&&!R._f.deps,ue=te||Ab(A,M(n.touchedFields,S),n.isSubmitted,p,c),he=bo(S,a,A);if(ce(s,S,me(Z)),A){if(!_||!_.readOnly){R._f.onBlur&&R._f.onBlur(b);const De=l[S];De&&De(0)}}else R._f.onChange&&R._f.onChange(b);const ut=K(S,Z,A),Ae=!Re(ut)||he;if(!A&&w.state.next({name:S,type:b.type,...f?{values:me(s)}:{}}),ue)return(!te||!n.isValid)&&y("isValid")&&(t.mode==="onBlur"?A&&z():A||z()),Ae&&w.state.next({name:S,...he?{}:ut});if(!t.resolver&&e.validate&&await re({name:S,eventType:b.type}),!A&&he&&w.state.next({...n}),t.resolver){const{errors:De}=await ee([S]);if(D([S]),F(Z),!T){!Re(ut)&&w.state.next(ut);return}const rt=Hi(n.errors,r,S),cn=Hi(De,r,rt.name||S);j=cn.error,S=cn.name,$=Re(De)}else D([S],!0),j=(await Vi(R,a.disabled,s,E,t.shouldUseNativeValidation))[S],D([S]),F(Z),T&&(j?$=!1:y("isValid")&&($=await de({fields:r,onlyCheckValid:!0,name:S,eventType:b.type})));T&&(R._f.deps&&(!Array.isArray(R._f.deps)||R._f.deps.length>0)&>(R._f.deps),le(S,$,j,ut))}},ct=(b,_)=>{if(M(n.errors,_)&&b.focus)return b.focus(),1},gt=async(b,_={})=>{let S,T;const R=Pr(b);if(t.resolver){const F=C,j=await B(ae(b)?b:R);if(S=Re(j),T=b?!R.some($=>M(j,$)):S,F!==C)return T}else b?(T=(await Promise.all(R.map(async F=>{const j=M(r,F);return await de({fields:j&&j._f?{[F]:j}:j,eventType:Lt.TRIGGER})}))).every(Boolean),!(!T&&!n.isValid)&&z()):T=S=await de({fields:r,name:b,eventType:Lt.TRIGGER});if(_.delayError&&t.delayError&&Me(b)){const F=M(n.errors,b);F?(Ce(n.errors,b),l[b]=P(b,()=>L(b,F)),l[b](t.delayError)):O(b)}if(_.shouldTouch)for(const F of b?R:a.mount)!a.array.has(F)&&ce(n.touchedFields,F,!0);return w.state.next({...!Me(b)||y("isValid")&&S!==n.isValid?{}:{name:b},...t.resolver||!b?{isValid:S}:{},..._.shouldTouch&&y("touchedFields")?{touchedFields:n.touchedFields}:{},errors:n.errors}),_.shouldFocus&&!T&&Mn(r,ct,b?R:a.mount),T},nn=(b,_)=>{let S={...i.mount?s:o};return _&&(S=ku(_.dirtyFields?n.dirtyFields:n.touchedFields,S)),ae(b)?S:Me(b)?M(S,b):b.map(T=>M(S,T))},Nt=b=>ae(b)?{...n.errors}:Me(b)?M(n.errors,b):b.map(_=>M(n.errors,_)),lt=(b,_)=>{const S=_||n,T=M(S.errors,b);return{invalid:!!T,isDirty:!!M(S.dirtyFields,b),error:T,isValidating:!!M(S.validatingFields,b),isTouched:!!M(S.touchedFields,b)}},Ht=b=>{const _=b?Pr(b):void 0;_?_.forEach(S=>{N(S),Ce(n.errors,S),w.state.next({name:S,errors:n.errors})}):(Object.keys(l).forEach(O),n.errors={},w.state.next({errors:n.errors}))},Le=(b,_,S)=>{O(b);const T=(M(r,b,{_f:{}})._f||{}).ref,R=M(n.errors,b)||{},{ref:F,message:j,type:$,types:Z,...A}=R;ce(n.errors,b,{...A,..._,ref:T}),w.state.next({name:b,errors:n.errors,isValid:!1}),S&&S.shouldFocus&&T&&T.focus&&T.focus()},kn=(b,_)=>{if(Ze(b)){f++;const{unsubscribe:S}=w.state.subscribe({next:R=>"values"in R&&b(R.values||se(void 0,_),R)});let T=!1;return{unsubscribe:()=>{T||(T=!0,f--,S())}}}return se(b,_,!0)},rn=b=>{var _;const S=!!(!((_=b.formState)===null||_===void 0)&&_.values);S&&f++;const{unsubscribe:T}=w.state.subscribe({next:F=>{if(Ib(b.name,F.name,b.exact)&&Tb(F,b.formState||g,kt,b.reRenderRoot)){const j={...s};b.callback({values:j,...n,...F,defaultValues:o})}}});if(!S)return T;let R=!1;return()=>{R||(R=!0,f--,T())}},Ee=b=>(i.mount=!0,v={...v,...b.formState},rn({...b,formState:{...m,...b.formState}})),on=(b,_={})=>{for(const S of b?Pr(b):a.mount)a.mount.delete(S),a.array.delete(S),a.disabled.delete(S),_.keepValue||(Ce(r,S),Ce(s,S)),_.keepError||(N(S),Ce(n.errors,S)),!_.keepDirty&&Ce(n.dirtyFields,S),!_.keepTouched&&Ce(n.touchedFields,S),!_.keepIsValidating&&Ce(n.validatingFields,S),!t.shouldUnregister&&!_.keepDefaultValue&&Ce(o,S);f&&w.state.next({values:me(s)}),w.state.next({...n,..._.keepDirty?{}:{isDirty:q()},..._.keepIsValidating?{}:{isValidating:!Re(n.validatingFields)}}),!_.keepIsValid&&z()},Et=({disabled:b,name:_})=>{if(qe(b)&&i.mount||b||a.disabled.has(_)){const R=a.disabled.has(_)!==!!b;b?a.disabled.add(_):a.disabled.delete(_),R&&i.mount&&!i.action&&z()}},Pn=(b,_={})=>{let S=M(r,b);const T=qe(_.disabled)||qe(t.disabled),R=!a.registerName.has(b)&&S&&S._f&&!S._f.mount;return ce(r,b,{...S||{},_f:{...S&&S._f?S._f:{ref:{name:b}},name:b,mount:!0,..._}}),a.mount.add(b),S&&!R?Et({disabled:qe(_.disabled)?_.disabled:t.disabled,name:b}):W(b,!0,_.value),{...T?{disabled:_.disabled||t.disabled}:{},...t.progressive?{required:!!_.required,min:An(_.min),max:An(_.max),minLength:An(_.minLength),maxLength:An(_.maxLength),pattern:An(_.pattern)}:{},name:b,onChange:at,onBlur:at,ref:F=>{if(F){a.registerName.add(b),Pn(b,_),a.registerName.delete(b),S=M(r,b);const j=ae(F.value)&&F.querySelectorAll&&F.querySelectorAll("input,select,textarea")[0]||F,$=Eb(j),Z=S._f.refs||[];if($?Z.find(te=>te===j):j===S._f.ref)return;const A={...S._f};$?(A.refs=[...Z.filter(yo),j,...Array.isArray(M(o,b))?[{}]:[]],A.ref={type:j.type,name:b}):(A.ref=j,delete A.refs),ce(r,b,{_f:A}),W(b,!1,void 0,j)}else S=M(r,b,{}),S._f&&(S._f.mount=!1),(t.shouldUnregister||_.shouldUnregister)&&!(yu(a.array,b)&&i.action)&&a.unMount.add(b)}}},Rn=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Mn(r,ct,a.mount),sn=b=>{qe(b)&&(w.state.next({disabled:b}),Mn(r,(_,S)=>{const T=M(r,S);T&&(_.disabled=T._f.disabled||b,Array.isArray(T._f.refs)&&T._f.refs.forEach(R=>{R.disabled=T._f.disabled||b}))},0))},Qn=(b,_)=>async S=>{let T,R;S&&(S.preventDefault&&S.preventDefault(),S.persist&&S.persist());let F=me(s);if(w.state.next({isSubmitting:!0}),t.resolver){const j=C,{errors:$,values:Z}=await ee();if(j!==C)return;D(),Object.keys(l).forEach(O),n.errors=$,F=me(Z)}else await de({fields:r,eventType:Lt.SUBMIT}),Ce(n.errors,wu);if(a.disabled.size)for(const j of a.disabled)Ce(F,j);if(Re(n.errors)){w.state.next({errors:{}});try{T=await b(F,S)}catch(j){R=j}}else _&&await _({...n.errors},S),Rn(),setTimeout(Rn);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Re(n.errors)&&!R,submitCount:n.submitCount+1,errors:n.errors}),R)throw R;return T},er=(b,_={})=>{M(r,b)&&(Ce(n.validatingFields,b),ae(_.defaultValue)?be(b,me(M(o,b))):(be(b,_.defaultValue),ce(o,b,me(_.defaultValue))),_.keepTouched||Ce(n.touchedFields,b),_.keepDirty||(Ce(n.dirtyFields,b),n.isDirty=_.defaultValue?q(b,me(M(o,b))):q()),_.keepError||(O(b),Ce(n.errors,b),z()),w.state.next({...n,isValidating:!Re(n.validatingFields)}))},an=(b,_={})=>{C++;const S=b?me(b):o,T=me(S),R=Re(b),F=T,j=r;if(Object.keys(l).forEach(O),_.keepDefaultValues||(o=S),!_.keepValues){if(_.keepDirtyValues){const $=new Set([...a.mount,...Ru($t(o,s,void 0,j),n.dirtyFields)]);for(const Z of $){const A=M(n.dirtyFields,Z),te=M(s,Z),ue=M(F,Z);A&&!ae(te)?ce(F,Z,te):!A&&!ae(ue)&&be(Z,ue)}}else{if(qr&&ae(b))for(const $ of a.mount){const Z=M(r,$);if(Z&&Z._f){const A=Array.isArray(Z._f.refs)?Z._f.refs[0]:Z._f.ref;if(Ar(A)){const te=A.closest("form");if(te){te.reset();break}}}}if(_.keepFieldsRef)for(const $ of a.mount)be($,M(F,$));else r={}}if(t.shouldUnregister){if(s=_.keepDefaultValues?me(o):{},_.keepFieldsRef)for(const $ of a.mount)ce(s,$,M(F,$))}else s=me(F);w.array.next({values:{...F}}),w.state.next({name:void 0,type:void 0,values:{...F}})}a={mount:_.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!g.isValid||!!_.keepIsValid||!!_.keepDirtyValues||!t.shouldUnregister&&!Re(F),i.watch=!!t.shouldUnregister,i.keepIsValid=!!_.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),_.keepErrors||(n.errors={}),w.state.next({submitCount:_.keepSubmitCount?n.submitCount:0,isDirty:R?!1:_.keepDirty?n.isDirty:_.keepValues?q():!!(_.keepDefaultValues&&!Ge(b,o)),isSubmitted:_.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:R?{}:_.keepDirtyValues?_.keepDefaultValues&&s?$t(o,s,void 0,j):n.dirtyFields:_.keepDefaultValues&&b?$t(o,b,void 0,j):_.keepDirty?n.dirtyFields:_.keepValues?$t(o,s,void 0,j):{},touchedFields:_.keepTouched?n.touchedFields:{},...!_.keepIsValidating&&(n.isValidating||!Re(n.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:_.keepErrors?n.errors:{},isSubmitSuccessful:_.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Ct=(b,_)=>an(Ze(b)?b(s):b,{...t.resetOptions,..._}),tr=(b,_={})=>{const S=M(r,b),T=S&&S._f;if(T){const R=T.refs?T.refs[0]:T.ref;R.focus&&setTimeout(()=>{R.focus(),_.shouldSelect&&Ze(R.select)&&R.select()})}},kt=b=>{const{name:_,type:S,values:T,...R}=b;n={...n,...R}};w.state.subscribe({next:kt});const On={control:{register:Pn,unregister:on,getFieldState:lt,handleSubmit:Qn,setError:Le,_subscribe:rn,_runSchema:ee,_updateIsValidating:D,_focusError:Rn,_getWatch:se,_getDirty:q,_setValid:z,_setFieldArray:H,_setDisabledField:Et,_setErrors:U,_getFieldArray:pe,_reset:an,_resetDefaultValues:()=>Ze(t.defaultValues)&&t.defaultValues().then(b=>{Ct(b,t.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:Se,_disableForm:sn,_subjects:w,_proxyFormState:g,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(b){i=b},get _defaultValues(){return o},get _names(){return a},set _names(b){a=b},get _formState(){return n},get _options(){return t},set _options(b){t={...t,...b},c=fr(t.mode),p=fr(t.reValidateMode),E=t.criteriaMode===st.all}},subscribe:Ee,trigger:gt,register:Pn,handleSubmit:Qn,watch:kn,setValue:be,setValues:nt,getValues:nn,getErrors:Nt,reset:Ct,resetField:er,resetDefaultValues:(b,_={})=>{if(o=me(b),!_.keepDirty){const S=$t(o,s,void 0,r);n.dirtyFields=S,n.isDirty=!Re(S)}_.keepIsValid||z(),w.state.next({...n,defaultValues:o})},clearErrors:Ht,unregister:on,setError:Le,setFocus:tr,getFieldState:lt};return{...On,formControl:On}}function zb(e={}){const t=k.useRef(void 0),n=k.useRef(void 0),r=k.useRef(e.formControl),[o,s]=k.useState(()=>({...me(Au),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:f,...c}=Mb(e);t.current={...c,formState:o}}const i=t.current.control;i._options=e;const a=()=>({...i._formState,defaultValues:i._defaultValues}),{resyncIfNeeded:l,snapshot:u}=Vs(a);return Ls(()=>{l(!0,a,s);const f=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState,defaultValues:i._defaultValues}),reRenderRoot:!0});return s(c=>({...c,isReady:!0})),i._formState.isReady=!0,()=>{f(),u(!0,a)}},[i,l,u]),k.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),k.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),k.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),k.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),k.useEffect(()=>{if(i._proxyFormState.isDirty){const f=i._getDirty();f!==o.isDirty&&i._subjects.state.next({isDirty:f})}},[i,o.isDirty]),k.useEffect(()=>{var f;e.values&&!Ge(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((f=i._options.resetOptions)===null||f===void 0)&&f.keepIsValid||i._setValid(),n.current=e.values,s(c=>({...c}))):i._resetDefaultValues()},[i,e.values]),k.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=k.useMemo(()=>_u(o,i),[i,o]),t.current}const Ki=(e,t,n)=>{if(e&&"reportValidity"in e){const r=M(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},es=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Ki(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Ki(o,n,e))}},Yi=(e,t)=>{t.shouldUseNativeValidation&&es(e,t);const n={};for(const r in e){const o=M(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.refs?o.refs[0]:o&&o.ref});if($b(t.names||Object.keys(e),r)){const i=Object.assign({},M(n,r));ce(i,"root",s),ce(n,r,i)}else ce(n,r,s)}return n},$b=(e,t)=>{const n=Ji(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>Ji(r).match(`^${n}\\.\\d+`))};function Ji(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function ts(){return ts=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},ts.apply(null,arguments)}function qi(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Fb(e,t){for(var n=Object.create(null);e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a,l,u=r.unionErrors.reduce(function(p,m){return m.errors.length<p.errors.length?m:p}).errors[0];n[i]={message:(a=u==null?void 0:u.message)!=null?a:s,type:(l=u==null?void 0:u.code)!=null?l:o}}else n[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(m){return e.push(m)})}),t){var f=n[i].types,c=f&&f[r.code];n[i]=Us(i,t,n,o,c?[].concat(c,r.message):r.message)}e.shift()}return n}function Lb(e,t){for(var n=Object.create(null),r=function(){var o=e[0],s=o.code,i=o.message,a=o.path.join(".");if(!n[a])if(o.code==="invalid_union"&&o.errors.length>0){var l,u,f=o.errors.reduce(function(m,g){return g.length<m.length?g:m})[0];n[a]={message:(l=f==null?void 0:f.message)!=null?l:i,type:(u=f==null?void 0:f.code)!=null?u:s}}else n[a]={message:i,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(m){return m.forEach(function(g){return e.push(ts({},g,{path:[].concat(o.path,g.path)}))})}),t){var c=n[a].types,p=c&&c[o.code];n[a]=Us(a,t,n,s,p?[].concat(p,o.message):o.message)}e.shift()};e.length;)r();return n}function Vb(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(qi(function(){function i(l){return s.shouldUseNativeValidation&&es({},s),{errors:{},values:n.raw?Object.assign({},r):l}}var a=e;return n.mode==="sync"?i(a.parse(r,t)):Promise.resolve(a.parseAsync(r,t)).then(i)},function(i){if((function(a){var l;return!(a==null||(l=a._zod)==null||(l=l.traits)==null||!l.has("$ZodError"))})(i))return{values:{},errors:Yi(Lb(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_def"in r&&typeof r._def=="object"})(e))return function(r,o,s){try{return Promise.resolve(qi(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(i){return s.shouldUseNativeValidation&&es({},s),{errors:{},values:n.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(i))return{values:{},errors:Yi(Fb(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}function ns(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 Xi(e,t="|"){return e.map(n=>$u(n)).join(t)}function rs(e,t){return typeof t=="bigint"?t.toString():t}class Zb{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function Bs(e){return new Zb(e)}function Ub(e){return e==null}function Ws(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function tn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Du(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t!=null&&t.get?t.get.raw:t==null?void 0:t.value}function At(e){return Du(e._zod.def)??e._zod.def.shape}function ju(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return tn(this,t,r),r},enumerable:!0,configurable:!0})}function Nu(e,t,n){t in e?tn(e,t,n):e[t]=n}function qt(e,t,n,r){const o=At(t);for(const s of n){const i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?ju(e,s,()=>{const a=t._zod.def.shape[s];return r?r(a,s):a}):Nu(e,s,r?r(i.value,s):i.value))}}function Bb(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ju(e,n,()=>t[n]):Nu(e,n,r.value))}}function Xe(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Wb(e){return JSON.stringify(e)}function Gb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Mu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Hb=Bs(()=>{var e;if(_t.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Bn(e){if(jr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(jr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function zu(e){return Bn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Kb=new Set(["string","number","symbol"]);function Xr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wt(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function J(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 $u(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Yb(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Jb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},qb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Xb(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={};return qt(s,e,Qr(e,t)),Wt(e,Xe(n,{shape:s,checks:[]}))}function Qr(e,t){var o;const n=At(e),r=[];for(const s of Reflect.ownKeys(t)){if(!((o=Object.getOwnPropertyDescriptor(n,s))!=null&&o.enumerable))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&r.push(s)}return r}function Qb(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=new Set(Qr(e,t)),i={};return qt(i,e,Reflect.ownKeys(At(e)).filter(a=>!s.has(a))),Wt(e,Xe(n,{shape:i,checks:[]}))}function ey(e,t){if(!Bn(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=At(e);for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Wt(e,Xe(e._zod.def,{shape:Fu(e,t)}))}function Fu(e,t){const n={};return qt(n,e,Reflect.ownKeys(At(e))),Bb(n,t),n}function ty(e,t){if(!Bn(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Wt(e,Xe(e._zod.def,{shape:Fu(e,t)}))}function ny(e,t){var o,s;if(!((o=t==null?void 0:t._zod)!=null&&o.def))throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((s=e._zod.def.checks)!=null&&s.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};qt(n,e,Reflect.ownKeys(At(e))),qt(n,t,Reflect.ownKeys(At(t)));const r=Xe(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Wt(e,r)}function Qi(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const a=n?new Set(Qr(t,n)):void 0,l={};return qt(l,t,Reflect.ownKeys(At(t)),e&&((u,f)=>a&&!a.has(f)?u:new e({type:"optional",innerType:u}))),Wt(t,Xe(t._zod.def,{shape:l,checks:[]}))}function ry(e,t,n){const r=n?new Set(Qr(t,n)):void 0,o={};return qt(o,t,Reflect.ownKeys(At(t)),(s,i)=>r&&!r.has(i)?s:new e({type:"nonoptional",innerType:s})),Wt(t,Xe(t._zod.def,{shape:o}))}function Ot(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 oy(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 Gs(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Dn(e){return typeof e=="string"?e:e==null?void 0:e.message}function ea(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function En(e,t,n){var l,u,f,c,p,m,g,v,y,w;var r;const o=(u=(l=e.inst)==null?void 0:l._zod)==null?void 0:u.traits;o!=null&&o.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?(c=(f=e.schema)==null?void 0:f._zod.def)==null?void 0:c.error:void 0,i=e.message?e.message:Dn((g=(m=(p=e.inst)==null?void 0:p._zod.def)==null?void 0:m.error)==null?void 0:g.call(m,e))??Dn(s==null?void 0:s(e))??Dn((v=t==null?void 0:t.error)==null?void 0:v.call(t,e))??Dn((y=n.customError)==null?void 0:y.call(n,e))??Dn((w=n.localeError)==null?void 0:w.call(n,e))??"Invalid input",a={};for(const x of Object.keys(e))x==="inst"||x==="schema"||x==="continue"||x==="input"||x==="__proto__"||(a[x]=e[x]);return a.path??(a.path=[]),a.message=i,t!=null&&t.reportInput&&(a.input=e.input),a}const sy=/[\uD800-\uDBFF]/;function Hs(e){const t=e.length;if(!sy.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Ks(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function iy(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Wn(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function ay(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ly(e,n,r.value)}}function Bt(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ys(e,t,n){return Bt(e,t,n,!1)}function cy(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Bt(this,n,r(this))},set(o){Bt(this,n,o)}})}return t}function ly(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Bt(this,t,n.bind(this))},set(r){Bt(this,t,r)}})}function uy(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let xo,Ft=!1;const dy={configurable:!0,get(){Ft=!0}};function fe(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&xo!==e._zod){xo=void 0;return}xo=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,dy);const o=Ft;Ft=!1;try{const s=n(this);return Ft?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Ft=Ft||o,s}catch(s){throw delete this[t],Ft=Ft||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function fy(e,t,n,r){const o=uy(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const py="~constantCatch";function hy(e){const t=()=>e;return t[py]=!0,t}var ta;const _o={value:void 0,enumerable:!1};let na="captureStackTrace"in Error?Error:null;function my(e){const t=na;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return na=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function I(e,t,n,r){const o={};function s(p){this.def=p,this.constr=c,this.traits=new Set}s.prototype=o;const i=n,a=i&&new WeakSet;function l(p,m){if(p._zod){if(p._zod.traits.has(e))return}else{_o.value=new s(m);try{Object.defineProperty(p,"_zod",_o)}finally{_o.value=void 0}}if(p._zod.traits.add(e),t(p,m),a){const v=Object.getPrototypeOf(p),y=p._zod.constr.prototype;let w=v;for(;w&&w!==y;)w=Object.getPrototypeOf(w);const x=w??v;a.has(x)||(a.add(x),ay(x,i))}const g=c.prototype;for(const v in g)Object.prototype.hasOwnProperty.call(g,v)&&(v in p||(p[v]=g[v].bind(p)))}const u=(r==null?void 0:r.Parent)??Object;class f extends u{}Object.defineProperty(f,"name",{value:e});function c(p){var y;const m=r!=null&&r.Parent?my(f):this;l(m,p);const g=m._zod.deferred;if(g){for(const w of g)w();m._zod.deferred=void 0}const v=(y=globalThis.__zod_globalConfig)==null?void 0:y.postProcessor;return v&&v(m),m}return Object.defineProperty(c,"init",{value:l}),Object.defineProperty(c,Symbol.hasInstance,{value:p=>{var m,g;return r!=null&&r.Parent&&p instanceof r.Parent?!0:(g=(m=p==null?void 0:p._zod)==null?void 0:m.traits)==null?void 0:g.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class Yt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Lu extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(ta=globalThis).__zod_globalConfig??(ta.__zod_globalConfig={});const _t=globalThis.__zod_globalConfig;function Gt(e){return e&&Object.assign(_t,e),_t}function gy(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,rs,2)),e.message}function vy(e){this._zod.message=e}const by={get:gy,set:vy,enumerable:!0,configurable:!0},So={value:void 0,enumerable:!1},ra=new WeakSet([Object.prototype,Error.prototype]),yy=(e,t)=>{e.name="$ZodError",So.value=t,Object.defineProperty(e,"issues",So),So.value=void 0,Object.defineProperty(e,"message",by);const n=Object.getPrototypeOf(e);ra.has(n)||(ra.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},wy=I("$ZodError",yy);function xy(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function _y(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?xy(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Sy(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<a.length;){const f=a[u],c=u===a.length-1;if(f==="_errors"){c&&l._errors.push(t(i)),u++;continue}Object.prototype.hasOwnProperty.call(l,f)||Object.defineProperty(l,f,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const p=l[f];c&&p._errors.push(t(i)),l=p,u++}}}};return r(e),n}function eo(e,t){return{callee:(t==null?void 0:t.callee)??e,Err:t==null?void 0:t.Err}}const Js=e=>{const t=(n,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Yt;if(a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>En(u,i,Gt())));throw Mu(l,(s==null?void 0:s.callee)??t),l}return a.value};return t},qs=e=>{const t=async(n,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let a=n._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>En(u,i,Gt())));throw Mu(l,(s==null?void 0:s.callee)??t),l}return a.value};return t},Xs=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 Yt;return s.issues.length?Vu(e,s.issues,o):{success:!0,data:s.value}};function Vu(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>En(o,n,Gt()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const Qs=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?Vu(e,s.issues,o):{success:!0,data:s.value}},Ey=Symbol.for("zod.compile.invalid"),Cy=Symbol.for("zod.compile.fallback"),ky=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ey)return!0;if(r.definite===!0&&n===void 0)return!1}return Py(e,t,n)});function Py(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[Cy]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new Yt;return s.issues.length===0}const Ry=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},Oy=e=>{const t=Js(e),n=(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,a,eo(n,i))};return n},Ty=e=>{const t=Js(e),n=(r,o,s,i)=>t(r,o,s,eo(n,i));return n},Iy=e=>{const t=qs(e),n=async(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,a,eo(n,i))};return n},Ay=e=>{const t=qs(e),n=async(r,o,s,i)=>await t(r,o,s,eo(n,i));return n},Dy=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Xs(e)(t,n,o)},jy=e=>(t,n,r)=>Xs(e)(t,n,r),Ny=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Qs(e)(t,n,o)},My=e=>async(t,n,r)=>Qs(e)(t,n,r),zy=/^[cC][0-9a-z]{6,}$/,$y=/^[0-9a-z]+$/,Fy=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ly=/^[0-9a-vA-V]{20}$/,Vy=/^[A-Za-z0-9]{27}$/,Zy=/^[a-zA-Z0-9_-]{21}$/;function Uy(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const By=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Wy=/^([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})$/,oa=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)$/,Gy=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hy="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ky(){return new RegExp(Hy,"u")}const Yy=/^(?:(?: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])$/,Jy=/^(([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}|:))$/,qy=/^((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])$/,Xy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ew=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tw=/^https?$/,nw=/^\+[1-9]\d{6,14}$/,Zu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function rw(e){return new RegExp(`^${e}$`)}const ow=rw(Zu);function os(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function sw(e){return new RegExp(`^${os(e)}$`)}function iw(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${os({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${os({precision:e.precision})}`:n;return new RegExp(`^${Zu}T(?:${r})$`)}const aw=/^[\s\S]{0,}$/,cw=/^(?:true|false)$/i,lw=/^[^A-Z]*$/,uw=/^[^a-z]*$/,mt=I("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ei=e=>{const t=e.value;return!Ub(t)&&t.length!==void 0},dw=I("$ZodCheckMaxLength",(e,t)=>{var n;mt.init(e,t),(n=e._zod.def).when??(n.when=ei),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?Hs(o):s)<=t.maximum)return;const a=Ks(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fw=I("$ZodCheckMinLength",(e,t)=>{var n;mt.init(e,t),(n=e._zod.def).when??(n.when=ei),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?Hs(o):s)>=t.minimum)return;const a=Ks(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),pw=I("$ZodCheckLengthEquals",(e,t)=>{var n;mt.init(e,t),(n=e._zod.def).when??(n.when=ei),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=t.length&&s<=t.length*2?Hs(o):s;if(i===t.length)return;const a=Ks(o),l=i>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),to=I("$ZodCheckStringFormat",(e,t)=>{var n,r;mt.init(e,t),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=()=>{})}),hw=I("$ZodCheckRegex",(e,t)=>{to.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})}}),mw=I("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lw),to.init(e,t)}),gw=I("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uw),to.init(e,t)}),vw=I("$ZodCheckIncludes",(e,t)=>{mt.init(e,t);const n=Xr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=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})}}),bw=I("$ZodCheckStartsWith",(e,t)=>{mt.init(e,t);const n=new RegExp(`^${Xr(t.prefix)}.*`);t.pattern??(t.pattern=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})}}),yw=I("$ZodCheckEndsWith",(e,t)=>{mt.init(e,t);const n=new RegExp(`.*${Xr(t.suffix)}$`);t.pattern??(t.pattern=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})}});function sa(e,t,n){e.issues.length&&t.issues.push(...Gs(n,e.issues))}const ww=I("$ZodCheckProperties",(e,t)=>{mt.init(e,t),Ys(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});return}n??(n=Reflect.ownKeys(t.shape).map(i=>[i,t.shape[i]]));const o=r.value;let s;for(const[i,a]of n){const l=a._zod.run({value:o[i],issues:[]},{});l instanceof Promise?(s??(s=[]),s.push(l.then(u=>sa(u,r,i)))):sa(l,r,i)}if(s)return Promise.all(s).then(()=>{})}}),xw=I("$ZodCheckOverwrite",(e,t)=>{mt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class _w{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
163
|
-
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=(this==null?void 0:this.content)??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
164
|
-
${n.join(`
|
|
165
|
-
`)}
|
|
166
|
-
};`)(...Object.values(this.closed))}}const Sw={major:4,minor:6,patch:5},Te=I("$ZodType",(e,t)=>{var s;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sw;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,u,f)=>{if(l.memo)return l;let c=Ot(l),p;for(const m of u){if(m._zod.def.when){if(oy(l)||!m._zod.def.when(l))continue}else if(c)continue;const g=l.issues.length,v=m._zod.check(l);if(v instanceof Promise&&(f==null?void 0:f.async)===!1)throw new Yt;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==g&&(ea(l.issues,g,e),c||(c=Ot(l,g)))});else{if(l.issues.length===g)continue;ea(l.issues,g,e),c||(c=Ot(l,g))}}return p?p.then(()=>l):l},a=(l,u,f)=>{if(Ot(l))return l.aborted=!0,l;const c=i(u,o,f);if(c instanceof Promise){if(f.async===!1)throw new Yt;return c.then(p=>e._zod.parse(p,f))}return e._zod.parse(c,f)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const c=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return c instanceof Promise?c.then(p=>a(p,l,u)):a(c,l,u)}const f=e._zod.parse(l,u);if(f instanceof Promise){if(u.async===!1)throw new Yt;return f.then(c=>i(c,o,u))}return i(f,o,u)}}},{get"~standard"(){return Ys(this,"~standard",Bu(this))},set"~standard"(e){Bt(this,"~standard",e)}}),Uu=(e,t)=>e.issues.length?{issues:e.issues.map(n=>En(n,t,Gt()))}:{value:e.value};async function Ew(e,t){const n={async:!0};return Uu(await e._zod.run({value:t,issues:[]},n),n)}function Bu(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Uu(r,n)}catch{}return Ew(e,t)},vendor:"zod",version:1}}const ti=I("$ZodString",(e,t)=>{Te.init(e,t),e._zod.pattern=t.pattern??aw,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),xe=I("$ZodStringFormat",(e,t)=>{to.init(e,t),ti.init(e,t)}),Cw=I("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Wy),xe.init(e,t)}),kw=I("$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=oa(r))}else t.pattern??(t.pattern=oa());xe.init(e,t)}),Pw=I("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Gy),xe.init(e,t)}),Wu=1,Nr=2;function Gu(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Rw(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?Gu(e)||Nr:Ow(e,t)}function Ow(e,t){var n;if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===tw.source&&!/^https?:\/\//i.test(e))return Wu;try{if(typeof URL<"u"){const r=URL;if(typeof r.parse=="function")return r.parse(e)??Nr}return new URL(e)}catch{return Nr}}const Tw=/[\t\n\r]/g;function ia(e){return e.replace(Tw,"")}function Iw(e,t){return t.lastIndex=0,t.test(e.hostname)}function Aw(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Dw=I("$ZodURL",(e,t)=>{xe.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=Rw(r,t);if(o===Wu){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===Nr){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(o===!0){n.value=ia(r);return}t.hostname&&!Iw(o,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Aw(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:ia(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),jw=I("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ky()),xe.init(e,t)}),Nw=I("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Zy:Uy(t.length)),xe.init(e,t)}),Mw=I("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=zy),xe.init(e,t)}),zw=I("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=$y),xe.init(e,t)}),$w=I("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Fy),xe.init(e,t)}),Fw=I("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ly),xe.init(e,t)}),Lw=I("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Vy),xe.init(e,t)}),Vw=I("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=iw(t)),xe.init(e,t)}),Zw=I("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ow),xe.init(e,t)}),Uw=I("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=sw(t)),xe.init(e,t)}),Bw=I("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=By),xe.init(e,t)}),Ww=I("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Yy),xe.init(e,t)}),Gw=/^[0-9a-fA-F:.]+$/;function Hu(e){return Gw.test(e)?Gu(`http://[${e}]`):!1}const Hw=I("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Jy),xe.init(e,t),e._zod.check=n=>{Hu(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Kw=I("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=qy),xe.init(e,t)});function Yw(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Hu(n)}const Jw=I("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Xy),xe.init(e,t),e._zod.check=n=>{Yw(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Ku(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Yu=/^[0-9a-zA-Z+/]*={0,2}$/,qw=I("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Yu),xe.init(e,t),e._zod.check=n=>{Ku(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),ni=/^[A-Za-z0-9_-]*$/;function Xw(e){if(!ni.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ku(n)}const Qw=I("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ni),xe.init(e,t),e._zod.check=n=>{Xw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),ex=I("$ZodE164",(e,t)=>{t.pattern??(t.pattern=nw),xe.init(e,t)});function tx(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 nx=I("$ZodJWT",(e,t)=>{xe.init(e,t),e._zod.check=n=>{tx(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),rx=I("$ZodBoolean",(e,t)=>{Te.init(e,t),e._zod.pattern=cw,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}}),ox=I("$ZodUnknown",(e,t)=>{Te.init(e,t),e._zod.parse=n=>n}),sx=I("$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 aa(e,t,n){e.issues.length&&t.issues.push(...Gs(n,e.issues)),t.value[n]=e.value}const ix=I("$ZodArray",(e,t)=>{Te.init(e,t);const n=_t.memoizer;n==null||n.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=n?n.alloc(e,r,Array(s.length),o):Array(s.length);const i=[],a=o==null?void 0:o.abortEarly;for(let l=0;l<s.length;l++){const u=s[l],f=t.element._zod.run({value:u,issues:[]},o);if(f instanceof Promise)i.push(f.then(c=>aa(c,r,l)));else if(aa(f,r,l),a&&f.issues.length!==0&&Ot(f))break}return i.length?Promise.all(i).then(()=>r):r}});function Mr(e,t,n,r,o,s){const i=n in r,a=s==="optional";if(!(!i&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!i)return;t.issues.push(...Gs(n,e.issues))}if(!i&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(i||o==="defaulted"&&!a)&&(t.value[n]=void 0):t.value[n]=e.value}}const ax=[];function Ju(e){var i,a,l,u;const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ax,o=r.length?[...t,...r]:t;for(const f of o)if(!((u=(l=(a=(i=e.shape)==null?void 0:i[f])==null?void 0:a._zod)==null?void 0:l.traits)!=null&&u.has("$ZodType")))throw new Error(`Invalid element at key "${String(f)}": expected a Zod schema`);const s=Yb(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function qu(e,t,n,r,o,s,i){const a=[],l=o.keySet,u=o.catchall._zod,f=u.def.type,c=u.optin,p=u.optout;let m=0;for(const g in t){if(i&&n.issues.length!==m){if(Ot(n,m))break;m=n.issues.length}if(l.has(g))continue;if(g==="__proto__"){f==="never"&&a.push(g);continue}if(f==="never"){a.push(g);continue}const v=u.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(y=>Mr(y,n,g,t,c,p))):Mr(v,n,g,t,c,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const cx=I("$ZodObject",(e,t)=>{Te.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n!=null&&n.get?n.get.raw:t.shape??{};if(r){const u=()=>{const f={...r};return Object.defineProperty(t,"shape",{value:f}),u.raw=f,f};u.raw=r,Object.defineProperty(t,"shape",{get:u})}const o=Bs(()=>Ju(t));fe(e,"propValues",u=>{const f=u.def.shape,c={};for(const p in f){const m=f[p]._zod;if(m.values){Object.prototype.hasOwnProperty.call(c,p)||tn(c,p,new Set);for(const g of m.values)c[p].add(g);m.optin!==void 0&&c[p].add(void 0)}}return c});const s=jr,i=t.catchall;let a;const l=_t.memoizer;l==null||l.attach(e),e._zod.parse=(u,f)=>{a??(a=o.value);const c=u.value;if(!s(c))return u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u;u.value=l?l.alloc(e,u,{},f):{};const p=[],m=a.shape,g=f==null?void 0:f.abortEarly;let v=u.issues.length;for(const y of a.allKeys){if(g&&u.issues.length!==v){if(Ot(u,v))break;v=u.issues.length}if(y==="__proto__")continue;const w=m[y],x=w._zod.optin,C=w._zod.optout,E=w._zod.run({value:c[y],issues:[]},f);E instanceof Promise?p.push(E.then(P=>Mr(P,u,y,c,x,C))):Mr(E,u,y,c,x,C)}return i?qu(p,c,u,f,o.value,e,g===!0):p.length?Promise.all(p).then(()=>u):u}}),lx=I("$ZodObjectJIT",(e,t)=>{cx.init(e,t);const n=e._zod.parse,r=Bs(()=>Ju(t)),o=_t.memoizer,s=m=>{var P,O;const g=r.value,v=g.symbolKeys,y=new _w(["payload","ctx"],{shape:m,inst:e,memo:o,syms:v}),w=N=>`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`,x=(N,z)=>`
|
|
167
|
-
let ${N}_ab = false;
|
|
168
|
-
for (let i = 0; i < ${N}.issues.length; i++) {
|
|
169
|
-
const iss = ${N}.issues[i];
|
|
170
|
-
iss.path = iss.path ? [${z}, ...iss.path] : [${z}];
|
|
171
|
-
payload.issues.push(iss);
|
|
172
|
-
if (iss.continue !== true) ${N}_ab = true;
|
|
173
|
-
}
|
|
174
|
-
if (${N}_ab && ctx && ctx.abortEarly) {
|
|
175
|
-
payload.value = newResult;
|
|
176
|
-
return payload;
|
|
177
|
-
}`;y.write("const input = payload.value;");const C=Object.create(null);let E=0;for(const N of g.allKeys)C[N]=`key_${E++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const N of g.allKeys){if(N==="__proto__")continue;const z=C[N],D=typeof N=="symbol"?`syms[${v.indexOf(N)}]`:Wb(N),G=`${D} in input`,H=m[N],L=(P=H==null?void 0:H._zod)==null?void 0:P.optin,U=L!==void 0,V=((O=H==null?void 0:H._zod)==null?void 0:O.optout)==="optional";if(y.write(`const ${z} = ${w(D)};`),U&&V){const Q=L==="optional"?`${z}_present`:`${z}.value !== undefined || ${z}_present`;y.write(`
|
|
178
|
-
const ${z}_present = ${G};
|
|
179
|
-
if (!${z}.issues.length || ${z}_present) {
|
|
180
|
-
if (${z}.issues.length) {${x(z,D)}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (${Q}) {
|
|
184
|
-
newResult[${D}] = ${z}.value;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
`)}else U?(y.write(`
|
|
189
|
-
if (${z}.issues.length) {${x(z,D)}
|
|
190
|
-
}
|
|
191
|
-
`),L==="defaulted"?y.write(`newResult[${D}] = ${z}.value;`):y.write(`
|
|
192
|
-
if (${z}.value !== undefined || ${G}) {
|
|
193
|
-
newResult[${D}] = ${z}.value;
|
|
194
|
-
}
|
|
195
|
-
`)):y.write(`
|
|
196
|
-
const ${z}_present = ${G};
|
|
197
|
-
if (${z}.issues.length) {${x(z,D)}
|
|
198
|
-
}
|
|
199
|
-
if (!${z}_present && !${z}.issues.length) {
|
|
200
|
-
payload.issues.push({
|
|
201
|
-
code: "invalid_type",
|
|
202
|
-
expected: "nonoptional",
|
|
203
|
-
input: undefined,
|
|
204
|
-
path: [${D}]
|
|
205
|
-
});
|
|
206
|
-
if (ctx && ctx.abortEarly) {
|
|
207
|
-
payload.value = newResult;
|
|
208
|
-
return payload;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
if (${z}_present) {
|
|
213
|
-
newResult[${D}] = ${z}.value;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
`)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()};let i;const a=jr,l=!_t.jitless,f=l&&Hb.value,c=t.catchall;let p;e._zod.parse=(m,g)=>{p??(p=r.value);const v=m.value;return a(v)?l&&f&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(i||(i=s(t.shape)),m=i(m,g),c?qu([],v,m,g,p,e,(g==null?void 0:g.abortEarly)===!0):m):n(m,g):(m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m)}});function ca(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=>!Ot(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>En(i,r,Gt())))}),t)}const ux=I("$ZodUnion",(e,t)=>{Te.init(e,t),fe(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),fe(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),fe(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),fe(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Ws(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const i=[];for(const a of t.options){const l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)i.push(l),s=!0;else{if(l.issues.length===0)return l;i.push(l)}}return s?Promise.all(i).then(a=>ca(a,r,e,o)):ca(i,r,e,o)}}),dx=I("$ZodIntersection",(e,t)=>{Te.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),i=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([l,u])=>la(n,l,u)):la(n,s,i)}});function ss(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(Bn(e)&&Bn(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const i=ss(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],i=ss(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function la(e,t,n){const r=new Map;let o;const s=new Map,i=(u,f)=>{var p,m;let c;if(u.code==="unrecognized_keys"&&!((p=u.path)!=null&&p.length))o??(o=u),c=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&((m=u.path)==null?void 0:m.length)===1){const g=String(u.path[0]);s.has(g)||s.set(g,u),c=[g]}else return!1;for(const g of c)r.has(g)||r.set(g,{}),r.get(g)[f]=!0;return!0};for(const u of t.issues)i(u,"l")||e.issues.push(u);for(const u of n.issues)i(u,"r")||e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){const u=o?a.filter(f=>o.keys.includes(f)):[];u.length&&e.issues.push({...o,keys:u});for(const f of a)!u.includes(f)&&s.has(f)&&e.issues.push(s.get(f))}const l=ss(t.value,n.value);if(!l.valid){if(Ot(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}const fx=I("$ZodEnum",(e,t)=>{Te.init(e,t);const n=ns(t.entries),r=new Set(n);e._zod.values=r,fe(e,"pattern",o=>{const s=ns(o.def.entries).filter(i=>Kb.has(typeof i));return new RegExp(s.length?`^(${s.map(i=>Xr(i.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),px=I("$ZodTransform",(e,t)=>{var n;Te.init(e,t),e._zod.optin="optional",(n=_t.memoizer)==null||n.guard(e),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Lu(e.constructor.name);const s=t.transform(r.value,r);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(r.value=a,r));if(s instanceof Promise)throw new Yt;return r.value=s,r}});function ua(e,t){return e.value=t.issues.length?void 0:t.value,e}const Xu=I("$ZodOptional",(e,t)=>{Te.init(e,t),fe(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",fe(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),fe(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Ws(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>ua(n,s)):ua(n,o)}return t.innerType._zod.run(n,r)}}),hx=I("$ZodExactOptional",(e,t)=>{Xu.init(e,t),fe(e,"values",n=>n.def.innerType._zod.values),fe(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),mx=I("$ZodNullable",(e,t)=>{Te.init(e,t),fe(e,"optin",n=>n.def.innerType._zod.optin),fe(e,"optout",n=>n.def.innerType._zod.optout),fe(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Ws(r.source)}|null)$`):void 0}),fe(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),gx=I("$ZodDefault",(e,t)=>{Te.init(e,t),e._zod.optin="defaulted",fe(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>da(s,t)):da(o,t)}});function da(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const vx=I("$ZodPrefault",(e,t)=>{Te.init(e,t),e._zod.optin="defaulted",fe(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),bx=I("$ZodNonOptional",(e,t)=>{Te.init(e,t),fe(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>fa(s,e)):fa(o,e)}});function fa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function pa(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>En(o,r,Gt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const yx=I("$ZodCatch",(e,t)=>{Te.init(e,t),fe(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),fe(e,"optout",n=>n.def.innerType._zod.optout),fe(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>pa(n,s,t,r)):pa(n,o,t,r)}}),wx=I("$ZodPipe",(e,t)=>{Te.init(e,t),fe(e,"values",n=>n.def.in._zod.values),fe(e,"optin",n=>n.def.in._zod.optin),fe(e,"optout",n=>n.def.out._zod.optout),fe(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(i=>pr(i,t.in,r)):pr(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>pr(s,t.out,r)):pr(o,t.out,r)}});function pr(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const xx=I("$ZodReadonly",(e,t)=>{Te.init(e,t),fe(e,"propValues",n=>n.def.innerType._zod.propValues),fe(e,"values",n=>n.def.innerType._zod.values),fe(e,"optin",n=>{var r,o;return(o=(r=n.def.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),fe(e,"optout",n=>{var r,o;return(o=(r=n.def.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(ha):ha(o)}});function ha(e){return e.memo||(e.value=Object.freeze(e.value)),e}const _x=I("$ZodCustom",(e,t)=>{mt.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=>ma(s,n,r,e));ma(o,n,r,e)}});function ma(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(Wn(o))}}class Sx extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const is="~memo",ga=[];function Qu(e){return e!==null&&typeof e=="object"}function Eo(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const ed=new WeakMap,jn=0,Rr=1,zn=2;function Or(e,t,n){const r=ed.get(e);if(r!==void 0)return r?zn:jn;if(t.has(e))return zn;t.add(e);let o=jn;const s=f=>{if(o!==zn&&(f!=null&&f._zod)){const c=Or(f,t);c>o&&(o=c)}},i=(f,c)=>{var m;let p=jn;for(const g of Reflect.ownKeys(f)){const v=Object.getOwnPropertyDescriptor(f,g);if(!v.enumerable)continue;const y=v.get?Rr:(m=v.value)!=null&&m._zod?Or(v.value,t):jn;y>p&&(p=y)}return p},a=f=>{f>o&&(o=f)},l=e._zod.def;switch(l.type){case"object":{const f=Du(l);a(f?i(f):Rr),s(l.catchall);break}case"array":s(l.element);break;case"tuple":for(const f of l.items)s(f);s(l.rest);break;case"record":case"map":s(l.keyType),s(l.valueType);break;case"set":s(l.valueType);break;case"union":for(const f of l.options)s(f);break;case"intersection":s(l.left),s(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(l.innerType);break;case"pipe":s(l.in),s(l.out);break;case"function":s(l.input),s(l.output);break;case"lazy":{const f=l._cachedInner??void 0;a(f?Or(f,t):Rr);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const f in l){const c=Object.getOwnPropertyDescriptor(l,f);if(!c||c.get)continue;const p=c.value;if(!(!p||typeof p!="object")){if(p._zod)s(p);else if(Array.isArray(p))for(const m of p)s(m)}}}return t.delete(e),Ex(e,o)}function Ex(e,t){return t!==Rr&&ed.set(e,t===zn),t}function Cx(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let hr;const mr=[],kx={alloc(e,t,n){const r=hr;if(!r)return n;hr=void 0;const o={value:n,issues:null};return r.set(t.value,o),mr.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&Rx(s,o.value))throw new Sx;return n(o,s)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r=!1,o,s;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,a=(l,u)=>{if(n===void 0){const w=Or(e,new Set);if(w===jn)return e._zod.parse=i,e._zod.run===a&&(e._zod.run=i),i(l,u);w===zn||r?n=!0:r=!0}const f=l.value;if(!Qu(f))return i(l,u);let c=u[is];c||(c={buckets:new WeakMap,backEdges:void 0},u[is]=c);let p;o===u?p=s:(p=Cx(c,e),o=u,s=p);const m=p.get(f);if(m)return l.value=m.value,m.issues?m.issues.length&&l.issues.push(...Eo(m.issues)):(l.memo=!0,c.backEdges??(c.backEdges=new WeakSet),c.backEdges.add(m.value)),l;hr=p;const g=mr.length,v=i(l,u);hr=void 0;const y=mr.length>g?mr.pop():void 0;return v instanceof Promise?v.then(w=>(y&&(y.issues=w.issues.length?Eo(w.issues):ga),w)):(y&&(y.issues=v.issues.length?Eo(v.issues):ga),v)};e._zod.parse=a,e._zod.run===i&&(e._zod.run=a)})}};function Px(){return kx}function Rx(e,t){var r;const n=(r=e[is])==null?void 0:r.backEdges;return n!==void 0&&Qu(t)&&n.has(t)}const Ox=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(s){return e[s]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,i){return s==="number"&&typeof i=="number"&&!Number.isFinite(i)?String(i):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const i=o(s.expected),a=iy(s.input),l=o(a,s.input);return`Invalid input: expected ${i}, received ${l}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${$u(s.values[0])}`:`Invalid option: expected one of ${Xi(s.values,"|")}`;case"too_big":{const i=s.exact?"exactly ":s.inclusive?"<=":"<",a=t(s.origin);return a?`Too big: expected ${s.origin??"value"} to have ${i}${s.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${i}${s.maximum.toString()}`}case"too_small":{const i=s.exact?"exactly ":s.inclusive?">=":">",a=t(s.origin);return a?`Too small: expected ${s.origin} to have ${i}${s.minimum.toString()} ${a.unit}`:`Too small: expected ${s.origin} to be ${i}${s.minimum.toString()}`}case"invalid_format":{const i=s;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Xi(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(a=>`'${a}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function Tx(){return{localeError:Ox()}}var va;class Ix{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 Ax(){return new Ix}(va=globalThis).__zod_globalRegistry??(va.__zod_globalRegistry=Ax());const Nn=globalThis.__zod_globalRegistry;function Dx(e){return e.checks&&(e.checks=[...e.checks]),e}function jx(e,t){return new e(Dx({type:"string",...J(t)}))}function Nx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...J(t)})}function Mx(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...J(t)})}function zx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...J(t)})}function $x(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J(t)})}function Fx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J(t)})}function Lx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J(t)})}function Vx(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...J(t)})}function Zx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...J(t)})}function Ux(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...J(t)})}function Bx(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...J(t)})}function Wx(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...J(t)})}function Gx(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...J(t)})}function Hx(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...J(t)})}function Kx(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...J(t)})}function Yx(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...J(t)})}function Jx(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...J(t)})}function qx(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J(t)})}function Xx(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J(t)})}function Qx(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...J(t)})}function e0(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...J(t)})}function t0(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...J(t)})}function n0(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...J(t)})}function r0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J(t)})}function o0(e,t){return new e({type:"string",format:"date",check:"string_format",...J(t)})}function s0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...J(t)})}function i0(e,t){return new e({type:"string",format:"duration",check:"string_format",...J(t)})}function a0(e,t){return new e({type:"boolean",...J(t)})}function c0(e){return new e({type:"unknown"})}function l0(e,t){return new e({type:"never",...J(t)})}function td(e,t){return new dw({check:"max_length",...J(t),maximum:e})}function zr(e,t){return new fw({check:"min_length",...J(t),minimum:e})}function nd(e,t){return new pw({check:"length_equals",...J(t),length:e})}function u0(e,t){return new hw({check:"string_format",format:"regex",...J(t),pattern:e})}function d0(e){return new mw({check:"string_format",format:"lowercase",...J(e)})}function f0(e){return new gw({check:"string_format",format:"uppercase",...J(e)})}function p0(e,t){return new vw({check:"string_format",format:"includes",...J(t),includes:e})}function h0(e,t){return new bw({check:"string_format",format:"starts_with",...J(t),prefix:e})}function m0(e,t){return new yw({check:"string_format",format:"ends_with",...J(t),suffix:e})}function g0(e,t){return new ww({check:"properties",shape:e,...J(t)})}function Cn(e){return new xw({check:"overwrite",tx:e})}function v0(e){return Cn(t=>t.normalize(e))}function b0(){return Cn(e=>e.trim())}function y0(){return Cn(e=>e.toLowerCase())}function w0(){return Cn(e=>e.toUpperCase())}function x0(){return Cn(e=>Gb(e))}function _0(e,t,n){return new e({type:"array",element:t,...J(n)})}function S0(e,t,n){return new e({type:"custom",check:"custom",fn:t,...J(n)})}function E0(e,t){const n=C0(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Wn(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(Wn(s))}},e(r.value,r)),t);return n}function C0(e,t){const n=new mt({check:"custom",...J(t)});return n._zod.check=e,n}function $n(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&tn(e,r,n[r]);return e}function rd(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)??Nn,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function Xn(e,t,n,r,o){const s=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(n,s),!0}function Fe(e,t,n={path:[],schemaPath:[]}){var f,c;var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=(c=(f=e._zod).toJSONSchema)==null?void 0:c.call(f);if(a)i.schema=a;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,p);else{const g=i.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,p)}const m=e._zod.parent;m&&(i.ref||(i.ref=m),Fe(m,t,p),t.seen.get(m).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&$n(i.schema,l),t.io==="input"&&Ue(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function ba(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function od(e,t){var i,a,l,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const f of e.seen.entries()){const c=(i=e.metadataRegistry.get(f[0]))==null?void 0:i.id;if(c){const p=r.get(c);if(p&&p!==f[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,f[0])}}const o=f=>{var v;const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(v=e.external.registry.get(f[0]))==null?void 0:v.id,w=e.external.uri??(C=>C);if(y)return{ref:w(y)};const x=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=x,{defId:x,ref:`${w("__shared")}#/${c}/${ba(x)}`}}const p="#",m=`${p}/${c}/`;if(f[1]===n&&!f[1].schema.id)return{ref:p};const g=f[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:m+ba(g)}},s=f=>{if(f[1].schema.$ref)return;const c=f[1],{ref:p,defId:m}=o(f);c.def={...c.schema},m&&(c.defId=m);const g=c.schema;for(const v in g)delete g[v];g.$ref=p};if(e.cycles==="throw")for(const f of e.seen.entries()){const c=f[1];if(c.cycle)throw new Error(`Cycle detected: #/${(a=c.cycle)==null?void 0:a.join("/")}/<root>
|
|
217
|
-
|
|
218
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const c=f[1];if(t===f[0]){s(f);continue}if(e.external){const m=(l=e.external.registry.get(f[0]))==null?void 0:l.id;if(t!==f[0]&&m){s(f);continue}}if((u=e.metadataRegistry.get(f[0]))==null?void 0:u.id){s(f);continue}if(c.cycle){s(f);continue}c.count>1&&e.reused==="ref"&&s(f)}e.external&&(e.sharedDefsExtractedFor=e.external)}function sd(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;sd(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const i of Array.isArray(s)?s:[s]){if(typeof i!="string")return;n.includes(i)||n.push(i)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const id=new Set(["type","properties","required","additionalProperties"]),ya=["oneOf","anyOf"];function wa(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function as(e){var s;const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const a in i)if(!id.has(a))return null;t.push(i)}const n={},r=new Set;for(const i of t){for(const a in i.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;const l=[];for(const f of t){const c=((s=f.properties)==null?void 0:s[a])??wa(f);c!=null&&(l.some(p=>JSON.stringify(p)===JSON.stringify(c))||l.push(c))}const u=l.length===1?l[0]:as(l)??{allOf:l};tn(n,a,u)}for(const a of i.required??[])r.add(a)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const a of t){const l=wa(a);l&&!i.some(u=>JSON.stringify(u)===JSON.stringify(l))&&i.push(l)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function k0(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of id)if(o in e)return;const n=t.filter(o=>ya.some(s=>Array.isArray(o[s])));let r=null;if(!n.length)r=as(t);else{const o=n[0],s=ya.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;const i=t.filter(l=>l!==o),a=o[s].map(l=>as([...i,l]));if(a.some(l=>!l))return;r={[s]:a}}r&&(delete e.allOf,$n(e,r))}function ad(e,t){var a,l,u,f;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const p=e.seen.get(c);if(p.ref===null)return;const m=p.def??p.schema,g={...m},v=p.ref;if(p.ref=null,v){r(v);const w=e.seen.get(v),x=w.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(x)):$n(m,x),$n(m,g),c._zod.parent===v)for(const E in m)E==="$ref"||E==="allOf"||E in g||delete m[E];if(x.$ref&&w.def)for(const E in m)E==="$ref"||E==="allOf"||E in w.def&&JSON.stringify(m[E])===JSON.stringify(w.def[E])&&delete m[E]}const y=c._zod.parent;if(y&&y!==v){r(y);const w=e.seen.get(y);if(w!=null&&w.schema.$ref&&(m.$ref=w.schema.$ref,w.def))for(const x in m)x==="$ref"||x==="allOf"||x in w.def&&JSON.stringify(m[x])===JSON.stringify(w.def[x])&&delete m[x]}e.override({zodSchema:c,jsonSchema:m,path:p.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const c of[...e.seen.entries()].reverse())r(c[0]);if(e.target!=="openapi-3.0")for(const c of e.seen.entries())sd(c[1].def??c[1].schema);for(const c of e.deferred)c();if(e.intersections.length){const c=new Map;for(const p of e.seen.values())for(const m of[p.schema,p.def]){const g=m==null?void 0:m.allOf;if(!Array.isArray(g))continue;const v=c.get(g);v?v.push(m):c.set(g,[m])}for(const p of e.intersections)for(const m of c.get(p)??[])k0(m)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const c=(l=e.external.registry.get(t))==null?void 0:l.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}$n(o,n.defId?n.schema:n.def??n.schema);const s=(u=e.metadataRegistry.get(t))==null?void 0:u.id;s!==void 0&&o.id===s&&delete o.id;const i=((f=e.external)==null?void 0:f.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const c of e.seen.entries()){const p=c[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,tn(i,p.defId,p.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:$r(t,"input",e.processors),output:$r(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"||r.type==="catch")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 P0=(e,t={})=>n=>{const r=rd({...n,processors:t});return Fe(e,r),od(r,e),ad(r,e)},$r=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=rd({...o??{},target:s,io:t,processors:n});return Fe(e,i),od(i,e),ad(i,e)},bn=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},yn=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},xa=(e,t)=>{bn(e,"minimum",t),yn(e,"maximum",t)},cd=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},ld=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},ud=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},dd=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},_a=(e,t)=>bn(e,"minimum",t.minimum),Sa=(e,t)=>yn(e,"maximum",t.maximum),Ea=e=>(t,n)=>{dd(t,n.format);const[r,o]=e[n.format];bn(t,"minimum",r),yn(t,"maximum",o)},Co={greater_than:(e,t)=>bn(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>yn(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>cd(e,t.value),number_format:Ea(Jb),bigint_format:Ea(qb),min_length:_a,max_length:Sa,length_equals:(e,t)=>xa(e,t.length),min_size:_a,max_size:Sa,size_equals:(e,t)=>xa(e,t.size),string_format:(e,t)=>{dd(e,t.format),t.pattern&&ld(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>ud(e,t.mime)};function Fn(e){var s;const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const i of r)(s=Co[i._zod.def.check])==null||s.call(Co,t,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&bn(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&bn(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&yn(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&yn(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&cd(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&ud(t,o.mime);for(const i of o.patterns??[])ld(t,i);return t}const R0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},O0=new Map([[Yu,Qy],[ni,ew]]),T0=e=>O0.get(e)??e,I0=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:i,format:a,patterns:l,contentEncoding:u,laxFormat:f}=Fn(e);if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=R0[a]??a,o.format===""&&delete o.format,(a==="time"||f)&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){const c=[...l].map(T0);c.length===1?o.pattern=c[0].source:c.length>1&&(o.allOf=[...c.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},A0=(e,t,n,r)=>{n.type="boolean"},D0=(e,t,n,r)=>{n.not={}},j0=(e,t,n,r)=>{},N0=(e,t,n,r)=>{const o=e._zod.def,s=ns(o.entries);if(s.length===0){n.not={};return}s.every(i=>typeof i=="number")&&(n.type="number"),s.every(i=>typeof i=="string")&&(n.type="string"),n.enum=s},M0=(e,t,n,r)=>{Xn(e,t,n,r,"Custom types cannot be represented in JSON Schema")},z0=(e,t,n,r)=>{Xn(e,t,n,r,"Transforms cannot be represented in JSON Schema")},$0=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:i,maximum:a}=Fn(e);typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Fe(s.element,t,{...r,path:[...r.path,"items"]})};function cs(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?cs(t.out):t.type==="catch"?cs(t.innerType):e._zod.optin}const F0=(e,t,n,r)=>{var u;const o=n,s=e._zod.def,i=s.shape;if(Object.getOwnPropertySymbols(i).length&&Xn(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in i)tn(o.properties,f,Fe(i[f],t,{...r,path:[...r.path,"properties",f]}));const l=[];for(const f of Object.keys(i)){const c=s.shape[f];(t.io==="input"?cs(c)===void 0:c._zod.optout===void 0)&&l.push(f)}l.length>0&&(o.required=l),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=Fe(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},L0=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,l)=>Fe(a,t,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=i:n.anyOf=i},V0=(e,t,n,r)=>{const o=e._zod.def,s=Fe(o.left,t,{...r,path:[...r.path,"allOf",0]}),i=Fe(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];n.allOf=l,t.intersections.push(l)},Z0=(e,t,n,r)=>{const o=e._zod.def,s=Fe(o.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},U0=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},ri=Symbol();function fd(e,t,n,r,o){let s=!1;const i=JSON.stringify(e,(a,l)=>typeof l!="bigint"?l:(s=!0,null));return s?(Xn(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),ri):JSON.parse(i)}const B0=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;const i=fd(o.defaultValue,e,t,n,r);i!==ri&&(n.default=i)},W0=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);if(s.ref=o.innerType,t.io!=="input")return;const i=fd(o.defaultValue,e,t,n,r);i!==ri&&(n._prefault=i)},G0=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{Xn(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},H0=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?s?o.out:o.in:o.out;Fe(i,t,r);const a=t.seen.get(e);a.ref=i},K0=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},pd=(e,t,n,r)=>{const o=e._zod.def;Fe(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Ca=new WeakSet([Object.prototype,Error.prototype]);function gr(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const Y0=(e,t)=>{wy.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);Ca.has(n)||(Ca.add(n),gr(n,"format",r=>o=>Sy(r,o)),gr(n,"flatten",r=>o=>_y(r,o)),gr(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,rs,2)}),gr(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,rs,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},it=I("ZodError",Y0,void 0,{Parent:Error}),J0=Js(it),q0=qs(it),X0=Xs(it),Q0=Qs(it),e_=Oy(it),t_=Ty(it),n_=Iy(it),r_=Ay(it),o_=Dy(it),s_=jy(it),i_=Ny(it),a_=My(it);function c_(){_t.localeError||Gt(Tx())}function oi(){_t.memoizer||Gt({memoizer:Px()})}const Ie=I("ZodType",(e,t)=>(c_(),Te.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Xe(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Wt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(sS(e,t))},superRefine(e,t){return this.check(iS(e,t))},overwrite(e){return this.check(Cn(e))},optional(){return Ra(this)},exactOptional(){return H_(this)},nullable(){return Oa(this)},nullish(){return Ra(Oa(this))},nonoptional(e){return Q_(this,e)},array(){return z_(this)},or(e){return V_([this,e])},and(e){return U_(this,e)},transform(e){return Ta(this,G_(e))},default(e){return J_(this,e)},prefault(e){return X_(this,e)},catch(e){return tS(this,e)},pipe(e){return Ta(this,e)},readonly(){return oS(this)},describe(e){const t=this.clone();return Nn.add(t,{description:e}),t},meta(...e){if(e.length===0)return Nn.get(this);const t=this.clone();return Nn.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ys(this,"~standard",{...Bu(this),jsonSchema:{input:$r(this,"input"),output:$r(this,"output")}})},set"~standard"(e){Bt(this,"~standard",e)},parse:function e(t,n){return J0(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await q0(this,t,n,{callee:e})},safeParse(e,t){return X0(this,e,t)},async safeParseAsync(e,t){return Q0(this,e,t)},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){Bt(this,"spa",e)},validate(e,t){return ky(this,e,t)},validateAsync(e,t){return Ry(this,e,t)},encode:function e(t,n){return e_(this,t,n,{callee:e})},decode:function e(t,n){return t_(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await n_(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await r_(this,t,n,{callee:e})},safeEncode(e,t){return o_(this,e,t)},safeDecode(e,t){return s_(this,e,t)},async safeEncodeAsync(e,t){return i_(this,e,t)},async safeDecodeAsync(e,t){return a_(this,e,t)},toJSONSchema(e){return P0(this,{})(e)},get description(){var e;return(e=Nn.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),hd=I("_ZodString",(e,t)=>{ti.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I0(e,n,r)},cy({format:e=>Fn(e).format??null,minLength:e=>Fn(e).minimum??null,maxLength:e=>Fn(e).maximum??null},{regex(...e){return this.check(u0(...e))},includes(...e){return this.check(p0(...e))},startsWith(...e){return this.check(h0(...e))},endsWith(...e){return this.check(m0(...e))},min(...e){return this.check(zr(...e))},max(...e){return this.check(td(...e))},length(...e){return this.check(nd(...e))},nonempty(...e){return this.check(zr(1,...e))},lowercase(e){return this.check(d0(e))},uppercase(e){return this.check(f0(e))},trim(){return this.check(b0())},normalize(...e){return this.check(v0(...e))},toLowerCase(){return this.check(y0())},toUpperCase(){return this.check(w0())},slugify(){return this.check(x0())}})),l_=I("ZodString",(e,t)=>{ti.init(e,t),hd.init(e,t)},{email(e){return this.check(Nx(h_,e))},url(e){return this.check(Vx(g_,e))},jwt(e){return this.check(n0(I_,e))},emoji(e){return this.check(Zx(v_,e))},guid(e){return this.check(Mx(m_,e))},uuid(e){return this.check(zx(vr,e))},uuidv4(e){return this.check($x(vr,e))},uuidv6(e){return this.check(Fx(vr,e))},uuidv7(e){return this.check(Lx(vr,e))},nanoid(e){return this.check(Ux(b_,e))},cuid(e){return this.check(Bx(y_,e))},cuid2(e){return this.check(Wx(w_,e))},ulid(e){return this.check(Gx(x_,e))},base64(e){return this.check(Qx(R_,e))},base64url(e){return this.check(e0(O_,e))},xid(e){return this.check(Hx(__,e))},ksuid(e){return this.check(Kx(S_,e))},ipv4(e){return this.check(Yx(E_,e))},ipv6(e){return this.check(Jx(C_,e))},cidrv4(e){return this.check(qx(k_,e))},cidrv6(e){return this.check(Xx(P_,e))},e164(e){return this.check(t0(T_,e))},datetime(e){return this.check(r0(u_,e))},date(e){return this.check(o0(d_,e))},time(e){return this.check(s0(f_,e))},duration(e){return this.check(i0(p_,e))}});function ka(e){return jx(l_,e)}const _e=I("ZodStringFormat",(e,t)=>{xe.init(e,t),hd.init(e,t)}),u_=I("ZodISODateTime",(e,t)=>{Vw.init(e,t),_e.init(e,t)}),d_=I("ZodISODate",(e,t)=>{Zw.init(e,t),_e.init(e,t)}),f_=I("ZodISOTime",(e,t)=>{Uw.init(e,t),_e.init(e,t)}),p_=I("ZodISODuration",(e,t)=>{Bw.init(e,t),_e.init(e,t)}),h_=I("ZodEmail",(e,t)=>{Pw.init(e,t),_e.init(e,t)}),m_=I("ZodGUID",(e,t)=>{Cw.init(e,t),_e.init(e,t)}),vr=I("ZodUUID",(e,t)=>{kw.init(e,t),_e.init(e,t)}),g_=I("ZodURL",(e,t)=>{Dw.init(e,t),_e.init(e,t)}),v_=I("ZodEmoji",(e,t)=>{jw.init(e,t),_e.init(e,t)}),b_=I("ZodNanoID",(e,t)=>{Nw.init(e,t),_e.init(e,t)}),y_=I("ZodCUID",(e,t)=>{Mw.init(e,t),_e.init(e,t)}),w_=I("ZodCUID2",(e,t)=>{zw.init(e,t),_e.init(e,t)}),x_=I("ZodULID",(e,t)=>{$w.init(e,t),_e.init(e,t)}),__=I("ZodXID",(e,t)=>{Fw.init(e,t),_e.init(e,t)}),S_=I("ZodKSUID",(e,t)=>{Lw.init(e,t),_e.init(e,t)}),E_=I("ZodIPv4",(e,t)=>{Ww.init(e,t),_e.init(e,t)}),C_=I("ZodIPv6",(e,t)=>{Hw.init(e,t),_e.init(e,t)}),k_=I("ZodCIDRv4",(e,t)=>{Kw.init(e,t),_e.init(e,t)}),P_=I("ZodCIDRv6",(e,t)=>{Jw.init(e,t),_e.init(e,t)}),R_=I("ZodBase64",(e,t)=>{qw.init(e,t),_e.init(e,t)}),O_=I("ZodBase64URL",(e,t)=>{Qw.init(e,t),_e.init(e,t)}),T_=I("ZodE164",(e,t)=>{ex.init(e,t),_e.init(e,t)}),I_=I("ZodJWT",(e,t)=>{nx.init(e,t),_e.init(e,t)}),A_=I("ZodBoolean",(e,t)=>{rx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A0(e,n,r)});function LS(e){return a0(A_,e)}const D_=I("ZodUnknown",(e,t)=>{ox.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>j0()});function Pa(){return c0(D_)}const j_=I("ZodNever",(e,t)=>{sx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D0(e,n,r)});function N_(e){return l0(j_,e)}const M_=I("ZodArray",(e,t)=>{oi(),ix.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$0(e,n,r,o),e.element=t.element},{min(e,t){return this.check(zr(e,t))},nonempty(e){return this.check(zr(1,e))},max(e,t){return this.check(td(e,t))},length(e,t){return this.check(nd(e,t))},unwrap(){return this.element}});function z_(e,t){return _0(M_,e,t)}const $_=I("ZodObject",(e,t)=>{oi(),lx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F0(e,n,r,o),fy(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return B_(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Xe(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Xe(this._zod.def,{catchall:Pa()}))},loose(){return this.clone(Xe(this._zod.def,{catchall:Pa()}))},strict(){return this.clone(Xe(this._zod.def,{catchall:N_()}))},strip(){return this.clone(Xe(this._zod.def,{catchall:void 0}))},extend(e){return ey(this,e)},safeExtend(e){return ty(this,e)},merge(e){return ny(this,e)},pick(e){return Xb(this,e)},omit(e){return Qb(this,e)},partial(...e){return Qi(md,this,e[0])},exactPartial(...e){return Qi(gd,this,e[0],"exactPartial")},required(...e){return ry(vd,this,e[0])}});function F_(e,t){const n={type:"object",shape:e??{},...J(t)};return new $_(n)}const L_=I("ZodUnion",(e,t)=>{ux.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>L0(e,n,r,o),e.options=t.options});function V_(e,t){return new L_({type:"union",options:e,...J(t)})}const Z_=I("ZodIntersection",(e,t)=>{dx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>V0(e,n,r,o)});function U_(e,t){return new Z_({type:"intersection",left:e,right:t})}const ls=I("ZodEnum",(e,t)=>{fx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(r,o,s)=>N0(e,r,o),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(n.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ls({...t,checks:[],...J(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const i of r)if(n.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new ls({...t,checks:[],...J(o),entries:s})}});function B_(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ls({type:"enum",entries:n,...J(t)})}const W_=I("ZodTransform",(e,t)=>{oi(),px.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>z0(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Lu(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Wn(s,n.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Wn(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function G_(e){return new W_({type:"transform",transform:e})}const md=I("ZodOptional",(e,t)=>{Xu.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ra(e){return new md({type:"optional",innerType:e})}const gd=I("ZodExactOptional",(e,t)=>{hx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pd(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function H_(e){return new gd({type:"optional",innerType:e})}const K_=I("ZodNullable",(e,t)=>{mx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Z0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Oa(e){return new K_({type:"nullable",innerType:e})}const Y_=I("ZodDefault",(e,t)=>{gx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>B0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function J_(e,t){return new Y_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():zu(t)}})}const q_=I("ZodPrefault",(e,t)=>{vx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>W0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function X_(e,t){return new q_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():zu(t)}})}const vd=I("ZodNonOptional",(e,t)=>{bx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>U0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Q_(e,t){return new vd({type:"nonoptional",innerType:e,...J(t)})}const eS=I("ZodCatch",(e,t)=>{yx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>G0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tS(e,t){return new eS({type:"catch",innerType:e,catchValue:typeof t=="function"?t:hy(t)})}const nS=I("ZodPipe",(e,t)=>{wx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>H0(e,n,r,o),e.in=t.in,e.out=t.out});function Ta(e,t){return new nS({type:"pipe",in:e,out:t})}const rS=I("ZodReadonly",(e,t)=>{xx.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>K0(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function oS(e){return new rS({type:"readonly",innerType:e})}const bd=I("ZodCustom",(e,t)=>{_x.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M0(e,n,r,o)});function sS(e,t={}){return S0(bd,e,t)}function iS(e,t){return E0(e,t)}const aS=I("ZodInstanceOf",(e,t)=>{bd.init(e,t)},{properties(e,t){return this.check(g0(e,t))}});function VS(e,t={}){const n=new aS({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...J(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 cS=Object.defineProperty,lS=(e,t)=>cS(e,"name",{value:t,configurable:!0}),uS=d.forwardRef(lS(function(t,n){return h.jsx(ke.label,{...t,ref:n,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),yd=uS;const dS=Gn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),us=d.forwardRef(({className:e,...t},n)=>h.jsx(yd,{ref:n,className:Y(dS(),e),...t}));us.displayName=yd.displayName;const fS=Gn("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}}),wd=d.forwardRef(({className:e,level:t,...n},r)=>h.jsx("div",{ref:r,className:Y(fS({level:t}),e),...n}));wd.displayName="Card";const xd=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Y("flex flex-col space-y-1.5 p-6",e),...t}));xd.displayName="CardHeader";const _d=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Y("text-2xl font-semibold leading-none tracking-tight",e),...t}));_d.displayName="CardTitle";const Sd=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));Sd.displayName="CardDescription";const Ed=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Y("p-6 pt-0",e),...t}));Ed.displayName="CardContent";const pS=d.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Y("flex items-center p-6 pt-0",e),...t}));pS.displayName="CardFooter";const hS=F_({email:ka().email(),password:ka().min(8)});function mS(){const e=ds(),{resolvedTheme:t}=Fr(),n=t==="dark"?"/logo-dark.svg":"/logo.svg";d.useEffect(()=>{fetch("/api/v1/auth/status").then(u=>u.json()).then(({initialized:u})=>{u||e("/setup",{replace:!0})}).catch(()=>{})},[e]);const{register:r,handleSubmit:o,setError:s,formState:{errors:i,isSubmitting:a}}=zb({resolver:Vb(hS),mode:"onBlur"});async function l(u){try{const{status:f}=await gu.post("/api/v1/auth/login",{email:u.email,password:u.password});if(f!==200){s("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{s("root",{message:"Network error. Please try again."})}}return h.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:h.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),h.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),h.jsxs(wd,{level:4,className:"w-full",children:[h.jsxs(xd,{className:"text-center",children:[h.jsx(_d,{className:"text-2xl tracking-display-md",children:"Welcome back"}),h.jsx(Sd,{children:"Sign in to your team workspace"})]}),h.jsx(Ed,{children:h.jsxs("form",{onSubmit:o(l),className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(us,{htmlFor:"email",children:"Email"}),h.jsx(Tr,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),i.email&&h.jsx("p",{className:"text-sm text-destructive",children:i.email.message})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(us,{htmlFor:"password",children:"Password"}),h.jsx(Tr,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),i.password&&h.jsx("p",{className:"text-sm text-destructive",children:i.password.message})]}),i.root&&h.jsx("p",{className:"text-sm text-destructive",children:i.root.message}),h.jsx(Lr,{type:"submit",size:"lg",disabled:a,className:"w-full mt-1",children:a?"Signing in…":"Sign in"})]})})]})]})})}const gS=d.lazy(()=>St(()=>import("./Setup-Fc_0RW0a.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Setup}))),vS=d.lazy(()=>St(()=>import("./Invite-Bhiam8En.js"),__vite__mapDeps([3,1,2,4])).then(e=>({default:e.Invite}))),bS=d.lazy(()=>St(()=>import("./ResetPassword-EUm12ojo.js"),__vite__mapDeps([5,1,2])).then(e=>({default:e.ResetPassword}))),yS=d.lazy(()=>St(()=>import("./AppCenter-OTDuqwSf.js"),__vite__mapDeps([6,1,7,8,9,10,11,2])).then(e=>({default:e.AppCenter}))),wS=d.lazy(()=>St(()=>import("./QASession-2crubOLY.js"),__vite__mapDeps([12,1,7,13,2,11,8,14,10])).then(e=>({default:e.QASession}))),xS=d.lazy(()=>St(()=>import("./MacResources-DObzVJxQ.js"),__vite__mapDeps([15,1,13,16,2])).then(e=>({default:e.MacResources}))),_S=d.lazy(()=>St(()=>import("./Default-D9GLpWlN.js"),__vite__mapDeps([17,1,10,11,4,2])).then(e=>({default:e.DefaultSettings}))),SS=d.lazy(()=>St(()=>import("./Team-Ac5aOGgx.js"),__vite__mapDeps([18,1,8,11,19,14,2])).then(e=>({default:e.TeamSettings}))),ES=d.lazy(()=>St(()=>import("./Tokens-pEnCy-7l.js"),__vite__mapDeps([20,1,10,11,8,19,14,9,2])).then(e=>({default:e.TokenSettings}))),CS=d.lazy(()=>St(()=>import("./NotFound-Dz_k_Mzf.js"),__vite__mapDeps([21,1])).then(e=>({default:e.NotFound}))),kS=h.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),br=e=>h.jsx(d.Suspense,{fallback:kS,children:e});function PS(){const{resolvedTheme:e}=Fr();return h.jsxs(zd,{children:[h.jsxs($d,{children:[h.jsx(Ye,{path:"/login",element:h.jsx(mS,{})}),h.jsx(Ye,{path:"/setup",element:br(h.jsx(gS,{}))}),h.jsx(Ye,{path:"/invite",element:br(h.jsx(vS,{}))}),h.jsx(Ye,{path:"/reset-password",element:br(h.jsx(bS,{}))}),h.jsxs(Ye,{element:h.jsx(fb,{}),children:[h.jsx(Ye,{index:!0,element:h.jsx(Da,{to:"/app-center",replace:!0})}),h.jsx(Ye,{path:"/app-center",element:h.jsx(yS,{})}),h.jsx(Ye,{path:"/app-center/build",element:h.jsx(wS,{})}),h.jsx(Ye,{path:"/mac-resources",element:h.jsx(xS,{})}),h.jsx(Ye,{path:"/settings/default",element:h.jsx(_S,{})}),h.jsx(Ye,{path:"/settings/team",element:h.jsx(SS,{})}),h.jsx(Ye,{path:"/settings/tokens",element:h.jsx(ES,{})})]}),h.jsx(Ye,{path:"*",element:br(h.jsx(CS,{}))})]}),h.jsx(Cf,{position:"bottom-right",richColors:!0,theme:e})]})}Nd.createRoot(document.getElementById("root")).render(h.jsx(d.StrictMode,{children:h.jsx(Zd,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:h.jsx(PS,{})})}));export{Dt as $,ul as A,Lr as B,wd as C,Qh as D,ll as E,Ec as F,xn as G,xl as H,Tr as I,Hm as J,Ym as K,us as L,Yf as M,nb as N,LS as O,ys as P,jp as Q,xs as R,Ir as S,Km as T,rb as U,km as V,Y as W,ep as X,X as Y,ks as Z,VS as _,Ed as a,AS as a0,Ke as a1,Br as a2,Fl as a3,Tt as a4,Gn as a5,Uc as a6,F_ as a7,ka as a8,IS as a9,Vb as aa,vu as ab,ub as ac,xt as ad,we as ae,Kn as af,Rs as ag,Vr as ah,zb as ai,Zt as aj,He as ak,rl as al,bb as am,Fr as an,Sd as b,xd as c,_d as d,Uf as e,Bf as f,dl as g,FS as h,um as i,Kc as j,qc as k,Hc as l,nm as m,Jc as n,DS as o,gs as p,Hv as q,hu as r,$S as s,Xv as t,Kv as u,Ag as v,Hf as w,jt as x,ke as y,Ig as z};
|