@debugkit/dashboard 0.9.0 → 0.10.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/client/assets/_authed-3se5Egqg.js +1 -0
- package/dist/client/assets/_authed-BfFWbTOO.js +1 -0
- package/dist/client/assets/app-code-BKWbvUMR.js +1 -0
- package/dist/client/assets/closed-issues-Cl-8l4oR.js +1 -0
- package/dist/client/assets/{copy-button-BJkvWYRY.js → copy-button-BwRd5q7l.js} +1 -1
- package/dist/client/assets/customers-Cf-R8BOg.js +1 -0
- package/dist/client/assets/empty-state-njgr1sWu.js +7 -0
- package/dist/client/assets/endpoints-BMqAUNyE.js +1 -0
- package/dist/client/assets/events._eventId-CVRZJ-bU.js +2 -0
- package/dist/client/assets/exchange-view-DVwSLcXF.js +2 -0
- package/dist/client/assets/index-DEnCDILF.js +10 -0
- package/dist/client/assets/{invite._token-DiDJMnQu.js → invite._token-CKAfd5iB.js} +1 -1
- package/dist/client/assets/issues._fingerprint-Cm72LNM_.js +55 -0
- package/dist/client/assets/login-BTxOhEbN.js +1 -0
- package/dist/client/assets/request-panel-DmtFRF8Z.js +1 -0
- package/dist/client/assets/services._service-CU1a45f3.js +1 -0
- package/dist/client/assets/{sessions._sessionId-B0NxM46y.js → sessions._sessionId-LRo3QNQP.js} +1 -1
- package/dist/client/assets/settings-Ctzvl2LL.js +1 -0
- package/dist/client/assets/src-BiKxgjA_.js +3 -0
- package/dist/client/assets/styles-Tcq0pvWj.css +2 -0
- package/dist/client/assets/{team-BRuVQ2bU.js → team-xlrjhEGp.js} +1 -1
- package/dist/client/assets/{timeline-BIGo9MCA.js → timeline-WXE49N62.js} +1 -1
- package/dist/client/assets/ui-DRjjeSWy.js +1 -0
- package/dist/client/assets/{version-banner-VFvyqbPh.js → version-banner-BYe4PVzv.js} +1 -1
- package/dist/server/assets/_authed-Bn-IktVS.js +120 -0
- package/dist/server/assets/_authed-RXh7GpoE.js +252 -0
- package/dist/server/assets/_tanstack-start-manifest_v-C4dQ3MxD.js +122 -0
- package/dist/server/assets/app-code-BQL_FcSx.js +212 -0
- package/dist/server/assets/app-name-BcbY1BZN.js +11 -0
- package/dist/server/assets/closed-issues-o9U80FXv.js +45 -0
- package/dist/server/assets/config-Bp8m0B8q.js +57 -0
- package/dist/server/assets/{customers-827fC5I3.js → customers-CD84Bz4P.js} +11 -6
- package/dist/server/assets/{demo-DDNiXCgj.js → demo-D-o8m75S.js} +222 -6
- package/dist/server/assets/{dynamodb-Cd4blXkh.js → dynamodb-CcH0cp7R.js} +2 -2
- package/dist/server/assets/empty-state-wz34oAi8.js +163 -0
- package/dist/server/assets/endpoints-8N389Poe.js +248 -0
- package/dist/server/assets/{endpoints-_T0NSOyA.js → endpoints-C0Cxc_-x.js} +38 -36
- package/dist/server/assets/{events._eventId-Dcsu4oVO.js → events._eventId-BOHkNO5W.js} +90 -351
- package/dist/server/assets/exchange-view-DzoSBt_R.js +112 -0
- package/dist/server/assets/{firestore-c8Sz2Q4O.js → firestore-DyvYMiz3.js} +2 -2
- package/dist/server/assets/{fns-BiUOnY1_.js → fns-BcVGbSID.js} +20 -7
- package/dist/server/assets/fns-DE03YExD.js +831 -0
- package/dist/server/assets/{invite._token-7DjEeeaD.js → invite._token-DhlACkIe.js} +3 -3
- package/dist/server/assets/{issues._fingerprint-vc9r3jgg.js → issues._fingerprint-BBd-_Nn5.js} +400 -28
- package/dist/server/assets/{login-CwKAx9Bj.js → login-CbfdHJvg.js} +3 -3
- package/dist/server/assets/{memory-Bv4C8uyK.js → memory-CZBUh1Zc.js} +75 -3
- package/dist/server/assets/{errors-Po4Tt5zd.js → queries-wha4cZbw.js} +1394 -128
- package/dist/server/assets/request-panel-DpCSwl2q.js +162 -0
- package/dist/server/assets/{router-Dk3XHn7B.js → router-BXkzR89j.js} +195 -91
- package/dist/server/assets/services._service-DWjFFGON.js +309 -0
- package/dist/server/assets/{sessions._sessionId-BvXxK9qF.js → sessions._sessionId-DDspiPTe.js} +2 -2
- package/dist/server/assets/{settings-B9NLQjl1.js → settings-DCLIaZ_p.js} +146 -25
- package/dist/server/assets/{src-oWPSAvXv.js → src-B2GKPQyN.js} +1 -1
- package/dist/server/assets/{team-Bsm2wFG0.js → team-jd_TmWP4.js} +3 -3
- package/dist/server/assets/ui-C3pl0edn.js +302 -0
- package/dist/server/assets/{version-banner-nf-yZurq.js → version-banner-BX34ijG5.js} +1 -1
- package/dist/server/assets/{versions-BOlL8jam.js → versions-YI_zK1ql.js} +3 -3
- package/dist/server/assets/warm-C3GbXP1_.js +16 -0
- package/dist/server/server.js +37 -29
- package/package.json +4 -4
- package/dist/client/assets/_authed-C29P68T-.js +0 -1
- package/dist/client/assets/_authed-D-dYbHoP.js +0 -7
- package/dist/client/assets/charts--S1o8iId.js +0 -55
- package/dist/client/assets/customers-Cwx5qEO1.js +0 -1
- package/dist/client/assets/endpoints-zz1TotR2.js +0 -1
- package/dist/client/assets/events._eventId-Bx6TfUjv.js +0 -3
- package/dist/client/assets/index-COHr_cc3.js +0 -10
- package/dist/client/assets/issues._fingerprint-Cv522h2j.js +0 -1
- package/dist/client/assets/login-CKkpc0t5.js +0 -1
- package/dist/client/assets/settings-CIlF10MI.js +0 -1
- package/dist/client/assets/src-BKSiJUs3.js +0 -3
- package/dist/client/assets/styles-GAsMUS4-.css +0 -2
- package/dist/client/assets/ui-CaEZB1j2.js +0 -1
- package/dist/server/assets/_authed-BJWDiF9i.js +0 -92
- package/dist/server/assets/_authed-X9u_5JUy.js +0 -902
- package/dist/server/assets/_tanstack-start-manifest_v-C6vaeBdY.js +0 -90
- package/dist/server/assets/charts-DzTVqJ8z.js +0 -238
- package/dist/server/assets/fns-CVbk8Gf9.js +0 -1310
- package/dist/server/assets/ui-SAkSlP7f.js +0 -193
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,P as t,V as n,st as r,ut as i,z as a}from"./src-BKSiJUs3.js";import{n as o,r as s}from"./charts--S1o8iId.js";import{d as c,n as l,u}from"./index-COHr_cc3.js";import{c as d,l as f,n as p,o as m,r as h,s as g,t as _}from"./ui-CaEZB1j2.js";import{t as v}from"./copy-button-BJkvWYRY.js";var y=i(r()),b=n();function x(){let e=l.useLoaderData(),{issue:n,sample:r}=e,i=r?.event.type===`error`?r.event:null,a=i?.error.frames??[],y=l.useNavigate(),x=l.useSearch(),{range:w}=e;return(0,b.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,b.jsx)(t,{to:`/`,search:{app:e.app,range:x.range,from:x.from,to:x.to},className:`text-sm text-muted hover:text-ink`,children:`← Overview`}),(0,b.jsx)(u,{value:w,today:new Date().toISOString().slice(0,10),onChange:e=>y({search:t=>({...t,...e})})},`${w.preset}${w.from}${w.to}`)]}),(0,b.jsx)(c,{rangeFrom:w.from,retention:e.retention}),(0,b.jsxs)(`div`,{children:[(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,b.jsx)(m,{severity:n.severity}),n.flow&&(0,b.jsx)(`span`,{className:`rounded bg-panel-2 px-1.5 py-0.5 font-mono`,children:n.flow}),(0,b.jsxs)(`span`,{children:[`First seen `,f(n.firstSeen),` · last seen `,f(n.lastSeen)]})]}),(0,b.jsx)(`h1`,{className:`mt-2 break-words text-xl font-semibold tracking-tight sm:text-2xl`,children:n.title}),n.culprit&&(0,b.jsx)(`p`,{className:`mt-1 font-mono text-sm text-muted`,children:n.culprit}),(0,b.jsx)(h,{issue:n}),n.incidentTitle&&(0,b.jsxs)(`p`,{className:`mt-2 text-sm text-muted`,children:[`Part of an incident:`,` `,(0,b.jsx)(t,{to:`/`,search:{app:e.app},className:`font-medium text-ink hover:text-accent`,children:n.incidentTitle})]})]}),(0,b.jsx)(S,{app:e.app,issue:n,canChange:e.canChangeStatus,links:e.links}),(0,b.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,b.jsx)(d,{label:`Occurrences (24h)`,value:n.count24h,tone:n.severity}),(0,b.jsx)(d,{label:`Occurrences (${w.label})`,value:n.countRange.toLocaleString(),hint:`${n.countTotal.toLocaleString()} since first seen`}),(0,b.jsx)(d,{label:`Users affected`,value:e.affectedUsers.toLocaleString(),hint:`since ${w.preset===`24h`?`yesterday`:w.from}`}),(0,b.jsx)(d,{label:`Top app version`,value:e.breakdowns.appVersion[0]?.key??`—`,hint:e.breakdowns.appVersion[0]?`${Math.round(e.breakdowns.appVersion[0].share*100)}% of occurrences`:void 0})]}),n.explanation&&(0,b.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,b.jsx)(_,{title:`What happened`,subtitle:`In plain words, for support.`,right:e.ticketMarkdown?(0,b.jsx)(v,{text:e.ticketMarkdown,label:`Copy for a ticket`}):void 0,children:(0,b.jsx)(`p`,{className:`text-sm leading-relaxed`,children:n.explanation.summary})}),(0,b.jsxs)(_,{title:`For developers`,subtitle:C(n.explanation.technical.headline),children:[(0,b.jsx)(`ul`,{className:`list-disc space-y-1 pl-5 text-sm`,children:n.explanation.technical.evidence.map((e,t)=>(0,b.jsx)(`li`,{className:`break-words`,children:C(e)},t))}),n.explanation.technical.where&&(0,b.jsxs)(`p`,{className:`mt-3 text-sm`,children:[(0,b.jsx)(`span`,{className:`font-medium`,children:`Where: `}),(0,b.jsx)(`span`,{className:`break-words font-mono text-xs`,children:C(n.explanation.technical.where)})]}),(0,b.jsxs)(`p`,{className:`mt-3 text-sm`,children:[(0,b.jsx)(`span`,{className:`font-medium`,children:`Suggested fix: `}),C(n.explanation.technical.fix)]})]})]}),e.hints.length>0&&(0,b.jsx)(_,{title:n.explanation?`Also worth checking`:`What to look at`,subtitle:`Generated from the error, its breadcrumbs and where it happens.`,children:(0,b.jsx)(`ol`,{className:`space-y-3`,children:e.hints.map((e,t)=>(0,b.jsxs)(`li`,{className:`flex gap-3`,children:[(0,b.jsx)(`span`,{className:`mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-accent-soft text-[11px] font-semibold text-accent`,children:t+1}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`text-sm font-medium`,children:e.title}),(0,b.jsx)(`div`,{className:`text-sm text-muted`,children:e.detail})]})]},t))})}),(0,b.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-3`,children:[(0,b.jsxs)(`div`,{className:`lg:col-span-2`,children:[w.preset!==`24h`&&(0,b.jsx)(`div`,{className:`mb-5`,children:(0,b.jsx)(_,{title:`Occurrences per day`,subtitle:`${w.label} (UTC)`,children:(0,b.jsx)(s,{data:e.daily.map(e=>({day:e.day,errors:e.count}))})})}),(0,b.jsxs)(_,{title:`Occurrences per hour`,subtitle:`Last 48 hours`,children:[(0,b.jsx)(o,{data:e.hourly}),(0,b.jsx)(p,{columns:[`Hour (UTC)`,`Count`],rows:e.hourly.map(e=>[e.hour,e.count])})]})]}),(0,b.jsx)(_,{title:`Where it happens`,subtitle:`Share of recent occurrences`,children:(0,b.jsx)(`div`,{className:`space-y-4`,children:[`os`,`appVersion`,`deviceModel`,`network`].map(t=>(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted`,children:{os:`OS`,appVersion:`App version`,deviceModel:`Device`,network:`Network`}[t]}),(0,b.jsx)(g,{rows:e.breakdowns[t].map(e=>({key:e.key,value:e.count}))})]},t))})})]}),(0,b.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,b.jsx)(_,{title:`Stack trace`,subtitle:`Most recent occurrence. In-app frames highlighted.`,children:a.length?(0,b.jsx)(`ol`,{className:`space-y-1 font-mono text-xs`,children:a.map((e,t)=>(0,b.jsxs)(`li`,{className:`rounded px-2 py-1 ${e.inApp?`bg-accent-soft text-ink`:`text-muted`}`,children:[(0,b.jsx)(`span`,{className:`font-semibold`,children:e.fn??`<anonymous>`}),` `,(0,b.jsxs)(`span`,{className:`break-all`,children:[e.file,`:`,e.line,`:`,e.col]})]},t))}):(0,b.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap text-xs text-muted`,children:i?.error.stack??`No stack trace captured.`})}),(0,b.jsx)(_,{title:`Breadcrumbs`,subtitle:`What the user did right before the error`,children:i?.breadcrumbs?.length?(0,b.jsxs)(`ol`,{className:`relative space-y-3 border-l border-line pl-4`,children:[i.breadcrumbs.map((e,t)=>(0,b.jsxs)(`li`,{className:`text-sm`,children:[(0,b.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full ${e.level===`error`?`bg-sev-critical`:`bg-line`}`}),(0,b.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted`,children:e.category}),(0,b.jsx)(`span`,{className:`break-words`,children:e.message})]},t)),(0,b.jsxs)(`li`,{className:`text-sm font-medium text-sev-critical`,children:[(0,b.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full bg-sev-critical`}),n.title]})]}):(0,b.jsxs)(`p`,{className:`text-sm text-muted`,children:[`No breadcrumbs. Call `,(0,b.jsx)(`code`,{children:`deBug.breadcrumb()`}),` on navigation and network calls to see the path to the error.`]})})]}),(0,b.jsx)(_,{title:`Recent occurrences`,subtitle:`Newest first. Open one for its timeline, request, device and stack.`,children:(0,b.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,b.jsxs)(`table`,{className:`tabular w-full min-w-[600px] text-left text-sm`,children:[(0,b.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,b.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`When`}),(0,b.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`OS`}),(0,b.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Version`}),(0,b.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Device`}),(0,b.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`User`})]})}),(0,b.jsx)(`tbody`,{children:e.recent.map(r=>(0,b.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-panel-2`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 text-xs sm:px-2`,children:r.type===`error`?(0,b.jsx)(t,{to:`/events/$eventId`,params:{eventId:r.id},search:{app:e.app,issue:n.fingerprint,range:x.range,from:x.from,to:x.to},className:`font-medium text-accent hover:underline`,title:r.ts,children:f(r.ts)}):(0,b.jsx)(`span`,{className:`text-muted`,title:r.ts,children:f(r.ts)})}),(0,b.jsx)(`td`,{className:`px-2 py-2`,children:r.os}),(0,b.jsx)(`td`,{className:`px-2 py-2`,children:r.appVersion??`—`}),(0,b.jsx)(`td`,{className:`px-2 py-2`,children:r.device??`—`}),(0,b.jsx)(`td`,{className:`px-2 py-2 font-mono text-xs text-muted`,children:r.userId??`anonymous`})]},r.id))})]})})})]})}function S({app:t,issue:n,canChange:r,links:i}){let o=a(),[s,c]=(0,y.useState)(n.resolvedIn??n.lastVersion??``),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(!1),p=async r=>{f(!0),u(null);let i=await e({data:{app:t,fingerprint:n.fingerprint,status:r,resolvedIn:r===`resolved`?s:void 0}}).catch(e=>({ok:!1,error:e.message}));if(f(!1),!i.ok)return u(i.error);await o.invalidate()},m=`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,h=n.status===`resolved`||n.status===`ignored`;return(0,b.jsxs)(`section`,{"aria-label":`Issue actions`,className:`flex flex-wrap items-center gap-2`,children:[r&&!h&&(0,b.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),p(`resolved`)},children:[(0,b.jsx)(`label`,{className:`text-sm text-muted`,htmlFor:`fixed-in`,children:`Fixed in`}),(0,b.jsx)(`input`,{id:`fixed-in`,value:s,onChange:e=>c(e.target.value),placeholder:`2.4.1`,className:`w-28 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`}),(0,b.jsx)(`button`,{type:`submit`,disabled:d,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Resolve`}),(0,b.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`ignored`),className:m,children:`Ignore`})]}),r&&h&&(0,b.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`open`),className:m,children:`Reopen`}),i.linear&&(0,b.jsx)(`a`,{href:i.linear,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create Linear issue`}),i.github&&(0,b.jsx)(`a`,{href:i.github,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create GitHub issue`}),r&&!h&&(0,b.jsxs)(`p`,{className:`w-full text-xs text-muted`,children:[`If it shows up again in `,s||`that version`,` or later, it's marked Regressed. Occurrences from older versions don't count: those users haven't updated yet.`]}),l&&(0,b.jsx)(`p`,{role:`alert`,className:`w-full text-sm text-sev-critical`,children:l})]})}var C=e=>e.replaceAll("`",``);export{x as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,V as t,st as n,ut as r,z as i}from"./src-BKSiJUs3.js";import{a}from"./ui-CaEZB1j2.js";import{v as o}from"./index-COHr_cc3.js";var s=r(n()),c=t();function l(){let t=o.useLoaderData(),n=i(),[r,l]=(0,s.useState)(t.demo?.email??``),[u,d]=(0,s.useState)(t.demo?.password??``),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1);async function g(t){t.preventDefault(),h(!0),p(null);try{let t=await e({data:{email:r,password:u}});if(!t.ok)return p(t.error);await n.invalidate(),await n.navigate({to:`/`})}catch{p(`Could not reach the dashboard server.`)}finally{h(!1)}}return(0,c.jsx)(`main`,{className:`flex min-h-screen items-center justify-center px-4`,children:(0,c.jsxs)(`form`,{onSubmit:g,className:`w-full max-w-sm rounded-xl border border-line bg-panel p-6 shadow-sm`,children:[(0,c.jsx)(a,{}),(0,c.jsx)(`h1`,{className:`mt-6 text-xl font-semibold`,children:`Sign in`}),(0,c.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`This dashboard runs on your infrastructure and reads from your`,` `,t.store===`demo`?`demo dataset`:t.store===`memory`?`in-memory store on this machine`:t.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),t.demo&&(0,c.jsxs)(`p`,{className:`mt-4 rounded-md bg-accent-soft px-3 py-2 text-xs text-ink`,children:[`Demo mode: sign in with `,(0,c.jsx)(`b`,{children:t.demo.email}),` / `,(0,c.jsx)(`b`,{children:t.demo.password}),`. Set `,(0,c.jsx)(`code`,{children:`DEBUG_DASHBOARD_USERS`}),` to require real accounts.`]}),(0,c.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,c.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:r,onChange:e=>l(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),(0,c.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password`}),(0,c.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:u,onChange:e=>d(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),f&&(0,c.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:f}),(0,c.jsx)(`button`,{disabled:m,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:m?`Signing in…`:`Sign in`})]})})}export{l as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,E as t,F as n,O as r,T as i,V as a,a as o,i as s,st as c,t as l,ut as u,z as d}from"./src-BKSiJUs3.js";import{l as f,t as p}from"./ui-CaEZB1j2.js";import{i as m,r as h,t as g}from"./version-banner-VFvyqbPh.js";import{o as _}from"./index-COHr_cc3.js";var v=u(c()),y=a(),b=[30,60,90,180,365];function x(){let{apps:t,settings:r,seenHosts:a}=_.useLoaderData(),o=h(),s=n({from:_.fullPath}),c=d(),[l,u]=(0,v.useState)(String(r?.retentionDays??60)),[f,m]=(0,v.useState)(null),[g,x]=(0,v.useState)(!1);if(!r)return(0,y.jsx)(`main`,{className:`mx-auto max-w-3xl px-4 py-16 text-center text-muted`,children:`No apps yet. Settings appear once an app sends its first event.`});let C=r.writer!==`none`,T=Number(l),E=Number.isInteger(T)&&T!==r.retentionDays,D=async()=>{x(!0),m(null);let t=await e({data:{app:r.app,retentionDays:T}}).catch(e=>({ok:!1,error:e.message}));if(x(!1),!t.ok)return m({tone:`error`,text:t.error});m({tone:`ok`,text:`Saved. New events are kept for ${T} days, starting within about a minute.`}),await c.invalidate()},k=async()=>{x(!0);let e,t=0;try{do{let n=await i({data:{app:r.app,cursor:e}});if(!n.ok)throw Error(n.error);t+=n.updated,e=n.cursor,m({tone:`info`,text:`Updating existing events… ${t.toLocaleString()} so far`})}while(e);m({tone:`ok`,text:`Done: ${t.toLocaleString()} existing events now expire ${r.retentionDays} days after they arrived.`})}catch(e){m({tone:`error`,text:`Stopped after ${t.toLocaleString()} events: ${e.message}`})}x(!1)};return(0,y.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Settings`}),(0,y.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:r.app})]}),t.length>1&&(0,y.jsx)(`select`,{"aria-label":`App`,value:r.app,onChange:e=>s({search:{app:e.target.value}}),className:`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,children:t.map(e=>(0,y.jsx)(`option`,{children:e},e))})]}),o&&(0,y.jsx)(O,{status:o}),(0,y.jsxs)(p,{title:`Data retention`,subtitle:`Your data lives in your own database, so you decide how long to keep it.`,children:[(0,y.jsxs)(`dl`,{className:`grid gap-3 text-sm sm:grid-cols-2`,children:[(0,y.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,y.jsx)(`dt`,{className:`text-xs text-muted`,children:`Raw events (stack traces, breadcrumbs, context)`}),(0,y.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:r.retentionDays?`${r.retentionDays} days`:`Unknown`}),(0,y.jsx)(`dd`,{className:`text-xs text-muted`,children:r.source===`setting`?`Set here${r.updatedAt?` on ${new Date(r.updatedAt).toLocaleDateString(`en-GB`)}`:``}`:r.source==="default"?`The default chosen at setup`:`Not reported by this deployment`})]}),(0,y.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,y.jsx)(`dt`,{className:`text-xs text-muted`,children:`Counts, issues and release health`}),(0,y.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:`Forever`}),(0,y.jsx)(`dd`,{className:`text-xs text-muted`,children:`Charts and trends cover any date range`})]})]}),C?(0,y.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:e=>{e.preventDefault(),E&&D()},children:[(0,y.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`days`,children:`Keep raw events for`}),(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[b.map(e=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>u(String(e)),className:`rounded-md border px-3 py-1.5 text-sm ${Number(l)===e?`border-accent bg-accent-soft text-accent`:`border-line hover:bg-panel-2`}`,children:[e,` days`]},e)),(0,y.jsx)(`input`,{id:`days`,type:`number`,min:1,max:3650,value:l,onChange:e=>u(e.target.value),className:`w-24 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,"aria-label":`Days`}),(0,y.jsx)(`button`,{type:`submit`,disabled:!E||g,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save`})]}),(0,y.jsx)(`p`,{className:`text-xs text-muted`,children:`Applies to events that arrive from now on. When you shorten it, older events are removed by your database's own clean-up: within about a day on Firestore, up to two days on DynamoDB.`})]}):(0,y.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:r.note}),r.note&&C&&(0,y.jsx)(`p`,{className:`mt-2 text-xs text-sev-high`,children:r.note})]}),C&&(0,y.jsxs)(p,{title:`Existing events`,subtitle:`Events already stored keep the expiry they arrived with.`,children:[(0,y.jsxs)(`p`,{className:`text-sm`,children:[`Give every stored event an expiry based on the current setting (`,r.retentionDays,` days after it arrived). This costs one database write per event.`]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>void k(),disabled:g,className:`mt-3 rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,children:`Apply to existing events`})]}),C&&(0,y.jsx)(S,{settings:r,onStatus:m},r.app+JSON.stringify([r.criticalFlows,r.alerts])),C&&(0,y.jsx)(w,{app:r.app,hosts:r.hosts,seen:a,onStatus:m},r.app+JSON.stringify(r.hosts)),f&&(0,y.jsx)(`p`,{role:`status`,className:`rounded-lg border px-3 py-2 text-sm ${f.tone===`error`?`border-sev-critical text-sev-critical`:f.tone===`ok`?`border-line bg-panel-2`:`border-line text-muted`}`,children:f.text})]})}function S({settings:e,onStatus:n}){let i=d(),[a,o]=(0,v.useState)(e.criticalFlows.join(`, `)),[s,c]=(0,v.useState)(e.alerts.slackWebhookUrl??``),[l,u]=(0,v.useState)(e.alerts.newIssues!==!1),[f,m]=(0,v.useState)(e.alerts.regressions!==!1),[h,g]=(0,v.useState)(e.alerts.onlyCriticalFlows===!0),[_,b]=(0,v.useState)(e.alerts.dashboardUrl??(typeof window<`u`?window.location.origin:``)),[x,S]=(0,v.useState)(!1),C=async()=>{S(!0),n(null);let r=await t({data:{app:e.app,criticalFlows:a.split(/[\s,]+/).filter(Boolean),alerts:{slackWebhookUrl:s,newIssues:l,regressions:f,onlyCriticalFlows:h,dashboardUrl:_}}}).catch(e=>({ok:!1,error:e.message}));if(S(!1),!r.ok)return n({tone:`error`,text:r.error});n({tone:`ok`,text:`Saved. Alerts and critical flows apply within about a minute.`}),await i.invalidate()},w=async()=>{S(!0);let t=await r({data:{app:e.app}}).catch(e=>({ok:!1,error:e.message}));S(!1),n(t.ok?{tone:`ok`,text:`Test message sent. Check your Slack channel.`}:{tone:`error`,text:t.error})},T=`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p,{title:`Critical flows`,subtitle:`Issues in these flows rank one severity level higher, and can be the only ones that alert.`,children:[(0,y.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`flows`,children:`Flows, separated by commas`}),(0,y.jsx)(`input`,{id:`flows`,value:a,onChange:e=>o(e.target.value),placeholder:`checkout.payment, auth.login`,className:`mt-2 w-full ${T}`})]}),(0,y.jsx)(p,{title:`Slack alerts`,subtitle:`Your ingest function posts to Slack when an issue first appears or comes back after being resolved.`,children:(0,y.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`label`,{className:`block font-medium`,htmlFor:`hook`,children:`Incoming webhook URL`}),(0,y.jsx)(`input`,{id:`hook`,value:s,onChange:e=>c(e.target.value),placeholder:`https://hooks.slack.com/services/…`,className:`mt-2 w-full font-mono ${T}`}),(0,y.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Create one under your Slack app's Incoming Webhooks. Leave empty to turn alerts off.`})]}),(0,y.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked)}),` New issues`]}),(0,y.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>m(e.target.checked)}),` Regressions`]}),(0,y.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),` Only for critical flows`]}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`label`,{className:`block font-medium`,htmlFor:`dash-url`,children:`Dashboard address, for links in alerts`}),(0,y.jsx)(`input`,{id:`dash-url`,value:_,onChange:e=>b(e.target.value),className:`mt-2 w-full ${T}`})]})]})}),(0,y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>void C(),disabled:x,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save flows and alerts`}),e.alerts.slackWebhookUrl&&e.writer===`admin`&&(0,y.jsx)(`button`,{type:`button`,onClick:()=>void w(),disabled:x,className:`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,children:`Send a test alert`})]})]})}var C=s.filter(e=>e!==`unknown`);function w({app:e,hosts:n,seen:r,onStatus:i}){let a=d(),[s,c]=(0,v.useState)(n.length+1),[u,f]=(0,v.useState)(()=>n.length?n.map((e,t)=>({id:t,match:e.match,name:e.name,owner:e.owner??``})):[{id:0,match:``,name:``,owner:``}]),[m,h]=(0,v.useState)(!1),g=new Set(u.map(e=>l(e.match))),_=r.filter(e=>!g.has(e)),b=(e,t)=>f(n=>n.map(n=>n.id===e?{...n,...t}:n)),x=(e=``)=>{f(t=>[...t.filter(e=>e.match||e.name),{id:s,match:e,name:``,owner:``}]),c(e=>e+1)},S=async()=>{h(!0),i(null);let n=await t({data:{app:e,hosts:u.map(e=>({match:e.match,name:e.name,...e.owner?{owner:e.owner}:{}}))}}).catch(e=>({ok:!1,error:e.message}));if(h(!1),!n.ok)return i({tone:`error`,text:n.error});i({tone:`ok`,text:`Saved. Names show straight away; owners apply to new errors within about a minute, and to existing issues now.`}),await a.invalidate()},w=`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`;return(0,y.jsx)(p,{title:`Host names`,subtitle:`Give the servers your app calls a name people recognise, and say who looks after each one.`,children:(0,y.jsxs)(`div`,{className:`space-y-3`,children:[u.map((e,t)=>(0,y.jsxs)(`div`,{role:`group`,"aria-label":`Host ${t+1}`,className:`grid gap-2 rounded-lg border border-line p-3 sm:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_auto_auto] sm:items-end sm:border-0 sm:p-0`,children:[(0,y.jsxs)(`label`,{className:`min-w-0 text-xs text-muted`,children:[`Host, or host and path`,(0,y.jsx)(`input`,{value:e.match,onChange:t=>b(e.id,{match:t.target.value}),list:`seen-hosts`,placeholder:`api.example.com/payments`,className:`mt-1 w-full font-mono text-xs text-ink ${w}`})]}),(0,y.jsxs)(`label`,{className:`min-w-0 text-xs text-muted`,children:[`Name`,(0,y.jsx)(`input`,{value:e.name,onChange:t=>b(e.id,{name:t.target.value}),placeholder:`Balance service`,maxLength:60,className:`mt-1 w-full text-ink ${w}`})]}),(0,y.jsxs)(`label`,{className:`text-xs text-muted`,children:[`Looked after by`,(0,y.jsxs)(`select`,{value:e.owner,onChange:t=>b(e.id,{owner:t.target.value}),className:`mt-1 w-full text-ink ${w}`,children:[(0,y.jsx)(`option`,{value:``,children:`Work it out`}),C.map(e=>(0,y.jsx)(`option`,{value:e,children:o[e].name},e))]})]}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>f(t=>t.filter(t=>t.id!==e.id)),"aria-label":`Remove ${e.match||`this host`}`,className:`justify-self-start rounded-md border border-line px-2.5 py-1.5 text-sm hover:bg-panel-2`,children:`Remove`})]},e.id)),(0,y.jsx)(`datalist`,{id:`seen-hosts`,children:_.map(e=>(0,y.jsx)(`option`,{value:e},e))}),_.length>0&&(0,y.jsxs)(`div`,{className:`text-xs text-muted`,children:[(0,y.jsx)(`p`,{children:`Called in the last 30 days and not named yet:`}),(0,y.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:_.slice(0,8).map(e=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>x(e),className:`max-w-full truncate rounded-md border border-line px-2 py-0.5 font-mono hover:bg-panel-2`,title:`Name ${e}`,children:[`+ `,e]},e))})]}),(0,y.jsx)(`p`,{className:`text-xs text-muted`,children:`A path names part of a host: api.example.com/payments covers /payments/… only; the longest match wins. The owner decides who server errors from that host are passed to.`}),(0,y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>x(),className:`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2`,children:`Add a host`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>void S(),disabled:m,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save host names`})]})]})})}var T=e=>e.level===`note`&&e.behind.some(e=>e.part!==`sdk`),E=e=>e.charAt(0).toUpperCase()+e.slice(1),D={sdk:`App SDK (newest seen)`,ingest:`Ingest`,dashboard:`This dashboard`};function O({status:e}){let t=new Set(e.behind.map(e=>e.part));return(0,y.jsxs)(p,{title:`deBug versions`,subtitle:`Your app's SDK, your ingest and this dashboard are released together and work best on the same version.`,children:[(0,y.jsx)(`dl`,{className:`grid grid-cols-[minmax(8rem,auto)_1fr] gap-x-4 gap-y-1.5 text-sm`,children:e.parts.map(e=>(0,y.jsxs)(`div`,{className:`contents`,children:[(0,y.jsx)(`dt`,{className:`text-muted`,children:D[e.part]}),(0,y.jsxs)(`dd`,{className:t.has(e.part)?`font-medium text-sev-high`:``,children:[e.version??(e.part===`sdk`?`not seen yet`:`predates version tracking`),e.at&&(0,y.jsxs)(`span`,{className:`ml-2 text-xs text-muted`,title:e.at,children:[e.part===`sdk`?`seen`:`recorded`,` `,f(e.at)]})]})]},e.part))}),e.level===`none`?(0,y.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`All in step.`}):(0,y.jsxs)(`div`,{className:`mt-3 space-y-2 text-sm`,children:[(0,y.jsxs)(`p`,{className:e.level===`banner`?``:`text-muted`,children:[E(e.behind.map(m).join(` and `)),T(e)?`: a patch behind ${e.newest}, so nothing's missing, but worth catching up.`:`, behind ${e.newest}.`]}),e.behind.some(e=>e.part!==`sdk`)?(0,y.jsx)(g,{status:e}):(0,y.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Update @debugkit/sdk in your app to `,e.newest,`.`]})]})]})}export{x as component};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function O(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+O(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(D,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(ne(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+O(a,u),c+=k(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+O(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var se=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ce(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ce(le.bind(null,e))}var ue={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!ne(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=le,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ne,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=`__TSS_CONTEXT`,p=Symbol.for(`TSS_SERVER_FUNCTION`),m=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),h=`x-tss-raw`,g=`application/x-tss-framed`;`${g}`;var _=()=>window.__TSS_START_OPTIONS__;function v(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function y(e){return e?.isNotFound===!0}function b(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function x(e){return e instanceof Response&&!!e.options}function S(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return b(e)}function C(e){return e.replaceAll(`/`,`#`)}function w(e){return e[e.length-1]}function T(e,t){return typeof e==`function`?e(t):e}var E=Object.prototype.hasOwnProperty;function ee(e){for(let t in e)if(E.call(e,t))return!0;return!1}var te=()=>Object.create(null),ne=(e,t)=>re(e,t,!0);function re(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(D(e)&&D(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&w(a)!==`${o-1}`||c&&w(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?re(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?re(d,o,n,r):o,i&&=u===d&&(a[l]===f||E.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?te():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?re(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function D(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function O(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!O(a,o,n,r))return!1}return!0}if(D(e)&&D(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!O(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!O(e[a],t[a],n,r)))return!1;return i===0}return!1}function ie(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var k=/[\x00-\x1f\x7f"<>`{}]/g;function ae(e){return e.replace(k,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function oe(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return ae(t)}var se=[`http:`,`https:`,`mailto:`,`tel:`];function ce(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var le=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function ue(e,t){if(!e)return!1;if(le.test(e))return!0;let n=ce(e);return n?!t.has(n):!1}var de={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},fe=/[&><\u2028\u2029]/g;function pe(e){return e.replace(fe,e=>de[e])}function me(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=oe(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=oe(r?e.slice(r):e)}return t}function he(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ge(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function _e(e){return e.replace(/\/{2,}/g,`/`)}function ve(e){return e===`/`?e:e.replace(/^\/+/,``)}function ye(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function be(e){return ye(ve(e))}function xe(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Se(e,t,n=`never`,r){if(t.includes(`//`)&&(t=_e(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=_e(e)),o=e.split(`/`);o.length>1&&w(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(w(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?_e(s):s)||`/`;return a&&r&&r.set(a,c),c}function Ce(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function we(e){return e==null||e===``}function Te(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function Ee(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&we(f)){if(c===`/`&&!d)continue;f=``}o+=c+Te(s,f,r)+(d||``)}}return o+a||`/`}function De(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}function Oe(){throw Error(`Invariant failed`)}var ke=4,Ae=5;function je(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Me(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function Ne(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=w(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Me(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=Fe(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=Fe(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=Fe(r,Ae);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=Fe(r,ke);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function Pe(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fe(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ie(e,t){let n=Fe(),r=[];function i(e,t,n,a){let[o,s,c]=Ne(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Pe);t.masksTree=n,t.flatCache=De(1e3)}function Le(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ve(e,t.masksTree);return t.flatCache.set(e,r),r}function Re(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Fe(),Ne(t,{from:e},1,o),i.singleCache.set(a,o)),Ve(r,o,n)}function ze(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ve(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Ue(a.route)),t.matchCache.set(r,a),a}function Be(e,t=!1){let n=Fe(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Oe(),i[e.id]=e,o!==0&&e.path){let t=ye(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Ne(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Pe);return{processedTree:{segmentTree:n,singleCache:De(1e3),matchCache:De(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ve(e,t,n=!1){let r=e.split(`/`),i=Ge(e,r,t,n);if(!i)return null;let[a]=He(e,r,i);return{route:i.node.route,rawParams:a}}function He(e,t,n){let r=We(n.node),i=n.node.data&&je(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===ke)break;if(u.kind===Ae){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Ue(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function We(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ge(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!w(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Ye(l,n))continue;if(i.parse){if(!Je(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==ke&&Ye(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===ke||i.kind===2)&&Ye(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Je(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&qe(f,o))return n;Ye(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Ke(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Ke(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ke(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Ke(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ke(e,t){return 2**(e-t-1)}function qe(e,t){return e===2**(t-1)-1}function Je(e,t,n){let r,i;try{[r,i]=He(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Ye(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ke)>(e.node.kind===ke)||t.node.kind===ke==(e.node.kind===ke)&&t.node.depth>e.node.depth)))}function Xe(){try{return sessionStorage}catch{return}}var Ze=`tsr-scroll-restoration-v1_3`,Qe=Xe();function $e(){try{return JSON.parse(Qe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var et=$e(),tt=`data-scroll-restoration-id`,nt=e=>e.state.__TSR_key||e.href;function rt(e){let t=e.getAttribute(tt);if(t)return`[${tt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var it=!1,at=`window`;function ot(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function st(e){let t=new Set;for(let n of e){if(n===at)continue;let e=ot(n);e&&t.add(e)}return t}function ct(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||nt,a=new Set,o=e=>{let t=et[e]||={};for(let e of a)e===document?t[at]={scrollX,scrollY}:e.isConnected&&(t[rt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,it=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{it||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Qe?.setItem(Ze,JSON.stringify(et))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),r.r||(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=et[d];if(e){let t=et[u];for(let n in e){if(n===at){if(s)continue}else{let e=ot(n);if(!e||s&&o&&(l??=st(o),l.has(e)))continue}t||=et[u]={},t[n]??=e[n]}}}it=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=st(o));let t=e&&i&&c,s=r.e?et[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===at){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=ot(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{it=!1}}))}function lt(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function ut(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function dt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=ut(r):Array.isArray(t)?t.push(ut(r)):n[e]=[t,ut(r)]}return n}var ft=/^(?:\s|["[{\d-]|fa|nu|tr)/,pt=ht(JSON.parse),mt=gt(JSON.stringify,JSON.parse);function ht(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=dt(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!ft.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function gt(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!ft.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=lt(e,r);return t?`?${t}`:``}}var _t=`__root__`;function vt(e,t,n){let r=be(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=_e(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>yt(n,s.input({url:e})),output:({url:e})=>s.output({url:bt(n,e)})}:s}function yt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function bt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function xt(e){let t=e;return{get(){return t},set(e){t=T(e,t)}}}function St(e){return{get(){return e()}}}function Ct(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ge(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var wt=`__TSR_index`,Tt=`popstate`,Et=`beforeunload`,Dt=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Ot(e){let t=Dt.exec(e);return t?`/`+e.slice(t[0].length):e}function kt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
-
\r`.includes(e)?``:encodeURIComponent(e))),Ot(e)}function At(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=Nt(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[wt];i=jt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[wt];i=jt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[wt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function jt(e,t){let n=Pt();return{...t,key:n,__TSR_key:n,[wt]:e}}function Mt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>kt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Nt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Pt();t.history.replaceState({[wt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Nt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[wt]-l.state[wt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=At({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Et,x,{capture:!0}),t.removeEventListener(Tt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Et,x,{capture:!0}),t.addEventListener(Tt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Nt(e,t){let n=kt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Pt();t={[wt]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Pt(){return(Math.random()+1).toString(36).slice(7)}function Ft(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function It(e){return e.pathname+e.search+e.hash}function Lt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Rt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function zt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Bt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Vt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Ht(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Ut=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Mt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&be(n)?vt(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Ct(this.latestLocation,e),ct(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Be(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ie(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:De(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:me(e),external:!1,searchStr:o,search:ne(t?.search,i),hash:me(r.slice(1)),state:re(t?.state,a)}}let o=yt(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:me(Ot(o.pathname)),external:!!this.rewrite&&Ft(o,this.origin),searchStr:c,search:ne(t?.search,s),hash:me(o.hash.slice(1)),state:re(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ze(ye(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Nt(n.href,{});n={...n,to:yt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=Se(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[ye(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Ue(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??Ne(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Jt(n.params,e),!ee(p))break;p===e&&(p=Object.assign(te(),p));try{Object.assign(p,t(p))}catch{}}}p??=Jt(n.params,Yt(n.params,f)?o()[3]:Xt);let m=e.leaveParams?c:Ot(me(f?Ee(c,f,p,this.pathParamsDecoder):c)),h=Zt(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,qt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?Qt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Xt,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Xt,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=bt(this.rewrite,e);C=It(e),Ft(n,t)?(w=n.href,T=!0):w=Ot(It(n))}else C=he(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Le(r.pathname,this.processedTree);if(t){let i=Object.assign(te(),t.rawParams),{from:a,params:o,...s}=t.route,c=Jt(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Wt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=ye(this.latestLocation.href)===ye(n.href)&&O(Bt(n.state),Bt(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?ce(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Wt(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Gn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(zt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Lt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(le.test(n)||(r=ce(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Ft(e,this.origin)||(n=It(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=rn,this.preloadRoute=e=>Kn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Se(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Re(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!O(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?O(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Ce(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??mt,parseSearch:e.parseSearch??pt,protocolAllowlist:e.protocolAllowlist??se}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Ne(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:ye(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?$t(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=qt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Gt||(r=new Gt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=te(),_=i._interpolation?Ee(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,b=u(i,n),S=this._cache.get(v)??(b?.id===v?b:void 0);d=S?._strictParams??Object.assign(g,d);let C;if(!S)try{en(i,d)}catch(e){if(C=y(e)||x(e)?e:new Kt(e.message,{cause:e}),t?.throwOnError)throw C}let w=b?`stay`:`enter`,T;if(S)T={...S,cause:w,search:ne(b?b.search:S.search,l),_strictSearch:f,searchError:p};else{let e=Lt(i)?`pending`:`success`;T={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:b?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:b?ne(b.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:b?re(b.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let E=s===i.id;T._notFound&&!E&&(T.error=void 0),T._notFound=E,c[n]=T}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?ne(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=w(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=w(a),c={...e.search};for(let e of a)try{Object.assign(c,qt(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{en(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Wt(e,t,{replace:n,ignoreBlocker:r}){if(!ue(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Gt=class extends Error{},Kt=class extends Error{};function qt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Gt(`Async validation not supported`);if(n.issues)throw new Gt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Jt(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Yt(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!E.call(e,t[1]))}var Xt=Object.freeze({});function Zt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=qt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Qt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=T(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function $t(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return _t}function en(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function tn(e,t){return e.options[t]?.preload?.()}function nn(e,t){let n=tn(e,`component`),r=tn(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function rn(e,t,n){let r=()=>t===!1?void 0:t?tn(e,t):nn(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function an(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function on(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function sn(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0)t=Math.min(t,Math.max(n+1,r._assetEnd));else if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var cn=0,ln=1,un=2,A=3,dn=[4];function fn(e){return typeof e[0]==`number`}function pn(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function mn(e,t){return e.routesById[t.routeId]}function hn(e,t,n){return x(e)?[A,e]:y(e)?(e.routeId||=n,[un,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[ln,e]):[cn,e]}function gn(e,t){let n=hn(t,!0,e.id);if(n[0]!==ln)return n;try{e.options.onError?.(n[1])}catch(t){n=hn(t,!0,e.id)}return n}function _n(e,t,n,r,i){return i[0].signal.aborted?dn:Mn(e,t,n,gn(n,r),i)}async function vn(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=mn(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return bn(e,r),[i,_n(e,t,u,a,n)]}if(c.aborted)return[i,dn];let p=r.paramsError??r.searchError;if(p!==void 0)return bn(e,r),[i,_n(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Sn(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?pn(a,c):a);if(c.aborted)return[i,dn];let s=Mn(e,t,u,hn(o,!1,u.id),n);if(s[0]!==cn)return bn(e,r),[i,s];r.context={...r.context,...o}}catch(a){return bn(e,r),[i,_n(e,t,u,a,n)]}finally{r.status=h,Sn(e,r,!1,n[0])}}i()}function yn(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function bn(e,t){let n=t._flight;t._flight=void 0,yn(e,t,n)?.abort()}function j(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=yn(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function xn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Sn(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Cn(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function wn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return dn;if(!i)return[cn,void 0];let l=n._flight;Sn(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Cn(e,t,n,r,s,a,!!o[3]))).then(e=>hn(e,!1,r.id),e=>hn(e,!0,r.id)).then(t=>(t[0]!==cn&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===ln&&l[2]?gn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Mn(e,t,r,await pn(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return bn(e,n),dn}finally{Sn(e,n,!1,s)}}function Tn(e,t,n){t[0]!==A&&(e.status=`success`,e.error=void 0,t[0]===cn?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function En(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&bn(e,r)}function Dn(e,t){return t[0]===ln||t[0]===un?{...e,status:t[0]===ln?`error`:`notFound`,error:t[1],_flight:void 0}:e}function On(e,t,n,r,i,a,o){let s=t[1][n],c=mn(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Cn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=dn)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,bn(e,s),p=_n(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,yn(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?wn(e,t,s,c,g,i,a).then(t=>(Tn(s,t,l),t[0]===cn&&(m&&!a[0].signal.aborted&&En(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[cn,s.loaderData]),T=(async()=>{try{let e=rn(c,void 0,C);e&&await pn(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,_n(e,t,c,r,a)]}let r=await w;x&&r[0]===cn&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Dn(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=wn(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Tn(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>Dn(E,e))}async function kn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=mn(e,t[n]);try{let e=rn(i,!1);e&&await pn(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function An(e,t){t[2]&&=(j(e,t[2].map(e=>e[3])),void 0)}async function jn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=A)throw[a,t];!i&&t[0]!==cn&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===A)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Mn(e,t,n,r,i,a){for(;r[0]===A;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[A,t]:[A,t,a]}return[A,o,n]}catch(e){r=a?[ln,e]:gn(n,e),a=!0}}return r}async function Nn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===un?kn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=A)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==cn&&t[0]<A&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=A){let n=s[1];if(n[0]!==A||n[1].options.reloadDocument||n[2])return An(e,t),n;c=!0,s=[0,[ln,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===ln?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=mn(e,u);try{await pn(i?Promise.resolve().then(()=>rn(m,l===ln?`errorComponent`:`notFoundComponent`)):Promise.all([rn(m),rn(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return An(e,t),dn}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),An(e,t),j(e,o),p()):u.status=`success`}return t}async function Pn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=mn(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await pn(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Fn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await kn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=On(e,i,t,u,f,r,l)},m=await vn(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===un){let t=await kn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=A&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Nn(e,i,u,r[0],jn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=jn(i[2],void 0,void 0,h.then(e=>fn(e)?0:an(n).length,()=>0))),o=await h}catch(t){if(An(e,i),t===a&&a.aborted)return dn;throw t}return fn(o)?o:Pn(e,o,a,r[6]===n.length?r[6]:0)}function In(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=mn(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>In(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Ln(e,t){let n=e._pending;e._tx!==t&&e._tx?.[3].some(e=>e.id===n?.[1])||(clearTimeout(n?.[3]),e._pending=void 0)}async function Rn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!an(t[3]).some(e=>e.id===n[1]))return;let i;try{await pn(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function zn(e,t){e._committed=t,e.stores.setMatches(t)}function Bn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=an(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=mn(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Vt(n);zn(e,n),j(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Ht(e,i,n,a,l,t)}async function Vn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Hn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Un(e,t,n,r,i){let a=n.map(e=>({...e}));xn(a);for(let t of r)bn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Nn(e,o,r,t[0],i)}catch(t){throw j(e,a),t}if(fn(s))j(e,a),s[0]===A&&e._tx===t&&e._committed===n&&await Hn(e,t,s);else if(await Pn(e,s,t[0].signal),e._tx!==t||e._committed!==n)j(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),bn(e,n))}zn(e,a),j(e,n,a)}}async function Wn(e,t,n,r,i,a){let o=await Fn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(fn(o)){let n=o[0]===A&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Ln(e,t),j(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Ln(e,t);return}await Hn(e,t,o);return}let s=o[1];if(e._tx===t&&await Rn(e,t),e._tx!==t){Ln(e,t),j(e,s),An(e,o);return}let c=t[2],l=zt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Rn(e,t),e._tx!==t){Ln(e,t),j(e,s),An(e,o);return}let n=await e.startTransition(()=>{Ln(e,t),Bn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&Un(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):An(e,o)})}async function Gn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=zt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Vn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});xn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){j(e,m),await Vn(e,n);return}e._preflight=void 0;let g,_=()=>Wn(e,y,f,()=>In(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Vn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Sn(e,t,!1)}n[0].abort(),j(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&In(e,y),g?.(_()),await y[5]):(j(e,y[3]),y[3]=[],g?.(),await Vn(e,y))}async function Kn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),xn(a),o=(e._preloads??=new Map).set(i,a),s=await Fn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),j(e,a)),i.abort()}if(!fn(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){y(e)||console.error(e);return}}}async function qn(e){let t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(e=>[e.key,e.fromSerializable])),t.buffer.forEach(e=>e())),t.initialized=!0;let r=t.router;e.ssr={manifest:r.manifest},e.options.ssr={nonce:document.querySelector(`meta[property="csp-nonce"]`)?.content};let i=r.matches,a=new AbortController,o=e._preflight;e._preflight=a,o?.abort();let s=()=>e._preflight===a,c,l,u,d;try{if(await pn(e.options.hydrate?.(r.dehydratedData),a.signal),!s())return;let t=e.history.location;u=t.href,d=t.state,e.updateLatestLocation(),c=e.latestLocation,e.stores.location.set(c),l=e.matchRoutes(c,{_controller:a})}catch(t){if(s()&&(e._preflight=void 0),a.abort(t),t!==a.signal)throw t}if(!s())return;let f=[],p,m=0,h=t=>{m=Math.min(m,t+1);let n=f.splice(t);for(let t of n)mn(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&En(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));j(e,n)},g=i.length>l.length?l.findIndex(e=>e._notFound)+1:i.length,_=!1;for(let t=0;t<g;t++){let n=l[t],r=i[t];if(r.i!==C(n.id)){p??=t;break}m=t+1;let a=mn(e,n);if((`l`in r||r.s===`success`&&r.e===void 0&&a.options.loader)&&(n.loaderData=r.l),n.status=r.s,n.ssr=r.ssr,a.options.ssr=n.ssr,n.updatedAt=r.u,n.error=r.e,n._notFound||=r.g,n.status===`error`||n.status===`notFound`||n._notFound){_=!0,f.push(n),(n.ssr===!1||n.ssr===`data-only`)&&(p??=t);break}if(n.status===`pending`){p??=t;break}f.push(n),n.ssr===`data-only`&&(p??=t)}!_&&f.length===g&&g<l.length&&(p=g);let v=f.map(async t=>{try{let n=mn(e,t);return await(t._notFound?Promise.all([rn(n),rn(n,`notFoundComponent`)]):rn(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await pn(v[y],a.signal);)y++}catch{return}if(!s())return;y<f.length&&h(y);let b=Math.max(p===f.length?f.length+1:f.length,y<v.length?y:m);for(let t=0;t<b;t++){let n=l[t],r=mn(e,n),o=l[t-1]?.context??e.options.context??{},u;if(r.options.context){try{u=n._ctx=r.options.context({deps:n.loaderDeps,params:n.params,context:o,location:c,navigate:t=>e.navigate({...t,_fromLocation:c}),buildLocation:e.buildLocation,cause:n.cause,abortController:a,preload:!1,matches:l,routeId:r.id})||{}}catch{if(!s())return;if(n.status!==`error`&&n.status!==`notFound`&&!n._notFound){p=Math.min(p??t,t),h(t);break}}if(!s())return}n.context={...o,...u,...f[t]&&i[t].b}}if(await Pn(e,[c,l],a.signal,0,m),!s())return;let x=p!==void 0||f.length<g,S=_&&f.length===g?l:f,w=x?l:S,T;if(x&&p!==void 0){let e=w[p];T=e.ssr===`data-only`&&m>p+1?m:void 0,w=w.slice(),w[p]={...e,status:`pending`,ssr:e.ssr===`data-only`&&`data-only`,_assetEnd:T}}let E=()=>{let t=e.history.location;return x&&!e._tx&&t.href===u&&t.state===d&&e._committed===S&&S.length&&!a.signal.aborted?a:void 0},ee=[E,t=>{if(e._handoff!==ee)return;e._handoff=void 0;let n=S.length;if(!t||!E()||S.some((e,n)=>e.id!==t[n]?.id)){a.abort();return}let r=T;if(r!==void 0){for(let e=n;e<r;e++)if(l[e]?.id!==t[e]?.id){r=e>p+1?e:void 0;break}}let i=S.map(e=>({...e}));r!==void 0&&(i[p]._assetEnd=r),j(e,t.splice(0,n,...i));for(let e=n;e<t.length;e++){let n=t[e],r=l[e];r?.id===n.id&&r._ctx&&(n._ctx=r._ctx),n.abortController=a}return n}];e._committed=S,e._lifecycleEnd=Vt(S),e._handoff=ee,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(w),e.stores.status.set(`idle`),x||e.stores.resolvedLocation.set(e.stores.location.get())})}var Jn=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},Yn=e=>t=>()=>{let n=0,r={[e](){return r},next(){if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r},Xn=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c={finalize(e=0,t=s.length){for(;e<t;e++)s[e].s({done:!0,value:void 0})}};n.on({next(e){let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw(e){let t=s.shift();t&&t.f(e),c.finalize(),i=o.length,a=!0,o.push(e)},return(e){let t=s.shift();t&&t.s({done:!0,value:e}),c.finalize(),i=o.length,o.push(e)}});let l={[e](){return l},next(){if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l},Zn=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer},Qn=Symbol.asyncIterator,$n=Symbol.hasInstance,er=Symbol.isConcatSpreadable,tr=Symbol.iterator,nr=Symbol.match,rr=Symbol.matchAll,ir=Symbol.replace,ar=Symbol.search,or=Symbol.species,sr=Symbol.split,cr=Symbol.toPrimitive,lr=Symbol.toStringTag,ur=Symbol.unscopables,dr={0:`Instant`,1:`Duration`,2:`PlainDate`,3:`PlainDateTime`,4:`PlainMonthDay`,5:`PlainTime`,6:`PlainYearMonth`,7:`ZonedDateTime`},fr={0:Qn,1:$n,2:er,3:tr,4:nr,5:rr,6:ir,7:ar,8:or,9:sr,10:cr,11:lr,12:ur};function pr(){let e={};for(let t=0;t<=12;t++)e[fr[t]]=t;return e}var mr=pr(),hr={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},gr={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function _r(){let e={};for(let t=0;t<=6;t++)e[t]=gr[t].name;return e}var vr=_r(),yr=64,br=/["\\\n\r\b\t\f<\u2028\u2029]/,xr=/[\x00-\x07\x0b\x0e-\x1f\ud800-\udfff]/,Sr=/</g,Cr=/\u2028/g,wr=/\u2029/g;function Tr(e){switch(e){case 34:return`\\"`;case 92:return`\\\\`;case 10:return`\\n`;case 13:return`\\r`;case 8:return`\\b`;case 9:return`\\t`;case 12:return`\\f`;case 60:return`\\x3C`;case 8232:return`\\u2028`;case 8233:return`\\u2029`;default:return}}function Er(e){let t=``+e;if(!br.test(t))return t;if(t.length>=yr&&!xr.test(t)){let e=JSON.stringify(t).slice(1,-1);return e.includes(`<`)&&(e=e.replace(Sr,`\\x3C`)),e.includes(`\u2028`)&&(e=e.replace(Cr,`\\u2028`)),e.includes(`\u2029`)&&(e=e.replace(wr,`\\u2029`)),e}let n=``,r=0,i;for(let e=0,a=t.length;e<a;e++)i=Tr(t.charCodeAt(e)),i&&(n+=t.slice(r,e)+i,r=e+1);return n+t.slice(r)}var Dr=/^(?:[^"\\\x00-\x1f]|\\["\\nrbtf])*$/,Or=/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g;function kr(e){if(typeof e!=`string`)return e.replace(Or,kr);let t=e.indexOf(`\\`);if(t===-1)return e;if(Dr.test(e))return JSON.parse(`"`+e+`"`);let n=``,r=0,i=e.length-1;for(;t!==-1&&t<i;){let i,a=2;switch(e.charCodeAt(t+1)){case 92:i=`\\`;break;case 34:i=`"`;break;case 110:i=`
|
|
3
|
-
`;break;case 114:i=`\r`;break;case 98:i=`\b`;break;case 116:i=` `;break;case 102:i=`\f`;break;case 120:e.startsWith(`3C`,t+2)&&(i=`<`,a=4);break;case 117:e.startsWith(`2028`,t+2)?(i=`\u2028`,a=6):e.startsWith(`2029`,t+2)&&(i=`\u2029`,a=6)}i?(n+=e.slice(r,t)+i,r=t+a,t=e.indexOf(`\\`,r)):t=e.indexOf(`\\`,t+1)}return n+e.slice(r)}var Ar={parsing:1,serialization:2,deserialization:3};function jr(e){return`Seroval Error (step: ${Ar[e]})`}var Mr=class extends Error{constructor(e,t){super(jr(e)),this.cause=t}},Nr=class extends Mr{constructor(e){super(`parsing`,e)}},Pr=class extends Mr{constructor(e){super(`deserialization`,e)}};function Fr(e){return`Seroval Error (specific: ${e})`}var Ir=class extends Error{constructor(e){super(Fr(1)),this.value=e}},Lr=class extends Error{constructor(e){super(Fr(2))}},Rr=class extends Error{constructor(e){super(Fr(3))}},zr=class extends Error{constructor(e,t){super(Fr(13)),this.tag=e,this.field=t}},Br=class extends Error{constructor(e){super(Fr(4))}},Vr=class extends Error{constructor(e){super(Fr(6))}},Hr=class extends Error{constructor(e){super(Fr(7))}},M=class extends Error{constructor(e){super(Fr(8))}},Ur=class extends Error{constructor(e){super(Fr(9))}},Wr=class extends Error{constructor(e){super(Fr(10))}},Gr=new Map,Kr=new Map;function qr(e){return Kr.has(e)}function Jr(e){return Gr.get(e)}function Yr(e){if(qr(e))return Kr.get(e);throw new Vr(e)}var Xr=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function Zr(e){return e instanceof Xr}function Qr(e,t,n){return new Xr(e,t,n)}function $r(e){let t=[],n=-1,r=-1,i=e[tr]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,r=n,t.push(e);break}return Qr(t,n,r)}var ei=Yn(tr);function ti(e){return ei(e)}var ni=Symbol(`LiveStream`);function ri(e){return e!=null&&e[ni]===!0}var ii=class{constructor(e){this.buffer=[],this.listeners=[],this.alive=!0,this.success=!1,this.count=0,this.live=e}flush(e,t){this.live>1||this.buffer.push(e);for(let n=0;n<this.count;n++)this.listeners[n]?.[t](e)}replay(e){for(let t=0,n=this.buffer.length;t<n;t++){let r=this.buffer[t];!this.alive&&t===n-1?e[this.success?`return`:`throw`](r):e.next(r)}}on(e){if(this.live>1)throw Error(`Stream consumed`);let t=this.alive,n=0;if(t){for(;n<this.count&&this.listeners[n];n++);n===this.count&&this.count++,this.listeners[n]=e}return this.replay(e),this.live&&(this.live=2,this.buffer.length=0),()=>{if(this.alive&&t){for(t=!1,this.listeners[n]=void 0;this.count>0&&!this.listeners[this.count-1];)this.count--;this.listeners.length=this.count}}}endedEvents(){if(!(this.alive||this.live>1))return{values:this.buffer.slice(),success:this.success}}next(e){this.alive&&this.flush(e,`next`)}throw(e){this.alive&&(this.flush(e,`throw`),this.alive=!1,this.success=!1,this.listeners.length=0)}return(e){this.alive&&(this.flush(e,`return`),this.alive=!1,this.success=!0,this.listeners.length=0)}};function ai(e){return e instanceof ii||ri(e)}function oi(){return new ii}var si=Xn(Qn,Jn);function ci(e){return si(e)}function li(e){return e}function ui(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&ui(e,r.extends))}}var di=new WeakMap;function fi(e,t,n){for(let r=0,i=t.length;r<i;r++){let i=t[r];if(i===e[n]){if(n++,i.extends&&(n=fi(e,i.extends,n),n===-1))return-1}else{let t=e.indexOf(i);if(t===-1||t>=n)return-1}}return n}function pi(e){if(e){let t=di.get(e);if(t&&fi(t,e,0)===t.length)return t;let n=new Set;ui(n,e);let r=[...n];return di.set(e,r),r}}function mi(e){if(e){for(let t=0,n=e.length;t<n;t++)if(e[t].skipPlainObjects){let t=e.filter(e=>!e.skipPlainObjects);return t.length?t:void 0}}return e}var hi=class{constructor(e,t){this.value=e,this.replacement=t}};function gi(e){let t=new Uint8Array(e);if(typeof t.toBase64==`function`)return t.toBase64();let n=``;for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);return btoa(n)}var _i=512;function vi(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):gi(e)}function yi(e){if(e.length<_i||typeof Buffer>`u`)return Zn(e);let t=atob(e),n=new ArrayBuffer(t.length);return Buffer.from(n).write(t,`latin1`),n}function bi(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new Hr(e)}}var xi;function Si(e){return xi||=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get,xi.call(e)}var Ci,wi;function Ti(e,t){return Object.getOwnPropertyDescriptor(e,t).get}function Ei(e,t){return{buffer:Ti(e,`buffer`),byteOffset:Ti(e,`byteOffset`),byteLength:Ti(e,`byteLength`),length:Ti(e,t)}}function Di(e,t){let n;return n=t?wi??=Ei(DataView.prototype,`byteLength`):Ci??=Ei(Object.getPrototypeOf(Int8Array.prototype),`length`),{buffer:n.buffer.call(e),byteOffset:n.byteOffset.call(e),byteLength:n.byteLength.call(e),length:n.length.call(e)}}function Oi(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function ki(e){switch(e){case Qn:case er:case lr:case tr:return!0;default:return!1}}var Ai=1e6,ji=1e4,Mi=2e4;function Ni(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var Pi=1e3,Fi=32,Ii=/\\[pP]\{/g;function Li(e){let t=e.maxBase64Length??Ai;if(!Number.isSafeInteger(t)||t<0)throw RangeError(`maxBase64Length must be a non-negative safe integer`);let n=e.refs??new Map;return`types`in n||Object.assign(n,{types:new Map}),{plugins:e.plugins,refs:n,features:e.features??127^(e.disabledFeatures??0),depthLimit:e.depthLimit||Pi,maxBase64Length:t,regexpPropertyEscapes:Fi}}function Ri(e){return{base:Li(e),marked:void 0}}function zi(e,t){let n={t:4,i:t};if(t<0||!Number.isInteger(t))throw new M(n);if(e.refs.has(t))throw new Ur(n)}function Bi(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}var Vi=()=>{};function N(e,t,n){zi(e.base,t),n instanceof Promise&&n.catch(Vi);let r=e.marked;return(!r||r.has(t))&&e.base.refs.set(t,n),n}function Hi(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new M(e)}function Ui(e,t){return N(e,t.i,Yr(kr(t.s)))}function Wi(e,t){if(!Array.isArray(t))throw new M(e)}function Gi(e,t,n){let r=n.a;Wi(n,r);let i=r.length,a=N(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=P(e,t,o));return Ni(a,n.o),a}function Ki(e,t,n){Oi(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function qi(e,t,n,r,i){if(typeof r==`string`)Ki(n,kr(r),P(e,t,i));else{let a=P(e,t,r);switch(typeof a){case`string`:Ki(n,a,P(e,t,i));break;case`symbol`:ki(a)&&(n[a]=P(e,t,i));break;default:throw new M(r)}}}function Ji(e,t,n){e.base.refs.types.set(t,n)}function Yi(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new M(t)}function Xi(e,t,n,r){let i=n.k;Wi(n,i),Wi(n,n.v);let a=i.length;if(a>0)for(let o=0,s=n.v;o<a;o++)qi(e,t,r,i[o],s[o]);return r}function Zi(e,t,n){let r=N(e,n.i,n.t===10?{}:Object.create(null));return Xi(e,t,n.p,r),Ni(r,n.o),r}function Qi(e,t){return N(e,t.i,new Date(t.s))}function $i(e,t){if(!(e.base.features&64))throw new Lr(t);let n=Temporal[Hi(t,dr,t.c)];return N(e,t.i,n.from(t.s))}function ea(e,t){if(e.base.features&32){let n=kr(t.c);if(n.length>Mi)throw new M(t);if(/[uv]/.test(String(t.m))){let r=n.match(Ii);if(r&&(e.base.regexpPropertyEscapes-=r.length,e.base.regexpPropertyEscapes<0))throw new M(t)}return N(e,t.i,new RegExp(n,t.m))}throw new Lr(t)}function ta(e,t,n){let r=N(e,n.i,new Set);Wi(n,n.a);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(P(e,t,a[i]));return r}function na(e,t,n){let r=N(e,n.i,new Map);Wi(n,n.e.k),Wi(n,n.e.v);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(P(e,t,a[i]),P(e,t,o[i]));return r}function ra(e,t){if(typeof t.s!=`string`)throw new M(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=yi(kr(t.s));return N(e,t.i,n)}function ia(e,t,n,r){let i=P(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new M(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new M(n);return N(e,n.i,r?new r(i,a,n.l):new DataView(i,a,n.l))}function aa(e,t,n,r){if(n.p){let i=Xi(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function oa(e,t,n){return aa(e,t,n,N(e,n.i,AggregateError([],kr(n.m))))}function sa(e,t,n){let r=Hi(n,gr,n.s);return aa(e,t,n,N(e,n.i,new r(kr(n.m))))}function ca(e,t,n){let r=Jn(),i=N(e,n.i,r.p),a=P(e,t,n.f);if(Bi(a))throw new M(n.f);return n.s?r.s(a):r.f(a),i}function la(e,t,n){return N(e,n.i,Object(P(e,t,n.f)))}function ua(e,t){let n=e.s;if(typeof n!=`object`||!n)throw new M(e);let r=[];for(let e of Object.keys(t)){let i=t[e];i&&r.push([Reflect.get(n,e),e,i])}return r}function da(e,t,n){let r=e.base.plugins;if(r){let i=kr(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i){let r=o.validate?ua(n,o.validate):void 0;return N(e,n.i,o.deserialize(n.s,{deserialize:n=>{let a=P(e,t,n);if(r){for(let[e,t,o]of r)if(e===n&&!o(a))throw new zr(i,t)}return a}},{id:n.i}))}}}throw new Rr(n.c)}function fa(e,t){let n=N(e,t.i,N(e,t.s,Jn()).p);return Ji(e,t.s,22),e.base.pending?.add(t.s),n}function pa(e,t,n){let r=e.base.refs.get(n.i);if(r){Yi(e,n,n.i,22);let i=P(e,t,n.a[1]);if(Bi(i))throw new M(n.a[1]);n.t===23?r.s(i):r.f(i),e.base.pending?.delete(n.i)}else throw new Br(`Promise`)}function ma(e,t,n){P(e,t,n.a[0]);let r=P(e,t,n.a[1]);if(!Zr(r))throw new M(n.a[1]);return ti(r)}function ha(e,t,n){P(e,t,n.a[0]);let r=P(e,t,n.a[1]);if(!ai(r))throw new M(n.a[1]);return ci(r)}function ga(e,t,n){let r=N(e,n.i,new ii(n.l===1?1:void 0));Ji(e,n.i,31),e.base.pending?.add(n.i);let i=n.a;Wi(n,i);let a=i.length;if(a)for(let n=0;n<a;n++)P(e,t,i[n]);return r}function _a(e,t,n,r){let i=e.base.refs.get(n.i);if(i)Yi(e,n,n.i,31),i[r](P(e,t,n.f)),r!==`next`&&e.base.pending?.delete(n.i);else throw new Br(`Stream`)}function va(e,t,n){P(e,t,n.f)}function ya(e,t,n){P(e,t,n.a[1])}function ba(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function xa(e,t,n){Wi(n,n.a);let r=n.a.length;if(!(ba(n.s,r)&&ba(n.l,r)))throw new M(n);let i=N(e,n.i,Qr([],n.s,n.l));Ji(e,n.i,35);for(let a=0;a<r;a++)i.v[a]=P(e,t,n.a[a]);return i}function P(e,t,n){if(t>e.base.depthLimit)throw new Wr(e.base.depthLimit);switch(t+=1,n.t){case 2:return Hi(n,hr,n.s);case 0:return Number(n.s);case 1:return kr(String(n.s));case 3:if(String(n.s).length>ji)throw new M(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return Ui(e,n);case 9:return Gi(e,t,n);case 10:case 11:return Zi(e,t,n);case 5:return Qi(e,n);case 6:return ea(e,n);case 7:return ta(e,t,n);case 8:return na(e,t,n);case 19:return ra(e,n);case 16:case 15:return ia(e,t,n,bi(n.c));case 20:return ia(e,t,n);case 14:return oa(e,t,n);case 13:return sa(e,t,n);case 12:return ca(e,t,n);case 17:return Hi(n,fr,n.s);case 21:return la(e,t,n);case 25:return da(e,t,n);case 22:return fa(e,n);case 23:case 24:return pa(e,t,n);case 28:return ma(e,t,n);case 30:return ha(e,t,n);case 31:return ga(e,t,n);case 32:return _a(e,t,n,`next`);case 33:return _a(e,t,n,`throw`);case 34:return _a(e,t,n,`return`);case 27:return va(e,t,n);case 29:return ya(e,t,n);case 35:return xa(e,t,n);case 36:return $i(e,n);default:throw new Lr(n)}}function Sa(e,t){e.base.regexpPropertyEscapes=Fi;try{return P(e,0,t)}catch(e){throw new Pr(e)}}function Ca(e){return Ri({maxBase64Length:e.maxBase64Length,plugins:pi(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit})}function wa(e,t){return Sa(Ca(t),e)}function F(e,t,n,r,i,a,o,s,c,l,u,d){return r===void 0&&i===void 0&&a===void 0&&o===void 0&&s===void 0&&c===void 0&&l===void 0&&u===void 0&&d===void 0?{t:e,i:t,s:n}:{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function Ta(e){return F(2,void 0,e)}var Ea=Ta(2),Da=Ta(3),Oa=Ta(1),ka=Ta(0),Aa=Ta(4),ja=Ta(5),Ma=Ta(6),Na=Ta(7);function Pa(e){for(let t=1;t<=6;t++)if(e instanceof gr[t])return t;return 0}function Fa(e,t){let n=Object.create(null),r=vr[Pa(e)];e.name===r?e.constructor.name!==r&&(n.name=e.constructor.name):n.name=e.name;for(let r of Object.getOwnPropertyNames(e))r!==`name`&&r!==`message`&&(r!==`stack`||t&4)&&(n[r]=e[r]);return n}function Ia(e){return Object.isExtensible(e)?0:Object.isFrozen(e)?3:Object.isSealed(e)?2:1}function La(e){switch(e){case 1/0:return ja;case-1/0:return Ma}return e===e?Object.is(e,-0)?Aa:F(0,void 0,e):Na}function Ra(e){return F(1,void 0,Er(e))}function za(e){return F(3,void 0,``+e)}function Ba(e){return F(4,e)}var Va=Date.prototype.getTime,Ha=Date.prototype.toISOString;function Ua(e,t){let n=Va.call(t);return F(5,e,n===n?Ha.call(t):``)}function Wa(e,t,n,r){return F(36,e,n.prototype.toString.call(r),t)}var Ga=Object.getOwnPropertyDescriptor(RegExp.prototype,`source`).get,Ka=Object.getOwnPropertyDescriptor(RegExp.prototype,`flags`).get;function qa(e,t){return F(6,e,void 0,Er(Ga.call(t)),Ka.call(t))}function Ja(e,t){return F(17,e,mr[t])}function Ya(e,t){return F(18,e,Er(t))}function Xa(e,t,n){return F(25,e,n,Er(t))}function Za(e,t,n){return F(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,Ia(t))}function Qa(e,t){return F(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t)}var $a=1e6;function eo(e){let t=e.length;if(t>$a&&t-Object.keys(e).length>$a)throw new Ir(e)}function to(e,t,n,r,i){let a=e===20,o=r.length;if(o>$a)throw new Ir(n);return F(e,t,void 0,a?void 0:Si(n),void 0,void 0,void 0,void 0,i,r.byteOffset,void 0,o)}function no(e,t,n,r){return F(e,t,Pa(n),void 0,Er(n.message),r)}function ro(e,t){return F(7,e,void 0,void 0,void 0,void 0,void 0,t)}function io(e,t,n){return F(e,void 0,void 0,void 0,void 0,void 0,void 0,[t,n])}function ao(e,t,n,r){return F(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,r)}function oo(e,t,n){return F(e,t,void 0,void 0,void 0,void 0,void 0,void 0,n)}function so(e,t,n,r){return F(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var co={},lo={},uo={0:{},1:{},2:{},3:{},4:{},5:{}};async function fo(e){try{return[1,await e]}catch(e){return[0,e]}}function po(e){return{plugins:e.plugins,plainObjectPlugins:mi(e.plugins),marked:new Set,features:127^(e.disabledFeatures??0),refs:e.refs??new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:e.compactArrayBufferViews??!1}}function mo(e,t,n){return n===Object&&Object.getPrototypeOf(t)===Object.prototype?e.plainObjectPlugins:e.plugins}function ho(e,t){e.marked.add(t)}function go(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function _o(e,t){if(e.size>t)for(let[n,r]of e)r>=t&&e.delete(n)}function vo(e,t){let n=e.refs.get(t);return n==null?go(e,t):(ho(e,n),Ba(n))}function yo(e,t){let n=vo(e,t);if(typeof n!=`number`)return n;let r=Jr(t);return r===void 0?n:Ya(n,r)}function bo(e,t){let n=yo(e,t);if(typeof n!=`number`)return n;if(t in mr)return Ja(n,t);throw new Ir(t)}function xo(e,t){let n=vo(e,uo[t]);return typeof n==`number`?F(26,n,t):n}function So(e){let t=vo(e,co);return typeof t==`number`?F(27,t,void 0,void 0,void 0,void 0,void 0,void 0,bo(e,tr)):t}function Co(e){let t=vo(e,lo);return typeof t==`number`?F(29,t,void 0,void 0,void 0,void 0,void 0,[xo(e,1),bo(e,Qn)]):t}function wo(e){switch(e){case Temporal.Instant:return 0;case Temporal.Duration:return 1;case Temporal.PlainDate:return 2;case Temporal.PlainDateTime:return 3;case Temporal.PlainMonthDay:return 4;case Temporal.PlainTime:return 5;case Temporal.PlainYearMonth:return 6;case Temporal.ZonedDateTime:return 7;default:return}}function To(e){let t=Object.getPrototypeOf(e);if(t===null)return;if(t===Object.prototype)return Object;let n=t.constructor;return typeof n!=`function`||n===Object||n.prototype===t?n:t}function Eo(e,t,n){switch(t){case Object:return 1;case void 0:return 2;case Date:return 3;case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return 4;case Number:case Boolean:case String:case BigInt:return 6;case ArrayBuffer:return 7;case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return 8;case DataView:return 10;case Map:return 11;case Set:return 12}if(t===Promise||e instanceof Promise)return 13;if(n&32&&t===RegExp)return 14;if(n&16&&(t===BigInt64Array||t===BigUint64Array))return 9;if(n&1&&typeof AggregateError<`u`&&(t===AggregateError||e instanceof AggregateError))return 5;if(n&64&&typeof Temporal<`u`&&wo(t)!=null)return 15;if(ArrayBuffer.isView(e)){let t=Si(e);if(t===void 0)return 10;if(t!==`BigInt64Array`&&t!==`BigUint64Array`)return 8;if(n&16)return 9}return e instanceof Error?4:tr in e||Qn in e?16:0}function Do(e,t,n,r){return F(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,Ia(t))}function Oo(e){return xo(e,0)}function ko(e,t,n,r){return F(8,e,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,t)}function Ao(e,t){return e.compactArrayBufferViews?{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,byteOffset:0,byteLength:t.byteLength,length:t.length}:t}function jo(e,t,n){return F(19,t,vi(n),void 0,void 0,void 0,void 0,void 0,xo(e,5))}function Mo(e){return{base:po(e)}}function No(){}function Po(e){for(let t of e)t instanceof Promise&&Promise.prototype.then.call(t,void 0,No)}async function Fo(e,t,n){eo(n);let r=n.length,i=Array(r),a=Array(r),o=Array(r);for(let e=0;e<r;e++)o[e]=e in n,o[e]&&(a[e]=n[e]);Po(a);for(let n=0,s;n<r;n++)o[n]?(s=Qo(e,t,a[n]),i[n]=s instanceof Promise?await s:s):i[n]=0;return i}async function Io(e,t,n,r){return Za(n,r,await Fo(e,t,r))}async function Lo(e,t,n){let r=Object.keys(n),i=r.length,a=Array(i),o=Array(i),s=Array(i);for(let e=0;e<i;e++)s[e]=n[r[e]];Po(s);for(let n=0,c;n<i;n++)a[n]=Er(r[n]),c=Qo(e,t,s[n]),o[n]=c instanceof Promise?await c:c;return tr in n&&(a.push(bo(e.base,tr)),o.push(io(28,So(e.base),await $o(e,t,$r(n))))),Qn in n&&(a.push(bo(e.base,Qn)),o.push(io(30,Co(e.base),await Jo(e,t,n)))),lr in n&&(a.push(bo(e.base,lr)),o.push(Ra(n[lr]))),er in n&&(a.push(bo(e.base,er)),o.push(n[er]?Ea:Da)),{k:a,v:o}}async function Ro(e,t,n,r,i){return Do(n,r,i,await Lo(e,t,r))}async function zo(e,t,n,r){let i=Qo(e,t,r.valueOf());return Qa(n,i instanceof Promise?await i:i)}async function Bo(e,t,n,r,i){let a=Ao(e.base,Di(i,n===20));return to(n,r,i,a,await $o(e,t,a.buffer))}async function Vo(e,t,n,r,i){let a=Fa(i,e.base.features);return no(n,r,i,a?await Lo(e,t,a):void 0)}async function Ho(e,t,n,r){let i=Oo(e.base),a=[...r.entries()],o=Array(a.length),s=Array(a.length),c=Array(a.length),l=Array(a.length);for(let e=0;e<a.length;e++)c[e]=a[e][0],l[e]=a[e][1];Po(c),Po(l);for(let n=0,r;n<a.length;n++)r=Qo(e,t,c[n]),o[n]=r instanceof Promise?await r:r,r=Qo(e,t,l[n]),s[n]=r instanceof Promise?await r:r;return ko(n,i,o,s)}async function Uo(e,t,n,r){let i=[...r.keys()],a=Array(i.length);Po(i);for(let n=0,r;n<i.length;n++)r=Qo(e,t,i[n]),a[n]=r instanceof Promise?await r:r;return ro(n,a)}async function Wo(e,t,n,r,i){if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return Xa(n,o.tag,await o.parse.async(r,{parse:n=>$o(e,t,n),parseStreamSource(n){if(t>=e.base.depthLimit)throw new Wr(e.base.depthLimit);return Jo(e,t+1,n)}},{id:n}))}}async function Go(e,t,n,r){let[i,a]=await fo(r);return F(12,n,i,void 0,void 0,void 0,void 0,void 0,await $o(e,t,a))}function Ko(e,t,n,r,i){let a=[],o=0,s=!1,c=!1,l=e=>{if(!c){c=!0;try{f(e)}catch{}i(e)}},u=n=>(u,d)=>{if(c)return;ho(this.base,t);let p=a.push(void 0)-1;o++,n!==32&&(s=!0),$o(this,e,u).then(e=>{if(!c&&(a[p]=oo(n,t,e),o--,d?.(),s&&o===0)){c=!0;try{f()}catch(e){i(e);return}r(a)}},l)},d={next:u(32),throw:u(33),return:u(34)},f=ri(n)?n.pump(d):n.on(d)}async function qo(e,t,n,r){return ao(n,xo(e.base,4),await new Promise(Ko.bind(e,t,n,r)))}async function Jo(e,t,n){let r=go(e.base,{}),i=xo(e.base,4),a=n[Qn](),o=[];for(;;){let n;ho(e.base,r);try{n=await a.next()}catch(n){o.push(oo(33,r,await $o(e,t,n)));break}let i;try{i=await $o(e,t,n.value)}catch(e){throw Promise.resolve().then(()=>a.return?.()).catch(()=>{}),e}if(o.push(oo(n.done?34:32,r,i)),n.done)break}return ao(r,i,o)}async function Yo(e,t,n,r){let i=r.v.length,a=Array(i);for(let n=0,o;n<i;n++)o=Qo(e,t,r.v[n]),a[n]=o instanceof Promise?await o:o;return so(n,a,r.t,r.d)}async function Xo(e,t,n,r){if(Array.isArray(r))return Io(e,t,n,r);if(ai(r))return qo(e,t,n,r);if(Zr(r))return Yo(e,t,n,r);let i=To(r);if(i===hi)return $o(e,t,r.replacement);let a=await Wo(e,t,n,r,mo(e.base,r,i));if(a)return a;if(i===Object)return Ro(e,t,n,r,!1);switch(Eo(r,i,e.base.features)){case 2:return Ro(e,t,n,r,!0);case 3:return Ua(n,r);case 4:return Vo(e,t,13,n,r);case 5:return Vo(e,t,14,n,r);case 6:return zo(e,t,n,r);case 7:return jo(e.base,n,r);case 8:return Bo(e,t,15,n,r);case 9:return Bo(e,t,16,n,r);case 10:return Bo(e,t,20,n,r);case 11:return Ho(e,t,n,r);case 12:return Uo(e,t,n,r);case 13:return Go(e,t,n,r);case 14:return qa(n,r);case 15:return Wa(n,wo(i),i,r);case 16:return Ro(e,t,n,r,!!i);default:throw new Ir(r)}}async function Zo(e,t,n){let r=yo(e.base,n);if(typeof r!=`number`)return r;let i=await Wo(e,t,r,n,e.base.plugins);if(i)return i;throw new Ir(n)}function Qo(e,t,n){if(t>=e.base.depthLimit)throw new Wr(e.base.depthLimit);switch(typeof n){case`boolean`:return n?Ea:Da;case`undefined`:return Oa;case`string`:return Ra(n);case`number`:return La(n);case`bigint`:return za(n);case`object`:if(n){let r=yo(e.base,n);return typeof r==`number`?Xo(e,t+1,r,n):r}return ka;case`symbol`:return bo(e.base,n);case`function`:return Zo(e,t,n);default:throw new Ir(n)}}async function $o(e,t,n){return await Qo(e,t,n)}async function es(e,t){let n=e.base.refs,r=n.size;try{return await $o(e,0,t)}catch(e){throw _o(n,r),e instanceof Nr?e:new Nr(e)}}async function ts(e,t={}){let n=pi(t.plugins),r=Mo({compactArrayBufferViews:t.compactArrayBufferViews,depthLimit:t.depthLimit,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await es(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function ns(e){return li({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n){return{v:n.parse(e.toSerializable(t))}},async async(t,n){return{v:await n.parse(e.toSerializable(t))}},stream(t,n){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t.v))}})}function rs(e){if(Array.isArray(e))return e.flatMap(e=>rs(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function is(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function as(...e){return e.reduce((e,t)=>{let n=is(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?rs(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var os=li({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),ss=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function cs(e){let t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(``))}var ls=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function us(e){try{return`t`+ls.decode(e)}catch{return`b`+cs(e)}}function ds(e,t,n){n?.throwIfAborted();let r=oi(),i=e.getReader(),a=!0,o=()=>{a=!1,n?.removeEventListener(`abort`,c),i.releaseLock()},s=e=>a?(i.cancel(e).catch(()=>{}),o(),!0):!1,c=()=>{s(n.reason)&&r.throw(n.reason)};return n?.addEventListener(`abort`,c),(async()=>{try{for(;a;){let{done:e,value:n}=await i.read();if(!a)return;if(e){o(),r.return(void 0);return}r.next(t(n))}}catch(e){s(e)&&r.throw(e)}})(),[r,s]}function fs(e){return li({tag:`tss/RawStream`,test:e=>e instanceof ss,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=ds(t.stream,t.hint===`text`?us:cs,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var ps=fs(),ms=new WeakSet;function hs(e){if(typeof e==`object`&&e){if(ms.has(e))throw Error(`Expected a value used by one plugin value only.`);ms.add(e)}return e}var gs={},_s=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),vs=li({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===gs},parse:{sync(){return gs},async async(){return await Promise.resolve(gs)},stream(){return gs}},serialize(){return _s.toString()},deserialize(){return gs}});function ys(e){return{[Symbol.asyncIterator](){let t=e.getReader(),n=!0,r=!1,i=()=>{try{t.releaseLock()}catch{}};return{async next(){if(!n)return{done:!0,value:void 0};r=!0;let e;try{e=await t.read()}catch(e){if(r=!1,i(),!n)return{done:!0,value:void 0};throw n=!1,e}return r=!1,!n||e.done?(n=!1,i(),{done:!0,value:void 0}):e},return(e){if(n){n=!1;try{t.cancel(e).catch(()=>{})}catch{}r||i()}return Promise.resolve({done:!0,value:void 0})}}}}}var bs=li({tag:`seroval/plugins/web/ReadableStream`,extends:[vs],skipPlainObjects:!0,test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{async async(e,t){return{factory:await t.parse(gs),stream:await t.parseStreamSource(ys(e))}},stream(e,t){return{factory:t.parse(gs),stream:t.parseStreamSource(ys(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},validate:{stream:ai},deserialize(e,t){return _s(hs(t.deserialize(e.stream)))}});function xs(e){return[os,e?fs(e):ps,bs]}[...xs()];function Ss(e){return li({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function Cs(e){return[...(_()?.serializationAdapters)?.map(ns)??[],...e]}function ws(e){return Cs(xs(e))}var Ts=new TextDecoder,Es=new Uint8Array,Ds=new ByteLengthQueuingStrategy({highWaterMark:0});function Os(e){let t=e.getReader(),n=new Map,r=0,i,a,o=()=>{i?.(),i=void 0},s=(e,t)=>{let n=e[1];e[1]=!1,n&&(t===1?n.close():n.error(t[0]))},c=new ReadableStream({start(e){a=e},pull:o,cancel(e){let i=[e===void 0?Error(`Framed response cancelled`):e];r=i,o(),t.cancel(e).catch(()=>{});for(let e of n.values())s(e,i)}});function l(e){let t=n.get(e);if(t)return t;if(n.size>=1024)throw Error(`Too many raw streams`);let i,a=[new ReadableStream({start(e){i=e},cancel(){a[1]!==!1&&(a[1]=null)}},Ds),i];return n.set(e,a),r!==0&&s(a,r),a}function u(e){if(e===0||e>>>0!==e)throw RangeError(`Invalid raw stream ID`);return l(e)[0]}return(async()=>{let e=Es,o=0;async function c(){for(;o===e.byteLength;){e=Es,o=0;let n=await t.read();if(r!==0||n.done)return!1;e=n.value}return!0}async function u(t,n){if(t===0)return Es;if(!await c()){if(n)return;throw Error(`Incomplete frame`)}if(e.byteLength-o>=t){let n=e.subarray(o,o+t);return o+=t,o===e.byteLength&&(e=Es,o=0),n}let r=new Uint8Array(t),i=0;for(;i<t;){if(!await c())throw Error(`Incomplete frame`);let n=Math.min(t-i,e.byteLength-o);r.set(e.subarray(o,o+n),i),o+=n,i+=n}return o===e.byteLength&&(e=Es,o=0),r}try{for(;r===0;){let e=await u(9,!0);if(r!==0)return;if(!e){for(let e of n.values())if(e[1])throw Error(`Incomplete raw stream`);r=1,a.close();return}let t=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,c=(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0;if(e=Es,t>3||t===0!=(o===0)||c>16777216||t===2&&c!==0)throw Error(`Invalid frame`);let d=t===0?void 0:l(o);if(d?.[1]===!1)throw Error(`Raw stream already ended`);let f=await u(c);if(r!==0)return;if(!d){let e=Ts.decode(f);for(f=Es,a.enqueue(e);r===0&&a.desiredSize<=0;)await new Promise(e=>{i=e})}else if(t===1){let e=d[1];if(e){if(-e.desiredSize>134217728){e.error(Error(`Raw stream ${o} has too many unread bytes`)),d[1]=null,f=Es;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=Es,e.enqueue(t)}}else s(d,t===2?1:[Error(Ts.decode(f))])}}catch(e){if(r===0){let i=[e];r=i,t.cancel(e).catch(()=>{}),a.error(e);for(let e of n.values())s(e,i)}}finally{e=Es,t.releaseLock()}})(),[c,u]}var ks=`Error preloading route! ☝️`,As=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=_t:this.parentRoute||Oe();let r=n?_t:t?.path;r&&r!==`/`&&(r=ve(r));let i=t?.id||r,a=n?_t:_e((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:_e(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=ye(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>b({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},js=class extends As{constructor(e){super(e)}},Ms;function Ns(e,t,n){try{return wa(e,t)}catch(e){throw Fs(n),e}}async function Ps(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function Fs(e){for(let t of e)t.catch(()=>{});e.length=0}var Is=Object.prototype.hasOwnProperty;function Ls(e){for(let t in e)if(Is.call(e,t))return!0;return!1}async function Rs(e,t,n){Ms||=ws();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData,o=new Headers(r.headers);if(o.set(`x-tsr-serverFn`,`true`),a||o.set(`accept`,`${g}, application/x-ndjson, application/json`),r.method===`GET`){if(a)throw Error(`FormData is not supported with GET requests`);let t=await zs(r);if(t!==void 0){let n=lt({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await Vs(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),Hs(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function zs(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&Ls(e.context)&&((t??={}).context=e.context),t?Bs(t,e.signal):void 0}async function Bs(e,t){t?.throwIfAborted();let n;try{n=await ts(e,{plugins:t?ws(t):Ms})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function Vs(e){if(e.data instanceof FormData){let t;return e.context&&Ls(e.context)&&(t=await Bs(e.context,e.signal)),t!==void 0&&e.data.set(f,t),e.data}return zs(e)}async function Hs(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw e}let n=t.headers.get(h);if(n===`true`)return t;if(n===`thrown`)throw t;let r=t.headers.get(`content-type`);if(r||Oe(),t.headers.get(`x-tss-serialized`)){let e;if(r.includes(`application/x-tss-framed`)){let n=/;\s*v=(\d+)/.exec(r)?.[1];if(n&&+n!=1)throw Error(`Unsupported framed protocol version ${n}`);if(!t.body)throw Error(`No response body for framed response`);let[i,a]=Os(t.body);e=await Us(i,[Ss(a),...Ms])}else if(r.includes(`application/json`)){let n=await t.json(),r=[];e=Ns(n,{plugins:Ms},r),await Ps(r)}return e||Oe(),e}if(r.includes(`application/json`)){let e=await t.json(),n=S(e);if(n)throw n;if(y(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function Us(e,t){let n=e.getReader(),r={refs:new Map,plugins:t},i=e=>{n.cancel(e).catch(()=>{})},a,o=[];try{let e=await n.read();if(e.done)throw Error(`Stream ended before first object`);a=Ns(JSON.parse(e.value),r,o)}catch(e){throw i(e),n.releaseLock(),e}return(async()=>{let e=[];try{for(;;){let t=await n.read();if(t.done)return;Ns(JSON.parse(t.value),r,e),Fs(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await Ps(o),a}function I(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=_()?.serverFns?.fetch;return Rs(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[p]:!0})}var L=l(d(),1),Ws=L.use,Gs=L.useLayoutEffect,Ks=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),qs=o(((e,t)=>{t.exports=Ks()})),Js=L.createContext(null);function Ys(e){return L.useContext(Js)}function Xs(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{on(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Zs=L.createContext(void 0),Qs=L.createContext(void 0),$s=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),ec=o(((e,t)=>{t.exports=$s()})),tc=o((e=>{var t=d(),n=ec();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),nc=o(((e,t)=>{t.exports=tc()})),rc=nc();function ic(e,t){return e===t}function ac(e,t=e=>e,n){let r=n?.compare??ic,i=(0,L.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,L.useCallback)(()=>e.get(),[e]);return(0,rc.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var oc={};function sc(e,t){let n=L.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=re(n.current,i):i}}function cc(e){let t=Ys(),n=L.useContext(e.from?Qs:Zs),r=e.from??n,i=t.stores.getMatchStore(r),a=sc(e,t),o=ac(i,e=>e?a(e):oc);if(o!==oc)return o;(e.shouldThrow??!0)&&Oe()}function lc(e){return cc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function uc(e){let{select:t,...n}=e;return cc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function dc(e){return cc({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function fc(e){return cc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function pc(e){let t=Ys();return L.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function mc(e){return cc({...e,select:t=>e.select?e.select(t.context):t.context})}var hc=qs();function gc(...e){let t=L.useRef(e),n=t.current;return e.forEach((e,t)=>{O(n[t],e,!1,!0)||(n[t]=e)}),t.current}function _c(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(ks)})}function vc(e,t){let n=typeof e==`string`&&ce(e);if(n)return t.has(n)?e:null}function yc(e,t,n,r){let i=xe(e.pathname,r),a=xe(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!O(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function bc(e,t,n){let r=Ys(),i=L.useRef(null),a=L.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=gc(e.search,e.params,o),x=L.useContext(Zs),S=(r.stores._linkScopes??={})[x]??=Xs(r,x),[C,w,T]=L.useMemo(()=>{let t=vc(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Oc(t,r,u),s=u||o&&!ce(o)?yc(e,t,b,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[E,ee]=L.useSyncExternalStore(S[1],w,T||w),te=ee===void 0&&E,ne=u||E===void 0,re=L.useRef(!1),D=e.reloadDocument||te||ne?!1:c??r.options.defaultPreload,O=l??r.options.defaultPreloadDelay??0,ie=L.useCallback(e=>{let t=e?.isIntersecting;t??D===`intent`?O?i.t??=setTimeout(()=>{i.t=void 0,_c(r,C)},O):_c(r,C):t===!1&&Ec(i)},[r,C,i,D,O]);L.useEffect(()=>{if(!D)return;D===`render`&&!re.current&&(re.current=!0,_c(r,C));let e=!0,t;return D===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&ie(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Ec(i)}},[r,C,D,ie,i]);let k=wc(e,n);if(k.ref=t?a:i,te)return k.href=te,k;let ae=t=>{let n=d??t.currentTarget.getAttribute(`target`);ne||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),Ec(i),r.navigate({...e,_fromLocation:C._fromLocation}))},oe=()=>{D===`intent`&&_c(r,C)},se=()=>{D===`intent`&&Ec(i)};return k.onClick=Dc(f,ae),k.onBlur=Dc(p,se),k.onFocus=Dc(m,ie),k.onMouseEnter=Dc(h,ie),k.onMouseLeave=Dc(g,se),k.onTouchStart=Dc(_,oe),Tc(k,e,ee,E,ne,n)}var xc={},Sc={className:`active`},Cc=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function wc(e,t){let n={};for(let r in e)Cc.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Tc(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=T(n?o:s,{})??(n?Sc:xc);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Ec=e=>{clearTimeout(e.t),e.t=void 0},Dc=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Oc(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!ue(i,t.protocolAllowlist))return i}var kc=L.memo(L.forwardRef((e,t)=>{let n=e._asChild||`a`,r=bc(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return L.createElement(n,r,i)}),Ac);function Ac(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Cc.has(r)||!O(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var jc=class extends As{constructor(e){super(e),this.useMatch=e=>cc({...e,from:this.id}),this.useRouteContext=e=>mc({...e,from:this.id}),this.useSearch=e=>fc({...e,from:this.id}),this.useParams=e=>dc({...e,from:this.id}),this.useLoaderDeps=e=>uc({...e,from:this.id}),this.useLoaderData=e=>lc({...e,from:this.id}),this.useNavigate=()=>pc({from:this.fullPath}),this.Link=L.forwardRef((e,t)=>(0,hc.jsx)(kc,{ref:t,from:this.fullPath,...e}))}};function Mc(e){return new jc(e)}var Nc=class extends js{constructor(e){super(e),this.useMatch=e=>cc({...e,from:this.id}),this.useRouteContext=e=>mc({...e,from:this.id}),this.useSearch=e=>fc({...e,from:this.id}),this.useParams=e=>dc({...e,from:this.id}),this.useLoaderDeps=e=>uc({...e,from:this.id}),this.useLoaderData=e=>lc({...e,from:this.id}),this.useNavigate=()=>pc({from:this.fullPath}),this.Link=L.forwardRef((e,t)=>(0,hc.jsx)(kc,{ref:t,from:this.fullPath,...e}))}};function Pc(e){return new Nc(e)}function Fc(e){return e=>{let t=Mc(e);return t.isRoot=!1,t}}function Ic(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(ie(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(Ws)Ws(a());else throw a()}return L.createElement(r,e)};return o.preload=a,o}function Lc(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Rc(e,t){let n=Object.create(null);if(e){let t=Object.keys(e);for(let r=0;r<t.length;r++){let i=t[r];Lc(i)&&(n[i]=e[i])}}if(t&&typeof t==`object`){let e=Object.keys(t);for(let r=0;r<e.length;r++){let i=e[r];Lc(i)&&(n[i]=t[i])}}return n}function zc(e){return e?Rc(e,void 0):Object.create(null)}var Bc=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},R=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>R(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.forEach(e=>{m in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=R(void 0,{...n,middleware:t});return r[m]=!0,r},validator:e=>R(void 0,{...n,validator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],Kc(i)];return t.method=n.method,Object.assign(async e=>{let n=await Uc(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:zc()});if(`error`in n)throw S(n.error)??n.error;return n.result},{...t,method:n.method,__executeServer:void 0})}})};function Vc(e,t){return e===void 0&&t===void 0?void 0:Rc(e,t)}function Hc(e,t){return e||t?as(e,t):void 0}async function Uc(e,t,n){let r=Wc((_()?.functionMiddleware||[]).concat(e),void 0,t===`server`?new Set(Bc({throwIfNotFound:!1})?.executedRequestMiddlewares):void 0),i=0,a=async(e,n)=>{let o=e;n!==void 0&&(o={...e,...n},o.context=Rc(e.context,n.context),o.sendContext=Vc(e.sendContext,n.sendContext),o.headers=Hc(e.headers,n.headers),o._callSiteFetch=e._callSiteFetch,o.fetch=e._callSiteFetch??n.fetch??e.fetch,o.result=n.result===void 0?n instanceof Response?n:e.result:n.result);let s=o;for(;i<r.length;){let e=r[i++].options,n=e.validator;n&&t===`server`&&(o.data=await Gc(n,o.data));let c=t===`client`?e.client:e.server;if(c){if(s=await c({...o,next:(e={})=>a(o,e)}),s instanceof Response){if(x(s))throw s;s={...o,result:s}}else if(!s)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);break}}if(`error`in s)throw s.error;return s},o={...n,headers:n.headers||(t===`client`?{}:void 0),sendContext:n.sendContext,context:n.context||zc(),_callSiteFetch:n.fetch};o.sendContext!==void 0&&(o.sendContext||={});try{return await a(o)}catch(e){return{...o,error:e}}}function Wc(e,t=100,n=new Set){let r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function Gc(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function Kc(e){return{"~types":void 0,options:{validator:e.validator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:void 0}}}var qc=R({method:`GET`}).handler(I(`1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f`)),Jc=R({method:`GET`}).handler(I(`c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2`)),Yc=R({method:`GET`}).handler(I(`949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1`)),Xc=R({method:`POST`}).handler(I(`a9edf8f42685a06ce282bb7c9f888e3ae39636f350a90750c31a47b27de7dca8`)),Zc=R({method:`POST`}).handler(I(`fd40d9026eb7d8fb5ab200daaed9a58f1d7b4eaf5b1ccab3e4cef9b0fedd9bc4`)),Qc=R({method:`GET`}).handler(I(`9354c2231554471ec5cde4e9a07b2e32662a8ce0bf29b09b5b930359d374f862`)),$c=R({method:`GET`}).handler(I(`8ade0e7bba4102fdb7cbe0494762fbb0d01a480c84a69f325fc76686a0dc0237`)),el=R({method:`GET`}).handler(I(`86933afdbcaa1be4a0aa07c4f8e690fdd684edbeab02a49ffdb73e85cadf9933`)),tl=R({method:`GET`}).handler(I(`8fc5d548afdc47f30ea4f9fab6f96cf926fd407c0b80ea68c796b6de7e606a4e`)),nl=R({method:`GET`}).handler(I(`a4d3bc63ce8ef43aeb81dfb47c631fe47d634d298109d6b5865742aff7363696`)),rl=R({method:`GET`}).handler(I(`54a67fa946c48ef3e3aaa27c8b323c380b12a14879a00a9567f52e31c358a0ed`)),il=R({method:`POST`}).handler(I(`c263ee8bf14396211aeb95bc2b2aec914480b38cc99a9024c1319f932f590f2f`)),al=R({method:`GET`}).handler(I(`e97a9c2b8715ff5e25a9629262b594fb42f11853d6eea78b87305fd0b5155d4d`)),ol=R({method:`POST`}).handler(I(`0c2f8fcb35c5e356e4a58fce376bb16efb0e006f519592fdd5f120fa868720cd`)),sl=R({method:`POST`}).handler(I(`950c0a9412e17ae8308bccd862dee5faea0375153c5ce59491a033dbcb7e7181`)),cl=R({method:`POST`}).handler(I(`7028d75aed3e58a91f5f26a3821d0cec6bb478a913058f5aa73cbfb64bbc41d3`)),ll=R({method:`POST`}).handler(I(`a1b47d616a31acc3132c1bb8258bde961d9c419ff91b2ce1d6479ebb9760b393`)),ul=R({method:`GET`}).handler(I(`8ff7e08627330b1c64257ee12b7ed04815853cb3735a9324805c0bcf149bae9f`)),dl=R({method:`POST`}).handler(I(`0dcf3aa141898f7bb0cefed3e6129613f6226a680cc800b8cb18d2c60b7706fa`)),fl=R({method:`POST`}).handler(I(`b4629be951e5766734fb72f9e1400c19f585a4381d9172539b2512ae5056f4e8`)),pl=R({method:`POST`}).handler(I(`51bfd02b4d1772943ec480c2dcd7b445826bcfa7d494453d269cc82644ea2a42`)),ml=R({method:`POST`}).handler(I(`2727b9721f5d291dbb62652d2de5cff55fd7871756147d8ce441b03a7a494617`)),hl=R({method:`GET`}).handler(I(`8e8646e3fd8b630ba5696313fb01543dc62410ff8fa9b1eea9763286d32c8927`)),gl=R({method:`POST`}).handler(I(`2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220`)),_l=`modulepreload`,vl=function(e){return`/`+e},yl={},bl=function(e){return e.pathname.endsWith(`.css`)},xl=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Sl=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=vl(t,n);let r=s(t),i=bl(r);return xl(yl,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:_l,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},z;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(z||={});var Cl;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Cl||={});var B=z.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),wl=e=>{switch(typeof e){case`undefined`:return B.undefined;case`string`:return B.string;case`number`:return Number.isNaN(e)?B.nan:B.number;case`boolean`:return B.boolean;case`function`:return B.function;case`bigint`:return B.bigint;case`symbol`:return B.symbol;case`object`:return Array.isArray(e)?B.array:e===null?B.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?B.promise:typeof Map<`u`&&e instanceof Map?B.map:typeof Set<`u`&&e instanceof Set?B.set:typeof Date<`u`&&e instanceof Date?B.date:B.object;default:return B.unknown}},V=z.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Tl=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Tl.create=e=>new Tl(e);var El=(e,t)=>{let n;switch(e.code){case V.invalid_type:n=e.received===B.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case V.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,z.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:n=`Unrecognized key(s) in object: ${z.joinValues(e.keys,`, `)}`;break;case V.invalid_union:n=`Invalid input`;break;case V.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${z.joinValues(e.options)}`;break;case V.invalid_enum_value:n=`Invalid enum value. Expected ${z.joinValues(e.options)}, received '${e.received}'`;break;case V.invalid_arguments:n=`Invalid function arguments`;break;case V.invalid_return_type:n=`Invalid function return type`;break;case V.invalid_date:n=`Invalid date`;break;case V.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:z.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case V.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case V.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case V.custom:n=`Invalid input`;break;case V.invalid_intersection_types:n=`Intersection results could not be merged`;break;case V.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case V.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,z.assertNever(e)}return{message:n}},Dl=El;function Ol(){return Dl}var kl=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function H(e,t){let n=Ol(),r=kl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===El?void 0:El].filter(e=>!!e)});e.common.issues.push(r)}var U=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return W;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return W;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},W=Object.freeze({status:`aborted`}),Al=e=>({status:`dirty`,value:e}),G=e=>({status:`valid`,value:e}),jl=e=>e.status===`aborted`,Ml=e=>e.status===`dirty`,Nl=e=>e.status===`valid`,Pl=e=>typeof Promise<`u`&&e instanceof Promise,K;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(K||={});var Fl=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Il=(e,t)=>{if(Nl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Tl(e.common.issues);return this._error=t,this._error}}};function q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var J=class{get description(){return this._def.description}_getType(e){return wl(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:wl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new U,ctx:{common:e.parent.common,data:e.data,parsedType:wl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Pl(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wl(e)};return Il(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wl(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Nl(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Nl(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wl(e)},r=this._parse({data:e,path:n.path,parent:n});return Il(n,await(Pl(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:V.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Ru({schema:this,typeName:X.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return zu.create(this,this._def)}nullable(){return Bu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bu.create(this)}promise(){return Lu.create(this,this._def)}or(e){return Su.create([this,e],this._def)}and(e){return Eu.create(this,e,this._def)}transform(e){return new Ru({...q(this._def),schema:this,typeName:X.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Vu({...q(this._def),innerType:this,defaultValue:t,typeName:X.ZodDefault})}brand(){return new Wu({typeName:X.ZodBranded,type:this,...q(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Hu({...q(this._def),innerType:this,catchValue:t,typeName:X.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Gu.create(this,e)}readonly(){return Ku.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ll=/^c[^\s-]{8,}$/i,Rl=/^[0-9a-z]+$/,zl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Bl=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Vl=/^[a-z0-9_-]{21}$/i,Hl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ul=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Wl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gl=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Kl,ql=/^(?:(?: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])$/,Jl=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Yl=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Xl=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Zl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ql=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$l=`((\\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])))`,eu=RegExp(`^${$l}$`);function tu(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function nu(e){return RegExp(`^${tu(e)}$`)}function ru(e){let t=`${$l}T${tu(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function iu(e,t){return!((t!==`v4`&&t||!ql.test(e))&&(t!==`v6`&&t||!Yl.test(e)))}function au(e,t){if(!Hl.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function ou(e,t){return!((t!==`v4`&&t||!Jl.test(e))&&(t!==`v6`&&t||!Xl.test(e)))}var su=class e extends J{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==B.string){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.string,received:t.parsedType}),W}let t=new U,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:V.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:V.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?H(n,{code:V.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&H(n,{code:V.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)Wl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`email`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)Kl||=new RegExp(Gl,`u`),Kl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`emoji`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Bl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`uuid`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)Vl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`nanoid`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Ll.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`cuid`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Rl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`cuid2`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)zl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`ulid`,code:V.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),H(n,{validation:`url`,code:V.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`regex`,code:V.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?ru(r).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?eu.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?nu(r).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:V.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Ul.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`duration`,code:V.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?iu(e.data,r.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`ip`,code:V.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?au(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`jwt`,code:V.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?ou(e.data,r.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`cidr`,code:V.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Zl.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`base64`,code:V.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?Ql.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:`base64url`,code:V.invalid_string,message:r.message}),t.dirty()):z.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:V.invalid_string,...K.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...K.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...K.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...K.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...K.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...K.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...K.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...K.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...K.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...K.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...K.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...K.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...K.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...K.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...K.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...K.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...K.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...K.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...K.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...K.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...K.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...K.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...K.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...K.errToObj(t)})}nonempty(e){return this.min(1,K.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};su.create=e=>new su({checks:[],typeName:X.ZodString,coerce:e?.coerce??!1,...q(e)});function cu(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var lu=class e extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==B.number){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.number,received:t.parsedType}),W}let t,n=new U;for(let r of this._def.checks)r.kind===`int`?z.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),H(t,{code:V.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?cu(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),H(t,{code:V.not_finite,message:r.message}),n.dirty()):z.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,K.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,K.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,K.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,K.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:K.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:K.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:K.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:K.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:K.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:K.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:K.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&z.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};lu.create=e=>new lu({checks:[],typeName:X.ZodNumber,coerce:e?.coerce||!1,...q(e)});var uu=class e extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==B.bigint)return this._getInvalidInput(e);let t,n=new U;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),H(t,{code:V.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):z.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.bigint,received:t.parsedType}),W}gte(e,t){return this.setLimit(`min`,e,!0,K.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,K.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,K.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,K.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:K.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:K.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:K.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:K.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:K.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:K.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};uu.create=e=>new uu({checks:[],typeName:X.ZodBigInt,coerce:e?.coerce??!1,...q(e)});var du=class extends J{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==B.boolean){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.boolean,received:t.parsedType}),W}return G(e.data)}};du.create=e=>new du({typeName:X.ZodBoolean,coerce:e?.coerce||!1,...q(e)});var fu=class e extends J{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==B.date){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.date,received:t.parsedType}),W}if(Number.isNaN(e.data.getTime()))return H(this._getOrReturnCtx(e),{code:V.invalid_date}),W;let t=new U,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:V.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:V.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):z.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:K.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:K.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};fu.create=e=>new fu({checks:[],coerce:e?.coerce||!1,typeName:X.ZodDate,...q(e)});var pu=class extends J{_parse(e){if(this._getType(e)!==B.symbol){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.symbol,received:t.parsedType}),W}return G(e.data)}};pu.create=e=>new pu({typeName:X.ZodSymbol,...q(e)});var mu=class extends J{_parse(e){if(this._getType(e)!==B.undefined){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.undefined,received:t.parsedType}),W}return G(e.data)}};mu.create=e=>new mu({typeName:X.ZodUndefined,...q(e)});var hu=class extends J{_parse(e){if(this._getType(e)!==B.null){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.null,received:t.parsedType}),W}return G(e.data)}};hu.create=e=>new hu({typeName:X.ZodNull,...q(e)});var gu=class extends J{constructor(){super(...arguments),this._any=!0}_parse(e){return G(e.data)}};gu.create=e=>new gu({typeName:X.ZodAny,...q(e)});var _u=class extends J{constructor(){super(...arguments),this._unknown=!0}_parse(e){return G(e.data)}};_u.create=e=>new _u({typeName:X.ZodUnknown,...q(e)});var vu=class extends J{_parse(e){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.never,received:t.parsedType}),W}};vu.create=e=>new vu({typeName:X.ZodNever,...q(e)});var yu=class extends J{_parse(e){if(this._getType(e)!==B.undefined){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.void,received:t.parsedType}),W}return G(e.data)}};yu.create=e=>new yu({typeName:X.ZodVoid,...q(e)});var bu=class e extends J{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==B.array)return H(t,{code:V.invalid_type,expected:B.array,received:t.parsedType}),W;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(H(t,{code:e?V.too_big:V.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(H(t,{code:V.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(H(t,{code:V.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Fl(t,e,t.path,n)))).then(e=>U.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Fl(t,e,t.path,n)));return U.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:K.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:K.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:K.toString(n)}})}nonempty(e){return this.min(1,e)}};bu.create=(e,t)=>new bu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:X.ZodArray,...q(t)});function xu(e){if(e instanceof Y){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=zu.create(xu(r))}return new Y({...e._def,shape:()=>t})}return e instanceof bu?new bu({...e._def,type:xu(e.element)}):e instanceof zu?zu.create(xu(e.unwrap())):e instanceof Bu?Bu.create(xu(e.unwrap())):e instanceof Du?Du.create(e.items.map(e=>xu(e))):e}var Y=class e extends J{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=z.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==B.object){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.object,received:t.parsedType}),W}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof vu&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Fl(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof vu){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(H(n,{code:V.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Fl(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>U.mergeObjectSync(t,e)):U.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return K.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:K.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:X.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of z.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of z.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return xu(this)}partial(t){let n={};for(let e of z.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of z.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof zu;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Pu(z.objectKeys(this.shape))}};Y.create=(e,t)=>new Y({shape:()=>e,unknownKeys:`strip`,catchall:vu.create(),typeName:X.ZodObject,...q(t)}),Y.strictCreate=(e,t)=>new Y({shape:()=>e,unknownKeys:`strict`,catchall:vu.create(),typeName:X.ZodObject,...q(t)}),Y.lazycreate=(e,t)=>new Y({shape:e,unknownKeys:`strip`,catchall:vu.create(),typeName:X.ZodObject,...q(t)});var Su=class extends J{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Tl(e.ctx.common.issues));return H(t,{code:V.invalid_union,unionErrors:n}),W}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Tl(e));return H(t,{code:V.invalid_union,unionErrors:i}),W}}get options(){return this._def.options}};Su.create=(e,t)=>new Su({options:e,typeName:X.ZodUnion,...q(t)});var Cu=e=>e instanceof Mu?Cu(e.schema):e instanceof Ru?Cu(e.innerType()):e instanceof Nu?[e.value]:e instanceof Fu?e.options:e instanceof Iu?z.objectValues(e.enum):e instanceof Vu?Cu(e._def.innerType):e instanceof mu?[void 0]:e instanceof hu?[null]:e instanceof zu?[void 0,...Cu(e.unwrap())]:e instanceof Bu?[null,...Cu(e.unwrap())]:e instanceof Wu||e instanceof Ku?Cu(e.unwrap()):e instanceof Hu?Cu(e._def.innerType):[],wu=class e extends J{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==B.object)return H(t,{code:V.invalid_type,expected:B.object,received:t.parsedType}),W;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(H(t,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),W)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Cu(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:X.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...q(r)})}};function Tu(e,t){let n=wl(e),r=wl(t);if(e===t)return{valid:!0,data:e};if(n===B.object&&r===B.object){let n=z.objectKeys(t),r=z.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Tu(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===B.array&&r===B.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Tu(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===B.date&&r===B.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Eu=class extends J{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(jl(e)||jl(r))return W;let i=Tu(e.value,r.value);return i.valid?((Ml(e)||Ml(r))&&t.dirty(),{status:t.value,value:i.data}):(H(n,{code:V.invalid_intersection_types}),W)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Eu.create=(e,t,n)=>new Eu({left:e,right:t,typeName:X.ZodIntersection,...q(n)});var Du=class e extends J{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.array)return H(n,{code:V.invalid_type,expected:B.array,received:n.parsedType}),W;if(n.data.length<this._def.items.length)return H(n,{code:V.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),W;!this._def.rest&&n.data.length>this._def.items.length&&(H(n,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Fl(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>U.mergeArray(t,e)):U.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Du.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Du({items:e,typeName:X.ZodTuple,rest:null,...q(t)})};var Ou=class e extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.object)return H(n,{code:V.invalid_type,expected:B.object,received:n.parsedType}),W;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Fl(n,e,n.path,e)),value:a._parse(new Fl(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?U.mergeObjectAsync(t,r):U.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof J?new e({keyType:t,valueType:n,typeName:X.ZodRecord,...q(r)}):new e({keyType:su.create(),valueType:t,typeName:X.ZodRecord,...q(n)})}},ku=class extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.map)return H(n,{code:V.invalid_type,expected:B.map,received:n.parsedType}),W;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Fl(n,e,n.path,[a,`key`])),value:i._parse(new Fl(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return W;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return W;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};ku.create=(e,t,n)=>new ku({valueType:t,keyType:e,typeName:X.ZodMap,...q(n)});var Au=class e extends J{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==B.set)return H(n,{code:V.invalid_type,expected:B.set,received:n.parsedType}),W;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(H(n,{code:V.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(H(n,{code:V.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return W;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Fl(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:K.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:K.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Au.create=(e,t)=>new Au({valueType:e,minSize:null,maxSize:null,typeName:X.ZodSet,...q(t)});var ju=class e extends J{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==B.function)return H(t,{code:V.invalid_type,expected:B.function,received:t.parsedType}),W;function n(e,n){return kl({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ol(),El].filter(e=>!!e),issueData:{code:V.invalid_arguments,argumentsError:n}})}function r(e,n){return kl({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ol(),El].filter(e=>!!e),issueData:{code:V.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Lu){let e=this;return G(async function(...t){let o=new Tl([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return G(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Tl([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Tl([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Du.create(t).rest(_u.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Du.create([]).rest(_u.create()),returns:n||_u.create(),typeName:X.ZodFunction,...q(r)})}},Mu=class extends J{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Mu.create=(e,t)=>new Mu({getter:e,typeName:X.ZodLazy,...q(t)});var Nu=class extends J{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return H(t,{received:t.data,code:V.invalid_literal,expected:this._def.value}),W}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Nu.create=(e,t)=>new Nu({value:e,typeName:X.ZodLiteral,...q(t)});function Pu(e,t){return new Fu({values:e,typeName:X.ZodEnum,...q(t)})}var Fu=class e extends J{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return H(t,{expected:z.joinValues(n),received:t.parsedType,code:V.invalid_type}),W}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return H(t,{received:t.data,code:V.invalid_enum_value,options:n}),W}return G(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};Fu.create=Pu;var Iu=class extends J{_parse(e){let t=z.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==B.string&&n.parsedType!==B.number){let e=z.objectValues(t);return H(n,{expected:z.joinValues(e),received:n.parsedType,code:V.invalid_type}),W}if(this._cache||=new Set(z.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=z.objectValues(t);return H(n,{received:n.data,code:V.invalid_enum_value,options:e}),W}return G(e.data)}get enum(){return this._def.values}};Iu.create=(e,t)=>new Iu({values:e,typeName:X.ZodNativeEnum,...q(t)});var Lu=class extends J{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==B.promise&&t.common.async===!1?(H(t,{code:V.invalid_type,expected:B.promise,received:t.parsedType}),W):G((t.parsedType===B.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Lu.create=(e,t)=>new Lu({type:e,typeName:X.ZodPromise,...q(t)});var Ru=class extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===X.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{H(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return W;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?W:r.status===`dirty`||t.value===`dirty`?Al(r.value):r});{if(t.value===`aborted`)return W;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?W:r.status===`dirty`||t.value===`dirty`?Al(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?W:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?W:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Nl(e))return W;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Nl(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):W)}z.assertNever(r)}};Ru.create=(e,t,n)=>new Ru({schema:e,typeName:X.ZodEffects,effect:t,...q(n)}),Ru.createWithPreprocess=(e,t,n)=>new Ru({schema:t,effect:{type:`preprocess`,transform:e},typeName:X.ZodEffects,...q(n)});var zu=class extends J{_parse(e){return this._getType(e)===B.undefined?G(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};zu.create=(e,t)=>new zu({innerType:e,typeName:X.ZodOptional,...q(t)});var Bu=class extends J{_parse(e){return this._getType(e)===B.null?G(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Bu.create=(e,t)=>new Bu({innerType:e,typeName:X.ZodNullable,...q(t)});var Vu=class extends J{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===B.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Vu.create=(e,t)=>new Vu({innerType:e,typeName:X.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...q(t)});var Hu=class extends J{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pl(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Tl(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Tl(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Hu.create=(e,t)=>new Hu({innerType:e,typeName:X.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...q(t)});var Uu=class extends J{_parse(e){if(this._getType(e)!==B.nan){let t=this._getOrReturnCtx(e);return H(t,{code:V.invalid_type,expected:B.nan,received:t.parsedType}),W}return{status:`valid`,value:e.data}}};Uu.create=e=>new Uu({typeName:X.ZodNaN,...q(e)});var Wu=class extends J{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Gu=class e extends J{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?W:e.status===`dirty`?(t.dirty(),Al(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?W:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:X.ZodPipeline})}},Ku=class extends J{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Nl(e)&&(e.value=Object.freeze(e.value)),e);return Pl(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Ku.create=(e,t)=>new Ku({innerType:e,typeName:X.ZodReadonly,...q(t)}),Y.lazycreate;var X;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(X||={});var Z=su.create,Q=lu.create;Uu.create,uu.create;var qu=du.create;fu.create,pu.create,mu.create;var Ju=hu.create;gu.create,_u.create,vu.create,yu.create;var Yu=bu.create,$=Y.create;Y.strictCreate;var Xu=Su.create,Zu=wu.create;Eu.create,Du.create;var Qu=Ou.create;ku.create,Au.create,ju.create,Mu.create;var $u=Nu.create,ed=Fu.create;Iu.create,Lu.create,Ru.create,zu.create,Bu.create,Ru.createWithPreprocess,Gu.create;var td={"network.never_sent":{name:`Request never sent`,description:`The request failed on the phone before reaching the server, usually because the connection wasn't ready.`},"network.timeout":{name:`Request timed out`,description:`The request was sent but no answer came back in time: a slow network or a slow server.`},"network.offline":{name:`Phone offline`,description:`The phone had no internet connection when the request was made.`},"network.failed":{name:`Connection failed`,description:`The phone couldn't reach the server: the address didn't resolve, the secure connection failed or the server refused it.`},server:{name:`Server error`,description:`The server received the request and failed (5xx). The problem is on the server side.`},client_request:{name:`Request rejected`,description:`The server refused the request as invalid (4xx): the app sent something the server didn't accept.`},auth:{name:`Sign-in problem`,description:`The server refused the request because the user wasn't signed in or not allowed (401 or 403).`},crash:{name:`App crash`,description:`An error nobody caught closed the app.`},unhandled_rejection:{name:`Unhandled background error`,description:`Background work failed and nothing handled it. The app kept running, but something may not have happened.`},screen_crash:{name:`Screen crash`,description:`A screen failed to draw and showed the error screen instead. The rest of the app kept working.`},uncaught:{name:`Uncaught error`,description:`An error nobody caught. The app kept running, but whatever the user was doing may have failed.`},app_reported:{name:`Reported by the app`,description:`The app caught this error itself and reported it.`},other:{name:`Other`,description:`An error that doesn't match any category yet.`}},nd=[`app`,`backend`,`infrastructure`,`third_party`,`unknown`],rd={app:{name:`App team`,description:`The fix is in the app's code.`},backend:{name:`Backend team`,description:`The fix is in a server or API the team runs.`},infrastructure:{name:`Infrastructure`,description:`Hosting, gateways or the network between the app and the servers.`},third_party:{name:`Third party`,description:`A service or library the team doesn't own.`},unknown:{name:`Unknown`,description:`Not enough information to say yet.`}},id=[`blocked`,`degraded`,`silent`],ad={blocked:{name:`Blocked`,description:`The user couldn't carry on: the app closed, or a key journey failed.`},degraded:{name:`Degraded`,description:`The user saw an error or missing information, but could carry on.`},silent:{name:`Silent`,description:`The user probably didn't notice: background work failed or recovered.`}};Object.fromEntries(id.map((e,t)=>[e,id.length-1-t]));function od(e){let t=e.trim().replace(/^[a-z]+:\/\//i,``),n=t.search(/[?#]/),[r,i]=n<0?[t,``]:[t.slice(0,n),t.slice(n)],a=r.indexOf(`/`);return{host:(a<0?r:r.slice(0,a)).toLowerCase().replace(/:\d+$/,``),path:a<0?``:r.slice(a),suffix:i}}function sd(e){let{host:t,path:n}=od(e);return t+n.replace(/\/+$/,``)}new Set(nd.filter(e=>e!==`unknown`));var cd=16384,ld=Z().min(1).max(64).regex(/^[a-z0-9_]+(\.[a-z0-9_]+)*$/,`flow must be dotted lowercase, e.g. auth.login`),ud=Qu(Z().max(200)).optional(),dd=Z().datetime({offset:!0}),fd=$({model:Z().optional(),manufacturer:Z().optional(),brand:Z().optional(),type:ed([`phone`,`tablet`,`desktop`,`tv`,`unknown`]).default(`unknown`),isEmulator:qu().optional(),memoryMb:Q().optional(),screen:$({width:Q(),height:Q(),scale:Q().optional()}).optional()}),pd=$({name:Z(),version:Z().optional()}),md=$({id:Z().min(1),version:Z().optional(),build:Z().optional(),update:Z().max(100).optional(),environment:Z().default(`production`)}),hd=$({name:Z(),version:Z().optional(),engine:Z().optional()}),gd=$({type:ed([`wifi`,`cellular`,`ethernet`,`none`,`unknown`]).default(`unknown`),effectiveType:Z().optional(),isConnected:qu().optional()}),_d=$({app:md,device:fd.default({}),os:pd,runtime:hd,network:gd.optional(),locale:Z().optional(),timezone:Z().optional()}),vd=$({ts:dd,category:ed([`navigation`,`network`,`ui`,`log`,`event`,`custom`]),message:Z().max(500),level:ed([`debug`,`info`,`warning`,`error`]).default(`info`),data:Qu(Xu([Z(),Q(),qu(),Ju()])).optional()}),yd=`…[truncated]`,bd=Z().transform(e=>e.length>16448?`${e.slice(0,cd)}${yd}`:e),xd=Qu(Z().transform(e=>e.slice(0,2e3))).optional().transform(e=>e&&Object.fromEntries(Object.entries(e).slice(0,100))),Sd={body:bd.optional(),bodySize:Q().int().nonnegative().optional(),truncated:qu().optional()},Cd=$({fn:Z().optional(),file:Z().optional(),line:Q().optional(),col:Q().optional(),inApp:qu().optional()}),wd=ed([`low`,`medium`,`high`,`critical`]),Td=$({id:Z().min(8).max(64),ts:dd,flow:ld.optional(),step:Z().max(64).optional(),tags:ud}),Ed=Zu(`type`,[Td.extend({type:$u(`error`),handled:qu().default(!0),severity:wd.optional(),error:$({name:Z().max(200).default(`Error`),message:Z().max(2e3),stack:Z().max(2e4).optional(),frames:Yu(Cd).max(100).optional()}),breadcrumbs:Yu(vd).max(50).optional(),request:$({method:Z().max(10),url:Z().max(500),status:Q().int().optional(),durationMs:Q().optional(),query:bd.optional(),headers:xd,...Sd}).optional(),response:$({status:Q().int(),headers:xd,...Sd}).optional()}),Td.extend({type:$u(`event`),name:Z().min(1).max(100),outcome:ed([`success`,`failure`,`abandoned`]).optional(),props:Qu(Xu([Z(),Q(),qu(),Ju()])).optional()}),Td.extend({type:$u(`session`),status:ed([`started`,`errored`,`crashed`])}),Td.extend({type:$u(`metric`),name:$u(`http`),key:Z().min(1).max(300),count:Q().int().min(1).max(1e6),errors:Q().int().min(0).max(1e6),buckets:Yu(Q().int().min(0)).length(13)})]);$({schema:$u(1).default(1),sdk:$({name:Z(),version:Z()}),context:_d,user:$({id:Z().optional(),anonymousId:Z()}).optional(),session:$({id:Z(),startedAt:dd}),events:Yu(Ed).min(1).max(100)});export{ye as $,il as A,Js as B,Zc as C,ol as D,sl as E,pc as F,sn as G,Ws as H,ac as I,Rt as J,qn as K,nc as L,Fc as M,Pc as N,cl as O,kc as P,_t as Q,Zs as R,Xc as S,ll as T,Gs as U,qs as V,I as W,xt as X,zt as Y,St as Z,al as _,rd as a,v as at,dl as b,rl as c,o as ct,hl as d,O as et,el as f,qc as g,nl as h,nd as i,y as it,Ic as j,pl as k,$c as l,s as lt,Qc as m,td as n,ee as nt,Sl as o,p as ot,Yc as p,Ut as q,ad as r,b as rt,fl as s,d as st,sd as t,pe as tt,tl as u,l as ut,ul as v,ml as w,gl as x,Jc as y,Ys as z};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:0}.-left-\[5px\]{left:-5px}.z-10{z-index:10}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-screen{min-height:100vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-\[calc\(100\%\+0\.5rem\)\]{width:calc(100% + .5rem)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[220px\]{max-width:220px}.max-w-\[320px\]{max-width:320px}.max-w-\[420px\]{max-width:420px}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\[420px\]{min-width:420px}.min-w-\[600px\]{min-width:600px}.min-w-\[640px\]{min-width:640px}.min-w-\[720px\]{min-width:720px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.basis-64{flex-basis:calc(var(--spacing) * 64)}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[4\.5rem_1\.25rem_1fr\]{grid-template-columns:4.5rem 1.25rem 1fr}.grid-cols-\[minmax\(6rem\,auto\)_1fr\]{grid-template-columns:minmax(6rem,auto) 1fr}.grid-cols-\[minmax\(8rem\,auto\)_1fr\]{grid-template-columns:minmax(8rem,auto) 1fr}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--border)}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent{border-color:var(--accent)}.border-ink{border-color:var(--text)}.border-line{border-color:var(--border)}.border-sev-critical{border-color:var(--sev-critical)}.border-sev-medium\/40{border-color:var(--sev-medium)}@supports (color:color-mix(in lab, red, red)){.border-sev-medium\/40{border-color:color-mix(in oklab, var(--sev-medium) 40%, transparent)}}.border-transparent{border-color:#0000}.bg-\[var\(--chart-errors\)\]{background-color:var(--chart-errors)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-bg,.bg-bg\/90{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-bg\/90{background-color:color-mix(in oklab, var(--bg) 90%, transparent)}}.bg-ink{background-color:var(--text)}.bg-line{background-color:var(--border)}.bg-panel{background-color:var(--panel)}.bg-panel-2{background-color:var(--panel-2)}.bg-sev-critical,.bg-sev-critical\/10{background-color:var(--sev-critical)}@supports (color:color-mix(in lab, red, red)){.bg-sev-critical\/10{background-color:color-mix(in oklab, var(--sev-critical) 10%, transparent)}}.bg-sev-critical\/15{background-color:var(--sev-critical)}@supports (color:color-mix(in lab, red, red)){.bg-sev-critical\/15{background-color:color-mix(in oklab, var(--sev-critical) 15%, transparent)}}.bg-sev-critical\/20{background-color:var(--sev-critical)}@supports (color:color-mix(in lab, red, red)){.bg-sev-critical\/20{background-color:color-mix(in oklab, var(--sev-critical) 20%, transparent)}}.bg-sev-high{background-color:var(--sev-high)}.bg-sev-medium,.bg-sev-medium\/10{background-color:var(--sev-medium)}@supports (color:color-mix(in lab, red, red)){.bg-sev-medium\/10{background-color:color-mix(in oklab, var(--sev-medium) 10%, transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[15px\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-bg{color:var(--bg)}.text-black{color:var(--color-black)}.text-ink,.text-ink\/80{color:var(--text)}@supports (color:color-mix(in lab, red, red)){.text-ink\/80{color:color-mix(in oklab, var(--text) 80%, transparent)}}.text-ink\/90{color:var(--text)}@supports (color:color-mix(in lab, red, red)){.text-ink\/90{color:color-mix(in oklab, var(--text) 90%, transparent)}}.text-muted{color:var(--muted)}.text-sev-critical{color:var(--sev-critical)}.text-sev-high{color:var(--sev-high)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-70{opacity:.7}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.outline-none{--tw-outline-style:none;outline-style:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:bg-panel-2:hover{background-color:var(--panel-2)}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-ink:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-accent:focus{border-color:var(--accent)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:mx-0{margin-inline:0}.sm\:inline{display:inline}.sm\:max-w-md{max-width:var(--container-md)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[11rem_5rem_1fr_auto\]{grid-template-columns:11rem 5rem 1fr auto}.sm\:grid-cols-\[11rem_6\.5rem_1fr_auto\]{grid-template-columns:11rem 6.5rem 1fr auto}.sm\:grid-cols-\[minmax\(0\,1\.4fr\)_minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto}.sm\:items-end{align-items:flex-end}.sm\:justify-self-start{justify-self:flex-start}.sm\:border-0{border-style:var(--tw-border-style);border-width:0}.sm\:p-0{padding:0}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg:#f7f7f5;--panel:#fff;--panel-2:#f1f1ee;--border:#e4e3de;--text:#1c1c1a;--muted:#6b6a64;--accent:#2f5cf2;--accent-soft:#e8edff;--sev-critical:#d1242f;--sev-high:#e2701b;--sev-medium:#c99a06;--sev-low:#8a8a84;--chart-errors:#d1242f;--chart-events:#9aa4bf;--chart-grid:#ebeae6;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#111110;--panel:#1a1a19;--panel-2:#222220;--border:#2e2e2b;--text:#ededea;--muted:#9b9a93;--accent:#7d9bff;--accent-soft:#1f2a4d;--sev-critical:#ff6b6b;--sev-high:#ff9d4d;--sev-medium:#f0c540;--sev-low:#8a8a84;--chart-errors:#ff6b6b;--chart-events:#5d6680;--chart-grid:#2a2a27;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}html,body{background:var(--bg);color:var(--text)}body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased}.tabular{font-variant-numeric:tabular-nums}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as e,a as t,n,r}from"./src-BKSiJUs3.js";var i=e();function a(){return(0,i.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-semibold tracking-tight`,children:[(0,i.jsx)(`span`,{className:`grid h-7 w-7 place-items-center rounded-md bg-sev-critical text-[11px] font-bold text-white`,children:`dB`}),(0,i.jsxs)(`span`,{children:[`de`,(0,i.jsx)(`span`,{className:`text-sev-critical`,children:`Bug`})]})]})}var o={critical:`bg-sev-critical text-white`,high:`bg-sev-high text-white`,medium:`bg-sev-medium text-black`,low:`bg-panel-2 text-muted border border-line`};function s({severity:e}){return(0,i.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${o[e]}`,children:e})}function c({title:e,subtitle:t,children:n,right:r}){return(0,i.jsxs)(`section`,{className:`min-w-0 rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,i.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`h2`,{className:`text-sm font-semibold`,children:e}),t&&(0,i.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:t})]}),r]}),n]})}function l({label:e,value:t,hint:n,tone:r}){return(0,i.jsxs)(`div`,{className:`rounded-xl border border-line bg-panel p-4`,children:[(0,i.jsx)(`div`,{className:`text-xs text-muted`,children:e}),(0,i.jsx)(`div`,{className:`tabular mt-1 text-2xl font-semibold ${r===`critical`?`text-sev-critical`:r===`high`?`text-sev-high`:`text-ink`}`,children:t}),n&&(0,i.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:n})]})}function u({columns:e,rows:t}){return(0,i.jsxs)(`details`,{className:`mt-3 text-xs`,children:[(0,i.jsx)(`summary`,{className:`cursor-pointer text-muted hover:text-ink`,children:`View data`}),(0,i.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto rounded-md border border-line`,children:(0,i.jsxs)(`table`,{className:`tabular w-full text-left`,children:[(0,i.jsx)(`thead`,{className:`sticky top-0 bg-panel-2`,children:(0,i.jsx)(`tr`,{children:e.map(e=>(0,i.jsx)(`th`,{className:`px-2 py-1 font-medium`,children:e},e))})}),(0,i.jsx)(`tbody`,{children:t.map((e,t)=>(0,i.jsx)(`tr`,{className:`border-t border-line`,children:e.map((e,t)=>(0,i.jsx)(`td`,{className:`px-2 py-1`,children:e},t))},t))})]})})]})}function d({rows:e,total:t,onSelect:n,selected:r}){let a=t??e.reduce((e,t)=>e+t.value,0);return e.length?(0,i.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let t=a?e.value/a:0,o=r===e.key,s=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:`flex justify-between gap-2 text-xs`,children:[(0,i.jsx)(`span`,{className:`truncate ${o?`font-semibold text-accent`:``}`,title:e.label?e.key:void 0,children:e.label??e.key}),(0,i.jsxs)(`span`,{className:`tabular shrink-0 text-muted`,children:[e.value.toLocaleString(),` · `,Math.round(t*100),`%`]})]}),(0,i.jsx)(`div`,{className:`mt-1 h-1.5 rounded-full bg-panel-2`,children:(0,i.jsx)(`div`,{className:`h-1.5 rounded-full ${o?`bg-accent`:`bg-[var(--chart-errors)]`}`,style:{width:`${Math.max(2,t*100)}%`}})})]});return(0,i.jsx)(`li`,{children:n?(0,i.jsx)(`button`,{type:`button`,"aria-pressed":o,onClick:()=>n(e.key),className:`-mx-1 block w-[calc(100%+0.5rem)] rounded px-1 py-0.5 text-left hover:bg-panel-2`,children:s}):s},e.key)})}):(0,i.jsx)(`p`,{className:`text-xs text-muted`,children:`No data.`})}var f=`mt-1 mr-1 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide`,p={blocked:`bg-sev-critical text-white`,degraded:`bg-sev-medium text-black`,silent:`border border-line text-muted`};function m({labels:e}){return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`span`,{className:`${f} ${p[e.impact]}`,title:r[e.impact].description,children:r[e.impact].name}),(0,i.jsx)(`span`,{className:`${f} bg-panel-2 text-ink/80`,title:n[e.category].description,children:n[e.category].name}),(0,i.jsx)(`span`,{className:`mt-1 mr-1 inline-flex text-[11px] text-muted`,title:t[e.owner].description,children:t[e.owner].name})]}):null}function h(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));return n<60?`${n}s ago`:n<3600?`${Math.round(n/60)}m ago`:n<86400?`${Math.round(n/3600)}h ago`:`${Math.round(n/86400)}d ago`}function g({issue:e}){return(0,i.jsxs)(i.Fragment,{children:[e.status===`regressed`&&(0,i.jsxs)(`span`,{className:`${f} bg-sev-critical text-white`,children:[`Regressed`,e.resolvedIn?` after ${e.resolvedIn}`:``]}),e.newInLatest&&(0,i.jsxs)(`span`,{className:`${f} bg-accent-soft text-accent`,children:[`New in `,e.firstVersion]}),e.status===`resolved`&&(0,i.jsxs)(`span`,{className:`${f} border border-line text-muted`,children:[`Resolved`,e.resolvedIn?` in ${e.resolvedIn}`:``]}),e.status===`ignored`&&(0,i.jsx)(`span`,{className:`${f} border border-line text-muted`,children:`Ignored`})]})}export{a,l as c,m as i,h as l,u as n,s as o,g as r,d as s,c as t};
|