@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.4

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 (126) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/InsightsPageHeader-C-Xc2MB9.js +1 -0
  3. package/.output/public/assets/api-keys-C1sgC6ko.js +1 -0
  4. package/.output/public/assets/{api-keys-api-BHcODB7q.js → api-keys-api-LchP65vQ.js} +1 -1
  5. package/.output/public/assets/badge-BuMDU0Rf.js +1 -0
  6. package/.output/public/assets/card-BEvx_QKh.js +1 -0
  7. package/.output/public/assets/{chart-no-axes-combined-Dy4WJv2U.js → chart-no-axes-combined-C0G0fQ3J.js} +1 -1
  8. package/.output/public/assets/{composite-Bp98A0Ld.js → composite-CHTH1Xhh.js} +1 -1
  9. package/.output/public/assets/createServerFn-DHc2erub.js +3 -0
  10. package/.output/public/assets/dialog-dyZ1SphZ.js +1 -0
  11. package/.output/public/assets/{dist-C_NydL0e.js → dist-Bh1gaDfB.js} +1 -1
  12. package/.output/public/assets/field-79SVH26s.js +1 -0
  13. package/.output/public/assets/index-BNkxg4jz.js +10 -0
  14. package/.output/public/assets/input-group-BbHfaBzQ.js +1 -0
  15. package/.output/public/assets/insights-D_7uSKfc.js +1 -0
  16. package/.output/public/assets/installations-BzoHWuXw.js +1 -0
  17. package/.output/public/assets/{installations-CE33wgbY.js → installations-DvjbUqd1.js} +2 -2
  18. package/.output/public/assets/{lazyRouteComponent-Ccp3bwBY.js → lazyRouteComponent-BN0MS05o.js} +1 -1
  19. package/.output/public/assets/{link-CI8idAUi.js → link-BG06whwB.js} +1 -1
  20. package/.output/public/assets/{loader-circle-BoxLrsOu.js → loader-circle-Bbp8LGVC.js} +1 -1
  21. package/.output/public/assets/{refresh-cw-Bqc72UZG.js → refresh-cw-DZgiAOMk.js} +1 -1
  22. package/.output/public/assets/routes-BFE-oRIT.js +1 -0
  23. package/.output/public/assets/{routes-DGVXdzpw.js → routes-DaPMY31P.js} +2 -2
  24. package/.output/public/assets/{shield-check-uK3MHWJZ.js → shield-check-DoIiaaXU.js} +1 -1
  25. package/.output/public/assets/signing-BTRhaF5D.js +1 -0
  26. package/.output/public/assets/styles-C7U0oVke.css +2 -0
  27. package/.output/public/assets/table-BBEzJ7Xl.js +1 -0
  28. package/.output/public/assets/useCompositeListItem-BkPDaqyj.js +42 -0
  29. package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-Dr2ixDgQ.mjs} +40 -32
  30. package/.output/server/_libs/@base-ui/react+[...].mjs +1 -1
  31. package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
  32. package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
  33. package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +1 -1
  34. package/.output/server/_libs/d3-array.mjs +231 -0
  35. package/.output/server/_libs/d3-color.mjs +330 -0
  36. package/.output/server/_libs/d3-format.mjs +252 -0
  37. package/.output/server/_libs/d3-interpolate.mjs +207 -0
  38. package/.output/server/_libs/d3-path.mjs +77 -0
  39. package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
  40. package/.output/server/_libs/d3-shape.mjs +818 -0
  41. package/.output/server/_libs/decimal.js-light.mjs +884 -0
  42. package/.output/server/_libs/es-toolkit.mjs +1159 -0
  43. package/.output/server/_libs/eventemitter3.mjs +236 -0
  44. package/.output/server/_libs/immer.mjs +532 -0
  45. package/.output/server/_libs/lucide-react.mjs +9 -2
  46. package/.output/server/_libs/next-themes.mjs +1 -1
  47. package/.output/server/_libs/react-redux+[...].mjs +205 -0
  48. package/.output/server/_libs/recharts+[...].mjs +15054 -0
  49. package/.output/server/_libs/sonner.mjs +1 -1
  50. package/.output/server/_libs/tanstack__react-query.mjs +1 -1
  51. package/.output/server/_runtime.mjs +10 -1
  52. package/.output/server/_ssr/InsightsPageHeader-C5Has8Ry.mjs +60 -0
  53. package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-DJml_XoK.mjs} +10 -8
  54. package/.output/server/_ssr/{api-keys-api-BUPQVSpk.mjs → api-keys-api-CrCZyvnl.mjs} +2 -2
  55. package/.output/server/_ssr/{api-keys-rpc-Cs7tS5_j.mjs → api-keys-rpc-CFaNf-q0.mjs} +3 -3
  56. package/.output/server/_ssr/{api-rpc-tAupfGQm.mjs → api-rpc-B61KL3Eo.mjs} +25 -25
  57. package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-D_hv52-J.mjs} +4 -4
  58. package/.output/server/_ssr/{auth.server-DW71WzsD.mjs → auth.server-DF_shCeq.mjs} +1 -1
  59. package/.output/server/_ssr/badge-BgsCP9Dp.mjs +28 -0
  60. package/.output/server/_ssr/{bundle-signing-rpc-BhnBw0-d.mjs → bundle-signing-rpc-BBipZnFs.mjs} +2 -2
  61. package/.output/server/_ssr/{bundle-signing.server-C4NW5mWx.mjs → bundle-signing.server-Co_zHdJx.mjs} +1 -1
  62. package/.output/server/_ssr/bundleActivity-D3_fIda2.mjs +27 -0
  63. package/.output/server/_ssr/{card-BRiPmi0C.mjs → card-DrbxCPtG.mjs} +3 -25
  64. package/.output/server/_ssr/chart-qxa-_30a.mjs +162 -0
  65. package/.output/server/_ssr/{config.server-afDuAwaG.mjs → config.server-CBr6PDj5.mjs} +5 -5
  66. package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → createSsrRpc-NHF2PxuK.mjs} +4 -4
  67. package/.output/server/_ssr/{deleteBundle-BTGwBgzx.mjs → deleteBundle-BAq3JuGr.mjs} +1 -1
  68. package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-DUaIgpgd.mjs} +1 -1
  69. package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-B3ert-pY.mjs} +1 -1
  70. package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-CqNUlqUq.mjs} +4 -50
  71. package/.output/server/_ssr/{getBundleChildren-C0vh4ZvE.mjs → getBundleChildren-COMt16m_.mjs} +1 -1
  72. package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-Bb8ueylQ.mjs} +51 -2
  73. package/.output/server/_ssr/insights-B-DUbksX.mjs +502 -0
  74. package/.output/server/_ssr/insights-recovery-DSFM-YTL.mjs +21 -0
  75. package/.output/server/_ssr/insights-recovery-rpc-P71FH66n.mjs +37 -0
  76. package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-DrIQCjpD.mjs} +2 -2
  77. package/.output/server/_ssr/insightsRecovery-CqcosG7B.mjs +149 -0
  78. package/.output/server/_ssr/{installations-CtA59MQG.mjs → installations-BQrppti7.mjs} +2 -2
  79. package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-YumqpNpa.mjs} +426 -11
  80. package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-iP95Vqi2.mjs} +14 -14
  81. package/.output/server/_ssr/{routes-CKrrS2q2.mjs → routes-BDabsmc7.mjs} +2 -2
  82. package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-ivsV2TDu.mjs} +224 -13
  83. package/.output/server/_ssr/{runtime.server-DacU1TBV.mjs → runtime.server-jmZOKIQM.mjs} +1 -1
  84. package/.output/server/_ssr/{server-D_C2rMzf.mjs → server-p7yrVBfD.mjs} +3 -3
  85. package/.output/server/_ssr/{signing-Dz1WkZOf.mjs → signing-CxCbnFCt.mjs} +5 -4
  86. package/.output/server/_ssr/ssr.mjs +1 -1
  87. package/.output/server/_ssr/table-D1mL8fJu.mjs +53 -0
  88. package/.output/server/_tanstack-start-manifest_v-Cwpu0C9Q.mjs +100 -0
  89. package/.output/server/index.mjs +154 -154
  90. package/package.json +3 -3
  91. package/src/components/features/bundles/BundleActivityChart.tsx +95 -0
  92. package/src/components/features/bundles/BundleInsightsSummary.tsx +121 -0
  93. package/src/components/features/insights/InsightsControls.tsx +1 -15
  94. package/src/components/features/insights/InsightsOverview.tsx +368 -179
  95. package/src/components/features/releases/ReleaseEditorSheet.tsx +10 -0
  96. package/src/components/ui/empty.tsx +101 -0
  97. package/src/lib/bundle-activity.ts +21 -0
  98. package/src/lib/insights-recovery-rpc.ts +38 -0
  99. package/src/lib/insights-recovery.ts +59 -0
  100. package/src/lib/server/bundleActivity.ts +37 -0
  101. package/src/lib/server/insightsHistory.ts +52 -0
  102. package/src/lib/server/insightsRecovery.ts +186 -0
  103. package/src/routes/index.tsx +33 -3
  104. package/src/routes/insights.tsx +1 -42
  105. package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
  106. package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
  107. package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
  108. package/.output/public/assets/card-Dhr_eFYj.js +0 -1
  109. package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
  110. package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
  111. package/.output/public/assets/index-DdAz-CXv.js +0 -10
  112. package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
  113. package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
  114. package/.output/public/assets/installations-CStZja8x.js +0 -1
  115. package/.output/public/assets/routes-DTlwOr8I.js +0 -1
  116. package/.output/public/assets/signing-CMf4aqDO.js +0 -1
  117. package/.output/public/assets/styles-BCvbtKsm.css +0 -2
  118. package/.output/public/assets/table-2vcV89QB.js +0 -1
  119. package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
  120. package/.output/public/assets/x-DCd0j8c6.js +0 -1
  121. package/.output/server/_ssr/HashValueDisplay-DwpGLfrl.mjs +0 -55
  122. package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
  123. package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
  124. package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
  125. package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
  126. /package/.output/public/assets/{preload-helper-CQ36nxok.js → preload-helper-uTix4PVD.js} +0 -0
