@debugkit/dashboard 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/client/assets/_authed-C29P68T-.js +1 -0
  2. package/dist/client/assets/_authed-D-dYbHoP.js +7 -0
  3. package/dist/client/assets/{charts-XyOWJI9T.js → charts--S1o8iId.js} +6 -6
  4. package/dist/client/assets/copy-button-BJkvWYRY.js +1 -0
  5. package/dist/client/assets/customers-Cwx5qEO1.js +1 -0
  6. package/dist/client/assets/endpoints-zz1TotR2.js +1 -0
  7. package/dist/client/assets/events._eventId-Bx6TfUjv.js +3 -0
  8. package/dist/client/assets/index-COHr_cc3.js +10 -0
  9. package/dist/client/assets/invite._token-DiDJMnQu.js +1 -0
  10. package/dist/client/assets/issues._fingerprint-Cv522h2j.js +1 -0
  11. package/dist/client/assets/login-CKkpc0t5.js +1 -0
  12. package/dist/client/assets/sessions._sessionId-B0NxM46y.js +1 -0
  13. package/dist/client/assets/settings-CIlF10MI.js +1 -0
  14. package/dist/client/assets/src-BKSiJUs3.js +3 -0
  15. package/dist/client/assets/styles-GAsMUS4-.css +2 -0
  16. package/dist/client/assets/team-BRuVQ2bU.js +1 -0
  17. package/dist/client/assets/timeline-BIGo9MCA.js +1 -0
  18. package/dist/client/assets/ui-CaEZB1j2.js +1 -0
  19. package/dist/client/assets/version-banner-VFvyqbPh.js +1 -0
  20. package/dist/server/assets/_authed-BJWDiF9i.js +92 -0
  21. package/dist/server/assets/{_authed-C-sIPXSO.js → _authed-X9u_5JUy.js} +318 -126
  22. package/dist/server/assets/_tanstack-start-manifest_v-C6vaeBdY.js +90 -0
  23. package/dist/server/assets/copy-button-D3RddzTw.js +52 -0
  24. package/dist/server/assets/customers-827fC5I3.js +163 -0
  25. package/dist/server/assets/{demo-BsMMDk_F.js → demo-DDNiXCgj.js} +29 -7
  26. package/dist/server/assets/{dynamodb-Zkk1-mgz.js → dynamodb-Cd4blXkh.js} +98 -17
  27. package/dist/server/assets/endpoints-_T0NSOyA.js +371 -0
  28. package/dist/server/assets/{queries-BJxX3Kjp.js → errors-Po4Tt5zd.js} +893 -66
  29. package/dist/server/assets/events._eventId-Dcsu4oVO.js +765 -0
  30. package/dist/server/assets/{firestore-C52q_vwM.js → firestore-c8Sz2Q4O.js} +26 -6
  31. package/dist/server/assets/{fns-DwGaMi8S.js → fns-BiUOnY1_.js} +27 -3
  32. package/dist/server/assets/fns-CVbk8Gf9.js +1310 -0
  33. package/dist/server/assets/{invite._token-xnpnkdRv.js → invite._token-7DjEeeaD.js} +3 -3
  34. package/dist/server/assets/{issues._fingerprint-e7ubdJf0.js → issues._fingerprint-vc9r3jgg.js} +89 -11
  35. package/dist/server/assets/{login-EopnOJXA.js → login-CwKAx9Bj.js} +3 -3
  36. package/dist/server/assets/{memory-BssaqdZm.js → memory-Bv4C8uyK.js} +431 -28
  37. package/dist/server/assets/router-Dk3XHn7B.js +512 -0
  38. package/dist/server/assets/sessions._sessionId-BvXxK9qF.js +264 -0
  39. package/dist/server/assets/{settings-CaJN69N6.js → settings-B9NLQjl1.js} +221 -5
  40. package/dist/server/assets/{src-D83GYTrp.js → src-oWPSAvXv.js} +1 -1
  41. package/dist/server/assets/{team-B1UcM1jA.js → team-Bsm2wFG0.js} +3 -3
  42. package/dist/server/assets/timeline-MDRNDhiA.js +132 -0
  43. package/dist/server/assets/{ui-BJokJdYa.js → ui-SAkSlP7f.js} +53 -13
  44. package/dist/server/assets/version-banner-nf-yZurq.js +106 -0
  45. package/dist/server/assets/versions-BOlL8jam.js +58 -0
  46. package/dist/server/server.js +41 -21
  47. package/package.json +4 -4
  48. package/dist/client/assets/_authed-BN39b-7H.js +0 -1
  49. package/dist/client/assets/_authed-CspAf0jN.js +0 -7
  50. package/dist/client/assets/index-Bfb2UOzB.js +0 -10
  51. package/dist/client/assets/invite._token-B4HN51-h.js +0 -1
  52. package/dist/client/assets/issues._fingerprint-BV1QrETY.js +0 -1
  53. package/dist/client/assets/login-COlvJ5Je.js +0 -1
  54. package/dist/client/assets/preload-helper-Dscj_TcA.js +0 -3
  55. package/dist/client/assets/settings-Dl4EWeWC.js +0 -1
  56. package/dist/client/assets/styles-DztngwT9.css +0 -2
  57. package/dist/client/assets/team-7Zekz_Er.js +0 -1
  58. package/dist/client/assets/ui-C0HGOza2.js +0 -1
  59. package/dist/server/assets/_authed-CrjuC0O3.js +0 -73
  60. package/dist/server/assets/_tanstack-start-manifest_v-CqaE4wze.js +0 -61
  61. package/dist/server/assets/fns-mbUIXXep.js +0 -529
  62. package/dist/server/assets/router-G99085_Q.js +0 -315
