@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,G as t,gt as n,pt as r,q as i}from"./src-BiKxgjA_.js";import{l as a}from"./ui-DRjjeSWy.js";import{T as o}from"./index-DEnCDILF.js";var s=n(r()),c=i();function l(){let n=o.useLoaderData(),r=t(),[i,l]=(0,s.useState)(n.demo?.email??``),[u,d]=(0,s.useState)(n.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:i,password:u}});if(!t.ok)return p(t.error);await r.invalidate(),await r.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`,` `,n.store===`demo`?`demo dataset`:n.store===`memory`?`in-memory store on this machine`:n.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),n.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:n.demo.email}),` / `,(0,c.jsx)(`b`,{children:n.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:i,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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gt as e,pt as t,q as n}from"./src-BiKxgjA_.js";import{t as r}from"./copy-button-BwRd5q7l.js";import{i}from"./ui-DRjjeSWy.js";import{a}from"./timeline-WXE49N62.js";import{a as o,i as s,n as c,r as l,t as u}from"./exchange-view-DVwSLcXF.js";var d=e(t(),1),f=n();function p({call:e,exchange:t}){let n=(0,d.useId)(),r=e.status===void 0?o(e):void 0;return(0,f.jsxs)(`div`,{className:`space-y-4`,children:[(0,f.jsx)(g,{call:e}),t?(0,f.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,f.jsxs)(`section`,{"aria-labelledby":`${n}-sent`,className:`min-w-0 rounded-lg border border-line p-3`,children:[(0,f.jsx)(`h3`,{id:`${n}-sent`,className:`mb-2 text-sm font-semibold`,children:`What the app sent`}),(0,f.jsx)(m,{exchange:t})]}),(0,f.jsxs)(`section`,{"aria-labelledby":`${n}-answer`,className:`min-w-0 rounded-lg border border-line p-3`,children:[(0,f.jsx)(`h3`,{id:`${n}-answer`,className:`mb-2 text-sm font-semibold`,children:`What the server answered`}),t.response?(0,f.jsx)(h,{side:t.response,first:[`Status`,String(t.response.status)]}):(0,f.jsx)(`p`,{className:`text-sm`,children:r})]})]}):(0,f.jsxs)(`div`,{className:`space-y-1 rounded-md bg-panel-2 px-3 py-2 text-sm`,children:[r&&(0,f.jsx)(`p`,{children:r}),(0,f.jsxs)(`p`,{className:`text-muted`,children:[`The app didn't capture this call's request and response. Apps built with the SDK's `,(0,f.jsx)(`code`,{children:`network.bodies`}),` on capture them, with headers and bodies redacted on the phone; older app versions don't.`]})]})]})}function m({exchange:e}){let t=e.request,n=c(e),i=t.query===void 0?void 0:s(t.query);return(0,f.jsxs)(`div`,{className:`space-y-3`,children:[(0,f.jsx)(h,{side:t,first:[`Call`,(0,f.jsxs)(`span`,{className:`break-all font-mono text-xs`,children:[t.method,` `,t.fullUrl??t.url,i?.text?`?${i.text}`:``,i?.cut?` (query cut)`:``]})]}),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,f.jsx)(r,{text:n.command,label:`Copy as cURL`,ariaLabel:`Copy the request as a cURL command`}),(0,f.jsxs)(`span`,{className:`text-xs text-muted`,children:[`Redacted as captured: secrets show as [redacted]`,n.complete?``:`, and the command's first line says what to fill in`,`.`]})]})]})}function h({side:e,first:t}){let n=u(e),r=Object.entries(e.headers??{}).sort(([e],[t])=>e.localeCompare(t)),a=e.bodySize===void 0?void 0:n?.binary?l(e.bodySize):`${e.bodySize.toLocaleString(`en`)} characters`;return(0,f.jsxs)(`div`,{className:`space-y-3`,children:[(0,f.jsx)(i,{rows:[t,[`Body size`,a]]}),(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`h4`,{className:`mb-1.5 text-xs font-medium text-muted`,children:[`Body`,n?.json?` (JSON)`:``]}),n?.note&&(0,f.jsx)(`p`,{className:`mb-1.5 rounded-md bg-sev-medium/10 px-2 py-1 text-xs`,children:n.note}),n?.text?(0,f.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap break-all rounded-md border border-line bg-panel-2 p-2 font-mono text-[11px] leading-relaxed`,children:n.text}):!n?.note&&(0,f.jsx)(`p`,{className:`text-sm text-muted`,children:`None captured.`})]}),(0,f.jsxs)(`details`,{children:[(0,f.jsxs)(`summary`,{className:`cursor-pointer text-xs font-medium text-muted hover:text-ink`,children:[`Headers (`,r.length,`)`]}),(0,f.jsx)(`div`,{className:`mt-1.5`,children:r.length?(0,f.jsx)(i,{mono:!0,rows:r}):(0,f.jsx)(`p`,{className:`text-sm text-muted`,children:`None captured.`})})]})]})}function g({call:e}){return(0,f.jsx)(i,{rows:[[`Service`,e.service],[`Endpoint`,a([e.method,e.path])],[`Status`,e.status===void 0?`no answer`:String(e.status)],[`Outcome`,e.outcome],[`Kind`,e.errorKind],[`Backend`,a([e.backendCode,e.backendTitle],` · `)],[`Backend errors`,e.backendErrors],[`Trace`,e.traceId?(0,f.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,f.jsx)(`span`,{className:`break-all font-mono text-xs`,children:e.traceId}),(0,f.jsx)(r,{text:e.traceId,label:`Copy`,ariaLabel:`Copy trace id`})]}):void 0],[`Duration`,e.durationMs===void 0?void 0:`${e.durationMs} ms`],[`Retry`,e.retry===void 0?void 0:String(e.retry)]]})}export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,q as t,z as n}from"./src-BiKxgjA_.js";import{t as r}from"./closed-issues-Cl-8l4oR.js";import{t as i}from"./empty-state-njgr1sWu.js";import{C as a,S as o,_ as s,b as c,f as l,g as u,h as d,m as f,n as p,v as m,w as h,x as g,y as _}from"./index-DEnCDILF.js";import{c as v,f as y,m as b,p as x}from"./ui-DRjjeSWy.js";import{t as S}from"./exchange-view-DVwSLcXF.js";var C=t();function w(){let t=p.useLoaderData(),{service:S}=p.useParams(),w=p.useSearch(),E=e({from:p.fullPath});if(!t)return(0,C.jsx)(i,{});let{range:D}=t,O={app:t.app,range:w.range,from:w.from,to:w.to},k=d(S,t.endpoints),A=g(k)[0],j=A&&{...A,key:S},M=Date.parse(t.generatedAt),N=j&&c(j,k,M),P=k.map(e=>({e,level:f(e)})).sort((e,t)=>l[t.level]-l[e.level]||u(t.e)-u(e.e)),F=P.filter(e=>e.level!==`healthy`),I=P.filter(e=>e.level===`healthy`),L=new Map;for(let e of k)for(let t of e.problems)s(t.issueStatus)||L.set(t.fingerprint,{...t,status:t.issueStatus});return(0,C.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,C.jsxs)(`nav`,{"aria-label":`Breadcrumb`,className:`text-sm text-muted`,children:[(0,C.jsx)(n,{to:`/`,search:O,className:`hover:text-ink hover:underline`,children:`Health`}),(0,C.jsx)(`span`,{"aria-hidden":!0,children:` › `}),(0,C.jsx)(`span`,{className:`text-ink`,"aria-current":`page`,children:N?.name??S})]}),(0,C.jsx)(a,{value:D,today:t.generatedAt.slice(0,10),onChange:e=>E({search:t=>({...t,...e})})},`${D.preset}${D.from}${D.to}`)]}),(0,C.jsx)(h,{rangeFrom:D.from,retention:t.retention}),N?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`header`,{children:[(0,C.jsxs)(`p`,{className:`text-xs font-bold uppercase tracking-wide`,children:[(0,C.jsx)(`span`,{className:b(N.level,`text`),children:y(N.level)}),N.live&&(0,C.jsx)(`span`,{className:`ml-2 normal-case ${b(N.level,`text`)}`,children:`· Still happening`}),N.sideLabel&&(0,C.jsx)(`span`,{className:`ml-2 rounded-full border border-line px-1.5 py-px normal-case text-muted`,children:N.sideLabel})]}),(0,C.jsx)(`h1`,{className:`mt-1 text-2xl font-semibold tracking-tight`,children:N.name}),N.outage&&(0,C.jsxs)(`p`,{role:`status`,className:`mt-2 rounded-lg border-2 px-3 py-2 text-sm font-semibold ${b(`critical`,`surface`)}`,children:[N.outage,`. `,o(N)]}),(0,C.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[N.measure,` in `,D.label,N.lastFailure?`, the last ${x(N.lastFailure,M)}`:``,`. `,_(k.length,`endpoint`),`, worst first.`]})]}),F.length>0?(0,C.jsx)(`ol`,{className:`space-y-3`,"aria-label":`Failing endpoints, worst first`,children:F.map(({e,level:t})=>(0,C.jsx)(`li`,{children:(0,C.jsx)(v,{level:t,aside:e.failureRate===null?_(e.failures,`failure`):`${m(e.failureRate)} failed`,children:(0,C.jsx)(T,{row:e,keep:O,now:M,service:S})})},e.endpoint))}):(0,C.jsxs)(`p`,{className:`rounded-lg border border-level-healthy-edge bg-level-healthy-bg px-3 py-2 text-sm text-level-healthy-fg`,children:[`Every call to `,N.name,` worked in `,D.label,`.`]}),(0,C.jsx)(r,{issues:[...L.values()],keep:O,now:M}),I.length>0&&(0,C.jsxs)(`section`,{"aria-label":`Healthy endpoints`,children:[(0,C.jsx)(`h2`,{className:`mb-2 text-sm font-semibold text-muted`,children:`Healthy`}),(0,C.jsx)(`ul`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3`,children:I.map(({e})=>(0,C.jsxs)(`li`,{className:`rounded-lg border border-level-healthy-edge bg-level-healthy-bg px-3 py-2 text-sm text-level-healthy-fg`,children:[(0,C.jsxs)(`span`,{className:`font-mono text-xs`,children:[e.method,` `,e.path]}),(0,C.jsxs)(`span`,{className:`block text-xs`,children:[e.calls?.toLocaleString()??`—`,` calls, none failed`]})]},e.endpoint))})]})]}):(0,C.jsxs)(`p`,{className:`text-sm text-muted`,children:[S,` had no calls or failures in `,D.label,`.`]})]})}function T({row:e,keep:t,now:r,service:i}){let a=[...e.statuses.slice(0,3).map(e=>`${e.key} ×${e.count}`)],o=e.backendCodes[0],c=e.problems.filter(e=>s(e.issueStatus)),l=e.backendMessages[0];return(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,C.jsxs)(`h2`,{className:`break-all font-mono text-sm font-semibold`,children:[e.method,` `,e.path]}),(0,C.jsxs)(`span`,{className:`tabular text-xs text-muted`,children:[e.calls===null?_(e.failures,`stored failure`):`${(e.failedCalls??0).toLocaleString()} of ${_(e.calls,`call`)} failed`,e.lastFailure?` · last ${x(e.lastFailure,r)}`:``]})]}),(a.length>0||o||l)&&(0,C.jsxs)(`p`,{className:`text-sm`,children:[(0,C.jsx)(`span`,{className:`text-muted`,children:`The server said: `}),a.join(`, `),(o||l)&&(0,C.jsxs)(C.Fragment,{children:[a.length?` · `:``,(0,C.jsx)(`span`,{className:`font-semibold`,children:[o?.key,l?.key&&`"${l.key}"`].filter(Boolean).join(` `)})]})]}),e.lastAnswer?.body&&(0,C.jsxs)(`details`,{open:!0,className:`rounded-lg border border-line bg-panel-2 p-2`,children:[(0,C.jsxs)(`summary`,{className:`cursor-pointer text-xs font-medium text-muted hover:text-ink`,children:[`What the server answered last, `,e.lastAnswer.status,`, `,x(e.lastAnswer.ts,r)]}),(0,C.jsx)(`pre`,{className:`mt-1.5 max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed`,children:S({body:e.lastAnswer.body})?.text??e.lastAnswer.body}),(0,C.jsx)(n,{to:`/issues/$fingerprint`,params:{fingerprint:e.lastAnswer.fingerprint},search:{...t,app:t.app??``},className:`text-xs text-accent hover:underline`,children:`The request and the whole response →`})]}),c.length>0&&(0,C.jsx)(`ul`,{className:`space-y-1.5`,"aria-label":`What's causing it on ${e.method??``} ${e.path??e.endpoint}`,children:c.map(e=>(0,C.jsx)(`li`,{children:(0,C.jsxs)(n,{to:`/issues/$fingerprint`,params:{fingerprint:e.fingerprint},search:{...t,app:t.app??``},className:`group flex flex-wrap items-center justify-between gap-2 rounded-lg border border-line bg-panel-2 px-3 py-2 text-sm hover:border-accent focus-visible:outline-2 focus-visible:outline-accent`,children:[(0,C.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,C.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,C.jsxs)(`span`,{className:`tabular block text-xs text-muted`,children:[e.count,`× · `,e.status,` · `,[e.platforms.join(`, `),e.versions.slice(0,2).map(e=>`app ${e}`).join(`, `)].filter(Boolean).join(` · `),` · last `,x(e.lastSeen,r)]})]}),(0,C.jsx)(`span`,{className:`shrink-0 text-xs font-semibold text-accent group-hover:underline`,children:`Cause and fix →`})]})},e.fingerprint))}),e.problems.length>0&&!c.length&&(0,C.jsx)(`p`,{className:`text-sm text-muted`,children:`Its issues are all resolved or ignored (listed at the bottom): these failures came before that, or are still being looked at.`}),(0,C.jsx)(n,{to:`/endpoints`,search:{...t,endpoint:e.endpoint},className:`inline-block text-xs text-accent hover:underline`,children:`Every failure on this endpoint, with traces →`})]})}export{w as component};
|
package/dist/client/assets/{sessions._sessionId-B0NxM46y.js → sessions._sessionId-LRo3QNQP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{q as e,z as t}from"./src-BiKxgjA_.js";import{t as n}from"./copy-button-BwRd5q7l.js";import{a as r,i,n as a,r as o,s,t as c}from"./timeline-WXE49N62.js";import{n as l}from"./ui-DRjjeSWy.js";import{t as u}from"./index-DEnCDILF.js";var d=e();function f(){let{session:e,missingIndex:a}=u.useLoaderData();if(!e)return(0,d.jsxs)(`main`,{className:`mx-auto max-w-3xl px-4 py-10 sm:px-6`,children:[(0,d.jsx)(`h1`,{className:`text-xl font-semibold`,children:`This session can't be read yet`}),(0,d.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:a&&`Firestore needs deBug's new index on events (sessionId, ts). Deploy it with: firebase deploy --only firestore:indexes, using deBug's firestore.indexes.json. It takes a few minutes to build.`})]});let s=e.user.id;return(0,d.jsxs)(`main`,{className:`mx-auto max-w-5xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,title:`From the earliest step recorded to the last stored event. The session may have started earlier and gone on after.`,children:[`Session · recorded `,i(e.start),` to `,i(e.end),` · `,g(e.start,e.end)]}),(0,d.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-3`,children:[(0,d.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:s?(0,d.jsx)(`span`,{className:`break-all font-mono`,children:s}):`Not signed in`}),(0,d.jsx)(o,{outcome:e.outcome}),(s||e.user.anonymousId)&&(0,d.jsx)(t,{to:`/customers`,search:{app:e.app,q:s??e.user.anonymousId},className:`text-sm text-accent hover:underline`,children:`All their sessions →`})]})]}),(0,d.jsxs)(`section`,{"aria-label":`Device and app`,className:`flex flex-wrap items-center gap-x-6 gap-y-2 rounded-xl border border-line bg-panel px-4 py-3 text-sm`,children:[(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`Device `}),r([e.context.device.brand,e.context.device.model])??`—`]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`OS `}),r([e.context.os.name,e.context.os.version])??`—`]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`App `}),r([e.context.app.version,e.context.app.build&&`(${e.context.app.build})`])??`—`]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`Errors `}),e.counts.errors,e.counts.handled>0&&(0,d.jsxs)(`span`,{className:`text-muted`,children:[` (`,e.counts.handled,` caught by the app)`]})]}),(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`Session `}),(0,d.jsx)(`span`,{className:`break-all font-mono text-xs`,children:e.sessionId}),(0,d.jsx)(`span`,{className:`ml-2`,children:(0,d.jsx)(n,{text:e.sessionId,label:`Copy`,ariaLabel:`Copy session id`})})]}),e.user.anonymousId&&(0,d.jsxs)(`span`,{children:[(0,d.jsx)(`span`,{className:`text-muted`,children:`Install `}),(0,d.jsx)(`span`,{className:`break-all font-mono text-xs`,children:e.user.anonymousId})]}),s&&(0,d.jsx)(`span`,{className:`ml-auto`,children:(0,d.jsx)(n,{text:s,label:`Copy customer`,ariaLabel:`Copy customer id`})})]}),(0,d.jsxs)(l,{title:`Timeline`,subtitle:`Screens, taps, API calls, flow steps and errors in this session, in order. Times are from the device, from the session's start.`,children:[(0,d.jsx)(`ol`,{className:`space-y-1.5`,children:e.rows.map((t,n)=>(0,d.jsx)(p,{row:t,app:e.app,start:e.start},t.kind===`crumb`?`c${n}`:t.eventId))}),e.truncated&&(0,d.jsxs)(`p`,{className:`mt-3 text-xs text-muted`,children:[`Showing the newest `,e.read,` events of this session; older ones are left out.`]}),(0,d.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`Screens, taps and API calls come from the trail each error carries, so what happened after the last error isn't shown, and the trail before an error goes back as far as the SDK's breadcrumb limit.`})]})]})}function p({row:e,app:n,start:r}){let i=(0,d.jsx)(`span`,{className:`tabular pt-0.5 text-right text-xs text-muted`,title:e.ts,children:h(e.ts,r)}),o=`grid grid-cols-[4.5rem_1.25rem_1fr] gap-2 rounded-md px-2 py-1.5 text-sm`;if(e.kind===`crumb`){let t=e.item;return(0,d.jsxs)(`li`,{className:`${o} ${t.failed?`bg-sev-critical/10`:t.level===`warning`?`bg-sev-medium/10`:``}`,children:[i,(0,d.jsx)(`span`,{"aria-hidden":!0,className:`pt-0.5 text-center ${t.failed?`text-sev-critical`:`text-muted`}`,children:a[t.category]}),(0,d.jsxs)(`div`,{className:`min-w-0`,children:[(0,d.jsx)(c,{item:t}),(0,d.jsx)(m,{source:e.source,app:n})]})]})}return e.kind===`event`?(0,d.jsxs)(`li`,{className:`${o} ${e.failed?`bg-sev-medium/10`:``}`,children:[i,(0,d.jsx)(`span`,{"aria-hidden":!0,className:`pt-0.5 text-center ${e.failed?`text-sev-high`:`text-muted`}`,children:`◆`}),(0,d.jsxs)(`div`,{className:`min-w-0`,children:[(0,d.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted`,children:`flow`}),(0,d.jsx)(`span`,{className:`break-words ${e.failed?`font-medium`:``}`,children:e.detail}),(0,d.jsx)(m,{source:e.source,app:n})]})]}):(0,d.jsxs)(`li`,{className:`${o} ${e.handled?`bg-sev-critical/10`:`bg-sev-critical/20`} font-medium text-sev-critical`,children:[i,(0,d.jsx)(`span`,{"aria-hidden":!0,className:`pt-0.5 text-center`,children:`✕`}),(0,d.jsxs)(`div`,{className:`min-w-0`,children:[(0,d.jsx)(`span`,{className:`mr-2 rounded bg-sev-critical px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-white`,children:e.crash?`crash`:e.handled?`error`:`uncaught`}),e.fingerprint?(0,d.jsx)(t,{to:`/events/$eventId`,params:{eventId:e.eventId},search:{app:n,issue:e.fingerprint},className:`break-words hover:underline`,children:e.title}):(0,d.jsx)(`span`,{className:`break-words`,children:e.title})]})]})}function m({source:e,app:n}){return e?(0,d.jsx)(t,{to:`/events/$eventId`,params:{eventId:e.eventId},search:{app:n,issue:e.fingerprint},className:`ml-2 whitespace-nowrap text-xs text-muted hover:text-ink hover:underline`,title:`Open the error this step led to`,children:`in error →`}):null}function h(e,t){let n=Math.max(0,Math.round((Date.parse(e)-Date.parse(t))/1e3));return n>=3600?`+${Math.floor(n/3600)}:${_(Math.floor(n/60)%60)}:${_(n%60)}`:`+${Math.floor(n/60)}:${_(n%60)}`}function g(e,t){let n=Math.max(0,(Date.parse(t)-Date.parse(e))/1e3);return n<.05?`0 s`:s(n)}var _=e=>String(e).padStart(2,`0`);export{f as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,G as n,M as r,N as i,c as a,gt as o,i as s,j as c,pt as l,q as u,r as d,s as f}from"./src-BiKxgjA_.js";import{g as p,h as m,n as h,p as g,t as _}from"./ui-DRjjeSWy.js";import{i as v,r as y,t as b}from"./version-banner-BYe4PVzv.js";import{s as x}from"./index-DEnCDILF.js";var S=o(l()),C=u(),w=[30,60,90,180,365];function T(){let{apps:i,settings:a,seenHosts:o,names:s}=x.useLoaderData(),c=y(),l=t({from:x.fullPath}),u=n(),[d,f]=(0,S.useState)(String(a?.retentionDays??60)),[p,g]=(0,S.useState)(null),[v,b]=(0,S.useState)(!1);if(!a)return(0,C.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 T=a.writer!==`none`,O=Number(d),k=Number.isInteger(O)&&O!==a.retentionDays,j=async()=>{b(!0),g(null);let e=await r({data:{app:a.app,retentionDays:O}}).catch(e=>({ok:!1,error:e.message}));if(b(!1),!e.ok)return g({tone:`error`,text:e.error});g({tone:`ok`,text:`Saved. New events are kept for ${O} days, starting within about a minute.`}),await u.invalidate()},M=async()=>{b(!0);let t,n=0;try{do{let r=await e({data:{app:a.app,cursor:t}});if(!r.ok)throw Error(r.error);n+=r.updated,t=r.cursor,g({tone:`info`,text:`Updating existing events… ${n.toLocaleString()} so far`})}while(t);g({tone:`ok`,text:`Done: ${n.toLocaleString()} existing events now expire ${a.retentionDays} days after they arrived.`})}catch(e){g({tone:`error`,text:`Stopped after ${n.toLocaleString()} events: ${e.message}`})}b(!1)};return(0,C.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Settings`}),(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:m(a.app,a.displayName)}),a.displayName&&(0,C.jsx)(`p`,{className:`font-mono text-xs text-muted`,children:a.app})]}),i.length>1&&(0,C.jsx)(`select`,{"aria-label":`App`,value:a.app,onChange:e=>l({search:{app:e.target.value}}),className:`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,children:(0,C.jsx)(_,{apps:i,names:s})})]}),c&&(0,C.jsx)(P,{status:c}),T&&(0,C.jsx)(D,{app:a.app,name:a.displayName,onStatus:g},a.app+a.displayName),(0,C.jsxs)(h,{title:`Data retention`,subtitle:`Your data lives in your own database, so you decide how long to keep it.`,children:[(0,C.jsxs)(`dl`,{className:`grid gap-3 text-sm sm:grid-cols-2`,children:[(0,C.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,C.jsx)(`dt`,{className:`text-xs text-muted`,children:`Raw events (stack traces, breadcrumbs, context)`}),(0,C.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:a.retentionDays?`${a.retentionDays} days`:`Unknown`}),(0,C.jsx)(`dd`,{className:`text-xs text-muted`,children:a.source===`setting`?`Set here${a.updatedAt?` on ${new Date(a.updatedAt).toLocaleDateString(`en-GB`)}`:``}`:a.source==="default"?`The default chosen at setup`:`Not reported by this deployment`})]}),(0,C.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,C.jsx)(`dt`,{className:`text-xs text-muted`,children:`Counts, issues and release health`}),(0,C.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:`Forever`}),(0,C.jsx)(`dd`,{className:`text-xs text-muted`,children:`Charts and trends cover any date range`})]})]}),T?(0,C.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:e=>{e.preventDefault(),k&&j()},children:[(0,C.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`days`,children:`Keep raw events for`}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[w.map(e=>(0,C.jsxs)(`button`,{type:`button`,onClick:()=>f(String(e)),className:`rounded-md border px-3 py-1.5 text-sm ${Number(d)===e?`border-accent bg-accent-soft text-accent`:`border-line hover:bg-panel-2`}`,children:[e,` days`]},e)),(0,C.jsx)(`input`,{id:`days`,type:`number`,min:1,max:3650,value:d,onChange:e=>f(e.target.value),className:`w-24 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,"aria-label":`Days`}),(0,C.jsx)(`button`,{type:`submit`,disabled:!k||v,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save`})]}),(0,C.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,C.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:a.note}),a.note&&T&&(0,C.jsx)(`p`,{className:`mt-2 text-xs text-sev-high`,children:a.note})]}),T&&(0,C.jsxs)(h,{title:`Existing events`,subtitle:`Events already stored keep the expiry they arrived with.`,children:[(0,C.jsxs)(`p`,{className:`text-sm`,children:[`Give every stored event an expiry based on the current setting (`,a.retentionDays,` days after it arrived). This costs one database write per event.`]}),(0,C.jsx)(`button`,{type:`button`,onClick:()=>void M(),disabled:v,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`})]}),T&&(0,C.jsx)(E,{settings:a,onStatus:g},a.app+JSON.stringify([a.criticalFlows,a.alerts])),T&&(0,C.jsx)(A,{app:a.app,hosts:a.hosts,seen:o,onStatus:g},a.app+JSON.stringify(a.hosts)),p&&(0,C.jsx)(`p`,{role:`status`,className:`rounded-lg border px-3 py-2 text-sm ${p.tone===`error`?`border-sev-critical text-sev-critical`:p.tone===`ok`?`border-line bg-panel-2`:`border-line text-muted`}`,children:p.text})]})}function E({settings:e,onStatus:t}){let r=n(),[a,o]=(0,S.useState)(e.criticalFlows.join(`, `)),[s,l]=(0,S.useState)(e.alerts.slackWebhookUrl??``),[u,d]=(0,S.useState)(e.alerts.newIssues!==!1),[f,p]=(0,S.useState)(e.alerts.regressions!==!1),[m,g]=(0,S.useState)(e.alerts.onlyCriticalFlows===!0),[_,v]=(0,S.useState)(e.alerts.dashboardUrl??(typeof window<`u`?window.location.origin:``)),[y,b]=(0,S.useState)(!1),x=async()=>{b(!0),t(null);let n=await c({data:{app:e.app,criticalFlows:a.split(/[\s,]+/).filter(Boolean),alerts:{slackWebhookUrl:s,newIssues:u,regressions:f,onlyCriticalFlows:m,dashboardUrl:_}}}).catch(e=>({ok:!1,error:e.message}));if(b(!1),!n.ok)return t({tone:`error`,text:n.error});t({tone:`ok`,text:`Saved. Alerts and critical flows apply within about a minute.`}),await r.invalidate()},w=async()=>{b(!0);let n=await i({data:{app:e.app}}).catch(e=>({ok:!1,error:e.message}));b(!1),t(n.ok?{tone:`ok`,text:`Test message sent. Check your Slack channel.`}:{tone:`error`,text:n.error})},T=`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(h,{title:`Critical flows`,subtitle:`Issues in these flows rank one severity level higher, and can be the only ones that alert.`,children:[(0,C.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`flows`,children:`Flows, separated by commas`}),(0,C.jsx)(`input`,{id:`flows`,value:a,onChange:e=>o(e.target.value),placeholder:`checkout.payment, auth.login`,className:`mt-2 w-full ${T}`})]}),(0,C.jsx)(h,{title:`Slack alerts`,subtitle:`Your ingest function posts to Slack when an issue first appears or comes back after being resolved.`,children:(0,C.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`label`,{className:`block font-medium`,htmlFor:`hook`,children:`Incoming webhook URL`}),(0,C.jsx)(`input`,{id:`hook`,value:s,onChange:e=>l(e.target.value),placeholder:`https://hooks.slack.com/services/…`,className:`mt-2 w-full font-mono ${T}`}),(0,C.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,C.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),` New issues`]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),` Regressions`]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>g(e.target.checked)}),` Only for critical flows`]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`label`,{className:`block font-medium`,htmlFor:`dash-url`,children:`Dashboard address, for links in alerts`}),(0,C.jsx)(`input`,{id:`dash-url`,value:_,onChange:e=>v(e.target.value),className:`mt-2 w-full ${T}`})]})]})}),(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,C.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,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,C.jsx)(`button`,{type:`button`,onClick:()=>void w(),disabled:y,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`})]})]})}function D({app:e,name:t,onStatus:r}){let i=n(),[a,o]=(0,S.useState)(t),[s,l]=(0,S.useState)(!1),u=p(a),d=typeof u==`string`?void 0:u.name,f=d!==void 0&&d!==t,m=async()=>{l(!0),r(null);let t=await c({data:{app:e,displayName:a}}).catch(e=>({ok:!1,error:e.message}));if(l(!1),!t.ok)return r({tone:`error`,text:t.error});r({tone:`ok`,text:d?`Saved. ${e} now shows as "${d}".`:`Saved. The app shows as ${e} again.`}),await i.invalidate()};return(0,C.jsxs)(h,{title:`App name`,subtitle:`What people see this app as. The app id stays the same in the SDK, links and keys.`,children:[(0,C.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),f&&m()},children:[(0,C.jsxs)(`label`,{className:`min-w-0 flex-1 text-xs text-muted`,children:[`Display name`,(0,C.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:e,maxLength:60,className:`mt-1 w-full rounded-md border border-line bg-panel px-2 py-1.5 text-sm text-ink`})]}),(0,C.jsx)(`button`,{type:`submit`,disabled:!f||s,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save`})]}),(0,C.jsxs)(`p`,{className:`mt-2 text-xs text-muted`,children:[`Leave it empty to show the id (`,e,`).`]})]})}var O={match:``,name:``,owner:``,kind:``,provider:``},k=f.filter(e=>e!==`unknown`);function A({app:e,hosts:t,seen:r,onStatus:i}){let o=n(),[l,u]=(0,S.useState)(t.length+1),[f,p]=(0,S.useState)(()=>t.length?t.map((e,t)=>({id:t,match:e.match,name:e.name,owner:e.owner??``,kind:e.kind??``,provider:e.provider??``})):[{...O,id:0}]),[m,g]=(0,S.useState)(!1),_=new Set(f.map(e=>s(e.match))),v=r.filter(e=>!_.has(e)),y=(e,t)=>p(n=>n.map(n=>n.id===e?{...n,...t}:n)),b=(e=``)=>{p(t=>[...t.filter(e=>e.match||e.name),{...O,id:l,match:e}]),u(e=>e+1)},x=async()=>{g(!0),i(null);let t=await c({data:{app:e,hosts:f.map(e=>({match:e.match,name:e.name,...e.owner?{owner:e.owner}:{},...e.kind?{kind:e.kind}:{},...e.kind===`upstream`&&e.provider.trim()?{provider:e.provider}:{}}))}}).catch(e=>({ok:!1,error:e.message}));if(g(!1),!t.ok)return i({tone:`error`,text:t.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 o.invalidate()},w=`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`;return(0,C.jsx)(h,{title:`Host names`,subtitle:`Give the servers your app calls a name people recognise, and say who looks after each one.`,children:(0,C.jsxs)(`div`,{className:`space-y-3`,children:[f.map((e,t)=>(0,C.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_auto] sm:items-end sm:border-0 sm:p-0`,children:[(0,C.jsxs)(`label`,{className:`min-w-0 text-xs text-muted`,children:[`Host, or host and path`,(0,C.jsx)(`input`,{value:e.match,onChange:t=>y(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,C.jsxs)(`label`,{className:`min-w-0 text-xs text-muted`,children:[`Name`,(0,C.jsx)(`input`,{value:e.name,onChange:t=>y(e.id,{name:t.target.value}),placeholder:`Balance service`,maxLength:60,className:`mt-1 w-full text-ink ${w}`})]}),(0,C.jsxs)(`label`,{className:`text-xs text-muted`,children:[`Looked after by`,(0,C.jsxs)(`select`,{value:e.owner,onChange:t=>y(e.id,{owner:t.target.value}),className:`mt-1 w-full text-ink ${w}`,children:[(0,C.jsx)(`option`,{value:``,children:`Work it out`}),k.map(e=>(0,C.jsx)(`option`,{value:e,children:a[e].name},e))]})]}),(0,C.jsxs)(`div`,{className:`text-xs text-muted`,children:[(0,C.jsxs)(`label`,{className:`block`,children:[`Whose service`,(0,C.jsxs)(`select`,{value:e.kind,onChange:t=>y(e.id,{kind:t.target.value}),className:`mt-1 w-full text-ink ${w}`,children:[(0,C.jsx)(`option`,{value:``,children:`From the owner`}),(0,C.jsx)(`option`,{value:`ours`,children:d(`ours`)}),(0,C.jsx)(`option`,{value:`upstream`,children:`Upstream (a third party)`})]})]}),e.kind===`upstream`&&(0,C.jsxs)(`label`,{className:`mt-1 block`,children:[`Upstream's name`,(0,C.jsx)(`input`,{value:e.provider,onChange:t=>y(e.id,{provider:t.target.value}),placeholder:`Provider name`,maxLength:40,className:`mt-1 w-full text-ink ${w}`})]})]}),(0,C.jsx)(`button`,{type:`button`,onClick:()=>p(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,C.jsx)(`datalist`,{id:`seen-hosts`,children:v.map(e=>(0,C.jsx)(`option`,{value:e},e))}),v.length>0&&(0,C.jsxs)(`div`,{className:`text-xs text-muted`,children:[(0,C.jsx)(`p`,{children:`Called in the last 30 days and not named yet:`}),(0,C.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:v.slice(0,8).map(e=>(0,C.jsxs)(`button`,{type:`button`,onClick:()=>b(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,C.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. Mark a host, or a path on your own gateway, as upstream when your backend passes those calls on to a third party, such as a payment, messaging or telecom provider: Health then says when that service is down, rather than your backend or the app.`}),(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,C.jsx)(`button`,{type:`button`,onClick:()=>b(),className:`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2`,children:`Add a host`}),(0,C.jsx)(`button`,{type:`button`,onClick:()=>void x(),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 j=e=>e.level===`note`&&e.behind.some(e=>e.part!==`sdk`),M=e=>e.charAt(0).toUpperCase()+e.slice(1),N={sdk:`App SDK (newest seen)`,ingest:`Ingest`,dashboard:`This dashboard`};function P({status:e}){let t=new Set(e.behind.map(e=>e.part));return(0,C.jsxs)(h,{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,C.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,C.jsxs)(`div`,{className:`contents`,children:[(0,C.jsx)(`dt`,{className:`text-muted`,children:N[e.part]}),(0,C.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,C.jsxs)(`span`,{className:`ml-2 text-xs text-muted`,title:e.at,children:[e.part===`sdk`?`seen`:`recorded`,` `,g(e.at)]})]})]},e.part))}),e.level===`none`?(0,C.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`All in step.`}):(0,C.jsxs)(`div`,{className:`mt-3 space-y-2 text-sm`,children:[(0,C.jsxs)(`p`,{className:e.level===`banner`?``:`text-muted`,children:[M(e.behind.map(v).join(` and `)),j(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,C.jsx)(b,{status:e}):(0,C.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Update @debugkit/sdk in your app to `,e.newest,`.`]})]})]})}export{T as component};
|
|
@@ -0,0 +1,3 @@
|
|
|
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 D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function re(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 A(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,A(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),A(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(O,`$&/`)+`/`)+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+k(a,u),c+=A(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+k(a,u++),c+=A(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return A(re(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 ie(e,t,n){if(e==null)return e;var r=[],i=0;return A(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(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 oe=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 se(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,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(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 se(ce.bind(null,e))}var le={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(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=le,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=ce,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:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,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)=>D(e,t,!0);function D(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&&!(O(e)&&O(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`?D(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`?D(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`?D(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function O(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function k(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&&!k(a,o,n,r))return!1}return!0}if(O(e)&&O(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!k(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||!k(e[a],t[a],n,r)))return!1;return i===0}return!1}function re(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 A=/[\x00-\x1f\x7f"<>`{}]/g;function ie(e){return e.replace(A,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function ae(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 ie(t)}var oe=[`http:`,`https:`,`mailto:`,`tel:`];function se(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 ce=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function le(e,t){if(!e)return!1;if(ce.test(e))return!0;let n=se(e);return n?!t.has(n):!1}var ue={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},de=/[&><\u2028\u2029]/g;function fe(e){return e.replace(de,e=>ue[e])}function pe(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+=ae(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=ae(r?e.slice(r):e)}return t}function me(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function he(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 ge(e){return e.replace(/\/{2,}/g,`/`)}function _e(e){return e===`/`?e:e.replace(/^\/+/,``)}function ve(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function ye(e){return ve(_e(e))}function be(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function xe(e,t,n=`never`,r){if(t.includes(`//`)&&(t=ge(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=ge(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?ge(s):s)||`/`;return a&&r&&r.set(a,c),c}function Se(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 Ce(e){return e==null||e===``}function we(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 Te(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&&Ce(f)){if(c===`/`&&!d)continue;f=``}o+=c+we(s,f,r)+(d||``)}}return o+a||`/`}function Ee(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 De(){throw Error(`Invariant failed`)}var Oe=4,ke=5;function Ae(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 je(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 Me(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=je(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=Pe(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=Pe(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=Pe(r,ke);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=Pe(r,Oe);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 Ne(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 Pe(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 Fe(e,t){let n=Pe(),r=[];function i(e,t,n,a){let[o,s,c]=Me(!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(Ne);t.masksTree=n,t.flatCache=Ee(1e3)}function Ie(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Be(e,t.masksTree);return t.flatCache.set(e,r),r}function Le(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Pe(),Me(t,{from:e},1,o),i.singleCache.set(a,o)),Be(r,o,n)}function Re(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=Be(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=He(a.route)),t.matchCache.set(r,a),a}function ze(e,t=!1){let n=Pe(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&De(),i[e.id]=e,o!==0&&e.path){let t=ve(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Me(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(Ne);return{processedTree:{segmentTree:n,singleCache:Ee(1e3),matchCache:Ee(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Be(e,t,n=!1){let r=e.split(`/`),i=We(e,r,t,n);if(!i)return null;let[a]=Ve(e,r,i);return{route:i.node.route,rawParams:a}}function Ve(e,t,n){let r=Ue(n.node),i=n.node.data&&Ae(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===Oe)break;if(u.kind===ke){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 He(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ue(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function We(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&&!Je(l,n))continue;if(i.parse){if(!qe(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Oe&&Je(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Oe||i.kind===2)&&Je(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&&(qe(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ke(f,o))return n;Je(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+Ge(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+Ge(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+Ge(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+Ge(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 Ge(e,t){return 2**(e-t-1)}function Ke(e,t){return e===2**(t-1)-1}function qe(e,t,n){let r,i;try{[r,i]=Ve(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 Je(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===Oe)>(e.node.kind===Oe)||t.node.kind===Oe==(e.node.kind===Oe)&&t.node.depth>e.node.depth)))}function Ye(){try{return sessionStorage}catch{return}}var Xe=`tsr-scroll-restoration-v1_3`,Ze=Ye();function Qe(){try{return JSON.parse(Ze?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var $e=Qe(),et=`data-scroll-restoration-id`,tt=e=>e.state.__TSR_key||e.href;function nt(e){let t=e.getAttribute(et);if(t)return`[${et}="${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 rt=!1,it=`window`;function at(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function ot(e){let t=new Set;for(let n of e){if(n===it)continue;let e=at(n);e&&t.add(e)}return t}function st(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||tt,a=new Set,o=e=>{let t=$e[e]||={};for(let e of a)e===document?t[it]={scrollX,scrollY}:e.isConnected&&(t[nt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,rt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{rt||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{Ze?.setItem(Xe,JSON.stringify($e))}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=$e[d];if(e){let t=$e[u];for(let n in e){if(n===it){if(s)continue}else{let e=at(n);if(!e||s&&o&&(l??=ot(o),l.has(e)))continue}t||=$e[u]={},t[n]??=e[n]}}}rt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=ot(o));let t=e&&i&&c,s=r.e?$e[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===it){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=at(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{rt=!1}}))}function ct(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 lt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ut(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]=lt(r):Array.isArray(t)?t.push(lt(r)):n[e]=[t,lt(r)]}return n}var dt=/^(?:\s|["[{\d-]|fa|nu|tr)/,ft=mt(JSON.parse),pt=ht(JSON.stringify,JSON.parse);function mt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=ut(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!dt.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function ht(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&&!dt.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=ct(e,r);return t?`?${t}`:``}}var gt=`__root__`;function _t(e,t,n){let r=ye(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=ge(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>vt(n,s.input({url:e})),output:({url:e})=>s.output({url:yt(n,e)})}:s}function vt(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 yt(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 bt(e){let t=e;return{get(){return t},set(e){t=T(e,t)}}}function xt(e){return{get(){return e()}}}function St(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(()=>{he(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 Ct=`__TSR_index`,wt=`popstate`,Tt=`beforeunload`,Et=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Dt(e){let t=Et.exec(e);return t?`/`+e.slice(t[0].length):e}function Ot(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
+
\r`.includes(e)?``:encodeURIComponent(e))),Dt(e)}function kt(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=Mt(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[Ct];i=At(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[Ct];i=At(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[Ct]!==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 At(e,t){let n=Nt();return{...t,key:n,__TSR_key:n,[Ct]:e}}function jt(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=>Ot(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Mt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Nt();t.history.replaceState({[Ct]: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=Mt(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[Ct]-l.state[Ct],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=kt({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(Tt,x,{capture:!0}),t.removeEventListener(wt,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(Tt,x,{capture:!0}),t.addEventListener(wt,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 Mt(e,t){let n=Ot(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Nt();t={[Ct]: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 Nt(){return(Math.random()+1).toString(36).slice(7)}function Pt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Ft(e){return e.pathname+e.search+e.hash}function It(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Lt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Rt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function zt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Bt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Vt(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 Ht=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:jt()),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!==`/`&&ye(n)?_t(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=St(this.latestLocation,e),st(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ze(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Fe(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Ee(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:pe(e),external:!1,searchStr:o,search:ne(t?.search,i),hash:pe(r.slice(1)),state:D(t?.state,a)}}let o=vt(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:pe(Dt(o.pathname)),external:!!this.rewrite&&Pt(o,this.origin),searchStr:c,search:ne(t?.search,s),hash:pe(o.hash.slice(1)),state:D(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=Re(ve(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=Mt(n.href,{});n={...n,to:vt(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=xe(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[ve(c)],u=c.includes(`$`),d;if(l)d=l._branch??=He(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??Me(!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??=qt(n.params,e),!ee(p))break;p===e&&(p=Object.assign(te(),p));try{Object.assign(p,t(p))}catch{}}}p??=qt(n.params,Jt(n.params,f)?o()[3]:Yt);let m=e.leaveParams?c:Dt(pe(f?Te(c,f,p,this.pathParamsDecoder):c)),h=Xt(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,Kt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?Zt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Yt,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:Yt,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=yt(this.rewrite,e);C=Ft(e),Pt(n,t)?(w=n.href,T=!0):w=Dt(Ft(n))}else C=me(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=Ie(r.pathname,this.processedTree);if(t){let i=Object.assign(te(),t.rawParams),{from:a,params:o,...s}=t.route,c=qt(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 Ut(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=ve(this.latestLocation.href)===ve(n.href)&&k(zt(n.state),zt(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?se(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 Ut(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 Wn(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(Rt(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`)&&It(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(ce.test(n)||(r=se(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:Pt(e,this.origin)||(n=Ft(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=nn,this.preloadRoute=e=>Gn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?xe(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=Le(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!k(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?k(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Se(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??pt,parseSearch:e.parseSearch??ft,protocolAllowlist:e.protocolAllowlist??oe}),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=Me(!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[`**`]:ve(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Qt(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=Kt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Wt||(r=new Wt(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?Te(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{$t(i,d)}catch(e){if(C=y(e)||x(e)?e:new Gt(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=It(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?D(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,Kt(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{$t(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Ut(e,t,{replace:n,ignoreBlocker:r}){if(!le(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 Wt=class extends Error{},Gt=class extends Error{};function Kt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Wt(`Async validation not supported`);if(n.issues)throw new Wt(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 qt(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 Jt(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 Yt=Object.freeze({});function Xt(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=Kt(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 Zt(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 Qt(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 gt}function $t(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function en(e,t){return e.options[t]?.preload?.()}function tn(e,t){let n=en(e,`component`),r=en(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function nn(e,t,n){let r=()=>t===!1?void 0:t?en(e,t):tn(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 rn(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function an(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function on(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 sn=0,cn=1,ln=2,j=3,un=[4];function dn(e){return typeof e[0]==`number`}function fn(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 pn(e,t){return e.routesById[t.routeId]}function mn(e,t,n){return x(e)?[j,e]:y(e)?(e.routeId||=n,[ln,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[cn,e]):[sn,e]}function hn(e,t){let n=mn(t,!0,e.id);if(n[0]!==cn)return n;try{e.options.onError?.(n[1])}catch(t){n=mn(t,!0,e.id)}return n}function gn(e,t,n,r,i){return i[0].signal.aborted?un:jn(e,t,n,hn(n,r),i)}async function _n(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=pn(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 yn(e,r),[i,gn(e,t,u,a,n)]}if(c.aborted)return[i,un];let p=r.paramsError??r.searchError;if(p!==void 0)return yn(e,r),[i,gn(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{xn(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?fn(a,c):a);if(c.aborted)return[i,un];let s=jn(e,t,u,mn(o,!1,u.id),n);if(s[0]!==sn)return yn(e,r),[i,s];r.context={...r.context,...o}}catch(a){return yn(e,r),[i,gn(e,t,u,a,n)]}finally{r.status=h,xn(e,r,!1,n[0])}}i()}function vn(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 yn(e,t){let n=t._flight;t._flight=void 0,vn(e,t,n)?.abort()}function M(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=vn(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function bn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function xn(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 Sn(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 Cn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return un;if(!i)return[sn,void 0];let l=n._flight;xn(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Sn(e,t,n,r,s,a,!!o[3]))).then(e=>mn(e,!1,r.id),e=>mn(e,!0,r.id)).then(t=>(t[0]!==sn&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===cn&&l[2]?hn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],jn(e,t,r,await fn(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return yn(e,n),un}finally{xn(e,n,!1,s)}}function wn(e,t,n){t[0]!==j&&(e.status=`success`,e.error=void 0,t[0]===sn?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Tn(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&&yn(e,r)}function En(e,t){return t[0]===cn||t[0]===ln?{...e,status:t[0]===cn?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Dn(e,t,n,r,i,a,o){let s=t[1][n],c=pn(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(Sn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=un)),!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,yn(e,s),p=gn(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,vn(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Cn(e,t,s,c,g,i,a).then(t=>(wn(s,t,l),t[0]===sn&&(m&&!a[0].signal.aborted&&Tn(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[sn,s.loaderData]),T=(async()=>{try{let e=nn(c,void 0,C);e&&await fn(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,gn(e,t,c,r,a)]}let r=await w;x&&r[0]===sn&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>En(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=Cn(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,wn(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>En(E,e))}async function On(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=pn(e,t[n]);try{let e=nn(i,!1);e&&await fn(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function kn(e,t){t[2]&&=(M(e,t[2].map(e=>e[3])),void 0)}async function An(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]>=j)throw[a,t];!i&&t[0]!==sn&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===j)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function jn(e,t,n,r,i,a){for(;r[0]===j;){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]?[j,t]:[j,t,a]}return[j,o,n]}catch(e){r=a?[cn,e]:hn(n,e),a=!0}}return r}async function Mn(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]===ln?On(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=j)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]!==sn&&t[0]<j&&!(`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)>=j){let n=s[1];if(n[0]!==j||n[1].options.reloadDocument||n[2])return kn(e,t),n;c=!0,s=[0,[cn,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===cn?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=pn(e,u);try{await fn(i?Promise.resolve().then(()=>nn(m,l===cn?`errorComponent`:`notFoundComponent`)):Promise.all([nn(m),nn(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return kn(e,t),un}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),kn(e,t),M(e,o),p()):u.status=`success`}return t}async function Nn(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=pn(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 fn(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 Pn(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 On(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=Dn(e,i,t,u,f,r,l)},m=await _n(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===ln){let t=await On(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=j&&(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=Mn(e,i,u,r[0],An(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=An(i[2],void 0,void 0,h.then(e=>dn(e)?0:rn(n).length,()=>0))),o=await h}catch(t){if(kn(e,i),t===a&&a.aborted)return un;throw t}return dn(o)?o:Nn(e,o,a,r[6]===n.length?r[6]:0)}function Fn(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=pn(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(()=>Fn(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 In(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 Ln(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!rn(t[3]).some(e=>e.id===n[1]))return;let i;try{await fn(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Rn(e,t){e._committed=t,e.stores.setMatches(t)}function zn(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=rn(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=pn(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=Bt(n);Rn(e,n),M(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Vt(e,i,n,a,l,t)}async function Bn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Vn(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 Hn(e,t,n,r,i){let a=n.map(e=>({...e}));bn(a);for(let t of r)yn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Mn(e,o,r,t[0],i)}catch(t){throw M(e,a),t}if(dn(s))M(e,a),s[0]===j&&e._tx===t&&e._committed===n&&await Vn(e,t,s);else if(await Nn(e,s,t[0].signal),e._tx!==t||e._committed!==n)M(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),yn(e,n))}Rn(e,a),M(e,n,a)}}async function Un(e,t,n,r,i,a){let o=await Pn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(dn(o)){let n=o[0]===j&&e._tx===t;if((!n||o[1].options.reloadDocument)&&In(e,t),M(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){In(e,t);return}await Vn(e,t,o);return}let s=o[1];if(e._tx===t&&await Ln(e,t),e._tx!==t){In(e,t),M(e,s),kn(e,o);return}let c=t[2],l=Rt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Ln(e,t),e._tx!==t){In(e,t),M(e,s),kn(e,o);return}let n=await e.startTransition(()=>{In(e,t),zn(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&&Hn(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)):kn(e,o)})}async function Wn(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=Rt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Bn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});bn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){M(e,m),await Bn(e,n);return}e._preflight=void 0;let g,_=()=>Un(e,y,f,()=>Fn(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(()=>Bn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&xn(e,t,!1)}n[0].abort(),M(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))&&Fn(e,y),g?.(_()),await y[5]):(M(e,y[3]),y[3]=[],g?.(),await Bn(e,y))}async function Gn(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}),bn(a),o=(e._preloads??=new Map).set(i,a),s=await Pn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),M(e,a)),i.abort()}if(!dn(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){y(e)||console.error(e);return}}}async function Kn(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 fn(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)pn(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&Tn(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));M(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=pn(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=pn(e,t);return await(t._notFound?Promise.all([nn(n),nn(n,`notFoundComponent`)]):nn(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await fn(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=pn(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 Nn(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),M(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=Bt(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 qn=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},Jn=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},Yn=(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},Xn=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},Zn=Symbol.asyncIterator,Qn=Symbol.hasInstance,$n=Symbol.isConcatSpreadable,er=Symbol.iterator,tr=Symbol.match,nr=Symbol.matchAll,rr=Symbol.replace,ir=Symbol.search,ar=Symbol.species,or=Symbol.split,sr=Symbol.toPrimitive,cr=Symbol.toStringTag,lr=Symbol.unscopables,ur={0:`Instant`,1:`Duration`,2:`PlainDate`,3:`PlainDateTime`,4:`PlainMonthDay`,5:`PlainTime`,6:`PlainYearMonth`,7:`ZonedDateTime`},dr={0:Zn,1:Qn,2:$n,3:er,4:tr,5:nr,6:rr,7:ir,8:ar,9:or,10:sr,11:cr,12:lr};function fr(){let e={};for(let t=0;t<=12;t++)e[dr[t]]=t;return e}var pr=fr(),mr={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},hr={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function gr(){let e={};for(let t=0;t<=6;t++)e[t]=hr[t].name;return e}var _r=gr(),vr=64,yr=/["\\\n\r\b\t\f<\u2028\u2029]/,br=/[\x00-\x07\x0b\x0e-\x1f\ud800-\udfff]/,xr=/</g,Sr=/\u2028/g,Cr=/\u2029/g;function wr(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 Tr(e){let t=``+e;if(!yr.test(t))return t;if(t.length>=vr&&!br.test(t)){let e=JSON.stringify(t).slice(1,-1);return e.includes(`<`)&&(e=e.replace(xr,`\\x3C`)),e.includes(`\u2028`)&&(e=e.replace(Sr,`\\u2028`)),e.includes(`\u2029`)&&(e=e.replace(Cr,`\\u2029`)),e}let n=``,r=0,i;for(let e=0,a=t.length;e<a;e++)i=wr(t.charCodeAt(e)),i&&(n+=t.slice(r,e)+i,r=e+1);return n+t.slice(r)}var Er=/^(?:[^"\\\x00-\x1f]|\\["\\nrbtf])*$/,Dr=/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g;function Or(e){if(typeof e!=`string`)return e.replace(Dr,Or);let t=e.indexOf(`\\`);if(t===-1)return e;if(Er.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 kr={parsing:1,serialization:2,deserialization:3};function Ar(e){return`Seroval Error (step: ${kr[e]})`}var jr=class extends Error{constructor(e,t){super(Ar(e)),this.cause=t}},Mr=class extends jr{constructor(e){super(`parsing`,e)}},Nr=class extends jr{constructor(e){super(`deserialization`,e)}};function Pr(e){return`Seroval Error (specific: ${e})`}var Fr=class extends Error{constructor(e){super(Pr(1)),this.value=e}},Ir=class extends Error{constructor(e){super(Pr(2))}},Lr=class extends Error{constructor(e){super(Pr(3))}},Rr=class extends Error{constructor(e,t){super(Pr(13)),this.tag=e,this.field=t}},zr=class extends Error{constructor(e){super(Pr(4))}},Br=class extends Error{constructor(e){super(Pr(6))}},Vr=class extends Error{constructor(e){super(Pr(7))}},N=class extends Error{constructor(e){super(Pr(8))}},Hr=class extends Error{constructor(e){super(Pr(9))}},Ur=class extends Error{constructor(e){super(Pr(10))}},Wr=new Map,Gr=new Map;function Kr(e){return Gr.has(e)}function qr(e){return Wr.get(e)}function Jr(e){if(Kr(e))return Gr.get(e);throw new Br(e)}var Yr=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function Xr(e){return e instanceof Yr}function Zr(e,t,n){return new Yr(e,t,n)}function Qr(e){let t=[],n=-1,r=-1,i=e[er]();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 Zr(t,n,r)}var $r=Jn(er);function ei(e){return $r(e)}var ti=Symbol(`LiveStream`);function ni(e){return e!=null&&e[ti]===!0}var ri=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 ii(e){return e instanceof ri||ni(e)}function ai(){return new ri}var oi=Yn(Zn,qn);function si(e){return oi(e)}function ci(e){return e}function li(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&li(e,r.extends))}}var ui=new WeakMap;function di(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=di(e,i.extends,n),n===-1))return-1}else{let t=e.indexOf(i);if(t===-1||t>=n)return-1}}return n}function fi(e){if(e){let t=ui.get(e);if(t&&di(t,e,0)===t.length)return t;let n=new Set;li(n,e);let r=[...n];return ui.set(e,r),r}}function pi(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 mi=class{constructor(e,t){this.value=e,this.replacement=t}};function hi(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 gi=512;function _i(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):hi(e)}function vi(e){if(e.length<gi||typeof Buffer>`u`)return Xn(e);let t=atob(e),n=new ArrayBuffer(t.length);return Buffer.from(n).write(t,`latin1`),n}function yi(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 Vr(e)}}var bi;function xi(e){return bi||=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get,bi.call(e)}var Si,Ci;function wi(e,t){return Object.getOwnPropertyDescriptor(e,t).get}function Ti(e,t){return{buffer:wi(e,`buffer`),byteOffset:wi(e,`byteOffset`),byteLength:wi(e,`byteLength`),length:wi(e,t)}}function Ei(e,t){let n;return n=t?Ci??=Ti(DataView.prototype,`byteLength`):Si??=Ti(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 Di(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function Oi(e){switch(e){case Zn:case $n:case cr:case er:return!0;default:return!1}}var ki=1e6,Ai=1e4,ji=2e4;function Mi(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 Ni=1e3,Pi=32,Fi=/\\[pP]\{/g;function Ii(e){let t=e.maxBase64Length??ki;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||Ni,maxBase64Length:t,regexpPropertyEscapes:Pi}}function Li(e){return{base:Ii(e),marked:void 0}}function Ri(e,t){let n={t:4,i:t};if(t<0||!Number.isInteger(t))throw new N(n);if(e.refs.has(t))throw new Hr(n)}function zi(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}var Bi=()=>{};function P(e,t,n){Ri(e.base,t),n instanceof Promise&&n.catch(Bi);let r=e.marked;return(!r||r.has(t))&&e.base.refs.set(t,n),n}function Vi(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new N(e)}function Hi(e,t){return P(e,t.i,Jr(Or(t.s)))}function Ui(e,t){if(!Array.isArray(t))throw new N(e)}function Wi(e,t,n){let r=n.a;Ui(n,r);let i=r.length,a=P(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=F(e,t,o));return Mi(a,n.o),a}function Gi(e,t,n){Di(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function Ki(e,t,n,r,i){if(typeof r==`string`)Gi(n,Or(r),F(e,t,i));else{let a=F(e,t,r);switch(typeof a){case`string`:Gi(n,a,F(e,t,i));break;case`symbol`:Oi(a)&&(n[a]=F(e,t,i));break;default:throw new N(r)}}}function qi(e,t,n){e.base.refs.types.set(t,n)}function Ji(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new N(t)}function Yi(e,t,n,r){let i=n.k;Ui(n,i),Ui(n,n.v);let a=i.length;if(a>0)for(let o=0,s=n.v;o<a;o++)Ki(e,t,r,i[o],s[o]);return r}function Xi(e,t,n){let r=P(e,n.i,n.t===10?{}:Object.create(null));return Yi(e,t,n.p,r),Mi(r,n.o),r}function Zi(e,t){return P(e,t.i,new Date(t.s))}function Qi(e,t){if(!(e.base.features&64))throw new Ir(t);let n=Temporal[Vi(t,ur,t.c)];return P(e,t.i,n.from(t.s))}function $i(e,t){if(e.base.features&32){let n=Or(t.c);if(n.length>ji)throw new N(t);if(/[uv]/.test(String(t.m))){let r=n.match(Fi);if(r&&(e.base.regexpPropertyEscapes-=r.length,e.base.regexpPropertyEscapes<0))throw new N(t)}return P(e,t.i,new RegExp(n,t.m))}throw new Ir(t)}function ea(e,t,n){let r=P(e,n.i,new Set);Ui(n,n.a);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(F(e,t,a[i]));return r}function ta(e,t,n){let r=P(e,n.i,new Map);Ui(n,n.e.k),Ui(n,n.e.v);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(F(e,t,a[i]),F(e,t,o[i]));return r}function na(e,t){if(typeof t.s!=`string`)throw new N(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=vi(Or(t.s));return P(e,t.i,n)}function ra(e,t,n,r){let i=F(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new N(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new N(n);return P(e,n.i,r?new r(i,a,n.l):new DataView(i,a,n.l))}function ia(e,t,n,r){if(n.p){let i=Yi(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function aa(e,t,n){return ia(e,t,n,P(e,n.i,AggregateError([],Or(n.m))))}function oa(e,t,n){let r=Vi(n,hr,n.s);return ia(e,t,n,P(e,n.i,new r(Or(n.m))))}function sa(e,t,n){let r=qn(),i=P(e,n.i,r.p),a=F(e,t,n.f);if(zi(a))throw new N(n.f);return n.s?r.s(a):r.f(a),i}function ca(e,t,n){return P(e,n.i,Object(F(e,t,n.f)))}function la(e,t){let n=e.s;if(typeof n!=`object`||!n)throw new N(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 ua(e,t,n){let r=e.base.plugins;if(r){let i=Or(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i){let r=o.validate?la(n,o.validate):void 0;return P(e,n.i,o.deserialize(n.s,{deserialize:n=>{let a=F(e,t,n);if(r){for(let[e,t,o]of r)if(e===n&&!o(a))throw new Rr(i,t)}return a}},{id:n.i}))}}}throw new Lr(n.c)}function da(e,t){let n=P(e,t.i,P(e,t.s,qn()).p);return qi(e,t.s,22),e.base.pending?.add(t.s),n}function fa(e,t,n){let r=e.base.refs.get(n.i);if(r){Ji(e,n,n.i,22);let i=F(e,t,n.a[1]);if(zi(i))throw new N(n.a[1]);n.t===23?r.s(i):r.f(i),e.base.pending?.delete(n.i)}else throw new zr(`Promise`)}function pa(e,t,n){F(e,t,n.a[0]);let r=F(e,t,n.a[1]);if(!Xr(r))throw new N(n.a[1]);return ei(r)}function ma(e,t,n){F(e,t,n.a[0]);let r=F(e,t,n.a[1]);if(!ii(r))throw new N(n.a[1]);return si(r)}function ha(e,t,n){let r=P(e,n.i,new ri(n.l===1?1:void 0));qi(e,n.i,31),e.base.pending?.add(n.i);let i=n.a;Ui(n,i);let a=i.length;if(a)for(let n=0;n<a;n++)F(e,t,i[n]);return r}function ga(e,t,n,r){let i=e.base.refs.get(n.i);if(i)Ji(e,n,n.i,31),i[r](F(e,t,n.f)),r!==`next`&&e.base.pending?.delete(n.i);else throw new zr(`Stream`)}function _a(e,t,n){F(e,t,n.f)}function va(e,t,n){F(e,t,n.a[1])}function ya(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function ba(e,t,n){Ui(n,n.a);let r=n.a.length;if(!(ya(n.s,r)&&ya(n.l,r)))throw new N(n);let i=P(e,n.i,Zr([],n.s,n.l));qi(e,n.i,35);for(let a=0;a<r;a++)i.v[a]=F(e,t,n.a[a]);return i}function F(e,t,n){if(t>e.base.depthLimit)throw new Ur(e.base.depthLimit);switch(t+=1,n.t){case 2:return Vi(n,mr,n.s);case 0:return Number(n.s);case 1:return Or(String(n.s));case 3:if(String(n.s).length>Ai)throw new N(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return Hi(e,n);case 9:return Wi(e,t,n);case 10:case 11:return Xi(e,t,n);case 5:return Zi(e,n);case 6:return $i(e,n);case 7:return ea(e,t,n);case 8:return ta(e,t,n);case 19:return na(e,n);case 16:case 15:return ra(e,t,n,yi(n.c));case 20:return ra(e,t,n);case 14:return aa(e,t,n);case 13:return oa(e,t,n);case 12:return sa(e,t,n);case 17:return Vi(n,dr,n.s);case 21:return ca(e,t,n);case 25:return ua(e,t,n);case 22:return da(e,n);case 23:case 24:return fa(e,t,n);case 28:return pa(e,t,n);case 30:return ma(e,t,n);case 31:return ha(e,t,n);case 32:return ga(e,t,n,`next`);case 33:return ga(e,t,n,`throw`);case 34:return ga(e,t,n,`return`);case 27:return _a(e,t,n);case 29:return va(e,t,n);case 35:return ba(e,t,n);case 36:return Qi(e,n);default:throw new Ir(n)}}function xa(e,t){e.base.regexpPropertyEscapes=Pi;try{return F(e,0,t)}catch(e){throw new Nr(e)}}function Sa(e){return Li({maxBase64Length:e.maxBase64Length,plugins:fi(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit})}function Ca(e,t){return xa(Sa(t),e)}function I(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 wa(e){return I(2,void 0,e)}var Ta=wa(2),Ea=wa(3),Da=wa(1),Oa=wa(0),ka=wa(4),Aa=wa(5),ja=wa(6),Ma=wa(7);function Na(e){for(let t=1;t<=6;t++)if(e instanceof hr[t])return t;return 0}function Pa(e,t){let n=Object.create(null),r=_r[Na(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 Fa(e){return Object.isExtensible(e)?0:Object.isFrozen(e)?3:Object.isSealed(e)?2:1}function Ia(e){switch(e){case 1/0:return Aa;case-1/0:return ja}return e===e?Object.is(e,-0)?ka:I(0,void 0,e):Ma}function La(e){return I(1,void 0,Tr(e))}function Ra(e){return I(3,void 0,``+e)}function za(e){return I(4,e)}var Ba=Date.prototype.getTime,Va=Date.prototype.toISOString;function Ha(e,t){let n=Ba.call(t);return I(5,e,n===n?Va.call(t):``)}function Ua(e,t,n,r){return I(36,e,n.prototype.toString.call(r),t)}var Wa=Object.getOwnPropertyDescriptor(RegExp.prototype,`source`).get,Ga=Object.getOwnPropertyDescriptor(RegExp.prototype,`flags`).get;function Ka(e,t){return I(6,e,void 0,Tr(Wa.call(t)),Ga.call(t))}function qa(e,t){return I(17,e,pr[t])}function Ja(e,t){return I(18,e,Tr(t))}function Ya(e,t,n){return I(25,e,n,Tr(t))}function Xa(e,t,n){return I(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,Fa(t))}function Za(e,t){return I(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t)}var Qa=1e6;function $a(e){let t=e.length;if(t>Qa&&t-Object.keys(e).length>Qa)throw new Fr(e)}function eo(e,t,n,r,i){let a=e===20,o=r.length;if(o>Qa)throw new Fr(n);return I(e,t,void 0,a?void 0:xi(n),void 0,void 0,void 0,void 0,i,r.byteOffset,void 0,o)}function to(e,t,n,r){return I(e,t,Na(n),void 0,Tr(n.message),r)}function no(e,t){return I(7,e,void 0,void 0,void 0,void 0,void 0,t)}function ro(e,t,n){return I(e,void 0,void 0,void 0,void 0,void 0,void 0,[t,n])}function io(e,t,n,r){return I(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,r)}function ao(e,t,n){return I(e,t,void 0,void 0,void 0,void 0,void 0,void 0,n)}function oo(e,t,n,r){return I(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var so={},co={},lo={0:{},1:{},2:{},3:{},4:{},5:{}};async function uo(e){try{return[1,await e]}catch(e){return[0,e]}}function fo(e){return{plugins:e.plugins,plainObjectPlugins:pi(e.plugins),marked:new Set,features:127^(e.disabledFeatures??0),refs:e.refs??new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:e.compactArrayBufferViews??!1}}function po(e,t,n){return n===Object&&Object.getPrototypeOf(t)===Object.prototype?e.plainObjectPlugins:e.plugins}function mo(e,t){e.marked.add(t)}function ho(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function go(e,t){if(e.size>t)for(let[n,r]of e)r>=t&&e.delete(n)}function _o(e,t){let n=e.refs.get(t);return n==null?ho(e,t):(mo(e,n),za(n))}function vo(e,t){let n=_o(e,t);if(typeof n!=`number`)return n;let r=qr(t);return r===void 0?n:Ja(n,r)}function yo(e,t){let n=vo(e,t);if(typeof n!=`number`)return n;if(t in pr)return qa(n,t);throw new Fr(t)}function bo(e,t){let n=_o(e,lo[t]);return typeof n==`number`?I(26,n,t):n}function xo(e){let t=_o(e,so);return typeof t==`number`?I(27,t,void 0,void 0,void 0,void 0,void 0,void 0,yo(e,er)):t}function So(e){let t=_o(e,co);return typeof t==`number`?I(29,t,void 0,void 0,void 0,void 0,void 0,[bo(e,1),yo(e,Zn)]):t}function Co(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 wo(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 To(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`&&Co(t)!=null)return 15;if(ArrayBuffer.isView(e)){let t=xi(e);if(t===void 0)return 10;if(t!==`BigInt64Array`&&t!==`BigUint64Array`)return 8;if(n&16)return 9}return e instanceof Error?4:er in e||Zn in e?16:0}function Eo(e,t,n,r){return I(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,Fa(t))}function Do(e){return bo(e,0)}function Oo(e,t,n,r){return I(8,e,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,t)}function ko(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 Ao(e,t,n){return I(19,t,_i(n),void 0,void 0,void 0,void 0,void 0,bo(e,5))}function jo(e){return{base:fo(e)}}function Mo(){}function No(e){for(let t of e)t instanceof Promise&&Promise.prototype.then.call(t,void 0,Mo)}async function Po(e,t,n){$a(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]);No(a);for(let n=0,s;n<r;n++)o[n]?(s=Zo(e,t,a[n]),i[n]=s instanceof Promise?await s:s):i[n]=0;return i}async function Fo(e,t,n,r){return Xa(n,r,await Po(e,t,r))}async function Io(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]];No(s);for(let n=0,c;n<i;n++)a[n]=Tr(r[n]),c=Zo(e,t,s[n]),o[n]=c instanceof Promise?await c:c;return er in n&&(a.push(yo(e.base,er)),o.push(ro(28,xo(e.base),await Qo(e,t,Qr(n))))),Zn in n&&(a.push(yo(e.base,Zn)),o.push(ro(30,So(e.base),await qo(e,t,n)))),cr in n&&(a.push(yo(e.base,cr)),o.push(La(n[cr]))),$n in n&&(a.push(yo(e.base,$n)),o.push(n[$n]?Ta:Ea)),{k:a,v:o}}async function Lo(e,t,n,r,i){return Eo(n,r,i,await Io(e,t,r))}async function Ro(e,t,n,r){let i=Zo(e,t,r.valueOf());return Za(n,i instanceof Promise?await i:i)}async function zo(e,t,n,r,i){let a=ko(e.base,Ei(i,n===20));return eo(n,r,i,a,await Qo(e,t,a.buffer))}async function Bo(e,t,n,r,i){let a=Pa(i,e.base.features);return to(n,r,i,a?await Io(e,t,a):void 0)}async function Vo(e,t,n,r){let i=Do(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];No(c),No(l);for(let n=0,r;n<a.length;n++)r=Zo(e,t,c[n]),o[n]=r instanceof Promise?await r:r,r=Zo(e,t,l[n]),s[n]=r instanceof Promise?await r:r;return Oo(n,i,o,s)}async function Ho(e,t,n,r){let i=[...r.keys()],a=Array(i.length);No(i);for(let n=0,r;n<i.length;n++)r=Zo(e,t,i[n]),a[n]=r instanceof Promise?await r:r;return no(n,a)}async function Uo(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 Ya(n,o.tag,await o.parse.async(r,{parse:n=>Qo(e,t,n),parseStreamSource(n){if(t>=e.base.depthLimit)throw new Ur(e.base.depthLimit);return qo(e,t+1,n)}},{id:n}))}}async function Wo(e,t,n,r){let[i,a]=await uo(r);return I(12,n,i,void 0,void 0,void 0,void 0,void 0,await Qo(e,t,a))}function Go(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;mo(this.base,t);let p=a.push(void 0)-1;o++,n!==32&&(s=!0),Qo(this,e,u).then(e=>{if(!c&&(a[p]=ao(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=ni(n)?n.pump(d):n.on(d)}async function Ko(e,t,n,r){return io(n,bo(e.base,4),await new Promise(Go.bind(e,t,n,r)))}async function qo(e,t,n){let r=ho(e.base,{}),i=bo(e.base,4),a=n[Zn](),o=[];for(;;){let n;mo(e.base,r);try{n=await a.next()}catch(n){o.push(ao(33,r,await Qo(e,t,n)));break}let i;try{i=await Qo(e,t,n.value)}catch(e){throw Promise.resolve().then(()=>a.return?.()).catch(()=>{}),e}if(o.push(ao(n.done?34:32,r,i)),n.done)break}return io(r,i,o)}async function Jo(e,t,n,r){let i=r.v.length,a=Array(i);for(let n=0,o;n<i;n++)o=Zo(e,t,r.v[n]),a[n]=o instanceof Promise?await o:o;return oo(n,a,r.t,r.d)}async function Yo(e,t,n,r){if(Array.isArray(r))return Fo(e,t,n,r);if(ii(r))return Ko(e,t,n,r);if(Xr(r))return Jo(e,t,n,r);let i=wo(r);if(i===mi)return Qo(e,t,r.replacement);let a=await Uo(e,t,n,r,po(e.base,r,i));if(a)return a;if(i===Object)return Lo(e,t,n,r,!1);switch(To(r,i,e.base.features)){case 2:return Lo(e,t,n,r,!0);case 3:return Ha(n,r);case 4:return Bo(e,t,13,n,r);case 5:return Bo(e,t,14,n,r);case 6:return Ro(e,t,n,r);case 7:return Ao(e.base,n,r);case 8:return zo(e,t,15,n,r);case 9:return zo(e,t,16,n,r);case 10:return zo(e,t,20,n,r);case 11:return Vo(e,t,n,r);case 12:return Ho(e,t,n,r);case 13:return Wo(e,t,n,r);case 14:return Ka(n,r);case 15:return Ua(n,Co(i),i,r);case 16:return Lo(e,t,n,r,!!i);default:throw new Fr(r)}}async function Xo(e,t,n){let r=vo(e.base,n);if(typeof r!=`number`)return r;let i=await Uo(e,t,r,n,e.base.plugins);if(i)return i;throw new Fr(n)}function Zo(e,t,n){if(t>=e.base.depthLimit)throw new Ur(e.base.depthLimit);switch(typeof n){case`boolean`:return n?Ta:Ea;case`undefined`:return Da;case`string`:return La(n);case`number`:return Ia(n);case`bigint`:return Ra(n);case`object`:if(n){let r=vo(e.base,n);return typeof r==`number`?Yo(e,t+1,r,n):r}return Oa;case`symbol`:return yo(e.base,n);case`function`:return Xo(e,t,n);default:throw new Fr(n)}}async function Qo(e,t,n){return await Zo(e,t,n)}async function $o(e,t){let n=e.base.refs,r=n.size;try{return await Qo(e,0,t)}catch(e){throw go(n,r),e instanceof Mr?e:new Mr(e)}}async function es(e,t={}){let n=fi(t.plugins),r=jo({compactArrayBufferViews:t.compactArrayBufferViews,depthLimit:t.depthLimit,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await $o(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function ts(e){return ci({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 ns(e){if(Array.isArray(e))return e.flatMap(e=>ns(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 rs(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function is(...e){return e.reduce((e,t)=>{let n=rs(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?ns(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var as=ci({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))}}),os=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function ss(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 cs=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function ls(e){try{return`t`+cs.decode(e)}catch{return`b`+ss(e)}}function us(e,t,n){n?.throwIfAborted();let r=ai(),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 ds(e){return ci({tag:`tss/RawStream`,test:e=>e instanceof os,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=us(t.stream,t.hint===`text`?ls:ss,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var fs=ds(),ps=new WeakSet;function ms(e){if(typeof e==`object`&&e){if(ps.has(e))throw Error(`Expected a value used by one plugin value only.`);ps.add(e)}return e}var hs={},gs=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),_s=ci({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===hs},parse:{sync(){return hs},async async(){return await Promise.resolve(hs)},stream(){return hs}},serialize(){return gs.toString()},deserialize(){return hs}});function vs(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 ys=ci({tag:`seroval/plugins/web/ReadableStream`,extends:[_s],skipPlainObjects:!0,test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{async async(e,t){return{factory:await t.parse(hs),stream:await t.parseStreamSource(vs(e))}},stream(e,t){return{factory:t.parse(hs),stream:t.parseStreamSource(vs(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},validate:{stream:ii},deserialize(e,t){return gs(ms(t.deserialize(e.stream)))}});function bs(e){return[as,e?ds(e):fs,ys]}[...bs()];function xs(e){return ci({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function Ss(e){return[...(_()?.serializationAdapters)?.map(ts)??[],...e]}function Cs(e){return Ss(bs(e))}var ws=new TextDecoder,Ts=new Uint8Array,Es=new ByteLengthQueuingStrategy({highWaterMark:0});function Ds(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)}},Es),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=Ts,o=0;async function c(){for(;o===e.byteLength;){e=Ts,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 Ts;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=Ts,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=Ts,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=Ts,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=ws.decode(f);for(f=Ts,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=Ts;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=Ts,e.enqueue(t)}}else s(d,t===2?1:[Error(ws.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=Ts,t.releaseLock()}})(),[c,u]}var Os=`Error preloading route! ☝️`,ks=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=gt:this.parentRoute||De();let r=n?gt:t?.path;r&&r!==`/`&&(r=_e(r));let i=t?.id||r,a=n?gt:ge((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:ge(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=ve(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.`)}},As=class extends ks{constructor(e){super(e)}},js;function Ms(e,t,n){try{return Ca(e,t)}catch(e){throw Ps(n),e}}async function Ns(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function Ps(e){for(let t of e)t.catch(()=>{});e.length=0}var Fs=Object.prototype.hasOwnProperty;function Is(e){for(let t in e)if(Fs.call(e,t))return!0;return!1}async function Ls(e,t,n){js||=Cs();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 Rs(r);if(t!==void 0){let n=ct({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await Bs(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),Vs(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function Rs(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&Is(e.context)&&((t??={}).context=e.context),t?zs(t,e.signal):void 0}async function zs(e,t){t?.throwIfAborted();let n;try{n=await es(e,{plugins:t?Cs(t):js})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function Bs(e){if(e.data instanceof FormData){let t;return e.context&&Is(e.context)&&(t=await zs(e.context,e.signal)),t!==void 0&&e.data.set(f,t),e.data}return Rs(e)}async function Vs(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||De(),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]=Ds(t.body);e=await Hs(i,[xs(a),...js])}else if(r.includes(`application/json`)){let n=await t.json(),r=[];e=Ms(n,{plugins:js},r),await Ns(r)}return e||De(),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 Hs(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=Ms(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;Ms(JSON.parse(t.value),r,e),Ps(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await Ns(o),a}function L(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=_()?.serverFns?.fetch;return Ls(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[p]:!0})}var R=l(d(),1),Us=R.use,Ws=R.useLayoutEffect,Gs=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})),Ks=o(((e,t)=>{t.exports=Gs()})),qs=R.createContext(null);function Js(e){return R.useContext(qs)}function Ys(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{an(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 Xs=R.createContext(void 0),Zs=R.createContext(void 0),Qs=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})),$s=o(((e,t)=>{t.exports=Qs()})),ec=o((e=>{var t=d(),n=$s();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}})),tc=o(((e,t)=>{t.exports=ec()})),nc=tc();function rc(e,t){return e===t}function ic(e,t=e=>e,n){let r=n?.compare??rc,i=(0,R.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,R.useCallback)(()=>e.get(),[e]);return(0,nc.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var ac={};function oc(e,t){let n=R.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=D(n.current,i):i}}function sc(e){let t=Js(),n=R.useContext(e.from?Zs:Xs),r=e.from??n,i=t.stores.getMatchStore(r),a=oc(e,t),o=ic(i,e=>e?a(e):ac);if(o!==ac)return o;(e.shouldThrow??!0)&&De()}function cc(e){return sc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function lc(e){let{select:t,...n}=e;return sc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function uc(e){return sc({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 dc(e){return sc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fc(e){let t=Js();return R.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function pc(e){return sc({...e,select:t=>e.select?e.select(t.context):t.context})}var mc=Ks();function hc(...e){let t=R.useRef(e),n=t.current;return e.forEach((e,t)=>{k(n[t],e,!1,!0)||(n[t]=e)}),t.current}function gc(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Os)})}function _c(e,t){let n=typeof e==`string`&&se(e);if(n)return t.has(n)?e:null}function vc(e,t,n,r){let i=be(e.pathname,r),a=be(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!k(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function yc(e,t,n){let r=Js(),i=R.useRef(null),a=R.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]=hc(e.search,e.params,o),x=R.useContext(Xs),S=(r.stores._linkScopes??={})[x]??=Ys(r,x),[C,w,T]=R.useMemo(()=>{let t=_c(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=Dc(t,r,u),s=u||o&&!se(o)?vc(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]=R.useSyncExternalStore(S[1],w,T||w),te=ee===void 0&&E,ne=u||E===void 0,D=R.useRef(!1),O=e.reloadDocument||te||ne?!1:c??r.options.defaultPreload,k=l??r.options.defaultPreloadDelay??0,re=R.useCallback(e=>{let t=e?.isIntersecting;t??O===`intent`?k?i.t??=setTimeout(()=>{i.t=void 0,gc(r,C)},k):gc(r,C):t===!1&&Tc(i)},[r,C,i,O,k]);R.useEffect(()=>{if(!O)return;O===`render`&&!D.current&&(D.current=!0,gc(r,C));let e=!0,t;return O===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&re(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Tc(i)}},[r,C,O,re,i]);let A=Cc(e,n);if(A.ref=t?a:i,te)return A.href=te,A;let ie=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(),Tc(i),r.navigate({...e,_fromLocation:C._fromLocation}))},ae=()=>{O===`intent`&&gc(r,C)},oe=()=>{O===`intent`&&Tc(i)};return A.onClick=Ec(f,ie),A.onBlur=Ec(p,oe),A.onFocus=Ec(m,re),A.onMouseEnter=Ec(h,re),A.onMouseLeave=Ec(g,oe),A.onTouchStart=Ec(_,ae),wc(A,e,ee,E,ne,n)}var bc={},xc={className:`active`},Sc=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 Cc(e,t){let n={};for(let r in e)Sc.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function wc(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=T(n?o:s,{})??(n?xc:bc);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 Tc=e=>{clearTimeout(e.t),e.t=void 0},Ec=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Dc(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||!le(i,t.protocolAllowlist))return i}var Oc=R.memo(R.forwardRef((e,t)=>{let n=e._asChild||`a`,r=yc(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return R.createElement(n,r,i)}),kc);function kc(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Sc.has(r)||!k(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Ac=class extends ks{constructor(e){super(e),this.useMatch=e=>sc({...e,from:this.id}),this.useRouteContext=e=>pc({...e,from:this.id}),this.useSearch=e=>dc({...e,from:this.id}),this.useParams=e=>uc({...e,from:this.id}),this.useLoaderDeps=e=>lc({...e,from:this.id}),this.useLoaderData=e=>cc({...e,from:this.id}),this.useNavigate=()=>fc({from:this.fullPath}),this.Link=R.forwardRef((e,t)=>(0,mc.jsx)(Oc,{ref:t,from:this.fullPath,...e}))}};function jc(e){return new Ac(e)}var Mc=class extends As{constructor(e){super(e),this.useMatch=e=>sc({...e,from:this.id}),this.useRouteContext=e=>pc({...e,from:this.id}),this.useSearch=e=>dc({...e,from:this.id}),this.useParams=e=>uc({...e,from:this.id}),this.useLoaderDeps=e=>lc({...e,from:this.id}),this.useLoaderData=e=>cc({...e,from:this.id}),this.useNavigate=()=>fc({from:this.fullPath}),this.Link=R.forwardRef((e,t)=>(0,mc.jsx)(Oc,{ref:t,from:this.fullPath,...e}))}};function Nc(e){return new Mc(e)}function Pc(e){return e=>{let t=jc(e);return t.isRoot=!1,t}}function Fc(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(re(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(Us)Us(a());else throw a()}return R.createElement(r,e)};return o.preload=a,o}function Ic(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Lc(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];Ic(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];Ic(i)&&(n[i]=t[i])}}return n}function Rc(e){return e?Lc(e,void 0):Object.create(null)}var zc=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},z=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>z(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=z(void 0,{...n,middleware:t});return r[m]=!0,r},validator:e=>z(void 0,{...n,validator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],Gc(i)];return t.method=n.method,Object.assign(async e=>{let n=await Hc(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:Rc()});if(`error`in n)throw S(n.error)??n.error;return n.result},{...t,method:n.method,__executeServer:void 0})}})};function Bc(e,t){return e===void 0&&t===void 0?void 0:Lc(e,t)}function Vc(e,t){return e||t?is(e,t):void 0}async function Hc(e,t,n){let r=Uc((_()?.functionMiddleware||[]).concat(e),void 0,t===`server`?new Set(zc({throwIfNotFound:!1})?.executedRequestMiddlewares):void 0),i=0,a=async(e,n)=>{let o=e;n!==void 0&&(o={...e,...n},o.context=Lc(e.context,n.context),o.sendContext=Bc(e.sendContext,n.sendContext),o.headers=Vc(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 Wc(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||Rc(),_callSiteFetch:n.fetch};o.sendContext!==void 0&&(o.sendContext||={});try{return await a(o)}catch(e){return{...o,error:e}}}function Uc(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 Wc(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 Gc(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 Kc=z({method:`GET`}).handler(L(`1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f`)),qc=z({method:`GET`}).handler(L(`c63a8340378de7fe78e1e8ba9aaeaa87b401e3838b3e5bfa029f155bcb39b2d2`)),Jc=z({method:`GET`}).handler(L(`949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1`)),Yc=z({method:`POST`}).handler(L(`a9edf8f42685a06ce282bb7c9f888e3ae39636f350a90750c31a47b27de7dca8`)),Xc=z({method:`POST`}).handler(L(`fd40d9026eb7d8fb5ab200daaed9a58f1d7b4eaf5b1ccab3e4cef9b0fedd9bc4`)),Zc=z({method:`POST`}).handler(L(`4f05eccbec2dfe6e5477f43b46368306bcb812e59bc1084627f631905366e1cf`)),Qc=z({method:`GET`}).handler(L(`e4bd743644d2eb6b2abc17f991555672e3e18eef87fa6328ad519266e5340ee2`)),$c=z({method:`GET`}).handler(L(`c070aa6e848a86610db68e1835bacf10a87e00e6d58cbf8df2b533e14fe95b7b`)),el=z({method:`GET`}).handler(L(`8ade0e7bba4102fdb7cbe0494762fbb0d01a480c84a69f325fc76686a0dc0237`)),tl=z({method:`GET`}).handler(L(`86933afdbcaa1be4a0aa07c4f8e690fdd684edbeab02a49ffdb73e85cadf9933`)),nl=z({method:`GET`}).handler(L(`8fc5d548afdc47f30ea4f9fab6f96cf926fd407c0b80ea68c796b6de7e606a4e`)),rl=z({method:`GET`}).handler(L(`a4d3bc63ce8ef43aeb81dfb47c631fe47d634d298109d6b5865742aff7363696`)),il=z({method:`GET`}).handler(L(`54a67fa946c48ef3e3aaa27c8b323c380b12a14879a00a9567f52e31c358a0ed`)),al=z({method:`POST`}).handler(L(`c263ee8bf14396211aeb95bc2b2aec914480b38cc99a9024c1319f932f590f2f`)),ol=z({method:`GET`}).handler(L(`e97a9c2b8715ff5e25a9629262b594fb42f11853d6eea78b87305fd0b5155d4d`)),sl=z({method:`POST`}).handler(L(`0c2f8fcb35c5e356e4a58fce376bb16efb0e006f519592fdd5f120fa868720cd`)),cl=z({method:`POST`}).handler(L(`950c0a9412e17ae8308bccd862dee5faea0375153c5ce59491a033dbcb7e7181`)),ll=z({method:`POST`}).handler(L(`7028d75aed3e58a91f5f26a3821d0cec6bb478a913058f5aa73cbfb64bbc41d3`)),ul=z({method:`POST`}).handler(L(`a1b47d616a31acc3132c1bb8258bde961d9c419ff91b2ce1d6479ebb9760b393`)),dl=z({method:`GET`}).handler(L(`8ff7e08627330b1c64257ee12b7ed04815853cb3735a9324805c0bcf149bae9f`)),fl=z({method:`POST`}).handler(L(`0dcf3aa141898f7bb0cefed3e6129613f6226a680cc800b8cb18d2c60b7706fa`)),pl=z({method:`POST`}).handler(L(`b4629be951e5766734fb72f9e1400c19f585a4381d9172539b2512ae5056f4e8`)),ml=z({method:`POST`}).handler(L(`51bfd02b4d1772943ec480c2dcd7b445826bcfa7d494453d269cc82644ea2a42`)),hl=z({method:`POST`}).handler(L(`2727b9721f5d291dbb62652d2de5cff55fd7871756147d8ce441b03a7a494617`)),gl=z({method:`GET`}).handler(L(`8e8646e3fd8b630ba5696313fb01543dc62410ff8fa9b1eea9763286d32c8927`)),_l=z({method:`POST`}).handler(L(`2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220`)),vl=`modulepreload`,yl=function(e){return`/`+e},bl={},xl=function(e){return e.pathname.endsWith(`.css`)},Sl=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},Cl=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=yl(t,n);let r=s(t),i=xl(r);return Sl(bl,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`:vl,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)})},B;(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})(B||={});var wl;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(wl||={});var V=B.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Tl=e=>{switch(typeof e){case`undefined`:return V.undefined;case`string`:return V.string;case`number`:return Number.isNaN(e)?V.nan:V.number;case`boolean`:return V.boolean;case`function`:return V.function;case`bigint`:return V.bigint;case`symbol`:return V.symbol;case`object`:return Array.isArray(e)?V.array:e===null?V.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?V.promise:typeof Map<`u`&&e instanceof Map?V.map:typeof Set<`u`&&e instanceof Set?V.set:typeof Date<`u`&&e instanceof Date?V.date:V.object;default:return V.unknown}},H=B.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`]),El=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,B.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()}};El.create=e=>new El(e);var Dl=(e,t)=>{let n;switch(e.code){case H.invalid_type:n=e.received===V.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,B.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${B.joinValues(e.keys,`, `)}`;break;case H.invalid_union:n=`Invalid input`;break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${B.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${B.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n=`Invalid function arguments`;break;case H.invalid_return_type:n=`Invalid function return type`;break;case H.invalid_date:n=`Invalid date`;break;case H.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}"`:B.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case H.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 H.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 H.custom:n=`Invalid input`;break;case H.invalid_intersection_types:n=`Intersection results could not be merged`;break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,B.assertNever(e)}return{message:n}},Ol=Dl;function kl(){return Ol}var Al=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 U(e,t){let n=kl(),r=Al({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Dl?void 0:Dl].filter(e=>!!e)});e.common.issues.push(r)}var W=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 G;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 G;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}}},G=Object.freeze({status:`aborted`}),jl=e=>({status:`dirty`,value:e}),K=e=>({status:`valid`,value:e}),Ml=e=>e.status===`aborted`,Nl=e=>e.status===`dirty`,Pl=e=>e.status===`valid`,Fl=e=>typeof Promise<`u`&&e instanceof Promise,q;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(q||={});var Il=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}},Ll=(e,t)=>{if(Pl(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 El(e.common.issues);return this._error=t,this._error}}};function J(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 Y=class{get description(){return this._def.description}_getType(e){return Tl(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Tl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new W,ctx:{common:e.parent.common,data:e.data,parsedType:Tl(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Fl(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:Tl(e)};return Ll(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:Tl(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Pl(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=>Pl(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:Tl(e)},r=this._parse({data:e,path:n.path,parent:n});return Ll(n,await(Fl(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:H.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 Bu({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 Vu.create(this,this._def)}nullable(){return Hu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xu.create(this)}promise(){return zu.create(this,this._def)}or(e){return wu.create([this,e],this._def)}and(e){return Ou.create(this,e,this._def)}transform(e){return new Bu({...J(this._def),schema:this,typeName:X.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Uu({...J(this._def),innerType:this,defaultValue:t,typeName:X.ZodDefault})}brand(){return new Ku({typeName:X.ZodBranded,type:this,...J(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Wu({...J(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 qu.create(this,e)}readonly(){return Ju.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Rl=/^c[^\s-]{8,}$/i,zl=/^[0-9a-z]+$/,Bl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vl=/^[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,Hl=/^[a-z0-9_-]{21}$/i,Ul=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Wl=/^[-+]?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)?)??$/,Gl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Kl=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,ql,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])$/,Yl=/^(?:(?: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])$/,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]))$/,Zl=/^(([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])$/,Ql=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$l=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eu=`((\\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])))`,tu=RegExp(`^${eu}$`);function nu(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 ru(e){return RegExp(`^${nu(e)}$`)}function iu(e){let t=`${eu}T${nu(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function au(e,t){return!((t!==`v4`&&t||!Jl.test(e))&&(t!==`v6`&&t||!Xl.test(e)))}function ou(e,t){if(!Ul.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 su(e,t){return!((t!==`v4`&&t||!Yl.test(e))&&(t!==`v6`&&t||!Zl.test(e)))}var cu=class e extends Y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.string,received:t.parsedType}),G}let t=new W,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.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),U(n,{code:H.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?U(n,{code:H.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&U(n,{code:H.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)Gl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`email`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)ql||=new RegExp(Kl,`u`),ql.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`emoji`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Vl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`uuid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)Hl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`nanoid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Rl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cuid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)zl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cuid2`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Bl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`ulid`,code:H.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),U(n,{validation:`url`,code:H.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),U(n,{validation:`regex`,code:H.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),U(n,{code:H.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),U(n,{code:H.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?iu(r).test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?tu.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?ru(r).test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{code:H.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Wl.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`duration`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?au(e.data,r.version)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`ip`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?ou(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`jwt`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?su(e.data,r.version)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`cidr`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Ql.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`base64`,code:H.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?$l.test(e.data)||(n=this._getOrReturnCtx(e,n),U(n,{validation:`base64url`,code:H.invalid_string,message:r.message}),t.dirty()):B.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:H.invalid_string,...q.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...q.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...q.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...q.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...q.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...q.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...q.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...q.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...q.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...q.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...q.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...q.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...q.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...q.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,...q.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,...q.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...q.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...q.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...q.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...q.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...q.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...q.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...q.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...q.errToObj(t)})}nonempty(e){return this.min(1,q.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}};cu.create=e=>new cu({checks:[],typeName:X.ZodString,coerce:e?.coerce??!1,...J(e)});function lu(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 uu=class e extends Y{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)!==V.number){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.number,received:t.parsedType}),G}let t,n=new W;for(let r of this._def.checks)r.kind===`int`?B.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),U(t,{code:H.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),U(t,{code:H.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),U(t,{code:H.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?lu(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),U(t,{code:H.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),U(t,{code:H.not_finite,message:r.message}),n.dirty()):B.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,q.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,q.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,q.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,q.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:q.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:q.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:q.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:q.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:q.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:q.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`&&B.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)}};uu.create=e=>new uu({checks:[],typeName:X.ZodNumber,coerce:e?.coerce||!1,...J(e)});var du=class e extends Y{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)!==V.bigint)return this._getInvalidInput(e);let t,n=new W;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),U(t,{code:H.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),U(t,{code:H.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),U(t,{code:H.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):B.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.bigint,received:t.parsedType}),G}gte(e,t){return this.setLimit(`min`,e,!0,q.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,q.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,q.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,q.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.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:q.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:q.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:q.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}};du.create=e=>new du({checks:[],typeName:X.ZodBigInt,coerce:e?.coerce??!1,...J(e)});var fu=class extends Y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==V.boolean){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.boolean,received:t.parsedType}),G}return K(e.data)}};fu.create=e=>new fu({typeName:X.ZodBoolean,coerce:e?.coerce||!1,...J(e)});var pu=class e extends Y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.date,received:t.parsedType}),G}if(Number.isNaN(e.data.getTime()))return U(this._getOrReturnCtx(e),{code:H.invalid_date}),G;let t=new W,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),U(n,{code:H.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),U(n,{code:H.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):B.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:q.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:q.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)}};pu.create=e=>new pu({checks:[],coerce:e?.coerce||!1,typeName:X.ZodDate,...J(e)});var mu=class extends Y{_parse(e){if(this._getType(e)!==V.symbol){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.symbol,received:t.parsedType}),G}return K(e.data)}};mu.create=e=>new mu({typeName:X.ZodSymbol,...J(e)});var hu=class extends Y{_parse(e){if(this._getType(e)!==V.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.undefined,received:t.parsedType}),G}return K(e.data)}};hu.create=e=>new hu({typeName:X.ZodUndefined,...J(e)});var gu=class extends Y{_parse(e){if(this._getType(e)!==V.null){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.null,received:t.parsedType}),G}return K(e.data)}};gu.create=e=>new gu({typeName:X.ZodNull,...J(e)});var _u=class extends Y{constructor(){super(...arguments),this._any=!0}_parse(e){return K(e.data)}};_u.create=e=>new _u({typeName:X.ZodAny,...J(e)});var vu=class extends Y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return K(e.data)}};vu.create=e=>new vu({typeName:X.ZodUnknown,...J(e)});var yu=class extends Y{_parse(e){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.never,received:t.parsedType}),G}};yu.create=e=>new yu({typeName:X.ZodNever,...J(e)});var bu=class extends Y{_parse(e){if(this._getType(e)!==V.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.void,received:t.parsedType}),G}return K(e.data)}};bu.create=e=>new bu({typeName:X.ZodVoid,...J(e)});var xu=class e extends Y{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==V.array)return U(t,{code:H.invalid_type,expected:V.array,received:t.parsedType}),G;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(U(t,{code:e?H.too_big:H.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&&(U(t,{code:H.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&&(U(t,{code:H.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 Il(t,e,t.path,n)))).then(e=>W.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Il(t,e,t.path,n)));return W.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(e){return this.min(1,e)}};xu.create=(e,t)=>new xu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:X.ZodArray,...J(t)});function Su(e){if(e instanceof Cu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Vu.create(Su(r))}return new Cu({...e._def,shape:()=>t})}return e instanceof xu?new xu({...e._def,type:Su(e.element)}):e instanceof Vu?Vu.create(Su(e.unwrap())):e instanceof Hu?Hu.create(Su(e.unwrap())):e instanceof ku?ku.create(e.items.map(e=>Su(e))):e}var Cu=class e extends Y{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=B.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==V.object){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.object,received:t.parsedType}),G}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof yu&&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 Il(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof yu){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&&(U(n,{code:H.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 Il(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=>W.mergeObjectSync(t,e)):W.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return q.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:q.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 B.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 B.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Su(this)}partial(t){let n={};for(let e of B.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 B.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Vu;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Iu(B.objectKeys(this.shape))}};Cu.create=(e,t)=>new Cu({shape:()=>e,unknownKeys:`strip`,catchall:yu.create(),typeName:X.ZodObject,...J(t)}),Cu.strictCreate=(e,t)=>new Cu({shape:()=>e,unknownKeys:`strict`,catchall:yu.create(),typeName:X.ZodObject,...J(t)}),Cu.lazycreate=(e,t)=>new Cu({shape:e,unknownKeys:`strip`,catchall:yu.create(),typeName:X.ZodObject,...J(t)});var wu=class extends Y{_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 El(e.ctx.common.issues));return U(t,{code:H.invalid_union,unionErrors:n}),G}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 El(e));return U(t,{code:H.invalid_union,unionErrors:i}),G}}get options(){return this._def.options}};wu.create=(e,t)=>new wu({options:e,typeName:X.ZodUnion,...J(t)});var Tu=e=>e instanceof Pu?Tu(e.schema):e instanceof Bu?Tu(e.innerType()):e instanceof Fu?[e.value]:e instanceof Lu?e.options:e instanceof Ru?B.objectValues(e.enum):e instanceof Uu?Tu(e._def.innerType):e instanceof hu?[void 0]:e instanceof gu?[null]:e instanceof Vu?[void 0,...Tu(e.unwrap())]:e instanceof Hu?[null,...Tu(e.unwrap())]:e instanceof Ku||e instanceof Ju?Tu(e.unwrap()):e instanceof Wu?Tu(e._def.innerType):[],Eu=class e extends Y{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.object)return U(t,{code:H.invalid_type,expected:V.object,received:t.parsedType}),G;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}):(U(t,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),G)}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=Tu(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,...J(r)})}};function Du(e,t){let n=Tl(e),r=Tl(t);if(e===t)return{valid:!0,data:e};if(n===V.object&&r===V.object){let n=B.objectKeys(t),r=B.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Du(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===V.array&&r===V.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=Du(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===V.date&&r===V.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Ou=class extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Ml(e)||Ml(r))return G;let i=Du(e.value,r.value);return i.valid?((Nl(e)||Nl(r))&&t.dirty(),{status:t.value,value:i.data}):(U(n,{code:H.invalid_intersection_types}),G)};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}))}};Ou.create=(e,t,n)=>new Ou({left:e,right:t,typeName:X.ZodIntersection,...J(n)});var ku=class e extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return U(n,{code:H.invalid_type,expected:V.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return U(n,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),G;!this._def.rest&&n.data.length>this._def.items.length&&(U(n,{code:H.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 Il(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>W.mergeArray(t,e)):W.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ku.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ku({items:e,typeName:X.ZodTuple,rest:null,...J(t)})};var Au=class e extends Y{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!==V.object)return U(n,{code:H.invalid_type,expected:V.object,received:n.parsedType}),G;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Il(n,e,n.path,e)),value:a._parse(new Il(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?W.mergeObjectAsync(t,r):W.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Y?new e({keyType:t,valueType:n,typeName:X.ZodRecord,...J(r)}):new e({keyType:cu.create(),valueType:t,typeName:X.ZodRecord,...J(n)})}},ju=class extends Y{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!==V.map)return U(n,{code:H.invalid_type,expected:V.map,received:n.parsedType}),G;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Il(n,e,n.path,[a,`key`])),value:i._parse(new Il(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 G;(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 G;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};ju.create=(e,t,n)=>new ju({valueType:t,keyType:e,typeName:X.ZodMap,...J(n)});var Mu=class e extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return U(n,{code:H.invalid_type,expected:V.set,received:n.parsedType}),G;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(U(n,{code:H.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&&(U(n,{code:H.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 G;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 Il(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:q.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:q.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Mu.create=(e,t)=>new Mu({valueType:e,minSize:null,maxSize:null,typeName:X.ZodSet,...J(t)});var Nu=class e extends Y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==V.function)return U(t,{code:H.invalid_type,expected:V.function,received:t.parsedType}),G;function n(e,n){return Al({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kl(),Dl].filter(e=>!!e),issueData:{code:H.invalid_arguments,argumentsError:n}})}function r(e,n){return Al({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,kl(),Dl].filter(e=>!!e),issueData:{code:H.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof zu){let e=this;return K(async function(...t){let o=new El([]),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 K(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new El([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new El([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:ku.create(t).rest(vu.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||ku.create([]).rest(vu.create()),returns:n||vu.create(),typeName:X.ZodFunction,...J(r)})}},Pu=class extends Y{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})}};Pu.create=(e,t)=>new Pu({getter:e,typeName:X.ZodLazy,...J(t)});var Fu=class extends Y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return U(t,{received:t.data,code:H.invalid_literal,expected:this._def.value}),G}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Fu.create=(e,t)=>new Fu({value:e,typeName:X.ZodLiteral,...J(t)});function Iu(e,t){return new Lu({values:e,typeName:X.ZodEnum,...J(t)})}var Lu=class e extends Y{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return U(t,{expected:B.joinValues(n),received:t.parsedType,code:H.invalid_type}),G}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return U(t,{received:t.data,code:H.invalid_enum_value,options:n}),G}return K(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})}};Lu.create=Iu;var Ru=class extends Y{_parse(e){let t=B.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let e=B.objectValues(t);return U(n,{expected:B.joinValues(e),received:n.parsedType,code:H.invalid_type}),G}if(this._cache||=new Set(B.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=B.objectValues(t);return U(n,{received:n.data,code:H.invalid_enum_value,options:e}),G}return K(e.data)}get enum(){return this._def.values}};Ru.create=(e,t)=>new Ru({values:e,typeName:X.ZodNativeEnum,...J(t)});var zu=class extends Y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==V.promise&&t.common.async===!1?(U(t,{code:H.invalid_type,expected:V.promise,received:t.parsedType}),G):K((t.parsedType===V.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};zu.create=(e,t)=>new zu({type:e,typeName:X.ZodPromise,...J(t)});var Bu=class extends Y{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=>{U(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 G;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?G:r.status===`dirty`||t.value===`dirty`?jl(r.value):r});{if(t.value===`aborted`)return G;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?G:r.status===`dirty`||t.value===`dirty`?jl(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`?G:(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`?G:(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(!Pl(e))return G;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=>Pl(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):G)}B.assertNever(r)}};Bu.create=(e,t,n)=>new Bu({schema:e,typeName:X.ZodEffects,effect:t,...J(n)}),Bu.createWithPreprocess=(e,t,n)=>new Bu({schema:t,effect:{type:`preprocess`,transform:e},typeName:X.ZodEffects,...J(n)});var Vu=class extends Y{_parse(e){return this._getType(e)===V.undefined?K(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Vu.create=(e,t)=>new Vu({innerType:e,typeName:X.ZodOptional,...J(t)});var Hu=class extends Y{_parse(e){return this._getType(e)===V.null?K(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Hu.create=(e,t)=>new Hu({innerType:e,typeName:X.ZodNullable,...J(t)});var Uu=class extends Y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Uu.create=(e,t)=>new Uu({innerType:e,typeName:X.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...J(t)});var Wu=class extends Y{_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 Fl(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new El(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new El(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Wu.create=(e,t)=>new Wu({innerType:e,typeName:X.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...J(t)});var Gu=class extends Y{_parse(e){if(this._getType(e)!==V.nan){let t=this._getOrReturnCtx(e);return U(t,{code:H.invalid_type,expected:V.nan,received:t.parsedType}),G}return{status:`valid`,value:e.data}}};Gu.create=e=>new Gu({typeName:X.ZodNaN,...J(e)});var Ku=class extends Y{_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}},qu=class e extends Y{_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`?G:e.status===`dirty`?(t.dirty(),jl(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`?G: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})}},Ju=class extends Y{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Pl(e)&&(e.value=Object.freeze(e.value)),e);return Fl(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Ju.create=(e,t)=>new Ju({innerType:e,typeName:X.ZodReadonly,...J(t)}),Cu.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=cu.create,Q=uu.create;Gu.create,du.create;var Yu=fu.create;pu.create,mu.create,hu.create;var Xu=gu.create;_u.create,vu.create,yu.create,bu.create;var Zu=xu.create,$=Cu.create;Cu.strictCreate;var Qu=wu.create,$u=Eu.create;Ou.create,ku.create;var ed=Au.create;ju.create,Mu.create,Nu.create,Pu.create;var td=Fu.create,nd=Lu.create;Ru.create,zu.create,Bu.create,Vu.create,Hu.create,Bu.createWithPreprocess,qu.create;var rd={"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 (4xx, not a sign-in or rate limit). Its own message, when it gives one, says why.`},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.`}},id=[`app`,`backend`,`infrastructure`,`third_party`,`unknown`],ad={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.`}},od=[`blocked`,`degraded`,`silent`],sd={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(od.map((e,t)=>[e,od.length-1-t]));function cd(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 ld(e){let{host:t,path:n}=cd(e);return t+n.replace(/\/+$/,``)}function ud(e,t){return e===`ours`?`Our backend`:`${t?.trim()||`Third-party`} service`}new Set(id.filter(e=>e!==`unknown`));var dd=16384,fd={critical:3,high:2,medium:1,low:0},pd={critical:{name:`Critical`,description:`Customers are blocked, or the app closes, for many of them. Act now.`},high:{name:`High`,description:`Customers are blocked, or many have a degraded experience.`},medium:{name:`Medium`,description:`A few customers have a degraded experience, or a silent failure is frequent.`},low:{name:`Low`,description:`A one-off, or silent and rare.`}},md=Z().min(1).max(64).regex(/^[a-z0-9_]+(\.[a-z0-9_]+)*$/,`flow must be dotted lowercase, e.g. auth.login`),hd=ed(Z().max(200)).optional(),gd=Z().datetime({offset:!0}),_d=$({model:Z().optional(),manufacturer:Z().optional(),brand:Z().optional(),type:nd([`phone`,`tablet`,`desktop`,`tv`,`unknown`]).default(`unknown`),isEmulator:Yu().optional(),memoryMb:Q().optional(),screen:$({width:Q(),height:Q(),scale:Q().optional()}).optional()}),vd=$({name:Z(),version:Z().optional()}),yd=$({id:Z().min(1),version:Z().optional(),build:Z().optional(),update:Z().max(100).optional(),environment:Z().default(`production`)}),bd=$({name:Z(),version:Z().optional(),engine:Z().optional()}),xd=$({type:nd([`wifi`,`cellular`,`ethernet`,`none`,`unknown`]).default(`unknown`),effectiveType:Z().optional(),isConnected:Yu().optional()}),Sd=$({app:yd,device:_d.default({}),os:vd,runtime:bd,network:xd.optional(),locale:Z().optional(),timezone:Z().optional()}),Cd=$({ts:gd,category:nd([`navigation`,`network`,`ui`,`log`,`event`,`custom`]),message:Z().max(500),level:nd([`debug`,`info`,`warning`,`error`]).default(`info`),data:ed(Qu([Z(),Q(),Yu(),Xu()])).optional()}),wd=`…[truncated]`,Td=Z().transform(e=>e.length>16448?`${e.slice(0,dd)}${wd}`:e),Ed=ed(Z().transform(e=>e.slice(0,2e3))).optional().transform(e=>e&&Object.fromEntries(Object.entries(e).slice(0,100))),Dd={body:Td.optional(),bodySize:Q().int().nonnegative().optional(),truncated:Yu().optional()},Od=$({fn:Z().optional(),file:Z().optional(),line:Q().optional(),col:Q().optional(),inApp:Yu().optional()}),kd=nd([`low`,`medium`,`high`,`critical`]),Ad=$({id:Z().min(8).max(64),ts:gd,flow:md.optional(),step:Z().max(64).optional(),tags:hd}),jd=$u(`type`,[Ad.extend({type:td(`error`),handled:Yu().default(!0),severity:kd.optional(),error:$({name:Z().max(200).default(`Error`),message:Z().max(2e3),stack:Z().max(2e4).optional(),frames:Zu(Od).max(100).optional()}),breadcrumbs:Zu(Cd).max(50).optional(),request:$({method:Z().max(10),url:Z().max(500),status:Q().int().optional(),durationMs:Q().optional(),query:Td.optional(),headers:Ed,...Dd}).optional(),response:$({status:Q().int(),headers:Ed,...Dd}).optional()}),Ad.extend({type:td(`event`),name:Z().min(1).max(100),outcome:nd([`success`,`failure`,`abandoned`]).optional(),props:ed(Qu([Z(),Q(),Yu(),Xu()])).optional()}),Ad.extend({type:td(`session`),status:nd([`started`,`errored`,`crashed`])}),Ad.extend({type:td(`metric`),name:td(`http`),key:Z().min(1).max(300),count:Q().int().min(1).max(1e6),errors:Q().int().min(0).max(1e6),buckets:Zu(Q().int().min(0)).length(13)})]);$({schema:td(1).default(1),sdk:$({name:Z(),version:Z()}),context:Sd,user:$({id:Z().optional(),anonymousId:Z()}).optional(),session:$({id:Z(),startedAt:gd}),events:Zu(jd).min(1).max(100)});export{Ht as $,ul as A,fc as B,qc as C,Xc as D,Yc as E,al as F,Js as G,ic as H,Fc as I,Us as J,qs as K,Pc as L,sl as M,ll as N,Zc as O,ml as P,Kn as Q,Nc as R,dl as S,_l as T,tc as U,oc as V,Xs as W,L as X,Ws as Y,on as Z,tl as _,rd as a,ve as at,Kc as b,ad as c,ee as ct,il as d,v as dt,Lt as et,$c as f,p as ft,gl as g,l as gt,Qc as h,s as ht,ld as i,gt as it,cl as j,hl as k,Cl as l,b as lt,nl as m,o as mt,fd as n,bt as nt,sd as o,k as ot,el as p,d as pt,Ks as q,ud as r,xt as rt,id as s,fe as st,pd as t,Rt as tt,pl as u,y as ut,Jc as v,fl as w,ol as x,rl as y,Oc as z};
|