@sentry/junior-dashboard 0.279.0 → 0.280.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +100 -31
- package/dist/client-manifest.json +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +100 -31
- package/dist/public/chunks/AdminPage-YEKZOKH6.js +1 -0
- package/dist/public/chunks/AutomationPage-5GS3IUAK.js +3 -0
- package/dist/public/chunks/AutomationRunsPage-IPYEZU4L.js +1 -0
- package/dist/public/chunks/AutomationsPage-HSAYPC3C.js +1 -0
- package/dist/public/chunks/CodePage-IPFKXWFB.js +1 -0
- package/dist/public/chunks/ConnectionsPage-5XUEK6FS.js +1 -0
- package/dist/public/chunks/DrawerContent-RYYS57ZH.js +1 -0
- package/dist/public/chunks/LocationDetailPage-27ETUGR6.js +1 -0
- package/dist/public/chunks/LocationsPage-WOKMQAGM.js +1 -0
- package/dist/public/chunks/McpSettingsPage-3RT7JPEK.js +1 -0
- package/dist/public/chunks/PeoplePage-6YQLDOUL.js +1 -0
- package/dist/public/chunks/PersonProfilePage-GYMAZFIK.js +1 -0
- package/dist/public/chunks/PersonalTokensPage-4BCR744B.js +1 -0
- package/dist/public/chunks/PluginUserPage-IP6WL7MD.js +1 -0
- package/dist/public/chunks/RepositoryPage-TRD44LQ3.js +1 -0
- package/dist/public/chunks/SettingsPage-4E3SLQ36.js +1 -0
- package/dist/public/chunks/SystemPage-C3XBKXKW.js +1 -0
- package/dist/public/chunks/WorkspaceFormPage-2LS2X67Q.js +2 -0
- package/dist/public/chunks/WorkspacesPage-5WB3CUTX.js +1 -0
- package/dist/public/chunks/chunk-2BCS5AQL.js +1 -0
- package/dist/public/chunks/chunk-3Y3ICT6K.js +1 -0
- package/dist/public/chunks/chunk-4AKUZW6R.js +1 -0
- package/dist/public/chunks/chunk-4UGZNVJM.js +1 -0
- package/dist/public/chunks/chunk-564V7YHG.js +1 -0
- package/dist/public/chunks/chunk-5GZDBGAR.js +1 -0
- package/dist/public/chunks/chunk-5ISD3QSC.js +1 -0
- package/dist/public/chunks/chunk-5LNGNJ3P.js +1 -0
- package/dist/public/chunks/chunk-5ZA674OU.js +1 -0
- package/dist/public/chunks/chunk-6FSJ3W2W.js +1 -0
- package/dist/public/chunks/chunk-6GQL3EVJ.js +1 -0
- package/dist/public/chunks/chunk-6PHJZPWD.js +19 -0
- package/dist/public/chunks/chunk-A2QWWA7O.js +41 -0
- package/dist/public/chunks/chunk-AYXSBMWA.js +1 -0
- package/dist/public/chunks/chunk-B5ZN3SWQ.js +14 -0
- package/dist/public/chunks/chunk-B6HGRBBX.js +1 -0
- package/dist/public/chunks/chunk-BKOACADP.js +1 -0
- package/dist/public/chunks/chunk-CQY6BYUB.js +1 -0
- package/dist/public/chunks/chunk-CR2ICLSH.js +1 -0
- package/dist/public/chunks/chunk-DZB4LPI6.js +1 -0
- package/dist/public/chunks/chunk-EFEREKX4.js +1 -0
- package/dist/public/chunks/chunk-FE522UEA.js +1 -0
- package/dist/public/chunks/chunk-FVX42XAD.js +1 -0
- package/dist/public/chunks/chunk-G5NWYJTV.js +1 -0
- package/dist/public/chunks/chunk-GMZIELFU.js +1 -0
- package/dist/public/chunks/chunk-GO45RQDL.js +1 -0
- package/dist/public/chunks/chunk-GOTQ4D6W.js +1 -0
- package/dist/public/chunks/chunk-GRMX2HX6.js +1 -0
- package/dist/public/chunks/chunk-GYRM5ZIV.js +1 -0
- package/dist/public/chunks/chunk-H2ZU34CP.js +1 -0
- package/dist/public/chunks/chunk-H76B43OQ.js +1 -0
- package/dist/public/chunks/chunk-HCLRG2EC.js +1 -0
- package/dist/public/chunks/chunk-IA6BJDKN.js +1 -0
- package/dist/public/chunks/chunk-IZWTFLCC.js +1 -0
- package/dist/public/chunks/chunk-J37MXUED.js +1 -0
- package/dist/public/chunks/chunk-JAZABOBA.js +0 -0
- package/dist/public/chunks/chunk-L2H3ZWZN.js +1 -0
- package/dist/public/chunks/chunk-LBELRO5P.js +1 -0
- package/dist/public/chunks/chunk-LKW7MULF.js +1 -0
- package/dist/public/chunks/chunk-MEHLQZDG.js +3 -0
- package/dist/public/chunks/chunk-MTBUV2GJ.js +1 -0
- package/dist/public/chunks/chunk-N4AONKD3.js +1 -0
- package/dist/public/chunks/chunk-NQMDED2R.js +2 -0
- package/dist/public/chunks/chunk-NQOJAZFQ.js +1 -0
- package/dist/public/chunks/chunk-PEQNT5MO.js +1 -0
- package/dist/public/chunks/chunk-PQPAPPEI.js +1 -0
- package/dist/public/chunks/chunk-PXHLJIOT.js +1 -0
- package/dist/public/chunks/chunk-QNA7F7QB.js +1 -0
- package/dist/public/chunks/chunk-QOX5RMLM.js +1 -0
- package/dist/public/chunks/chunk-QPBLZSNX.js +1 -0
- package/dist/public/chunks/chunk-R4ORRE77.js +1 -0
- package/dist/public/chunks/chunk-RHIXHBS5.js +1 -0
- package/dist/public/chunks/chunk-RHMZNAJX.js +1 -0
- package/dist/public/chunks/chunk-SDKV3OID.js +1 -0
- package/dist/public/chunks/chunk-SIOW7OOW.js +1 -0
- package/dist/public/chunks/chunk-SUX4QBVF.js +1 -0
- package/dist/public/chunks/chunk-T4M53QQT.js +1 -0
- package/dist/public/chunks/chunk-TFJOEF3Q.js +1 -0
- package/dist/public/chunks/chunk-UAH6DWNS.js +1 -0
- package/dist/public/chunks/chunk-UJD3MBMB.js +1 -0
- package/dist/public/chunks/chunk-UK2V4UBT.js +1 -0
- package/dist/public/chunks/chunk-UT6HZPGL.js +1 -0
- package/dist/public/chunks/chunk-UZ44J2LH.js +1 -0
- package/dist/public/chunks/chunk-V5UDSIRA.js +63 -0
- package/dist/public/chunks/chunk-VC6IS564.js +1 -0
- package/dist/public/chunks/chunk-VFEBNOPX.js +1 -0
- package/dist/public/chunks/chunk-VXT3FIVL.js +55 -0
- package/dist/public/chunks/chunk-WJ3OXMVX.js +1 -0
- package/dist/public/chunks/chunk-WRXMQB7X.js +25 -0
- package/dist/public/chunks/chunk-WZVO3HG4.js +1 -0
- package/dist/public/chunks/chunk-XNR4RZEC.js +1 -0
- package/dist/public/chunks/chunk-YPMUHXYT.js +147 -0
- package/dist/public/chunks/chunk-YYNMZ4WC.js +1 -0
- package/dist/public/chunks/chunk-Z2JPRGFT.js +1 -0
- package/dist/public/chunks/chunk-ZIJ6SJDN.js +1 -0
- package/dist/public/chunks/code-highlighter-Q7WC7AEF.js +12 -0
- package/dist/public/client-TYC7JKRE.js +91 -0
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/api/schema.ts +1 -1
- package/src/assets.ts +4 -1
- package/src/client/App.tsx +100 -23
- package/src/client/TracedRoutes.tsx +8 -4
- package/src/client/code-highlighter.ts +26 -0
- package/src/client/code.tsx +2 -22
- package/src/client/components/Drawer.tsx +12 -71
- package/src/client/components/DrawerContent.tsx +76 -0
- package/src/client/components/ProfileMenu.tsx +12 -3
- package/src/client/components/UserInputForm.tsx +28 -5
- package/src/client/conversations/ConversationCatchUp.tsx +107 -0
- package/src/client/conversations/ConversationContextTags.tsx +110 -0
- package/src/client/conversations/ConversationEventLog.tsx +213 -71
- package/src/client/conversations/ConversationHeader.tsx +35 -41
- package/src/client/conversations/ConversationHeaderActions.tsx +34 -38
- package/src/client/conversations/ConversationHomeList.tsx +41 -3
- package/src/client/conversations/ConversationMeta.tsx +6 -12
- package/src/client/conversations/ConversationOverflowMenu.tsx +15 -4
- package/src/client/conversations/ConversationPage.tsx +188 -150
- package/src/client/conversations/ShareConversationButton.tsx +5 -50
- package/src/client/conversations/SlackMark.tsx +16 -4
- package/src/client/conversations/TranscriptRows.tsx +24 -11
- package/src/client/conversations/TranscriptView.tsx +21 -13
- package/src/client/conversations/conversationArchive.ts +22 -0
- package/src/client/conversations/conversationCatchUpState.ts +96 -0
- package/src/client/conversations/conversationMemory.ts +8 -1
- package/src/client/conversations/queries.ts +11 -3
- package/src/client/conversations/{transcriptUnreadHistory.ts → transcriptAroundHistory.ts} +48 -42
- package/src/client/conversations/transcriptBottomPinning.ts +27 -3
- package/src/client/conversations/transcriptReadPosition.ts +24 -2
- package/src/client/conversations/turnContext.ts +1 -1
- package/src/client/pages/admin/AdminPage.tsx +1 -1
- package/src/client/pages/admin/ServiceAccountsSection.tsx +1 -1
- package/src/client/pages/memory/memoryDashboard.ts +1 -1
- package/src/client/pages/memory/memoryRecord.ts +1 -1
- package/src/client/pages/settings/ConnectionsPage.tsx +1 -1
- package/src/client/pages/user/PluginUserPage.tsx +0 -6
- package/src/client/pages/user/pluginUserPageRoutes.ts +5 -0
- package/src/client/primaryNav.ts +1 -1
- package/src/client/review-desk/reviewItemFormat.ts +1 -1
- package/src/mock-reporting/fixtures.ts +43 -0
- package/src/mock-reporting/routes.ts +40 -3
- package/src/public-assets.ts +28 -20
- package/src/shell.ts +12 -2
- package/dist/public/client-ZCZXZBTL.js +0 -460
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{$c as _r,Aa as Ua,Ba as ja,Ca as Zt,Da as Dt,Fa as qt,Ia as Ze,J as Mr,Ka as za,La as Ba,Na as Wa,Oa as Va,Pa as Ya,Qa as Nt,Qc as Ja,Rc as Ka,Sa as Ga,Xc as er,Yc as Or,Zc as Fr,_c as Ir,a as ie,ad as kr,b as Le,bd as Ar,cd as Xa,d as $e,e as Xt,ed as Qa,f as Nr,fd as $r,g as Qe,gd as Hr,h as Ha,j as ve,za as Qt}from"./chunk-YPMUHXYT.js";import{c as Q}from"./chunk-7SZRL6FY.js";var Pe=Q(ie(),1),P=Q(ie(),1),I=Q(ie(),1),da=Q(ie(),1),bo=Q(ie(),1),Z=Q(ie(),1),Es=Q(ie(),1),Ss=Q(ie(),1),xs=Q(ie(),1),_=Q(ie(),1),Fo=Q(ie(),1);var Ln=e=>{throw TypeError(e)},Dn=(e,t,r)=>t.has(e)||Ln("Cannot "+r),De=(e,t,r)=>(Dn(e,t,"read from private field"),r?r.call(e):t.get(e)),Ft=(e,t,r)=>t.has(e)?Ln("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),He=(e,t,r,a)=>(Dn(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),fr=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Zr=/^[\\/]{2}/;function Nn(e,t){return t+e.replace(/\\/g,"/")}var Za="popstate";function qa(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Mn(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return kt("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:_e(n)}return Pi(t,r,null,e)}function z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function le(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ci(){return Math.random().toString(36).substring(2,10)}function en(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function kt(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Oe(t):t,state:r,key:t&&t.key||a||Ci(),mask:n}}function _e({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Oe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Pi(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=d();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function d(){return(i.state||{idx:null}).idx}function f(){l="POP";let g=d(),C=g==null?null:g-u;u=g,s&&s({action:l,location:E.location,delta:C})}function R(g,C){l="PUSH";let S=qa(g)?g:kt(E.location,g,C);r&&r(S,g),u=d()+1;let L=en(S,u),V=E.createHref(S.mask||S);try{i.pushState(L,"",V)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;n.location.assign(V)}o&&s&&s({action:l,location:E.location,delta:1})}function y(g,C){l="REPLACE";let S=qa(g)?g:kt(E.location,g,C);r&&r(S,g),u=d();let L=en(S,u),V=E.createHref(S.mask||S);i.replaceState(L,"",V),o&&s&&s({action:l,location:E.location,delta:0})}function v(g){return On(n,g)}let E={get action(){return l},get location(){return e(n,i)},listen(g){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Za,f),s=g,()=>{n.removeEventListener(Za,f),s=null}},createHref(g){return t(n,g)},createURL:v,encodeLocation(g){let C=v(g);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:R,replace:y,go(g){return i.go(g)}};return E}function On(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),z(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:_e(t);return n=n.replace(/ $/,"%20"),!r&&Zr.test(n)&&(n=a+n),new URL(n,a)}var It,Wr=class{constructor(e){if(Ft(this,It,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(De(this,It).has(e))return De(this,It).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){De(this,It).set(e,t)}};It=new WeakMap;var Ti=new Set(["lazy","caseSensitive","path","id","index","children"]);function Li(e){return Ti.has(e)}var Di=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Ni(e){return Di.has(e)}function Mi(e){return e.index===!0}function At(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(z(o.index!==!0||!o.children,"Cannot specify children on an index route"),z(n||!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),Mi(o)){let u={...o,id:s};return a[s]=tn(u,t(u)),u}else{let u={...o,id:s,children:void 0};return a[s]=tn(u,t(u)),o.children&&(u.children=At(o.children,t,l,a,n)),u}})}function tn(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function qr(e,t,r="/"){return Ie(e,t,r,!1)}function Ie(e,t,r,a,n){let o=typeof t=="string"?Oe(t):t,i=we(o.pathname||"/",r);if(i==null)return null;let l=n??or(e),s=null,u=$n(i);for(let d=0;s==null&&d<l.length;++d)s=ji(l[d],u,a);return s}function Fn(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function or(e){let t=In(e);return Oi(t),t}function In(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let d={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(a)&&s)return;z(d.relativePath.startsWith(a),`Absolute route path "${d.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(a.length)}let f=Me([a,d.relativePath]),R=r.concat(d);i.children&&i.children.length>0&&(z(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),In(i.children,t,R,f,s)),!(i.path==null&&!i.index)&&t.push({path:f,score:Hi(f,i.index),routesMeta:R.map((y,v)=>{let[E,g]=An(y.relativePath,y.caseSensitive,v===R.length-1);return{...y,matcher:E,compiledParams:g}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of _n(i.path))o(i,l,!0,s)}),t}function _n(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=_n(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Oi(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ui(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Fi=/^:[\w-]+$/,Ii=3,_i=2,ki=1,Ai=10,$i=-2,rn=e=>e==="*";function Hi(e,t){let r=e.split("/"),a=r.length;return r.some(rn)&&(a+=$i),t&&(a+=_i),r.filter(n=>!rn(n)).reduce((n,o)=>n+(Fi.test(o)?Ii:o===""?ki:Ai),a)}function Ui(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function ji(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,d=o==="/"?t:t.slice(o.length)||"/",f={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},R=s.matcher&&s.compiledParams?kn(f,d,s.matcher,s.compiledParams):bt(f,d),y=s.route;if(!R&&u&&r&&!a[a.length-1].route.index&&(R=bt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!R)return null;Object.assign(n,R.params),i.push({params:n,pathname:Me([o,R.pathname]),pathnameBase:Bi(Me([o,R.pathnameBase])),route:y}),R.pathnameBase!=="/"&&(o=Me([o,R.pathnameBase]))}return i}function bt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=An(e.path,e.caseSensitive,e.end);return kn(e,t,r,a)}function kn(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:a.reduce((u,{paramName:d,isOptional:f},R)=>{if(d==="*"){let v=l[R]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}let y=l[R];return f&&!y?u[d]=void 0:u[d]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function An(e,t=!1,r=!0){le(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,d)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let f=d.charAt(u+i.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function $n(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return le(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function we(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function zi({basename:e,pathname:t}){return t==="/"?e:Me([e,t])}var ea=e=>fr.test(e);function Hn(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Oe(e):e,o;return r?(r=ta(r),r.startsWith("/")?o=an(r.substring(1),"/"):o=an(r,t)):o=t,{pathname:o,search:Wi(a),hash:Vi(n)}}function an(e,t){let r=cr(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Ur(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Un(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function hr(e){let t=Un(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function $t(e,t,r,a=!1){let n;typeof e=="string"?n=Oe(e):(n={...e},z(!n.pathname||!n.pathname.includes("?"),Ur("?","pathname","search",n)),z(!n.pathname||!n.pathname.includes("#"),Ur("#","pathname","hash",n)),z(!n.search||!n.search.includes("#"),Ur("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let f=t.length-1;if(!a&&i.startsWith("..")){let R=i.split("/");for(;R[0]==="..";)R.shift(),f-=1;n.pathname=R.join("/")}l=f>=0?t[f]:"/"}let s=Hn(n,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||d)&&(s.pathname+="/"),s}var ta=e=>e.replace(/[\\/]{2,}/g,"/"),Me=e=>ta(e.join("/")),cr=e=>e.replace(/\/+$/,""),Bi=e=>cr(e).replace(/^\/*/,"/"),Wi=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vi=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Yi=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],St=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Et(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ht(e){let t=e.map(r=>r.route.path).filter(Boolean);return Me(t)||"/"}var jn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zn(e,t){let r=e;if(typeof r!="string"||!fr.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(jn)try{let o=new URL(window.location.href),i=Zr.test(r)?new URL(Nn(r,o.protocol)):new URL(r),l=we(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{le(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var tt=Symbol("Uninstrumented");function Gi(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=Rt(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=Rt(l,i,()=>{});s&&(a.lazy=Object.assign(a.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[tt]??o,l=Rt(r[n],i,(...s)=>nn(s[0]));l&&(n==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[tt]=i,a[n]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[tt]??n,i=Rt(r.middleware,o,(...l)=>nn(l[0]));return i?(i[tt]=o,i):n})),a}function Ji(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[tt]??e.navigate,n=Rt(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?_e(i):".",...on(e,l??{})}});n&&(n[tt]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[tt]??e.fetch,n=Rt(r.fetch,a,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...on(e,s??{})}});n&&(n[tt]=a,e.fetch=n)}return e}function Rt(e,t,r){return e.length===0?null:async(...a)=>{let n=await Bn(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function Bn(e,t,r,a){let n=e[a],o;if(n){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Bn(e,t,r,a-1),o=await i,z(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function nn(e){let{request:t,context:r,params:a,pattern:n}=e;return{request:Ki(t),params:{...a},pattern:n,context:Xi(r)}}function on(e,t){return{currentUrl:_e(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Ki(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Xi(e){if(Zi(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Qi=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zi(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Qi}var Wn=["POST","PUT","PATCH","DELETE"],qi=new Set(Wn),el=["GET",...Wn],tl=new Set(el),Vn=new Set([301,302,303,307,308]),rl=new Set([307,308]),ir={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},st={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},al=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gn="remix-router-transitions",Jn=Symbol("ResetLoaderData"),lt,pt,qe,yt,nl=class{constructor(e){Ft(this,lt),Ft(this,pt),Ft(this,qe),Ft(this,yt),He(this,lt,e),He(this,pt,or(e))}get stableRoutes(){return De(this,lt)}get activeRoutes(){return De(this,qe)??De(this,lt)}get branches(){return De(this,yt)??De(this,pt)}get hasHMRRoutes(){return De(this,qe)!=null}setRoutes(e){He(this,lt,e),He(this,pt,or(e))}setHmrRoutes(e){He(this,qe,e),He(this,yt,or(e))}commitHmrRoutes(){De(this,qe)&&(He(this,lt,De(this,qe)),He(this,pt,De(this,yt)),He(this,qe,void 0),He(this,yt,void 0))}};lt=new WeakMap;pt=new WeakMap;qe=new WeakMap;yt=new WeakMap;function Kn(e){let t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||al,o=n;if(e.instrumentations){let c=e.instrumentations;o=h=>({...n(h),...Gi(c.map(p=>p.route).filter(Boolean),h)})}let i={},l=new nl(At(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let u=e.dataStrategy||ul,d={...e.future},f=null,R=new Set,y=null,v=null,E=null,g=null,C=e.hydrationData!=null,S=Ie(l.activeRoutes,e.history.location,s,!1,l.branches),L=!1,V=null,x,A;if(S==null&&!e.patchRoutesOnNavigation){let c=Ne(404,{pathname:e.history.location.pathname}),{matches:h,route:p}=tr(l.activeRoutes);x=!0,A=!x,S=h,V={[p.id]:c}}else if(S&&!e.hydrationData&&Vt(S,l.activeRoutes,e.history.location.pathname).active&&(S=null),S)if(S.some(c=>c.route.lazy))x=!1,A=!x;else if(!S.some(c=>ra(c.route)))x=!0,A=!x;else{let c=e.hydrationData?e.hydrationData.loaderData:null,h=e.hydrationData?e.hydrationData.errors:null,p=S;if(h){let w=S.findIndex(b=>h[b.route.id]!==void 0);p=p.slice(0,w+1)}A=!1,x=!0,p.forEach(w=>{let b=Xn(w.route,c,h);A=A||b.renderFallback,x=x&&!b.shouldLoad})}else{x=!1,A=!x,S=[];let c=Vt(null,l.activeRoutes,e.history.location.pathname);c.active&&c.matches&&(L=!0,S=c.matches)}let j,m={historyAction:e.history.action,location:e.history.location,matches:S,initialized:x,renderFallback:A,navigation:ir,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||V,fetchers:new Map,blockers:new Map},U="POP",$=null,D=!1,N,W=!1,J=new Map,ee=null,G=!1,re=!1,Ee=new Set,X=new Map,K=0,ce=-1,me=new Map,ue=new Set,fe=new Map,he=new Map,Re=new Set,ze=new Map,Bt,Pt=null;function ii(){if(f=e.history.listen(({action:c,location:h,delta:p})=>{if(Bt){Bt(),Bt=void 0;return}le(ze.size===0||p!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let w=Fa({currentLocation:m.location,nextLocation:h,historyAction:c});if(w&&p!=null){let b=new Promise(M=>{Bt=M});e.history.go(p*-1),Wt(w,{state:"blocked",location:h,proceed(){Wt(w,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),b.then(()=>e.history.go(p))},reset(){let M=new Map(m.blockers);M.set(w,st),pe({blockers:M})}}),$?.resolve(),$=null;return}return nt(c,h)}),r){Ll(t,J);let c=()=>Dl(t,J);t.addEventListener("pagehide",c),ee=()=>t.removeEventListener("pagehide",c)}return m.initialized||nt("POP",m.location,{initialHydration:!0}),j}function li(){f&&f(),ee&&ee(),R.clear(),N&&N.abort(),m.fetchers.forEach((c,h)=>Pr(m.fetchers,h)),m.blockers.forEach((c,h)=>Oa(h))}function si(c){if(R.add(c),y){let{newErrors:h}=y;y=null,c(m,{deletedFetchers:[],newErrors:h,viewTransitionOpts:void 0,flushSync:!1})}return()=>R.delete(c)}function pe(c,h={}){c.matches&&(c.matches=c.matches.map(b=>{let M=i[b.route.id],O=b.route;return O.element!==M.element||O.errorElement!==M.errorElement||O.hydrateFallbackElement!==M.hydrateFallbackElement?{...b,route:M}:b})),m={...m,...c};let p=[],w=[];m.fetchers.forEach((b,M)=>{b.state==="idle"&&(Re.has(M)?p.push(M):w.push(M))}),Re.forEach(b=>{!m.fetchers.has(b)&&!X.has(b)&&p.push(b)}),R.size===0&&(y={newErrors:c.errors??null}),[...R].forEach(b=>b(m,{deletedFetchers:p,newErrors:c.errors??null,viewTransitionOpts:h.viewTransitionOpts,flushSync:h.flushSync===!0})),p.forEach(b=>Pr(m.fetchers,b)),w.forEach(b=>m.fetchers.delete(b))}function ht(c,h,{flushSync:p}={}){let w=m.actionData!=null&&m.navigation.formMethod!=null&&ye(m.navigation.formMethod)&&m.navigation.state==="loading"&&c.state?._isRedirect!==!0,b;h.actionData?Object.keys(h.actionData).length>0?b=h.actionData:b=null:w?b=m.actionData:b=null;let M=h.loaderData?yn(m.loaderData,h.loaderData,h.matches||[],h.errors):m.loaderData,O=m.blockers;O.size>0&&(O=new Map(O),O.forEach((k,Y)=>O.set(Y,st)));let F=G?!1:_a(c,h.matches||m.matches),T=D===!0||m.navigation.formMethod!=null&&ye(m.navigation.formMethod)&&c.state?._isRedirect!==!0;l.commitHmrRoutes(),G||U==="POP"||(U==="PUSH"?e.history.push(c,c.state):U==="REPLACE"&&e.history.replace(c,c.state));let H;if(U==="POP"){let k=J.get(m.location.pathname);k&&k.has(c.pathname)?H={currentLocation:m.location,nextLocation:c}:J.has(c.pathname)&&(H={currentLocation:c,nextLocation:m.location})}else if(W){let k=J.get(m.location.pathname);k?k.add(c.pathname):(k=new Set([c.pathname]),J.set(m.location.pathname,k)),H={currentLocation:m.location,nextLocation:c}}pe({...h,actionData:b,loaderData:M,historyAction:U,location:c,initialized:!0,renderFallback:!1,navigation:ir,revalidation:"idle",restoreScrollPosition:F,preventScrollReset:T,blockers:O},{viewTransitionOpts:H,flushSync:p===!0}),U="POP",D=!1,W=!1,G=!1,re=!1,$?.resolve(),$=null,Pt?.resolve(),Pt=null}async function Pa(c,h){if($?.resolve(),$=null,typeof c=="number"){$||($=wn());let ae=$.promise;return e.history.go(c),ae}let p=Vr(m.location,m.matches,s,c,h?.fromRouteId,h?.relative),{path:w,submission:b,error:M}=ln(!1,p,h),O;h?.mask&&(O={pathname:"",search:"",hash:"",...typeof h.mask=="string"?Oe(h.mask):{...m.location.mask,...h.mask}});let F=m.location,T=kt(F,w,h&&h.state,void 0,O);T={...T,...e.history.encodeLocation(T)};let H=h&&h.replace!=null?h.replace:void 0,k="PUSH";H===!0?k="REPLACE":H===!1||b!=null&&ye(b.formMethod)&&b.formAction===m.location.pathname+m.location.search&&(k="REPLACE");let Y=h&&"preventScrollReset"in h?h.preventScrollReset===!0:void 0,B=(h&&h.flushSync)===!0,te=Fa({currentLocation:F,nextLocation:T,historyAction:k});if(te){Wt(te,{state:"blocked",location:T,proceed(){Wt(te,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),Pa(c,h)},reset(){let ae=new Map(m.blockers);ae.set(te,st),pe({blockers:ae})}});return}await nt(k,T,{submission:b,pendingError:M,preventScrollReset:Y,replace:h&&h.replace,enableViewTransition:h&&h.viewTransition,flushSync:B,callSiteDefaultShouldRevalidate:h&&h.defaultShouldRevalidate})}function ui(){Pt||(Pt=wn()),Cr(),pe({revalidation:"loading"});let c=Pt.promise;return m.navigation.state==="submitting"?c:m.navigation.state==="idle"?(nt(m.historyAction,m.location,{startUninterruptedRevalidation:!0}),c):(nt(U||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation,enableViewTransition:W===!0}),c)}async function nt(c,h,p){N&&N.abort(),N=null,U=c,G=(p&&p.startUninterruptedRevalidation)===!0,bi(m.location,m.matches),D=(p&&p.preventScrollReset)===!0,W=(p&&p.enableViewTransition)===!0;let w=l.activeRoutes,b=p?.initialHydration&&m.matches&&m.matches.length>0&&!L?m.matches:Ie(w,h,s,!1,l.branches),M=(p&&p.flushSync)===!0;if(b&&m.initialized&&!re&&Rl(m.location,h)&&!(p&&p.submission&&ye(p.submission.formMethod))){ht(h,{matches:b},{flushSync:M});return}let O=Vt(b,w,h.pathname);if(O.active&&O.matches&&(b=O.matches),!b){let{error:se,notFoundMatches:ne,route:Se}=Tr(h.pathname);ht(h,{matches:ne,loaderData:{},errors:{[Se.id]:se}},{flushSync:M});return}let F=p&&p.overrideNavigation?{...p.overrideNavigation,matches:b,historyAction:c}:void 0;N=new AbortController;let T=gt(e.history,h,N.signal,p&&p.submission),H=e.getContext?await e.getContext():new Wr,k;if(p&&p.pendingError)k=[et(b).route.id,{type:"error",error:p.pendingError}];else if(p&&p.submission&&ye(p.submission.formMethod)){let se=await ci(T,h,p.submission,b,c,H,O.active,p&&p.initialHydration===!0,{replace:p.replace,flushSync:M});if(se.shortCircuited)return;if(se.pendingActionResult){let[ne,Se]=se.pendingActionResult;if(Te(Se)&&Et(Se.error)&&Se.error.status===404){N=null,ht(h,{matches:se.matches,loaderData:{},errors:{[ne]:Se.error}});return}}b=se.matches||b,k=se.pendingActionResult,F=jr(h,b,c,p.submission),M=!1,O.active=!1,T=gt(e.history,T.url,T.signal)}let{shortCircuited:Y,matches:B,loaderData:te,errors:ae,workingFetchers:de}=await di(T,h,b,c,H,O.active,F,p&&p.submission,p&&p.fetcherSubmission,p&&p.replace,p&&p.initialHydration===!0,M,k,p&&p.callSiteDefaultShouldRevalidate);Y||(N=null,ht(h,{matches:B||b,...gn(k),loaderData:te,errors:ae,...de?{fetchers:de}:{}}))}async function ci(c,h,p,w,b,M,O,F,T={}){Cr();let H=Pl(h,w,b,p);if(pe({navigation:H},{flushSync:T.flushSync===!0}),O){let B=await Yt(w,h.pathname,c.signal);if(B.type==="aborted")return{shortCircuited:!0};if(B.type==="error"){if(B.partialMatches.length===0){let{matches:ae,route:de}=tr(l.activeRoutes);return{matches:ae,pendingActionResult:[de.id,{type:"error",error:B.error}]}}let te=et(B.partialMatches).route.id;return{matches:B.partialMatches,pendingActionResult:[te,{type:"error",error:B.error}]}}else if(B.matches)w=B.matches;else{let{notFoundMatches:te,error:ae,route:de}=Tr(h.pathname);return{matches:te,pendingActionResult:[de.id,{type:"error",error:ae}]}}}let k,Y=lr(w,h);if(!Y.route.action&&!Y.route.lazy)k={type:"error",error:Ne(405,{method:c.method,pathname:h.pathname,routeId:Y.route.id})};else{let B=vt(o,i,c,h,w,Y,F?[]:a,M),te=await Tt(c,h,B,M,null);if(k=te[Y.route.id],!k){for(let ae of w)if(te[ae.route.id]){k=te[ae.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(ut(k)){let B;return T&&T.replace!=null?B=T.replace:B=hn(k.response.headers.get("Location"),new URL(c.url),s,e.history)===m.location.pathname+m.location.search,await ot(c,k,!0,{submission:p,replace:B}),{shortCircuited:!0}}if(Te(k)){let B=et(w,Y.route.id);return(T&&T.replace)!==!0&&(U="PUSH"),{matches:w,pendingActionResult:[B.route.id,k,Y.route.id]}}return{matches:w,pendingActionResult:[Y.route.id,k]}}async function di(c,h,p,w,b,M,O,F,T,H,k,Y,B,te){let ae=O||jr(h,p,w,F),de=F||T||vn(ae),se=!G&&!k;if(M){if(se){let Ce=Ta(B);pe({navigation:ae,...Ce!==void 0?{actionData:Ce}:{}},{flushSync:Y})}let q=await Yt(p,h.pathname,c.signal);if(q.type==="aborted")return{shortCircuited:!0};if(q.type==="error"){if(q.partialMatches.length===0){let{matches:Ae,route:Ye}=tr(l.activeRoutes);return{matches:Ae,loaderData:{},errors:{[Ye.id]:q.error}}}let Ce=et(q.partialMatches).route.id;return{matches:q.partialMatches,loaderData:{},errors:{[Ce]:q.error}}}else if(q.matches)p=q.matches;else{let{error:Ce,notFoundMatches:Ae,route:Ye}=Tr(h.pathname);return{matches:Ae,loaderData:{},errors:{[Ye.id]:Ce}}}}let ne=l.activeRoutes,{dsMatches:Se,revalidatingFetchers:xe}=sn(c,b,o,i,e.history,m,p,de,h,k?[]:a,k===!0,re,Ee,Re,fe,ue,ne,s,e.patchRoutesOnNavigation!=null,l.branches,B,te);if(ce=++K,!e.dataStrategy&&!Se.some(q=>q.shouldLoad)&&!Se.some(q=>q.route.middleware&&q.route.middleware.length>0)&&xe.length===0){let q=new Map(m.fetchers),Ce=Na(q);return ht(h,{matches:p,loaderData:{},errors:B&&Te(B[1])?{[B[0]]:B[1].error}:null,...gn(B),...Ce?{fetchers:q}:{}},{flushSync:Y}),{shortCircuited:!0}}if(se){let q={};if(!M){q.navigation=ae;let Ce=Ta(B);Ce!==void 0&&(q.actionData=Ce)}xe.length>0&&(q.fetchers=fi(xe)),pe(q,{flushSync:Y})}xe.forEach(q=>{Ve(q.key),q.controller&&X.set(q.key,q.controller)});let Lt=()=>xe.forEach(q=>Ve(q.key));N&&N.signal.addEventListener("abort",Lt);let{loaderResults:Je,fetcherResults:mt}=await La(Se,xe,c,h,b);if(c.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Lt),xe.forEach(q=>X.delete(q.key));let Ke=rr(Je);if(Ke)return await ot(c,Ke.result,!0,{replace:H}),{shortCircuited:!0};if(Ke=rr(mt),Ke)return ue.add(Ke.key),await ot(c,Ke.result,!0,{replace:H}),{shortCircuited:!0};let ke=new Map(m.fetchers),{loaderData:Lr,errors:Xe}=pn(m,p,Je,B,xe,mt,ke);k&&m.errors&&(Xe={...m.errors,...Xe});let Gt=Na(ke),Jt=Ma(ce,ke),Kt=Gt||Jt||xe.length>0;return{matches:p,loaderData:Lr,errors:Xe,...Kt?{workingFetchers:ke}:{}}}function Ta(c){if(c&&!Te(c[1]))return{[c[0]]:c[1].data};if(m.actionData)return Object.keys(m.actionData).length===0?null:m.actionData}function fi(c){let h=new Map(m.fetchers);return c.forEach(p=>{let w=h.get(p.key),b=Mt(void 0,w?w.data:void 0);h.set(p.key,b)}),h}async function hi(c,h,p,w){Ve(c);let b=(w&&w.flushSync)===!0,M=l.activeRoutes,O=Vr(m.location,m.matches,s,p,h,w?.relative),F=Ie(M,O,s,!1,l.branches),T=Vt(F,M,O);if(T.active&&T.matches&&(F=T.matches),!F){We(c,h,Ne(404,{pathname:O}),{flushSync:b});return}let{path:H,submission:k,error:Y}=ln(!0,O,w);if(Y){We(c,h,Y,{flushSync:b});return}let B=e.getContext?await e.getContext():new Wr,te=(w&&w.preventScrollReset)===!0;if(k&&ye(k.formMethod)){await mi(c,h,H,F,B,T.active,b,te,k,w&&w.defaultShouldRevalidate);return}fe.set(c,{routeId:h,path:H}),await pi(c,h,H,F,B,T.active,b,te,k)}async function mi(c,h,p,w,b,M,O,F,T,H){Cr(),fe.delete(c);let k=m.fetchers.get(c);Be(c,Tl(T,k),{flushSync:O});let Y=new AbortController,B=gt(e.history,p,Y.signal,T);if(M){let oe=await Yt(w,new URL(B.url).pathname,B.signal,c);if(oe.type==="aborted")return;if(oe.type==="error"){We(c,h,oe.error,{flushSync:O});return}else if(oe.matches)w=oe.matches;else{We(c,h,Ne(404,{pathname:p}),{flushSync:O});return}}let te=lr(w,p);if(!te.route.action&&!te.route.lazy){let oe=Ne(405,{method:T.formMethod,pathname:p,routeId:h});We(c,h,oe,{flushSync:O});return}X.set(c,Y);let ae=K,de=vt(o,i,B,p,w,te,a,b),se=await Tt(B,p,de,b,c),ne=se[te.route.id];if(!ne){for(let oe of de)if(se[oe.route.id]){ne=se[oe.route.id];break}}if(B.signal.aborted){X.get(c)===Y&&X.delete(c);return}if(Re.has(c)){if(ut(ne)||Te(ne)){Be(c,Ue(void 0));return}}else{if(ut(ne))if(X.delete(c),ce>ae){Be(c,Ue(void 0));return}else return ue.add(c),Be(c,Mt(T)),ot(B,ne,!1,{fetcherSubmission:T,preventScrollReset:F});if(Te(ne)){We(c,h,ne.error);return}}let Se=m.navigation.location||m.location,xe=gt(e.history,Se,Y.signal),Lt=l.activeRoutes,Je=m.navigation.state!=="idle"?Ie(Lt,m.navigation.location,s,!1,l.branches):m.matches;z(Je,"Didn't find any matches after fetcher action");let mt=++K;me.set(c,mt);let{dsMatches:Ke,revalidatingFetchers:ke}=sn(xe,b,o,i,e.history,m,Je,T,Se,a,!1,re,Ee,Re,fe,ue,Lt,s,e.patchRoutesOnNavigation!=null,l.branches,[te.route.id,ne],H),Lr=Mt(T,ne.data),Xe=new Map(m.fetchers);Xe.set(c,Lr),ke.filter(oe=>oe.key!==c).forEach(oe=>{let it=oe.key,$a=Xe.get(it),xi=Mt(void 0,$a?$a.data:void 0);Xe.set(it,xi),Ve(it),oe.controller&&X.set(it,oe.controller)}),pe({fetchers:Xe});let Gt=()=>ke.forEach(oe=>Ve(oe.key));Y.signal.addEventListener("abort",Gt);let{loaderResults:Jt,fetcherResults:Kt}=await La(Ke,ke,xe,Se,b);if(Y.signal.aborted)return;Y.signal.removeEventListener("abort",Gt),me.delete(c),X.delete(c),ke.forEach(oe=>X.delete(oe.key));let q=m.fetchers.has(c),Ce=oe=>{if(!q)return oe;let it=new Map(oe.fetchers);return it.set(c,Ue(ne.data)),{...oe,fetchers:it}},Ae=rr(Jt);if(Ae)return m=Ce(m),ot(xe,Ae.result,!1,{preventScrollReset:F});if(Ae=rr(Kt),Ae)return ue.add(Ae.key),m=Ce(m),ot(xe,Ae.result,!1,{preventScrollReset:F});let Ye=new Map(m.fetchers);q&&Ye.set(c,Ue(ne.data));let{loaderData:Aa,errors:Dr}=pn(m,Je,Jt,void 0,ke,Kt,Ye);Ma(mt,Ye),m.navigation.state==="loading"&&mt>ce?(z(U,"Expected pending action"),N&&N.abort(),ht(m.navigation.location,{matches:Je,loaderData:Aa,errors:Dr,fetchers:Ye})):(pe({errors:Dr,loaderData:yn(m.loaderData,Aa,Je,Dr),fetchers:Ye}),re=!1)}async function pi(c,h,p,w,b,M,O,F,T){let H=m.fetchers.get(c);Be(c,Mt(T,H?H.data:void 0),{flushSync:O});let k=new AbortController,Y=gt(e.history,p,k.signal);if(M){let ne=await Yt(w,new URL(Y.url).pathname,Y.signal,c);if(ne.type==="aborted")return;if(ne.type==="error"){We(c,h,ne.error,{flushSync:O});return}else if(ne.matches)w=ne.matches;else{We(c,h,Ne(404,{pathname:p}),{flushSync:O});return}}let B=lr(w,p);X.set(c,k);let te=K,ae=vt(o,i,Y,p,w,B,a,b),de=await Tt(Y,p,ae,b,c),se=de[B.route.id];if(!se){for(let ne of w)if(de[ne.route.id]){se=de[ne.route.id];break}}if(X.get(c)===k&&X.delete(c),!Y.signal.aborted){if(Re.has(c)){Be(c,Ue(void 0));return}if(ut(se))if(ce>te){Be(c,Ue(void 0));return}else{ue.add(c),await ot(Y,se,!1,{preventScrollReset:F});return}if(Te(se)){We(c,h,se.error);return}Be(c,Ue(se.data))}}async function ot(c,h,p,{submission:w,fetcherSubmission:b,preventScrollReset:M,replace:O}={}){p||($?.resolve(),$=null),h.response.headers.has("X-Remix-Revalidate")&&(re=!0);let F=h.response.headers.get("Location");z(F,"Expected a Location header on the redirect Response"),F=hn(F,new URL(c.url),s,e.history);let T=kt(m.location,F,{_isRedirect:!0});if(r){let ae=!1;if(h.response.headers.has("X-Remix-Reload-Document"))ae=!0;else if(ea(F)){let de=On(t,F,!0);ae=de.origin!==t.location.origin||we(de.pathname,s)==null}if(ae){O?t.location.replace(F):t.location.assign(F);return}}N=null;let H=O===!0||h.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:k,formAction:Y,formEncType:B}=m.navigation;!w&&!b&&k&&Y&&B&&(w=vn(m.navigation));let te=w||b;if(rl.has(h.response.status)&&te&&ye(te.formMethod))await nt(H,T,{submission:{...te,formAction:F},preventScrollReset:M||D,enableViewTransition:p?W:void 0});else{let ae=jr(T,[],H,w);await nt(H,T,{overrideNavigation:ae,fetcherSubmission:b,preventScrollReset:M||D,enableViewTransition:p?W:void 0})}}async function Tt(c,h,p,w,b){let M,O={};try{M=await dl(u,c,h,p,b,w,!1)}catch(F){return p.filter(T=>T.shouldLoad).forEach(T=>{O[T.route.id]={type:"error",error:F}}),O}if(c.signal.aborted)return O;if(!ye(c.method))for(let F of p){if(M[F.route.id]?.type==="error")break;!M.hasOwnProperty(F.route.id)&&!m.loaderData.hasOwnProperty(F.route.id)&&(!m.errors||!m.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(M[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,T]of Object.entries(M))if(El(T)){let H=T.result;O[F]={type:"redirect",response:pl(H,c,F,p,s)}}else O[F]=await ml(T);return O}async function La(c,h,p,w,b){let M=Tt(p,w,c,b,null),O=Promise.all(h.map(async H=>{if(H.matches&&H.match&&H.request&&H.controller){let Y=(await Tt(H.request,H.path,H.matches,b,H.key))[H.match.route.id];return{[H.key]:Y}}else return Promise.resolve({[H.key]:{type:"error",error:Ne(404,{pathname:H.path})}})})),F=await M,T=(await O).reduce((H,k)=>Object.assign(H,k),{});return{loaderResults:F,fetcherResults:T}}function Cr(){re=!0,fe.forEach((c,h)=>{X.has(h)&&Ee.add(h),Ve(h)})}function Be(c,h,p={}){let w=new Map(m.fetchers);w.set(c,h),pe({fetchers:w},{flushSync:(p&&p.flushSync)===!0})}function We(c,h,p,w={}){let b=et(m.matches,h),M=new Map(m.fetchers);Pr(M,c),pe({errors:{[b.route.id]:p},fetchers:M},{flushSync:(w&&w.flushSync)===!0})}function yi(c){return he.set(c,(he.get(c)||0)+1),Re.has(c)&&Re.delete(c),m.fetchers.get(c)||Yn}function gi(c,h){Ve(c,h?.reason),Be(c,Ue(null))}function Pr(c,h){let p=m.fetchers.get(h);X.has(h)&&!(p&&p.state==="loading"&&me.has(h))&&Ve(h),fe.delete(h),me.delete(h),ue.delete(h),Re.delete(h),Ee.delete(h),c.delete(h)}function Ri(c){let h=(he.get(c)||0)-1;h<=0?(he.delete(c),Re.add(c)):he.set(c,h),pe({fetchers:new Map(m.fetchers)})}function Ve(c,h){let p=X.get(c);p&&(p.abort(h),X.delete(c))}function Da(c,h){for(let p of c){let w=h.get(p);z(w,`Expected fetcher: ${p}`);let b=Ue(w.data);h.set(p,b)}}function Na(c){let h=[],p=!1;for(let w of ue){let b=c.get(w);z(b,`Expected fetcher: ${w}`),b.state==="loading"&&(ue.delete(w),h.push(w),p=!0)}return Da(h,c),p}function Ma(c,h){let p=[];for(let[w,b]of me)if(b<c){let M=h.get(w);z(M,`Expected fetcher: ${w}`),M.state==="loading"&&(Ve(w),me.delete(w),p.push(w))}return Da(p,h),p.length>0}function vi(c,h){let p=m.blockers.get(c)||st;return ze.get(c)!==h&&ze.set(c,h),p}function Oa(c){m.blockers.delete(c),ze.delete(c)}function Wt(c,h){let p=m.blockers.get(c)||st;z(p.state==="unblocked"&&h.state==="blocked"||p.state==="blocked"&&h.state==="blocked"||p.state==="blocked"&&h.state==="proceeding"||p.state==="blocked"&&h.state==="unblocked"||p.state==="proceeding"&&h.state==="unblocked",`Invalid blocker state transition: ${p.state} -> ${h.state}`);let w=new Map(m.blockers);w.set(c,h),pe({blockers:w})}function Fa({currentLocation:c,nextLocation:h,historyAction:p}){if(ze.size===0)return;ze.size>1&&le(!1,"A router only supports one blocker at a time");let w=Array.from(ze.entries()),[b,M]=w[w.length-1],O=m.blockers.get(b);if(!(O&&O.state==="proceeding")&&M({currentLocation:c,nextLocation:h,historyAction:p}))return b}function Tr(c){let h=Ne(404,{pathname:c}),p=l.activeRoutes,{matches:w,route:b}=tr(p);return{notFoundMatches:w,route:b,error:h}}function wi(c,h,p){if(v=c,g=h,E=p||null,!C&&m.navigation===ir){C=!0;let w=_a(m.location,m.matches);w!=null&&pe({restoreScrollPosition:w})}return()=>{v=null,g=null,E=null}}function Ia(c,h){return E&&E(c,h.map(w=>Fn(w,m.loaderData)))||c.key}function bi(c,h){if(v&&g){let p=Ia(c,h);v[p]=g()}}function _a(c,h){if(v){let p=Ia(c,h),w=v[p];if(typeof w=="number")return w}return null}function Vt(c,h,p){if(e.patchRoutesOnNavigation){let w=l.branches;if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:Ie(h,p,s,!0,w)}}else return{active:!0,matches:Ie(h,p,s,!0,w)||[]}}return{active:!1,matches:null}}async function Yt(c,h,p,w){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let b=c;for(;;){let M=i;try{await e.patchRoutesOnNavigation({signal:p,path:h,matches:b,fetcherKey:w,patch:(H,k)=>{p.aborted||un(H,k,l,M,o,!1)}})}catch(H){return{type:"error",error:H,partialMatches:b}}if(p.aborted)return{type:"aborted"};let O=l.branches,F=Ie(l.activeRoutes,h,s,!1,O),T=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(T=Ie(l.activeRoutes,h,s,!0,O),!(T&&b.length<T.length&&ka(b,T.slice(0,b.length))))return{type:"success",matches:F}}if(T||(T=Ie(l.activeRoutes,h,s,!0,O)),!T||ka(b,T))return{type:"success",matches:null};b=T}}function ka(c,h){return c.length===h.length&&c.every((p,w)=>p.route.id===h[w].route.id)}function Ei(c){i={},l.setHmrRoutes(At(c,o,void 0,i))}function Si(c,h,p=!1){un(c,h,l,i,o,p),l.hasHMRRoutes||pe({})}return j={get basename(){return s},get future(){return d},get state(){return m},get routes(){return l.stableRoutes},get branches(){return l.branches},get manifest(){return i},get window(){return t},initialize:ii,subscribe:si,enableScrollRestoration:wi,navigate:Pa,fetch:hi,revalidate:ui,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:yi,resetFetcher:gi,deleteFetcher:Ri,dispose:li,getBlocker:vi,deleteBlocker:Oa,patchRoutes:Si,_internalFetchControllers:X,_internalSetRoutes:Ei,_internalSetStateDoNotUseOrYouWillBreakYourApp(c){pe(c)}},e.instrumentations&&(j=Ji(j,e.instrumentations.map(c=>c.router).filter(Boolean))),j}function ol(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Vr(e,t,r,a,n,o){let i,l;if(n){i=[];for(let u of t)if(i.push(u),u.route.id===n){l=u;break}}else i=t,l=t[t.length-1];let s=$t(a||".",hr(i),we(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&l){let u=na(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let d=new URLSearchParams(s.search),f=d.getAll("index");d.delete("index"),f.filter(y=>y).forEach(y=>d.append("index",y));let R=d.toString();s.search=R?`?${R}`:""}}return r!=="/"&&(s.pathname=zi({basename:r,pathname:s.pathname})),_e(s)}function ln(e,t,r){if(!r||!ol(r))return{path:t};if(r.formMethod&&!Cl(r.formMethod))return{path:t,error:Ne(405,{method:r.formMethod})};let a=()=>({path:t,error:Ne(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=ao(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((R,[y,v])=>`${R}${y}=${v}
|
|
2
|
+
`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!ye(o))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}z(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=Jr(r.formData),s=r.formData;else if(r.body instanceof FormData)l=Jr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=mn(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=mn(l)}catch{return a()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ye(u.formMethod))return{path:t,submission:u};let d=Oe(t);return e&&d.search&&na(d.search)&&l.append("index",""),d.search=`?${l}`,{path:_e(d),submission:u}}function sn(e,t,r,a,n,o,i,l,s,u,d,f,R,y,v,E,g,C,S,L,V,x){let A=V?Te(V[1])?V[1].error:V[1].data:void 0,j=n.createURL(o.location),m=n.createURL(s),U;if(d&&o.errors){let G=Object.keys(o.errors)[0];U=i.findIndex(re=>re.route.id===G)}else if(V&&Te(V[1])){let G=V[0];U=i.findIndex(re=>re.route.id===G)-1}let $=V?V[1].statusCode:void 0,D=$&&$>=400,N={currentUrl:j,currentParams:o.matches[0]?.params||{},nextUrl:m,nextParams:i[0].params,...l,actionResult:A,actionStatus:$},W=Ht(i),J=i.map((G,re)=>{let{route:Ee}=G,X=null;if(U!=null&&re>U)X=!1;else if(Ee.lazy)X=!0;else if(!ra(Ee))X=!1;else if(d){let{shouldLoad:ue}=Xn(Ee,o.loaderData,o.errors);X=ue}else il(o.loaderData,o.matches[re],G)&&(X=!0);if(X!==null)return Yr(r,a,e,s,W,G,u,t,X);let K=!1;typeof x=="boolean"?K=x:D?K=!1:(f||j.pathname+j.search===m.pathname+m.search||j.search!==m.search||ll(o.matches[re],G))&&(K=!0);let ce={...N,defaultShouldRevalidate:K},me=_t(G,ce);return Yr(r,a,e,s,W,G,u,t,me,ce,x)}),ee=[];return v.forEach((G,re)=>{if(d||!i.some(he=>he.route.id===G.routeId)||y.has(re))return;let Ee=o.fetchers.get(re),X=Ee&&Ee.state!=="idle"&&Ee.data===void 0,K=Ie(g,G.path,C??"/",!1,L);if(!K){if(S&&X)return;ee.push({key:re,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(E.has(re))return;let ce=lr(K,G.path),me=new AbortController,ue=gt(n,G.path,me.signal),fe=null;if(R.has(re))R.delete(re),fe=vt(r,a,ue,G.path,K,ce,u,t);else if(X)f&&(fe=vt(r,a,ue,G.path,K,ce,u,t));else{let he;typeof x=="boolean"?he=x:D?he=!1:he=f;let Re={...N,defaultShouldRevalidate:he};_t(ce,Re)&&(fe=vt(r,a,ue,G.path,K,ce,u,t,Re))}fe&&ee.push({key:re,routeId:G.routeId,path:G.path,matches:fe,match:ce,request:ue,controller:me})}),{dsMatches:J,revalidatingFetchers:ee}}function ra(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xn(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ra(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;if(!a&&n)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!n;return{shouldLoad:o,renderFallback:o}}function il(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function ll(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function _t(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function un(e,t,r,a,n,o){let i;if(e){let u=a[e];z(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r.activeRoutes;let l=[],s=[];if(t.forEach(u=>{let d=i.find(f=>Qn(u,f));d?s.push({existingRoute:d,newRoute:u}):l.push(u)}),l.length>0){let u=At(l,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:d,newRoute:f}=s[u],R=d,[y]=At([f],n,[],{},!0);Object.assign(R,{element:y.element?y.element:R.element,errorElement:y.errorElement?y.errorElement:R.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:R.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function Qn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,a)=>t.children?.some(n=>Qn(r,n)))??!1:!1}var cn=new WeakMap,Zn=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(z(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=cn.get(n);i||(i={},cn.set(n,i));let l=i[e];if(l)return l;let s=(async()=>{let u=Li(e),f=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)le(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(f)le(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let R=await o();R!=null&&(Object.assign(n,{[e]:R}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(R=>R===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},dn=new WeakMap;function sl(e,t,r,a,n){let o=r[e.id];if(z(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=dn.get(o);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let f=(async()=>{z(typeof e.lazy=="function","No lazy route function found");let R=await e.lazy(),y={};for(let v in R){let E=R[v];if(E===void 0)continue;let g=Ni(v),S=o[v]!==void 0&&v!=="hasErrorBoundary";g?le(!g,"Route property "+v+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?le(!S,`Route "${o.id}" has a static property "${v}" defined but its lazy function is also returning a value for this property. The lazy route property "${v}" will be ignored.`):y[v]=E}Object.assign(o,y),Object.assign(o,{...a(o),lazy:void 0})})();return dn.set(o,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let i=Object.keys(e.lazy),l=[],s;for(let d of i){if(n&&n.includes(d))continue;let f=Zn({key:d,route:e,manifest:r,mapRouteProperties:a});f&&(l.push(f),d===t&&(s=f))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function fn(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function ul(e){return e.matches.some(t=>t.route.middleware)?qn(e,()=>fn(e)):fn(e)}function qn(e,t){return cl(e,t,a=>{if(xl(a))throw a;return a},wl,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===n),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=et(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function cl(e,t,r,a,n){let{matches:o,...i}=e,l=o.flatMap(u=>u.route.middleware?u.route.middleware.map(d=>[u.route.id,d]):[]);return await eo(i,l,t,r,a,n)}async function eo(e,t,r,a,n,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,d]=s,f,R=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await eo(e,t,r,a,n,o,i+1)},f.value}catch(y){return f={value:await o(y,u,f)},f.value}};try{let y=await d(e,R),v=y!=null?a(y):void 0;return n(v)?v:f?v??f.value:(f={value:await R()},f.value)}catch(y){return await o(y,u,f)}}function to(e,t,r,a,n){let o=Zn({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=sl(a.route,ye(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Yr(e,t,r,a,n,o,i,l,s,u=null,d){let f=!1,R=to(e,t,r,o,i);return{...o,_lazyPromises:R,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(y){return f=!0,u?typeof d=="boolean"?_t(o,{...u,defaultShouldRevalidate:d}):typeof y=="boolean"?_t(o,{...u,defaultShouldRevalidate:y}):_t(o,u):s},resolve(y){let{lazy:v,loader:E,middleware:g}=o.route,C=f||s||y&&!ye(r.method)&&(v||E),S=g&&g.length>0&&!E&&!v;return C&&(ye(r.method)||!S)?fl({request:r,path:a,pattern:n,match:o,lazyHandlerPromise:R?.handler,lazyRoutePromise:R?.route,handlerOverride:y,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function vt(e,t,r,a,n,o,i,l,s=null){return n.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:to(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yr(e,t,r,a,Ht(n),u,i,l,!0,s))}async function dl(e,t,r,a,n,o,i){a.some(d=>d._lazyPromises?.middleware)&&await Promise.all(a.map(d=>d._lazyPromises?.middleware));let l={request:t,url:ro(t,r),pattern:Ht(a),params:a[0].params,context:o,matches:a},u=await e({...l,fetcherKey:n,runClientMiddleware:i?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:d=>{let f=l;return qn(f,()=>d({...f,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(d=>[d._lazyPromises?.handler,d._lazyPromises?.route]))}catch{}return u}async function fl({request:e,path:t,pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,d=ye(e.method),f=d?"action":"loader",R=y=>{let v,E=new Promise((S,L)=>v=L);u=()=>v(),e.signal.addEventListener("abort",u);let g=S=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${f}" [routeId: ${a.route.id}]`)):y({request:e,url:ro(e,t),pattern:r,params:a.params,context:l},...S!==void 0?[S]:[]),C=(async()=>{try{return{type:"data",result:await(i?i(L=>g(L)):g())}}catch(S){return{type:"error",result:S}}})();return Promise.race([C,E])};try{let y=d?a.route.action:a.route.loader;if(n||o)if(y){let v,[E]=await Promise.all([R(y).catch(g=>{v=g}),n,o]);if(v!==void 0)throw v;s=E}else{await n;let v=d?a.route.action:a.route.loader;if(v)[s]=await Promise.all([R(v),o]);else if(f==="action"){let E=new URL(e.url),g=E.pathname+E.search;throw Ne(405,{method:e.method,pathname:g,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(y)s=await R(y);else{let v=new URL(e.url),E=v.pathname+v.search;throw Ne(404,{pathname:E})}}catch(y){return{type:"error",result:y}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function hl(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function ml(e){let{result:t,type:r}=e;if(aa(t)){let a;try{a=await hl(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new St(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?Rn(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:vl(t),statusCode:Et(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Et(t)?t.status:void 0}:Rn(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function pl(e,t,r,a,n){let o=e.headers.get("Location");if(z(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!ea(o)){let i=a.slice(0,a.findIndex(l=>l.route.id===r)+1);o=Vr(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}var yl=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Gr(e){try{return yl.includes(new URL(e).protocol)}catch{return!1}}function hn(e,t,r,a){if(ea(e)){let n=e,o=Zr.test(n)?new URL(Nn(n,t.protocol)):new URL(n);if(Gr(o.toString()))throw new Error("Invalid redirect location");let i=we(o.pathname,r)!=null;if(o.origin===t.origin&&i)return ta(o.pathname)+o.search+o.hash}try{let n=a.createURL(e);if(Gr(n.toString()))throw new Error("Invalid redirect location")}catch{}return e}function gt(e,t,r,a){let n=e.createURL(ao(t)).toString(),o={signal:r};if(a&&ye(a.formMethod)){let{formMethod:i,formEncType:l}=a;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(a.json)):l==="text/plain"?o.body=a.text:l==="application/x-www-form-urlencoded"&&a.formData?o.body=Jr(a.formData):o.body=a.formData}return new Request(n,o)}function ro(e,t){let r=new URL(e.url),a=typeof t=="string"?Oe(t):t;if(r.pathname=a.pathname||"/",a.search){let n=new URLSearchParams(a.search),o=n.getAll("index");n.delete("index");for(let i of o.filter(Boolean))n.append("index",i);r.search=n.size?`?${n.toString()}`:""}else r.search="";return r.hash=a.hash||"",r}function Jr(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function mn(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function gl(e,t,r,a=!1,n=!1){let o={},i=null,l,s=!1,u={},d=r&&Te(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let R=f.route.id,y=t[R];if(z(!ut(y),"Cannot handle redirect results in processLoaderData"),Te(y)){let v=y.error;if(d!==void 0&&(v=d,d=void 0),i=i||{},n)i[R]=v;else{let E=et(e,R);i[E.route.id]==null&&(i[E.route.id]=v)}a||(o[R]=Jn),s||(s=!0,l=Et(y.error)?y.error.status:500),y.headers&&(u[R]=y.headers)}else o[R]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[R]=y.headers)}),d!==void 0&&r&&(i={[r[0]]:d},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function pn(e,t,r,a,n,o,i){let{loaderData:l,errors:s}=gl(t,r,a);return n.filter(u=>!u.matches||u.matches.some(d=>d.shouldLoad)).forEach(u=>{let{key:d,match:f,controller:R}=u;if(R&&R.signal.aborted)return;let y=o[d];if(z(y,"Did not find corresponding fetcher result"),Te(y)){let v=et(e.matches,f?.route.id);s&&s[v.route.id]||(s={...s,[v.route.id]:y.error}),i.delete(d)}else if(ut(y))z(!1,"Unhandled fetcher revalidation redirect");else{let v=Ue(y.data);i.set(d,v)}}),{loaderData:l,errors:s}}function yn(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Jn).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function gn(e){return e?Te(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function et(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function tr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ne(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?l=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?l=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(l=`Invalid request method "${a.toUpperCase()}"`)),new St(e||500,i,new Error(l),!0)}function rr(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(ut(n))return{key:a,result:n}}}function ao(e){let t=typeof e=="string"?Oe(e):e;return _e({...t,hash:""})}function Rl(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function vl(e){return new St(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function wl(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&bl(r))}function bl(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function El(e){return aa(e.result)&&Vn.has(e.result.status)}function Te(e){return e.type==="error"}function ut(e){return(e&&e.type)==="redirect"}function Rn(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function aa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sl(e){return Vn.has(e)}function xl(e){return aa(e)&&Sl(e.status)&&e.headers.has("Location")}function Cl(e){return tl.has(e.toUpperCase())}function ye(e){return qi.has(e.toUpperCase())}function na(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function lr(e,t){let r=typeof t=="string"?Oe(t).search:t.search;if(e[e.length-1].route.index&&na(r||""))return e[e.length-1];let a=Un(e);return a[a.length-1]}function vn(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function jr(e,t,r,a){return a?{state:"loading",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pl(e,t,r,a){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Mt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tl(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ue(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ll(e,t){try{let r=e.sessionStorage.getItem(Gn);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function Dl(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Gn,JSON.stringify(r))}catch(a){le(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function wn(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var rt=Pe.createContext(null);rt.displayName="DataRouter";var ct=Pe.createContext(null);ct.displayName="DataRouterState";var no=Pe.createContext(!1);function oo(){return Pe.useContext(no)}var mr=Pe.createContext({isTransitioning:!1});mr.displayName="ViewTransition";var oa=Pe.createContext(new Map);oa.displayName="Fetchers";var Nl=Pe.createContext(null);Nl.displayName="Await";var ge=Pe.createContext(null);ge.displayName="Navigation";var xt=Pe.createContext(null);xt.displayName="Location";var Fe=Pe.createContext({outlet:null,matches:[],isDataRoute:!1});Fe.displayName="Route";var ia=Pe.createContext(null);ia.displayName="RouteError";var wt=!0,io="REACT_ROUTER_ERROR",Ml="REDIRECT",Ol="ROUTE_ERROR_RESPONSE";function Fl(e){if(e.startsWith(`${io}:${Ml}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Il(e){if(e.startsWith(`${io}:${Ol}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new St(t.status,t.statusText,t.data)}catch{}}function lo(e,{relative:t}={}){z(at(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=P.useContext(ge),{hash:n,pathname:o,search:i}=Ct(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Me([r,o])),a.createHref({pathname:l,search:i,hash:n})}function at(){return P.useContext(xt)!=null}function be(){return z(at(),"useLocation() may be used only in the context of a <Router> component."),P.useContext(xt).location}function _l(e){z(at(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=be();return P.useMemo(()=>bt(e,$n(t)),[t,e])}var so="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uo(e){P.useContext(ge).static||P.useLayoutEffect(e)}function pr(){let{isDataRoute:e}=P.useContext(Fe);return e?Jl():kl()}function kl(){z(at(),"useNavigate() may be used only in the context of a <Router> component.");let e=P.useContext(rt),{basename:t,navigator:r}=P.useContext(ge),{matches:a}=P.useContext(Fe),{pathname:n}=be(),o=JSON.stringify(hr(a)),i=P.useRef(!1);return uo(()=>{i.current=!0}),P.useCallback((s,u={})=>{if(le(i.current,so),!i.current)return;if(typeof s=="number"){r.go(s);return}let d=$t(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Me([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,n,e])}var eu=P.createContext(null);function Al(){let{matches:e}=P.useContext(Fe);return e[e.length-1]?.params??{}}function Ct(e,{relative:t}={}){let{matches:r}=P.useContext(Fe),{pathname:a}=be(),n=JSON.stringify(hr(r));return P.useMemo(()=>$t(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function $l(e,t){return co(e,t)}function co(e,t,r){z(at(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=P.useContext(ge),{matches:n}=P.useContext(Fe),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(wt){let g=u&&u.path||"";yo(l,!u||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let d=be(),f;if(t){let g=typeof t=="string"?Oe(t):t;z(s==="/"||g.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${g.pathname}" was given in the \`location\` prop.`),f=g}else f=d;let R=f.pathname||"/",y=R;if(s!=="/"){let g=s.replace(/^\//,"").split("/");y="/"+R.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(g=>Object.assign(g,{route:r.manifest[g.route.id]||g.route})):qr(e,{pathname:y});wt&&(le(u||v!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),le(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let E=Bl(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:Me([s,a.encodeLocation?a.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Me([s,a.encodeLocation?a.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),n,r);return t&&E?P.createElement(xt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},E):E}function Hl(){let e=po(),t=Et(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return wt&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=P.createElement(P.Fragment,null,P.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:o},"ErrorBoundary")," or"," ",P.createElement("code",{style:o},"errorElement")," prop on your route."))),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:n},r):null,i)}var Ul=P.createElement(Hl,null),fo=class extends P.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=Il(e.digest);r&&(e=r)}let t=e!==void 0?P.createElement(Fe.Provider,{value:this.props.routeContext},P.createElement(ia.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?P.createElement(jl,{error:e},t):t}};fo.contextType=no;var zr=new WeakMap;function jl({children:e,error:t}){let{basename:r}=P.useContext(ge);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Fl(t.digest);if(a){let n=zr.get(t);if(n)throw n;let o=zn(a.location,r),i=o.absoluteURL||o.to;if(Gr(i))throw new Error("Invalid redirect location");if(jn&&!zr.get(t))if(o.isExternal||a.reloadDocument)window.location.href=i;else{let l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw zr.set(t,l),l}return P.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function zl({routeContext:e,match:t,children:r}){let a=P.useContext(rt);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),P.createElement(Fe.Provider,{value:e},r)}function Bl(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let d=n.findIndex(f=>f.route.id&&o?.[f.route.id]!==void 0);z(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,d+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let d=0;d<n.length;d++){let f=n[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=d),f.route.id){let{loaderData:R,errors:y}=a,v=f.route.loader&&!R.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(d,f)=>{s(d,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Ht(a.matches),errorInfo:f})}:void 0;return n.reduceRight((d,f,R)=>{let y,v=!1,E=null,g=null;a&&(y=o&&f.route.id?o[f.route.id]:void 0,E=f.route.errorElement||Ul,i&&(l<0&&R===0?(yo("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,g=null):l===R&&(v=!0,g=f.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,R+1)),S=()=>{let L;return y?L=E:v?L=g:f.route.Component?L=P.createElement(f.route.Component,null):f.route.element?L=f.route.element:L=d,P.createElement(zl,{match:f,routeContext:{outlet:d,matches:C,isDataRoute:a!=null},children:L})};return a&&(f.route.ErrorBoundary||f.route.errorElement||R===0)?P.createElement(fo,{location:a.location,revalidation:a.revalidation,component:E,error:y,children:S(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):S()},null)}function la(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ho(e){let t=P.useContext(rt);return z(t,la(e)),t}function yr(e){let t=P.useContext(ct);return z(t,la(e)),t}function Wl(e){let t=P.useContext(Fe);return z(t,la(e)),t}function sa(e){let t=Wl(e),r=t.matches[t.matches.length-1];return z(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Vl(){return sa("useRouteId")}function mo(){let e=yr("useNavigation");return P.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function ua(){let{matches:e,loaderData:t}=yr("useMatches");return P.useMemo(()=>e.map(r=>Fn(r,t)),[e,t])}function po(){let e=P.useContext(ia),t=yr("useRouteError"),r=sa("useRouteError");return e!==void 0?e:t.errors?.[r]}var Yl=0;function Gl(e){let{router:t,basename:r}=ho("useBlocker"),a=yr("useBlocker"),[n,o]=P.useState(""),i=P.useCallback(l=>{if(typeof e!="function")return!!e;if(r==="/")return e(l);let{currentLocation:s,nextLocation:u,historyAction:d}=l;return e({currentLocation:{...s,pathname:we(s.pathname,r)||s.pathname},nextLocation:{...u,pathname:we(u.pathname,r)||u.pathname},historyAction:d})},[r,e]);return P.useEffect(()=>{let l=String(++Yl);return o(l),()=>t.deleteBlocker(l)},[t]),P.useEffect(()=>{n!==""&&t.getBlocker(n,i)},[t,n,i]),n&&a.blockers.has(n)?a.blockers.get(n):st}function Jl(){let{router:e}=ho("useNavigate"),t=sa("useNavigate"),r=P.useRef(!1);return uo(()=>{r.current=!0}),P.useCallback(async(n,o={})=>{le(r.current,so),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var bn={};function yo(e,t,r){!t&&!bn[e]&&(bn[e]=!0,le(!1,r))}var En={};function Sn(e,t){!e&&!En[t]&&(En[t]=!0,console.warn(t))}var Kl="useOptimistic",xn=I[Kl],Xl=()=>{};function Ql(e){return xn?xn(e):[e,Xl]}function go(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(wt&&e.element&&le(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:I.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(wt&&e.hydrateFallbackElement&&le(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:I.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(wt&&e.errorElement&&le(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:I.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Ro=["HydrateFallback","hydrateFallbackElement"];var Zl=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function ql({router:e,flushSync:t,onError:r,useTransitions:a}){a=oo()||a;let[o,i]=I.useState(e.state),[l,s]=Ql(o),[u,d]=I.useState(),[f,R]=I.useState({isTransitioning:!1}),[y,v]=I.useState(),[E,g]=I.useState(),[C,S]=I.useState(),L=I.useRef(new Map),V=I.useCallback((m,{deletedFetchers:U,newErrors:$,flushSync:D,viewTransitionOpts:N})=>{$&&r&&Object.values($).forEach(J=>r(J,{location:m.location,params:m.matches[0]?.params??{},pattern:Ht(m.matches)})),m.fetchers.forEach((J,ee)=>{J.data!==void 0&&L.current.set(ee,J.data)}),U.forEach(J=>L.current.delete(J)),Sn(D===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let W=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Sn(N==null||W,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!N||!W){t&&D?t(()=>i(m)):a===!1?i(m):I.startTransition(()=>{a===!0&&s(J=>Cn(J,m)),i(m)});return}if(t&&D){t(()=>{E&&(y?.resolve(),E.skipTransition()),R({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let J=e.window.document.startViewTransition(()=>{t(()=>i(m))});J.finished.finally(()=>{t(()=>{v(void 0),g(void 0),d(void 0),R({isTransitioning:!1})})}),t(()=>g(J));return}E?(y?.resolve(),E.skipTransition(),S({state:m,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(d(m),R({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[e.window,t,E,y,a,s,r]);I.useLayoutEffect(()=>e.subscribe(V),[e,V]),I.useEffect(()=>{f.isTransitioning&&!f.flushSync&&v(new Zl)},[f]),I.useEffect(()=>{if(y&&u&&e.window){let m=u,U=y.promise,$=e.window.document.startViewTransition(async()=>{a===!1?i(m):I.startTransition(()=>{a===!0&&s(D=>Cn(D,m)),i(m)}),await U});$.finished.finally(()=>{v(void 0),g(void 0),d(void 0),R({isTransitioning:!1})}),g($)}},[u,y,e.window,a,s]),I.useEffect(()=>{y&&u&&l.location.key===u.location.key&&y.resolve()},[y,E,l.location,u]),I.useEffect(()=>{!f.isTransitioning&&C&&(d(C.state),R({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[f.isTransitioning,C]);let x=I.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:m=>e.navigate(m),push:(m,U,$)=>e.navigate(m,{state:U,preventScrollReset:$?.preventScrollReset}),replace:(m,U,$)=>e.navigate(m,{replace:!0,state:U,preventScrollReset:$?.preventScrollReset})}),[e]),A=e.basename||"/",j=I.useMemo(()=>({router:e,navigator:x,static:!1,basename:A,onError:r}),[e,x,A,r]);return I.createElement(I.Fragment,null,I.createElement(rt.Provider,{value:j},I.createElement(ct.Provider,{value:l},I.createElement(oa.Provider,{value:L.current},I.createElement(mr.Provider,{value:f},I.createElement(ca,{basename:A,location:l.location,navigationType:l.historyAction,navigator:x,useTransitions:a},I.createElement(es,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Cn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var es=I.memo(ts);function ts({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return co(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function rs({to:e,replace:t,state:r,relative:a}){z(at(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=I.useContext(ge);le(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=I.useContext(Fe),{pathname:i}=be(),l=pr(),s=$t(e,hr(o),i,a==="path"),u=JSON.stringify(s);return I.useEffect(()=>{l(JSON.parse(u),{replace:t,state:r,relative:a})},[l,u,a,t,r]),null}function vo(e){z(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ca({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){z(!at(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=I.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=Oe(r));let{pathname:u="/",search:d="",hash:f="",state:R=null,key:y="default",mask:v}=r,E=I.useMemo(()=>{let g=we(u,l);return g==null?null:{location:{pathname:g,search:d,hash:f,state:R,key:y,mask:v},navigationType:a}},[l,u,d,f,R,y,a,v]);return le(E!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:I.createElement(ge.Provider,{value:s},I.createElement(xt.Provider,{children:t,value:E}))}function Kr(e,t=[]){let r=[];return I.Children.forEach(e,(a,n)=>{if(!I.isValidElement(a))return;let o=[...t,n];if(a.type===I.Fragment){r.push.apply(r,Kr(a.props.children,o));return}z(a.type===vo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),z(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=Kr(a.props.children,o)),r.push(i)}),r}var sr="get",ur="application/x-www-form-urlencoded";function gr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function as(e){return gr(e)&&e.tagName.toLowerCase()==="button"}function ns(e){return gr(e)&&e.tagName.toLowerCase()==="form"}function os(e){return gr(e)&&e.tagName.toLowerCase()==="input"}function is(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ls(e,t){return e.button===0&&(!t||t==="_self")&&!is(e)}function dr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function ss(e,t){let r=dr(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var ar=null;function us(){if(ar===null)try{new FormData(document.createElement("form"),0),ar=!1}catch{ar=!0}return ar}var cs=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Br(e){return e!=null&&!cs.has(e)?(le(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ur}"`),null):e}function ds(e,t){let r,a,n,o,i;if(ns(e)){let l=e.getAttribute("action");a=l?we(l,t):null,r=e.getAttribute("method")||sr,n=Br(e.getAttribute("enctype"))||ur,o=new FormData(e)}else if(as(e)||os(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?we(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||sr,n=Br(e.getAttribute("formenctype"))||Br(l.getAttribute("enctype"))||ur,o=new FormData(l,e),!us()){let{name:u,type:d,value:f}=e;if(d==="image"){let R=u?`${u}.`:"";o.append(`${R}x`,"0"),o.append(`${R}y`,"0")}else u&&o.append(u,f)}}else{if(gr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=sr,a=null,n=ur,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var tu=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fs={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},hs=/[&><\u2028\u2029]/g;function Pn(e){return e.replace(hs,t=>fs[t])}function fa(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wo(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&we(n.pathname,t)==="/"?n.pathname=`${cr(t)}/_root.${a}`:n.pathname=`${cr(n.pathname)}.${a}`,n}async function ms(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function ps(e){return e!=null&&typeof e.page=="string"}function ys(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function gs(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await ms(o,r);return i.links?i.links():[]}return[]}));return bs(a.flat(1).filter(ys).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Tn(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let d=a.routes[s.route.id];if(!d||!d.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let f=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Rs(e,t,{includeHydrateFallback:r}={}){return vs(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function vs(e){return[...new Set(e)]}function ws(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function bs(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!ps(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(ws(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function ha(){let e=Z.useContext(rt);return fa(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Cs(){let e=Z.useContext(ct);return fa(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ut=Z.createContext(void 0);Ut.displayName="FrameworkContext";function Rr(){let e=Z.useContext(Ut);return fa(e,"You must render this element inside a <HydratedRouter> element"),e}function Ps(e,t){let r=Z.useContext(Ut),[a,n]=Z.useState(!1),[o,i]=Z.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,R=Z.useRef(null);Z.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let E=C=>{C.forEach(S=>{i(S.isIntersecting)})},g=new IntersectionObserver(E,{threshold:.5});return R.current&&g.observe(R.current),()=>{g.disconnect()}}},[e]),Z.useEffect(()=>{if(a){let E=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(E)}}},[a]);let y=()=>{n(!0)},v=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,R,{}]:[o,R,{onFocus:Ot(l,y),onBlur:Ot(s,v),onMouseEnter:Ot(u,y),onMouseLeave:Ot(d,v),onTouchStart:Ot(f,y)}]:[!1,R,{}]}function Ot(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Eo({page:e,...t}){let r=oo(),{nonce:a}=Rr(),{router:n}=ha(),o=Z.useMemo(()=>qr(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?Z.createElement(Ls,{page:e,matches:o,...t}):Z.createElement(Ds,{page:e,matches:o,...t})):null}function Ts(e){let{manifest:t,routeModules:r}=Rr(),[a,n]=Z.useState([]);return Z.useEffect(()=>{let o=!1;return gs(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Ls({page:e,matches:t,...r}){let a=be(),{future:n}=Rr(),{basename:o}=ha(),i=Z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=wo(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?s=!0:u.push(d.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return Z.createElement(Z.Fragment,null,i.map(l=>Z.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function Ds({page:e,matches:t,...r}){let a=be(),{future:n,manifest:o,routeModules:i}=Rr(),{basename:l}=ha(),{loaderData:s,matches:u}=Cs(),d=Z.useMemo(()=>Tn(e,t,u,o,a,"data"),[e,t,u,o,a]),f=Z.useMemo(()=>Tn(e,t,u,o,a,"assets"),[e,t,u,o,a]),R=Z.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,g=!1;if(t.forEach(S=>{let L=o.routes[S.route.id];!L||!L.hasLoader||(!d.some(V=>V.route.id===S.route.id)&&S.route.id in s&&i[S.route.id]?.shouldRevalidate||L.hasClientLoader?g=!0:E.add(S.route.id))}),E.size===0)return[];let C=wo(e,l,n.v8_trailingSlashAwareDataRequests,"data");return g&&E.size>0&&C.searchParams.set("_routes",t.filter(S=>E.has(S.route.id)).map(S=>S.route.id).join(",")),[C.pathname+C.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,d,t,e,i]),y=Z.useMemo(()=>Rs(f,o),[f,o]),v=Ts(f);return Z.createElement(Z.Fragment,null,R.map(E=>Z.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),y.map(E=>Z.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),v.map(({key:E,link:g})=>Z.createElement("link",{key:E,nonce:r.nonce,...g,crossOrigin:g.crossOrigin??r.crossOrigin})))}function Ns(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ms=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ms&&(window.__reactRouterVersion="7.18.2")}catch{}function Os(e,t){return Kn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Mn({window:t?.window}),hydrationData:t?.hydrationData||Fs(),routes:e,mapRouteProperties:go,hydrationRouteProperties:Ro,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Fs(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Is(e.errors)}),e}function Is(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,n]of t)if(n&&n.__type==="RouteErrorResponse")r[a]=new St(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(typeof n.__subType=="string"&&Yi.includes(n.__subType)){let o=window[n.__subType];if(typeof o=="function")try{let i=new o(n.message);i.stack="",r[a]=i}catch{}}if(r[a]==null){let o=new Error(n.message);o.stack="",r[a]=o}}else r[a]=n;return r}function So({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=_.useState({action:r.action,location:r.location}),i=_.useCallback(l=>{a===!1?o(l):_.startTransition(()=>o(l))},[a]);return _.useLayoutEffect(()=>r.listen(i),[r,i]),_.createElement(ca,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}So.displayName="unstable_HistoryRouter";var ma=_.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:d,preventScrollReset:f,viewTransition:R,defaultShouldRevalidate:y,...v},E){let{basename:g,navigator:C,useTransitions:S}=_.useContext(ge),L=typeof d=="string"&&fr.test(d),V=zn(d,g);d=V.to;let x=lo(d,{relative:n}),A=be(),j=null;if(l){let ee=$t(l,[],A.mask?A.mask.pathname:"/",!0);g!=="/"&&(ee.pathname=ee.pathname==="/"?g:Me([g,ee.pathname])),j=C.createHref(ee)}let[m,U,$]=Ps(a,v),D=Lo(d,{replace:i,mask:l,state:s,target:u,preventScrollReset:f,relative:n,viewTransition:R,defaultShouldRevalidate:y,useTransitions:S});function N(ee){t&&t(ee),ee.defaultPrevented||D(ee)}let W=!(V.isExternal||o),J=_.createElement("a",{...v,...$,href:(W?j:void 0)||V.absoluteURL||x,onClick:W?N:t,ref:Ns(E,U),target:u,"data-discover":!L&&r==="render"?"true":void 0});return m&&!L?_.createElement(_.Fragment,null,J,_.createElement(Eo,{page:x})):J});ma.displayName="Link";var xo=_.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},d){let f=Ct(i,{relative:u.relative}),R=be(),y=_.useContext(ct),{navigator:v,basename:E}=_.useContext(ge),g=y!=null&&Oo(f)&&l===!0,C=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,S=R.pathname,L=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(S=S.toLowerCase(),L=L?L.toLowerCase():null,C=C.toLowerCase()),L&&E&&(L=we(L,E)||L);let V=C!=="/"&&C.endsWith("/")?C.length-1:C.length,x=S===C||!n&&S.startsWith(C)&&S.charAt(V)==="/",A=L!=null&&(L===C||!n&&L.startsWith(C)&&L.charAt(C.length)==="/"),j={isActive:x,isPending:A,isTransitioning:g},m=x?t:void 0,U;typeof a=="function"?U=a(j):U=[a,x?"active":null,A?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(j):o;return _.createElement(ma,{...u,"aria-current":m,className:U,ref:d,style:$,to:i,viewTransition:l},typeof s=="function"?s(j):s)});xo.displayName="NavLink";var Co=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=sr,action:l,onSubmit:s,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:R,...y},v)=>{let{useTransitions:E}=_.useContext(ge),g=Do(),C=No(l,{relative:u}),S=i.toLowerCase()==="get"?"get":"post",L=typeof l=="string"&&fr.test(l);return _.createElement("form",{ref:v,method:S,action:C,onSubmit:a?s:x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let A=x.nativeEvent.submitter,j=A?.getAttribute("formmethod")||i,m=()=>g(A||x.currentTarget,{fetcherKey:t,method:j,navigate:r,replace:n,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:R});E&&r!==!1?_.startTransition(()=>m()):m()},...y,"data-discover":!L&&e==="render"?"true":void 0})});Co.displayName="Form";function Po({getKey:e,storageKey:t,...r}){let a=_.useContext(Ut),{basename:n}=_.useContext(ge),o=be(),i=ua();Mo({getKey:e,storageKey:t});let l=_.useMemo(()=>{if(!a||!e)return null;let u=Qr(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,d)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let R=JSON.parse(sessionStorage.getItem(u)||"{}")[d||window.history.state.key];typeof R=="number"&&window.scrollTo(0,R)}catch(f){console.error(f),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),_.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Pn(JSON.stringify(t||Xr))}, ${Pn(JSON.stringify(l))})`}})}Po.displayName="ScrollRestoration";function To(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pa(e){let t=_.useContext(rt);return z(t,To(e)),t}function _s(e){let t=_.useContext(ct);return z(t,To(e)),t}function Lo(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let d=pr(),f=be(),R=Ct(e,{relative:i});return _.useCallback(y=>{if(ls(y,t)){y.preventDefault();let v=r!==void 0?r:_e(f)===_e(R),E=()=>d(e,{replace:v,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?_.startTransition(()=>E()):E()}},[f,d,R,r,a,n,t,e,o,i,l,s,u])}function ks(e){le(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(dr(e)),r=_.useRef(!1),a=be(),n=_.useMemo(()=>ss(a.search,r.current?null:t.current),[a.search]),o=pr(),i=_.useCallback((l,s)=>{let u=dr(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var As=0,$s=()=>`__${String(++As)}__`;function Do(){let{router:e}=pa("useSubmit"),{basename:t}=_.useContext(ge),r=Vl(),a=e.fetch,n=e.navigate;return _.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:d,body:f}=ds(o,t);if(i.navigate===!1){let R=i.fetcherKey||$s();await a(R,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function No(e,{relative:t}={}){let{basename:r}=_.useContext(ge),a=_.useContext(Fe);z(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...Ct(e||".",{relative:t})},i=be();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(d=>d==="")){l.delete("index"),s.filter(f=>f).forEach(f=>l.append("index",f));let d=l.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Me([r,o.pathname])),_e(o)}var Xr="react-router-scroll-positions",nr={};function Qr(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:we(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Mo({getKey:e,storageKey:t}={}){let{router:r}=pa("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=_s("useScrollRestoration"),{basename:o}=_.useContext(ge),i=be(),l=ua(),s=mo();_.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Hs(_.useCallback(()=>{if(s.state==="idle"){let u=Qr(i,l,o,e);nr[u]=window.scrollY}try{sessionStorage.setItem(t||Xr,JSON.stringify(nr))}catch(u){le(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(_.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Xr);u&&(nr=JSON.parse(u))}catch{}},[t]),_.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(nr,()=>window.scrollY,e?(d,f)=>Qr(d,f,o,e):void 0);return()=>u&&u()},[r,o,e]),_.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{le(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function Hs(e,t){let{capture:r}=t||{};_.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function Oo(e,{relative:t}={}){let r=_.useContext(mr);z(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=pa("useViewTransitionState"),n=Ct(e,{relative:t});if(!r.isTransitioning)return!1;let o=we(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=we(r.nextLocation.pathname,a)||r.nextLocation.pathname;return bt(n.pathname,i)!=null||bt(n.pathname,o)!=null}var Io="Junior";function ya(){return typeof window>"u"?Io:window.__JUNIOR_DASHBOARD_AGENT_NAME__?.trim()||Io}function hc(e=ya()){return e.endsWith("s")?`${e}'`:`${e}'s`}var jt=Q(ie(),1);var vr=Q(ie(),1),ga=vr.createContext(void 0);function _o(){return vr.useContext(ga)}var $o=Q(ie(),1);var dt=Q(ie(),1);var wr=Q(ie(),1),Ra=wr.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function ko(){return wr.useContext(Ra)}function Ao(e={}){let{guess:t,label:r,metadata:a,textRef:n,index:o}=e,{register:i,unregister:l,subscribeMapChange:s,nextIndexRef:u}=ko(),d=dt.useRef(-1),[f,R]=dt.useState(o==null&&t?()=>{if(d.current===-1){let g=u.current;u.current+=1,d.current=g}return d.current}:-1),y=o??f,v=dt.useRef(null),E=dt.useCallback(g=>{let C=v.current;C&&l(C),v.current=g,g&&i(g,{metadata:a??null,index:o??null,label:r,textRef:n})},[o,i,l,a,r,n]);return Qe(()=>{if(o==null)return s(g=>{let C=v.current?g.get(v.current)?.index:null;C!=null&&R(C)})},[o,s]),{ref:E,index:y}}function Ho(e={}){let{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:a}=Ba(),{ref:n,index:o}=Ao(e),i=r===o,l=$o.useRef(null),s=qt(n,l);return{compositeProps:{tabIndex:i?0:-1,onFocus(){a(o)},onMouseMove(){let d=l.current;if(!t||!d)return;let f=d.hasAttribute("disabled")||d.ariaDisabled==="true";!i&&!f&&d.focus()}},compositeRef:s,index:o}}function Uo(e){let{render:t,className:r,style:a,state:n=Xt,props:o=$e,refs:i=$e,metadata:l,stateAttributesMapping:s,tag:u="div",...d}=e,{compositeProps:f,compositeRef:R}=Ho({metadata:l});return Ze(u,e,{state:n,ref:[R,...i],props:[f,...o,d],stateAttributesMapping:s})}var jo=Q(Le(),1),zt=jt.forwardRef(function(t,r){let{className:a,defaultPressed:n=!1,disabled:o=!1,form:i,onPressedChange:l,pressed:s,render:u,type:d,value:f,nativeButton:R=!0,style:y,...v}=t,E=Ja(f||void 0),g=_o(),C=g?.value??[],S=(o||g?.disabled)??!1,[L,V]=er({controlled:g?E!==void 0&&C.indexOf(E)>-1:s,default:n,name:"Toggle",state:"pressed"}),{getButtonProps:x,buttonRef:A}=Wa({disabled:S,native:R}),j={disabled:S,pressed:L},m=[A,r],U=[{"aria-pressed":L,onClick(N){let W=!L,J=Va(Ya.none,N.nativeEvent);l?.(W,J),!J.isCanceled&&(E&&g?.setGroupValue?.(E,W,J),!J.isCanceled&&V(W))}},v,x],$=Ze("button",t,{enabled:!g,state:j,ref:m,props:U}),D=jt.useMemo(()=>({disabled:S,focusableWhenDisabled:!1}),[S]);return g?(0,jo.jsx)(Uo,{tag:"button",render:u,className:a,style:y,metadata:D,state:j,refs:m,props:U}):$});var xr=Q(ie(),1);var Jo=Q(ie(),1);var Ge=Q(ie(),1);var zo=Q(Le(),1);function Bo(e){let{children:t,elementsRef:r,labelsRef:a,onMapChange:n}=e,o=ve(n),[,i]=Ge.useState(0),l=Nr(js).current,s=Nr(Us).current,u=Ge.useRef(0),d=Ge.useRef(!0),f=Ge.useRef(null),R=Ge.useRef(null),y=ve(()=>{d.current||(d.current=!0,i(x=>x+1))}),v=ve((x,A)=>{s.set(x,A),y()}),E=ve(x=>{s.delete(x),y()}),g=ve(x=>{let A=new Map;return r.current.length=0,a&&(a.current.length=0),x.forEach(j=>{A.set(j.element,{...j.registration.metadata??{},index:j.index}),r.current[j.index]=j.element,a&&(a.current[j.index]=j.registration.label!==void 0?j.registration.label:j.registration.textRef?.current?.textContent??j.element.textContent)}),u.current=r.current.length,A});function C(x){if(R.current?.disconnect(),R.current=null,typeof MutationObserver!="function"||x.length<2)return;let A=new MutationObserver(m=>{if(!Ws(m))return;let U=null;for(let $ of x)if($.isConnected){if(U&&Wo(U,$)>0){A.disconnect(),y();return}U=$}});R.current=A;let j=new Set;for(let m=1;m<x.length;m+=1){let U=Bs(x[m-1],x[m]);U&&j.add(U)}j.forEach(m=>A.observe(m,{childList:!0}))}let S=ve(()=>{let[x,A]=zs(s),j=g(x),m=f.current,U=!m||m.length!==x.length||x.some(($,D)=>{let N=m[D];return $.index!==N.index||$.element!==N.element||$.registration.index!==N.registration.index||$.registration.metadata!==N.registration.metadata});C(A),f.current=x,d.current=!1,U&&(l.forEach($=>$(j)),o(j))});Qe(()=>(!d.current&&f.current&&g(f.current),()=>{r.current=[],a&&(a.current=[])}),[r,a,g]),Qe(()=>{d.current&&S()}),Qe(()=>()=>{R.current?.disconnect(),d.current=!0},[]);let L=ve(x=>(l.add(x),()=>{l.delete(x)})),V=Ge.useMemo(()=>({register:v,unregister:E,subscribeMapChange:L,nextIndexRef:u}),[v,E,L,u]);return(0,zo.jsx)(Ra.Provider,{value:V,children:t})}function Us(){return new Map}function js(){return new Set}function zs(e){let t=new Set,r=[],a=[];e.forEach((o,i)=>{if(!i.isConnected)return;let l=o.index,s={index:l??-1,element:i,registration:o};l===null?a.push(s):l>=0&&(t.add(l),r.push(s))});let n=0;return a.sort((o,i)=>Wo(o.element,i.element)),a.forEach(o=>{for(;t.has(n);)n+=1;o.index=n,r.push(o),n+=1}),t.size>0&&r.sort((o,i)=>o.index-i.index),[r,a.map(o=>o.element)]}function Bs(e,t){let r=e.parentElement;for(;r&&!r.contains(t);)r=r.parentElement;return r}function Ws(e){for(let t of e)for(let r=0;r<t.removedNodes.length;r+=1)if(t.removedNodes[r].isConnected)return!0;return!1}function Wo(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var ft=Q(ie(),1);function Vo(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}var va="data-composite-item-active";function Yo(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:n,direction:o,highlightedIndex:i,onHighlightedIndexChange:l,rootRef:s,enableHomeAndEndKeys:u=!1,stopEventPropagation:d,disabledIndices:f,modifierKeys:R=$e}=e,[y,v]=ft.useState(0),E=a!=null,g=ft.useRef(null),C=qt(g,s),S=ft.useRef([]),L=ft.useRef(!1),V=ft.useRef(null),x=i??y,A=ve((D,N=!1)=>{if(V.current=S.current[D]??null,(l??v)(D),N){let W=S.current[D];Hr(g.current,W,o,r)}}),j=ve(D=>{if(D.size===0)return;if(L.current){let ee=S.current,G=ee.indexOf(V.current);if(G===-1){let re=ee[x];!re||Dt(ee,x,f)?A(Vs(ee,f)):V.current=re}else G!==x&&A(G);return}L.current=!0;let N=Array.from(D.keys()),W=N.find(ee=>ee?.hasAttribute(va))??null,J=W?D.get(W)?.index??-1:-1;if(J!==-1)A(J);else if(Dt(N,x,f)){let ee=Zt(N,{disabledIndices:f});Qt(N,ee)||A(ee)}Hr(g.current,W,o,r)});Qe(()=>{if(f==null||i!=null||!L.current)return;let D=S.current;if(Dt(D,x,f)){let N=Zt(D,{disabledIndices:f});Qt(D,N)||A(N)}},[f,i,x,S,A]);let m=ve((D,N,W)=>n?n(D,N,W,S):W),U=ve(D=>{let N=D.key===kr||D.key===Ar;if(!Xa.has(D.key)||!u&&N||Ys(D,R)||!g.current)return;let J=o==="rtl",ee=J?Ir:_r,G=J?_r:Ir,re=r==="vertical"?Fr:ee,Ee=r==="vertical"?Or:G,X=Mr(D.nativeEvent);if(X!=null&&$r(X)&&!Vo(X)){let he=X.selectionStart,Re=X.selectionEnd,ze=X.value;if(he==null||D.shiftKey||he!==Re||D.key!==Ee&&he<ze.length||D.key!==re&&he>0)return}let K=x,ce=Ua(S,f),me=ja(S,f);a!=null&&(K=a({disabledIndices:f,elementsRef:S,event:D,highlightedIndex:x,loopFocus:t,maxIndex:me,minIndex:ce,onLoop:m,orientation:r,rtl:J}));let ue=r!=="vertical"&&D.key===ee||r!=="horizontal"&&D.key===Fr,fe=r!=="vertical"&&D.key===G||r!=="horizontal"&&D.key===Or;u&&(D.key===kr?K=ce:D.key===Ar&&(K=me)),K===x&&(ue||fe)&&(t&&K===me&&ue?(K=ce,n&&(K=n(D,x,K,S))):t&&K===ce&&fe?(K=me,n&&(K=n(D,x,K,S))):K=Zt(S.current,{startingIndex:K,decrement:fe,disabledIndices:f})),K!==x&&!Qt(S.current,K)&&(d&&D.stopPropagation(),(E||N||ue||fe)&&D.preventDefault(),A(K,!0),queueMicrotask(()=>{S.current[K]?.focus()}))});return{props:{ref:C,onFocus(D){let N=g.current,W=Mr(D.nativeEvent);!N||W==null||!$r(W)||W.setSelectionRange(0,W.value.length)},onKeyDown:U},highlightedIndex:x,onHighlightedIndexChange:A,elementsRef:S,onMapChange:j,relayKeyboardEvent:U}}function Vs(e,t){let r=-1;for(let a=0;a<e.length;a+=1){let n=e[a];if(!(!n||Dt(e,a,t))){if(n.hasAttribute(va))return a;r===-1&&(r=a)}}return Math.max(r,0)}function Ys(e,t){for(let r of Qa)if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}var br=Q(ie(),1),Gs=br.createContext(void 0);function Go(){return br.useContext(Gs)?.direction??"ltr"}var wa=Q(Le(),1);function Ko(e){let{render:t,className:r,style:a,refs:n=$e,props:o=$e,state:i=Xt,stateAttributesMapping:l,highlightedIndex:s,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:R,onLoop:y,enableHomeAndEndKeys:v,onMapChange:E,stopEventPropagation:g=!0,rootRef:C,disabledIndices:S,modifierKeys:L,highlightItemOnHover:V=!1,tag:x="div",...A}=e,j=Go(),{props:m,highlightedIndex:U,onHighlightedIndexChange:$,elementsRef:D,onMapChange:N,relayKeyboardEvent:W}=Yo({grid:f,loopFocus:R,onLoop:y,orientation:d,highlightedIndex:s,onHighlightedIndexChange:u,rootRef:C,stopEventPropagation:g,enableHomeAndEndKeys:v,direction:j,disabledIndices:S,modifierKeys:L}),J=Ze(x,e,{state:i,ref:n,props:[m,...o,A],stateAttributesMapping:l}),ee=Jo.useMemo(()=>({highlightedIndex:U,onHighlightedIndexChange:$,highlightItemOnHover:V,relayKeyboardEvent:W}),[U,$,V,W]);return(0,wa.jsx)(za.Provider,{value:ee,children:(0,wa.jsx)(Bo,{elementsRef:D,onMapChange:G=>{E?.(G),N(G)},children:J})})}var Er=Q(ie(),1),Js=Er.createContext(void 0);function Xo(e){let t=Er.useContext(Js);if(t===void 0&&!e)throw new Error(Ha(69));return t}var Sr=Q(ie(),1),Ks=Sr.createContext(void 0);function Qo(){return Sr.useContext(Ks)}var ba=Q(Le(),1),Ea=xr.forwardRef(function(t,r){let{defaultValue:a,disabled:n=!1,loopFocus:o=!0,onValueChange:i,orientation:l="horizontal",multiple:s=!1,value:u,className:d,render:f,style:R,...y}=t,v=Xo(!0),E=Qo(),g=a??$e,C=u!==void 0||a!==void 0,S=(v?.disabled??!1)||(E?.disabled??!1)||n,[L,V]=er({controlled:u,default:g,name:"ToggleGroup",state:"value"}),x=ve(($,D,N)=>{let W;s?(W=L.slice(),D?W.push($):W.splice(L.indexOf($),1)):W=D?[$]:[],i?.(W,N),!N.isCanceled&&V(W)}),A={disabled:S,multiple:s,orientation:l},j=xr.useMemo(()=>({disabled:S,setGroupValue:x,value:L,isValueInitialized:C}),[S,x,L,C]),m={role:"group"},U=Ze("div",t,{enabled:!!v,state:A,ref:r,props:[m,y]});return(0,ba.jsx)(ga.Provider,{value:j,children:v?U:(0,ba.jsx)(Ko,{render:f,className:d,style:R,state:A,refs:[r],props:[m,y],loopFocus:o,enableHomeAndEndKeys:!0,orientation:l})})});var Zo=Q(Le(),1),Sa=Ga("inline-flex cursor-pointer items-center justify-center font-sans text-xs font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus",{variants:{variant:{default:"h-7 min-w-10 rounded-md border border-transparent bg-transparent px-2 text-dashboard-text-muted hover:bg-dashboard-fill-hover hover:text-dashboard-text data-pressed:border-dashboard-border-interactive data-pressed:bg-dashboard-surface-active data-pressed:text-dashboard-text",pill:"rounded-md border border-dashboard-border-strong bg-dashboard-surface-raised px-2 py-1 leading-tight text-dashboard-text-muted hover:border-dashboard-border-interactive hover:bg-dashboard-surface-hover hover:text-dashboard-text data-pressed:border-dashboard-border-heavy data-pressed:bg-dashboard-text-solid data-pressed:text-dashboard-text-inverse"}},defaultVariants:{variant:"default"}});function Ld({className:e,variant:t,...r}){return(0,Zo.jsx)(zt,{"data-slot":"toggle",className:Nt(Sa({variant:t}),e),...r})}var xa=Q(Le(),1);function qo({className:e,...t}){return(0,xa.jsx)(Ea,{"data-slot":"toggle-group",className:Nt("flex items-center gap-1",e),...t})}function ei({className:e,variant:t,...r}){return(0,xa.jsx)(zt,{"data-slot":"toggle-group-item",className:Nt(Sa({variant:t}),e),...r})}var ri=Q(ie(),1);function ti(e,t=ya()){let r=e?.trim();return r?`${r} - ${t}`:t}function ai(e){(0,ri.useEffect)(()=>{if(e?.trim())return document.title=ti(e),()=>{document.title=ti(void 0)}},[e])}var Ca=Q(Le(),1),Xs=[1,7,30,90];function Qs(e){return e===1?"24h":`${e}d`}function $d(e){return e===1?"last 24 hours":`last ${e} days`}function Hd(e){return e===1?"hour":e===7?"6hour":"day"}function ni(e){return e===1}function Zs(e){return e===7}function Ud(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function jd(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function zd(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function Bd(e){return ni(e.range)&&e.hours?.length?e.hours.slice(-24):ni(e.range)?e.days.slice(-1):Zs(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?qs({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function qs(e){let t=new Map;for(let r of e.hours){let a=Date.parse(`${r.date}:00:00.000Z`);if(Number.isNaN(a))continue;let n=new Date(a);n.setUTCMinutes(0,0,0),n.setUTCHours(Math.floor(n.getUTCHours()/6)*6,0,0,0);let o=n.toISOString().slice(0,13),l={...t.get(o)??e.empty(o),date:o};for(let[s,u]of Object.entries(r))if(s!=="date"&&typeof u=="number"){let d=l[s];l[s]=(typeof d=="number"?d:0)+u}t.set(o,l)}if(e.hours.length>=24){let r=e.hours[e.hours.length-1]?.date,a=r?Date.parse(`${r}:00:00.000Z`):Date.now(),n=new Date(a);n.setUTCMinutes(0,0,0),n.setUTCHours(Math.floor(n.getUTCHours()/6)*6,0,0,0);let o=new Date(n.getTime()-9720*60*1e3),i=[];for(let l=new Date(o);l.getTime()<=n.getTime();l.setTime(l.getTime()+360*60*1e3)){let s=l.toISOString().slice(0,13);i.push(t.get(s)??e.empty(s))}return i}return[...t.values()].sort((r,a)=>r.date.localeCompare(a.date))}function oi(e){return(0,Ca.jsx)(qo,{"aria-label":"Reporting period",onValueChange:([t])=>{t&&e.onChange(Number(t))},value:[String(e.value)],children:(e.options??Xs).map(t=>(0,Ca.jsx)(ei,{value:String(t),children:Qs(t)},t))})}var je=Q(Le(),1);function Jd(e){ai(e.documentTitle??(typeof e.title=="string"?e.title:void 0));let t=e.range!==void 0&&e.onRangeChange?(0,je.jsx)(oi,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,r=e.actions??t;return(0,je.jsxs)("header",{className:Ka("min-w-0 border-b border-dashboard-border-subtle",!e.navigation&&"pb-4 sm:pb-6"),children:[(0,je.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-6 max-md:flex-col max-md:items-stretch",children:[(0,je.jsxs)("div",{className:"min-w-0",children:[(0,je.jsx)("h2",{className:"m-0 font-display text-3xl font-light leading-none tracking-[-0.03em] text-dashboard-text sm:text-4xl",children:e.title}),e.description?(0,je.jsx)("div",{className:"mt-2 max-w-2xl font-sans text-xs leading-relaxed text-dashboard-text-muted sm:text-sm",children:e.description}):null]}),r?(0,je.jsx)("div",{className:"shrink-0",children:r}):null]}),e.navigation?(0,je.jsx)("div",{className:"mt-4 sm:mt-6",children:e.navigation}):null]})}export{qr as a,bt as b,lo as c,be as d,_l as e,pr as f,Al as g,$l as h,Gl as i,ql as j,rs as k,vo as l,Kr as m,Os as n,ma as o,xo as p,ks as q,Go as r,ya as s,hc as t,Ao as u,Ho as v,Uo as w,Bo as x,va as y,Ko as z,Xo as A,Ld as B,qo as C,ei as D,ai as E,$d as F,Hd as G,Ud as H,jd as I,zd as J,Bd as K,oi as L,Jd as M};
|
|
5
|
+
/*! Bundled license information:
|
|
6
|
+
|
|
7
|
+
react-router/dist/development/chunk-62JRHF6Z.mjs:
|
|
8
|
+
react-router/dist/development/index.mjs:
|
|
9
|
+
(**
|
|
10
|
+
* react-router v7.18.2
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Remix Software Inc.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
16
|
+
*
|
|
17
|
+
* @license MIT
|
|
18
|
+
*)
|
|
19
|
+
*/
|