@@ -1 +0,0 @@
1
- import{Z as e,b as t,et as n,j as r,k as i,w as a}from"./preload-helper-Dscj_TcA.js";import{n as o,r as s}from"./charts-XyOWJI9T.js";import{o as c,s as l,t as u}from"./index-Bfb2UOzB.js";import{a as d,c as f,n as p,o as m,r as h,s as g,t as _}from"./ui-C0HGOza2.js";var v=n(e()),y=r();function b(){let e=u.useLoaderData(),{issue:t,sample:n}=e,r=n?.event.type===`error`?n.event:null,i=r?.error.frames??[],v=u.useNavigate(),b=u.useSearch(),{range:S}=e;return(0,y.jsxs)(`main`,{className:`mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,y.jsx)(a,{to:`/`,search:{app:e.app,range:b.range,from:b.from,to:b.to},className:`text-sm text-muted hover:text-ink`,children:`← Overview`}),(0,y.jsx)(c,{value:S,today:new Date().toISOString().slice(0,10),onChange:e=>v({search:t=>({...t,...e})})},`${S.preset}${S.from}${S.to}`)]}),(0,y.jsx)(l,{rangeFrom:S.from,retention:e.retention}),(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,y.jsx)(d,{severity:t.severity}),t.flow&&(0,y.jsx)(`span`,{className:`rounded bg-panel-2 px-1.5 py-0.5 font-mono`,children:t.flow}),(0,y.jsxs)(`span`,{children:[`First seen `,f(t.firstSeen),` · last seen `,f(t.lastSeen)]})]}),(0,y.jsx)(`h1`,{className:`mt-2 break-words text-xl font-semibold tracking-tight sm:text-2xl`,children:t.title}),t.culprit&&(0,y.jsx)(`p`,{className:`mt-1 font-mono text-sm text-muted`,children:t.culprit}),(0,y.jsx)(h,{issue:t})]}),(0,y.jsx)(x,{app:e.app,issue:t,canChange:e.canChangeStatus,links:e.links}),(0,y.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,y.jsx)(g,{label:`Occurrences (24h)`,value:t.count24h,tone:t.severity}),(0,y.jsx)(g,{label:`Occurrences (${S.label})`,value:t.countRange.toLocaleString(),hint:`${t.countTotal.toLocaleString()} since first seen`}),(0,y.jsx)(g,{label:`Users affected`,value:e.affectedUsers.toLocaleString(),hint:`since ${S.preset===`24h`?`yesterday`:S.from}`}),(0,y.jsx)(g,{label:`Top app version`,value:e.breakdowns.appVersion[0]?.key??`—`,hint:e.breakdowns.appVersion[0]?`${Math.round(e.breakdowns.appVersion[0].share*100)}% of occurrences`:void 0})]}),(0,y.jsx)(_,{title:`What to look at`,subtitle:`Generated from the error, its breadcrumbs and where it happens.`,children:(0,y.jsx)(`ol`,{className:`space-y-3`,children:e.hints.map((e,t)=>(0,y.jsxs)(`li`,{className:`flex gap-3`,children:[(0,y.jsx)(`span`,{className:`mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-accent-soft text-[11px] font-semibold text-accent`,children:t+1}),(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`text-sm font-medium`,children:e.title}),(0,y.jsx)(`div`,{className:`text-sm text-muted`,children:e.detail})]})]},t))})}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-3`,children:[(0,y.jsxs)(`div`,{className:`lg:col-span-2`,children:[S.preset!==`24h`&&(0,y.jsx)(`div`,{className:`mb-5`,children:(0,y.jsx)(_,{title:`Occurrences per day`,subtitle:`${S.label} (UTC)`,children:(0,y.jsx)(s,{data:e.daily.map(e=>({day:e.day,errors:e.count}))})})}),(0,y.jsxs)(_,{title:`Occurrences per hour`,subtitle:`Last 48 hours`,children:[(0,y.jsx)(o,{data:e.hourly}),(0,y.jsx)(p,{columns:[`Hour (UTC)`,`Count`],rows:e.hourly.map(e=>[e.hour,e.count])})]})]}),(0,y.jsx)(_,{title:`Where it happens`,subtitle:`Share of recent occurrences`,children:(0,y.jsx)(`div`,{className:`space-y-4`,children:[`os`,`appVersion`,`deviceModel`,`network`].map(t=>(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`div`,{className:`mb-1.5 text-xs font-medium text-muted`,children:{os:`OS`,appVersion:`App version`,deviceModel:`Device`,network:`Network`}[t]}),(0,y.jsx)(m,{rows:e.breakdowns[t].map(e=>({key:e.key,value:e.count}))})]},t))})})]}),(0,y.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2`,children:[(0,y.jsx)(_,{title:`Stack trace`,subtitle:`Most recent occurrence. In-app frames highlighted.`,children:i.length?(0,y.jsx)(`ol`,{className:`space-y-1 font-mono text-xs`,children:i.map((e,t)=>(0,y.jsxs)(`li`,{className:`rounded px-2 py-1 ${e.inApp?`bg-accent-soft text-ink`:`text-muted`}`,children:[(0,y.jsx)(`span`,{className:`font-semibold`,children:e.fn??`<anonymous>`}),` `,(0,y.jsxs)(`span`,{className:`break-all`,children:[e.file,`:`,e.line,`:`,e.col]})]},t))}):(0,y.jsx)(`pre`,{className:`overflow-auto whitespace-pre-wrap text-xs text-muted`,children:r?.error.stack??`No stack trace captured.`})}),(0,y.jsx)(_,{title:`Breadcrumbs`,subtitle:`What the user did right before the error`,children:r?.breadcrumbs?.length?(0,y.jsxs)(`ol`,{className:`relative space-y-3 border-l border-line pl-4`,children:[r.breadcrumbs.map((e,t)=>(0,y.jsxs)(`li`,{className:`text-sm`,children:[(0,y.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full ${e.level===`error`?`bg-sev-critical`:`bg-line`}`}),(0,y.jsx)(`span`,{className:`mr-2 rounded bg-panel-2 px-1.5 py-0.5 text-[11px] uppercase tracking-wide text-muted`,children:e.category}),(0,y.jsx)(`span`,{className:`break-words`,children:e.message})]},t)),(0,y.jsxs)(`li`,{className:`text-sm font-medium text-sev-critical`,children:[(0,y.jsx)(`span`,{className:`absolute -left-[5px] mt-1.5 h-2.5 w-2.5 rounded-full bg-sev-critical`}),t.title]})]}):(0,y.jsxs)(`p`,{className:`text-sm text-muted`,children:[`No breadcrumbs. Call `,(0,y.jsx)(`code`,{children:`deBug.breadcrumb()`}),` on navigation and network calls to see the path to the error.`]})})]}),(0,y.jsx)(_,{title:`Recent occurrences`,children:(0,y.jsx)(`div`,{className:`-mx-4 overflow-x-auto sm:mx-0`,children:(0,y.jsxs)(`table`,{className:`tabular w-full min-w-[600px] text-left text-sm`,children:[(0,y.jsx)(`thead`,{className:`text-xs text-muted`,children:(0,y.jsxs)(`tr`,{className:`border-b border-line`,children:[(0,y.jsx)(`th`,{className:`px-4 py-2 font-medium sm:px-2`,children:`When`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`OS`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Version`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`Device`}),(0,y.jsx)(`th`,{className:`px-2 py-2 font-medium`,children:`User`})]})}),(0,y.jsx)(`tbody`,{children:e.recent.map((e,t)=>(0,y.jsxs)(`tr`,{className:`border-b border-line last:border-0`,children:[(0,y.jsx)(`td`,{className:`px-4 py-2 text-xs text-muted sm:px-2`,children:f(e.ts)}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.os}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.appVersion??`—`}),(0,y.jsx)(`td`,{className:`px-2 py-2`,children:e.device??`—`}),(0,y.jsx)(`td`,{className:`px-2 py-2 font-mono text-xs text-muted`,children:e.userId??`anonymous`})]},t))})]})})})]})}function x({app:e,issue:n,canChange:r,links:a}){let o=i(),[s,c]=(0,v.useState)(n.resolvedIn??n.lastVersion??``),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),p=async r=>{f(!0),u(null);let i=await t({data:{app:e,fingerprint:n.fingerprint,status:r,resolvedIn:r===`resolved`?s:void 0}}).catch(e=>({ok:!1,error:e.message}));if(f(!1),!i.ok)return u(i.error);await o.invalidate()},m=`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,h=n.status===`resolved`||n.status===`ignored`;return(0,y.jsxs)(`section`,{"aria-label":`Issue actions`,className:`flex flex-wrap items-center gap-2`,children:[r&&!h&&(0,y.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),p(`resolved`)},children:[(0,y.jsx)(`label`,{className:`text-sm text-muted`,htmlFor:`fixed-in`,children:`Fixed in`}),(0,y.jsx)(`input`,{id:`fixed-in`,value:s,onChange:e=>c(e.target.value),placeholder:`2.4.1`,className:`w-28 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`}),(0,y.jsx)(`button`,{type:`submit`,disabled:d,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Resolve`}),(0,y.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`ignored`),className:m,children:`Ignore`})]}),r&&h&&(0,y.jsx)(`button`,{type:`button`,disabled:d,onClick:()=>void p(`open`),className:m,children:`Reopen`}),a.linear&&(0,y.jsx)(`a`,{href:a.linear,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create Linear issue`}),a.github&&(0,y.jsx)(`a`,{href:a.github,target:`_blank`,rel:`noopener noreferrer`,className:m,children:`Create GitHub issue`}),r&&!h&&(0,y.jsxs)(`p`,{className:`w-full text-xs text-muted`,children:[`If it shows up again in `,s||`that version`,` or later, it's marked Regressed. Occurrences from older versions don't count: those users haven't updated yet.`]}),l&&(0,y.jsx)(`p`,{role:`alert`,className:`w-full text-sm text-sev-critical`,children:l})]})}export{b as component};
@@ -1 +0,0 @@
1
- import{Z as e,et as t,f as n,j as r,k as i}from"./preload-helper-Dscj_TcA.js";import{i as a}from"./ui-C0HGOza2.js";import{c as o}from"./index-Bfb2UOzB.js";var s=t(e()),c=r();function l(){let e=o.useLoaderData(),t=i(),[r,l]=(0,s.useState)(e.demo?.email??``),[u,d]=(0,s.useState)(e.demo?.password??``),[f,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1);async function g(e){e.preventDefault(),h(!0),p(null);try{let e=await n({data:{email:r,password:u}});if(!e.ok)return p(e.error);await t.invalidate(),await t.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`,` `,e.store===`demo`?`demo dataset`:e.store===`memory`?`in-memory store on this machine`:e.store===`firestore`?`Firestore`:`DynamoDB`,`.`]}),e.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:e.demo.email}),` / `,(0,c.jsx)(`b`,{children:e.demo.password}),`. Set `,(0,c.jsx)(`code`,{children:`DEBUG_DASHBOARD_USERS`}),` to require real accounts.`]}),(0,c.jsx)(`label`,{className:`mt-5 block text-sm font-medium`,htmlFor:`email`,children:`Email`}),(0,c.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`username`,required:!0,value:r,onChange:e=>l(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),(0,c.jsx)(`label`,{className:`mt-4 block text-sm font-medium`,htmlFor:`password`,children:`Password`}),(0,c.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:u,onChange:e=>d(e.target.value),className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`}),f&&(0,c.jsx)(`p`,{role:`alert`,className:`mt-3 text-sm text-sev-critical`,children:f}),(0,c.jsx)(`button`,{disabled:m,className:`mt-5 w-full rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:m?`Signing in…`:`Sign in`})]})})}export{l as component};
@@ -1,3 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(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 M(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,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+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+j(a,u),c+=M(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+j(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(te(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 ne(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 ie=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 ae(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,ie)}catch(e){ie(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(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 ae(oe.bind(null,e))}var se={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,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=oe,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 D(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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ae,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 D(e){for(let t in e)if(E.call(e,t))return!0;return!1}var ee=()=>Object.create(null),O=(e,t)=>k(e,t,!0);function k(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&&!(A(e)&&A(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`?k(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`?k(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?ee():{};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`?k(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function A(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function j(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&&!j(a,o,n,r))return!1}return!0}if(A(e)&&A(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!j(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||!j(e[a],t[a],n,r)))return!1;return i===0}return!1}function te(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 M=/[\x00-\x1f\x7f"<>`{}]/g;function ne(e){return e.replace(M,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function re(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 ne(t)}var ie=[`http:`,`https:`,`mailto:`,`tel:`];function ae(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 oe=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function se(e,t){if(!e)return!1;if(oe.test(e))return!0;let n=ae(e);return n?!t.has(n):!1}var ce={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},le=/[&><\u2028\u2029]/g;function ue(e){return e.replace(le,e=>ce[e])}function de(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+=re(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=re(r?e.slice(r):e)}return t}function fe(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function pe(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 me(e){return e.replace(/\/{2,}/g,`/`)}function he(e){return e===`/`?e:e.replace(/^\/+/,``)}function N(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function ge(e){return N(he(e))}function _e(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ve(e,t,n=`never`,r){if(t.includes(`//`)&&(t=me(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=me(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?me(s):s)||`/`;return a&&r&&r.set(a,c),c}function ye(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 be(e){return e==null||e===``}function xe(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 Se(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&&be(f)){if(c===`/`&&!d)continue;f=``}o+=c+xe(s,f,r)+(d||``)}}return o+a||`/`}function Ce(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 we(){throw Error(`Invariant failed`)}var Te=4,Ee=5;function De(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 Oe(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 ke(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=Oe(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=je(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=je(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=je(r,Ee);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=je(r,Te);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 Ae(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 je(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 Me(e,t){let n=je(),r=[];function i(e,t,n,a){let[o,s,c]=ke(!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(Ae);t.masksTree=n,t.flatCache=Ce(1e3)}function Ne(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Le(e,t.masksTree);return t.flatCache.set(e,r),r}function Pe(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=je(),ke(t,{from:e},1,o),i.singleCache.set(a,o)),Le(r,o,n)}function Fe(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=Le(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=ze(a.route)),t.matchCache.set(r,a),a}function Ie(e,t=!1){let n=je(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&we(),i[e.id]=e,o!==0&&e.path){let t=N(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=ke(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(Ae);return{processedTree:{segmentTree:n,singleCache:Ce(1e3),matchCache:Ce(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Le(e,t,n=!1){let r=e.split(`/`),i=Ve(e,r,t,n);if(!i)return null;let[a]=Re(e,r,i);return{route:i.node.route,rawParams:a}}function Re(e,t,n){let r=Be(n.node),i=n.node.data&&De(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===Te)break;if(u.kind===Ee){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 ze(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Be(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ve(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&&!Ge(l,n))continue;if(i.parse){if(!We(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Te&&Ge(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Te||i.kind===2)&&Ge(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&&(We(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ue(f,o))return n;Ge(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+He(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+He(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+He(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+He(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 He(e,t){return 2**(e-t-1)}function Ue(e,t){return e===2**(t-1)-1}function We(e,t,n){let r,i;try{[r,i]=Re(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 Ge(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===Te)>(e.node.kind===Te)||t.node.kind===Te==(e.node.kind===Te)&&t.node.depth>e.node.depth)))}function Ke(){try{return sessionStorage}catch{return}}var qe=`tsr-scroll-restoration-v1_3`,Je=Ke();function Ye(){try{return JSON.parse(Je?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var Xe=Ye(),Ze=`data-scroll-restoration-id`,Qe=e=>e.state.__TSR_key||e.href;function $e(e){let t=e.getAttribute(Ze);if(t)return`[${Ze}="${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 et=!1,tt=`window`;function nt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function rt(e){let t=new Set;for(let n of e){if(n===tt)continue;let e=nt(n);e&&t.add(e)}return t}function it(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Qe,a=new Set,o=e=>{let t=Xe[e]||={};for(let e of a)e===document?t[tt]={scrollX,scrollY}:e.isConnected&&(t[$e(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,et=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{et||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{Je?.setItem(qe,JSON.stringify(Xe))}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=Xe[d];if(e){let t=Xe[u];for(let n in e){if(n===tt){if(s)continue}else{let e=nt(n);if(!e||s&&o&&(l??=rt(o),l.has(e)))continue}t||=Xe[u]={},t[n]??=e[n]}}}et=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=rt(o));let t=e&&i&&c,s=r.e?Xe[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===tt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=nt(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{et=!1}}))}function at(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 ot(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function st(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]=ot(r):Array.isArray(t)?t.push(ot(r)):n[e]=[t,ot(r)]}return n}var ct=/^(?:\s|["[{\d-]|fa|nu|tr)/,lt=dt(JSON.parse),ut=ft(JSON.stringify,JSON.parse);function dt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=st(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!ct.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function ft(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&&!ct.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=at(e,r);return t?`?${t}`:``}}var pt=`__root__`;function mt(e,t,n){let r=ge(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=me(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>ht(n,s.input({url:e})),output:({url:e})=>s.output({url:gt(n,e)})}:s}function ht(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 gt(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 _t(e){let t=e;return{get(){return t},set(e){t=T(e,t)}}}function vt(e){return{get(){return e()}}}function yt(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(()=>{pe(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 bt=`__TSR_index`,xt=`popstate`,St=`beforeunload`,Ct=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function wt(e){let t=Ct.exec(e);return t?`/`+e.slice(t[0].length):e}function Tt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
2
- \r`.includes(e)?``:encodeURIComponent(e))),wt(e)}function Et(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=kt(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[bt];i=Dt(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[bt];i=Dt(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[bt]!==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 Dt(e,t){let n=At();return{...t,key:n,__TSR_key:n,[bt]:e}}function Ot(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=>Tt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>kt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=At();t.history.replaceState({[bt]: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=kt(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[bt]-l.state[bt],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=Et({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(St,x,{capture:!0}),t.removeEventListener(xt,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(St,x,{capture:!0}),t.addEventListener(xt,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 kt(e,t){let n=Tt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=At();t={[bt]: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 At(){return(Math.random()+1).toString(36).slice(7)}function jt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Mt(e){return e.pathname+e.search+e.hash}function Nt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Pt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ft(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function It({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Lt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Rt(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 zt=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:Ot()),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!==`/`&&ge(n)?mt(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=yt(this.latestLocation,e),it(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ie(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Me(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Ce(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:de(e),external:!1,searchStr:o,search:O(t?.search,i),hash:de(r.slice(1)),state:k(t?.state,a)}}let o=ht(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:de(wt(o.pathname)),external:!!this.rewrite&&jt(o,this.origin),searchStr:c,search:O(t?.search,s),hash:de(o.hash.slice(1)),state:k(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=Fe(N(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=kt(n.href,{});n={...n,to:ht(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=ve(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[N(c)],u=c.includes(`$`),d;if(l)d=l._branch??=ze(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??ke(!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??=Wt(n.params,e),!D(p))break;p===e&&(p=Object.assign(ee(),p));try{Object.assign(p,t(p))}catch{}}}p??=Wt(n.params,Gt(n.params,f)?o()[3]:Kt);let m=e.leaveParams?c:wt(de(f?Se(c,f,p,this.pathParamsDecoder):c)),h=qt(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,Ut(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?Jt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||Kt,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:Kt,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=gt(this.rewrite,e);C=Mt(e),jt(n,t)?(w=n.href,T=!0):w=wt(Mt(n))}else C=fe(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=Ne(r.pathname,this.processedTree);if(t){let i=Object.assign(ee(),t.rawParams),{from:a,params:o,...s}=t.route,c=Wt(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 Bt(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=N(this.latestLocation.href)===N(n.href)&&j(It(n.state),It(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?ae(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 Bt(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 Fn(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(Ft(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`)&&Nt(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(oe.test(n)||(r=ae(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:jt(e,this.origin)||(n=Mt(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=P,this.preloadRoute=e=>In(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ve(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=Pe(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!j(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?j(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=ye(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??ut,parseSearch:e.parseSearch??lt,protocolAllowlist:e.protocolAllowlist??ie}),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=ke(!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[`**`]:N(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Yt(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=Ut(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Vt||(r=new Vt(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=ee(),_=i._interpolation?Se(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{Xt(i,d)}catch(e){if(C=y(e)||x(e)?e:new Ht(e.message,{cause:e}),t?.throwOnError)throw C}let w=b?`stay`:`enter`,T;if(S)T={...S,cause:w,search:O(b?b.search:S.search,l),_strictSearch:f,searchError:p};else{let e=Nt(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?O(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?k(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`?O(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,Ut(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{Xt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Bt(e,t,{replace:n,ignoreBlocker:r}){if(!se(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 Vt=class extends Error{},Ht=class extends Error{};function Ut(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Vt(`Async validation not supported`);if(n.issues)throw new Vt(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 Wt(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 Gt(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 Kt=Object.freeze({});function qt(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=Ut(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 Jt(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 Yt(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 pt}function Xt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Zt(e,t){return e.options[t]?.preload?.()}function Qt(e,t){let n=Zt(e,`component`),r=Zt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function P(e,t,n){let r=()=>t===!1?void 0:t?Zt(e,t):Qt(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 $t(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function en(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function tn(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 F=0,I=1,nn=2,L=3,rn=[4];function an(e){return typeof e[0]==`number`}function R(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 z(e,t){return e.routesById[t.routeId]}function on(e,t,n){return x(e)?[L,e]:y(e)?(e.routeId||=n,[nn,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[I,e]):[F,e]}function sn(e,t){let n=on(t,!0,e.id);if(n[0]!==I)return n;try{e.options.onError?.(n[1])}catch(t){n=on(t,!0,e.id)}return n}function cn(e,t,n,r,i){return i[0].signal.aborted?rn:Sn(e,t,n,sn(n,r),i)}async function ln(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=z(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 B(e,r),[i,cn(e,t,u,a,n)]}if(c.aborted)return[i,rn];let p=r.paramsError??r.searchError;if(p!==void 0)return B(e,r),[i,cn(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{fn(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?R(a,c):a);if(c.aborted)return[i,rn];let s=Sn(e,t,u,on(o,!1,u.id),n);if(s[0]!==F)return B(e,r),[i,s];r.context={...r.context,...o}}catch(a){return B(e,r),[i,cn(e,t,u,a,n)]}finally{r.status=h,fn(e,r,!1,n[0])}}i()}function un(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 B(e,t){let n=t._flight;t._flight=void 0,un(e,t,n)?.abort()}function V(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=un(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function dn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function fn(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 pn(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 mn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return rn;if(!i)return[F,void 0];let l=n._flight;fn(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(pn(e,t,n,r,s,a,!!o[3]))).then(e=>on(e,!1,r.id),e=>on(e,!0,r.id)).then(t=>(t[0]!==F&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===I&&l[2]?sn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Sn(e,t,r,await R(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return B(e,n),rn}finally{fn(e,n,!1,s)}}function hn(e,t,n){t[0]!==L&&(e.status=`success`,e.error=void 0,t[0]===F?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function gn(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&&B(e,r)}function _n(e,t){return t[0]===I||t[0]===nn?{...e,status:t[0]===I?`error`:`notFound`,error:t[1],_flight:void 0}:e}function vn(e,t,n,r,i,a,o){let s=t[1][n],c=z(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(pn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=rn)),!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,B(e,s),p=cn(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,un(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?mn(e,t,s,c,g,i,a).then(t=>(hn(s,t,l),t[0]===F&&(m&&!a[0].signal.aborted&&gn(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[F,s.loaderData]),T=(async()=>{try{let e=P(c,void 0,C);e&&await R(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,cn(e,t,c,r,a)]}let r=await w;x&&r[0]===F&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>_n(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=mn(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,hn(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>_n(E,e))}async function yn(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=z(e,t[n]);try{let e=P(i,!1);e&&await R(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function bn(e,t){t[2]&&=(V(e,t[2].map(e=>e[3])),void 0)}async function xn(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]>=L)throw[a,t];!i&&t[0]!==F&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===L)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Sn(e,t,n,r,i,a){for(;r[0]===L;){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]?[L,t]:[L,t,a]}return[L,o,n]}catch(e){r=a?[I,e]:sn(n,e),a=!0}}return r}async function Cn(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]===nn?yn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=L)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]!==F&&t[0]<L&&!(`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)>=L){let n=s[1];if(n[0]!==L||n[1].options.reloadDocument||n[2])return bn(e,t),n;c=!0,s=[0,[I,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===I?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=z(e,u);try{await R(i?Promise.resolve().then(()=>P(m,l===I?`errorComponent`:`notFoundComponent`)):Promise.all([P(m),P(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return bn(e,t),rn}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),bn(e,t),V(e,o),p()):u.status=`success`}return t}async function wn(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=z(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 R(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 Tn(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 yn(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=vn(e,i,t,u,f,r,l)},m=await ln(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===nn){let t=await yn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=L&&(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=Cn(e,i,u,r[0],xn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=xn(i[2],void 0,void 0,h.then(e=>an(e)?0:$t(n).length,()=>0))),o=await h}catch(t){if(bn(e,i),t===a&&a.aborted)return rn;throw t}return an(o)?o:wn(e,o,a,r[6]===n.length?r[6]:0)}function En(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=z(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(()=>En(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 Dn(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 On(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!$t(t[3]).some(e=>e.id===n[1]))return;let i;try{await R(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function kn(e,t){e._committed=t,e.stores.setMatches(t)}function An(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=$t(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=z(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=Lt(n);kn(e,n),V(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Rt(e,i,n,a,l,t)}async function jn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Mn(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 Nn(e,t,n,r,i){let a=n.map(e=>({...e}));dn(a);for(let t of r)B(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Cn(e,o,r,t[0],i)}catch(t){throw V(e,a),t}if(an(s))V(e,a),s[0]===L&&e._tx===t&&e._committed===n&&await Mn(e,t,s);else if(await wn(e,s,t[0].signal),e._tx!==t||e._committed!==n)V(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),B(e,n))}kn(e,a),V(e,n,a)}}async function Pn(e,t,n,r,i,a){let o=await Tn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(an(o)){let n=o[0]===L&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Dn(e,t),V(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Dn(e,t);return}await Mn(e,t,o);return}let s=o[1];if(e._tx===t&&await On(e,t),e._tx!==t){Dn(e,t),V(e,s),bn(e,o);return}let c=t[2],l=Ft(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await On(e,t),e._tx!==t){Dn(e,t),V(e,s),bn(e,o);return}let n=await e.startTransition(()=>{Dn(e,t),An(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&&Nn(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)):bn(e,o)})}async function Fn(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=Ft(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await jn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});dn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){V(e,m),await jn(e,n);return}e._preflight=void 0;let g,_=()=>Pn(e,y,f,()=>En(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(()=>jn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&fn(e,t,!1)}n[0].abort(),V(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))&&En(e,y),g?.(_()),await y[5]):(V(e,y[3]),y[3]=[],g?.(),await jn(e,y))}async function In(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}),dn(a),o=(e._preloads??=new Map).set(i,a),s=await Tn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),V(e,a)),i.abort()}if(!an(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){y(e)||console.error(e);return}}}async function Ln(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 R(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)z(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&gn(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));V(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=z(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=z(e,t);return await(t._notFound?Promise.all([P(n),P(n,`notFoundComponent`)]):P(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await R(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=z(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 wn(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},D=[E,t=>{if(e._handoff!==D)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),V(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=Lt(S),e._handoff=D,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 Rn=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},zn=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},Bn=(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},Vn=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},H=Symbol.asyncIterator,Hn=Symbol.hasInstance,Un=Symbol.isConcatSpreadable,Wn=Symbol.iterator,Gn=Symbol.match,Kn=Symbol.matchAll,qn=Symbol.replace,Jn=Symbol.search,Yn=Symbol.species,Xn=Symbol.split,Zn=Symbol.toPrimitive,Qn=Symbol.toStringTag,$n=Symbol.unscopables,er={0:`Instant`,1:`Duration`,2:`PlainDate`,3:`PlainDateTime`,4:`PlainMonthDay`,5:`PlainTime`,6:`PlainYearMonth`,7:`ZonedDateTime`},tr={0:H,1:Hn,2:Un,3:Wn,4:Gn,5:Kn,6:qn,7:Jn,8:Yn,9:Xn,10:Zn,11:Qn,12:$n};function nr(){let e={};for(let t=0;t<=12;t++)e[tr[t]]=t;return e}var rr=nr(),ir={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},ar={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function or(){let e={};for(let t=0;t<=6;t++)e[t]=ar[t].name;return e}var sr=or(),cr=64,lr=/["\\\n\r\b\t\f<\u2028\u2029]/,ur=/[\x00-\x07\x0b\x0e-\x1f\ud800-\udfff]/,dr=/</g,fr=/\u2028/g,pr=/\u2029/g;function mr(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 hr(e){let t=``+e;if(!lr.test(t))return t;if(t.length>=cr&&!ur.test(t)){let e=JSON.stringify(t).slice(1,-1);return e.includes(`<`)&&(e=e.replace(dr,`\\x3C`)),e.includes(`\u2028`)&&(e=e.replace(fr,`\\u2028`)),e.includes(`\u2029`)&&(e=e.replace(pr,`\\u2029`)),e}let n=``,r=0,i;for(let e=0,a=t.length;e<a;e++)i=mr(t.charCodeAt(e)),i&&(n+=t.slice(r,e)+i,r=e+1);return n+t.slice(r)}var gr=/^(?:[^"\\\x00-\x1f]|\\["\\nrbtf])*$/,_r=/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g;function U(e){if(typeof e!=`string`)return e.replace(_r,U);let t=e.indexOf(`\\`);if(t===-1)return e;if(gr.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 vr={parsing:1,serialization:2,deserialization:3};function yr(e){return`Seroval Error (step: ${vr[e]})`}var br=class extends Error{constructor(e,t){super(yr(e)),this.cause=t}},xr=class extends br{constructor(e){super(`parsing`,e)}},Sr=class extends br{constructor(e){super(`deserialization`,e)}};function W(e){return`Seroval Error (specific: ${e})`}var Cr=class extends Error{constructor(e){super(W(1)),this.value=e}},wr=class extends Error{constructor(e){super(W(2))}},Tr=class extends Error{constructor(e){super(W(3))}},Er=class extends Error{constructor(e,t){super(W(13)),this.tag=e,this.field=t}},Dr=class extends Error{constructor(e){super(W(4))}},Or=class extends Error{constructor(e){super(W(6))}},kr=class extends Error{constructor(e){super(W(7))}},G=class extends Error{constructor(e){super(W(8))}},Ar=class extends Error{constructor(e){super(W(9))}},jr=class extends Error{constructor(e){super(W(10))}},Mr=new Map,Nr=new Map;function Pr(e){return Nr.has(e)}function Fr(e){return Mr.get(e)}function Ir(e){if(Pr(e))return Nr.get(e);throw new Or(e)}var Lr=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function Rr(e){return e instanceof Lr}function zr(e,t,n){return new Lr(e,t,n)}function Br(e){let t=[],n=-1,r=-1,i=e[Wn]();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 Vr=zn(Wn);function Hr(e){return Vr(e)}var Ur=Symbol(`LiveStream`);function Wr(e){return e!=null&&e[Ur]===!0}var Gr=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 Kr(e){return e instanceof Gr||Wr(e)}function qr(){return new Gr}var Jr=Bn(H,Rn);function Yr(e){return Jr(e)}function Xr(e){return e}function Zr(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Zr(e,r.extends))}}var Qr=new WeakMap;function $r(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=$r(e,i.extends,n),n===-1))return-1}else{let t=e.indexOf(i);if(t===-1||t>=n)return-1}}return n}function ei(e){if(e){let t=Qr.get(e);if(t&&$r(t,e,0)===t.length)return t;let n=new Set;Zr(n,e);let r=[...n];return Qr.set(e,r),r}}function ti(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 ni=class{constructor(e,t){this.value=e,this.replacement=t}};function ri(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 ii=512;function ai(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):ri(e)}function oi(e){if(e.length<ii||typeof Buffer>`u`)return Vn(e);let t=atob(e),n=new ArrayBuffer(t.length);return Buffer.from(n).write(t,`latin1`),n}function si(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 kr(e)}}var ci;function li(e){return ci||=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get,ci.call(e)}var ui,di;function fi(e,t){return Object.getOwnPropertyDescriptor(e,t).get}function pi(e,t){return{buffer:fi(e,`buffer`),byteOffset:fi(e,`byteOffset`),byteLength:fi(e,`byteLength`),length:fi(e,t)}}function mi(e,t){let n;return n=t?di??=pi(DataView.prototype,`byteLength`):ui??=pi(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 hi(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function gi(e){switch(e){case H:case Un:case Qn:case Wn:return!0;default:return!1}}var _i=1e6,vi=1e4,yi=2e4;function bi(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 xi=1e3,Si=32,Ci=/\\[pP]\{/g;function wi(e){let t=e.maxBase64Length??_i;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||xi,maxBase64Length:t,regexpPropertyEscapes:Si}}function Ti(e){return{base:wi(e),marked:void 0}}function Ei(e,t){let n={t:4,i:t};if(t<0||!Number.isInteger(t))throw new G(n);if(e.refs.has(t))throw new Ar(n)}function Di(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}var Oi=()=>{};function K(e,t,n){Ei(e.base,t),n instanceof Promise&&n.catch(Oi);let r=e.marked;return(!r||r.has(t))&&e.base.refs.set(t,n),n}function ki(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new G(e)}function Ai(e,t){return K(e,t.i,Ir(U(t.s)))}function ji(e,t){if(!Array.isArray(t))throw new G(e)}function Mi(e,t,n){let r=n.a;ji(n,r);let i=r.length,a=K(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=q(e,t,o));return bi(a,n.o),a}function Ni(e,t,n){hi(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function Pi(e,t,n,r,i){if(typeof r==`string`)Ni(n,U(r),q(e,t,i));else{let a=q(e,t,r);switch(typeof a){case`string`:Ni(n,a,q(e,t,i));break;case`symbol`:gi(a)&&(n[a]=q(e,t,i));break;default:throw new G(r)}}}function Fi(e,t,n){e.base.refs.types.set(t,n)}function Ii(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new G(t)}function Li(e,t,n,r){let i=n.k;ji(n,i),ji(n,n.v);let a=i.length;if(a>0)for(let o=0,s=n.v;o<a;o++)Pi(e,t,r,i[o],s[o]);return r}function Ri(e,t,n){let r=K(e,n.i,n.t===10?{}:Object.create(null));return Li(e,t,n.p,r),bi(r,n.o),r}function zi(e,t){return K(e,t.i,new Date(t.s))}function Bi(e,t){if(!(e.base.features&64))throw new wr(t);let n=Temporal[ki(t,er,t.c)];return K(e,t.i,n.from(t.s))}function Vi(e,t){if(e.base.features&32){let n=U(t.c);if(n.length>yi)throw new G(t);if(/[uv]/.test(String(t.m))){let r=n.match(Ci);if(r&&(e.base.regexpPropertyEscapes-=r.length,e.base.regexpPropertyEscapes<0))throw new G(t)}return K(e,t.i,new RegExp(n,t.m))}throw new wr(t)}function Hi(e,t,n){let r=K(e,n.i,new Set);ji(n,n.a);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(q(e,t,a[i]));return r}function Ui(e,t,n){let r=K(e,n.i,new Map);ji(n,n.e.k),ji(n,n.e.v);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(q(e,t,a[i]),q(e,t,o[i]));return r}function Wi(e,t){if(typeof t.s!=`string`)throw new G(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=oi(U(t.s));return K(e,t.i,n)}function Gi(e,t,n,r){let i=q(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new G(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new G(n);return K(e,n.i,r?new r(i,a,n.l):new DataView(i,a,n.l))}function Ki(e,t,n,r){if(n.p){let i=Li(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function qi(e,t,n){return Ki(e,t,n,K(e,n.i,AggregateError([],U(n.m))))}function Ji(e,t,n){let r=ki(n,ar,n.s);return Ki(e,t,n,K(e,n.i,new r(U(n.m))))}function Yi(e,t,n){let r=Rn(),i=K(e,n.i,r.p),a=q(e,t,n.f);if(Di(a))throw new G(n.f);return n.s?r.s(a):r.f(a),i}function Xi(e,t,n){return K(e,n.i,Object(q(e,t,n.f)))}function Zi(e,t){let n=e.s;if(typeof n!=`object`||!n)throw new G(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 Qi(e,t,n){let r=e.base.plugins;if(r){let i=U(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i){let r=o.validate?Zi(n,o.validate):void 0;return K(e,n.i,o.deserialize(n.s,{deserialize:n=>{let a=q(e,t,n);if(r){for(let[e,t,o]of r)if(e===n&&!o(a))throw new Er(i,t)}return a}},{id:n.i}))}}}throw new Tr(n.c)}function $i(e,t){let n=K(e,t.i,K(e,t.s,Rn()).p);return Fi(e,t.s,22),e.base.pending?.add(t.s),n}function ea(e,t,n){let r=e.base.refs.get(n.i);if(r){Ii(e,n,n.i,22);let i=q(e,t,n.a[1]);if(Di(i))throw new G(n.a[1]);n.t===23?r.s(i):r.f(i),e.base.pending?.delete(n.i)}else throw new Dr(`Promise`)}function ta(e,t,n){q(e,t,n.a[0]);let r=q(e,t,n.a[1]);if(!Rr(r))throw new G(n.a[1]);return Hr(r)}function na(e,t,n){q(e,t,n.a[0]);let r=q(e,t,n.a[1]);if(!Kr(r))throw new G(n.a[1]);return Yr(r)}function ra(e,t,n){let r=K(e,n.i,new Gr(n.l===1?1:void 0));Fi(e,n.i,31),e.base.pending?.add(n.i);let i=n.a;ji(n,i);let a=i.length;if(a)for(let n=0;n<a;n++)q(e,t,i[n]);return r}function ia(e,t,n,r){let i=e.base.refs.get(n.i);if(i)Ii(e,n,n.i,31),i[r](q(e,t,n.f)),r!==`next`&&e.base.pending?.delete(n.i);else throw new Dr(`Stream`)}function aa(e,t,n){q(e,t,n.f)}function oa(e,t,n){q(e,t,n.a[1])}function sa(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function ca(e,t,n){ji(n,n.a);let r=n.a.length;if(!(sa(n.s,r)&&sa(n.l,r)))throw new G(n);let i=K(e,n.i,zr([],n.s,n.l));Fi(e,n.i,35);for(let a=0;a<r;a++)i.v[a]=q(e,t,n.a[a]);return i}function q(e,t,n){if(t>e.base.depthLimit)throw new jr(e.base.depthLimit);switch(t+=1,n.t){case 2:return ki(n,ir,n.s);case 0:return Number(n.s);case 1:return U(String(n.s));case 3:if(String(n.s).length>vi)throw new G(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return Ai(e,n);case 9:return Mi(e,t,n);case 10:case 11:return Ri(e,t,n);case 5:return zi(e,n);case 6:return Vi(e,n);case 7:return Hi(e,t,n);case 8:return Ui(e,t,n);case 19:return Wi(e,n);case 16:case 15:return Gi(e,t,n,si(n.c));case 20:return Gi(e,t,n);case 14:return qi(e,t,n);case 13:return Ji(e,t,n);case 12:return Yi(e,t,n);case 17:return ki(n,tr,n.s);case 21:return Xi(e,t,n);case 25:return Qi(e,t,n);case 22:return $i(e,n);case 23:case 24:return ea(e,t,n);case 28:return ta(e,t,n);case 30:return na(e,t,n);case 31:return ra(e,t,n);case 32:return ia(e,t,n,`next`);case 33:return ia(e,t,n,`throw`);case 34:return ia(e,t,n,`return`);case 27:return aa(e,t,n);case 29:return oa(e,t,n);case 35:return ca(e,t,n);case 36:return Bi(e,n);default:throw new wr(n)}}function la(e,t){e.base.regexpPropertyEscapes=Si;try{return q(e,0,t)}catch(e){throw new Sr(e)}}function ua(e){return Ti({maxBase64Length:e.maxBase64Length,plugins:ei(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit})}function da(e,t){return la(ua(t),e)}function J(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 fa(e){return J(2,void 0,e)}var pa=fa(2),ma=fa(3),ha=fa(1),ga=fa(0),_a=fa(4),va=fa(5),ya=fa(6),ba=fa(7);function xa(e){for(let t=1;t<=6;t++)if(e instanceof ar[t])return t;return 0}function Sa(e,t){let n=Object.create(null),r=sr[xa(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 Ca(e){return Object.isExtensible(e)?0:Object.isFrozen(e)?3:Object.isSealed(e)?2:1}function wa(e){switch(e){case 1/0:return va;case-1/0:return ya}return e===e?Object.is(e,-0)?_a:J(0,void 0,e):ba}function Ta(e){return J(1,void 0,hr(e))}function Ea(e){return J(3,void 0,``+e)}function Da(e){return J(4,e)}var Oa=Date.prototype.getTime,ka=Date.prototype.toISOString;function Aa(e,t){let n=Oa.call(t);return J(5,e,n===n?ka.call(t):``)}function ja(e,t,n,r){return J(36,e,n.prototype.toString.call(r),t)}var Ma=Object.getOwnPropertyDescriptor(RegExp.prototype,`source`).get,Na=Object.getOwnPropertyDescriptor(RegExp.prototype,`flags`).get;function Pa(e,t){return J(6,e,void 0,hr(Ma.call(t)),Na.call(t))}function Fa(e,t){return J(17,e,rr[t])}function Ia(e,t){return J(18,e,hr(t))}function La(e,t,n){return J(25,e,n,hr(t))}function Ra(e,t,n){return J(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,Ca(t))}function za(e,t){return J(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t)}var Ba=1e6;function Va(e){let t=e.length;if(t>Ba&&t-Object.keys(e).length>Ba)throw new Cr(e)}function Ha(e,t,n,r,i){let a=e===20,o=r.length;if(o>Ba)throw new Cr(n);return J(e,t,void 0,a?void 0:li(n),void 0,void 0,void 0,void 0,i,r.byteOffset,void 0,o)}function Ua(e,t,n,r){return J(e,t,xa(n),void 0,hr(n.message),r)}function Wa(e,t){return J(7,e,void 0,void 0,void 0,void 0,void 0,t)}function Ga(e,t,n){return J(e,void 0,void 0,void 0,void 0,void 0,void 0,[t,n])}function Ka(e,t,n,r){return J(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,r)}function qa(e,t,n){return J(e,t,void 0,void 0,void 0,void 0,void 0,void 0,n)}function Ja(e,t,n,r){return J(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var Ya={},Xa={},Za={0:{},1:{},2:{},3:{},4:{},5:{}};async function Qa(e){try{return[1,await e]}catch(e){return[0,e]}}function $a(e){return{plugins:e.plugins,plainObjectPlugins:ti(e.plugins),marked:new Set,features:127^(e.disabledFeatures??0),refs:e.refs??new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:e.compactArrayBufferViews??!1}}function eo(e,t,n){return n===Object&&Object.getPrototypeOf(t)===Object.prototype?e.plainObjectPlugins:e.plugins}function to(e,t){e.marked.add(t)}function no(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function ro(e,t){if(e.size>t)for(let[n,r]of e)r>=t&&e.delete(n)}function io(e,t){let n=e.refs.get(t);return n==null?no(e,t):(to(e,n),Da(n))}function ao(e,t){let n=io(e,t);if(typeof n!=`number`)return n;let r=Fr(t);return r===void 0?n:Ia(n,r)}function oo(e,t){let n=ao(e,t);if(typeof n!=`number`)return n;if(t in rr)return Fa(n,t);throw new Cr(t)}function so(e,t){let n=io(e,Za[t]);return typeof n==`number`?J(26,n,t):n}function co(e){let t=io(e,Ya);return typeof t==`number`?J(27,t,void 0,void 0,void 0,void 0,void 0,void 0,oo(e,Wn)):t}function lo(e){let t=io(e,Xa);return typeof t==`number`?J(29,t,void 0,void 0,void 0,void 0,void 0,[so(e,1),oo(e,H)]):t}function uo(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 fo(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 po(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`&&uo(t)!=null)return 15;if(ArrayBuffer.isView(e)){let t=li(e);if(t===void 0)return 10;if(t!==`BigInt64Array`&&t!==`BigUint64Array`)return 8;if(n&16)return 9}return e instanceof Error?4:Wn in e||H in e?16:0}function mo(e,t,n,r){return J(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,Ca(t))}function ho(e){return so(e,0)}function go(e,t,n,r){return J(8,e,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,t)}function _o(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 vo(e,t,n){return J(19,t,ai(n),void 0,void 0,void 0,void 0,void 0,so(e,5))}function yo(e){return{base:$a(e)}}function bo(){}function xo(e){for(let t of e)t instanceof Promise&&Promise.prototype.then.call(t,void 0,bo)}async function So(e,t,n){Va(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]);xo(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 Co(e,t,n,r){return Ra(n,r,await So(e,t,r))}async function wo(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]];xo(s);for(let n=0,c;n<i;n++)a[n]=hr(r[n]),c=zo(e,t,s[n]),o[n]=c instanceof Promise?await c:c;return Wn in n&&(a.push(oo(e.base,Wn)),o.push(Ga(28,co(e.base),await Y(e,t,Br(n))))),H in n&&(a.push(oo(e.base,H)),o.push(Ga(30,lo(e.base),await Fo(e,t,n)))),Qn in n&&(a.push(oo(e.base,Qn)),o.push(Ta(n[Qn]))),Un in n&&(a.push(oo(e.base,Un)),o.push(n[Un]?pa:ma)),{k:a,v:o}}async function To(e,t,n,r,i){return mo(n,r,i,await wo(e,t,r))}async function Eo(e,t,n,r){let i=zo(e,t,r.valueOf());return za(n,i instanceof Promise?await i:i)}async function Do(e,t,n,r,i){let a=_o(e.base,mi(i,n===20));return Ha(n,r,i,a,await Y(e,t,a.buffer))}async function Oo(e,t,n,r,i){let a=Sa(i,e.base.features);return Ua(n,r,i,a?await wo(e,t,a):void 0)}async function ko(e,t,n,r){let i=ho(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];xo(c),xo(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 go(n,i,o,s)}async function Ao(e,t,n,r){let i=[...r.keys()],a=Array(i.length);xo(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 Wa(n,a)}async function jo(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 La(n,o.tag,await o.parse.async(r,{parse:n=>Y(e,t,n),parseStreamSource(n){if(t>=e.base.depthLimit)throw new jr(e.base.depthLimit);return Fo(e,t+1,n)}},{id:n}))}}async function Mo(e,t,n,r){let[i,a]=await Qa(r);return J(12,n,i,void 0,void 0,void 0,void 0,void 0,await Y(e,t,a))}function No(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;to(this.base,t);let p=a.push(void 0)-1;o++,n!==32&&(s=!0),Y(this,e,u).then(e=>{if(!c&&(a[p]=qa(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=Wr(n)?n.pump(d):n.on(d)}async function Po(e,t,n,r){return Ka(n,so(e.base,4),await new Promise(No.bind(e,t,n,r)))}async function Fo(e,t,n){let r=no(e.base,{}),i=so(e.base,4),a=n[H](),o=[];for(;;){let n;to(e.base,r);try{n=await a.next()}catch(n){o.push(qa(33,r,await Y(e,t,n)));break}let i;try{i=await Y(e,t,n.value)}catch(e){throw Promise.resolve().then(()=>a.return?.()).catch(()=>{}),e}if(o.push(qa(n.done?34:32,r,i)),n.done)break}return Ka(r,i,o)}async function Io(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 Ja(n,a,r.t,r.d)}async function Lo(e,t,n,r){if(Array.isArray(r))return Co(e,t,n,r);if(Kr(r))return Po(e,t,n,r);if(Rr(r))return Io(e,t,n,r);let i=fo(r);if(i===ni)return Y(e,t,r.replacement);let a=await jo(e,t,n,r,eo(e.base,r,i));if(a)return a;if(i===Object)return To(e,t,n,r,!1);switch(po(r,i,e.base.features)){case 2:return To(e,t,n,r,!0);case 3:return Aa(n,r);case 4:return Oo(e,t,13,n,r);case 5:return Oo(e,t,14,n,r);case 6:return Eo(e,t,n,r);case 7:return vo(e.base,n,r);case 8:return Do(e,t,15,n,r);case 9:return Do(e,t,16,n,r);case 10:return Do(e,t,20,n,r);case 11:return ko(e,t,n,r);case 12:return Ao(e,t,n,r);case 13:return Mo(e,t,n,r);case 14:return Pa(n,r);case 15:return ja(n,uo(i),i,r);case 16:return To(e,t,n,r,!!i);default:throw new Cr(r)}}async function Ro(e,t,n){let r=ao(e.base,n);if(typeof r!=`number`)return r;let i=await jo(e,t,r,n,e.base.plugins);if(i)return i;throw new Cr(n)}function zo(e,t,n){if(t>=e.base.depthLimit)throw new jr(e.base.depthLimit);switch(typeof n){case`boolean`:return n?pa:ma;case`undefined`:return ha;case`string`:return Ta(n);case`number`:return wa(n);case`bigint`:return Ea(n);case`object`:if(n){let r=ao(e.base,n);return typeof r==`number`?Lo(e,t+1,r,n):r}return ga;case`symbol`:return oo(e.base,n);case`function`:return Ro(e,t,n);default:throw new Cr(n)}}async function Y(e,t,n){return await zo(e,t,n)}async function Bo(e,t){let n=e.base.refs,r=n.size;try{return await Y(e,0,t)}catch(e){throw ro(n,r),e instanceof xr?e:new xr(e)}}async function Vo(e,t={}){let n=ei(t.plugins),r=yo({compactArrayBufferViews:t.compactArrayBufferViews,depthLimit:t.depthLimit,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await Bo(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function Ho(e){return Xr({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 Uo(e){if(Array.isArray(e))return e.flatMap(e=>Uo(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 Wo(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function Go(...e){return e.reduce((e,t)=>{let n=Wo(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?Uo(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var Ko=Xr({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))}}),qo=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function Jo(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 Yo=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function Xo(e){try{return`t`+Yo.decode(e)}catch{return`b`+Jo(e)}}function Zo(e,t,n){n?.throwIfAborted();let r=qr(),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 Qo(e){return Xr({tag:`tss/RawStream`,test:e=>e instanceof qo,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=Zo(t.stream,t.hint===`text`?Xo:Jo,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var $o=Qo(),es=new WeakSet;function ts(e){if(typeof e==`object`&&e){if(es.has(e))throw Error(`Expected a value used by one plugin value only.`);es.add(e)}return e}var ns={},rs=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),is=Xr({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===ns},parse:{sync(){return ns},async async(){return await Promise.resolve(ns)},stream(){return ns}},serialize(){return rs.toString()},deserialize(){return ns}});function as(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 os=Xr({tag:`seroval/plugins/web/ReadableStream`,extends:[is],skipPlainObjects:!0,test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{async async(e,t){return{factory:await t.parse(ns),stream:await t.parseStreamSource(as(e))}},stream(e,t){return{factory:t.parse(ns),stream:t.parseStreamSource(as(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},validate:{stream:Kr},deserialize(e,t){return rs(ts(t.deserialize(e.stream)))}});function ss(e){return[Ko,e?Qo(e):$o,os]}[...ss()];function cs(e){return Xr({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function ls(e){return[...(_()?.serializationAdapters)?.map(Ho)??[],...e]}function us(e){return ls(ss(e))}var ds=new TextDecoder,X=new Uint8Array,fs=new ByteLengthQueuingStrategy({highWaterMark:0});function ps(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)}},fs),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=X,o=0;async function c(){for(;o===e.byteLength;){e=X,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 X;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=X,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=X,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=X,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=ds.decode(f);for(f=X,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=X;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=X,e.enqueue(t)}}else s(d,t===2?1:[Error(ds.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=X,t.releaseLock()}})(),[c,u]}var ms=`Error preloading route! ☝️`,hs=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=pt:this.parentRoute||we();let r=n?pt:t?.path;r&&r!==`/`&&(r=he(r));let i=t?.id||r,a=n?pt:me((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:me(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=N(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.`)}},gs=class extends hs{constructor(e){super(e)}},_s;function vs(e,t,n){try{return da(e,t)}catch(e){throw bs(n),e}}async function ys(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function bs(e){for(let t of e)t.catch(()=>{});e.length=0}var xs=Object.prototype.hasOwnProperty;function Ss(e){for(let t in e)if(xs.call(e,t))return!0;return!1}async function Cs(e,t,n){_s||=us();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 ws(r);if(t!==void 0){let n=at({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await Es(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),Ds(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function ws(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&Ss(e.context)&&((t??={}).context=e.context),t?Ts(t,e.signal):void 0}async function Ts(e,t){t?.throwIfAborted();let n;try{n=await Vo(e,{plugins:t?us(t):_s})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function Es(e){if(e.data instanceof FormData){let t;return e.context&&Ss(e.context)&&(t=await Ts(e.context,e.signal)),t!==void 0&&e.data.set(f,t),e.data}return ws(e)}async function Ds(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||we(),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]=ps(t.body);e=await Os(i,[cs(a),..._s])}else if(r.includes(`application/json`)){let n=await t.json(),r=[];e=vs(n,{plugins:_s},r),await ys(r)}return e||we(),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 Os(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=vs(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;vs(JSON.parse(t.value),r,e),bs(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await ys(o),a}function Z(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=_()?.serverFns?.fetch;return Cs(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[p]:!0})}var Q=l(d(),1),ks=Q.use,As=Q.useLayoutEffect,js=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})),Ms=o(((e,t)=>{t.exports=js()})),Ns=Q.createContext(null);function Ps(e){return Q.useContext(Ns)}function Fs(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{en(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 Is=Q.createContext(void 0),Ls=Q.createContext(void 0),Rs=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})),zs=o(((e,t)=>{t.exports=Rs()})),Bs=o((e=>{var t=d(),n=zs();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}})),Vs=o(((e,t)=>{t.exports=Bs()})),Hs=Vs();function Us(e,t){return e===t}function Ws(e,t=e=>e,n){let r=n?.compare??Us,i=(0,Q.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,Q.useCallback)(()=>e.get(),[e]);return(0,Hs.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Gs={};function Ks(e,t){let n=Q.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=k(n.current,i):i}}function qs(e){let t=Ps(),n=Q.useContext(e.from?Ls:Is),r=e.from??n,i=t.stores.getMatchStore(r),a=Ks(e,t),o=Ws(i,e=>e?a(e):Gs);if(o!==Gs)return o;(e.shouldThrow??!0)&&we()}function Js(e){return qs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ys(e){let{select:t,...n}=e;return qs({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Xs(e){return qs({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 Zs(e){return qs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Qs(e){let t=Ps();return Q.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function $s(e){return qs({...e,select:t=>e.select?e.select(t.context):t.context})}var ec=Ms();function tc(...e){let t=Q.useRef(e),n=t.current;return e.forEach((e,t)=>{j(n[t],e,!1,!0)||(n[t]=e)}),t.current}function nc(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(ms)})}function rc(e,t){let n=typeof e==`string`&&ae(e);if(n)return t.has(n)?e:null}function ic(e,t,n,r){let i=_e(e.pathname,r),a=_e(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!j(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ac(e,t,n){let r=Ps(),i=Q.useRef(null),a=Q.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]=tc(e.search,e.params,o),x=Q.useContext(Is),S=(r.stores._linkScopes??={})[x]??=Fs(r,x),[C,w,T]=Q.useMemo(()=>{let t=rc(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=pc(t,r,u),s=u||o&&!ae(o)?ic(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,D]=Q.useSyncExternalStore(S[1],w,T||w),ee=D===void 0&&E,O=u||E===void 0,k=Q.useRef(!1),A=e.reloadDocument||ee||O?!1:c??r.options.defaultPreload,j=l??r.options.defaultPreloadDelay??0,te=Q.useCallback(e=>{let t=e?.isIntersecting;t??A===`intent`?j?i.t??=setTimeout(()=>{i.t=void 0,nc(r,C)},j):nc(r,C):t===!1&&dc(i)},[r,C,i,A,j]);Q.useEffect(()=>{if(!A)return;A===`render`&&!k.current&&(k.current=!0,nc(r,C));let e=!0,t;return A===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&te(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),dc(i)}},[r,C,A,te,i]);let M=lc(e,n);if(M.ref=t?a:i,ee)return M.href=ee,M;let ne=t=>{let n=d??t.currentTarget.getAttribute(`target`);O||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),dc(i),r.navigate({...e,_fromLocation:C._fromLocation}))},re=()=>{A===`intent`&&nc(r,C)},ie=()=>{A===`intent`&&dc(i)};return M.onClick=fc(f,ne),M.onBlur=fc(p,ie),M.onFocus=fc(m,te),M.onMouseEnter=fc(h,te),M.onMouseLeave=fc(g,ie),M.onTouchStart=fc(_,re),uc(M,e,D,E,O,n)}var oc={},sc={className:`active`},cc=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function lc(e,t){let n={};for(let r in e)cc.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function uc(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=T(n?o:s,{})??(n?sc:oc);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 dc=e=>{clearTimeout(e.t),e.t=void 0},fc=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function pc(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||!se(i,t.protocolAllowlist))return i}var mc=Q.memo(Q.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ac(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return Q.createElement(n,r,i)}),hc);function hc(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!cc.has(r)||!j(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var gc=class extends hs{constructor(e){super(e),this.useMatch=e=>qs({...e,from:this.id}),this.useRouteContext=e=>$s({...e,from:this.id}),this.useSearch=e=>Zs({...e,from:this.id}),this.useParams=e=>Xs({...e,from:this.id}),this.useLoaderDeps=e=>Ys({...e,from:this.id}),this.useLoaderData=e=>Js({...e,from:this.id}),this.useNavigate=()=>Qs({from:this.fullPath}),this.Link=Q.forwardRef((e,t)=>(0,ec.jsx)(mc,{ref:t,from:this.fullPath,...e}))}};function _c(e){return new gc(e)}var vc=class extends gs{constructor(e){super(e),this.useMatch=e=>qs({...e,from:this.id}),this.useRouteContext=e=>$s({...e,from:this.id}),this.useSearch=e=>Zs({...e,from:this.id}),this.useParams=e=>Xs({...e,from:this.id}),this.useLoaderDeps=e=>Ys({...e,from:this.id}),this.useLoaderData=e=>Js({...e,from:this.id}),this.useNavigate=()=>Qs({from:this.fullPath}),this.Link=Q.forwardRef((e,t)=>(0,ec.jsx)(mc,{ref:t,from:this.fullPath,...e}))}};function yc(e){return new vc(e)}function bc(e){return e=>{let t=_c(e);return t.isRoot=!1,t}}function xc(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(te(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(ks)ks(a());else throw a()}return Q.createElement(r,e)};return o.preload=a,o}function Sc(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Cc(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];Sc(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];Sc(i)&&(n[i]=t[i])}}return n}function wc(e){return e?Cc(e,void 0):Object.create(null)}var Tc=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},$=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>$(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=$(void 0,{...n,middleware:t});return r[m]=!0,r},validator:e=>$(void 0,{...n,validator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],jc(i)];return t.method=n.method,Object.assign(async e=>{let n=await Oc(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:wc()});if(`error`in n)throw S(n.error)??n.error;return n.result},{...t,method:n.method,__executeServer:void 0})}})};function Ec(e,t){return e===void 0&&t===void 0?void 0:Cc(e,t)}function Dc(e,t){return e||t?Go(e,t):void 0}async function Oc(e,t,n){let r=kc((_()?.functionMiddleware||[]).concat(e),void 0,t===`server`?new Set(Tc({throwIfNotFound:!1})?.executedRequestMiddlewares):void 0),i=0,a=async(e,n)=>{let o=e;n!==void 0&&(o={...e,...n},o.context=Cc(e.context,n.context),o.sendContext=Ec(e.sendContext,n.sendContext),o.headers=Dc(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 Ac(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||wc(),_callSiteFetch:n.fetch};o.sendContext!==void 0&&(o.sendContext||={});try{return await a(o)}catch(e){return{...o,error:e}}}function kc(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 Ac(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 jc(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 Mc=$({method:`GET`}).handler(Z(`1edaae661b4968edee65ebb4a946e246107684704b784b6359bf9af2dfaae23f`)),Nc=$({method:`GET`}).handler(Z(`949e1fa91e479f6ad9193caee7087c38ca21191786f4b2c082ea643cbd30dec1`)),Pc=$({method:`POST`}).handler(Z(`a9edf8f42685a06ce282bb7c9f888e3ae39636f350a90750c31a47b27de7dca8`)),Fc=$({method:`POST`}).handler(Z(`fd40d9026eb7d8fb5ab200daaed9a58f1d7b4eaf5b1ccab3e4cef9b0fedd9bc4`)),Ic=$({method:`GET`}).handler(Z(`9354c2231554471ec5cde4e9a07b2e32662a8ce0bf29b09b5b930359d374f862`)),Lc=$({method:`GET`}).handler(Z(`86933afdbcaa1be4a0aa07c4f8e690fdd684edbeab02a49ffdb73e85cadf9933`)),Rc=$({method:`POST`}).handler(Z(`c263ee8bf14396211aeb95bc2b2aec914480b38cc99a9024c1319f932f590f2f`)),zc=$({method:`GET`}).handler(Z(`e97a9c2b8715ff5e25a9629262b594fb42f11853d6eea78b87305fd0b5155d4d`)),Bc=$({method:`POST`}).handler(Z(`0c2f8fcb35c5e356e4a58fce376bb16efb0e006f519592fdd5f120fa868720cd`)),Vc=$({method:`POST`}).handler(Z(`950c0a9412e17ae8308bccd862dee5faea0375153c5ce59491a033dbcb7e7181`)),Hc=$({method:`POST`}).handler(Z(`7028d75aed3e58a91f5f26a3821d0cec6bb478a913058f5aa73cbfb64bbc41d3`)),Uc=$({method:`POST`}).handler(Z(`a1b47d616a31acc3132c1bb8258bde961d9c419ff91b2ce1d6479ebb9760b393`)),Wc=$({method:`GET`}).handler(Z(`8ff7e08627330b1c64257ee12b7ed04815853cb3735a9324805c0bcf149bae9f`)),Gc=$({method:`POST`}).handler(Z(`0dcf3aa141898f7bb0cefed3e6129613f6226a680cc800b8cb18d2c60b7706fa`)),Kc=$({method:`POST`}).handler(Z(`b4629be951e5766734fb72f9e1400c19f585a4381d9172539b2512ae5056f4e8`)),qc=$({method:`POST`}).handler(Z(`51bfd02b4d1772943ec480c2dcd7b445826bcfa7d494453d269cc82644ea2a42`)),Jc=$({method:`POST`}).handler(Z(`2727b9721f5d291dbb62652d2de5cff55fd7871756147d8ce441b03a7a494617`)),Yc=$({method:`GET`}).handler(Z(`8e8646e3fd8b630ba5696313fb01543dc62410ff8fa9b1eea9763286d32c8927`)),Xc=$({method:`POST`}).handler(Z(`2598559c204c178bf26b98a0f3ae20e519cec3b9013f9d9b02ce14b170ada220`)),Zc=`modulepreload`,Qc=function(e){return`/`+e},$c={},el=function(e){return e.pathname.endsWith(`.css`)},tl=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},nl=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=Qc(t,n);let r=s(t),i=el(r);return tl($c,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`:Zc,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)})};export{s as $,Ns as A,_t as B,yc as C,Vs as D,Ws as E,tn as F,ue as G,pt as H,Ln as I,y as J,D as K,zt as L,ks as M,As as N,Is as O,Z as P,o as Q,Pt as R,bc as S,Qs as T,N as U,vt as V,j as W,p as X,v as Y,d as Z,Bc as _,Nc as a,Rc as b,zc as c,Xc as d,l as et,Pc as f,Vc as g,Uc as h,Lc as i,Ms as j,Ps as k,Wc as l,Jc as m,Kc as n,Ic as o,Fc as p,b as q,Yc as r,Mc as s,nl as t,Gc as u,Hc as v,mc as w,xc as x,qc as y,Ft as z};
@@ -1 +0,0 @@
1
- import{T as e,Z as t,_ as n,et as r,g as i,h as a,j as o,k as s,v as c}from"./preload-helper-Dscj_TcA.js";import{t as l}from"./ui-C0HGOza2.js";import{i as u}from"./index-Bfb2UOzB.js";var d=r(t()),f=o(),p=[30,60,90,180,365];function m(){let{apps:t,settings:r}=u.useLoaderData(),i=e({from:u.fullPath}),o=s(),[c,m]=(0,d.useState)(String(r?.retentionDays??60)),[g,_]=(0,d.useState)(null),[v,y]=(0,d.useState)(!1);if(!r)return(0,f.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 b=r.writer!==`none`,x=Number(c),S=Number.isInteger(x)&&x!==r.retentionDays,C=async()=>{y(!0),_(null);let e=await n({data:{app:r.app,retentionDays:x}}).catch(e=>({ok:!1,error:e.message}));if(y(!1),!e.ok)return _({tone:`error`,text:e.error});_({tone:`ok`,text:`Saved. New events are kept for ${x} days, starting within about a minute.`}),await o.invalidate()},w=async()=>{y(!0);let e,t=0;try{do{let n=await a({data:{app:r.app,cursor:e}});if(!n.ok)throw Error(n.error);t+=n.updated,e=n.cursor,_({tone:`info`,text:`Updating existing events… ${t.toLocaleString()} so far`})}while(e);_({tone:`ok`,text:`Done: ${t.toLocaleString()} existing events now expire ${r.retentionDays} days after they arrived.`})}catch(e){_({tone:`error`,text:`Stopped after ${t.toLocaleString()} events: ${e.message}`})}y(!1)};return(0,f.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,f.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted`,children:`Settings`}),(0,f.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:r.app})]}),t.length>1&&(0,f.jsx)(`select`,{"aria-label":`App`,value:r.app,onChange:e=>i({search:{app:e.target.value}}),className:`rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,children:t.map(e=>(0,f.jsx)(`option`,{children:e},e))})]}),(0,f.jsxs)(l,{title:`Data retention`,subtitle:`Your data lives in your own database, so you decide how long to keep it.`,children:[(0,f.jsxs)(`dl`,{className:`grid gap-3 text-sm sm:grid-cols-2`,children:[(0,f.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,f.jsx)(`dt`,{className:`text-xs text-muted`,children:`Raw events (stack traces, breadcrumbs, context)`}),(0,f.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:r.retentionDays?`${r.retentionDays} days`:`Unknown`}),(0,f.jsx)(`dd`,{className:`text-xs text-muted`,children:r.source===`setting`?`Set here${r.updatedAt?` on ${new Date(r.updatedAt).toLocaleDateString(`en-GB`)}`:``}`:r.source==="default"?`The default chosen at setup`:`Not reported by this deployment`})]}),(0,f.jsxs)(`div`,{className:`rounded-lg border border-line p-3`,children:[(0,f.jsx)(`dt`,{className:`text-xs text-muted`,children:`Counts, issues and release health`}),(0,f.jsx)(`dd`,{className:`mt-1 text-lg font-semibold`,children:`Forever`}),(0,f.jsx)(`dd`,{className:`text-xs text-muted`,children:`Charts and trends cover any date range`})]})]}),b?(0,f.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:e=>{e.preventDefault(),S&&C()},children:[(0,f.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`days`,children:`Keep raw events for`}),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[p.map(e=>(0,f.jsxs)(`button`,{type:`button`,onClick:()=>m(String(e)),className:`rounded-md border px-3 py-1.5 text-sm ${Number(c)===e?`border-accent bg-accent-soft text-accent`:`border-line hover:bg-panel-2`}`,children:[e,` days`]},e)),(0,f.jsx)(`input`,{id:`days`,type:`number`,min:1,max:3650,value:c,onChange:e=>m(e.target.value),className:`w-24 rounded-md border border-line bg-panel px-2 py-1.5 text-sm`,"aria-label":`Days`}),(0,f.jsx)(`button`,{type:`submit`,disabled:!S||v,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save`})]}),(0,f.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,f.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:r.note}),r.note&&b&&(0,f.jsx)(`p`,{className:`mt-2 text-xs text-sev-high`,children:r.note})]}),b&&(0,f.jsxs)(l,{title:`Existing events`,subtitle:`Events already stored keep the expiry they arrived with.`,children:[(0,f.jsxs)(`p`,{className:`text-sm`,children:[`Give every stored event an expiry based on the current setting (`,r.retentionDays,` days after it arrived). This costs one database write per event.`]}),(0,f.jsx)(`button`,{type:`button`,onClick:()=>void w(),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`})]}),b&&(0,f.jsx)(h,{settings:r,onStatus:_},r.app+(r.updatedAt??``)),g&&(0,f.jsx)(`p`,{role:`status`,className:`rounded-lg border px-3 py-2 text-sm ${g.tone===`error`?`border-sev-critical text-sev-critical`:g.tone===`ok`?`border-line bg-panel-2`:`border-line text-muted`}`,children:g.text})]})}function h({settings:e,onStatus:t}){let n=s(),[r,a]=(0,d.useState)(e.criticalFlows.join(`, `)),[o,u]=(0,d.useState)(e.alerts.slackWebhookUrl??``),[p,m]=(0,d.useState)(e.alerts.newIssues!==!1),[h,g]=(0,d.useState)(e.alerts.regressions!==!1),[_,v]=(0,d.useState)(e.alerts.onlyCriticalFlows===!0),[y,b]=(0,d.useState)(e.alerts.dashboardUrl??(typeof window<`u`?window.location.origin:``)),[x,S]=(0,d.useState)(!1),C=async()=>{S(!0),t(null);let a=await i({data:{app:e.app,criticalFlows:r.split(/[\s,]+/).filter(Boolean),alerts:{slackWebhookUrl:o,newIssues:p,regressions:h,onlyCriticalFlows:_,dashboardUrl:y}}}).catch(e=>({ok:!1,error:e.message}));if(S(!1),!a.ok)return t({tone:`error`,text:a.error});t({tone:`ok`,text:`Saved. Alerts and critical flows apply within about a minute.`}),await n.invalidate()},w=async()=>{S(!0);let n=await c({data:{app:e.app}}).catch(e=>({ok:!1,error:e.message}));S(!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,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(l,{title:`Critical flows`,subtitle:`Issues in these flows rank one severity level higher, and can be the only ones that alert.`,children:[(0,f.jsx)(`label`,{className:`block text-sm font-medium`,htmlFor:`flows`,children:`Flows, separated by commas`}),(0,f.jsx)(`input`,{id:`flows`,value:r,onChange:e=>a(e.target.value),placeholder:`checkout.payment, auth.login`,className:`mt-2 w-full ${T}`})]}),(0,f.jsx)(l,{title:`Slack alerts`,subtitle:`Your ingest function posts to Slack when an issue first appears or comes back after being resolved.`,children:(0,f.jsxs)(`div`,{className:`space-y-3 text-sm`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`label`,{className:`block font-medium`,htmlFor:`hook`,children:`Incoming webhook URL`}),(0,f.jsx)(`input`,{id:`hook`,value:o,onChange:e=>u(e.target.value),placeholder:`https://hooks.slack.com/services/…`,className:`mt-2 w-full font-mono ${T}`}),(0,f.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,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` New issues`]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),` Regressions`]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),` Only for critical flows`]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`label`,{className:`block font-medium`,htmlFor:`dash-url`,children:`Dashboard address, for links in alerts`}),(0,f.jsx)(`input`,{id:`dash-url`,value:y,onChange:e=>b(e.target.value),className:`mt-2 w-full ${T}`})]})]})}),(0,f.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,f.jsx)(`button`,{type:`button`,onClick:()=>void C(),disabled:x,className:`rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white disabled:opacity-40`,children:`Save flows and alerts`}),e.alerts.slackWebhookUrl&&e.writer===`admin`&&(0,f.jsx)(`button`,{type:`button`,onClick:()=>void w(),disabled:x,className:`rounded-md border border-line px-3 py-1.5 text-sm hover:bg-panel-2 disabled:opacity-40`,children:`Send a test alert`})]})]})}export{m as component};
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:0}.-left-\[5px\]{left:-5px}.z-10{z-index:10}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1{margin-left:var(--spacing)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-screen{min-height:100vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[220px\]{max-width:220px}.max-w-\[420px\]{max-width:420px}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\[420px\]{min-width:420px}.min-w-\[600px\]{min-width:600px}.min-w-\[640px\]{min-width:640px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent{border-color:var(--accent)}.border-line{border-color:var(--border)}.border-sev-critical{border-color:var(--sev-critical)}.bg-\[var\(--chart-errors\)\]{background-color:var(--chart-errors)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-bg,.bg-bg\/90{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-bg\/90{background-color:color-mix(in oklab, var(--bg) 90%, transparent)}}.bg-ink{background-color:var(--text)}.bg-line{background-color:var(--border)}.bg-panel{background-color:var(--panel)}.bg-panel-2{background-color:var(--panel-2)}.bg-sev-critical{background-color:var(--sev-critical)}.bg-sev-high{background-color:var(--sev-high)}.bg-sev-medium{background-color:var(--sev-medium)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-16{padding-block:calc(var(--spacing) * 16)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[15px\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-bg{color:var(--bg)}.text-black{color:var(--color-black)}.text-ink,.text-ink\/80{color:var(--text)}@supports (color:color-mix(in lab, red, red)){.text-ink\/80{color:color-mix(in oklab, var(--text) 80%, transparent)}}.text-ink\/90{color:var(--text)}@supports (color:color-mix(in lab, red, red)){.text-ink\/90{color:color-mix(in oklab, var(--text) 90%, transparent)}}.text-muted{color:var(--muted)}.text-sev-critical{color:var(--sev-critical)}.text-sev-high{color:var(--sev-high)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-70{opacity:.7}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );backdrop-filter:var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, )}.outline-none{--tw-outline-style:none;outline-style:none}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:bg-panel-2:hover{background-color:var(--panel-2)}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-ink:hover{color:var(--text)}}.focus\:border-accent:focus{border-color:var(--accent)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=40rem){.sm\:mx-0{margin-inline:0}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}}:root{--bg:#f7f7f5;--panel:#fff;--panel-2:#f1f1ee;--border:#e4e3de;--text:#1c1c1a;--muted:#6b6a64;--accent:#2f5cf2;--accent-soft:#e8edff;--sev-critical:#d1242f;--sev-high:#e2701b;--sev-medium:#c99a06;--sev-low:#8a8a84;--chart-errors:#d1242f;--chart-events:#9aa4bf;--chart-grid:#ebeae6;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#111110;--panel:#1a1a19;--panel-2:#222220;--border:#2e2e2b;--text:#ededea;--muted:#9b9a93;--accent:#7d9bff;--accent-soft:#1f2a4d;--sev-critical:#ff6b6b;--sev-high:#ff9d4d;--sev-medium:#f0c540;--sev-low:#8a8a84;--chart-errors:#ff6b6b;--chart-events:#5d6680;--chart-grid:#2a2a27;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}html,body{background:var(--bg);color:var(--text)}body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased}.tabular{font-variant-numeric:tabular-nums}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
@@ -1 +0,0 @@
1
- import{Z as e,et as t,j as n,k as r,m as i,n as a,u as o,y as s}from"./preload-helper-Dscj_TcA.js";import{c,t as l}from"./ui-C0HGOza2.js";import{r as u}from"./index-Bfb2UOzB.js";var d=t(e()),f=n(),p={owner:`everything, including owners`,admin:`settings and the team, except owners`,member:`sees everything, changes issue status`};function m(){let e=u.useLoaderData(),t=r(),[n,m]=(0,d.useState)(`member`),[h,g]=(0,d.useState)(``),[_,v]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(!1),C=e.canManage&&e.canWrite,w=async(e,n)=>{S(!0),b(null);let r=await e().catch(e=>({ok:!1,error:e.message}));if(S(!1),!r.ok)return b({tone:`error`,text:r.error??`That didn't work.`});b({tone:`ok`,text:n}),await t.invalidate()};return(0,f.jsxs)(`main`,{className:`mx-auto max-w-3xl space-y-5 px-4 py-6 sm:px-6`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h1`,{className:`text-xl font-semibold`,children:`Team`}),(0,f.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:`Everyone who can sign in to this dashboard. Invite people with a link; nothing is emailed.`})]}),C&&(0,f.jsxs)(l,{title:`Invite someone`,subtitle:`The link works once and expires in 7 days.`,children:[(0,f.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),S(!0),b(null),v(null);let r=await o({data:{role:n,email:h.trim()||void 0}}).catch(e=>({ok:!1,error:e.message}));if(S(!1),!r.ok)return b({tone:`error`,text:r.error});v({url:`${window.location.origin}/invite/${r.token}`,expiresAt:r.expiresAt,email:h.trim()||void 0}),g(``),await t.invalidate()},className:`flex flex-wrap items-end gap-3`,children:[(0,f.jsxs)(`label`,{className:`min-w-0 flex-1 text-sm`,children:[(0,f.jsx)(`span`,{className:`font-medium`,children:`Email (optional)`}),(0,f.jsx)(`input`,{type:`email`,value:h,onChange:e=>g(e.target.value),placeholder:`Only this person can use the link`,className:`mt-1 w-full rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-accent`})]}),(0,f.jsxs)(`label`,{className:`text-sm`,children:[(0,f.jsx)(`span`,{className:`font-medium`,children:`Role`}),(0,f.jsx)(`select`,{value:n,onChange:e=>m(e.target.value),className:`mt-1 block rounded-md border border-line bg-bg px-3 py-2 text-sm`,children:(e.me.role===`owner`?[`member`,`admin`,`owner`]:[`member`,`admin`]).map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))})]}),(0,f.jsx)(`button`,{disabled:x,className:`rounded-md bg-ink px-3 py-2 text-sm font-medium text-bg disabled:opacity-60`,children:`Create invite link`})]}),(0,f.jsxs)(`p`,{className:`mt-2 text-xs text-muted`,children:[n,`: `,p[n],`.`]}),_&&(0,f.jsxs)(`div`,{className:`mt-4 rounded-md border border-accent bg-accent-soft p-3 text-sm`,children:[(0,f.jsxs)(`p`,{className:`font-medium`,children:[`Send this link`,_.email?` to ${_.email}`:``,`. It's shown only now.`]}),(0,f.jsxs)(`div`,{className:`mt-2 flex min-w-0 gap-2`,children:[(0,f.jsx)(`input`,{readOnly:!0,value:_.url,"aria-label":`Invite link`,onFocus:e=>e.currentTarget.select(),className:`min-w-0 flex-1 rounded-md border border-line bg-bg px-2 py-1.5 font-mono text-xs`}),(0,f.jsx)(`button`,{type:`button`,className:`rounded-md border border-line bg-bg px-2.5 py-1 text-xs hover:bg-panel-2`,onClick:()=>navigator.clipboard?.writeText(_.url).then(()=>b({tone:`ok`,text:`Link copied.`})),children:`Copy`})]})]})]}),e.note&&(0,f.jsx)(`p`,{className:`text-sm text-muted`,children:e.note}),y&&(0,f.jsx)(`p`,{role:y.tone===`error`?`alert`:`status`,className:`text-sm ${y.tone===`error`?`text-sev-critical`:`text-ink`}`,children:y.text}),(0,f.jsx)(l,{title:`Members`,subtitle:`${e.members.length} ${e.members.length===1?`person`:`people`}`,children:(0,f.jsx)(`ul`,{className:`divide-y divide-line`,children:e.members.map(t=>{let n=t.email===e.me.email,r=C&&t.source===`team`&&!n&&(e.me.role===`owner`||t.role!==`owner`);return(0,f.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 py-3`,children:[(0,f.jsxs)(`div`,{className:`min-w-0`,children:[(0,f.jsxs)(`p`,{className:`truncate text-sm font-medium`,children:[t.name?`${t.name} · `:``,t.email,n?` (you)`:``]}),(0,f.jsx)(`p`,{className:`text-xs text-muted`,children:t.source===`env`?`Set up with npx debugkit init`:`Joined ${t.createdAt?c(t.createdAt):``}${t.invitedBy?`, invited by ${t.invitedBy}`:``}`})]}),(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r?(0,f.jsx)(`select`,{"aria-label":`Role for ${t.email}`,value:t.role,disabled:x,className:`rounded-md border border-line bg-bg px-2 py-1 text-sm`,onChange:e=>w(()=>s({data:{email:t.email,role:e.target.value}}),`${t.email} is now ${e.target.value}.`),children:(e.me.role===`owner`?[`member`,`admin`,`owner`]:[`member`,`admin`]).map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))}):(0,f.jsx)(`span`,{className:`rounded-full border border-line px-2 py-0.5 text-xs`,children:t.role}),r&&(0,f.jsx)(`button`,{disabled:x,className:`rounded-md border border-line px-2.5 py-1 text-xs text-sev-critical hover:bg-panel-2`,onClick:()=>confirm(`Remove ${t.email}? They're signed out right away.`)&&w(()=>i({data:{email:t.email}}),`${t.email} no longer has access.`),children:`Remove`})]})]},t.email)})})}),e.invites.length>0&&(0,f.jsx)(l,{title:`Pending invites`,children:(0,f.jsx)(`ul`,{className:`divide-y divide-line`,children:e.invites.map(t=>(0,f.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2 py-3 text-sm`,children:[(0,f.jsxs)(`span`,{className:`min-w-0`,children:[(0,f.jsx)(`b`,{children:t.role}),` `,t.email?`for ${t.email}`:`for anyone with the link`,` · by `,t.invitedBy,` · expires `,new Date(t.expiresAt).toLocaleDateString()]}),C&&(e.me.role===`owner`||t.role!==`owner`)&&(0,f.jsx)(`button`,{disabled:x,className:`rounded-md border border-line px-2.5 py-1 text-xs hover:bg-panel-2`,onClick:()=>w(()=>a({data:{id:t.id}}),`Invite cancelled.`),children:`Cancel`})]},t.id))})})]})}export{m as component};
@@ -1 +0,0 @@
1
- import{j as e}from"./preload-helper-Dscj_TcA.js";var t=e();function n(){return(0,t.jsxs)(`span`,{className:`inline-flex items-center gap-2 font-semibold tracking-tight`,children:[(0,t.jsx)(`span`,{className:`grid h-7 w-7 place-items-center rounded-md bg-sev-critical text-[11px] font-bold text-white`,children:`dB`}),(0,t.jsxs)(`span`,{children:[`de`,(0,t.jsx)(`span`,{className:`text-sev-critical`,children:`Bug`})]})]})}var r={critical:`bg-sev-critical text-white`,high:`bg-sev-high text-white`,medium:`bg-sev-medium text-black`,low:`bg-panel-2 text-muted border border-line`};function i({severity:e}){return(0,t.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${r[e]}`,children:e})}function a({title:e,subtitle:n,children:r,right:i}){return(0,t.jsxs)(`section`,{className:`min-w-0 rounded-xl border border-line bg-panel p-4 sm:p-5`,children:[(0,t.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,t.jsxs)(`div`,{children:[(0,t.jsx)(`h2`,{className:`text-sm font-semibold`,children:e}),n&&(0,t.jsx)(`p`,{className:`mt-0.5 text-xs text-muted`,children:n})]}),i]}),r]})}function o({label:e,value:n,hint:r,tone:i}){return(0,t.jsxs)(`div`,{className:`rounded-xl border border-line bg-panel p-4`,children:[(0,t.jsx)(`div`,{className:`text-xs text-muted`,children:e}),(0,t.jsx)(`div`,{className:`tabular mt-1 text-2xl font-semibold ${i===`critical`?`text-sev-critical`:i===`high`?`text-sev-high`:`text-ink`}`,children:n}),r&&(0,t.jsx)(`div`,{className:`mt-1 text-xs text-muted`,children:r})]})}function s({columns:e,rows:n}){return(0,t.jsxs)(`details`,{className:`mt-3 text-xs`,children:[(0,t.jsx)(`summary`,{className:`cursor-pointer text-muted hover:text-ink`,children:`View data`}),(0,t.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto rounded-md border border-line`,children:(0,t.jsxs)(`table`,{className:`tabular w-full text-left`,children:[(0,t.jsx)(`thead`,{className:`sticky top-0 bg-panel-2`,children:(0,t.jsx)(`tr`,{children:e.map(e=>(0,t.jsx)(`th`,{className:`px-2 py-1 font-medium`,children:e},e))})}),(0,t.jsx)(`tbody`,{children:n.map((e,n)=>(0,t.jsx)(`tr`,{className:`border-t border-line`,children:e.map((e,n)=>(0,t.jsx)(`td`,{className:`px-2 py-1`,children:e},n))},n))})]})})]})}function c({rows:e,total:n}){let r=n??e.reduce((e,t)=>e+t.value,0);return e.length?(0,t.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let n=r?e.value/r:0;return(0,t.jsxs)(`li`,{children:[(0,t.jsxs)(`div`,{className:`flex justify-between gap-2 text-xs`,children:[(0,t.jsx)(`span`,{className:`truncate`,children:e.key}),(0,t.jsxs)(`span`,{className:`tabular shrink-0 text-muted`,children:[e.value.toLocaleString(),` · `,Math.round(n*100),`%`]})]}),(0,t.jsx)(`div`,{className:`mt-1 h-1.5 rounded-full bg-panel-2`,children:(0,t.jsx)(`div`,{className:`h-1.5 rounded-full bg-[var(--chart-errors)]`,style:{width:`${Math.max(2,n*100)}%`}})})]},e.key)})}):(0,t.jsx)(`p`,{className:`text-xs text-muted`,children:`No data.`})}function l(e,t=Date.now()){let n=Math.max(0,Math.round((t-Date.parse(e))/1e3));return n<60?`${n}s ago`:n<3600?`${Math.round(n/60)}m ago`:n<86400?`${Math.round(n/3600)}h ago`:`${Math.round(n/86400)}d ago`}function u({issue:e}){let n=`mt-1 mr-1 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide`;return(0,t.jsxs)(t.Fragment,{children:[e.status===`regressed`&&(0,t.jsxs)(`span`,{className:`${n} bg-sev-critical text-white`,children:[`Regressed`,e.resolvedIn?` after ${e.resolvedIn}`:``]}),e.newInLatest&&(0,t.jsxs)(`span`,{className:`${n} bg-accent-soft text-accent`,children:[`New in `,e.firstVersion]}),e.status===`resolved`&&(0,t.jsxs)(`span`,{className:`${n} border border-line text-muted`,children:[`Resolved`,e.resolvedIn?` in ${e.resolvedIn}`:``]}),e.status===`ignored`&&(0,t.jsx)(`span`,{className:`${n} border border-line text-muted`,children:`Ignored`})]})}export{i as a,l as c,n as i,s as n,c as o,u as r,o as s,a as t};
@@ -1,73 +0,0 @@
1
- import { i as Logo } from "./ui-BJokJdYa.js";
2
- import { f as logout } from "./fns-DwGaMi8S.js";
3
- import { c as Route } from "./router-G99085_Q.js";
4
- import { Link, Outlet, useRouter } from "@tanstack/react-router";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- // src/routes/_authed.tsx?tsr-split=component
7
- function Layout() {
8
- const { user } = Route.useRouteContext();
9
- const router = useRouter();
10
- return /* @__PURE__ */ jsxs("div", {
11
- className: "min-h-screen",
12
- children: [/* @__PURE__ */ jsx("header", {
13
- className: "sticky top-0 z-10 border-b border-line bg-bg/90 backdrop-blur",
14
- children: /* @__PURE__ */ jsxs("div", {
15
- className: "mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3 sm:px-6",
16
- children: [/* @__PURE__ */ jsxs("div", {
17
- className: "flex items-center gap-5",
18
- children: [/* @__PURE__ */ jsx(Link, {
19
- to: "/",
20
- search: {},
21
- className: "shrink-0",
22
- children: /* @__PURE__ */ jsx(Logo, {})
23
- }), /* @__PURE__ */ jsxs("nav", {
24
- className: "flex items-center gap-3 text-sm",
25
- "aria-label": "Main",
26
- children: [
27
- /* @__PURE__ */ jsx(Link, {
28
- to: "/",
29
- search: {},
30
- className: "text-muted hover:text-ink",
31
- activeProps: { className: "font-medium text-ink" },
32
- activeOptions: { exact: true },
33
- children: "Overview"
34
- }),
35
- /* @__PURE__ */ jsx(Link, {
36
- to: "/settings",
37
- search: {},
38
- className: "text-muted hover:text-ink",
39
- activeProps: { className: "font-medium text-ink" },
40
- children: "Settings"
41
- }),
42
- /* @__PURE__ */ jsx(Link, {
43
- to: "/team",
44
- className: "text-muted hover:text-ink",
45
- activeProps: { className: "font-medium text-ink" },
46
- children: "Team"
47
- })
48
- ]
49
- })]
50
- }), /* @__PURE__ */ jsxs("div", {
51
- className: "flex items-center gap-3 text-sm",
52
- children: [/* @__PURE__ */ jsxs("span", {
53
- className: "hidden text-muted sm:inline",
54
- children: [
55
- user.email,
56
- " · ",
57
- user.role
58
- ]
59
- }), /* @__PURE__ */ jsx("button", {
60
- className: "rounded-md border border-line px-2.5 py-1 hover:bg-panel-2",
61
- onClick: async () => {
62
- await logout();
63
- await router.invalidate();
64
- await router.navigate({ to: "/login" });
65
- },
66
- children: "Sign out"
67
- })]
68
- })]
69
- })
70
- }), /* @__PURE__ */ jsx(Outlet, {})]
71
- });
72
- }
73
- export { Layout as component };
@@ -1,61 +0,0 @@
1
- // \0tanstack-start-manifest:v
2
- var tsrStartManifest = () => ({ routes: {
3
- __root__: {
4
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/__root.tsx",
5
- children: [
6
- "/_authed",
7
- "/login",
8
- "/api/ingest",
9
- "/api/summary",
10
- "/invite/$token",
11
- "/api/issues/$fingerprint"
12
- ],
13
- preloads: ["/assets/index-Bfb2UOzB.js", "/assets/preload-helper-Dscj_TcA.js"],
14
- scripts: [{ attrs: {
15
- type: "module",
16
- async: !0,
17
- src: "/assets/index-Bfb2UOzB.js"
18
- } }]
19
- },
20
- "/_authed": {
21
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed.tsx",
22
- children: [
23
- "/_authed/settings",
24
- "/_authed/team",
25
- "/_authed/",
26
- "/_authed/issues/$fingerprint"
27
- ],
28
- preloads: ["/assets/_authed-BN39b-7H.js", "/assets/ui-C0HGOza2.js"]
29
- },
30
- "/login": {
31
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/login.tsx",
32
- children: void 0,
33
- preloads: ["/assets/login-COlvJ5Je.js", "/assets/ui-C0HGOza2.js"]
34
- },
35
- "/_authed/settings": {
36
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/settings.tsx",
37
- children: void 0,
38
- preloads: ["/assets/settings-Dl4EWeWC.js"]
39
- },
40
- "/_authed/team": {
41
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/team.tsx",
42
- children: void 0,
43
- preloads: ["/assets/team-7Zekz_Er.js"]
44
- },
45
- "/invite/$token": {
46
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/invite.$token.tsx",
47
- children: void 0,
48
- preloads: ["/assets/invite._token-B4HN51-h.js", "/assets/ui-C0HGOza2.js"]
49
- },
50
- "/_authed/": {
51
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/index.tsx",
52
- children: void 0,
53
- preloads: ["/assets/_authed-CspAf0jN.js", "/assets/charts-XyOWJI9T.js"]
54
- },
55
- "/_authed/issues/$fingerprint": {
56
- filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/issues.$fingerprint.tsx",
57
- children: void 0,
58
- preloads: ["/assets/issues._fingerprint-BV1QrETY.js", "/assets/charts-XyOWJI9T.js"]
59
- }
60
- } });
61
- export { tsrStartManifest };