@@ -0,0 +1 @@
1
+ import{C as e,Cn as t,En as n,Gn as r,In as i,Kn as a,Ln as o,Nn as s,Nt as c,Or as l,Pn as u,Qn as d,Rn as f,Sn as p,St as m,Un as h,Vn as g,Wt as _,Yn as v,_t as y,bn as b,gn as x,gt as S,ht as C,jr as w,kr as T,mt as E,nn as D,pt as O,vn as k,vt as A,w as j,wn as M,xn as N,xt as ee,yn as P,yt as te}from"./createServerFn-DHc2erub.js";import{t as F}from"./link-BG06whwB.js";import{n as I,r as L,t as ne}from"./InsightsPageHeader-C-Xc2MB9.js";import{a as re,i as ie,n as ae,o as oe,t as se}from"./card-BEvx_QKh.js";import{a as R,c as ce,g as le,h as ue,i as de,l as fe,m as pe,n as me,o as he,p as ge,r as _e,t as z,u as ve}from"./composite-CHTH1Xhh.js";import{a as B,i as ye,t as be}from"./field-79SVH26s.js";import{B as xe,C as Se,D as Ce,E as we,G as Te,H as Ee,I as De,K as Oe,N as ke,O as Ae,P as je,Q as Me,S as Ne,T as Pe,U as Fe,V as Ie,W as Le,X as Re,Y as ze,Z as Be,_ as Ve,a as He,at as Ue,b as We,ct as V,d as Ge,et as Ke,f as qe,ft as Je,g as Ye,gt as Xe,h as Ze,ht as Qe,i as $e,it as et,j as tt,k as nt,l as rt,m as it,mt as at,n as ot,nt as st,o as ct,ot as lt,p as ut,pt as H,q as dt,r as ft,st as pt,tt as mt,u as ht,ut as gt,v as _t,vt,w as yt,x as bt,y as xt,z as St}from"./useCompositeListItem-BkPDaqyj.js";var Ct=a(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),wt=T((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}e.isPlainObject=t})),Tt=T(((e,t)=>{t.exports=wt().isPlainObject})),U=w(l()),Et,Dt,Ot,kt,At;function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jt(Object(n),!0).forEach(function(t){Nt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nt(e,t,n){return(t=Pt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pt(e){var t=Ft(e,`string`);return typeof t==`symbol`?t:t+``}function Ft(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function G(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var It=(e,t,n,r,i)=>{var a=n-r,o=H(Et||=G([`M `,`,`,``]),e,t);return o+=H(Dt||=G([`L `,`,`,``]),e+n,t),o+=H(Ot||=G([`L `,`,`,``]),e+n-a/2,t+i),o+=H(kt||=G([`L `,`,`,``]),e+n-a/2-r,t+i),o+=H(At||=G([`L `,`,`,` Z`]),e,t),o},Lt={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Rt=e=>{var t=lt(e,Lt),{x:n,y:r,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:c,animationDuration:l,animationBegin:d,isUpdateAnimationActive:f}=t,p=(0,U.useRef)(null),[m,h]=(0,U.useState)(-1),g=(0,U.useRef)(i),_=(0,U.useRef)(a),v=(0,U.useRef)(o),y=(0,U.useRef)(n),b=(0,U.useRef)(r),x=Ee(e,`trapezoid-`);if((0,U.useEffect)(()=>{if(p.current&&p.current.getTotalLength)try{var e=p.current.getTotalLength();e&&h(e)}catch{}},[]),n!==+n||r!==+r||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var S=u(`recharts-trapezoid`,s);if(!f)return U.createElement(`g`,null,U.createElement(`path`,W({},Qe(t),{className:S,d:It(n,r,i,a,o)})));var C=g.current,w=_.current,T=v.current,E=y.current,D=b.current,O=`0px ${m===-1?1:m}px`,k=`${m}px ${m}px`,A=Le([`strokeDasharray`],l,c);return U.createElement(Fe,{animationId:x,key:x,canBegin:m>0,duration:l,easing:c,isActive:f,begin:d},e=>{var s=V(C,i,e),c=V(w,a,e),l=V(T,o,e),u=V(E,n,e),d=V(D,r,e);p.current&&(g.current=s,_.current=c,v.current=l,y.current=u,b.current=d);var f=e>0?{transition:A,strokeDasharray:k}:{strokeDasharray:O};return U.createElement(`path`,W({},Qe(t),{className:S,d:It(u,d,s,c,l),ref:p,style:Mt(Mt({},f),t.style)}))})},zt=w(Tt()),Bt=[`option`,`shapeType`,`activeClassName`,`inActiveClassName`];function Vt(e,t){if(e==null)return{};var n,r,i=Ht(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ht(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ut(Object(n),!0).forEach(function(t){Wt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wt(e,t,n){return(t=Gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt(e,`string`);return typeof t==`symbol`?t:t+``}function Kt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function qt(e,t){return K(K({},t),e)}function Jt(e,t){return e===`symbols`}function Yt(e){var{shapeType:t,elementProps:n}=e;switch(t){case`rectangle`:return U.createElement(Ie,n);case`trapezoid`:return U.createElement(Rt,n);case`sector`:return U.createElement(xe,n);case`symbols`:if(Jt(t,n))return U.createElement(pt,n);break;case`curve`:return U.createElement(Te,n);default:return null}}function Xt(e){return(0,U.isValidElement)(e)?e.props:e}function Zt(e){var{option:t,shapeType:n,activeClassName:r=`recharts-active-shape`,inActiveClassName:i=`recharts-shape`}=e,a=Vt(e,Bt),o;if((0,U.isValidElement)(t))o=(0,U.cloneElement)(t,K(K({},a),Xt(t)));else if(typeof t==`function`)o=t(a,a.index);else if((0,zt.default)(t)&&typeof t!=`boolean`){var s=qt(t,a);o=U.createElement(Yt,{shapeType:n,elementProps:s})}else{var c=a;o=U.createElement(Yt,{shapeType:n,elementProps:c})}return a.isActive?U.createElement(at,{className:r},o):U.createElement(at,{className:i},o)}var Qt=[`children`];function $t(e,t){if(e==null)return{};var n,r,i=en(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function en(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tn=(0,U.createContext)({data:[],xAxisId:`xAxis-0`,yAxisId:`yAxis-0`,dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function nn(e){var{children:t}=e,n=$t(e,Qt);return U.createElement(tn.Provider,{value:n},t)}var rn=(e,t,n,r)=>tt(e,`xAxis`,t,r),an=(e,t,n,r)=>ke(e,`xAxis`,t,r),on=(e,t,n,r)=>tt(e,`yAxis`,n,r),sn=(e,t,n,r)=>ke(e,`yAxis`,n,r),cn=et([dt,rn,on,an,sn],(e,t,n,r,i)=>st(e,`xAxis`)?Be(t,r,!1):Be(n,i,!1)),ln=(e,t,n,r,i)=>i;function un(e){return e.type===`line`}var dn=et([dt,rn,on,an,sn,et([je,ln],(e,t)=>e.filter(un).find(e=>e.id===t)),cn,St],(e,t,n,r,i,a,o,s)=>{var{chartData:c,dataStartIndex:l,dataEndIndex:u}=s;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var{dataKey:d,data:f}=a,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return In({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),fn=[`id`],pn=[`type`,`layout`,`connectNulls`,`needClip`,`shape`],mn=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(null,arguments)}function hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hn(Object(n),!0).forEach(function(t){gn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gn(e,t,n){return(t=_n(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _n(e){var t=vn(e,`string`);return typeof t==`symbol`?t:t+``}function vn(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yn(e,t){if(e==null)return{};var n,r,i=bn(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function bn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var xn=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Ke(n,t),payload:e}]},Sn=U.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l,id:u}=e,d={dataDefinedOnItem:n,getPosition:Je,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Ke(o,t),hide:s,type:l,color:r,unit:c,graphicalItemId:u}};return U.createElement(yt,{tooltipEntrySettings:d})}),Cn=(e,t)=>`${t}px ${e}px`;function wn(e,t){for(var n=e.length%2==0?e:[...e,0],r=[],i=0;i<t;++i)r.push(...n);return r}var Tn=(e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return Cn(t,e);for(var i=Math.floor(e/r),a=e%r,o=[],s=0,c=0;s<n.length;c+=(l=n[s])??0,++s){var l,u=n[s];if(u!=null&&c+u>a){o=[...n.slice(0,s),a-c];break}}var d=o.length%2==0?[0,t]:[t];return[...wn(n,i),...o,...d].map(e=>`${e}px`).join(`, `)};function En(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:o}=r,{id:s}=r,c=Xe(yn(r,fn));return U.createElement(We,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function Dn(e){var{showLabels:t,children:n,points:r}=e,i=(0,U.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return J(J({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return U.createElement(we,{value:t?i:void 0},n)}function On(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:c,needClip:l,shape:u}=a,d=J(J({},Qe(yn(a,pn))),{},{fill:`none`,className:`recharts-line-curve`,clipPath:l?`url(#clipPath-${t})`:void 0,points:r,type:o,layout:s,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return U.createElement(U.Fragment,null,r?.length>1&&U.createElement(Zt,q({shapeType:`curve`,option:u},d,{pathRef:n})),U.createElement(En,{points:r,clipPathId:t,props:a}))}function kn(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function An(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,_=i.current,v=Ee(o,`recharts-line-`),y=(0,U.useRef)(v),[b,x]=(0,U.useState)(!1),S=!b,C=(0,U.useCallback)(()=>{typeof h==`function`&&h(),x(!1)},[h]),w=(0,U.useCallback)(()=>{typeof g==`function`&&g(),x(!0)},[g]),T=kn(r.current),E=(0,U.useRef)(0);y.current!==v&&(E.current=a.current,y.current=v);var D=E.current;return U.createElement(Dn,{points:o,showLabels:S},n.children,U.createElement(Fe,{animationId:v,begin:l,duration:u,isActive:c,easing:d,onAnimationEnd:C,onAnimationStart:w,key:v},e=>{var l=V(D,T+D,e),u=Math.min(l,T),d=c?s?Tn(u,T,`${s}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):Cn(T,u):s==null?void 0:String(s);if(e>0&&T>0&&(i.current=o,a.current=Math.max(a.current,u)),_){var h=_.length/o.length,g=e===1?o:o.map((t,n)=>{var r=Math.floor(n*h);if(_[r]){var i=_[r];return J(J({},t),{},{x:V(i.x,t.x,e),y:V(i.y,t.y,e)})}return f?J(J({},t),{},{x:V(p*2,t.x,e),y:V(m/2,t.y,e)}):J(J({},t),{},{x:t.x,y:t.y})});return i.current=g,U.createElement(On,{props:n,points:g,clipPathId:t,pathRef:r,strokeDasharray:d})}return U.createElement(On,{props:n,points:o,clipPathId:t,pathRef:r,strokeDasharray:d})}),U.createElement(Ce,{label:n.label}))}function jn(e){var{clipPathId:t,props:n}=e,r=(0,U.useRef)(null),i=(0,U.useRef)(0),a=(0,U.useRef)(null);return U.createElement(An,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:a})}var Mn=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:mt(e.payload,t)}),Nn=class extends U.Component{render(){var{hide:e,dot:t,points:n,className:r,xAxisId:i,yAxisId:a,top:o,left:s,width:c,height:l,id:d,needClip:f,zIndex:p}=this.props;if(e)return null;var m=u(`recharts-line`,r),h=d,{r:g,strokeWidth:_}=it(t),v=Pe(t),y=g*2+_,b=f?`url(#clipPath-${v?``:`dots-`}${h})`:void 0;return U.createElement(nt,{zIndex:p},U.createElement(at,{className:m},f&&U.createElement(`defs`,null,U.createElement(Ze,{clipPathId:h,xAxisId:i,yAxisId:a}),!v&&U.createElement(`clipPath`,{id:`clipPath-dots-${h}`},U.createElement(`rect`,{x:s-y/2,y:o-y/2,width:c+y,height:l+y}))),U.createElement(nn,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:Mn,errorBarOffset:0},U.createElement(jn,{props:this.props,clipPathId:h}))),U.createElement(_t,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}},Pn={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:De.line,type:`linear`};function Fn(e){var t=lt(e,Pn),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:c,hide:l,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=yn(t,mn),{needClip:_}=Ye(p,m),v=xt(),y=ze(),b=Re(),x=Ue(e=>dn(e,p,m,b,h));if(y!==`horizontal`&&y!==`vertical`||x==null||v==null)return null;var{height:S,width:C,x:w,y:T}=v;return U.createElement(Nn,q({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:x,layout:y,height:S,width:C,left:w,top:T,needClip:_}))}function In(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:c}=e;return c.map((e,c)=>{var l=mt(e,o);if(t===`horizontal`)return{x:Me({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(gt(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=gt(l)?null:n.scale.map(l),d=Me({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function Ln(e){var t=lt(e,Pn),n=Re();return U.createElement(Ne,{id:t.id,type:`line`},e=>U.createElement(U.Fragment,null,U.createElement(Se,{legendPayload:xn(t)}),U.createElement(Sn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),U.createElement(bt,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),U.createElement(Fn,q({},t,{id:e}))))}var Rn=U.memo(Ln,Oe);Rn.displayName=`Line`;var zn=[`axis`],Bn=(0,U.forwardRef)((e,t)=>U.createElement(Ge,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:zn,tooltipPayloadSearcher:Ae,categoricalChartProps:e,ref:t})),Vn=U.createContext(void 0);function Hn(e=!0){let t=U.useContext(Vn);if(t===void 0&&!e)throw Error(h(7));return t}function Un(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=M(),{ref:i,index:a}=ot(e),o=n===a,s=U.useRef(null),c=g(i,s);return{compositeProps:U.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function Wn(e){let{render:t,className:n,style:r,state:a=f,props:s=o,refs:c=o,metadata:l,stateAttributesMapping:u,tag:d=`div`,...p}=e,{compositeProps:m,compositeRef:h}=Un({metadata:l});return i(d,e,{state:a,ref:[...c,h],props:[m,...s,p],stateAttributesMapping:u})}var Y=d(),Gn=U.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:a=!1,form:o,onPressedChange:s,pressed:l,render:u,type:d,value:f,nativeButton:m=!0,style:h,...g}=e,v=j(f||void 0),y=Hn(),b=y?.value??[],x=y?void 0:r,S=(a||y?.disabled)??!1,[C,w]=He({controlled:y?v!==void 0&&b.indexOf(v)>-1:l,default:x,name:`Toggle`,state:`pressed`}),{getButtonProps:T,buttonRef:E}=p({disabled:S,native:m}),D={disabled:S,pressed:C},O=[E,t],k=[{"aria-pressed":C,onClick(e){let t=!C,n=c(_,e.nativeEvent);v&&y?.setGroupValue?.(v,t,n),s?.(t,n),!n.isCanceled&&w(t)}},g,T],A=i(`button`,e,{enabled:!y,state:D,ref:O,props:k});return y?(0,Y.jsx)(Wn,{tag:`button`,render:u,className:n,style:h,state:D,refs:O,props:k}):A});function Kn(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var qn=[];function Jn(e){let{itemSizes:t,cols:r=1,loopFocus:i=!0,onLoop:a,dense:o=!1,orientation:s=`both`,direction:c,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:h,modifierKeys:_=qn}=e,[v,b]=U.useState(0),x=r>1,w=U.useRef(null),T=g(w,d),k=U.useRef([]),j=U.useRef(!1),M=l??v,N=n((e,t=!1)=>{if((u??b)(e),t){let t=k.current[e];le(w.current,t,c,s)}}),P=n(e=>{if(e.size===0||j.current)return;j.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&N(r),le(w.current,n,c,s)}),F=n((e,t,n)=>a?a?.(e,t,n,k):n),I=U.useMemo(()=>({"aria-orientation":s===`both`?void 0:s,ref:T,onFocus(e){let t=w.current,n=D(e.nativeEvent);!t||n==null||!ue(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let n=f?he:me;if(!n.has(e.key)||Yn(e,_)||!w.current)return;let l=c===`rtl`,u=l?_e:de,d={horizontal:u,vertical:z,both:u}[s],g=l?de:_e,v={horizontal:g,vertical:R,both:g}[s],b=D(e.nativeEvent);if(b!=null&&ue(b)&&!Kn(b)){let t=b.selectionStart,n=b.selectionEnd,r=b.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==d&&t>0)return}let T=M,j=te(k,h),P=A(k,h);if(x){let n=t||Array.from({length:k.current.length},()=>({width:1,height:1})),a=O(n,r,o),c=a.findIndex(e=>e!=null&&!m(k.current,e,h)),u=a.reduce((e,t,n)=>t!=null&&!m(k.current,t,h)?n:e,-1);T=a[y(a.map(e=>e==null?null:k.current[e]),{event:e,orientation:s,loopFocus:i,onLoop:F,cols:r,disabledIndices:S([...h||k.current.map((e,t)=>m(k.current,t)?t:void 0),void 0],a),minIndex:c,maxIndex:u,prevIndex:C(M>P?j:M,n,a,r,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:l})]}let I={horizontal:[u],vertical:[z],both:[u,z]}[s],L={horizontal:[g],vertical:[R],both:[g,R]}[s],ne=x?n:{horizontal:f?fe:ce,vertical:f?pe:ge,both:n}[s];f&&(e.key===`Home`?T=j:e.key===`End`&&(T=P)),T===M&&(I.includes(e.key)||L.includes(e.key))&&(i&&T===P&&I.includes(e.key)?(T=j,a&&(T=a(e,M,T,k))):i&&T===j&&L.includes(e.key)?(T=P,a&&(T=a(e,M,T,k))):T=E(k.current,{startingIndex:T,decrement:L.includes(e.key),disabledIndices:h})),T!==M&&!ee(k.current,T)&&(p&&e.stopPropagation(),ne.has(e.key)&&e.preventDefault(),N(T,!0),queueMicrotask(()=>{k.current[T]?.focus()}))}}),[r,o,c,h,k,f,M,x,t,i,a,F,T,_,N,s,p]);return U.useMemo(()=>({props:I,highlightedIndex:M,onHighlightedIndexChange:N,elementsRef:k,disabledIndices:h,onMapChange:P,relayKeyboardEvent:I.onKeyDown}),[I,M,N,k,h,P])}function Yn(e,t){for(let n of ve.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Xn(n){let{render:r,className:a,style:s,refs:c=o,props:l=o,state:u=f,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:m,orientation:h,dense:g,itemSizes:_,loopFocus:v,onLoop:y,cols:b,enableHomeAndEndKeys:x,onMapChange:S,stopEventPropagation:C=!0,rootRef:w,disabledIndices:T,modifierKeys:E,highlightItemOnHover:D=!1,tag:O=`div`,...k}=n,{props:A,highlightedIndex:j,onHighlightedIndexChange:M,elementsRef:N,onMapChange:ee,relayKeyboardEvent:P}=Jn({itemSizes:_,cols:b,loopFocus:v,onLoop:y,dense:g,orientation:h,highlightedIndex:p,onHighlightedIndexChange:m,rootRef:w,stopEventPropagation:C,enableHomeAndEndKeys:x,direction:e(),disabledIndices:T,modifierKeys:E}),te=i(O,n,{state:u,ref:c,props:[A,...l,k],stateAttributesMapping:d}),F=U.useMemo(()=>({highlightedIndex:j,onHighlightedIndexChange:M,highlightItemOnHover:D,relayKeyboardEvent:P}),[j,M,D,P]);return(0,Y.jsx)(t.Provider,{value:F,children:(0,Y.jsx)($e,{elementsRef:N,onMapChange:e=>{S?.(e),ee(e)},children:te})})}var Zn=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({}),Qn={multiple(e){return e?{[Zn.multiple]:``}:null}},$n=U.forwardRef(function(e,t){let{defaultValue:r,disabled:a=!1,loopFocus:s=!0,onValueChange:c,orientation:l=`horizontal`,multiple:u=!1,value:d,className:f,render:p,style:m,...h}=e,g=ft(!0),_=U.useMemo(()=>d!==void 0||r!==void 0,[d,r]),v=(g?.disabled??!1)||a,[y,b]=He({controlled:d,default:d===void 0?r??o:void 0,name:`ToggleGroup`,state:`value`}),x=n((e,t,n)=>{let r;u?(r=y.slice(),t?r.push(e):r.splice(y.indexOf(e),1)):r=t?[e]:[],c?.(r,n),!n.isCanceled&&b(r)}),S={disabled:v,multiple:u,orientation:l},C=U.useMemo(()=>({disabled:v,orientation:l,setGroupValue:x,value:y,isValueInitialized:_}),[v,l,x,y,_]),w={role:`group`},T=i(`div`,e,{enabled:!!g,state:S,ref:t,props:[w,h],stateAttributesMapping:Qn});return(0,Y.jsx)(Vn.Provider,{value:C,children:g?T:(0,Y.jsx)(Xn,{render:p,className:f,style:m,state:S,refs:[t],props:[w,h],stateAttributesMapping:Qn,loopFocus:s,enableHomeAndEndKeys:!0,orientation:l})})}),er=s(`group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,sm:`h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),tr=U.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function nr({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,Y.jsx)($n,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:N(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,Y.jsx)(tr.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function X({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=U.useContext(tr);return(0,Y.jsx)(Gn,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:N(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,er({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}var rr=[{value:`24h`,label:`24 hours`,shortLabel:`24h`},{value:`7d`,label:`7 days`,shortLabel:`7d`},{value:`30d`,label:`30 days`,shortLabel:`30d`}];function ir({onWindowChange:e,onScopeChange:t,scope:n,window:r}){let[i,a]=(0,U.useState)(n.platform),[o,s]=(0,U.useState)(n.channel);return(0,Y.jsxs)(`section`,{"aria-label":`Insights controls`,className:`flex flex-col gap-4`,children:[(0,Y.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),t({platform:i,channel:o})},children:(0,Y.jsxs)(ye,{className:`items-end sm:flex-row`,children:[(0,Y.jsxs)(be,{className:`w-full sm:w-auto`,children:[(0,Y.jsx)(B,{children:`Platform`}),(0,Y.jsxs)(nr,{"aria-label":`Platform`,value:[i],onValueChange:e=>{(e[0]===`ios`||e[0]===`android`)&&a(e[0])},spacing:0,variant:`outline`,children:[(0,Y.jsx)(X,{className:`h-11 lg:h-8`,value:`ios`,children:`iOS`}),(0,Y.jsx)(X,{className:`h-11 lg:h-8`,value:`android`,children:`Android`})]})]}),(0,Y.jsxs)(be,{children:[(0,Y.jsx)(B,{htmlFor:`insights-channel`,children:`Channel`}),(0,Y.jsx)(k,{className:`h-11 lg:h-8`,id:`insights-channel`,value:o,onChange:e=>s(e.target.value),required:!0,maxLength:1024})]}),(0,Y.jsx)(P,{className:`h-11 w-full sm:w-auto lg:h-8`,type:`submit`,variant:`outline`,children:`Apply filters`})]})}),(0,Y.jsxs)(be,{orientation:`horizontal`,className:`w-full`,children:[(0,Y.jsx)(B,{className:`sr-only`,children:`Reporting period`}),(0,Y.jsx)(nr,{"aria-label":`Reporting period`,className:`w-full sm:w-fit`,onValueChange:t=>{t[0]&&e(t[0])},spacing:0,size:`lg`,value:[r],variant:`outline`,children:rr.map(e=>(0,Y.jsx)(X,{"aria-label":e.label,className:`h-11 flex-1 px-4 sm:flex-none lg:h-8 lg:px-2.5`,value:e.value,children:e.shortLabel},e.value))})]})]})}var ar=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,timeZone:`UTC`}),Z=new Intl.DateTimeFormat(`en`,{month:`short`,day:`numeric`,hour:`numeric`,timeZone:`UTC`}),Q=[`var(--chart-2)`,`var(--foreground)`,`var(--chart-1)`,`var(--muted-foreground)`,`var(--chart-4)`],$=[void 0,`6 3`,`2 3`];function or({report:e}){let[t,n]=(0,U.useState)(`active`),[i,a]=(0,U.useState)(null),o=e.series.find(e=>e.releaseId===i),s=Object.fromEntries(e.series.map((e,t)=>[`bundle${t}`,{label:e.releaseId,color:Q[t%Q.length]}])),c=(e.series[0]?.points??[]).map((n,r)=>({startMs:n.startMs,...Object.fromEntries(e.series.map((e,n)=>[`bundle${n}`,t===`active`?e.points[r].active:e.points[r].recoveredInstallations]))})),l=t=>(e.intervalMs<864e5?Z:ar).format(t),u=o?[...o.points].reverse().find(e=>e.spike):void 0,d=t===`active`?e.series.reduce((e,t)=>e+t.activeInstallations,0):e.series.filter(e=>e.recoveredInstallations>0).length;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t===`active`?`Active installations`:`Bundles with rollbacks`}),(0,Y.jsx)(`p`,{className:`mt-1 text-4xl font-semibold tracking-tight tabular-nums`,children:d.toLocaleString()})]}),(0,Y.jsxs)(nr,{"aria-label":`Activity metric`,value:[t],onValueChange:e=>{(e[0]===`active`||e[0]===`rollback`)&&n(e[0])},spacing:0,variant:`outline`,children:[(0,Y.jsx)(X,{className:`h-11 lg:h-8`,value:`active`,children:`Active`}),(0,Y.jsx)(X,{className:`h-11 lg:h-8`,value:`rollback`,children:`Rollback`})]})]}),e.series.length===0?(0,Y.jsx)(`div`,{className:`flex h-48 items-center justify-center text-center text-sm text-muted-foreground`,children:`No bundle reports in this period. Try another channel or check again after the app reports activity.`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsxs)(`p`,{className:`mb-2 text-right text-xs text-muted-foreground`,children:[t===`active`?`Installations`:`Recovered installations per interval`,` `,`· UTC`]}),(0,Y.jsx)(ct,{"aria-label":`${t===`active`?`Active`:`Rollback`} trend for all reported bundle IDs`,className:`h-48 w-full aspect-auto sm:h-56`,config:s,children:(0,Y.jsxs)(Bn,{accessibilityLayer:!0,data:c,margin:{left:-12,right:12,top:8},children:[(0,Y.jsx)(Ve,{vertical:!1}),(0,Y.jsx)(ut,{axisLine:!1,dataKey:`startMs`,minTickGap:40,tickFormatter:l,tickLine:!1}),(0,Y.jsx)(qe,{allowDecimals:!1,axisLine:!1,tickLine:!1,width:48}),(0,Y.jsx)(rt,{content:(0,Y.jsx)(ht,{className:`max-h-64 max-w-[calc(100vw-3rem)] overflow-auto`,labelFormatter:(e,t)=>`${Z.format(t[0]?.payload.startMs)} · UTC`})}),e.series.map((e,t)=>(0,Y.jsx)(Rn,{dataKey:`bundle${t}`,type:`linear`,stroke:`var(--color-bundle${t})`,strokeWidth:i===e.releaseId?3:2,strokeOpacity:!o||o===e?1:.4,strokeDasharray:$[Math.floor(t/Q.length)%$.length],dot:{r:2},activeDot:{r:4},isAnimationActive:!1},e.releaseId))]})})]}),(0,Y.jsx)(`div`,{"aria-label":`Reported bundles`,className:`grid max-h-48 grid-cols-1 gap-1 overflow-y-auto sm:grid-cols-2`,children:e.series.map((e,n)=>(0,Y.jsxs)(`button`,{type:`button`,"aria-label":`Highlight bundle ${e.releaseId}`,"aria-pressed":i===e.releaseId,title:e.releaseId,onClick:()=>a(i===e.releaseId?null:e.releaseId),className:`flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-left text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-pressed:bg-muted`,children:[(0,Y.jsx)(`svg`,{"aria-hidden":`true`,width:`20`,height:`8`,className:`shrink-0`,children:(0,Y.jsx)(`line`,{x1:`0`,x2:`20`,y1:`4`,y2:`4`,stroke:Q[n%Q.length],strokeWidth:`2`,strokeDasharray:$[Math.floor(n/Q.length)%$.length]})}),(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e.releaseId}),e.points.some(e=>e.spike)?(0,Y.jsx)(r,{"aria-label":`Rollback spike`,className:`size-3 shrink-0`}):null,(0,Y.jsx)(`span`,{className:`ml-auto tabular-nums`,children:(t===`active`?e.activeInstallations:e.recoveredInstallations).toLocaleString()})]},e.releaseId))}),o?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t pt-3`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(`p`,{className:`break-all font-mono text-xs`,children:o.releaseId}),(0,Y.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Active `,o.activeInstallations.toLocaleString(),` · Rollback `,o.recoveredInstallations.toLocaleString(),` in this period`]}),t===`rollback`&&u?(0,Y.jsxs)(`p`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,Y.jsx)(r,{className:`size-3 shrink-0`,"aria-hidden":`true`}),`Rollback spike on `,ar.format(u.startMs),`. Review this bundle’s delivery settings.`]}):null]}),(0,Y.jsxs)(F,{className:b({variant:`outline`,size:`sm`}),to:`/`,search:{releaseId:o.releaseId},children:[`Review bundle`,(0,Y.jsx)(L,{"aria-hidden":`true`})]})]}):null,(0,Y.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer`,children:`View chart data`}),(0,Y.jsx)(`div`,{className:`mt-2 max-h-64 overflow-auto`,children:(0,Y.jsxs)(`table`,{className:`w-full text-left`,children:[(0,Y.jsxs)(`caption`,{className:`sr-only`,children:[t===`active`?`Active installations`:`Recovered installations`,` `,`by bundle ID, UTC`]}),(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{scope:`col`,className:`pr-4`,children:`Date (UTC)`}),e.series.map(e=>(0,Y.jsx)(`th`,{scope:`col`,className:`px-2 font-mono`,children:e.releaseId},e.releaseId))]})}),(0,Y.jsx)(`tbody`,{children:c.map((n,r)=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{scope:`row`,className:`whitespace-nowrap pr-4 font-normal`,children:Z.format(n.startMs)}),e.series.map(e=>(0,Y.jsx)(`td`,{className:`px-2 tabular-nums`,children:(t===`active`?e.points[r].active:e.points[r].recoveredInstallations)??`—`},e.releaseId))]},n.startMs))})]})})]})]})]})}function sr({input:e}){let t=v({queryKey:[`rollout-activity`,e],queryFn:()=>vt({data:e}),staleTime:3e4});return(0,Y.jsxs)(se,{className:`min-w-0 overflow-hidden shadow-sm`,children:[(0,Y.jsxs)(re,{className:`flex-row items-center justify-between gap-4 px-4 pt-4 pb-2 sm:px-6 sm:pt-6`,children:[(0,Y.jsxs)(oe,{className:`text-sm font-medium`,children:[`Bundle activity ·`,` `,e.window===`30d`?`30 days`:e.window===`7d`?`7 days`:`24 hours`]}),(0,Y.jsx)(P,{"aria-label":`Refresh bundle activity`,variant:`ghost`,size:`icon-sm`,disabled:t.isFetching,onClick:()=>void t.refetch(),children:(0,Y.jsx)(Ct,{"aria-hidden":`true`})})]}),(0,Y.jsx)(ae,{className:`flex flex-col gap-4 px-4 pb-4 sm:px-6 sm:pb-6`,children:t.isPending?(0,Y.jsx)(x,{"aria-label":`Loading bundle activity`,className:`h-64 w-full`}):t.error?(0,Y.jsx)(I,{error:t.error,fallbackTitle:`Bundle activity unavailable`}):t.data?(0,Y.jsx)(or,{report:t.data},JSON.stringify(e)):null}),t.data&&!t.error?(0,Y.jsxs)(ie,{className:`flex-col items-start gap-2 border-t bg-muted/15 px-4 py-3 text-xs text-muted-foreground sm:px-6`,children:[(0,Y.jsx)(`p`,{children:`Active follows each installation’s last reported ID in this period. Rollbacks count installations recovered from each ID per interval.`}),t.data.unattributedInstallations>0?(0,Y.jsxs)(`p`,{children:[t.data.unattributedInstallations.toLocaleString(),` reporting installations have no observed bundle ID and are excluded.`]}):null,t.data.truncated?(0,Y.jsxs)(`p`,{children:[`Partial history — only reports since`,` `,Z.format(t.data.sinceMs),` UTC are included. Choose a shorter period to see more complete counts.`]}):null]}):null]})}function cr(){let[e,t]=(0,U.useState)(`30d`),[n,r]=(0,U.useState)({platform:`ios`,channel:`production`});return(0,Y.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Y.jsx)(ne,{view:`overview`}),(0,Y.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Y.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-4 sm:gap-6`,children:[(0,Y.jsx)(ir,{scope:n,onScopeChange:e=>{r(e)},onWindowChange:e=>{t(e)},window:e}),(0,Y.jsx)(sr,{input:{...n,window:e}})]})})]})}export{cr as component};
@@ -0,0 +1 @@
1
+ import{Kn as e,Or as t,Qn as n,Yn as r,_n as i,bn as a,gn as o,jr as s,t as c,vr as l,xn as u,yn as d}from"./createServerFn-DHc2erub.js";import{r as f,t as p}from"./link-BG06whwB.js";import{i as m,n as ee,r as h,t as g}from"./installations-DvjbUqd1.js";import{n as _,r as v,t as te}from"./InsightsPageHeader-C-Xc2MB9.js";import{a as y,c as b,i as x,n as S,o as C,r as w,s as T,t as E}from"./table-BBEzJ7Xl.js";import{c as D,i as O,l as k,n as A,r as ne,s as j,t as re,u as M}from"./input-group-BbHfaBzQ.js";import{t as N}from"./refresh-cw-DZgiAOMk.js";import{a as P,n as F,o as I,t as L}from"./card-BEvx_QKh.js";import{t as ie}from"./badge-BuMDU0Rf.js";import{a as ae,t as oe}from"./field-79SVH26s.js";function se(){m(f(),!0)}function ce(e){return se(),h(f(),e)}var le=e(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),ue=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),de=e(`package-check`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),fe=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),R=s(t(),1),z=n(),pe={UPDATE_APPLIED:{label:`Bundle applied`,variant:`success`,icon:b},RECOVERED:{label:`Recovered`,variant:`warning`,icon:k},RELEASE_ADOPTED:{label:`Bundle adopted`,variant:`success`,icon:de},UNCHANGED:{label:`Activity reported`,variant:`secondary`,icon:le}};function B(){let[e,t]=(0,R.useState)(`UTC`);return(0,R.useEffect)(()=>{t(Intl.DateTimeFormat().resolvedOptions().timeZone)},[]),new Intl.DateTimeFormat(`en`,{timeZone:e,timeZoneName:`shortOffset`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`})}function me(e,t){let n=Object.fromEntries(t.formatToParts(new Date(e)).map(({type:e,value:t})=>[e,t])),r=n.timeZoneName===`GMT`?`GMT+0`:n.timeZoneName;return`${n.year}/${n.month}/${n.day} ${n.hour}:${n.minute}:${n.second} ${r}`}function V({value:e,formatter:t,touch:n=!1}){let r=new Date(e),i=me(e,t);return(0,z.jsxs)(`details`,{className:`group/time`,children:[(0,z.jsx)(`summary`,{className:`cursor-pointer list-none rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/30 [&::-webkit-details-marker]:hidden ${n?`flex min-h-11 items-center`:``}`,children:(0,z.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,z.jsx)(`time`,{dateTime:r.toISOString(),className:`whitespace-nowrap`,children:i}),(0,z.jsx)(M,{"aria-hidden":`true`,className:`size-3 text-muted-foreground group-open/time:rotate-180`})]})}),(0,z.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r.toISOString().replace(`T`,` `).replace(`Z`,` UTC`)})]})}function H({type:e}){let t=pe[e],n=t.icon;return(0,z.jsxs)(ie,{variant:t.variant,className:`gap-1 whitespace-nowrap [&_svg]:size-3`,title:e===`UNCHANGED`?`App activity reported on the current bundle without a bundle transition.`:e===`RELEASE_ADOPTED`?`A different release was adopted without changing the bundle.`:void 0,children:[(0,z.jsx)(n,{"aria-hidden":`true`}),t.label]})}function U({event:e,touch:t=!1}){return(0,z.jsxs)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-2`,children:[e.fromBundleId?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:`From`}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(j,{value:e.fromBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]}):null,(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:e.type===`UNCHANGED`?`Current`:`To`}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(j,{value:e.toBundleId,buttonClassName:t?`min-h-11 px-3`:void 0})})]})}function W({events:e,formatter:t,renderIdentity:n}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`px-4 pb-2 text-xs text-muted-foreground sm:px-6`,children:`Time in your browser zone`}),(0,z.jsx)(`ol`,{"aria-label":`Events`,className:`divide-y border-y`,children:e.map(e=>(0,z.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-3 px-4 py-4 sm:px-6`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1`,children:[(0,z.jsx)(H,{type:e.type}),(0,z.jsx)(`div`,{className:`text-xs tabular-nums`,children:(0,z.jsx)(V,{value:e.receivedAtMs,formatter:t,touch:!0})})]}),n?.(e),(0,z.jsxs)(`dl`,{className:`flex flex-wrap gap-x-2 gap-y-1 text-sm`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`sr-only`,children:`App`}),(0,z.jsxs)(`dd`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]})]}),(0,z.jsxs)(`div`,{className:`min-w-0 text-muted-foreground`,children:[(0,z.jsx)(`dt`,{className:`sr-only`,children:`Channel`}),(0,z.jsx)(`dd`,{className:`wrap-anywhere`,children:e.channel})]})]}),(0,z.jsx)(`div`,{className:`text-xs`,"aria-label":`Bundle`,children:(0,z.jsx)(U,{event:e,touch:!0})})]},e.id))})]})}function G({hasPrevious:e,label:t,nextCursor:n,onNext:r,onPrevious:i,pageLength:a,pageNumber:o}){return(0,z.jsxs)(`nav`,{"aria-label":`${t} pagination`,className:`flex flex-wrap items-center justify-between gap-3 border-t px-4 py-3 sm:px-6`,children:[(0,z.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:[`Page `,o,` · `,a.toLocaleString(),` rows`]}),(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(d,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:!e,onClick:i,size:`sm`,type:`button`,variant:`outline`,children:`Previous`}),(0,z.jsx)(d,{className:`h-11 min-w-11 px-3 lg:h-8 lg:min-w-0 lg:px-2`,disabled:n===null,onClick:r,size:`sm`,type:`button`,variant:`outline`,children:`Next`})]})]})}function K({event:e,eventsLocation:t,touch:n=!1}){return(0,z.jsxs)(`div`,{className:n?`flex min-w-0 flex-wrap items-center justify-between gap-2`:`flex min-w-0 flex-col items-start gap-2`,children:[(0,z.jsxs)(p,{className:a({className:n?`-ml-2 h-auto min-h-11 min-w-0 flex-1 justify-start gap-2 whitespace-normal text-sm`:`-ml-2 max-w-full justify-start`,size:`sm`,variant:`ghost`}),to:`/installations`,search:{...t,query:e.installId||void 0,installId:e.installId},"aria-label":`View history for ${e.userId??e.username??`anonymous installation`} (${e.installId})`,children:[(0,z.jsx)(`span`,{className:n?`min-w-0 text-left wrap-anywhere`:`truncate`,children:e.userId??e.username??`Anonymous installation`}),(0,z.jsx)(v,{"aria-hidden":`true`,"data-icon":`inline-end`})]}),(0,z.jsx)(j,{value:e.installId,maxLength:13,buttonClassName:n?`min-h-11 px-3`:void 0})]})}function he({children:e,error:t,eventsLocation:n,history:r,isFetching:i,isLoading:a,onNext:s,onPrevious:c,onRefresh:l,pageNumber:u,title:f=`All events`}){let p=B(),m=u>1;return(0,z.jsxs)(L,{className:`@container min-w-0 shadow-sm`,"aria-busy":i,children:[(0,z.jsxs)(P,{className:`gap-4 p-4 sm:p-6`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,z.jsx)(I,{children:(0,z.jsx)(`h2`,{children:f})}),(0,z.jsxs)(d,{className:`h-11 lg:h-8`,disabled:i,onClick:l,size:`lg`,variant:`outline`,children:[(0,z.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]})]}),e]}),(0,z.jsx)(F,{className:`min-w-0 p-0`,children:a?(0,z.jsxs)(`div`,{className:`flex flex-col gap-4 p-6`,role:`status`,"aria-label":`Loading events`,children:[(0,z.jsx)(o,{className:`h-12 w-full`}),(0,z.jsx)(o,{className:`h-12 w-full`}),(0,z.jsx)(o,{className:`h-12 w-full`})]}):t?(0,z.jsx)(`div`,{className:`px-6 pb-6`,children:(0,z.jsx)(_,{error:t,fallbackTitle:`Event history unavailable`})}):r?(0,z.jsxs)(z.Fragment,{children:[r.data.length>0?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`@[58rem]:hidden`,children:(0,z.jsx)(W,{events:r.data,formatter:p,renderIdentity:e=>(0,z.jsx)(K,{event:e,eventsLocation:n,touch:!0})})}),(0,z.jsx)(`div`,{className:`hidden @[58rem]:block`,children:(0,z.jsxs)(E,{className:`min-w-4xl table-fixed`,children:[(0,z.jsx)(y,{children:(0,z.jsxs)(C,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,z.jsx)(x,{className:`w-64`,children:`Time`}),(0,z.jsx)(x,{className:`w-48`,children:`Event`}),(0,z.jsx)(x,{className:`w-48`,children:`User / installation`}),(0,z.jsx)(x,{className:`w-32`,children:`App`}),(0,z.jsx)(x,{className:`w-52`,children:`Bundle`})]})}),(0,z.jsx)(S,{children:r.data.map(e=>(0,z.jsxs)(C,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,z.jsx)(w,{className:`whitespace-normal text-xs tabular-nums`,children:(0,z.jsx)(V,{value:e.receivedAtMs,formatter:p})}),(0,z.jsx)(w,{children:(0,z.jsx)(H,{type:e.type})}),(0,z.jsx)(w,{children:(0,z.jsx)(K,{event:e,eventsLocation:n})}),(0,z.jsx)(w,{className:`whitespace-normal text-xs`,children:(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,z.jsx)(w,{className:`whitespace-normal text-xs`,children:(0,z.jsx)(U,{event:e})})]},e.id))})]})})]}):(0,z.jsx)(`div`,{className:`px-6 pb-6 text-sm text-muted-foreground`,children:m||r.nextCursor?`No events on this page`:f===`All events`?`No events recorded yet`:`No matching reports in this period`}),r.data.length>0||m||r.nextCursor?(0,z.jsx)(G,{hasPrevious:m,label:f,nextCursor:r.nextCursor,onNext:s,onPrevious:c,pageLength:r.data.length,pageNumber:u}):null]}):null})]})}var ge=e=>e.userId??e.username??`—`,_e=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.toBundleId??e.fromBundleId;function ve({error:e,history:t,isLoading:n,onNext:r,onPrevious:a,onRefresh:s,pageNumber:c,selectedEvent:l,selectedInstallId:u}){let f=B(),p=l?_e(l):void 0;return(0,z.jsxs)(L,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,z.jsx)(P,{className:`p-4 sm:p-6`,children:(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,z.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,z.jsx)(I,{className:`text-sm font-medium`,children:(0,z.jsx)(`h2`,{children:u===void 0?`Select an installation`:`Installation history`})})}),s&&u!==void 0?(0,z.jsxs)(d,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:s,disabled:n,children:[(0,z.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,z.jsxs)(F,{className:`min-h-0 p-0`,children:[u!==void 0&&l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,z.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,z.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,z.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,z.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:ge(l)})]}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,z.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,z.jsx)(j,{value:u,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,z.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:p?(0,z.jsx)(j,{value:p,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`})]})]})]}),(0,z.jsx)(i,{})]}):null,u===void 0?null:n?(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,z.jsx)(o,{className:`h-10 w-full`}),(0,z.jsx)(o,{className:`h-10 w-full`}),(0,z.jsx)(o,{className:`h-10 w-full`})]}):e?(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(_,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation history unavailable`})}):t&&t.data.length>0?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,z.jsx)(W,{events:t.data,formatter:f})}),(0,z.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,z.jsxs)(E,{className:`min-w-3xl table-fixed`,children:[(0,z.jsx)(y,{children:(0,z.jsxs)(C,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,z.jsx)(x,{className:`w-64`,children:`Time`}),(0,z.jsx)(x,{className:`w-48`,children:`Event`}),(0,z.jsx)(x,{className:`w-32`,children:`App`}),(0,z.jsx)(x,{className:`w-52`,children:`Bundle`})]})}),(0,z.jsx)(S,{children:t.data.map(e=>(0,z.jsxs)(C,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,z.jsx)(w,{className:`whitespace-normal text-xs tabular-nums`,children:(0,z.jsx)(V,{value:e.receivedAtMs,formatter:f})}),(0,z.jsx)(w,{children:(0,z.jsx)(H,{type:e.type})}),(0,z.jsx)(w,{className:`whitespace-normal text-xs`,children:(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,z.jsx)(w,{className:`whitespace-normal text-xs`,children:(0,z.jsx)(U,{event:e})})]},e.id))})]})}),(0,z.jsx)(G,{hasPrevious:c>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:r,onPrevious:a,pageLength:t.data.length,pageNumber:c})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:c>1||t?.nextCursor?`No bundle changes on this page.`:`No bundle changes recorded yet.`}),t&&(c>1||t.nextCursor)?(0,z.jsx)(G,{hasPrevious:c>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:r,onPrevious:a,pageLength:0,pageNumber:c}):null]})]})]})}var ye=e=>e.lastKnownBundleId,q=e=>e.userId??e.username??`—`;function be({error:e,onNext:t,onPrevious:n,onSelect:r,pageNumber:i,results:o,selectedInstallId:s}){let[c,l]=(0,R.useState)(!1),f=(0,R.useId)(),p=(0,R.useRef)(null),m=!e&&o&&o.data.length>0;return(0,z.jsxs)(L,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,z.jsx)(P,{className:`p-4 sm:px-6`,children:(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,z.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,z.jsx)(I,{className:`text-sm font-medium`,children:(0,z.jsx)(`h2`,{children:`Matching installations`})})}),(0,z.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,z.jsx)(d,{"aria-controls":f,"aria-expanded":c,"aria-label":c?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>l(!c),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,z.jsx)(M,{"aria-hidden":`true`,className:u(c&&`rotate-180`)})}):null})]})}),(0,z.jsxs)(F,{className:u(`min-h-0 p-0`,m&&!c&&`hidden lg:block`),id:f,children:[e?(0,z.jsx)(`div`,{className:`p-6`,children:(0,z.jsx)(_,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):o&&o.data.length>0?(0,z.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:o.data.map(e=>{let t=ye(e),n=e.installId===s;return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{"aria-label":`${q(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{r(e.installId),l(!1),p.current?.focus()},type:`button`,children:[(0,z.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,z.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:q(e)}),n?(0,z.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,z.jsx)(b,{"aria-hidden":`true`,className:`size-3.5`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,z.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,z.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:D(e.installId)})}),(0,z.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,z.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:D(t)}):(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,z.jsx)(`a`,{className:a({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),o&&(o.data.length>0||i>1||o.nextCursor)?(0,z.jsx)(G,{hasPrevious:i>1,label:`Installation results`,nextCursor:o.nextCursor,onNext:t,onPrevious:n,pageLength:o.data.length,pageNumber:i}):null]})]})}function xe({draftQuery:e,onDraftQueryChange:t,onSubmit:n,onClear:r}){return(0,z.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&n()},role:`search`,children:(0,z.jsxs)(oe,{className:`gap-2`,children:[(0,z.jsx)(ae,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsxs)(re,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,z.jsx)(A,{children:(0,z.jsx)(fe,{"aria-hidden":`true`})}),(0,z.jsx)(O,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>t(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,z.jsx)(A,{align:`inline-end`,children:(0,z.jsx)(ne,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:r,size:`icon-xs`,children:(0,z.jsx)(T,{"aria-hidden":`true`})})}):null]}),(0,z.jsx)(d,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function Se(){return(0,z.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,z.jsx)(o,{className:`h-64 w-full lg:h-full`}),(0,z.jsx)(o,{className:`h-64 w-full lg:h-full`})]})}c({method:`GET`}).handler(l(`ff00311d412c8cdfa8ad5b0ba1eb6aa7471d0cc12170e6cc645deb91603d42dd`));var Ce=c({method:`GET`}).handler(l(`d4c50f40701055145f24873dc90f3c55a5494457a6a03a743339b2ac4545eb19`)),we=c({method:`GET`}).handler(l(`3c04bc6624be6dfdd80cf96819f9c6d0455e59a7bb4c0374b6afb0162ffd15b0`)),Te=c({method:`GET`}).handler(l(`6726f1ed9eda1f0cb4c1f1ad1023faee435ddcfd0b7c55ef08ca7f2f7f577370`)),Ee=c({method:`GET`}).handler(l(`735c501f6d5ea81a445ff2b6b2ea6a1b589e3c6f63a465a881822c80ae71e7d1`)),J=3e4,Y={reportingInstallations:e=>[`insights`,`reporting-installations`,e],events:e=>[`insights`,`events`,e],installations:e=>[`insights`,`installations`,e],installation:e=>[`insights`,`installation`,e],installationEvents:e=>[`insights`,`installation-events`,e]},De=(e,t)=>r({queryKey:Y.events(e),queryFn:()=>Ce({data:e}),enabled:t,refetchOnWindowFocus:!0,staleTime:J}),Oe=(e,t)=>r({queryKey:Y.installations(e),queryFn:()=>Ee({data:e}),enabled:t&&e.identity.length>0,staleTime:J}),ke=(e,t)=>r({queryKey:Y.installation(e),queryFn:()=>Te({data:{installId:e}}),enabled:t&&e.length>0,staleTime:J}),Ae=(e,t)=>r({queryKey:Y.installationEvents(e),queryFn:()=>we({data:e}),enabled:t&&e.installId.length>0,refetchOnWindowFocus:!0,staleTime:J}),je=20,X=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function Me(){let e=g.useSearch(),t=g.useNavigate(),[n,r]=(0,R.useState)(e.query??``),[i]=(0,R.useState)(Z),[a]=(0,R.useState)(Z),[o,s]=(0,R.useState)([]),[c,l]=(0,R.useState)([]),[u,f]=(0,R.useState)([]),p=e.query?.trim()??``,m=p.length>0,h=e.installId!==void 0,_=m||h,v=e.eventsBefore??i,y=e.historyBefore??a,b=(n,r=!1)=>{t({to:`/installations`,search:{...e,...n},replace:r})};(0,R.useEffect)(()=>{r(e.query??``)},[e.query]),(0,R.useEffect)(()=>{e.eventsBefore===void 0&&b({eventsBefore:v},!0)},[v,e.eventsBefore]),(0,R.useEffect)(()=>{h&&e.historyBefore===void 0&&b({historyBefore:y},!0)},[h,y,e.historyBefore]);let x=De({beforeReceivedAtMs:v,cursor:e.eventsCursor,limit:X},!_),S=Oe({cursor:e.searchCursor,identity:p,limit:je},m);(0,R.useEffect)(()=>{let e=S.data?.data[0]?.installId;!m||h||e===void 0||(f([]),b({historyBefore:Z(),historyCursor:void 0,installId:e},!0))},[m,h,S.data?.data]);let C=ke(e.installId??``,h),w=Ae({beforeReceivedAtMs:y,cursor:e.historyCursor,installId:e.installId??``,limit:X},h),T=C.data??S.data?.data.find(({installId:t})=>t===e.installId)??w.data?.data[0],E=_?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,D=(0,R.useRef)(null),O=ce({id:E,getKey:ee});(0,R.useLayoutEffect)(()=>{!_&&!x.isLoading&&D.current&&(D.current.scrollTop=O?.scrollY??0)},[x.isLoading,_,O?.scrollY,E]);let k=()=>{r(``),f([]),l([]),b({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0})},A=(0,z.jsx)(xe,{draftQuery:n,onClear:k,onDraftQueryChange:r,onSubmit:()=>{let e=n.trim();if(!e){k();return}f([]),l([]),b({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0})}});return(0,z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,z.jsx)(te,{view:`events`}),(0,z.jsx)(`div`,{ref:D,"data-scroll-restoration-id":E,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[_?(0,z.jsx)(L,{className:`shadow-sm`,children:(0,z.jsxs)(F,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,z.jsxs)(d,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:k,variant:`ghost`,children:[(0,z.jsx)(ue,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),A]})}):null,_?S.isLoading&&m?(0,z.jsx)(Se,{}):(0,z.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${m?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[m?(0,z.jsx)(be,{error:S.error,onNext:()=>{S.data?.nextCursor&&(l(Q(c,e.searchCursor)),b({installId:void 0,searchCursor:S.data.nextCursor},!0))},onPrevious:()=>{let e=$(c);l(e.stack),b({installId:void 0,searchCursor:e.cursor},!0)},onSelect:e=>{f([]),b({historyBefore:Z(),historyCursor:void 0,installId:e})},pageNumber:c.length+1,results:S.data,selectedInstallId:e.installId}):null,(0,z.jsx)(ve,{error:w.error??C.error,history:w.data,isLoading:w.isLoading||C.isLoading,onNext:()=>{w.data?.nextCursor&&(f(Q(u,e.historyCursor)),b({historyCursor:w.data.nextCursor},!0))},onPrevious:()=>{let e=$(u);f(e.stack),b({historyCursor:e.cursor},!0)},onRefresh:()=>{f([]),b({historyBefore:Z(),historyCursor:void 0},!0)},pageNumber:u.length+1,selectedEvent:T,selectedInstallId:e.installId})]}):(0,z.jsx)(he,{error:x.error,eventsLocation:{eventsBefore:v,eventsCursor:e.eventsCursor},history:x.data,isFetching:x.isFetching,isLoading:x.isLoading,onNext:()=>{x.data?.nextCursor&&(s(Q(o,e.eventsCursor)),b({eventsCursor:x.data.nextCursor},!0))},onPrevious:()=>{let e=$(o);s(e.stack),b({eventsCursor:e.cursor},!0)},onRefresh:()=>{s([]),b({eventsBefore:Z(),eventsCursor:void 0},!0)},pageNumber:o.length+1,children:A})]})},E)]})}export{Me as component};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-CStZja8x.js","assets/createServerFn-CA8fs7QD.js","assets/link-CI8idAUi.js","assets/InsightsPageHeader-Car5LNiZ.js","assets/chart-no-axes-combined-Dy4WJv2U.js","assets/table-2vcV89QB.js","assets/HashValueDisplay-CB0Eskit.js","assets/dist-C_NydL0e.js","assets/refresh-cw-Bqc72UZG.js","assets/card-Dhr_eFYj.js","assets/x-DCd0j8c6.js","assets/input-group-cSOG4wh_.js"])))=>i.map(i=>d[i]);
2
- import{Cr as e,Sr as t,wr as n,xr as r,yr as i}from"./createServerFn-CA8fs7QD.js";import{A as a,C as o,D as s,E as c,I as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,_ as v,b as y,d as b,f as x,h as S,k as C,m as w,p as T,u as E,v as D,w as O,x as k,y as ee,z as A}from"./link-CI8idAUi.js";import{a as te,n as ne,t as re}from"./lazyRouteComponent-Ccp3bwBY.js";import{t as ie}from"./preload-helper-CQ36nxok.js";var ae=se(JSON.parse),oe=ce(JSON.stringify,JSON.parse);function se(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=r(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ce(e,n){let r=typeof n==`function`;function i(t){if(typeof t==`object`&&t)try{return e(t)}catch{}else if(r&&typeof t==`string`)try{return n(t),e(t)}catch{}return t}return e=>{let n=t(e,i);return n?`?${n}`:``}}var j=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},le=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),M=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),N=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},ue=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},P=(t,n,r)=>{if(!(!i(r)&&!e(r)))throw i(r)&&r.redirectHandled&&!r.options.reloadDocument?r:(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=r,t.updateMatch(n.id,a=>({...a,status:i(r)?`redirected`:e(r)?`notFound`:a.status===`pending`?`success`:a.status,context:N(t,n.index),isFetching:!1,error:r})),e(r)&&!r.routeId&&(r.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),i(r)&&(t.rendered=!0,r.options._fromLocation=t.location,r.redirectHandled=!0,r=t.router.resolveRedirect(r)),r)},de=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},fe=(e,t,n)=>{let r=N(e,n);e.updateMatch(t,e=>({...e,context:r}))},F=(t,n,r)=>{let{id:a,routeId:o}=t.matches[n],s=t.router.looseRoutesById[o];if(r instanceof Promise)throw r;t.firstBadMatchIndex??=n,P(t,t.router.getMatch(a),r);try{s.options.onError?.(r)}catch(e){r=e,P(t,t.router.getMatch(a),r)}t.updateMatch(a,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:r,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!i(r)&&!e(r)&&(t.serialError??=r)},pe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!M(e,t)&&(n.options.loader||n.options.beforeLoad||Ce(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{j(e)},i);r._nonReactive.pendingTimeout=t}},me=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&P(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},he=(t,n,r,a)=>{let o=t.router.getMatch(n),c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=s(()=>{c?.resolve(),c=void 0});let{paramsError:u,searchError:d}=o;u&&F(t,r,u),d&&F(t,r,d),pe(t,n,a,o);let f=new AbortController,p=!1,m=()=>{p||(p=!0,t.updateMatch(n,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:f})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(n,e=>({...e,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{m(),h()});return}o._nonReactive.beforeLoadPromise=s();let g={...N(t,r,!1),...o.__routeContext},{search:_,params:v,cause:y}=o,b=M(t,n),x={search:_,abortController:f,params:v,preload:b,context:g,location:t.location,navigate:e=>t.router.navigate({...e,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:b?`preload`:y,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},S=a=>{if(a===void 0){t.router.batch(()=>{m(),h()});return}(i(a)||e(a))&&(m(),F(t,r,a)),t.router.batch(()=>{m(),t.updateMatch(n,e=>({...e,__beforeLoadContext:a})),h()})},C;try{if(C=a.options.beforeLoad(x),l(C))return m(),C.catch(e=>{F(t,r,e)}).then(S)}catch(e){m(),F(t,r,e)}S(C)},ge=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>he(e,n,t,i),s=()=>{if(de(e,n))return;let t=me(e,n,i);return l(t)?t.then(o):o()};return a()},_e=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=N(e,r),d=M(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ye=async(t,n,r,a,o)=>{try{let s=t.router.getMatch(r);try{I(o);let e=o.options.loader,i=typeof e==`function`?e:e?.handler,c=i?.(ve(t,n,r,a,o)),u=!!i&&l(c);if((u||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&t.updateMatch(r,e=>({...e,isFetching:`loader`})),i){let e=u?await c:c;P(t,t.router.getMatch(r),e),e!==void 0&&t.updateMatch(r,t=>({...t,loaderData:e}))}o._lazyPromise&&await o._lazyPromise;let d=s._nonReactive.minPendingPromise;d&&await d,o._componentsPromise&&await o._componentsPromise,t.updateMatch(r,e=>({...e,error:void 0,context:N(t,a),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(n){let c=n;if(c?.name===`AbortError`){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}t.updateMatch(r,e=>({...e,status:e.status===`pending`?`success`:e.status,isFetching:!1,context:N(t,a)}));return}let l=s._nonReactive.minPendingPromise;l&&await l,e(n)&&await o.options.notFoundComponent?.preload?.(),P(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(e){c=e,P(t,t.router.getMatch(r),e)}!i(c)&&!e(c)&&await I(o,[`errorComponent`]),t.updateMatch(r,e=>({...e,error:c,context:N(t,a),status:`error`,isFetching:!1}))}}catch(e){let n=t.router.getMatch(r);n&&(n._nonReactive.loaderPromise=void 0),P(t,n,e)}},be=async(e,t,n)=>{async function r(r,o,s,u,d){let p=Date.now()-o.updatedAt,m=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,h=d.options.shouldReload,g=typeof h==`function`?h(ve(e,t,a,n,d)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||s!==void 0&&s!==u.id);c=_===`success`&&(v||(g??y)),r&&d.options.preload===!1||(c&&!e.sync&&f?(l=!0,(async()=>{try{await ye(e,t,a,n,d);let r=e.router.getMatch(a);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){i(t)&&await e.router.navigate(t.options)}})()):_!==`success`||c?await ye(e,t,a,n,d):fe(e,a,n))}let{id:a,routeId:o}=e.matches[n],c=!1,l=!1,u=e.router.looseRoutesById[o],d=u.options.loader,f=((typeof d==`function`?void 0:d?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(de(e,a)){if(!e.router.getMatch(a))return e.matches[n];fe(e,a,n)}else{let t=e.router.getMatch(a),i=e.router.stores.matchesId.get()[n],c=(i&&e.router.stores.matchStores.get(i)||null)?.routeId===o?i:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,l=M(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&f)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),i=n._nonReactive.error||n.error;i&&P(e,n,i),n.status===`pending`&&await r(l,t,c,n,u)}else{let n=l&&!e.router.stores.matchStores.has(a),i=e.router.getMatch(a);i._nonReactive.loaderPromise=s(),n!==i.preload&&e.updateMatch(a,e=>({...e,preload:n})),await r(l,t,c,i,u)}}let p=e.router.getMatch(a);l||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,l||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;let m=l?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:m,invalid:!1})),e.router.getMatch(a)):p};async function xe(t){let r=t,a=[];le(r.router)&&j(r);let o;for(let t=0;t<r.matches.length;t++){try{let e=ge(r,t);l(e)&&await e}catch(t){if(i(t))throw t;if(e(t))o=t;else if(!r.preload)throw t;break}if(r.serialError||r.firstBadMatchIndex!=null)break}let s=r.firstBadMatchIndex??r.matches.length,c=o&&!r.preload?ue(r,o):void 0,u=o&&r.preload?0:c===void 0?s:Math.min(c+1,s),d,f;for(let e=0;e<u;e++)a.push(be(r,a,e));try{await Promise.all(a)}catch{let t=await Promise.allSettled(a);for(let n of t){if(n.status!==`rejected`)continue;let t=n.reason;if(i(t))throw t;e(t)?d??=t:f??=t}if(f!==void 0)throw f}let p=d??(o&&!r.preload?o:void 0),m=r.firstBadMatchIndex===void 0?r.matches.length-1:r.firstBadMatchIndex;if(!p&&o&&r.preload)return r.matches;if(p){let e=ue(r,p);e===void 0&&n();let t=r.matches[e],i=r.router.looseRoutesById[t.routeId],a=r.router.options?.defaultNotFoundComponent;!i.options.notFoundComponent&&a&&(i.options.notFoundComponent=a),p.routeId=t.routeId;let o=t.routeId===r.router.routeTree.id;r.updateMatch(t.id,e=>({...e,...o?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:p},isFetching:!1})),m=e,await I(i,[`notFoundComponent`])}else if(!r.preload){let e=r.matches[0];e.globalNotFound||r.router.getMatch(e.id)?.globalNotFound&&r.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(r.serialError&&r.firstBadMatchIndex!==void 0){let e=r.router.looseRoutesById[r.matches[r.firstBadMatchIndex].routeId];await I(e,[`errorComponent`])}for(let e=0;e<=m;e++){let{id:t,routeId:n}=r.matches[e],i=r.router.looseRoutesById[n];try{let e=_e(r,t,i);if(e){let n=await e;r.updateMatch(t,e=>({...e,...n}))}}catch(e){console.error(`Error executing head for route ${n}:`,e)}}let h=j(r);if(l(h)&&await h,p)throw p;if(r.serialError&&!r.preload&&!r.onReady)throw r.serialError;return r.matches}function Se(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function I(e,t=L){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===L?(()=>{if(e._componentsPromise===void 0){let t=Se(e,L);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Se(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ce(e){for(let t of L)if(e.options[t]?.preload)return!0;return!1}var L=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function we(e){return{input:({url:t})=>{for(let n of e)t=R(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ee(e[n],t);return t}}}function Te(e){let t=S(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=T([`/`,t,e.pathname]),e)}}function R(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 Ee(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 De(e){let t=e;return{get(){return t},set(e){t=d(e,t)}}}function Oe(e){return{get(){return e()}}}function ke(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>z(o,_.get())),x=r(()=>z(s,v.get())),S=r(()=>z(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=O(64);function k(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let ee={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:k,setMatches:A,setPending:te,setCached:ne};A(e.matches),a?.(ee);function A(e){B(e,o,_,n,i)}function te(e){B(e,s,v,n,i)}function ne(e){B(e,c,y,n,i)}return ee}function z(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function B(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}c(n.get(),a)||n.set(a)})}var V=`__TSR_index`,Ae=`popstate`,je=`beforeunload`;function Me(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({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=H(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};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[V];i=Ne(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[V];i=Ne(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),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[V]!==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}}function Ne(e,t){t||={};let n=U();return{...t,key:n,__TSR_key:n,[V]:e}}function Pe(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=e?.createHref??(e=>e),c=e?.parseLocation??(()=>H(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=U();t.history.replaceState({[V]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=H(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[V]-l.state[V],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 n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=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){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Me({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(je,S,{capture:!0}),t.removeEventListener(Ae,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(je,S,{capture:!0}),t.addEventListener(Ae,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Fe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function H(e,t){let n=Fe(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=U();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[V]:0,key:a,__TSR_key:a}}}function U(){return(Math.random()+1).toString(36).substring(7)}function Ie(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function W(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var G=new WeakMap,Le=class{constructor(t,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=b(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pe()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=O(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ke(ze(this.latestLocation),e),et(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=S(o);t&&t!==`/`&&e.push(Te({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:we(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&g(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state: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:p(e).path,external:!1,searchStr:o,search:h(t?.search,i),hash:p(r.slice(1)).path,state:A(t?.state,a)}}let o=new URL(i,this.origin),s=R(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:p(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:h(t?.search,c),hash:p(s.hash.slice(1)).path,state:A(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>w({base:e,to:t.includes(`//`)?E(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Be({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,m=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,d(t.params,c)),g=this.routesByPath[v(u)],_;if(g)_=this.getRouteBranch(g);else if(u.includes(`$`))_=[];else{let e=this.getMatchedRoutes(u);_=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(_=[..._,this.options.notFoundRoute])}if(_.length&&f(m))for(let e of _){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(m,t(m))}catch{}}let y=e.leaveParams?u:p(x({path:u,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,b=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};_.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,q(t.options.validateSearch,{...e,...b}))}catch{}}),b=e}b=Ve({search:b,dest:t,destRoutes:_,_includeValidateSearch:e._includeValidateSearch}),b=h(s,b);let S=this.options.stringifySearch(b),C=t.hash===!0?n.hash:t.hash?d(t.hash,n.hash):void 0,w=C?`#${C}`:``,T=t.state===!0?n.state:t.state?d(t.state,n.state):{};T=A(n.state,T);let E=`${y}${S}${w}`,D,O,k=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Ee(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,k=!0)}else D=a(E),O=D;return{publicHref:O,href:D,pathname:y,search:b,searchStr:S,state:T,hash:C??``,external:k,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ee(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,d(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=C(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=v(this.latestLocation.href)===v(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=s(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=H(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=R(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(m(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async t=>{let n=t?.action?.type,r,a,o,s=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad(),n?G.set(this.latestLocation,n):G.delete(this.latestLocation);let e=this.latestLocation,r=W(e,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await xe({router:this,sync:t?.sync,forceStaleReload:s.href===e.href,matches:this.stores.pendingMatches.get(),location:e,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(t){i(t)?(r=t,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):e(t)&&(a=t);let n=r?r.status:a?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(n),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(e=>e.status===`error`)&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(W(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&m(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=I,this.preloadRoute=async t=>{let n=t._builtLocation??this.buildLocation(t),r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:t}),a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),s=r.filter(e=>!o.has(e.id));if(s.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...s])}try{return r=await xe({router:this,matches:r,location:n,preload:!0,updateMatch:(e,t)=>{a.has(e)?r=r.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),r}catch(t){if(i(t))return t.options.reloadDocument?void 0:await this.preloadRoute({...t.options,_fromLocation:n});e(t)||console.error(t);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=k(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!C(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?C(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??`fuzzy`,stringifySearch:t.stringifySearch??oe,parseSearch:t.parseSearch??ae,protocolAllowlist:t.protocolAllowlist??_}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=D(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){let r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:o}=r,{matchedRoutes:c}=r,l=!1;(a?a.path!==`/`&&o[`**`]:v(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?Ue(this.options.notFoundMode,c):void 0,d=Array(c.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let r=0;r<c.length;r++){let a=c[r],l=d[r-1],p,m,g;{let e=l?.search??t.search,r=l?._strictSearch??void 0;try{let t=q(a.options.validateSearch,{...e})??void 0;p={...e,...t},m={...r,...t},g=void 0}catch(t){let r=t;if(t instanceof K||(r=new K(t.message,{cause:t})),n?.throwOnError)throw r;p=e,m={},g=r}}let _=a.options.loaderDeps?.({search:p})??``,v=_?JSON.stringify(_):``,{interpolatedPath:y,usedParams:b}=x({path:a.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),S=a.id+y+v,C=this.getMatch(S),w=f.get(a.id),T=C?._strictParams??b,E;if(!C)try{We(a,T)}catch(t){if(E=e(t)||i(t)?t:new Re(t.message,{cause:t}),n?.throwOnError)throw E}Object.assign(o,T);let D=w?`stay`:`enter`,O;if(C)O={...C,cause:D,params:w?.params??o,_strictParams:T,search:h(w?w.search:C.search,p),_strictSearch:m};else{let e=a.options.loader||a.options.beforeLoad||a.lazyFn||Ce(a)?`pending`:`success`;O={id:S,ssr:a.options.ssr,index:r,routeId:a.id,params:w?.params??o,_strictParams:T,pathname:y,updatedAt:Date.now(),search:w?h(w.search,p):p,_strictSearch:m,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:E,__routeContext:void 0,_nonReactive:{loadPromise:s()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:D,loaderDeps:w?A(w.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:a.options.staticData||{},fullPath:a.fullPath}}n?.preload||(O.globalNotFound=u===a.id),O.searchError=g;let k=this.getParentContext(l);O.context={...k,...O.__routeContext,...O.__beforeLoadContext},d[r]=O}for(let e=0;e<d.length;e++){let n=d[e],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?h(a.params,o):o,!i){let i=d[e-1],a=this.getParentContext(i);if(r.options.context){let e={deps:n.loaderDeps,params:n.params,context:a??{},location:t,navigate:e=>this.navigate({...e,_fromLocation:t}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:d,routeId:r.id};n.__routeContext=r.options.context(e)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return d}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=u(t),i={...e.search};for(let e of t)try{Object.assign(i,q(e.options.validateSearch,i))}catch{}let a=u(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{We(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},K=class extends Error{},Re=class extends Error{};function ze(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function q(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new K(`Async validation not supported`);if(n.issues)throw new K(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 Be({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=v(e),a,o=y(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Ve({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return He(n)(e,t,r??!1)}function He(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=q(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=d(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ue(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return te}function We(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Ge(){try{return sessionStorage}catch{return}}var Ke=`tsr-scroll-restoration-v1_3`,qe=Ge();function Je(){try{return JSON.parse(qe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ye(){try{qe?.setItem(Ke,JSON.stringify(J))}catch{}}var J=Je(),Y=`data-scroll-restoration-id`,Xe=e=>e.state.__TSR_key||e.href;function Ze(e){let t=e.getAttribute(Y);if(t)return`[${Y}="${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}function Qe(e,t){let n=J[(t.getKey||Xe)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${Y}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?Z:Ze(r)]}var X=!1,Z=`window`;function Q(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=[];for(let n of e){if(n===Z)continue;let e=Q(n);e&&t.push(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Xe,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(X||!r.restoring))if(e.target===document)o(Z,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=J[e]||={};for(let[e,n]of a)e===Z?t[Z]=n:e.isConnected&&(t[Ze(e)]=n)};n&&!r.restoration&&(r.restoration=!0,X=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ye()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=J[u];if(e){let t=J[l];for(let n in e){if(n===Z){if(s)continue}else{let e=Q(n);if(!e||s&&o&&(c??=$e(o),c.includes(e)))continue}t||=J[l]={},t[n]??=e[n]}}}X=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=G.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?J[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Z){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Q(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=$e(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{X=!1}}))}var $=e=>typeof e==`string`&&e.length>0?e:void 0,tt=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0;function nt(e){if(e.pathname===`/installations`){let t=rt(e.search);if(t.query===void 0&&t.installId===void 0)return`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsCursor=${t.eventsCursor??`first`}`}return e.state.__TSR_key}function rt(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:$(e.eventsCursor),eventsBefore:tt(e.eventsBefore),searchCursor:$(e.searchCursor),historyCursor:$(e.historyCursor),historyBefore:tt(e.historyBefore)}}var it=ne(`/installations`)({component:re(()=>ie(()=>import(`./installations-CStZja8x.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),`component`),validateSearch:rt});export{Le as a,De as c,et as i,Oe as l,nt as n,Ie as o,Qe as r,W as s,it as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-BzoHWuXw.js","assets/createServerFn-DHc2erub.js","assets/link-BG06whwB.js","assets/InsightsPageHeader-C-Xc2MB9.js","assets/chart-no-axes-combined-C0G0fQ3J.js","assets/card-BEvx_QKh.js","assets/table-BBEzJ7Xl.js","assets/input-group-BbHfaBzQ.js","assets/dist-Bh1gaDfB.js","assets/refresh-cw-DZgiAOMk.js","assets/badge-BuMDU0Rf.js","assets/field-79SVH26s.js"])))=>i.map(i=>d[i]);
2
+ import{Cr as e,Sr as t,Tr as n,br as r,wr as i}from"./createServerFn-DHc2erub.js";import{A as a,C as o,D as s,E as c,I as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,_ as v,b as y,d as b,f as x,h as S,k as C,m as w,p as T,u as E,v as D,w as O,x as k,y as ee,z as A}from"./link-BG06whwB.js";import{a as te,n as ne,t as re}from"./lazyRouteComponent-BN0MS05o.js";import{t as ie}from"./preload-helper-uTix4PVD.js";var ae=se(JSON.parse),oe=ce(JSON.stringify,JSON.parse);function se(e){return n=>{n[0]===`?`&&(n=n.substring(1));let r=t(n);for(let t in r){let n=r[t];if(typeof n==`string`)try{r[t]=e(n)}catch{}}return r}}function ce(t,n){let r=typeof n==`function`;function i(e){if(typeof e==`object`&&e)try{return t(e)}catch{}else if(r&&typeof e==`string`)try{return n(e),t(e)}catch{}return e}return t=>{let n=e(t,i);return n?`?${n}`:``}}var j=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},le=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),M=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),N=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},ue=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},P=(e,t,n)=>{if(!(!r(n)&&!i(n)))throw r(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r(n)?`redirected`:i(n)?`notFound`:a.status===`pending`?`success`:a.status,context:N(e,t.index),isFetching:!1,error:n})),i(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),r(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},de=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},fe=(e,t,n)=>{let r=N(e,n);e.updateMatch(t,e=>({...e,context:r}))},F=(e,t,n)=>{let{id:a,routeId:o}=e.matches[t],s=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,P(e,e.router.getMatch(a),n);try{s.options.onError?.(n)}catch(t){n=t,P(e,e.router.getMatch(a),n)}e.updateMatch(a,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!r(n)&&!i(n)&&(e.serialError??=n)},pe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!M(e,t)&&(n.options.loader||n.options.beforeLoad||Ce(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{j(e)},i);r._nonReactive.pendingTimeout=t}},me=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&P(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},he=(e,t,n,a)=>{let o=e.router.getMatch(t),c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=s(()=>{c?.resolve(),c=void 0});let{paramsError:u,searchError:d}=o;u&&F(e,n,u),d&&F(e,n,d),pe(e,t,a,o);let f=new AbortController,p=!1,m=()=>{p||(p=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:f})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{m(),h()});return}o._nonReactive.beforeLoadPromise=s();let g={...N(e,n,!1),...o.__routeContext},{search:_,params:v,cause:y}=o,b=M(e,t),x={search:_,abortController:f,params:v,preload:b,context:g,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:b?`preload`:y,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},S=a=>{if(a===void 0){e.router.batch(()=>{m(),h()});return}(r(a)||i(a))&&(m(),F(e,n,a)),e.router.batch(()=>{m(),e.updateMatch(t,e=>({...e,__beforeLoadContext:a})),h()})},C;try{if(C=a.options.beforeLoad(x),l(C))return m(),C.catch(t=>{F(e,n,t)}).then(S)}catch(t){m(),F(e,n,t)}S(C)},ge=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>he(e,n,t,i),s=()=>{if(de(e,n))return;let t=me(e,n,i);return l(t)?t.then(o):o()};return a()},_e=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=N(e,r),d=M(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ye=async(e,t,n,a,o)=>{try{let s=e.router.getMatch(n);try{I(o);let r=o.options.loader,i=typeof r==`function`?r:r?.handler,c=i?.(ve(e,t,n,a,o)),u=!!i&&l(c);if((u||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),i){let t=u?await c:c;P(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}o._lazyPromise&&await o._lazyPromise;let d=s._nonReactive.minPendingPromise;d&&await d,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:N(e,a),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let c=t;if(c?.name===`AbortError`){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:N(e,a)}));return}let l=s._nonReactive.minPendingPromise;l&&await l,i(t)&&await o.options.notFoundComponent?.preload?.(),P(e,e.router.getMatch(n),t);try{o.options.onError?.(t)}catch(t){c=t,P(e,e.router.getMatch(n),t)}!r(c)&&!i(c)&&await I(o,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:c,context:N(e,a),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),P(e,r,t)}},be=async(e,t,n)=>{async function i(i,o,s,u,d){let p=Date.now()-o.updatedAt,m=i?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,h=d.options.shouldReload,g=typeof h==`function`?h(ve(e,t,a,n,d)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||s!==void 0&&s!==u.id);c=_===`success`&&(v||(g??y)),i&&d.options.preload===!1||(c&&!e.sync&&f?(l=!0,(async()=>{try{await ye(e,t,a,n,d);let r=e.router.getMatch(a);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){r(t)&&await e.router.navigate(t.options)}})()):_!==`success`||c?await ye(e,t,a,n,d):fe(e,a,n))}let{id:a,routeId:o}=e.matches[n],c=!1,l=!1,u=e.router.looseRoutesById[o],d=u.options.loader,f=((typeof d==`function`?void 0:d?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(de(e,a)){if(!e.router.getMatch(a))return e.matches[n];fe(e,a,n)}else{let t=e.router.getMatch(a),r=e.router.stores.matchesId.get()[n],c=(r&&e.router.stores.matchStores.get(r)||null)?.routeId===o?r:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,l=M(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&f)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),r=n._nonReactive.error||n.error;r&&P(e,n,r),n.status===`pending`&&await i(l,t,c,n,u)}else{let n=l&&!e.router.stores.matchStores.has(a),r=e.router.getMatch(a);r._nonReactive.loaderPromise=s(),n!==r.preload&&e.updateMatch(a,e=>({...e,preload:n})),await i(l,t,c,r,u)}}let p=e.router.getMatch(a);l||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,l||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;let m=l?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:m,invalid:!1})),e.router.getMatch(a)):p};async function xe(e){let t=e,a=[];le(t.router)&&j(t);let o;for(let e=0;e<t.matches.length;e++){try{let n=ge(t,e);l(n)&&await n}catch(e){if(r(e))throw e;if(i(e))o=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let s=t.firstBadMatchIndex??t.matches.length,c=o&&!t.preload?ue(t,o):void 0,u=o&&t.preload?0:c===void 0?s:Math.min(c+1,s),d,f;for(let e=0;e<u;e++)a.push(be(t,a,e));try{await Promise.all(a)}catch{let e=await Promise.allSettled(a);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(r(e))throw e;i(e)?d??=e:f??=e}if(f!==void 0)throw f}let p=d??(o&&!t.preload?o:void 0),m=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!p&&o&&t.preload)return t.matches;if(p){let e=ue(t,p);e===void 0&&n();let r=t.matches[e],i=t.router.looseRoutesById[r.routeId],a=t.router.options?.defaultNotFoundComponent;!i.options.notFoundComponent&&a&&(i.options.notFoundComponent=a),p.routeId=r.routeId;let o=r.routeId===t.router.routeTree.id;t.updateMatch(r.id,e=>({...e,...o?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:p},isFetching:!1})),m=e,await I(i,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await I(e,[`errorComponent`])}for(let e=0;e<=m;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=_e(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let h=j(t);if(l(h)&&await h,p)throw p;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Se(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function I(e,t=L){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===L?(()=>{if(e._componentsPromise===void 0){let t=Se(e,L);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Se(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ce(e){for(let t of L)if(e.options[t]?.preload)return!0;return!1}var L=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function we(e){return{input:({url:t})=>{for(let n of e)t=R(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ee(e[n],t);return t}}}function Te(e){let t=S(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=T([`/`,t,e.pathname]),e)}}function R(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 Ee(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 De(e){let t=e;return{get(){return t},set(e){t=d(e,t)}}}function Oe(e){return{get(){return e()}}}function ke(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>z(o,_.get())),x=r(()=>z(s,v.get())),S=r(()=>z(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=O(64);function k(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let ee={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:k,setMatches:A,setPending:te,setCached:ne};A(e.matches),a?.(ee);function A(e){B(e,o,_,n,i)}function te(e){B(e,s,v,n,i)}function ne(e){B(e,c,y,n,i)}return ee}function z(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function B(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}c(n.get(),a)||n.set(a)})}var V=`__TSR_index`,Ae=`popstate`,je=`beforeunload`;function Me(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({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=H(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};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[V];i=Ne(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[V];i=Ne(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),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[V]!==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}}function Ne(e,t){t||={};let n=U();return{...t,key:n,__TSR_key:n,[V]:e}}function Pe(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=e?.createHref??(e=>e),c=e?.parseLocation??(()=>H(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=U();t.history.replaceState({[V]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=H(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[V]-l.state[V],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 n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=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){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Me({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(je,S,{capture:!0}),t.removeEventListener(Ae,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(je,S,{capture:!0}),t.addEventListener(Ae,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Fe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function H(e,t){let n=Fe(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=U();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[V]:0,key:a,__TSR_key:a}}}function U(){return(Math.random()+1).toString(36).substring(7)}function Ie(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function W(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var G=new WeakMap,Le=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=b(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pe()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=O(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ke(ze(this.latestLocation),e),et(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=S(o);t&&t!==`/`&&e.push(Te({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:we(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&g(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state: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:p(e).path,external:!1,searchStr:o,search:h(t?.search,i),hash:p(r.slice(1)).path,state:A(t?.state,a)}}let o=new URL(i,this.origin),s=R(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:p(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:h(t?.search,c),hash:p(s.hash.slice(1)).path,state:A(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>w({base:e,to:t.includes(`//`)?E(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Be({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,m=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,d(t.params,c)),g=this.routesByPath[v(u)],_;if(g)_=this.getRouteBranch(g);else if(u.includes(`$`))_=[];else{let e=this.getMatchedRoutes(u);_=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(_=[..._,this.options.notFoundRoute])}if(_.length&&f(m))for(let e of _){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(m,t(m))}catch{}}let y=e.leaveParams?u:p(x({path:u,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,b=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};_.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,q(t.options.validateSearch,{...e,...b}))}catch{}}),b=e}b=Ve({search:b,dest:t,destRoutes:_,_includeValidateSearch:e._includeValidateSearch}),b=h(s,b);let S=this.options.stringifySearch(b),C=t.hash===!0?n.hash:t.hash?d(t.hash,n.hash):void 0,w=C?`#${C}`:``,T=t.state===!0?n.state:t.state?d(t.state,n.state):{};T=A(n.state,T);let E=`${y}${S}${w}`,D,O,k=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Ee(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,k=!0)}else D=a(E),O=D;return{publicHref:O,href:D,pathname:y,search:b,searchStr:S,state:T,hash:C??``,external:k,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ee(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,d(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=C(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=v(this.latestLocation.href)===v(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=s(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=H(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=R(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(m(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,a,o,s=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad(),t?G.set(this.latestLocation,t):G.delete(this.latestLocation);let n=this.latestLocation,r=W(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await xe({router:this,sync:e?.sync,forceStaleReload:s.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){r(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):i(e)&&(a=e);let t=n?n.status:a?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(e=>e.status===`error`)&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(W(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&m(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=I,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),s=n.filter(e=>!o.has(e.id));if(s.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...s])}try{return n=await xe({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{a.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(r(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});i(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=k(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!C(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?C(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??oe,parseSearch:e.parseSearch??ae,protocolAllowlist:e.protocolAllowlist??_}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=D(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:o}=n,{matchedRoutes:c}=n,l=!1;(a?a.path!==`/`&&o[`**`]:v(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?Ue(this.options.notFoundMode,c):void 0,d=Array(c.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let n=0;n<c.length;n++){let a=c[n],l=d[n-1],p,m,g;{let n=l?.search??e.search,r=l?._strictSearch??void 0;try{let e=q(a.options.validateSearch,{...n})??void 0;p={...n,...e},m={...r,...e},g=void 0}catch(e){let r=e;if(e instanceof K||(r=new K(e.message,{cause:e})),t?.throwOnError)throw r;p=n,m={},g=r}}let _=a.options.loaderDeps?.({search:p})??``,v=_?JSON.stringify(_):``,{interpolatedPath:y,usedParams:b}=x({path:a.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),S=a.id+y+v,C=this.getMatch(S),w=f.get(a.id),T=C?._strictParams??b,E;if(!C)try{We(a,T)}catch(e){if(E=i(e)||r(e)?e:new Re(e.message,{cause:e}),t?.throwOnError)throw E}Object.assign(o,T);let D=w?`stay`:`enter`,O;if(C)O={...C,cause:D,params:w?.params??o,_strictParams:T,search:h(w?w.search:C.search,p),_strictSearch:m};else{let e=a.options.loader||a.options.beforeLoad||a.lazyFn||Ce(a)?`pending`:`success`;O={id:S,ssr:a.options.ssr,index:n,routeId:a.id,params:w?.params??o,_strictParams:T,pathname:y,updatedAt:Date.now(),search:w?h(w.search,p):p,_strictSearch:m,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:E,__routeContext:void 0,_nonReactive:{loadPromise:s()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:D,loaderDeps:w?A(w.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:a.options.staticData||{},fullPath:a.fullPath}}t?.preload||(O.globalNotFound=u===a.id),O.searchError=g;let k=this.getParentContext(l);O.context={...k,...O.__routeContext,...O.__beforeLoadContext},d[n]=O}for(let t=0;t<d.length;t++){let n=d[t],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?h(a.params,o):o,!i){let i=d[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:d,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return d}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=u(t),i={...e.search};for(let e of t)try{Object.assign(i,q(e.options.validateSearch,i))}catch{}let a=u(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{We(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},K=class extends Error{},Re=class extends Error{};function ze(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function q(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new K(`Async validation not supported`);if(n.issues)throw new K(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 Be({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=v(e),a,o=y(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Ve({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return He(n)(e,t,r??!1)}function He(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=q(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=d(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ue(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return te}function We(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Ge(){try{return sessionStorage}catch{return}}var Ke=`tsr-scroll-restoration-v1_3`,qe=Ge();function Je(){try{return JSON.parse(qe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ye(){try{qe?.setItem(Ke,JSON.stringify(J))}catch{}}var J=Je(),Y=`data-scroll-restoration-id`,Xe=e=>e.state.__TSR_key||e.href;function Ze(e){let t=e.getAttribute(Y);if(t)return`[${Y}="${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}function Qe(e,t){let n=J[(t.getKey||Xe)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${Y}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?Z:Ze(r)]}var X=!1,Z=`window`;function Q(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=[];for(let n of e){if(n===Z)continue;let e=Q(n);e&&t.push(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Xe,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(X||!r.restoring))if(e.target===document)o(Z,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=J[e]||={};for(let[e,n]of a)e===Z?t[Z]=n:e.isConnected&&(t[Ze(e)]=n)};n&&!r.restoration&&(r.restoration=!0,X=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ye()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=J[u];if(e){let t=J[l];for(let n in e){if(n===Z){if(s)continue}else{let e=Q(n);if(!e||s&&o&&(c??=$e(o),c.includes(e)))continue}t||=J[l]={},t[n]??=e[n]}}}X=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=G.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?J[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Z){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Q(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=$e(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{X=!1}}))}var $=e=>typeof e==`string`&&e.length>0?e:void 0,tt=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0;function nt(e){if(e.pathname===`/installations`){let t=rt(e.search);if(t.query===void 0&&t.installId===void 0)return`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsCursor=${t.eventsCursor??`first`}`}return e.state.__TSR_key}function rt(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:$(e.eventsCursor),eventsBefore:tt(e.eventsBefore),searchCursor:$(e.searchCursor),historyCursor:$(e.historyCursor),historyBefore:tt(e.historyBefore)}}var it=ne(`/installations`)({component:re(()=>ie(()=>import(`./installations-BzoHWuXw.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),`component`),validateSearch:rt});export{Le as a,De as c,et as i,Oe as l,nt as n,Ie as o,Qe as r,W as s,it as t};
@@ -1 +1 @@
1
- import{Dr as e,Zn as t,br as n,kr as r,wr as i}from"./createServerFn-CA8fs7QD.js";import{F as a,_ as o,g as s,n as c,p as l,r as u,s as d,t as f,z as p}from"./link-CI8idAUi.js";var m=`__root__`,h=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.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=m:this.parentRoute||i();let r=n?m:t?.path;r&&r!==`/`&&(r=s(r));let a=t?.id||r,c=n?m:l([this.parentRoute.id===`__root__`?``:this.parentRoute.id,a]);r===`__root__`&&(r=`/`),c!==`__root__`&&(c=l([`/`,c]));let u=c===`__root__`?`/`:l([this.parentRoute.fullPath,r]);this._path=r,this._id=c,this._fullPath=u,this._to=o(u)},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=>n({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.`)}},g=class extends h{constructor(e){super(e)}},_=r(e(),1),v=_.createContext(void 0),y=_.createContext(void 0),b={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function x(e){let t=u(),n=_.useContext(e.from?y:v),r=e.from??n,a=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=_.useRef(void 0);return c(a??b,n=>{if((e.shouldThrow??!0)&&!n&&i(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=p(o.current,r);return o.current=e,e}return r})}function S(e){return x({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function C(e){let{select:t,...n}=e;return x({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function w(e){return x({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 T(e){return x({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function E(e){let t=u();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function D(e){return x({...e,select:t=>e.select?e.select(t.context):t.context})}var O=t(),k=class extends h{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function A(e){return new k(e)}function j(){return e=>N(e)}var M=class extends g{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function N(e){return new M(e)}function P(e){return new F(e,{silent:!0}).createRoute}var F=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=A(e);return t.isRoot=!1,t},this.silent=t?.silent}};function I(e,t){let n,r,i,o,s=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,a(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(d)d(s());else throw s();return _.createElement(r,e)};return c.preload=s,c}export{m as a,v as i,P as n,j as r,I as t};
1
+ import{Or as e,Qn as t,Tr as n,jr as r,xr as i}from"./createServerFn-DHc2erub.js";import{F as a,_ as o,g as s,n as c,p as l,r as u,s as d,t as f,z as p}from"./link-BG06whwB.js";var m=`__root__`,h=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.originalIndex;let t=this.options,r=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=m:this.parentRoute||n();let i=r?m:t?.path;i&&i!==`/`&&(i=s(i));let a=t?.id||i,c=r?m:l([this.parentRoute.id===`__root__`?``:this.parentRoute.id,a]);i===`__root__`&&(i=`/`),c!==`__root__`&&(c=l([`/`,c]));let u=c===`__root__`?`/`:l([this.parentRoute.fullPath,i]);this._path=i,this._id=c,this._fullPath=u,this._to=o(u)},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=>i({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.`)}},g=class extends h{constructor(e){super(e)}},_=r(e(),1),v=_.createContext(void 0),y=_.createContext(void 0),b={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function x(e){let t=u(),r=_.useContext(e.from?y:v),i=e.from??r,a=i?e.from?t.stores.getRouteMatchStore(i):t.stores.matchStores.get(i):void 0,o=_.useRef(void 0);return c(a??b,r=>{if((e.shouldThrow??!0)&&!r&&n(),r===void 0)return;let i=e.select?e.select(r):r;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=p(o.current,i);return o.current=e,e}return i})}function S(e){return x({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function C(e){let{select:t,...n}=e;return x({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function w(e){return x({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 T(e){return x({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function E(e){let t=u();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function D(e){return x({...e,select:t=>e.select?e.select(t.context):t.context})}var O=t(),k=class extends h{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function A(e){return new k(e)}function j(){return e=>N(e)}var M=class extends g{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function N(e){return new M(e)}function P(e){return new F(e,{silent:!0}).createRoute}var F=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=A(e);return t.isRoot=!1,t},this.silent=t?.silent}};function I(e,t){let n,r,i,o,s=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,a(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(d)d(s());else throw s();return _.createElement(r,e)};return c.preload=s,c}export{m as a,v as i,P as n,j as r,I as t};
@@ -1 +1 @@
1
- import{Dr as e,Er as t,Kn as n,Zn as r,kr as i,wr as a}from"./createServerFn-CA8fs7QD.js";function o(e){return e[e.length-1]}function s(e){return typeof e==`function`}function c(e,t){return s(e)?e(t):e}var l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function d(e){for(let t in e)if(l.call(e,t))return!0;return!1}var f=()=>Object.create(null),p=(e,t)=>m(e,t,f);function m(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=v(e)&&v(i);if(!a&&!(g(e)&&g(i)))return i;let o=a?e:h(e);if(!o)return i;let s=a?i:h(i);if(!s)return i;let c=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;t<u;t++){let o=a?t:s[t],u=e[o],p=i[o];if(u===p){d[o]=u,(a?t<c:l.call(e,o))&&f++;continue}if(u===null||p===null||typeof u!=`object`||typeof p!=`object`){d[o]=p;continue}let h=m(u,p,n,r+1);d[o]=h,h===u&&f++}return c===u&&f===c?e:d}function h(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!u.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!u.call(e,t))return!1;r.push(t)}return r}function g(e){if(!_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!_(n)||!n.hasOwnProperty(`isPrototypeOf`))}function _(e){return Object.prototype.toString.call(e)===`[object Object]`}function v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function y(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!y(e[r],t[r],n))return!1;return!0}if(g(e)&&g(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!y(e[i],t[i],n))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++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!y(e[o],t[o],n)))return!1;return i===a}return!1}function b(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function x(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}function S(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function C(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function w(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 C(t)}var T=[`http:`,`https:`,`mailto:`,`tel:`];function ee(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var E={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},D=/[&><\u2028\u2029]/g;function O(e){return e.replace(D,e=>E[e])}function te(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=w(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=w(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ne(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function re(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 k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,ie=5;function ae(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function oe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ae(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function j(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=oe(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=N(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=N(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=P(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=N(n.fullPath??n.from);e.kind=ie,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=N(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)j(e,t,r,s,i,a,o)}function se(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 M(e){if(e.pathless)for(let t of e.pathless)M(t);if(e.static)for(let t of e.static.values())M(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())M(t);if(e.dynamic?.length){e.dynamic.sort(se);for(let t of e.dynamic)M(t)}if(e.optional?.length){e.optional.sort(se);for(let t of e.optional)M(t)}if(e.wildcard?.length){e.wildcard.sort(se);for(let t of e.wildcard)M(t)}}function N(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function P(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function F(e,t){let n=N(`/`),r=new Uint16Array(6);for(let t of e)j(!1,r,t,1,n,0);M(n),t.masksTree=n,t.flatCache=k(1e3)}function I(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=z(e,t.masksTree);return t.flatCache.set(e,r),r}function ce(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(`/`),j(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),z(r,o,n)}function le(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=z(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=V(a.route)),t.matchCache.set(r,a),a}function L(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function R(e,t=!1,n){let r=N(e.fullPath),i=new Uint16Array(6),o={},s={},c=0;return j(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in o&&a(),o[e.id]=e,c!==0&&e.path){let t=L(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++}),M(r),{processedTree:{segmentTree:r,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function z(e,t,n=!1){let r=e.split(`/`),i=ue(e,r,t,n);if(!i)return null;let[a]=B(e,r,i);return{route:i.node.route,rawParams:a}}function B(e,t,n){let r=H(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===ie){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function V(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function H(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ue(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!o(t),a=i&&e!==`/`,s=t.length-+!!i,c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:o,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!K(u,n))continue;if(i.parse){if(!G(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&K(l,n)&&(l=n);let v=o===s;if(v&&(i.route&&(!a||i.kind===A||i.kind===2)&&K(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[o],b;if(v&&i.index){let n={node:i.index,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(G(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&W(p,s))return n;K(u,n)&&(u=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&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(o).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}c.push({node:n,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];c.push({node:r,index:o,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}c.push({node:n,index:o+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+U(s,o),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)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?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:o+1,skipped:d,depth:f+1,statics:p,dynamics:m+U(s,o),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:o,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function U(e,t){return 2**(e-t-1)}function W(e,t){return e===2**(t-1)-1}function G(e,t,n){let r,i;try{[r,i]=B(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 K(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===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function q(e){return J(e.filter(e=>e!==void 0).join(`/`))}function J(e){return e.replace(/\/{2,}/g,`/`)}function de(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Y(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function fe(e){return Y(de(e))}function X(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function pe(e,t,n){return X(e,n)===X(t,n)}function me({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,s;if(r){s=i?t:a?e:e+`\0`+t;let n=r.get(s);if(n)return n}let c;if(a)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&o(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&c.push(r):c=[r]:r===`..`?c.pop():r===`.`||c.push(r)}}c.length>1&&(o(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=J(c.join(`/`))||`/`;return s&&r&&r.set(s,l),l}function he(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function ge(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>ve(e,n)).join(`/`):ve(r,n):r}function _e({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=oe(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=ge(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function ve(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ye=`Error preloading route! ☝️`,Z=i(e(),1),be=Z.use,xe=typeof window<`u`?Z.useLayoutEffect:Z.useEffect;function Se(e){let t=Z.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ce(e,t,n={},r={}){Z.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function we(e){let t=Z.useRef(null);return Z.useImperativeHandle(e,()=>t.current,[]),t}var Te=r();function Ee({children:e,fallback:t=null}){return De()?(0,Te.jsx)(Z.Fragment,{children:e}):(0,Te.jsx)(Z.Fragment,{children:t})}function De(){return Z.useSyncExternalStore(Oe,()=>!0,()=>!1)}function Oe(){return()=>{}}var ke=Z.createContext(null);function Ae(e){return Z.useContext(ke)}var je=n();function Me(e,t){return e===t}function Ne(e,t,n=Me){let r=(0,Z.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,Z.useCallback)(()=>e?.get(),[e]);return(0,je.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Pe=i(t(),1);function Fe(e,t){let n=Ae(),r=we(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:v,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:te,params:ne,search:re,hash:k,state:A,mask:ie,reloadDocument:ae,unsafeRelative:oe,from:j,_fromLocation:se,...M}=e,N=De(),P=Z.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),F=Ne(n.stores.location,e=>e,(e,t)=>e.href===t.href),I=Z.useMemo(()=>{let e={_fromLocation:F,...P};return n.buildLocation(e)},[n,F,P]),ce=I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,le=I.maskedLocation?I.maskedLocation.external:I.external,L=Z.useMemo(()=>He(ce,le,n.history,b),[b,le,ce,n.history]),R=Z.useMemo(()=>{if(L?.external)return ee(L.href,n.protocolAllowlist)?void 0:L.href;if(!Ue(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),ee(s,n.protocolAllowlist)?void 0:s}catch{}},[s,L,n.protocolAllowlist]),z=Z.useMemo(()=>{if(R)return!1;if(o?.exact){if(!pe(F.pathname,I.pathname,n.basepath))return!1}else{let e=X(F.pathname,n.basepath),t=X(I.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!y(F.search,I.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?N&&F.hash===I.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,F,R,N,I.hash,I.pathname,I.search,n.basepath]),B=z?c(i,{})??Le:Ie,V=z?Ie:c(a,{})??Ie,H=[S,B.className,V.className].filter(Boolean).join(` `),ue=(x||B.style||V.style)&&{...x,...B.style,...V.style},[U,W]=Z.useState(!1),G=Z.useRef(!1),K=e.reloadDocument||R?!1:l??n.options.defaultPreload,q=u??n.options.defaultPreloadDelay??0,J=Z.useCallback(()=>{n.preloadRoute({...P,_builtLocation:I}).catch(e=>{console.warn(e),console.warn(ye)})},[n,P,I]);Ce(r,Z.useCallback(e=>{e?.isIntersecting&&J()},[J]),Ve,{disabled:!!b||K!==`viewport`}),Z.useEffect(()=>{G.current||!b&&K===`render`&&(J(),G.current=!0)},[b,J,K]);let de=e=>{let t=e.currentTarget.getAttribute(`target`),r=v===void 0?t:v;if(!b&&!Ge(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Pe.flushSync)(()=>{W(!0)});let t=n.subscribe(`onResolved`,()=>{t(),W(!1)});n.navigate({...P,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:te})}};if(R)return{...M,ref:r,href:R,..._&&{children:_},...v&&{target:v},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let Y=e=>{if(b||K!==`intent`)return;if(!q){J();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),J()},q);Q.set(t,n)},fe=e=>{b||K!==`intent`||J()},me=e=>{if(b||!K||!q)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...M,...B,...V,href:L?.href,ref:r,onClick:$([C,de]),onBlur:$([w,me]),onFocus:$([T,Y]),onMouseEnter:$([E,Y]),onMouseLeave:$([D,me]),onTouchStart:$([O,fe]),disabled:!!b,target:v,...ue&&{style:ue},...H&&{className:H},...b&&Re,...z&&ze,...N&&U&&Be}}var Ie={},Le={className:`active`},Re={role:`link`,"aria-disabled":!0},ze={"data-status":`active`,"aria-current":`page`},Be={"data-transitioning":`transitioning`},Q=new WeakMap,Ve={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function He(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ue(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var We=Z.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Fe(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return Z.createElement(`a`,t,o)}return Z.createElement(n,a,o)});function Ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{ne as A,R as C,b as D,re as E,x as F,S as I,o as L,c as M,d as N,te as O,ee as P,p as R,F as S,T,Y as _,Ee as a,le as b,xe as c,he as d,_e as f,de as g,fe as h,ke as i,O as j,y as k,Se as l,me as m,Ne as n,De as o,q as p,Ae as r,be as s,We as t,J as u,V as v,k as w,ce as x,I as y,m as z};
1
+ import{Dr as e,Or as t,Qn as n,Tr as r,jr as i,qn as a}from"./createServerFn-DHc2erub.js";function o(e){return e[e.length-1]}function s(e){return typeof e==`function`}function c(e,t){return s(e)?e(t):e}var l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function d(e){for(let t in e)if(l.call(e,t))return!0;return!1}var f=()=>Object.create(null),p=(e,t)=>m(e,t,f);function m(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=v(e)&&v(i);if(!a&&!(g(e)&&g(i)))return i;let o=a?e:h(e);if(!o)return i;let s=a?i:h(i);if(!s)return i;let c=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;t<u;t++){let o=a?t:s[t],u=e[o],p=i[o];if(u===p){d[o]=u,(a?t<c:l.call(e,o))&&f++;continue}if(u===null||p===null||typeof u!=`object`||typeof p!=`object`){d[o]=p;continue}let h=m(u,p,n,r+1);d[o]=h,h===u&&f++}return c===u&&f===c?e:d}function h(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!u.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!u.call(e,t))return!1;r.push(t)}return r}function g(e){if(!_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!_(n)||!n.hasOwnProperty(`isPrototypeOf`))}function _(e){return Object.prototype.toString.call(e)===`[object Object]`}function v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function y(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!y(e[r],t[r],n))return!1;return!0}if(g(e)&&g(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!y(e[i],t[i],n))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++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!y(e[o],t[o],n)))return!1;return i===a}return!1}function b(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function x(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}function S(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function C(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function w(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 C(t)}var T=[`http:`,`https:`,`mailto:`,`tel:`];function ee(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var E={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},D=/[&><\u2028\u2029]/g;function O(e){return e.replace(D,e=>E[e])}function te(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=w(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=w(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ne(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function re(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 k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,ie=5;function ae(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function oe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ae(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function j(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=oe(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=N(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=N(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=P(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=N(n.fullPath??n.from);e.kind=ie,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=N(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)j(e,t,r,s,i,a,o)}function se(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 M(e){if(e.pathless)for(let t of e.pathless)M(t);if(e.static)for(let t of e.static.values())M(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())M(t);if(e.dynamic?.length){e.dynamic.sort(se);for(let t of e.dynamic)M(t)}if(e.optional?.length){e.optional.sort(se);for(let t of e.optional)M(t)}if(e.wildcard?.length){e.wildcard.sort(se);for(let t of e.wildcard)M(t)}}function N(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function P(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function F(e,t){let n=N(`/`),r=new Uint16Array(6);for(let t of e)j(!1,r,t,1,n,0);M(n),t.masksTree=n,t.flatCache=k(1e3)}function I(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=z(e,t.masksTree);return t.flatCache.set(e,r),r}function ce(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(`/`),j(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),z(r,o,n)}function le(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=z(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=V(a.route)),t.matchCache.set(r,a),a}function L(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function R(e,t=!1,n){let i=N(e.fullPath),a=new Uint16Array(6),o={},s={},c=0;return j(t,a,e,1,i,0,e=>{if(n?.(e,c),e.id in o&&r(),o[e.id]=e,c!==0&&e.path){let t=L(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++}),M(i),{processedTree:{segmentTree:i,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function z(e,t,n=!1){let r=e.split(`/`),i=ue(e,r,t,n);if(!i)return null;let[a]=B(e,r,i);return{route:i.node.route,rawParams:a}}function B(e,t,n){let r=H(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===ie){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function V(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function H(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ue(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!o(t),a=i&&e!==`/`,s=t.length-+!!i,c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:o,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!K(u,n))continue;if(i.parse){if(!G(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&K(l,n)&&(l=n);let v=o===s;if(v&&(i.route&&(!a||i.kind===A||i.kind===2)&&K(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[o],b;if(v&&i.index){let n={node:i.index,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(G(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&W(p,s))return n;K(u,n)&&(u=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&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(o).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}c.push({node:n,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];c.push({node:r,index:o,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}c.push({node:n,index:o+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+U(s,o),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)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?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:o+1,skipped:d,depth:f+1,statics:p,dynamics:m+U(s,o),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:o,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function U(e,t){return 2**(e-t-1)}function W(e,t){return e===2**(t-1)-1}function G(e,t,n){let r,i;try{[r,i]=B(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 K(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===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function q(e){return J(e.filter(e=>e!==void 0).join(`/`))}function J(e){return e.replace(/\/{2,}/g,`/`)}function de(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Y(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function fe(e){return Y(de(e))}function X(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function pe(e,t,n){return X(e,n)===X(t,n)}function me({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,s;if(r){s=i?t:a?e:e+`\0`+t;let n=r.get(s);if(n)return n}let c;if(a)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&o(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&c.push(r):c=[r]:r===`..`?c.pop():r===`.`||c.push(r)}}c.length>1&&(o(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=J(c.join(`/`))||`/`;return s&&r&&r.set(s,l),l}function he(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function ge(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>ve(e,n)).join(`/`):ve(r,n):r}function _e({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=oe(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=ge(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function ve(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ye=`Error preloading route! ☝️`,Z=i(t(),1),be=Z.use,xe=typeof window<`u`?Z.useLayoutEffect:Z.useEffect;function Se(e){let t=Z.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ce(e,t,n={},r={}){Z.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function we(e){let t=Z.useRef(null);return Z.useImperativeHandle(e,()=>t.current,[]),t}var Te=n();function Ee({children:e,fallback:t=null}){return De()?(0,Te.jsx)(Z.Fragment,{children:e}):(0,Te.jsx)(Z.Fragment,{children:t})}function De(){return Z.useSyncExternalStore(Oe,()=>!0,()=>!1)}function Oe(){return()=>{}}var ke=Z.createContext(null);function Ae(e){return Z.useContext(ke)}var je=a();function Me(e,t){return e===t}function Ne(e,t,n=Me){let r=(0,Z.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,Z.useCallback)(()=>e?.get(),[e]);return(0,je.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Pe=i(e(),1);function Fe(e,t){let n=Ae(),r=we(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:v,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:te,params:ne,search:re,hash:k,state:A,mask:ie,reloadDocument:ae,unsafeRelative:oe,from:j,_fromLocation:se,...M}=e,N=De(),P=Z.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),F=Ne(n.stores.location,e=>e,(e,t)=>e.href===t.href),I=Z.useMemo(()=>{let e={_fromLocation:F,...P};return n.buildLocation(e)},[n,F,P]),ce=I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,le=I.maskedLocation?I.maskedLocation.external:I.external,L=Z.useMemo(()=>He(ce,le,n.history,b),[b,le,ce,n.history]),R=Z.useMemo(()=>{if(L?.external)return ee(L.href,n.protocolAllowlist)?void 0:L.href;if(!Ue(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),ee(s,n.protocolAllowlist)?void 0:s}catch{}},[s,L,n.protocolAllowlist]),z=Z.useMemo(()=>{if(R)return!1;if(o?.exact){if(!pe(F.pathname,I.pathname,n.basepath))return!1}else{let e=X(F.pathname,n.basepath),t=X(I.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!y(F.search,I.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?N&&F.hash===I.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,F,R,N,I.hash,I.pathname,I.search,n.basepath]),B=z?c(i,{})??Le:Ie,V=z?Ie:c(a,{})??Ie,H=[S,B.className,V.className].filter(Boolean).join(` `),ue=(x||B.style||V.style)&&{...x,...B.style,...V.style},[U,W]=Z.useState(!1),G=Z.useRef(!1),K=e.reloadDocument||R?!1:l??n.options.defaultPreload,q=u??n.options.defaultPreloadDelay??0,J=Z.useCallback(()=>{n.preloadRoute({...P,_builtLocation:I}).catch(e=>{console.warn(e),console.warn(ye)})},[n,P,I]);Ce(r,Z.useCallback(e=>{e?.isIntersecting&&J()},[J]),Ve,{disabled:!!b||K!==`viewport`}),Z.useEffect(()=>{G.current||!b&&K===`render`&&(J(),G.current=!0)},[b,J,K]);let de=e=>{let t=e.currentTarget.getAttribute(`target`),r=v===void 0?t:v;if(!b&&!Ge(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Pe.flushSync)(()=>{W(!0)});let t=n.subscribe(`onResolved`,()=>{t(),W(!1)});n.navigate({...P,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:te})}};if(R)return{...M,ref:r,href:R,..._&&{children:_},...v&&{target:v},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let Y=e=>{if(b||K!==`intent`)return;if(!q){J();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),J()},q);Q.set(t,n)},fe=e=>{b||K!==`intent`||J()},me=e=>{if(b||!K||!q)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...M,...B,...V,href:L?.href,ref:r,onClick:$([C,de]),onBlur:$([w,me]),onFocus:$([T,Y]),onMouseEnter:$([E,Y]),onMouseLeave:$([D,me]),onTouchStart:$([O,fe]),disabled:!!b,target:v,...ue&&{style:ue},...H&&{className:H},...b&&Re,...z&&ze,...N&&U&&Be}}var Ie={},Le={className:`active`},Re={role:`link`,"aria-disabled":!0},ze={"data-status":`active`,"aria-current":`page`},Be={"data-transitioning":`transitioning`},Q=new WeakMap,Ve={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function He(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ue(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var We=Z.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Fe(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return Z.createElement(`a`,t,o)}return Z.createElement(n,a,o)});function Ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{ne as A,R as C,b as D,re as E,x as F,S as I,o as L,c as M,d as N,te as O,ee as P,p as R,F as S,T,Y as _,Ee as a,le as b,xe as c,he as d,_e as f,de as g,fe as h,ke as i,O as j,y as k,Se as l,me as m,Ne as n,De as o,q as p,Ae as r,be as s,We as t,J as u,V as v,k as w,ce as x,I as y,m as z};
@@ -1 +1 @@
1
- import{$n as e,Dr as t,Gn as n,Xn as r,ar as i,er as a,fr as o,gr as s,kr as c,lr as l,nr as u,pr as d}from"./createServerFn-CA8fs7QD.js";var f=class extends e{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||p(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=a({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),u.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function p(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var m=class extends s{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),o(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&i(t.mutationKey)!==i(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??p();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){u.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},h=c(t(),1);function g(e,t){let n=r(t),[i]=h.useState(()=>new m(n,e));h.useEffect(()=>{i.setOptions(e)},[i,e]);let a=h.useSyncExternalStore(h.useCallback(e=>i.subscribe(u.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=h.useCallback((e,t)=>{i.mutate(e,t).catch(l)},[i]);if(a.error&&d(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var _=n(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{g as n,f as r,_ as t};
1
+ import{Kn as e,Or as t,Zn as n,_r as r,er as i,jr as a,mr as o,or as s,pr as c,rr as l,tr as u,ur as d}from"./createServerFn-DHc2erub.js";var f=class extends i{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||p(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=u({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),l.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function p(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var m=class extends r{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),c(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&s(t.mutationKey)!==s(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??p();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){l.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},h=a(t(),1);function g(e,t){let r=n(t),[i]=h.useState(()=>new m(r,e));h.useEffect(()=>{i.setOptions(e)},[i,e]);let a=h.useSyncExternalStore(h.useCallback(e=>i.subscribe(l.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=h.useCallback((e,t)=>{i.mutate(e,t).catch(d)},[i]);if(a.error&&o(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}var _=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{g as n,f as r,_ as t};
@@ -1 +1 @@
1
- import{Gn as e}from"./createServerFn-CA8fs7QD.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};
1
+ import{Kn as e}from"./createServerFn-DHc2erub.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};