hasancode-api-docs 1.0.11 → 1.0.13
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as dy,a as my,P as hy,b as dt,N as _h,u as oy,C as yy,c as vy,d as gy,e as by,f as Sy,g as vf,h as gf,R as Th,i as ry,j as py,k as zy,l as Ty,m as Ay}from"./vendor-
|
|
1
|
+
import{r as dy,a as my,P as hy,b as dt,N as _h,u as oy,C as yy,c as vy,d as gy,e as by,f as Sy,g as vf,h as gf,R as Th,i as ry,j as py,k as zy,l as Ty,m as Ay}from"./vendor-Cy83rCXF.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))m(S);new MutationObserver(S=>{for(const x of S)if(x.type==="childList")for(const N of x.addedNodes)N.tagName==="LINK"&&N.rel==="modulepreload"&&m(N)}).observe(document,{childList:!0,subtree:!0});function p(S){const x={};return S.integrity&&(x.integrity=S.integrity),S.referrerPolicy&&(x.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?x.credentials="include":S.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function m(S){if(S.ep)return;S.ep=!0;const x=p(S);fetch(S.href,x)}})();var sf={exports:{}},gu={};var Ah;function Ey(){if(Ah)return gu;Ah=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function p(m,S,x){var N=null;if(x!==void 0&&(N=""+x),S.key!==void 0&&(N=""+S.key),"key"in S){x={};for(var D in S)D!=="key"&&(x[D]=S[D])}else x=S;return S=x.ref,{$$typeof:o,type:m,key:N,ref:S!==void 0?S:null,props:x}}return gu.Fragment=r,gu.jsx=p,gu.jsxs=p,gu}var Eh;function xy(){return Eh||(Eh=1,sf.exports=Ey()),sf.exports}var d=xy(),df={exports:{}},bu={},mf={exports:{}},hf={};var xh;function My(){return xh||(xh=1,(function(o){function r(A,M){var C=A.length;A.push(M);l:for(;0<C;){var ul=C-1>>>1,nl=A[ul];if(0<S(nl,M))A[ul]=M,A[C]=nl,C=ul;else break l}}function p(A){return A.length===0?null:A[0]}function m(A){if(A.length===0)return null;var M=A[0],C=A.pop();if(C!==M){A[0]=C;l:for(var ul=0,nl=A.length,_l=nl>>>1;ul<_l;){var ml=2*(ul+1)-1,W=A[ml],Al=ml+1,gt=A[Al];if(0>S(W,C))Al<nl&&0>S(gt,W)?(A[ul]=gt,A[Al]=C,ul=Al):(A[ul]=W,A[ml]=C,ul=ml);else if(Al<nl&&0>S(gt,C))A[ul]=gt,A[Al]=C,ul=Al;else break l}}return M}function S(A,M){var C=A.sortIndex-M.sortIndex;return C!==0?C:A.id-M.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;o.unstable_now=function(){return x.now()}}else{var N=Date,D=N.now();o.unstable_now=function(){return N.now()-D}}var Y=[],ll=[],tl=1,_=null,K=3,fl=!1,el=!1,sl=!1,w=!1,Cl=typeof setTimeout=="function"?setTimeout:null,Tl=typeof clearTimeout=="function"?clearTimeout:null,Ul=typeof setImmediate<"u"?setImmediate:null;function Xt(A){for(var M=p(ll);M!==null;){if(M.callback===null)m(ll);else if(M.startTime<=A)m(ll),M.sortIndex=M.expirationTime,r(Y,M);else break;M=p(ll)}}function ya(A){if(sl=!1,Xt(A),!el)if(p(Y)!==null)el=!0,vt||(vt=!0,Pl());else{var M=p(ll);M!==null&&Tt(ya,M.startTime-A)}}var vt=!1,zt=-1,mt=5,qa=-1;function ru(){return w?!0:!(o.unstable_now()-qa<mt)}function Ya(){if(w=!1,vt){var A=o.unstable_now();qa=A;var M=!0;try{l:{el=!1,sl&&(sl=!1,Tl(zt),zt=-1),fl=!0;var C=K;try{t:{for(Xt(A),_=p(Y);_!==null&&!(_.expirationTime>A&&ru());){var ul=_.callback;if(typeof ul=="function"){_.callback=null,K=_.priorityLevel;var nl=ul(_.expirationTime<=A);if(A=o.unstable_now(),typeof nl=="function"){_.callback=nl,Xt(A),M=!0;break t}_===p(Y)&&m(Y),Xt(A)}else m(Y);_=p(Y)}if(_!==null)M=!0;else{var _l=p(ll);_l!==null&&Tt(ya,_l.startTime-A),M=!1}}break l}finally{_=null,K=C,fl=!1}M=void 0}}finally{M?Pl():vt=!1}}}var Pl;if(typeof Ul=="function")Pl=function(){Ul(Ya)};else if(typeof MessageChannel<"u"){var pu=new MessageChannel,Ae=pu.port2;pu.port1.onmessage=Ya,Pl=function(){Ae.postMessage(null)}}else Pl=function(){Cl(Ya,0)};function Tt(A,M){zt=Cl(function(){A(o.unstable_now())},M)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(A){A.callback=null},o.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):mt=0<A?Math.floor(1e3/A):5},o.unstable_getCurrentPriorityLevel=function(){return K},o.unstable_next=function(A){switch(K){case 1:case 2:case 3:var M=3;break;default:M=K}var C=K;K=M;try{return A()}finally{K=C}},o.unstable_requestPaint=function(){w=!0},o.unstable_runWithPriority=function(A,M){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var C=K;K=A;try{return M()}finally{K=C}},o.unstable_scheduleCallback=function(A,M,C){var ul=o.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?ul+C:ul):C=ul,A){case 1:var nl=-1;break;case 2:nl=250;break;case 5:nl=1073741823;break;case 4:nl=1e4;break;default:nl=5e3}return nl=C+nl,A={id:tl++,callback:M,priorityLevel:A,startTime:C,expirationTime:nl,sortIndex:-1},C>ul?(A.sortIndex=C,r(ll,A),p(Y)===null&&A===p(ll)&&(sl?(Tl(zt),zt=-1):sl=!0,Tt(ya,C-ul))):(A.sortIndex=nl,r(Y,A),el||fl||(el=!0,vt||(vt=!0,Pl()))),A},o.unstable_shouldYield=ru,o.unstable_wrapCallback=function(A){var M=K;return function(){var C=K;K=M;try{return A.apply(this,arguments)}finally{K=C}}}})(hf)),hf}var Mh;function jy(){return Mh||(Mh=1,mf.exports=My()),mf.exports}var jh;function Ny(){if(jh)return bu;jh=1;var o=jy(),r=dy(),p=my();function m(l){var t="https://react.dev/errors/"+l;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+l+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function S(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function x(l){var t=l,a=l;if(l.alternate)for(;t.return;)t=t.return;else{l=t;do t=l,(t.flags&4098)!==0&&(a=t.return),l=t.return;while(l)}return t.tag===3?a:null}function N(l){if(l.tag===13){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function D(l){if(l.tag===31){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function Y(l){if(x(l)!==l)throw Error(m(188))}function ll(l){var t=l.alternate;if(!t){if(t=x(l),t===null)throw Error(m(188));return t!==l?null:l}for(var a=l,e=t;;){var u=a.return;if(u===null)break;var n=u.alternate;if(n===null){if(e=u.return,e!==null){a=e;continue}break}if(u.child===n.child){for(n=u.child;n;){if(n===a)return Y(u),l;if(n===e)return Y(u),t;n=n.sibling}throw Error(m(188))}if(a.return!==e.return)a=u,e=n;else{for(var c=!1,i=u.child;i;){if(i===a){c=!0,a=u,e=n;break}if(i===e){c=!0,e=u,a=n;break}i=i.sibling}if(!c){for(i=n.child;i;){if(i===a){c=!0,a=n,e=u;break}if(i===e){c=!0,e=n,a=u;break}i=i.sibling}if(!c)throw Error(m(189))}}if(a.alternate!==e)throw Error(m(190))}if(a.tag!==3)throw Error(m(188));return a.stateNode.current===a?l:t}function tl(l){var t=l.tag;if(t===5||t===26||t===27||t===6)return l;for(l=l.child;l!==null;){if(t=tl(l),t!==null)return t;l=l.sibling}return null}var _=Object.assign,K=Symbol.for("react.element"),fl=Symbol.for("react.transitional.element"),el=Symbol.for("react.portal"),sl=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),Cl=Symbol.for("react.profiler"),Tl=Symbol.for("react.consumer"),Ul=Symbol.for("react.context"),Xt=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),vt=Symbol.for("react.suspense_list"),zt=Symbol.for("react.memo"),mt=Symbol.for("react.lazy"),qa=Symbol.for("react.activity"),ru=Symbol.for("react.memo_cache_sentinel"),Ya=Symbol.iterator;function Pl(l){return l===null||typeof l!="object"?null:(l=Ya&&l[Ya]||l["@@iterator"],typeof l=="function"?l:null)}var pu=Symbol.for("react.client.reference");function Ae(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===pu?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case sl:return"Fragment";case Cl:return"Profiler";case w:return"StrictMode";case ya:return"Suspense";case vt:return"SuspenseList";case qa:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case el:return"Portal";case Ul:return l.displayName||"Context";case Tl:return(l._context.displayName||"Context")+".Consumer";case Xt:var t=l.render;return l=l.displayName,l||(l=t.displayName||t.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case zt:return t=l.displayName||null,t!==null?t:Ae(l.type)||"Memo";case mt:t=l._payload,l=l._init;try{return Ae(l(t))}catch{}}return null}var Tt=Array.isArray,A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=p.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C={pending:!1,data:null,method:null,action:null},ul=[],nl=-1;function _l(l){return{current:l}}function ml(l){0>nl||(l.current=ul[nl],ul[nl]=null,nl--)}function W(l,t){nl++,ul[nl]=l.current,l.current=t}var Al=_l(null),gt=_l(null),Lt=_l(null),zu=_l(null);function Tu(l,t){switch(W(Lt,t),W(gt,l),W(Al,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?Km(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=Km(t),l=Jm(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}ml(Al),W(Al,l)}function Ga(){ml(Al),ml(gt),ml(Lt)}function Zn(l){l.memoizedState!==null&&W(zu,l);var t=Al.current,a=Jm(t,l.type);t!==a&&(W(gt,l),W(Al,a))}function Au(l){gt.current===l&&(ml(Al),ml(gt)),zu.current===l&&(ml(zu),hu._currentValue=C)}var Vn,zf;function va(l){if(Vn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Vn=t&&t[1]||"",zf=-1<a.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+Vn+l+zf}var Kn=!1;function Jn(l,t){if(!l||Kn)return"";Kn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var e={DetermineComponentFrameRoot:function(){try{if(t){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(b){var g=b}Reflect.construct(l,[],E)}else{try{E.call()}catch(b){g=b}l.call(E.prototype)}}else{try{throw Error()}catch(b){g=b}(E=l())&&typeof E.catch=="function"&&E.catch(function(){})}}catch(b){if(b&&g&&typeof b.stack=="string")return[b.stack,g.stack]}return[null,null]}};e.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(e.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(e.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=e.DetermineComponentFrameRoot(),c=n[0],i=n[1];if(c&&i){var f=c.split(`
|
|
4
4
|
`),v=i.split(`
|
|
@@ -11,4 +11,4 @@ Error generating stack: `+e.message+`
|
|
|
11
11
|
px-4 py-2 text-sm font-medium rounded-md
|
|
12
12
|
transition-all duration-200
|
|
13
13
|
${N?Iy(x):"bg-zinc-200 text-zinc-700 hover:bg-zinc-300"}
|
|
14
|
-
`,children:x},x)})}),d.jsx(pf,{code:JSON.stringify(o[m]?.example,null,4),lang:Ln.JSON,theme:r||pl.VITESSE_BLACK})]}):null},lv=o=>{const{routeKey:r,config:p}=o,S=p.sections.map(_=>_.items).flat().find(_=>r===_?.name),x=S?.api?.params?of(S.api.params):null,N=S?.api?.query?of(S.api.query):null,D=S?.api?.body?Dh(S.api.body.schema):null,Y=S?.api?.headers?of(S.api.headers):null,ll=S?.api?.auth?S.api.auth:!1,tl=S?.api?.responses?Dh(S.api.responses[200]?.schema||S.api.responses[201]?.schema||{}):null;return d.jsxs("div",{children:[d.jsx("h4",{children:S?.label}),d.jsx("div",{className:"mb-10"}),S?.api?.deprecated&&d.jsx("div",{className:"note p-4 rounded-lg bg-orange-50 border border-orange-200 text-orange-700 mb-6 italic font-semibold",children:"This route is deprecated."}),S?.api?.description&&d.jsx(Ba,{content:S.api.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx(Gh,{method:(S?.api.method||"get").toLocaleUpperCase(),text:S?.api.path||"/",config:p}),x&&d.jsx("h4",{className:"mb-1.5",children:"Params"}),x&&d.jsx(Su,{item:{heading:x.headings,data:x.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),N&&d.jsx("h4",{className:"mb-1.5",children:"Query"}),N&&d.jsx(Su,{item:{heading:N.headings,data:N.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),D&&d.jsx("h4",{className:"mb-1.5",children:"Body"}),D&&d.jsxs("div",{className:"mb-1.5",children:[d.jsxs("div",{children:[d.jsx("b",{children:"Content-Type:"})," ",d.jsx(Ca,{text:String(S?.api?.body?.contentType)})]}),d.jsx(Ba,{content:S?.api?.body?.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),D&&d.jsx(Su,{item:{heading:D.headings,data:D.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),Y&&d.jsx("h4",{className:"mb-1.5",children:"Headers"}),Y&&d.jsx(Su,{item:{heading:Y.headings,data:Y.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx("h4",{className:"mb-1.5",children:"Auth"}),d.jsx($y,{auth:ll,codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),tl&&S?.api?.responses&&d.jsx("h4",{className:"mb-1.5",children:"Response"}),tl&&S?.api?.responses&&d.jsxs("div",{className:"mb-1.5",children:[d.jsxs("div",{children:[d.jsx("b",{children:"Content-Type:"})," ",d.jsx(Ca,{text:String(S?.api?.responses?.[200]?.contentType||S?.api?.responses?.[201]?.contentType)})]}),d.jsx(Ba,{content:S?.api?.responses?.[200]?.description||S?.api?.responses?.[201]?.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),tl&&S?.api?.responses&&tl.headings.length>0&&d.jsx(Su,{item:{heading:tl.headings,data:tl.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),S?.api?.summary&&d.jsx("h4",{className:"mb-1.5",children:"Summary"}),S?.api?.summary&&d.jsx(Ba,{content:S.api.summary||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx("h4",{className:"mb-1.5",children:"Example"}),D&&d.jsxs("div",{children:[d.jsx("h5",{children:"Request"}),d.jsx(pf,{code:JSON.stringify(S?.api?.body?.example,null,4),lang:Ln.JSON,theme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),S?.api?.responses&&d.jsx(Py,{responses:S.api.responses,codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),S?.api?.note&&d.jsx(Fy,{note:S.api.note})]})};function tv(o){return o.toLowerCase().split(" ")[1]?.split("/").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")??o}function av(o){return o.filter(r=>r.type==="GROUP").map(r=>({label:r.label.toUpperCase(),items:(r.items??[]).filter(p=>p.type==="ITEM"&&p.api).map(p=>({name:p.name,label:tv(p.label),method:p.api?.method,path:p.api?.path}))})).filter(r=>r.items.length>0)}const ev=o=>{const{config:r}=o,p=av(r.sections);return d.jsxs("div",{children:[d.jsx("h5",{children:"Short Hand"}),d.jsx("div",{className:"mb-8"}),p.map(m=>d.jsxs("div",{className:"mb-6",children:[d.jsx("h6",{children:m.label}),d.jsx("div",{className:"mb-4"}),m.items.map(S=>d.jsx(Gh,{method:(S.method||"get").toLocaleUpperCase(),text:S.path||"/",config:r}))]},m.label))]})};function Uh(){const{key:o}=ry(),[r,p]=dt.useState(!1),[m,S]=dt.useState(null),[x,N]=dt.useState(!0);return dt.useEffect(()=>{(async()=>{const Y=await fetch("
|
|
14
|
+
`,children:x},x)})}),d.jsx(pf,{code:JSON.stringify(o[m]?.example,null,4),lang:Ln.JSON,theme:r||pl.VITESSE_BLACK})]}):null},lv=o=>{const{routeKey:r,config:p}=o,S=p.sections.map(_=>_.items).flat().find(_=>r===_?.name),x=S?.api?.params?of(S.api.params):null,N=S?.api?.query?of(S.api.query):null,D=S?.api?.body?Dh(S.api.body.schema):null,Y=S?.api?.headers?of(S.api.headers):null,ll=S?.api?.auth?S.api.auth:!1,tl=S?.api?.responses?Dh(S.api.responses[200]?.schema||S.api.responses[201]?.schema||{}):null;return d.jsxs("div",{children:[d.jsx("h4",{children:S?.label}),d.jsx("div",{className:"mb-10"}),S?.api?.deprecated&&d.jsx("div",{className:"note p-4 rounded-lg bg-orange-50 border border-orange-200 text-orange-700 mb-6 italic font-semibold",children:"This route is deprecated."}),S?.api?.description&&d.jsx(Ba,{content:S.api.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx(Gh,{method:(S?.api.method||"get").toLocaleUpperCase(),text:S?.api.path||"/",config:p}),x&&d.jsx("h4",{className:"mb-1.5",children:"Params"}),x&&d.jsx(Su,{item:{heading:x.headings,data:x.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),N&&d.jsx("h4",{className:"mb-1.5",children:"Query"}),N&&d.jsx(Su,{item:{heading:N.headings,data:N.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),D&&d.jsx("h4",{className:"mb-1.5",children:"Body"}),D&&d.jsxs("div",{className:"mb-1.5",children:[d.jsxs("div",{children:[d.jsx("b",{children:"Content-Type:"})," ",d.jsx(Ca,{text:String(S?.api?.body?.contentType)})]}),d.jsx(Ba,{content:S?.api?.body?.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),D&&d.jsx(Su,{item:{heading:D.headings,data:D.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),Y&&d.jsx("h4",{className:"mb-1.5",children:"Headers"}),Y&&d.jsx(Su,{item:{heading:Y.headings,data:Y.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx("h4",{className:"mb-1.5",children:"Auth"}),d.jsx($y,{auth:ll,codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),tl&&S?.api?.responses&&d.jsx("h4",{className:"mb-1.5",children:"Response"}),tl&&S?.api?.responses&&d.jsxs("div",{className:"mb-1.5",children:[d.jsxs("div",{children:[d.jsx("b",{children:"Content-Type:"})," ",d.jsx(Ca,{text:String(S?.api?.responses?.[200]?.contentType||S?.api?.responses?.[201]?.contentType)})]}),d.jsx(Ba,{content:S?.api?.responses?.[200]?.description||S?.api?.responses?.[201]?.description||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),tl&&S?.api?.responses&&tl.headings.length>0&&d.jsx(Su,{item:{heading:tl.headings,data:tl.values},codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),S?.api?.summary&&d.jsx("h4",{className:"mb-1.5",children:"Summary"}),S?.api?.summary&&d.jsx(Ba,{content:S.api.summary||"",codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),d.jsx("h4",{className:"mb-1.5",children:"Example"}),D&&d.jsxs("div",{children:[d.jsx("h5",{children:"Request"}),d.jsx(pf,{code:JSON.stringify(S?.api?.body?.example,null,4),lang:Ln.JSON,theme:p.theme?.codeTheme||pl.VITESSE_BLACK})]}),S?.api?.responses&&d.jsx(Py,{responses:S.api.responses,codeTheme:p.theme?.codeTheme||pl.VITESSE_BLACK}),S?.api?.note&&d.jsx(Fy,{note:S.api.note})]})};function tv(o){return o.toLowerCase().split(" ")[1]?.split("/").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")??o}function av(o){return o.filter(r=>r.type==="GROUP").map(r=>({label:r.label.toUpperCase(),items:(r.items??[]).filter(p=>p.type==="ITEM"&&p.api).map(p=>({name:p.name,label:tv(p.label),method:p.api?.method,path:p.api?.path}))})).filter(r=>r.items.length>0)}const ev=o=>{const{config:r}=o,p=av(r.sections);return d.jsxs("div",{children:[d.jsx("h5",{children:"Short Hand"}),d.jsx("div",{className:"mb-8"}),p.map(m=>d.jsxs("div",{className:"mb-6",children:[d.jsx("h6",{children:m.label}),d.jsx("div",{className:"mb-4"}),m.items.map(S=>d.jsx(Gh,{method:(S.method||"get").toLocaleUpperCase(),text:S.path||"/",config:r}))]},m.label))]})};function Uh(){const{key:o}=ry(),[r,p]=dt.useState(!1),[m,S]=dt.useState(null),[x,N]=dt.useState(!0);return dt.useEffect(()=>{(async()=>{const Y=await fetch("./config.json");if(!Y.ok)throw new Error("Failed to load configuration");const ll=await Y.json();S(ll.config),N(!1)})()},[]),o?x?d.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center",children:[d.jsx(zy,{className:"size-20 animate-spin mb-6"}),d.jsx("h2",{className:"text-center text-2xl font-semibold loading",children:"Loading..."})]}):d.jsxs("div",{children:[d.jsx(Gy,{sections:m?.sections,isSidebarOpen:r,setIsSidebarOpen:p}),d.jsx(_y,{isSidebarOpen:r,setIsSidebarOpen:p,children:d.jsx("div",{className:"main__content pt-3",children:o==="overview"?d.jsx(ky,{config:m}):o==="short-hand"?d.jsx(ev,{config:m}):d.jsx(lv,{routeKey:o,config:m})})})]}):d.jsx(py,{to:"overview",replace:!0})}const uv=Ty([{path:"/",element:d.jsx(Uh,{})},{path:"/:key",element:d.jsx(Uh,{})}],{basename:"/api-docs"});Dy.createRoot(document.getElementById("root")).render(d.jsx(dt.StrictMode,{children:d.jsx(Ay,{router:uv})}));
|
|
@@ -2,7 +2,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-CU67Zn6
|
|
|
2
2
|
function $a(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},z={};var Jn;function Ba(){if(Jn)return z;Jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),h=Symbol.iterator;function f(_){return _===null||typeof _!="object"?null:(_=h&&_[h]||_["@@iterator"],typeof _=="function"?_:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function w(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}w.prototype.isReactComponent={},w.prototype.setState=function(_,T){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,T,"setState")},w.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function P(){}P.prototype=w.prototype;function L(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}var D=L.prototype=new P;D.constructor=L,S(D,w.prototype),D.isPureReactComponent=!0;var k=Array.isArray;function H(){}var $={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function Z(_,T,N){var M=N.ref;return{$$typeof:e,type:_,key:T,ref:M!==void 0?M:null,props:N}}function re(_,T){return Z(_.type,T,_.props)}function se(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function X(_){var T={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(N){return T[N]})}var me=/\/+/g;function K(_,T){return typeof _=="object"&&_!==null&&_.key!=null?X(""+_.key):T.toString(36)}function G(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(T){_.status==="pending"&&(_.status="fulfilled",_.value=T)},function(T){_.status==="pending"&&(_.status="rejected",_.reason=T)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function ne(_,T,N,M,q){var Y=typeof _;(Y==="undefined"||Y==="boolean")&&(_=null);var ee=!1;if(_===null)ee=!0;else switch(Y){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(_.$$typeof){case e:case t:ee=!0;break;case c:return ee=_._init,ne(ee(_._payload),T,N,M,q)}}if(ee)return q=q(_),ee=M===""?"."+K(_,0):M,k(q)?(N="",ee!=null&&(N=ee.replace(me,"$&/")+"/"),ne(q,T,N,"",function(kr){return kr})):q!=null&&(se(q)&&(q=re(q,N+(q.key==null||_&&_.key===q.key?"":(""+q.key).replace(me,"$&/")+"/")+ee)),T.push(q)),1;ee=0;var Ae=M===""?".":M+":";if(k(_))for(var he=0;he<_.length;he++)M=_[he],Y=Ae+K(M,he),ee+=ne(M,T,N,Y,q);else if(he=f(_),typeof he=="function")for(_=he.call(_),he=0;!(M=_.next()).done;)M=M.value,Y=Ae+K(M,he++),ee+=ne(M,T,N,Y,q);else if(Y==="object"){if(typeof _.then=="function")return ne(G(_),T,N,M,q);throw T=String(_),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ee}function fe(_,T,N){if(_==null)return _;var M=[],q=0;return ne(_,M,"","",function(Y){return T.call(N,Y,q++)}),M}function Re(_){if(_._status===-1){var T=_._result;T=T(),T.then(function(N){(_._status===0||_._status===-1)&&(_._status=1,_._result=N)},function(N){(_._status===0||_._status===-1)&&(_._status=2,_._result=N)}),_._status===-1&&(_._status=0,_._result=T)}if(_._status===1)return _._result.default;throw _._result}var Q=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Ce={map:fe,forEach:function(_,T,N){fe(_,function(){T.apply(this,arguments)},N)},count:function(_){var T=0;return fe(_,function(){T++}),T},toArray:function(_){return fe(_,function(T){return T})||[]},only:function(_){if(!se(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return z.Activity=d,z.Children=Ce,z.Component=w,z.Fragment=r,z.Profiler=o,z.PureComponent=L,z.StrictMode=n,z.Suspense=l,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,z.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},z.cache=function(_){return function(){return _.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(_,T,N){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var M=S({},_.props),q=_.key;if(T!=null)for(Y in T.key!==void 0&&(q=""+T.key),T)!v.call(T,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&T.ref===void 0||(M[Y]=T[Y]);var Y=arguments.length-2;if(Y===1)M.children=N;else if(1<Y){for(var ee=Array(Y),Ae=0;Ae<Y;Ae++)ee[Ae]=arguments[Ae+2];M.children=ee}return Z(_.type,q,M)},z.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:i,_context:_},_},z.createElement=function(_,T,N){var M,q={},Y=null;if(T!=null)for(M in T.key!==void 0&&(Y=""+T.key),T)v.call(T,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(q[M]=T[M]);var ee=arguments.length-2;if(ee===1)q.children=N;else if(1<ee){for(var Ae=Array(ee),he=0;he<ee;he++)Ae[he]=arguments[he+2];q.children=Ae}if(_&&_.defaultProps)for(M in ee=_.defaultProps,ee)q[M]===void 0&&(q[M]=ee[M]);return Z(_,Y,q)},z.createRef=function(){return{current:null}},z.forwardRef=function(_){return{$$typeof:s,render:_}},z.isValidElement=se,z.lazy=function(_){return{$$typeof:c,_payload:{_status:-1,_result:_},_init:Re}},z.memo=function(_,T){return{$$typeof:u,type:_,compare:T===void 0?null:T}},z.startTransition=function(_){var T=$.T,N={};$.T=N;try{var M=_(),q=$.S;q!==null&&q(N,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(H,Q)}catch(Y){Q(Y)}finally{T!==null&&N.types!==null&&(T.types=N.types),$.T=T}},z.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},z.use=function(_){return $.H.use(_)},z.useActionState=function(_,T,N){return $.H.useActionState(_,T,N)},z.useCallback=function(_,T){return $.H.useCallback(_,T)},z.useContext=function(_){return $.H.useContext(_)},z.useDebugValue=function(){},z.useDeferredValue=function(_,T){return $.H.useDeferredValue(_,T)},z.useEffect=function(_,T){return $.H.useEffect(_,T)},z.useEffectEvent=function(_){return $.H.useEffectEvent(_)},z.useId=function(){return $.H.useId()},z.useImperativeHandle=function(_,T,N){return $.H.useImperativeHandle(_,T,N)},z.useInsertionEffect=function(_,T){return $.H.useInsertionEffect(_,T)},z.useLayoutEffect=function(_,T){return $.H.useLayoutEffect(_,T)},z.useMemo=function(_,T){return $.H.useMemo(_,T)},z.useOptimistic=function(_,T){return $.H.useOptimistic(_,T)},z.useReducer=function(_,T,N){return $.H.useReducer(_,T,N)},z.useRef=function(_){return $.H.useRef(_)},z.useState=function(_){return $.H.useState(_)},z.useSyncExternalStore=function(_,T,N){return $.H.useSyncExternalStore(_,T,N)},z.useTransition=function(){return $.H.useTransition()},z.version="19.2.4",z}var Xn;function ei(){return Xn||(Xn=1,$r.exports=Ba()),$r.exports}var E=ei();const Ua=ja(E),Fa=$a({__proto__:null,default:Ua},[E]);var jr={exports:{}},Se={};var Qn;function Ha(){if(Qn)return Se;Qn=1;var e=ei();function t(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(l,u,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:d==null?null:""+d,children:l,containerInfo:u,implementation:c}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Se.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Se.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return i(l,u,null,c)},Se.flushSync=function(l){var u=a.T,c=n.p;try{if(a.T=null,n.p=2,l)return l()}finally{a.T=u,n.p=c,n.d.f()}},Se.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(l,u))},Se.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},Se.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin),h=typeof u.integrity=="string"?u.integrity:void 0,f=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?n.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:d,integrity:h,fetchPriority:f}):c==="script"&&n.d.X(l,{crossOrigin:d,integrity:h,fetchPriority:f,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Se.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=s(u.as,u.crossOrigin);n.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(l)},Se.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,d=s(c,u.crossOrigin);n.d.L(l,c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Se.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=s(u.as,u.crossOrigin);n.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(l)},Se.requestFormReset=function(l){n.d.r(l)},Se.unstable_batchedUpdates=function(l,u){return l(u)},Se.useFormState=function(l,u,c){return a.H.useFormState(l,u,c)},Se.useFormStatus=function(){return a.H.useHostTransitionStatus()},Se.version="19.2.4",Se}var Zn;function za(){if(Zn)return jr.exports;Zn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jr.exports=Ha(),jr.exports}const ti=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const Ga=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Wa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const eo=e=>{const t=Wa(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ka=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Ya=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...qa,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ti("lucide",o),...!i&&!Ka(s)&&{"aria-hidden":"true"},...s},[...a.map(([u,c])=>E.createElement(u,c)),...Array.isArray(i)?i:[i]]));const Rt=(e,t)=>{const r=E.forwardRef(({className:n,...o},i)=>E.createElement(Ya,{ref:i,iconNode:t,className:ti(`lucide-${Ga(eo(e))}`,`lucide-${e}`,n),...o}));return r.displayName=eo(e),r};const Ja=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vm=Rt("check",Ja);const Xa=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$m=Rt("chevron-right",Xa);const Qa=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],jm=Rt("copy",Qa);const Za=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Bm=Rt("panel-left-close",Za);const el=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 14v1",key:"askpd8"}],["path",{d:"M9 19v2",key:"16tejx"}],["path",{d:"M9 3v2",key:"1noubl"}],["path",{d:"M9 9v1",key:"19ebxg"}]],Um=Rt("panel-left-dashed",el);const tl=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Fm=Rt("refresh-cw",tl);var ri=e=>{throw TypeError(e)},rl=(e,t,r)=>t.has(e)||ri("Cannot "+r),Br=(e,t,r)=>(rl(e,t,"read from private field"),r?r.call(e):t.get(e)),nl=(e,t,r)=>t.has(e)?ri("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),to="popstate";function ro(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ol(e={}){function t(n,o){let i=o.state?.masked,{pathname:a,search:s,hash:l}=i||n.location;return Vt("",{pathname:a,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,o){return typeof o=="string"?o:ze(o)}return al(t,r,null,e)}function J(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function il(){return Math.random().toString(36).substring(2,10)}function no(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Vt(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ye(t):t,state:r,key:t&&t.key||n||il(),unstable_mask:o}}function ze({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 Ye(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function al(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s="POP",l=null,u=c();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function c(){return(a.state||{idx:null}).idx}function d(){s="POP";let b=c(),w=b==null?null:b-u;u=b,l&&l({action:s,location:S.location,delta:w})}function h(b,w){s="PUSH";let P=ro(b)?b:Vt(S.location,b,w);u=c()+1;let L=no(P,u),D=S.createHref(P.unstable_mask||P);try{a.pushState(L,"",D)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(D)}i&&l&&l({action:s,location:S.location,delta:1})}function f(b,w){s="REPLACE";let P=ro(b)?b:Vt(S.location,b,w);u=c();let L=no(P,u),D=S.createHref(P.unstable_mask||P);a.replaceState(L,"",D),i&&l&&l({action:s,location:S.location,delta:0})}function g(b){return ni(b)}let S={get action(){return s},get location(){return e(o,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(to,d),l=b,()=>{o.removeEventListener(to,d),l=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:f,go(b){return a.go(b)}};return S}function ni(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),J(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:ze(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var It,oo=class{constructor(e){if(nl(this,It,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Br(this,It).has(e))return Br(this,It).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Br(this,It).set(e,t)}};It=new WeakMap;var ll=new Set(["lazy","caseSensitive","path","id","index","children"]);function sl(e){return ll.has(e)}var ul=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function cl(e){return ul.has(e)}function dl(e){return e.index===!0}function $t(e,t,r=[],n={},o=!1){return e.map((i,a)=>{let s=[...r,String(a)],l=typeof i.id=="string"?i.id:s.join("-");if(J(i.index!==!0||!i.children,"Cannot specify children on an index route"),J(o||!n[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),dl(i)){let u={...i,id:l};return n[l]=io(u,t(u)),u}else{let u={...i,id:l,children:void 0};return n[l]=io(u,t(u)),i.children&&(u.children=$t(i.children,t,s,n,o)),u}})}function io(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Qe(e,t,r="/"){return kt(e,t,r,!1)}function kt(e,t,r,n){let o=typeof t=="string"?Ye(t):t,i=$e(o.pathname||"/",r);if(i==null)return null;let a=oi(e);fl(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let u=Sl(i);s=bl(a[l],u,n)}return s}function ml(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function oi(e,t=[],r=[],n="",o=!1){let i=(a,s,l=o,u)=>{let c={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&l)return;J(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let d=je([n,c.relativePath]),h=r.concat(c);a.children&&a.children.length>0&&(J(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),oi(a.children,t,h,d,l)),!(a.path==null&&!a.index)&&t.push({path:d,score:El(d,a.index),routesMeta:h})};return e.forEach((a,s)=>{if(a.path===""||!a.path?.includes("?"))i(a,s);else for(let l of ii(a.path))i(a,s,!0,l)}),t}function ii(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=ii(n.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function fl(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rl(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var hl=/^:[\w-]+$/,pl=3,gl=2,_l=1,yl=10,vl=-2,ao=e=>e==="*";function El(e,t){let r=e.split("/"),n=r.length;return r.some(ao)&&(n+=vl),t&&(n+=gl),r.filter(o=>!ao(o)).reduce((o,i)=>o+(hl.test(i)?pl:i===""?_l:yl),n)}function Rl(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function bl(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=pr({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=pr({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:je([i,d.pathname]),pathnameBase:Tl(je([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=je([i,d.pathnameBase]))}return a}function pr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=wl(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:d},h)=>{if(c==="*"){let g=s[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const f=s[h];return d&&!f?u[c]=void 0:u[c]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function wl(e,t=!1,r=!0){de(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 n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l,u,c)=>{if(n.push({paramName:s,isOptional:l!=null}),l){let d=c.charAt(u+a.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Sl(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!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 $e(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ll({basename:e,pathname:t}){return t==="/"?e:je([e,t])}var ai=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>ai.test(e);function Pl(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ye(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=lo(r.substring(1),"/"):i=lo(r,t)):i=t,{pathname:i,search:Cl(n),hash:Al(o)}}function lo(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Ur(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. 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 li(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Pr(e){let t=li(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function zt(e,t,r,n=!1){let o;typeof e=="string"?o=Ye(e):(o={...e},J(!o.pathname||!o.pathname.includes("?"),Ur("?","pathname","search",o)),J(!o.pathname||!o.pathname.includes("#"),Ur("#","pathname","hash",o)),J(!o.search||!o.search.includes("#"),Ur("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=r;else{let d=t.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;o.pathname=h.join("/")}s=d>=0?t[d]:"/"}let l=Pl(o,s),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var je=e=>e.join("/").replace(/\/\/+/g,"/"),Tl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cl=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Al=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Wt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var si=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ui(e,t){let r=e;if(typeof r!="string"||!ai.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(si)try{let i=new URL(window.location.href),a=r.startsWith("//")?new URL(i.protocol+r):new URL(r),s=$e(a.pathname,t);a.origin===i.origin&&s!=null?r=s+a.search+a.hash:o=!0}catch{de(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}var et=Symbol("Uninstrumented");function Ol(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(i){let a=Object.keys(r);for(let s of a)i[s]&&r[s].push(i[s])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let o=pt(r.lazy,t.lazy,()=>{});o&&(n.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(i=>{let a=o[i],s=r[`lazy.${i}`];if(typeof a=="function"&&s.length>0){let l=pt(s,a,()=>{});l&&(n.lazy=Object.assign(n.lazy||{},{[i]:l}))}})}return["loader","action"].forEach(o=>{let i=t[o];if(typeof i=="function"&&r[o].length>0){let a=i[et]??i,s=pt(r[o],a,(...l)=>so(l[0]));s&&(o==="loader"&&a.hydrate===!0&&(s.hydrate=!0),s[et]=a,n[o]=s)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(o=>{let i=o[et]??o,a=pt(r.middleware,i,(...s)=>so(s[0]));return a?(a[et]=i,a):o})),n}function Dl(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(o){let i=Object.keys(o);for(let a of i)o[a]&&r[a].push(o[a])}})),r.navigate.length>0){let n=e.navigate[et]??e.navigate,o=pt(r.navigate,n,(...i)=>{let[a,s]=i;return{to:typeof a=="number"||typeof a=="string"?a:a?ze(a):".",...uo(e,s??{})}});o&&(o[et]=n,e.navigate=o)}if(r.fetch.length>0){let n=e.fetch[et]??e.fetch,o=pt(r.fetch,n,(...i)=>{let[a,,s,l]=i;return{href:s??".",fetcherKey:a,...uo(e,l??{})}});o&&(o[et]=n,e.fetch=o)}return e}function pt(e,t,r){return e.length===0?null:async(...n)=>{let o=await ci(e,r(...n),()=>t(...n),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function ci(e,t,r,n){let o=e[n],i;if(o){let a,s=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ci(e,t,r,n-1),i=await a,J(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await o(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}a||await s(),await a}else try{i={type:"success",value:await r()}}catch(a){i={type:"error",value:a}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function so(e){let{request:t,context:r,params:n,unstable_pattern:o}=e;return{request:Il(t),params:{...n},unstable_pattern:o,context:kl(r)}}function uo(e,t){return{currentUrl:ze(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 Il(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function kl(e){if(Nl(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var xl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===xl}var di=["POST","PUT","PATCH","DELETE"],Ml=new Set(di),Vl=["GET",...di],$l=new Set(Vl),mi=new Set([301,302,303,307,308]),jl=new Set([307,308]),Fr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bl={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ct={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ul=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),fi="remix-router-transitions",hi=Symbol("ResetLoaderData");function Fl(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";J(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Ul,i=o;if(e.unstable_instrumentations){let p=e.unstable_instrumentations;i=y=>({...o(y),...Ol(p.map(R=>R.route).filter(Boolean),y)})}let a={},s=$t(e.routes,i,void 0,a),l,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c=e.dataStrategy||ql,d={...e.future},h=null,f=new Set,g=null,S=null,b=null,w=e.hydrationData!=null,P=Qe(s,e.history.location,u),L=!1,D=null,k,H;if(P==null&&!e.patchRoutesOnNavigation){let p=Ve(404,{pathname:e.history.location.pathname}),{matches:y,route:R}=nr(s);k=!0,H=!k,P=y,D={[R.id]:p}}else if(P&&!e.hydrationData&&Qt(P,s,e.history.location.pathname).active&&(P=null),P)if(P.some(p=>p.route.lazy))k=!1,H=!k;else if(!P.some(p=>_n(p.route)))k=!0,H=!k;else{let p=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,R=P;if(y){let C=P.findIndex(O=>y[O.route.id]!==void 0);R=R.slice(0,C+1)}H=!1,k=R.every(C=>{let O=pi(C.route,p,y);return H=H||O.renderFallback,!O.shouldLoad})}else{k=!1,H=!k,P=[];let p=Qt(null,s,e.history.location.pathname);p.active&&p.matches&&(L=!0,P=p.matches)}let $,v={historyAction:e.history.action,location:e.history.location,matches:P,initialized:k,renderFallback:H,navigation:Fr,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||D,fetchers:new Map,blockers:new Map},Z="POP",re=null,se=!1,X,me=!1,K=new Map,G=null,ne=!1,fe=!1,Re=new Set,Q=new Map,Ce=0,_=-1,T=new Map,N=new Set,M=new Map,q=new Map,Y=new Set,ee=new Map,Ae,he=null;function kr(){if(h=e.history.listen(({action:p,location:y,delta:R})=>{if(Ae){Ae(),Ae=void 0;return}de(ee.size===0||R!=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 C=Gn({currentLocation:v.location,nextLocation:y,historyAction:p});if(C&&R!=null){let O=new Promise(V=>{Ae=V});e.history.go(R*-1),Xt(C,{state:"blocked",location:y,proceed(){Xt(C,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),O.then(()=>e.history.go(R))},reset(){let V=new Map(v.blockers);V.set(C,Ct),be({blockers:V})}}),re?.resolve(),re=null;return}return rt(p,y)}),r){ds(t,K);let p=()=>ms(t,K);t.addEventListener("pagehide",p),G=()=>t.removeEventListener("pagehide",p)}return v.initialized||rt("POP",v.location,{initialHydration:!0}),$}function Ra(){h&&h(),G&&G(),f.clear(),X&&X.abort(),v.fetchers.forEach((p,y)=>Nr(y)),v.blockers.forEach((p,y)=>zn(y))}function ba(p){return f.add(p),()=>f.delete(p)}function be(p,y={}){p.matches&&(p.matches=p.matches.map(O=>{let V=a[O.route.id],I=O.route;return I.element!==V.element||I.errorElement!==V.errorElement||I.hydrateFallbackElement!==V.hydrateFallbackElement?{...O,route:V}:O})),v={...v,...p};let R=[],C=[];v.fetchers.forEach((O,V)=>{O.state==="idle"&&(Y.has(V)?R.push(V):C.push(V))}),Y.forEach(O=>{!v.fetchers.has(O)&&!Q.has(O)&&R.push(O)}),[...f].forEach(O=>O(v,{deletedFetchers:R,newErrors:p.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),R.forEach(O=>Nr(O)),C.forEach(O=>v.fetchers.delete(O))}function mt(p,y,{flushSync:R}={}){let C=v.actionData!=null&&v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&v.navigation.state==="loading"&&p.state?._isRedirect!==!0,O;y.actionData?Object.keys(y.actionData).length>0?O=y.actionData:O=null:C?O=v.actionData:O=null;let V=y.loaderData?Eo(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,I=v.blockers;I.size>0&&(I=new Map(I),I.forEach((F,j)=>I.set(j,Ct)));let B=ne?!1:qn(p,y.matches||v.matches),x=se===!0||v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&p.state?._isRedirect!==!0;l&&(s=l,l=void 0),ne||Z==="POP"||(Z==="PUSH"?e.history.push(p,p.state):Z==="REPLACE"&&e.history.replace(p,p.state));let U;if(Z==="POP"){let F=K.get(v.location.pathname);F&&F.has(p.pathname)?U={currentLocation:v.location,nextLocation:p}:K.has(p.pathname)&&(U={currentLocation:p,nextLocation:v.location})}else if(me){let F=K.get(v.location.pathname);F?F.add(p.pathname):(F=new Set([p.pathname]),K.set(v.location.pathname,F)),U={currentLocation:v.location,nextLocation:p}}be({...y,actionData:O,loaderData:V,historyAction:Z,location:p,initialized:!0,renderFallback:!1,navigation:Fr,revalidation:"idle",restoreScrollPosition:B,preventScrollReset:x,blockers:I},{viewTransitionOpts:U,flushSync:R===!0}),Z="POP",se=!1,me=!1,ne=!1,fe=!1,re?.resolve(),re=null,he?.resolve(),he=null}async function Vn(p,y){if(re?.resolve(),re=null,typeof p=="number"){re||(re=So());let ue=re.promise;return e.history.go(p),ue}let R=en(v.location,v.matches,u,p,y?.fromRouteId,y?.relative),{path:C,submission:O,error:V}=co(!1,R,y),I;y?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof y.unstable_mask=="string"?Ye(y.unstable_mask):{...v.location.unstable_mask,...y.unstable_mask}});let B=v.location,x=Vt(B,C,y&&y.state,void 0,I);x={...x,...e.history.encodeLocation(x)};let U=y&&y.replace!=null?y.replace:void 0,F="PUSH";U===!0?F="REPLACE":U===!1||O!=null&&Pe(O.formMethod)&&O.formAction===v.location.pathname+v.location.search&&(F="REPLACE");let j=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,ie=(y&&y.flushSync)===!0,oe=Gn({currentLocation:B,nextLocation:x,historyAction:F});if(oe){Xt(oe,{state:"blocked",location:x,proceed(){Xt(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),Vn(p,y)},reset(){let ue=new Map(v.blockers);ue.set(oe,Ct),be({blockers:ue})}});return}await rt(F,x,{submission:O,pendingError:V,preventScrollReset:j,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:ie,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function wa(){he||(he=So()),xr(),be({revalidation:"loading"});let p=he.promise;return v.navigation.state==="submitting"?p:v.navigation.state==="idle"?(rt(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),p):(rt(Z||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:me===!0}),p)}async function rt(p,y,R){X&&X.abort(),X=null,Z=p,ne=(R&&R.startUninterruptedRevalidation)===!0,xa(v.location,v.matches),se=(R&&R.preventScrollReset)===!0,me=(R&&R.enableViewTransition)===!0;let C=l||s,O=R&&R.overrideNavigation,V=R?.initialHydration&&v.matches&&v.matches.length>0&&!L?v.matches:Qe(C,y,u),I=(R&&R.flushSync)===!0;if(V&&v.initialized&&!fe&&ts(v.location,y)&&!(R&&R.submission&&Pe(R.submission.formMethod))){mt(y,{matches:V},{flushSync:I});return}let B=Qt(V,C,y.pathname);if(B.active&&B.matches&&(V=B.matches),!V){let{error:ve,notFoundMatches:Oe,route:ae}=Mr(y.pathname);mt(y,{matches:Oe,loaderData:{},errors:{[ae.id]:ve}},{flushSync:I});return}X=new AbortController;let x=ht(e.history,y,X.signal,R&&R.submission),U=e.getContext?await e.getContext():new oo,F;if(R&&R.pendingError)F=[Ze(V).route.id,{type:"error",error:R.pendingError}];else if(R&&R.submission&&Pe(R.submission.formMethod)){let ve=await Sa(x,y,R.submission,V,U,B.active,R&&R.initialHydration===!0,{replace:R.replace,flushSync:I});if(ve.shortCircuited)return;if(ve.pendingActionResult){let[Oe,ae]=ve.pendingActionResult;if(ke(ae)&&jt(ae.error)&&ae.error.status===404){X=null,mt(y,{matches:ve.matches,loaderData:{},errors:{[Oe]:ae.error}});return}}V=ve.matches||V,F=ve.pendingActionResult,O=Hr(y,R.submission),I=!1,B.active=!1,x=ht(e.history,x.url,x.signal)}let{shortCircuited:j,matches:ie,loaderData:oe,errors:ue}=await La(x,y,V,U,B.active,O,R&&R.submission,R&&R.fetcherSubmission,R&&R.replace,R&&R.initialHydration===!0,I,F,R&&R.callSiteDefaultShouldRevalidate);j||(X=null,mt(y,{matches:ie||V,...Ro(F),loaderData:oe,errors:ue}))}async function Sa(p,y,R,C,O,V,I,B={}){xr();let x=us(y,R);if(be({navigation:x},{flushSync:B.flushSync===!0}),V){let j=await Zt(C,y.pathname,p.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:oe,route:ue}=nr(s);return{matches:oe,pendingActionResult:[ue.id,{type:"error",error:j.error}]}}let ie=Ze(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[ie,{type:"error",error:j.error}]}}else if(j.matches)C=j.matches;else{let{notFoundMatches:ie,error:oe,route:ue}=Mr(y.pathname);return{matches:ie,pendingActionResult:[ue.id,{type:"error",error:oe}]}}}let U,F=cr(C,y);if(!F.route.action&&!F.route.lazy)U={type:"error",error:Ve(405,{method:p.method,pathname:y.pathname,routeId:F.route.id})};else{let j=_t(i,a,p,C,F,I?[]:n,O),ie=await Lt(p,j,O,null);if(U=ie[F.route.id],!U){for(let oe of C)if(ie[oe.route.id]){U=ie[oe.route.id];break}}if(p.signal.aborted)return{shortCircuited:!0}}if(st(U)){let j;return B&&B.replace!=null?j=B.replace:j=_o(U.response.headers.get("Location"),new URL(p.url),u,e.history)===v.location.pathname+v.location.search,await nt(p,U,!0,{submission:R,replace:j}),{shortCircuited:!0}}if(ke(U)){let j=Ze(C,F.route.id);return(B&&B.replace)!==!0&&(Z="PUSH"),{matches:C,pendingActionResult:[j.route.id,U,F.route.id]}}return{matches:C,pendingActionResult:[F.route.id,U]}}async function La(p,y,R,C,O,V,I,B,x,U,F,j,ie){let oe=V||Hr(y,I),ue=I||B||wo(oe),ve=!ne&&!U;if(O){if(ve){let we=$n(j);be({navigation:oe,...we!==void 0?{actionData:we}:{}},{flushSync:F})}let te=await Zt(R,y.pathname,p.signal);if(te.type==="aborted")return{shortCircuited:!0};if(te.type==="error"){if(te.partialMatches.length===0){let{matches:ft,route:at}=nr(s);return{matches:ft,loaderData:{},errors:{[at.id]:te.error}}}let we=Ze(te.partialMatches).route.id;return{matches:te.partialMatches,loaderData:{},errors:{[we]:te.error}}}else if(te.matches)R=te.matches;else{let{error:we,notFoundMatches:ft,route:at}=Mr(y.pathname);return{matches:ft,loaderData:{},errors:{[at.id]:we}}}}let Oe=l||s,{dsMatches:ae,revalidatingFetchers:Ne}=mo(p,C,i,a,e.history,v,R,ue,y,U?[]:n,U===!0,fe,Re,Y,M,N,Oe,u,e.patchRoutesOnNavigation!=null,j,ie);if(_=++Ce,!e.dataStrategy&&!ae.some(te=>te.shouldLoad)&&!ae.some(te=>te.route.middleware&&te.route.middleware.length>0)&&Ne.length===0){let te=Fn();return mt(y,{matches:R,loaderData:{},errors:j&&ke(j[1])?{[j[0]]:j[1].error}:null,...Ro(j),...te?{fetchers:new Map(v.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(ve){let te={};if(!O){te.navigation=oe;let we=$n(j);we!==void 0&&(te.actionData=we)}Ne.length>0&&(te.fetchers=Pa(Ne)),be(te,{flushSync:F})}Ne.forEach(te=>{qe(te.key),te.controller&&Q.set(te.key,te.controller)});let ot=()=>Ne.forEach(te=>qe(te.key));X&&X.signal.addEventListener("abort",ot);let{loaderResults:Pt,fetcherResults:Xe}=await jn(ae,Ne,p,C);if(p.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ot),Ne.forEach(te=>Q.delete(te.key));let Ue=or(Pt);if(Ue)return await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};if(Ue=or(Xe),Ue)return N.add(Ue.key),await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};let{loaderData:Vr,errors:Tt}=vo(v,R,Pt,j,Ne,Xe);U&&v.errors&&(Tt={...v.errors,...Tt});let it=Fn(),er=Hn(_),tr=it||er||Ne.length>0;return{matches:R,loaderData:Vr,errors:Tt,...tr?{fetchers:new Map(v.fetchers)}:{}}}function $n(p){if(p&&!ke(p[1]))return{[p[0]]:p[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Pa(p){return p.forEach(y=>{let R=v.fetchers.get(y.key),C=At(void 0,R?R.data:void 0);v.fetchers.set(y.key,C)}),new Map(v.fetchers)}async function Ta(p,y,R,C){qe(p);let O=(C&&C.flushSync)===!0,V=l||s,I=en(v.location,v.matches,u,R,y,C?.relative),B=Qe(V,I,u),x=Qt(B,V,I);if(x.active&&x.matches&&(B=x.matches),!B){We(p,y,Ve(404,{pathname:I}),{flushSync:O});return}let{path:U,submission:F,error:j}=co(!0,I,C);if(j){We(p,y,j,{flushSync:O});return}let ie=e.getContext?await e.getContext():new oo,oe=(C&&C.preventScrollReset)===!0;if(F&&Pe(F.formMethod)){await Ca(p,y,U,B,ie,x.active,O,oe,F,C&&C.unstable_defaultShouldRevalidate);return}M.set(p,{routeId:y,path:U}),await Aa(p,y,U,B,ie,x.active,O,oe,F)}async function Ca(p,y,R,C,O,V,I,B,x,U){xr(),M.delete(p);let F=v.fetchers.get(p);Ge(p,cs(x,F),{flushSync:I});let j=new AbortController,ie=ht(e.history,R,j.signal,x);if(V){let ce=await Zt(C,new URL(ie.url).pathname,ie.signal,p);if(ce.type==="aborted")return;if(ce.type==="error"){We(p,y,ce.error,{flushSync:I});return}else if(ce.matches)C=ce.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let oe=cr(C,R);if(!oe.route.action&&!oe.route.lazy){let ce=Ve(405,{method:x.formMethod,pathname:R,routeId:y});We(p,y,ce,{flushSync:I});return}Q.set(p,j);let ue=Ce,ve=_t(i,a,ie,C,oe,n,O),Oe=await Lt(ie,ve,O,p),ae=Oe[oe.route.id];if(!ae){for(let ce of ve)if(Oe[ce.route.id]){ae=Oe[ce.route.id];break}}if(ie.signal.aborted){Q.get(p)===j&&Q.delete(p);return}if(Y.has(p)){if(st(ae)||ke(ae)){Ge(p,Ke(void 0));return}}else{if(st(ae))if(Q.delete(p),_>ue){Ge(p,Ke(void 0));return}else return N.add(p),Ge(p,At(x)),nt(ie,ae,!1,{fetcherSubmission:x,preventScrollReset:B});if(ke(ae)){We(p,y,ae.error);return}}let Ne=v.navigation.location||v.location,ot=ht(e.history,Ne,j.signal),Pt=l||s,Xe=v.navigation.state!=="idle"?Qe(Pt,v.navigation.location,u):v.matches;J(Xe,"Didn't find any matches after fetcher action");let Ue=++Ce;T.set(p,Ue);let Vr=At(x,ae.data);v.fetchers.set(p,Vr);let{dsMatches:Tt,revalidatingFetchers:it}=mo(ot,O,i,a,e.history,v,Xe,x,Ne,n,!1,fe,Re,Y,M,N,Pt,u,e.patchRoutesOnNavigation!=null,[oe.route.id,ae],U);it.filter(ce=>ce.key!==p).forEach(ce=>{let rr=ce.key,Yn=v.fetchers.get(rr),Va=At(void 0,Yn?Yn.data:void 0);v.fetchers.set(rr,Va),qe(rr),ce.controller&&Q.set(rr,ce.controller)}),be({fetchers:new Map(v.fetchers)});let er=()=>it.forEach(ce=>qe(ce.key));j.signal.addEventListener("abort",er);let{loaderResults:tr,fetcherResults:te}=await jn(Tt,it,ot,O);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",er),T.delete(p),Q.delete(p),it.forEach(ce=>Q.delete(ce.key)),v.fetchers.has(p)){let ce=Ke(ae.data);v.fetchers.set(p,ce)}let we=or(tr);if(we)return nt(ot,we.result,!1,{preventScrollReset:B});if(we=or(te),we)return N.add(we.key),nt(ot,we.result,!1,{preventScrollReset:B});let{loaderData:ft,errors:at}=vo(v,Xe,tr,void 0,it,te);Hn(Ue),v.navigation.state==="loading"&&Ue>_?(J(Z,"Expected pending action"),X&&X.abort(),mt(v.navigation.location,{matches:Xe,loaderData:ft,errors:at,fetchers:new Map(v.fetchers)})):(be({errors:at,loaderData:Eo(v.loaderData,ft,Xe,at),fetchers:new Map(v.fetchers)}),fe=!1)}async function Aa(p,y,R,C,O,V,I,B,x){let U=v.fetchers.get(p);Ge(p,At(x,U?U.data:void 0),{flushSync:I});let F=new AbortController,j=ht(e.history,R,F.signal);if(V){let ae=await Zt(C,new URL(j.url).pathname,j.signal,p);if(ae.type==="aborted")return;if(ae.type==="error"){We(p,y,ae.error,{flushSync:I});return}else if(ae.matches)C=ae.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let ie=cr(C,R);Q.set(p,F);let oe=Ce,ue=_t(i,a,j,C,ie,n,O),Oe=(await Lt(j,ue,O,p))[ie.route.id];if(Q.get(p)===F&&Q.delete(p),!j.signal.aborted){if(Y.has(p)){Ge(p,Ke(void 0));return}if(st(Oe))if(_>oe){Ge(p,Ke(void 0));return}else{N.add(p),await nt(j,Oe,!1,{preventScrollReset:B});return}if(ke(Oe)){We(p,y,Oe.error);return}Ge(p,Ke(Oe.data))}}async function nt(p,y,R,{submission:C,fetcherSubmission:O,preventScrollReset:V,replace:I}={}){R||(re?.resolve(),re=null),y.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let B=y.response.headers.get("Location");J(B,"Expected a Location header on the redirect Response"),B=_o(B,new URL(p.url),u,e.history);let x=Vt(v.location,B,{_isRedirect:!0});if(r){let ue=!1;if(y.response.headers.has("X-Remix-Reload-Document"))ue=!0;else if(gn(B)){const ve=ni(B,!0);ue=ve.origin!==t.location.origin||$e(ve.pathname,u)==null}if(ue){I?t.location.replace(B):t.location.assign(B);return}}X=null;let U=I===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:j,formEncType:ie}=v.navigation;!C&&!O&&F&&j&&ie&&(C=wo(v.navigation));let oe=C||O;if(jl.has(y.response.status)&&oe&&Pe(oe.formMethod))await rt(U,x,{submission:{...oe,formAction:B},preventScrollReset:V||se,enableViewTransition:R?me:void 0});else{let ue=Hr(x,C);await rt(U,x,{overrideNavigation:ue,fetcherSubmission:O,preventScrollReset:V||se,enableViewTransition:R?me:void 0})}}async function Lt(p,y,R,C){let O,V={};try{O=await Yl(c,p,y,C,R,!1)}catch(I){return y.filter(B=>B.shouldLoad).forEach(B=>{V[B.route.id]={type:"error",error:I}}),V}if(p.signal.aborted)return V;if(!Pe(p.method))for(let I of y){if(O[I.route.id]?.type==="error")break;!O.hasOwnProperty(I.route.id)&&!v.loaderData.hasOwnProperty(I.route.id)&&(!v.errors||!v.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(O[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,B]of Object.entries(O))if(is(B)){let x=B.result;V[I]={type:"redirect",response:Zl(x,p,I,y,u)}}else V[I]=await Ql(B);return V}async function jn(p,y,R,C){let O=Lt(R,p,C,null),V=Promise.all(y.map(async x=>{if(x.matches&&x.match&&x.request&&x.controller){let F=(await Lt(x.request,x.matches,C,x.key))[x.match.route.id];return{[x.key]:F}}else return Promise.resolve({[x.key]:{type:"error",error:Ve(404,{pathname:x.path})}})})),I=await O,B=(await V).reduce((x,U)=>Object.assign(x,U),{});return{loaderResults:I,fetcherResults:B}}function xr(){fe=!0,M.forEach((p,y)=>{Q.has(y)&&Re.add(y),qe(y)})}function Ge(p,y,R={}){v.fetchers.set(p,y),be({fetchers:new Map(v.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function We(p,y,R,C={}){let O=Ze(v.matches,y);Nr(p),be({errors:{[O.route.id]:R},fetchers:new Map(v.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Bn(p){return q.set(p,(q.get(p)||0)+1),Y.has(p)&&Y.delete(p),v.fetchers.get(p)||Bl}function Oa(p,y){qe(p,y?.reason),Ge(p,Ke(null))}function Nr(p){let y=v.fetchers.get(p);Q.has(p)&&!(y&&y.state==="loading"&&T.has(p))&&qe(p),M.delete(p),T.delete(p),N.delete(p),Y.delete(p),Re.delete(p),v.fetchers.delete(p)}function Da(p){let y=(q.get(p)||0)-1;y<=0?(q.delete(p),Y.add(p)):q.set(p,y),be({fetchers:new Map(v.fetchers)})}function qe(p,y){let R=Q.get(p);R&&(R.abort(y),Q.delete(p))}function Un(p){for(let y of p){let R=Bn(y),C=Ke(R.data);v.fetchers.set(y,C)}}function Fn(){let p=[],y=!1;for(let R of N){let C=v.fetchers.get(R);J(C,`Expected fetcher: ${R}`),C.state==="loading"&&(N.delete(R),p.push(R),y=!0)}return Un(p),y}function Hn(p){let y=[];for(let[R,C]of T)if(C<p){let O=v.fetchers.get(R);J(O,`Expected fetcher: ${R}`),O.state==="loading"&&(qe(R),T.delete(R),y.push(R))}return Un(y),y.length>0}function Ia(p,y){let R=v.blockers.get(p)||Ct;return ee.get(p)!==y&&ee.set(p,y),R}function zn(p){v.blockers.delete(p),ee.delete(p)}function Xt(p,y){let R=v.blockers.get(p)||Ct;J(R.state==="unblocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="proceeding"||R.state==="blocked"&&y.state==="unblocked"||R.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${R.state} -> ${y.state}`);let C=new Map(v.blockers);C.set(p,y),be({blockers:C})}function Gn({currentLocation:p,nextLocation:y,historyAction:R}){if(ee.size===0)return;ee.size>1&&de(!1,"A router only supports one blocker at a time");let C=Array.from(ee.entries()),[O,V]=C[C.length-1],I=v.blockers.get(O);if(!(I&&I.state==="proceeding")&&V({currentLocation:p,nextLocation:y,historyAction:R}))return O}function Mr(p){let y=Ve(404,{pathname:p}),R=l||s,{matches:C,route:O}=nr(R);return{notFoundMatches:C,route:O,error:y}}function ka(p,y,R){if(g=p,b=y,S=R||null,!w&&v.navigation===Fr){w=!0;let C=qn(v.location,v.matches);C!=null&&be({restoreScrollPosition:C})}return()=>{g=null,b=null,S=null}}function Wn(p,y){return S&&S(p,y.map(C=>ml(C,v.loaderData)))||p.key}function xa(p,y){if(g&&b){let R=Wn(p,y);g[R]=b()}}function qn(p,y){if(g){let R=Wn(p,y),C=g[R];if(typeof C=="number")return C}return null}function Qt(p,y,R){if(e.patchRoutesOnNavigation)if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:kt(y,R,u,!0)}}else return{active:!0,matches:kt(y,R,u,!0)||[]};return{active:!1,matches:null}}async function Zt(p,y,R,C){if(!e.patchRoutesOnNavigation)return{type:"success",matches:p};let O=p;for(;;){let V=l==null,I=l||s,B=a;try{await e.patchRoutesOnNavigation({signal:R,path:y,matches:O,fetcherKey:C,patch:(F,j)=>{R.aborted||fo(F,j,I,B,i,!1)}})}catch(F){return{type:"error",error:F,partialMatches:O}}finally{V&&!R.aborted&&(s=[...s])}if(R.aborted)return{type:"aborted"};let x=Qe(I,y,u),U=null;if(x){if(Object.keys(x[0].params).length===0)return{type:"success",matches:x};if(U=kt(I,y,u,!0),!(U&&O.length<U.length&&Kn(O,U.slice(0,O.length))))return{type:"success",matches:x}}if(U||(U=kt(I,y,u,!0)),!U||Kn(O,U))return{type:"success",matches:null};O=U}}function Kn(p,y){return p.length===y.length&&p.every((R,C)=>R.route.id===y[C].route.id)}function Na(p){a={},l=$t(p,i,void 0,a)}function Ma(p,y,R=!1){let C=l==null;fo(p,y,l||s,a,i,R),C&&(s=[...s],be({}))}return $={get basename(){return u},get future(){return d},get state(){return v},get routes(){return s},get window(){return t},initialize:kr,subscribe:ba,enableScrollRestoration:ka,navigate:Vn,fetch:Ta,revalidate:wa,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Bn,resetFetcher:Oa,deleteFetcher:Da,dispose:Ra,getBlocker:Ia,deleteBlocker:zn,patchRoutes:Ma,_internalFetchControllers:Q,_internalSetRoutes:Na,_internalSetStateDoNotUseOrYouWillBreakYourApp(p){be(p)}},e.unstable_instrumentations&&($=Dl($,e.unstable_instrumentations.map(p=>p.router).filter(Boolean))),$}function Hl(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function en(e,t,r,n,o,i){let a,s;if(o){a=[];for(let u of t)if(a.push(u),u.route.id===o){s=u;break}}else a=t,s=t[t.length-1];let l=zt(n||".",Pr(a),$e(e.pathname,r)||e.pathname,i==="path");if(n==null&&(l.search=e.search,l.hash=e.hash),(n==null||n===""||n===".")&&s){let u=vn(l.search);if(s.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&u){let c=new URLSearchParams(l.search),d=c.getAll("index");c.delete("index"),d.filter(f=>f).forEach(f=>c.append("index",f));let h=c.toString();l.search=h?`?${h}`:""}}return r!=="/"&&(l.pathname=Ll({basename:r,pathname:l.pathname})),ze(l)}function co(e,t,r){if(!r||!Hl(r))return{path:t};if(r.formMethod&&!ss(r.formMethod))return{path:t,error:Ve(405,{method:r.formMethod})};let n=()=>({path:t,error:Ve(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),a=Ri(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pe(i))return n();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,[f,g])=>`${h}${f}=${g}
|
|
3
3
|
`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Pe(i))return n();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return n()}}}J(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=rn(r.formData),l=r.formData;else if(r.body instanceof FormData)s=rn(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=yo(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=yo(s)}catch{return n()}let u={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Pe(u.formMethod))return{path:t,submission:u};let c=Ye(t);return e&&c.search&&vn(c.search)&&s.append("index",""),c.search=`?${s}`,{path:ze(c),submission:u}}function mo(e,t,r,n,o,i,a,s,l,u,c,d,h,f,g,S,b,w,P,L,D){let k=L?ke(L[1])?L[1].error:L[1].data:void 0,H=o.createURL(i.location),$=o.createURL(l),v;if(c&&i.errors){let G=Object.keys(i.errors)[0];v=a.findIndex(ne=>ne.route.id===G)}else if(L&&ke(L[1])){let G=L[0];v=a.findIndex(ne=>ne.route.id===G)-1}let Z=L?L[1].statusCode:void 0,re=Z&&Z>=400,se={currentUrl:H,currentParams:i.matches[0]?.params||{},nextUrl:$,nextParams:a[0].params,...s,actionResult:k,actionStatus:Z},X=Wt(a),me=a.map((G,ne)=>{let{route:fe}=G,Re=null;if(v!=null&&ne>v)Re=!1;else if(fe.lazy)Re=!0;else if(!_n(fe))Re=!1;else if(c){let{shouldLoad:T}=pi(fe,i.loaderData,i.errors);Re=T}else zl(i.loaderData,i.matches[ne],G)&&(Re=!0);if(Re!==null)return tn(r,n,e,X,G,u,t,Re);let Q=!1;typeof D=="boolean"?Q=D:re?Q=!1:(d||H.pathname+H.search===$.pathname+$.search||H.search!==$.search||Gl(i.matches[ne],G))&&(Q=!0);let Ce={...se,defaultShouldRevalidate:Q},_=Nt(G,Ce);return tn(r,n,e,X,G,u,t,_,Ce,D)}),K=[];return g.forEach((G,ne)=>{if(c||!a.some(M=>M.route.id===G.routeId)||f.has(ne))return;let fe=i.fetchers.get(ne),Re=fe&&fe.state!=="idle"&&fe.data===void 0,Q=Qe(b,G.path,w);if(!Q){if(P&&Re)return;K.push({key:ne,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(S.has(ne))return;let Ce=cr(Q,G.path),_=new AbortController,T=ht(o,G.path,_.signal),N=null;if(h.has(ne))h.delete(ne),N=_t(r,n,T,Q,Ce,u,t);else if(Re)d&&(N=_t(r,n,T,Q,Ce,u,t));else{let M;typeof D=="boolean"?M=D:re?M=!1:M=d;let q={...se,defaultShouldRevalidate:M};Nt(Ce,q)&&(N=_t(r,n,T,Q,Ce,u,t,q))}N&&K.push({key:ne,routeId:G.routeId,path:G.path,matches:N,match:Ce,request:T,controller:_})}),{dsMatches:me,revalidatingFetchers:K}}function _n(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function pi(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!_n(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,o=r!=null&&r[e.id]!==void 0;if(!n&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let i=!n&&!o;return{shouldLoad:i,renderFallback:i}}function zl(e,t,r){let n=!t||r.route.id!==t.route.id,o=!e.hasOwnProperty(r.route.id);return n||o}function Gl(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Nt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function fo(e,t,r,n,o,i){let a;if(e){let u=n[e];J(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),a=u.children}else a=r;let s=[],l=[];if(t.forEach(u=>{let c=a.find(d=>gi(u,d));c?l.push({existingRoute:c,newRoute:u}):s.push(u)}),s.length>0){let u=$t(s,o,[e||"_","patch",String(a?.length||"0")],n);a.push(...u)}if(i&&l.length>0)for(let u=0;u<l.length;u++){let{existingRoute:c,newRoute:d}=l[u],h=c,[f]=$t([d],o,[],{},!0);Object.assign(h,{element:f.element?f.element:h.element,errorElement:f.errorElement?f.errorElement:h.errorElement,hydrateFallbackElement:f.hydrateFallbackElement?f.hydrateFallbackElement:h.hydrateFallbackElement})}}function gi(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,n)=>t.children?.some(o=>gi(r,o)))??!1:!1}var ho=new WeakMap,_i=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let o=r[t.id];if(J(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let a=ho.get(o);a||(a={},ho.set(o,a));let s=a[e];if(s)return s;let l=(async()=>{let u=sl(e),d=o[e]!==void 0&&e!=="hasErrorBoundary";if(u)de(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(d)de(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let h=await i();h!=null&&(Object.assign(o,{[e]:h}),Object.assign(o,n(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(h=>h===void 0)&&(o.lazy=void 0))})();return a[e]=l,l},po=new WeakMap;function Wl(e,t,r,n,o){let i=r[e.id];if(J(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=po.get(i);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let d=(async()=>{J(typeof e.lazy=="function","No lazy route function found");let h=await e.lazy(),f={};for(let g in h){let S=h[g];if(S===void 0)continue;let b=cl(g),P=i[g]!==void 0&&g!=="hasErrorBoundary";b?de(!b,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?de(!P,`Route "${i.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):f[g]=S}Object.assign(i,f),Object.assign(i,{...n(i),lazy:void 0})})();return po.set(i,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let a=Object.keys(e.lazy),s=[],l;for(let c of a){if(o&&o.includes(c))continue;let d=_i({key:c,route:e,manifest:r,mapRouteProperties:n});d&&(s.push(d),c===t&&(l=d))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return u?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:l}}async function go(e){let t=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,i)=>{r[t[i].route.id]=o}),r}async function ql(e){return e.matches.some(t=>t.route.middleware)?yi(e,()=>go(e)):go(e)}function yi(e,t){return Kl(e,t,n=>{if(ls(n))throw n;return n},ns,r);function r(n,o,i){if(i)return Promise.resolve(Object.assign(i.value,{[o]:{type:"error",result:n}}));{let{matches:a}=e,s=Math.min(Math.max(a.findIndex(u=>u.route.id===o),0),Math.max(a.findIndex(u=>u.shouldCallHandler()),0)),l=Ze(a,a[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:n}})}}}async function Kl(e,t,r,n,o){let{matches:i,request:a,params:s,context:l,unstable_pattern:u}=e,c=i.flatMap(h=>h.route.middleware?h.route.middleware.map(f=>[h.route.id,f]):[]);return await vi({request:a,params:s,context:l,unstable_pattern:u},c,t,r,n,o)}async function vi(e,t,r,n,o,i,a=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let l=t[a];if(!l)return await r();let[u,c]=l,d,h=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await vi(e,t,r,n,o,i,a+1)},d.value}catch(f){return d={value:await i(f,u,d)},d.value}};try{let f=await c(e,h),g=f!=null?n(f):void 0;return o(g)?g:d?g??d.value:(d={value:await h()},d.value)}catch(f){return await i(f,u,d)}}function Ei(e,t,r,n,o){let i=_i({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),a=Wl(n.route,Pe(r.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function tn(e,t,r,n,o,i,a,s,l=null,u){let c=!1,d=Ei(e,t,r,o,i);return{...o,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:l,shouldCallHandler(h){return c=!0,l?typeof u=="boolean"?Nt(o,{...l,defaultShouldRevalidate:u}):typeof h=="boolean"?Nt(o,{...l,defaultShouldRevalidate:h}):Nt(o,l):s},resolve(h){let{lazy:f,loader:g,middleware:S}=o.route,b=c||s||h&&!Pe(r.method)&&(f||g),w=S&&S.length>0&&!g&&!f;return b&&(Pe(r.method)||!w)?Jl({request:r,unstable_pattern:n,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:h,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function _t(e,t,r,n,o,i,a,s=null){return n.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ei(e,t,r,l,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:tn(e,t,r,Wt(n),l,i,a,!0,s))}async function Yl(e,t,r,n,o,i){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let a={request:t,unstable_pattern:Wt(r),params:r[0].params,context:o,matches:r},l=await e({...a,fetcherKey:n,runClientMiddleware:u=>{let c=a;return yi(c,()=>u({...c,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return l}async function Jl({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let s,l,u=Pe(e.method),c=u?"action":"loader",d=h=>{let f,g=new Promise((w,P)=>f=P);l=()=>f(),e.signal.addEventListener("abort",l);let S=w=>typeof h!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${r.route.id}]`)):h({request:e,unstable_pattern:t,params:r.params,context:a},...w!==void 0?[w]:[]),b=(async()=>{try{return{type:"data",result:await(i?i(P=>S(P)):S())}}catch(w){return{type:"error",result:w}}})();return Promise.race([b,g])};try{let h=u?r.route.action:r.route.loader;if(n||o)if(h){let f,[g]=await Promise.all([d(h).catch(S=>{f=S}),n,o]);if(f!==void 0)throw f;s=g}else{await n;let f=u?r.route.action:r.route.loader;if(f)[s]=await Promise.all([d(f),o]);else if(c==="action"){let g=new URL(e.url),S=g.pathname+g.search;throw Ve(405,{method:e.method,pathname:S,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(h)s=await d(h);else{let f=new URL(e.url),g=f.pathname+f.search;throw Ve(404,{pathname:g})}}catch(h){return{type:"error",result:h}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function Xl(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 Ql(e){let{result:t,type:r}=e;if(yn(t)){let n;try{n=await Xl(t)}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new Gt(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?bo(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:rs(t),statusCode:jt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:jt(t)?t.status:void 0}:bo(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 Zl(e,t,r,n,o){let i=e.headers.get("Location");if(J(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!gn(i)){let a=n.slice(0,n.findIndex(s=>s.route.id===r)+1);i=en(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function _o(e,t,r,n){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gn(e)){let i=e,a=i.startsWith("//")?new URL(t.protocol+i):new URL(i);if(o.includes(a.protocol))throw new Error("Invalid redirect location");let s=$e(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}try{let i=n.createURL(e);if(o.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function ht(e,t,r,n){let o=e.createURL(Ri(t)).toString(),i={signal:r};if(n&&Pe(n.formMethod)){let{formMethod:a,formEncType:s}=n;i.method=a.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=rn(n.formData):i.body=n.formData}return new Request(o,i)}function rn(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function yo(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function es(e,t,r,n=!1,o=!1){let i={},a=null,s,l=!1,u={},c=r&&ke(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,f=t[h];if(J(!st(f),"Cannot handle redirect results in processLoaderData"),ke(f)){let g=f.error;if(c!==void 0&&(g=c,c=void 0),a=a||{},o)a[h]=g;else{let S=Ze(e,h);a[S.route.id]==null&&(a[S.route.id]=g)}n||(i[h]=hi),l||(l=!0,s=jt(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else i[h]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(s=f.statusCode),f.headers&&(u[h]=f.headers)}),c!==void 0&&r&&(a={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:a,statusCode:s||200,loaderHeaders:u}}function vo(e,t,r,n,o,i){let{loaderData:a,errors:s}=es(t,r,n);return o.filter(l=>!l.matches||l.matches.some(u=>u.shouldLoad)).forEach(l=>{let{key:u,match:c,controller:d}=l;if(d&&d.signal.aborted)return;let h=i[u];if(J(h,"Did not find corresponding fetcher result"),ke(h)){let f=Ze(e.matches,c?.route.id);s&&s[f.route.id]||(s={...s,[f.route.id]:h.error}),e.fetchers.delete(u)}else if(st(h))J(!1,"Unhandled fetcher revalidation redirect");else{let f=Ke(h.data);e.fetchers.set(u,f)}}),{loaderData:a,errors:s}}function Eo(e,t,r,n){let o=Object.entries(t).filter(([,i])=>i!==hi).reduce((i,[a,s])=>(i[a]=s,i),{});for(let i of r){let a=i.route.id;if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&i.route.loader&&(o[a]=e[a]),n&&n.hasOwnProperty(a))break}return o}function Ro(e){return e?ke(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ze(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function nr(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 Ve(e,{pathname:t,routeId:r,method:n,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(a="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(a="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(a="Not Found",s=`No route matches URL "${t}"`):e===405&&(a="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new Gt(e||500,a,new Error(s),!0)}function or(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,o]=t[r];if(st(o))return{key:n,result:o}}}function Ri(e){let t=typeof e=="string"?Ye(e):e;return ze({...t,hash:""})}function ts(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function rs(e){return new Gt(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ns(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&os(r))}function os(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function is(e){return yn(e.result)&&mi.has(e.result.status)}function ke(e){return e.type==="error"}function st(e){return(e&&e.type)==="redirect"}function bo(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function yn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function as(e){return mi.has(e)}function ls(e){return yn(e)&&as(e.status)&&e.headers.has("Location")}function ss(e){return $l.has(e.toUpperCase())}function Pe(e){return Ml.has(e.toUpperCase())}function vn(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function cr(e,t){let r=typeof t=="string"?Ye(t).search:t.search;if(e[e.length-1].route.index&&vn(r||""))return e[e.length-1];let n=li(e);return n[n.length-1]}function wo(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:i,json:a}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Hr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function us(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function At(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 cs(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 Ke(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 ds(e,t){try{let r=e.sessionStorage.getItem(fi);if(r){let n=JSON.parse(r);for(let[o,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function ms(e,t){if(t.size>0){let r={};for(let[n,o]of t)r[n]=[...o];try{e.sessionStorage.setItem(fi,JSON.stringify(r))}catch(n){de(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function So(){let e,t,r=new Promise((n,o)=>{e=async i=>{n(i);try{await r}catch{}},t=async i=>{o(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var ct=E.createContext(null);ct.displayName="DataRouter";var qt=E.createContext(null);qt.displayName="DataRouterState";var bi=E.createContext(!1);function fs(){return E.useContext(bi)}var En=E.createContext({isTransitioning:!1});En.displayName="ViewTransition";var wi=E.createContext(new Map);wi.displayName="Fetchers";var hs=E.createContext(null);hs.displayName="Await";var xe=E.createContext(null);xe.displayName="Navigation";var Tr=E.createContext(null);Tr.displayName="Location";var Be=E.createContext({outlet:null,matches:[],isDataRoute:!1});Be.displayName="Route";var Rn=E.createContext(null);Rn.displayName="RouteError";var Si="REACT_ROUTER_ERROR",ps="REDIRECT",gs="ROUTE_ERROR_RESPONSE";function _s(e){if(e.startsWith(`${Si}:${ps}:{`))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 ys(e){if(e.startsWith(`${Si}:${gs}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gt(t.status,t.statusText,t.data)}catch{}}function vs(e,{relative:t}={}){J(bt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=E.useContext(xe),{hash:o,pathname:i,search:a}=Kt(e,{relative:t}),s=i;return r!=="/"&&(s=i==="/"?r:je([r,i])),n.createHref({pathname:s,search:a,hash:o})}function bt(){return E.useContext(Tr)!=null}function Je(){return J(bt(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Tr).location}var Li="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pi(e){E.useContext(xe).static||E.useLayoutEffect(e)}function Ti(){let{isDataRoute:e}=E.useContext(Be);return e?Is():Es()}function Es(){J(bt(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(ct),{basename:t,navigator:r}=E.useContext(xe),{matches:n}=E.useContext(Be),{pathname:o}=Je(),i=JSON.stringify(Pr(n)),a=E.useRef(!1);return Pi(()=>{a.current=!0}),E.useCallback((l,u={})=>{if(de(a.current,Li),!a.current)return;if(typeof l=="number"){r.go(l);return}let c=zt(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:je([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}E.createContext(null);function Hm(){let{matches:e}=E.useContext(Be),t=e[e.length-1];return t?t.params:{}}function Kt(e,{relative:t}={}){let{matches:r}=E.useContext(Be),{pathname:n}=Je(),o=JSON.stringify(Pr(r));return E.useMemo(()=>zt(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Rs(e,t,r){J(bt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=E.useContext(xe),{matches:o}=E.useContext(Be),i=o[o.length-1],a=i?i.params:{},s=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let b=u&&u.path||"";Ai(s,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${b}">) 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.
|
|
4
4
|
|
|
5
|
-
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let c=Je(),d;d=c;let h=d.pathname||"/",f=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=Qe(e,{pathname:f});return de(u||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),de(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`),Ps(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:je([l,n.encodeLocation?n.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:je([l,n.encodeLocation?n.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,r)}function bs(){let e=Ds(),t=jt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:o},r):null,a)}var ws=E.createElement(bs,null),Ci=class extends E.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"){const r=ys(e.digest);r&&(e=r)}let t=e!==void 0?E.createElement(Be.Provider,{value:this.props.routeContext},E.createElement(Rn.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(Ss,{error:e},t):t}};Ci.contextType=bi;var zr=new WeakMap;function Ss({children:e,error:t}){let{basename:r}=E.useContext(xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=_s(t.digest);if(n){let o=zr.get(t);if(o)throw o;let i=ui(n.location,r);if(si&&!zr.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw zr.set(t,a),a}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ls({routeContext:e,match:t,children:r}){let n=E.useContext(ct);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Be.Provider,{value:e},r)}function Ps(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n?.errors;if(i!=null){let c=o.findIndex(d=>d.route.id&&i?.[d.route.id]!==void 0);J(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let a=!1,s=-1;if(r&&n){a=n.renderFallback;for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=c),d.route.id){let{loaderData:h,errors:f}=n,g=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||g){r.isStatic&&(a=!0),s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}}let l=r?.onError,u=n&&l?(c,d)=>{l(c,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Wt(n.matches),errorInfo:d})}:void 0;return o.reduceRight((c,d,h)=>{let f,g=!1,S=null,b=null;n&&(f=i&&d.route.id?i[d.route.id]:void 0,S=d.route.errorElement||ws,a&&(s<0&&h===0?(Ai("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):s===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,h+1)),P=()=>{let L;return f?L=S:g?L=b:d.route.Component?L=E.createElement(d.route.Component,null):d.route.element?L=d.route.element:L=c,E.createElement(Ls,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:L})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ci,{location:n.location,revalidation:n.revalidation,component:S,error:f,children:P(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):P()},null)}function bn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ts(e){let t=E.useContext(ct);return J(t,bn(e)),t}function Cs(e){let t=E.useContext(qt);return J(t,bn(e)),t}function As(e){let t=E.useContext(Be);return J(t,bn(e)),t}function wn(e){let t=As(e),r=t.matches[t.matches.length-1];return J(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Os(){return wn("useRouteId")}function Ds(){let e=E.useContext(Rn),t=Cs("useRouteError"),r=wn("useRouteError");return e!==void 0?e:t.errors?.[r]}function Is(){let{router:e}=Ts("useNavigate"),t=wn("useNavigate"),r=E.useRef(!1);return Pi(()=>{r.current=!0}),E.useCallback(async(o,i={})=>{de(r.current,Li),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Lo={};function Ai(e,t,r){!t&&!Lo[e]&&(Lo[e]=!0,de(!1,r))}var Po={};function To(e,t){!e&&!Po[t]&&(Po[t]=!0,console.warn(t))}var ks="useOptimistic",Co=Fa[ks],xs=()=>{};function Ns(e){return Co?Co(e):[e,xs]}function Ms(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Vs=["HydrateFallback","hydrateFallbackElement"],$s=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 js({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=fs()||n;let[i,a]=E.useState(e.state),[s,l]=Ns(i),[u,c]=E.useState(),[d,h]=E.useState({isTransitioning:!1}),[f,g]=E.useState(),[S,b]=E.useState(),[w,P]=E.useState(),L=E.useRef(new Map),D=E.useCallback((v,{deletedFetchers:Z,newErrors:re,flushSync:se,viewTransitionOpts:X})=>{re&&r&&Object.values(re).forEach(K=>r(K,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:Wt(v.matches)})),v.fetchers.forEach((K,G)=>{K.data!==void 0&&L.current.set(G,K.data)}),Z.forEach(K=>L.current.delete(K)),To(se===!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 me=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(To(X==null||me,"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."),!X||!me){t&&se?t(()=>a(v)):n===!1?a(v):E.startTransition(()=>{n===!0&&l(K=>Ao(K,v)),a(v)});return}if(t&&se){t(()=>{S&&(f?.resolve(),S.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let K=e.window.document.startViewTransition(()=>{t(()=>a(v))});K.finished.finally(()=>{t(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})})}),t(()=>b(K));return}S?(f?.resolve(),S.skipTransition(),P({state:v,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(c(v),h({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,S,f,n,l,r]);E.useLayoutEffect(()=>e.subscribe(D),[e,D]),E.useEffect(()=>{d.isTransitioning&&!d.flushSync&&g(new $s)},[d]),E.useEffect(()=>{if(f&&u&&e.window){let v=u,Z=f.promise,re=e.window.document.startViewTransition(async()=>{n===!1?a(v):E.startTransition(()=>{n===!0&&l(se=>Ao(se,v)),a(v)}),await Z});re.finished.finally(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})}),b(re)}},[u,f,e.window,n,l]),E.useEffect(()=>{f&&u&&s.location.key===u.location.key&&f.resolve()},[f,S,s.location,u]),E.useEffect(()=>{!d.isTransitioning&&w&&(c(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),P(void 0))},[d.isTransitioning,w]);let k=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,Z,re)=>e.navigate(v,{state:Z,preventScrollReset:re?.preventScrollReset}),replace:(v,Z,re)=>e.navigate(v,{replace:!0,state:Z,preventScrollReset:re?.preventScrollReset})}),[e]),H=e.basename||"/",$=E.useMemo(()=>({router:e,navigator:k,static:!1,basename:H,onError:r}),[e,k,H,r]);return E.createElement(E.Fragment,null,E.createElement(ct.Provider,{value:$},E.createElement(qt.Provider,{value:s},E.createElement(wi.Provider,{value:L.current},E.createElement(En.Provider,{value:d},E.createElement(Fs,{basename:H,location:s.location,navigationType:s.historyAction,navigator:k,unstable_useTransitions:n},E.createElement(Bs,{routes:e.routes,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function Ao(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 Bs=E.memo(Us);function Us({routes:e,future:t,state:r,isStatic:n,onError:o}){return Rs(e,void 0,{state:r,isStatic:n,onError:o})}function zm({to:e,replace:t,state:r,relative:n}){J(bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext(xe);de(!o,"<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:i}=E.useContext(Be),{pathname:a}=Je(),s=Ti(),l=zt(e,Pr(i),a,n==="path"),u=JSON.stringify(l);return E.useEffect(()=>{s(JSON.parse(u),{replace:t,state:r,relative:n})},[s,u,n,t,r]),null}function Fs({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){J(!bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=E.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[s,o,i,a]);typeof r=="string"&&(r=Ye(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:f="default",unstable_mask:g}=r,S=E.useMemo(()=>{let b=$e(u,s);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:f,unstable_mask:g},navigationType:n}},[s,u,c,d,h,f,n,g]);return de(S!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:E.createElement(xe.Provider,{value:l},E.createElement(Tr.Provider,{children:t,value:S}))}var dr="get",mr="application/x-www-form-urlencoded";function Cr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hs(e){return Cr(e)&&e.tagName.toLowerCase()==="button"}function zs(e){return Cr(e)&&e.tagName.toLowerCase()==="form"}function Gs(e){return Cr(e)&&e.tagName.toLowerCase()==="input"}function Ws(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qs(e,t){return e.button===0&&(!t||t==="_self")&&!Ws(e)}var ir=null;function Ks(){if(ir===null)try{new FormData(document.createElement("form"),0),ir=!1}catch{ir=!0}return ir}var Ys=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gr(e){return e!=null&&!Ys.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mr}"`),null):e}function Js(e,t){let r,n,o,i,a;if(zs(e)){let s=e.getAttribute("action");n=s?$e(s,t):null,r=e.getAttribute("method")||dr,o=Gr(e.getAttribute("enctype"))||mr,i=new FormData(e)}else if(Hs(e)||Gs(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?$e(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||dr,o=Gr(e.getAttribute("formenctype"))||Gr(s.getAttribute("enctype"))||mr,i=new FormData(s,e),!Ks()){let{name:u,type:c,value:d}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(Cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dr,n=null,o=mr,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xs(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&$e(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${n}`,o}async function Qs(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){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zs(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 eu(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await Qs(i,r);return a.links?a.links():[]}return[]}));return ou(n.flat(1).filter(Zs).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Oo(e,t,r,n,o,i){let a=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,s=(l,u)=>r[u].pathname!==l.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==l.params["*"];return i==="assets"?t.filter((l,u)=>a(l,u)||s(l,u)):i==="data"?t.filter((l,u)=>{let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(a(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function tu(e,t,{includeHydrateFallback:r}={}){return ru(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function ru(e){return[...new Set(e)]}function nu(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ou(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(nu(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function Oi(){let e=E.useContext(ct);return Sn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function iu(){let e=E.useContext(qt);return Sn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=E.createContext(void 0);Ln.displayName="FrameworkContext";function Di(){let e=E.useContext(Ln);return Sn(e,"You must render this element inside a <HydratedRouter> element"),e}function au(e,t){let r=E.useContext(Ln),[n,o]=E.useState(!1),[i,a]=E.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=E.useRef(null);E.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let S=w=>{w.forEach(P=>{a(P.isIntersecting)})},b=new IntersectionObserver(S,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),E.useEffect(()=>{if(n){let S=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(S)}}},[n]);let f=()=>{o(!0)},g=()=>{o(!1),a(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ot(s,f),onBlur:Ot(l,g),onMouseEnter:Ot(u,f),onMouseLeave:Ot(c,g),onTouchStart:Ot(d,f)}]:[!1,h,{}]}function Ot(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function lu({page:e,...t}){let{router:r}=Oi(),n=E.useMemo(()=>Qe(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?E.createElement(uu,{page:e,matches:n,...t}):null}function su(e){let{manifest:t,routeModules:r}=Di(),[n,o]=E.useState([]);return E.useEffect(()=>{let i=!1;return eu(e,t,r).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,r]),n}function uu({page:e,matches:t,...r}){let n=Je(),{future:o,manifest:i,routeModules:a}=Di(),{basename:s}=Oi(),{loaderData:l,matches:u}=iu(),c=E.useMemo(()=>Oo(e,t,u,i,n,"data"),[e,t,u,i,n]),d=E.useMemo(()=>Oo(e,t,u,i,n,"assets"),[e,t,u,i,n]),h=E.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,b=!1;if(t.forEach(P=>{let L=i.routes[P.route.id];!L||!L.hasLoader||(!c.some(D=>D.route.id===P.route.id)&&P.route.id in l&&a[P.route.id]?.shouldRevalidate||L.hasClientLoader?b=!0:S.add(P.route.id))}),S.size===0)return[];let w=Xs(e,s,o.unstable_trailingSlashAwareDataRequests,"data");return b&&S.size>0&&w.searchParams.set("_routes",t.filter(P=>S.has(P.route.id)).map(P=>P.route.id).join(",")),[w.pathname+w.search]},[s,o.unstable_trailingSlashAwareDataRequests,l,n,i,c,t,e,a]),f=E.useMemo(()=>tu(d,i),[d,i]),g=su(d);return E.createElement(E.Fragment,null,h.map(S=>E.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),f.map(S=>E.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),g.map(({key:S,link:b})=>E.createElement("link",{key:S,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function cu(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var du=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{du&&(window.__reactRouterVersion="7.13.1")}catch{}function Gm(e,t){return Fl({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ol({window:t?.window}),hydrationData:mu(),routes:e,mapRouteProperties:Ms,hydrationRouteProperties:Vs,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function mu(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fu(e.errors)}),e}function fu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new Gt(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(o.message);i.stack="",r[n]=i}}else r[n]=o;return r}var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ki=E.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:a,unstable_mask:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f,...g},S){let{basename:b,navigator:w,unstable_useTransitions:P}=E.useContext(xe),L=typeof c=="string"&&Ii.test(c),D=ui(c,b);c=D.to;let k=vs(c,{relative:o}),H=Je(),$=null;if(s){let G=zt(s,[],H.unstable_mask?H.unstable_mask.pathname:"/",!0);b!=="/"&&(G.pathname=G.pathname==="/"?b:je([b,G.pathname])),$=w.createHref(G)}let[v,Z,re]=au(n,g),se=_u(c,{replace:a,unstable_mask:s,state:l,target:u,preventScrollReset:d,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:f,unstable_useTransitions:P});function X(G){t&&t(G),G.defaultPrevented||se(G)}let me=!(D.isExternal||i),K=E.createElement("a",{...g,...re,href:(me?$:void 0)||D.absoluteURL||k,onClick:me?X:t,ref:cu(S,Z),target:u,"data-discover":!L&&r==="render"?"true":void 0});return v&&!L?E.createElement(E.Fragment,null,K,E.createElement(lu,{page:k})):K});ki.displayName="Link";var hu=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...u},c){let d=Kt(a,{relative:u.relative}),h=Je(),f=E.useContext(qt),{navigator:g,basename:S}=E.useContext(xe),b=f!=null&&bu(d)&&s===!0,w=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,P=h.pathname,L=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(P=P.toLowerCase(),L=L?L.toLowerCase():null,w=w.toLowerCase()),L&&S&&(L=$e(L,S)||L);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=P===w||!o&&P.startsWith(w)&&P.charAt(D)==="/",H=L!=null&&(L===w||!o&&L.startsWith(w)&&L.charAt(w.length)==="/"),$={isActive:k,isPending:H,isTransitioning:b},v=k?t:void 0,Z;typeof n=="function"?Z=n($):Z=[n,k?"active":null,H?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let re=typeof i=="function"?i($):i;return E.createElement(ki,{...u,"aria-current":v,className:Z,ref:c,style:re,to:a,viewTransition:s},typeof l=="function"?l($):l)});hu.displayName="NavLink";var pu=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=dr,action:s,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...f},g)=>{let{unstable_useTransitions:S}=E.useContext(xe),b=Eu(),w=Ru(s,{relative:u}),P=a.toLowerCase()==="get"?"get":"post",L=typeof s=="string"&&Ii.test(s),D=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,$=H?.getAttribute("formmethod")||a,v=()=>b(H||k.currentTarget,{fetcherKey:t,method:$,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h});S&&r!==!1?E.startTransition(()=>v()):v()};return E.createElement("form",{ref:g,method:P,action:w,onSubmit:n?l:D,...f,"data-discover":!L&&e==="render"?"true":void 0})});pu.displayName="Form";function gu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xi(e){let t=E.useContext(ct);return J(t,gu(e)),t}function _u(e,{target:t,replace:r,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=Ti(),d=Je(),h=Kt(e,{relative:a});return E.useCallback(f=>{if(qs(f,t)){f.preventDefault();let g=r!==void 0?r:ze(d)===ze(h),S=()=>c(e,{replace:g,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});u?E.startTransition(()=>S()):S()}},[d,c,h,r,n,o,t,e,i,a,s,l,u])}var yu=0,vu=()=>`__${String(++yu)}__`;function Eu(){let{router:e}=xi("useSubmit"),{basename:t}=E.useContext(xe),r=Os(),n=e.fetch,o=e.navigate;return E.useCallback(async(i,a={})=>{let{action:s,method:l,encType:u,formData:c,body:d}=Js(i,t);if(a.navigate===!1){let h=a.fetcherKey||vu();await n(h,r,a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,o,t,r])}function Ru(e,{relative:t}={}){let{basename:r}=E.useContext(xe),n=E.useContext(Be);J(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kt(e||".",{relative:t})},a=Je();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(c=>c==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let c=s.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:je([r,i.pathname])),ze(i)}function bu(e,{relative:t}={}){let r=E.useContext(En);J(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xi("useViewTransitionState"),o=Kt(e,{relative:t});if(!r.isTransitioning)return!1;let i=$e(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=$e(r.nextLocation.pathname,n)||r.nextLocation.pathname;return pr(o.pathname,a)!=null||pr(o.pathname,i)!=null}var wu=za();function Wm(e){return E.createElement(js,{flushSync:wu.flushSync,...e})}const Su="modulepreload",Lu=function(e,t){return new URL(e,t).href},Do={},m=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let u=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");o=u(r.map(c=>{if(c=Lu(c,n),c in Do)return;Do[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(n)for(let g=a.length-1;g>=0;g--){const S=a[g];if(S.href===c&&(!d||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Su,d||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),d)return new Promise((g,S)=>{f.addEventListener("load",g),f.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};let ge=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Pu(e){return Pn(e)}function Pn(e){return Array.isArray(e)?Tu(e):e instanceof RegExp?e:typeof e=="object"?Cu(e):e}function Tu(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Pn(e[r]);return t}function Cu(e){let t={};for(let r in e)t[r]=Pn(e[r]);return t}function Ni(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Mi(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Mi(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ar=class{static hasCaptures(e){return e===null?!1:(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,r){return e.replace(Wr,(n,o,i,a)=>{let s=r[parseInt(o||i,10)];if(s){let l=t.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function Vi(e,t){return e<t?-1:e>t?1:0}function $i(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let o=0;o<r;o++){let i=Vi(e[o],t[o]);if(i!==0)return i}return 0}return r-n}function Io(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ji(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},gr=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(Du(e),t)}static createFromParsedTheme(e,t){return ku(e,t)}_cachedMatchRoot=new Bi(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(o=>Au(e.parent,o.parentScopes));return n?new Ui(n.fontStyle,n.foreground,n.background):null}},qr=class fr{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new fr(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new fr(r,t[n]);return r}push(t){return new fr(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function Au(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],o=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],o=!0}for(;e&&!Ou(e.scopeName,n);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ou(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ui=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function Du(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let s;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),s=d.split(",")}else Array.isArray(a.scope)?s=a.scope:s=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let d=a.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof a.settings.foreground=="string"&&Io(a.settings.foreground)&&(u=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&Io(a.settings.background)&&(c=a.settings.background);for(let d=0,h=s.length;d<h;d++){let g=s[d].trim().split(" "),S=g[g.length-1],b=null;g.length>1&&(b=g.slice(0,g.length-1),b.reverse()),r[n++]=new Iu(S,b,o,l,u,c)}}return r}var Iu=class{constructor(e,t,r,n,o,i){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=o,this.background=i}},Te=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Te||{});function ku(e,t){e.sort((l,u)=>{let c=Vi(l.scope,u.scope);return c!==0||(c=$i(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let r=0,n="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(o=l.background)}let i=new xu(t),a=new Ui(r,i.getId(n),i.getId(o)),s=new Mu(new nn(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let c=e[l];s.insert(0,c.scope,c.parentScopes,c.fontStyle,i.getId(c.foreground),i.getId(c.background))}return new gr(i,a,s)}var xu=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Nu=Object.freeze([]),nn=class Fi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,o,i){this.scopeDepth=t,this.parentScopes=r||Nu,this.fontStyle=n,this.foreground=o,this.background=i}clone(){return new Fi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,o=t.length;n<o;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),o!==0&&(this.background=o)}},Mu=class on{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,o=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[o]===">"&&o++,!(n>=t.parentScopes.length||o>=r.parentScopes.length);){const i=r.parentScopes[o].length-t.parentScopes[n].length;if(i!==0)return i;n++,o++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),o,i;if(n===-1?(o=t,i=""):(o=t.substring(0,n),i=t.substring(n+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(on._cmpBySpecificity),r}insert(t,r,n,o,i,a){if(r===""){this._doInsertHere(t,n,o,i,a);return}let s=r.indexOf("."),l,u;s===-1?(l=r,u=""):(l=r.substring(0,s),u=r.substring(s+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new on(this._mainRule.clone(),nn.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(t+1,u,n,o,i,a)}_doInsertHere(t,r,n,o,i){if(r===null){this._mainRule.acceptOverwrite(t,n,o,i);return}for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let l=this._rulesWithParentScopes[a];if($i(l.parentScopes,r)===0){l.acceptOverwrite(t,n,o,i);return}}n===-1&&(n=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new nn(t,r,n,o,i))}},Et=class Me{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Me.getLanguageId(t),n=Me.getTokenType(t),o=Me.getFontStyle(t),i=Me.getForeground(t),a=Me.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,o,i,a,s){let l=Me.getLanguageId(t),u=Me.getTokenType(t),c=Me.containsBalancedBrackets(t)?1:0,d=Me.getFontStyle(t),h=Me.getForeground(t),f=Me.getBackground(t);return r!==0&&(l=r),n!==8&&(u=n),o!==null&&(c=o?1:0),i!==-1&&(d=i),a!==0&&(h=a),s!==0&&(f=s),(l<<0|u<<8|c<<10|d<<11|h<<15|f<<24)>>>0}};function _r(e,t){const r=[],n=Vu(e);let o=n.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=n.next()}let u=a();if(r.push({matcher:u,priority:l}),o!==",")break;o=n.next()}return r;function i(){if(o==="-"){o=n.next();const l=i();return u=>!!l&&!l(u)}if(o==="("){o=n.next();const l=s();return o===")"&&(o=n.next()),l}if(ko(o)){const l=[];do l.push(o),o=n.next();while(ko(o));return u=>t(l,u)}return null}function a(){const l=[];let u=i();for(;u;)l.push(u),u=i();return c=>l.every(d=>d(c))}function s(){const l=[];let u=a();for(;u&&(l.push(u),o==="|"||o===",");){do o=n.next();while(o==="|"||o===",");u=a()}return c=>l.some(d=>d(c))}}function ko(e){return!!e&&!!e.match(/[\w\.:]+/)}function Vu(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function Hi(e){typeof e.dispose=="function"&&e.dispose()}var Bt=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},$u=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ju=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Bu=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bt(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new ju;for(const r of e)Uu(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Bt){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Uu(e,t,r,n){const o=r.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=r.lookup(t);e instanceof Bt?hr({baseGrammar:i,selfGrammar:o},n):an(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},n);const a=r.injections(e.scopeName);if(a)for(const s of a)n.add(new Bt(s))}function an(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];yr([n],t,r)}}function hr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yr(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const o=n.repository?Ni({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&yr(n.patterns,{...t,repository:o},r);const i=n.include;if(!i)continue;const a=zi(i);switch(a.kind){case 0:hr({...t,selfGrammar:t.baseGrammar},r);break;case 1:hr(t,r);break;case 2:an(a.ruleName,{...t,repository:o},r);break;case 3:case 4:const s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const l={baseGrammar:t.baseGrammar,selfGrammar:s,repository:o};a.kind===4?an(a.ruleName,l,r):hr(l,r)}else a.kind===4?r.add(new $u(a.scopeName,a.ruleName)):r.add(new Bt(a.scopeName));break}}}var Fu=class{kind=0},Hu=class{kind=1},zu=class{constructor(e){this.ruleName=e}kind=2},Gu=class{constructor(e){this.scopeName=e}kind=3},Wu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zi(e){if(e==="$base")return new Fu;if(e==="$self")return new Hu;const t=e.indexOf("#");if(t===-1)return new Gu(e);if(t===0)return new zu(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new Wu(r,n)}}var qu=/\\(\d+)/,xo=/\\(\d+)/g,Ku=-1,Gi=-2;var Yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=ar.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ar.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Mi(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ar.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ar.replaceCaptures(this._contentName,e,t)}},Yu=class extends Yt{retokenizeCapturedWithRuleId;constructor(e,t,r,n,o){super(e,t,r,n),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},Ju=class extends Yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,null),this._match=new Ut(n,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},No=class extends Yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,n),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ln=class extends Yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o,i,a,s,l,u){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this._end=new Ut(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vr=class extends Yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,o,i,a,s,l){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new Ut(a,Gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ft,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Wi=class Le{static createCaptureRule(t,r,n,o,i){return t.registerRule(a=>new Yu(r,a,n,o,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(o=>{if(t.id=o,t.match)return new Ju(t.$vscodeTextmateLocation,t.id,t.name,t.match,Le._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Ni({},n,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new No(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Le._compilePatterns(i,r,n))}return t.while?new vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Le._compileCaptures(t.whileCaptures||t.captures,r,n),Le._compilePatterns(t.patterns,r,n)):new ln(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Le._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Le._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);s>i&&(i=s)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);let l=0;t[a].patterns&&(l=Le.getCompiledRuleId(t[a],r,n)),o[s]=Le.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return o}static _compilePatterns(t,r,n){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const s=t[i];let l=-1;if(s.include){const u=zi(s.include);switch(u.kind){case 0:case 1:l=Le.getCompiledRuleId(n[s.include],r,n);break;case 2:let c=n[u.ruleName];c&&(l=Le.getCompiledRuleId(c,r,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let g=f.repository[h];g&&(l=Le.getCompiledRuleId(g,r,f.repository))}else l=Le.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Le.getCompiledRuleId(s,r,n);if(l!==-1){const u=r.getRule(l);let c=!1;if((u instanceof No||u instanceof ln||u instanceof vr)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ut=class qi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let o=0,i=[],a=!1;for(let s=0;s<n;s++)if(t.charAt(s)==="\\"&&s+1<n){const u=t.charAt(s+1);u==="z"?(i.push(t.substring(o,s)),i.push("$(?!\\n)(?<!\\n)"),o=s+2):(u==="A"||u==="G")&&(a=!0),s++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,n)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=qu.test(this.source):this.hasBackReferences=!1}clone(){return new qi(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(o=>t.substring(o.start,o.end));return xo.lastIndex=0,this.source.replace(xo,(o,i)=>ji(n[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],o=[],i,a,s,l;for(i=0,a=this.source.length;i<a;i++)s=this.source.charAt(i),t[i]=s,r[i]=s,n[i]=s,o[i]=s,s==="\\"&&i+1<a&&(l=this.source.charAt(i+1),l==="A"?(t[i+1]="",r[i+1]="",n[i+1]="A",o[i+1]="A"):l==="G"?(t[i+1]="",r[i+1]="G",n[i+1]="",o[i+1]="G"):(t[i+1]=l,r[i+1]=l,n[i+1]=l,o[i+1]=l),i++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:o.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ft=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Mo(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(o=>o.resolveAnchors(t,r));return new Mo(e,n,this._items.map(o=>o.ruleId))}},Mo=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
5
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let c=Je(),d;d=c;let h=d.pathname||"/",f=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=Qe(e,{pathname:f});return de(u||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),de(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`),Ps(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:je([l,n.encodeLocation?n.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:je([l,n.encodeLocation?n.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,r)}function bs(){let e=Ds(),t=jt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:o},r):null,a)}var ws=E.createElement(bs,null),Ci=class extends E.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"){const r=ys(e.digest);r&&(e=r)}let t=e!==void 0?E.createElement(Be.Provider,{value:this.props.routeContext},E.createElement(Rn.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(Ss,{error:e},t):t}};Ci.contextType=bi;var zr=new WeakMap;function Ss({children:e,error:t}){let{basename:r}=E.useContext(xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=_s(t.digest);if(n){let o=zr.get(t);if(o)throw o;let i=ui(n.location,r);if(si&&!zr.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw zr.set(t,a),a}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ls({routeContext:e,match:t,children:r}){let n=E.useContext(ct);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Be.Provider,{value:e},r)}function Ps(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n?.errors;if(i!=null){let c=o.findIndex(d=>d.route.id&&i?.[d.route.id]!==void 0);J(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let a=!1,s=-1;if(r&&n){a=n.renderFallback;for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=c),d.route.id){let{loaderData:h,errors:f}=n,g=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||g){r.isStatic&&(a=!0),s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}}let l=r?.onError,u=n&&l?(c,d)=>{l(c,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Wt(n.matches),errorInfo:d})}:void 0;return o.reduceRight((c,d,h)=>{let f,g=!1,S=null,b=null;n&&(f=i&&d.route.id?i[d.route.id]:void 0,S=d.route.errorElement||ws,a&&(s<0&&h===0?(Ai("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):s===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,h+1)),P=()=>{let L;return f?L=S:g?L=b:d.route.Component?L=E.createElement(d.route.Component,null):d.route.element?L=d.route.element:L=c,E.createElement(Ls,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:L})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ci,{location:n.location,revalidation:n.revalidation,component:S,error:f,children:P(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):P()},null)}function bn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ts(e){let t=E.useContext(ct);return J(t,bn(e)),t}function Cs(e){let t=E.useContext(qt);return J(t,bn(e)),t}function As(e){let t=E.useContext(Be);return J(t,bn(e)),t}function wn(e){let t=As(e),r=t.matches[t.matches.length-1];return J(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Os(){return wn("useRouteId")}function Ds(){let e=E.useContext(Rn),t=Cs("useRouteError"),r=wn("useRouteError");return e!==void 0?e:t.errors?.[r]}function Is(){let{router:e}=Ts("useNavigate"),t=wn("useNavigate"),r=E.useRef(!1);return Pi(()=>{r.current=!0}),E.useCallback(async(o,i={})=>{de(r.current,Li),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Lo={};function Ai(e,t,r){!t&&!Lo[e]&&(Lo[e]=!0,de(!1,r))}var Po={};function To(e,t){!e&&!Po[t]&&(Po[t]=!0,console.warn(t))}var ks="useOptimistic",Co=Fa[ks],xs=()=>{};function Ns(e){return Co?Co(e):[e,xs]}function Ms(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Vs=["HydrateFallback","hydrateFallbackElement"],$s=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 js({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=fs()||n;let[i,a]=E.useState(e.state),[s,l]=Ns(i),[u,c]=E.useState(),[d,h]=E.useState({isTransitioning:!1}),[f,g]=E.useState(),[S,b]=E.useState(),[w,P]=E.useState(),L=E.useRef(new Map),D=E.useCallback((v,{deletedFetchers:Z,newErrors:re,flushSync:se,viewTransitionOpts:X})=>{re&&r&&Object.values(re).forEach(K=>r(K,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:Wt(v.matches)})),v.fetchers.forEach((K,G)=>{K.data!==void 0&&L.current.set(G,K.data)}),Z.forEach(K=>L.current.delete(K)),To(se===!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 me=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(To(X==null||me,"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."),!X||!me){t&&se?t(()=>a(v)):n===!1?a(v):E.startTransition(()=>{n===!0&&l(K=>Ao(K,v)),a(v)});return}if(t&&se){t(()=>{S&&(f?.resolve(),S.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let K=e.window.document.startViewTransition(()=>{t(()=>a(v))});K.finished.finally(()=>{t(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})})}),t(()=>b(K));return}S?(f?.resolve(),S.skipTransition(),P({state:v,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(c(v),h({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,S,f,n,l,r]);E.useLayoutEffect(()=>e.subscribe(D),[e,D]),E.useEffect(()=>{d.isTransitioning&&!d.flushSync&&g(new $s)},[d]),E.useEffect(()=>{if(f&&u&&e.window){let v=u,Z=f.promise,re=e.window.document.startViewTransition(async()=>{n===!1?a(v):E.startTransition(()=>{n===!0&&l(se=>Ao(se,v)),a(v)}),await Z});re.finished.finally(()=>{g(void 0),b(void 0),c(void 0),h({isTransitioning:!1})}),b(re)}},[u,f,e.window,n,l]),E.useEffect(()=>{f&&u&&s.location.key===u.location.key&&f.resolve()},[f,S,s.location,u]),E.useEffect(()=>{!d.isTransitioning&&w&&(c(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),P(void 0))},[d.isTransitioning,w]);let k=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,Z,re)=>e.navigate(v,{state:Z,preventScrollReset:re?.preventScrollReset}),replace:(v,Z,re)=>e.navigate(v,{replace:!0,state:Z,preventScrollReset:re?.preventScrollReset})}),[e]),H=e.basename||"/",$=E.useMemo(()=>({router:e,navigator:k,static:!1,basename:H,onError:r}),[e,k,H,r]);return E.createElement(E.Fragment,null,E.createElement(ct.Provider,{value:$},E.createElement(qt.Provider,{value:s},E.createElement(wi.Provider,{value:L.current},E.createElement(En.Provider,{value:d},E.createElement(Fs,{basename:H,location:s.location,navigationType:s.historyAction,navigator:k,unstable_useTransitions:n},E.createElement(Bs,{routes:e.routes,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function Ao(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 Bs=E.memo(Us);function Us({routes:e,future:t,state:r,isStatic:n,onError:o}){return Rs(e,void 0,{state:r,isStatic:n,onError:o})}function zm({to:e,replace:t,state:r,relative:n}){J(bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext(xe);de(!o,"<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:i}=E.useContext(Be),{pathname:a}=Je(),s=Ti(),l=zt(e,Pr(i),a,n==="path"),u=JSON.stringify(l);return E.useEffect(()=>{s(JSON.parse(u),{replace:t,state:r,relative:n})},[s,u,n,t,r]),null}function Fs({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){J(!bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=E.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[s,o,i,a]);typeof r=="string"&&(r=Ye(r));let{pathname:u="/",search:c="",hash:d="",state:h=null,key:f="default",unstable_mask:g}=r,S=E.useMemo(()=>{let b=$e(u,s);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:f,unstable_mask:g},navigationType:n}},[s,u,c,d,h,f,n,g]);return de(S!=null,`<Router basename="${s}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:E.createElement(xe.Provider,{value:l},E.createElement(Tr.Provider,{children:t,value:S}))}var dr="get",mr="application/x-www-form-urlencoded";function Cr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hs(e){return Cr(e)&&e.tagName.toLowerCase()==="button"}function zs(e){return Cr(e)&&e.tagName.toLowerCase()==="form"}function Gs(e){return Cr(e)&&e.tagName.toLowerCase()==="input"}function Ws(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qs(e,t){return e.button===0&&(!t||t==="_self")&&!Ws(e)}var ir=null;function Ks(){if(ir===null)try{new FormData(document.createElement("form"),0),ir=!1}catch{ir=!0}return ir}var Ys=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gr(e){return e!=null&&!Ys.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mr}"`),null):e}function Js(e,t){let r,n,o,i,a;if(zs(e)){let s=e.getAttribute("action");n=s?$e(s,t):null,r=e.getAttribute("method")||dr,o=Gr(e.getAttribute("enctype"))||mr,i=new FormData(e)}else if(Hs(e)||Gs(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?$e(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||dr,o=Gr(e.getAttribute("formenctype"))||Gr(s.getAttribute("enctype"))||mr,i=new FormData(s,e),!Ks()){let{name:u,type:c,value:d}=e;if(c==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(Cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dr,n=null,o=mr,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xs(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&$e(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${n}`,o}async function Qs(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){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zs(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 eu(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await Qs(i,r);return a.links?a.links():[]}return[]}));return ou(n.flat(1).filter(Zs).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Oo(e,t,r,n,o,i){let a=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,s=(l,u)=>r[u].pathname!==l.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==l.params["*"];return i==="assets"?t.filter((l,u)=>a(l,u)||s(l,u)):i==="data"?t.filter((l,u)=>{let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(a(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function tu(e,t,{includeHydrateFallback:r}={}){return ru(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function ru(e){return[...new Set(e)]}function nu(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ou(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(nu(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function Oi(){let e=E.useContext(ct);return Sn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function iu(){let e=E.useContext(qt);return Sn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=E.createContext(void 0);Ln.displayName="FrameworkContext";function Di(){let e=E.useContext(Ln);return Sn(e,"You must render this element inside a <HydratedRouter> element"),e}function au(e,t){let r=E.useContext(Ln),[n,o]=E.useState(!1),[i,a]=E.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=E.useRef(null);E.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let S=w=>{w.forEach(P=>{a(P.isIntersecting)})},b=new IntersectionObserver(S,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),E.useEffect(()=>{if(n){let S=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(S)}}},[n]);let f=()=>{o(!0)},g=()=>{o(!1),a(!1)};return r?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ot(s,f),onBlur:Ot(l,g),onMouseEnter:Ot(u,f),onMouseLeave:Ot(c,g),onTouchStart:Ot(d,f)}]:[!1,h,{}]}function Ot(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function lu({page:e,...t}){let{router:r}=Oi(),n=E.useMemo(()=>Qe(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?E.createElement(uu,{page:e,matches:n,...t}):null}function su(e){let{manifest:t,routeModules:r}=Di(),[n,o]=E.useState([]);return E.useEffect(()=>{let i=!1;return eu(e,t,r).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,r]),n}function uu({page:e,matches:t,...r}){let n=Je(),{future:o,manifest:i,routeModules:a}=Di(),{basename:s}=Oi(),{loaderData:l,matches:u}=iu(),c=E.useMemo(()=>Oo(e,t,u,i,n,"data"),[e,t,u,i,n]),d=E.useMemo(()=>Oo(e,t,u,i,n,"assets"),[e,t,u,i,n]),h=E.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,b=!1;if(t.forEach(P=>{let L=i.routes[P.route.id];!L||!L.hasLoader||(!c.some(D=>D.route.id===P.route.id)&&P.route.id in l&&a[P.route.id]?.shouldRevalidate||L.hasClientLoader?b=!0:S.add(P.route.id))}),S.size===0)return[];let w=Xs(e,s,o.unstable_trailingSlashAwareDataRequests,"data");return b&&S.size>0&&w.searchParams.set("_routes",t.filter(P=>S.has(P.route.id)).map(P=>P.route.id).join(",")),[w.pathname+w.search]},[s,o.unstable_trailingSlashAwareDataRequests,l,n,i,c,t,e,a]),f=E.useMemo(()=>tu(d,i),[d,i]),g=su(d);return E.createElement(E.Fragment,null,h.map(S=>E.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),f.map(S=>E.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),g.map(({key:S,link:b})=>E.createElement("link",{key:S,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function cu(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var du=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{du&&(window.__reactRouterVersion="7.13.1")}catch{}function Gm(e,t){return Fl({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ol({window:t?.window}),hydrationData:t?.hydrationData||mu(),routes:e,mapRouteProperties:Ms,hydrationRouteProperties:Vs,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function mu(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fu(e.errors)}),e}function fu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new Gt(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(o.message);i.stack="",r[n]=i}}else r[n]=o;return r}var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ki=E.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:a,unstable_mask:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h,unstable_defaultShouldRevalidate:f,...g},S){let{basename:b,navigator:w,unstable_useTransitions:P}=E.useContext(xe),L=typeof c=="string"&&Ii.test(c),D=ui(c,b);c=D.to;let k=vs(c,{relative:o}),H=Je(),$=null;if(s){let G=zt(s,[],H.unstable_mask?H.unstable_mask.pathname:"/",!0);b!=="/"&&(G.pathname=G.pathname==="/"?b:je([b,G.pathname])),$=w.createHref(G)}let[v,Z,re]=au(n,g),se=_u(c,{replace:a,unstable_mask:s,state:l,target:u,preventScrollReset:d,relative:o,viewTransition:h,unstable_defaultShouldRevalidate:f,unstable_useTransitions:P});function X(G){t&&t(G),G.defaultPrevented||se(G)}let me=!(D.isExternal||i),K=E.createElement("a",{...g,...re,href:(me?$:void 0)||D.absoluteURL||k,onClick:me?X:t,ref:cu(S,Z),target:u,"data-discover":!L&&r==="render"?"true":void 0});return v&&!L?E.createElement(E.Fragment,null,K,E.createElement(lu,{page:k})):K});ki.displayName="Link";var hu=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...u},c){let d=Kt(a,{relative:u.relative}),h=Je(),f=E.useContext(qt),{navigator:g,basename:S}=E.useContext(xe),b=f!=null&&bu(d)&&s===!0,w=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,P=h.pathname,L=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(P=P.toLowerCase(),L=L?L.toLowerCase():null,w=w.toLowerCase()),L&&S&&(L=$e(L,S)||L);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=P===w||!o&&P.startsWith(w)&&P.charAt(D)==="/",H=L!=null&&(L===w||!o&&L.startsWith(w)&&L.charAt(w.length)==="/"),$={isActive:k,isPending:H,isTransitioning:b},v=k?t:void 0,Z;typeof n=="function"?Z=n($):Z=[n,k?"active":null,H?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let re=typeof i=="function"?i($):i;return E.createElement(ki,{...u,"aria-current":v,className:Z,ref:c,style:re,to:a,viewTransition:s},typeof l=="function"?l($):l)});hu.displayName="NavLink";var pu=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=dr,action:s,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...f},g)=>{let{unstable_useTransitions:S}=E.useContext(xe),b=Eu(),w=Ru(s,{relative:u}),P=a.toLowerCase()==="get"?"get":"post",L=typeof s=="string"&&Ii.test(s),D=k=>{if(l&&l(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,$=H?.getAttribute("formmethod")||a,v=()=>b(H||k.currentTarget,{fetcherKey:t,method:$,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h});S&&r!==!1?E.startTransition(()=>v()):v()};return E.createElement("form",{ref:g,method:P,action:w,onSubmit:n?l:D,...f,"data-discover":!L&&e==="render"?"true":void 0})});pu.displayName="Form";function gu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xi(e){let t=E.useContext(ct);return J(t,gu(e)),t}function _u(e,{target:t,replace:r,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=Ti(),d=Je(),h=Kt(e,{relative:a});return E.useCallback(f=>{if(qs(f,t)){f.preventDefault();let g=r!==void 0?r:ze(d)===ze(h),S=()=>c(e,{replace:g,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});u?E.startTransition(()=>S()):S()}},[d,c,h,r,n,o,t,e,i,a,s,l,u])}var yu=0,vu=()=>`__${String(++yu)}__`;function Eu(){let{router:e}=xi("useSubmit"),{basename:t}=E.useContext(xe),r=Os(),n=e.fetch,o=e.navigate;return E.useCallback(async(i,a={})=>{let{action:s,method:l,encType:u,formData:c,body:d}=Js(i,t);if(a.navigate===!1){let h=a.fetcherKey||vu();await n(h,r,a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||s,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,o,t,r])}function Ru(e,{relative:t}={}){let{basename:r}=E.useContext(xe),n=E.useContext(Be);J(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kt(e||".",{relative:t})},a=Je();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(c=>c==="")){s.delete("index"),l.filter(d=>d).forEach(d=>s.append("index",d));let c=s.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:je([r,i.pathname])),ze(i)}function bu(e,{relative:t}={}){let r=E.useContext(En);J(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xi("useViewTransitionState"),o=Kt(e,{relative:t});if(!r.isTransitioning)return!1;let i=$e(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=$e(r.nextLocation.pathname,n)||r.nextLocation.pathname;return pr(o.pathname,a)!=null||pr(o.pathname,i)!=null}var wu=za();function Wm(e){return E.createElement(js,{flushSync:wu.flushSync,...e})}const Su="modulepreload",Lu=function(e,t){return new URL(e,t).href},Do={},m=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let u=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=s?.nonce||s?.getAttribute("nonce");o=u(r.map(c=>{if(c=Lu(c,n),c in Do)return;Do[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(n)for(let g=a.length-1;g>=0;g--){const S=a[g];if(S.href===c&&(!d||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Su,d||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),d)return new Promise((g,S)=>{f.addEventListener("load",g),f.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};let ge=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Pu(e){return Pn(e)}function Pn(e){return Array.isArray(e)?Tu(e):e instanceof RegExp?e:typeof e=="object"?Cu(e):e}function Tu(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Pn(e[r]);return t}function Cu(e){let t={};for(let r in e)t[r]=Pn(e[r]);return t}function Ni(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Mi(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Mi(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ar=class{static hasCaptures(e){return e===null?!1:(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,r){return e.replace(Wr,(n,o,i,a)=>{let s=r[parseInt(o||i,10)];if(s){let l=t.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function Vi(e,t){return e<t?-1:e>t?1:0}function $i(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let o=0;o<r;o++){let i=Vi(e[o],t[o]);if(i!==0)return i}return 0}return r-n}function Io(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ji(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},gr=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(Du(e),t)}static createFromParsedTheme(e,t){return ku(e,t)}_cachedMatchRoot=new Bi(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(o=>Au(e.parent,o.parentScopes));return n?new Ui(n.fontStyle,n.foreground,n.background):null}},qr=class fr{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new fr(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new fr(r,t[n]);return r}push(t){return new fr(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function Au(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],o=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],o=!0}for(;e&&!Ou(e.scopeName,n);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ou(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ui=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function Du(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let s;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),s=d.split(",")}else Array.isArray(a.scope)?s=a.scope:s=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let d=a.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof a.settings.foreground=="string"&&Io(a.settings.foreground)&&(u=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&Io(a.settings.background)&&(c=a.settings.background);for(let d=0,h=s.length;d<h;d++){let g=s[d].trim().split(" "),S=g[g.length-1],b=null;g.length>1&&(b=g.slice(0,g.length-1),b.reverse()),r[n++]=new Iu(S,b,o,l,u,c)}}return r}var Iu=class{constructor(e,t,r,n,o,i){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=o,this.background=i}},Te=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Te||{});function ku(e,t){e.sort((l,u)=>{let c=Vi(l.scope,u.scope);return c!==0||(c=$i(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let r=0,n="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(o=l.background)}let i=new xu(t),a=new Ui(r,i.getId(n),i.getId(o)),s=new Mu(new nn(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let c=e[l];s.insert(0,c.scope,c.parentScopes,c.fontStyle,i.getId(c.foreground),i.getId(c.background))}return new gr(i,a,s)}var xu=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Nu=Object.freeze([]),nn=class Fi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,o,i){this.scopeDepth=t,this.parentScopes=r||Nu,this.fontStyle=n,this.foreground=o,this.background=i}clone(){return new Fi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,o=t.length;n<o;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),o!==0&&(this.background=o)}},Mu=class on{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,o=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[o]===">"&&o++,!(n>=t.parentScopes.length||o>=r.parentScopes.length);){const i=r.parentScopes[o].length-t.parentScopes[n].length;if(i!==0)return i;n++,o++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),o,i;if(n===-1?(o=t,i=""):(o=t.substring(0,n),i=t.substring(n+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(on._cmpBySpecificity),r}insert(t,r,n,o,i,a){if(r===""){this._doInsertHere(t,n,o,i,a);return}let s=r.indexOf("."),l,u;s===-1?(l=r,u=""):(l=r.substring(0,s),u=r.substring(s+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new on(this._mainRule.clone(),nn.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(t+1,u,n,o,i,a)}_doInsertHere(t,r,n,o,i){if(r===null){this._mainRule.acceptOverwrite(t,n,o,i);return}for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let l=this._rulesWithParentScopes[a];if($i(l.parentScopes,r)===0){l.acceptOverwrite(t,n,o,i);return}}n===-1&&(n=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new nn(t,r,n,o,i))}},Et=class Me{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Me.getLanguageId(t),n=Me.getTokenType(t),o=Me.getFontStyle(t),i=Me.getForeground(t),a=Me.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,o,i,a,s){let l=Me.getLanguageId(t),u=Me.getTokenType(t),c=Me.containsBalancedBrackets(t)?1:0,d=Me.getFontStyle(t),h=Me.getForeground(t),f=Me.getBackground(t);return r!==0&&(l=r),n!==8&&(u=n),o!==null&&(c=o?1:0),i!==-1&&(d=i),a!==0&&(h=a),s!==0&&(f=s),(l<<0|u<<8|c<<10|d<<11|h<<15|f<<24)>>>0}};function _r(e,t){const r=[],n=Vu(e);let o=n.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=n.next()}let u=a();if(r.push({matcher:u,priority:l}),o!==",")break;o=n.next()}return r;function i(){if(o==="-"){o=n.next();const l=i();return u=>!!l&&!l(u)}if(o==="("){o=n.next();const l=s();return o===")"&&(o=n.next()),l}if(ko(o)){const l=[];do l.push(o),o=n.next();while(ko(o));return u=>t(l,u)}return null}function a(){const l=[];let u=i();for(;u;)l.push(u),u=i();return c=>l.every(d=>d(c))}function s(){const l=[];let u=a();for(;u&&(l.push(u),o==="|"||o===",");){do o=n.next();while(o==="|"||o===",");u=a()}return c=>l.some(d=>d(c))}}function ko(e){return!!e&&!!e.match(/[\w\.:]+/)}function Vu(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function Hi(e){typeof e.dispose=="function"&&e.dispose()}var Bt=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},$u=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ju=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Bu=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bt(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new ju;for(const r of e)Uu(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Bt){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Uu(e,t,r,n){const o=r.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=r.lookup(t);e instanceof Bt?hr({baseGrammar:i,selfGrammar:o},n):an(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},n);const a=r.injections(e.scopeName);if(a)for(const s of a)n.add(new Bt(s))}function an(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];yr([n],t,r)}}function hr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yr(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const o=n.repository?Ni({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&yr(n.patterns,{...t,repository:o},r);const i=n.include;if(!i)continue;const a=zi(i);switch(a.kind){case 0:hr({...t,selfGrammar:t.baseGrammar},r);break;case 1:hr(t,r);break;case 2:an(a.ruleName,{...t,repository:o},r);break;case 3:case 4:const s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const l={baseGrammar:t.baseGrammar,selfGrammar:s,repository:o};a.kind===4?an(a.ruleName,l,r):hr(l,r)}else a.kind===4?r.add(new $u(a.scopeName,a.ruleName)):r.add(new Bt(a.scopeName));break}}}var Fu=class{kind=0},Hu=class{kind=1},zu=class{constructor(e){this.ruleName=e}kind=2},Gu=class{constructor(e){this.scopeName=e}kind=3},Wu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zi(e){if(e==="$base")return new Fu;if(e==="$self")return new Hu;const t=e.indexOf("#");if(t===-1)return new Gu(e);if(t===0)return new zu(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new Wu(r,n)}}var qu=/\\(\d+)/,xo=/\\(\d+)/g,Ku=-1,Gi=-2;var Yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=ar.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ar.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Mi(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ar.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ar.replaceCaptures(this._contentName,e,t)}},Yu=class extends Yt{retokenizeCapturedWithRuleId;constructor(e,t,r,n,o){super(e,t,r,n),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},Ju=class extends Yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,null),this._match=new Ut(n,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},No=class extends Yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,n),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ln=class extends Yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o,i,a,s,l,u){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this._end=new Ut(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vr=class extends Yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,o,i,a,s,l){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=new Ut(a,Gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ft,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Wi=class Le{static createCaptureRule(t,r,n,o,i){return t.registerRule(a=>new Yu(r,a,n,o,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(o=>{if(t.id=o,t.match)return new Ju(t.$vscodeTextmateLocation,t.id,t.name,t.match,Le._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Ni({},n,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new No(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Le._compilePatterns(i,r,n))}return t.while?new vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Le._compileCaptures(t.whileCaptures||t.captures,r,n),Le._compilePatterns(t.patterns,r,n)):new ln(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Le._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Le._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);s>i&&(i=s)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);let l=0;t[a].patterns&&(l=Le.getCompiledRuleId(t[a],r,n)),o[s]=Le.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return o}static _compilePatterns(t,r,n){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const s=t[i];let l=-1;if(s.include){const u=zi(s.include);switch(u.kind){case 0:case 1:l=Le.getCompiledRuleId(n[s.include],r,n);break;case 2:let c=n[u.ruleName];c&&(l=Le.getCompiledRuleId(c,r,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=r.getExternalGrammar(d,n);if(f)if(h){let g=f.repository[h];g&&(l=Le.getCompiledRuleId(g,r,f.repository))}else l=Le.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Le.getCompiledRuleId(s,r,n);if(l!==-1){const u=r.getRule(l);let c=!1;if((u instanceof No||u instanceof ln||u instanceof vr)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ut=class qi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let o=0,i=[],a=!1;for(let s=0;s<n;s++)if(t.charAt(s)==="\\"&&s+1<n){const u=t.charAt(s+1);u==="z"?(i.push(t.substring(o,s)),i.push("$(?!\\n)(?<!\\n)"),o=s+2):(u==="A"||u==="G")&&(a=!0),s++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,n)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=qu.test(this.source):this.hasBackReferences=!1}clone(){return new qi(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(o=>t.substring(o.start,o.end));return xo.lastIndex=0,this.source.replace(xo,(o,i)=>ji(n[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],o=[],i,a,s,l;for(i=0,a=this.source.length;i<a;i++)s=this.source.charAt(i),t[i]=s,r[i]=s,n[i]=s,o[i]=s,s==="\\"&&i+1<a&&(l=this.source.charAt(i+1),l==="A"?(t[i+1]="",r[i+1]="",n[i+1]="A",o[i+1]="A"):l==="G"?(t[i+1]="",r[i+1]="G",n[i+1]="",o[i+1]="G"):(t[i+1]=l,r[i+1]=l,n[i+1]=l,o[i+1]=l),i++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:o.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ft=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Mo(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(o=>o.resolveAnchors(t,r));return new Mo(e,n,this._items.map(o=>o.ruleId))}},Mo=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
6
6
|
`)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Kr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xu=class sn{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new Kr(t,8),this._embeddedLanguagesMatcher=new Qu(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?sn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Kr(0,0);_getBasicScopeAttributes=new Bi(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new Kr(r,n)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(sn.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Qu=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>ji(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Vo=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ki(e,t,r,n,o,i,a,s){const l=t.content.length;let u=!1,c=-1;if(a){const f=Zu(e,t,r,n,o,i);o=f.stack,n=f.linePos,r=f.isFirstLine,c=f.anchorPosition}const d=Date.now();for(;!u;){if(s!==0&&Date.now()-d>s)return new Vo(o,!0);h()}return new Vo(o,!1);function h(){const f=ec(e,t,r,n,o,c);if(!f){i.produce(o,l),u=!0;return}const g=f.captureIndices,S=f.matchedRuleId,b=g&&g.length>0?g[0].end>n:!1;if(S===Ku){const w=o.getRule(e);i.produce(o,g[0].start),o=o.withContentNameScopesList(o.nameScopesList),xt(e,t,r,o,i,w.endCaptures,g),i.produce(o,g[0].end);const P=o;if(o=o.parent,c=P.getAnchorPos(),!b&&P.getEnterPos()===n){o=P,i.produce(o,l),u=!0;return}}else{const w=e.getRule(S);i.produce(o,g[0].start);const P=o,L=w.getName(t.content,g),D=o.contentNameScopesList.pushAttributed(L,e);if(o=o.push(S,n,c,g[0].end===l,null,D,D),w instanceof ln){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.endHasBackReferences&&(o=o.withEndRule(k.getEndWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),u=!0;return}}else if(w instanceof vr){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.whileHasBackReferences&&(o=o.withEndRule(k.getWhileWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),u=!0;return}}else if(xt(e,t,r,o,i,w.captures,g),i.produce(o,g[0].end),o=o.pop(),!b){o=o.safePop(),i.produce(o,l),u=!0;return}}g[0].end>n&&(n=g[0].end,r=!1)}}function Zu(e,t,r,n,o,i){let a=o.beginRuleCapturedEOL?0:-1;const s=[];for(let l=o;l;l=l.pop()){const u=l.getRule(e);u instanceof vr&&s.push({rule:u,stack:l})}for(let l=s.pop();l;l=s.pop()){const{ruleScanner:u,findOptions:c}=nc(l.rule,e,l.stack.endRule,r,n===a),d=u.findNextMatchSync(t,n,c);if(d){if(d.ruleId!==Gi){o=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(l.stack,d.captureIndices[0].start),xt(e,t,r,l.stack,i,l.rule.whileCaptures,d.captureIndices),i.produce(l.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{o=l.stack.pop();break}}return{stack:o,linePos:n,anchorPosition:a,isFirstLine:r}}function ec(e,t,r,n,o,i){const a=tc(e,t,r,n,o,i),s=e.getInjections();if(s.length===0)return a;const l=rc(s,e,t,r,n,o,i);if(!l)return a;if(!a)return l;const u=a.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:a}function tc(e,t,r,n,o,i){const a=o.getRule(e),{ruleScanner:s,findOptions:l}=Yi(a,e,o.endRule,r,n===i),u=s.findNextMatchSync(t,n,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function rc(e,t,r,n,o,i,a){let s=Number.MAX_VALUE,l=null,u,c=0;const d=i.contentNameScopesList.getScopeNames();for(let h=0,f=e.length;h<f;h++){const g=e[h];if(!g.matcher(d))continue;const S=t.getRule(g.ruleId),{ruleScanner:b,findOptions:w}=Yi(S,t,null,n,o===a),P=b.findNextMatchSync(r,o,w);if(!P)continue;const L=P.captureIndices[0].start;if(!(L>=s)&&(s=L,l=P.captureIndices,u=P.ruleId,c=g.priority,s===o))break}return l?{priorityMatch:c===-1,captureIndices:l,matchedRuleId:u}:null}function Yi(e,t,r,n,o){return{ruleScanner:e.compileAG(t,r,n,o),findOptions:0}}function nc(e,t,r,n,o){return{ruleScanner:e.compileWhileAG(t,r,n,o),findOptions:0}}function xt(e,t,r,n,o,i,a){if(i.length===0)return;const s=t.content,l=Math.min(i.length,a.length),u=[],c=a[0].end;for(let d=0;d<l;d++){const h=i[d];if(h===null)continue;const f=a[d];if(f.length===0)continue;if(f.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=f.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,f.start):o.produce(n,f.start),h.retokenizeCapturedWithRuleId){const S=h.getName(s,a),b=n.contentNameScopesList.pushAttributed(S,e),w=h.getContentName(s,a),P=b.pushAttributed(w,e),L=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,b,P),D=e.createOnigString(s.substring(0,f.end));Ki(e,D,r&&f.start===0,f.start,L,o,!1,0),Hi(D);continue}const g=h.getName(s,a);if(g!==null){const b=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(g,e);u.push(new oc(b,f.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var oc=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ic(e,t,r,n,o,i,a,s){return new lc(e,t,r,n,o,i,a,s)}function $o(e,t,r,n,o){const i=_r(t,Er),a=Wi.getCompiledRuleId(r,n,o.repository);for(const s of i)e.push({debugSelector:t,matcher:s.matcher,ruleId:a,grammar:o,priority:s.priority})}function Er(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let o=r;o<t.length;o++)if(ac(t[o],n))return r=o+1,!0;return!1})}function ac(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var lc=class{constructor(e,t,r,n,o,i,a,s){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new Xu(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=jo(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const l of Object.keys(o)){const u=_r(l,Er);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:o[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const o=n.injections;if(o)for(let a in o)$o(t,a,o[a],this,n);const i=this._grammarRepository.injections(r);i&&i.forEach(a=>{const s=this.getExternalGrammar(a);if(s){const l=s.injectionSelector;l&&$o(t,l,s,this,s)}})}return t.sort((o,i)=>o.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=jo(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=Wi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===un.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=Et.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=Mt.createRootAndLookUpScopeName(h,d,this):f=Mt.createRoot("unknown",d),t=new un(null,this._rootId,-1,-1,!1,null,f,f)}else o=!1,t.reset();e=e+`
|
|
7
7
|
`;const i=this.createOnigString(e),a=i.content.length,s=new uc(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Ki(this,i,o,0,t,s,!0,n);return Hi(i),{lineLength:a,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function jo(e,t){return e=Pu(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Mt=class Fe{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,o=t?.scopePath??null;for(const i of r)o=qr.push(o,i.scopeNames),n=new Fe(n,o,i.encodedTokenAttributes);return n}static createRoot(t,r){return new Fe(null,new qr(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const o=n.getMetadataForScope(t),i=new qr(null,t),a=n.themeProvider.themeMatch(i),s=Fe.mergeAttributes(r,o,a);return new Fe(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Fe.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let o=-1,i=0,a=0;return n!==null&&(o=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Et.set(t,r.languageId,r.tokenType,null,o,i,a)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Fe._pushAttributed(this,t,r);const n=t.split(/ /g);let o=this;for(const i of n)o=Fe._pushAttributed(o,i,r);return o}static _pushAttributed(t,r,n){const o=n.getMetadataForScope(r),i=t.scopePath.push(r),a=n.themeProvider.themeMatch(i),s=Fe.mergeAttributes(t.tokenAttributes,o,a);return new Fe(t,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},un=class lt{constructor(t,r,n,o,i,a,s,l){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new lt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:lt._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Mt.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){lt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,o,i,a,s){return new lt(this,t,r,n,o,i,a,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new lt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const n=Mt.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new lt(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Mt.fromExtension(n,r.contentNameScopesList))}},sc=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):_r(r,Er).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>_r(r,Er).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},uc=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(n=Et.set(n,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(n=Et.set(n,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,o=this._binaryTokens.length;n<o;n++)r[n]=this._binaryTokens[n];return r}},cc=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,ic(e,i,t,r,n,o,this,this._onigLib))}return this._grammars.get(e)}},dc=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new cc(gr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(gr.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new sc(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,o,i){const a=new Bu(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(s=>this._loadSingleGrammar(s.scopeName)),a.processQueue();return this._grammarForScopeName(t,r,n,o,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,o=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,o)}_grammarForScopeName(t,r=0,n=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(t,r,n,o,i)}},cn=un.NULL;const mc=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Jt{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Jt.prototype.normal={};Jt.prototype.property={};Jt.prototype.space=void 0;function Ji(e,t){const r={},n={};for(const o of e)Object.assign(r,o.property),Object.assign(n,o.normal);return new Jt(r,n,t)}function dn(e){return e.toLowerCase()}class De{constructor(t,r){this.attribute=r,this.property=t}}De.prototype.attribute="";De.prototype.booleanish=!1;De.prototype.boolean=!1;De.prototype.commaOrSpaceSeparated=!1;De.prototype.commaSeparated=!1;De.prototype.defined=!1;De.prototype.mustUseProperty=!1;De.prototype.number=!1;De.prototype.overloadedBoolean=!1;De.prototype.property="";De.prototype.spaceSeparated=!1;De.prototype.space=void 0;let fc=0;const W=dt(),pe=dt(),mn=dt(),A=dt(),le=dt(),yt=dt(),Ie=dt();function dt(){return 2**++fc}const fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:pe,commaOrSpaceSeparated:Ie,commaSeparated:yt,number:A,overloadedBoolean:mn,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Yr=Object.keys(fn);class Tn extends De{constructor(t,r,n,o){let i=-1;if(super(t,r),Bo(this,"space",o),typeof n=="number")for(;++i<Yr.length;){const a=Yr[i];Bo(this,Yr[i],(n&fn[a])===fn[a])}}}Tn.prototype.defined=!0;function Bo(e,t,r){r&&(e[t]=r)}function wt(e){const t={},r={};for(const[n,o]of Object.entries(e.properties)){const i=new Tn(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[dn(n)]=n,r[dn(i.attribute)]=n}return new Jt(t,r,e.space)}const Xi=wt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:le,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:A,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:le,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:pe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Qi(e,t){return t in e?e[t]:t}function Zi(e,t){return Qi(e,t.toLowerCase())}const hc=wt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:le,autoFocus:W,autoPlay:W,blocking:le,capture:null,charSet:null,checked:W,cite:null,className:le,cols:A,colSpan:null,content:null,contentEditable:pe,controls:W,controlsList:le,coords:A|yt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:mn,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:le,height:A,hidden:mn,high:A,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:le,itemRef:le,itemScope:W,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:A,pattern:null,ping:le,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:le,required:W,reversed:W,rows:A,rowSpan:A,sandbox:le,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:pe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Zi}),pc=wt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ie,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yt,g2:yt,glyphName:yt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:Ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ie,rev:Ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ie,requiredFeatures:Ie,requiredFonts:Ie,requiredFormats:Ie,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:Ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ie,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qi}),ea=wt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ta=wt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zi}),ra=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gc=/[A-Z]/g,Uo=/-[a-z]/g,_c=/^data[-\w.:]+$/i;function yc(e,t){const r=dn(t);let n=t,o=De;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&_c.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Uo,Ec);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Uo.test(i)){let a=i.replace(gc,vc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Tn}return new o(n,t)}function vc(e){return"-"+e.toLowerCase()}function Ec(e){return e.charAt(1).toUpperCase()}const Rc=Ji([Xi,hc,ea,ta,ra],"html"),na=Ji([Xi,pc,ea,ta,ra],"svg"),Fo={}.hasOwnProperty;function bc(e,t){const r=t||{};function n(o,...i){let a=n.invalid;const s=n.handlers;if(o&&Fo.call(o,e)){const l=String(o[e]);a=Fo.call(s,l)?s[l]:n.unknown}if(a)return a.call(this,o,...i)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const wc=/["&'<>`]/g,Sc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lc=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pc=/[|\\{}()[\]^$+*?.]/g,Ho=new WeakMap;function Tc(e,t){if(e=e.replace(t.subset?Cc(t.subset):wc,n),t.subset||t.escapeOnly)return e;return e.replace(Sc,r).replace(Lc,n);function r(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function n(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function Cc(e){let t=Ho.get(e);return t||(t=Ac(e),Ho.set(e,t)),t}function Ac(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(Pc,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Oc=/[\dA-Fa-f]/;function Dc(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!Oc.test(String.fromCharCode(t))?n:n+";"}const Ic=/\d/;function kc(e,t,r){const n="&#"+String(e);return r&&t&&!Ic.test(String.fromCharCode(t))?n:n+";"}const xc=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Jr={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Nc=["cent","copy","divide","gt","lt","not","para","times"],oa={}.hasOwnProperty,hn={};let lr;for(lr in Jr)oa.call(Jr,lr)&&(hn[Jr[lr]]=lr);const Mc=/[^\dA-Za-z]/;function Vc(e,t,r,n){const o=String.fromCharCode(e);if(oa.call(hn,o)){const i=hn[o],a="&"+i;return r&&xc.includes(i)&&!Nc.includes(i)&&(!n||t&&t!==61&&Mc.test(String.fromCharCode(t)))?a:a+";"}return""}function $c(e,t,r){let n=Dc(e,t,r.omitOptionalSemicolons),o;if((r.useNamedReferences||r.useShortestReferences)&&(o=Vc(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!o)&&r.useShortestReferences){const i=kc(e,t,r.omitOptionalSemicolons);i.length<n.length&&(n=i)}return o&&(!r.useShortestReferences||o.length<n.length)?o:n}function vt(e,t){return Tc(e,Object.assign({format:$c},t))}const jc=/^>|^->|<!--|-->|--!>|<!-$/g,Bc=[">"],Uc=["<",">"];function Fc(e,t,r,n){return n.settings.bogusComments?"<?"+vt(e.value,Object.assign({},n.settings.characterReferences,{subset:Bc}))+">":"<!--"+e.value.replace(jc,o)+"-->";function o(i){return vt(i,Object.assign({},n.settings.characterReferences,{subset:Uc}))}}function Hc(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function zo(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function zc(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function Gc(e){return e.join(" ").trim()}const Wc=/[ \t\n\f\r]/g;function Cn(e){return typeof e=="object"?e.type==="text"?Go(e.value):!1:Go(e)}function Go(e){return e.replace(Wc,"")===""}const ye=aa(1),ia=aa(-1),qc=[];function aa(e){return t;function t(r,n,o){const i=r?r.children:qc;let a=(n||0)+e,s=i[a];if(!o)for(;s&&Cn(s);)a+=e,s=i[a];return s}}const Kc={}.hasOwnProperty;function la(e){return t;function t(r,n,o){return Kc.call(e,r.tagName)&&e[r.tagName](r,n,o)}}const An=la({body:Jc,caption:Xr,colgroup:Xr,dd:ed,dt:Zc,head:Xr,html:Yc,li:Qc,optgroup:td,option:rd,p:Xc,rp:Wo,rt:Wo,tbody:od,td:qo,tfoot:id,th:qo,thead:nd,tr:ad});function Xr(e,t,r){const n=ye(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Cn(n.value.charAt(0)))}function Yc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Jc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Xc(e,t,r){const n=ye(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Qc(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="li"}function Zc(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ed(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Wo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function td(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function rd(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function nd(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function od(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function id(e,t,r){return!ye(r,t)}function ad(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function qo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ld=la({body:cd,colgroup:dd,head:ud,html:sd,tbody:md});function sd(e){const t=ye(e,-1);return!t||t.type!=="comment"}function ud(e){const t=new Set;for(const n of e.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(t.has(n.tagName))return!1;t.add(n.tagName)}const r=e.children[0];return!r||r.type==="element"}function cd(e){const t=ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function dd(e,t,r){const n=ia(r,t),o=ye(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function md(e,t,r){const n=ia(r,t),o=ye(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const sr={name:[[`
|
|
8
8
|
\f\r &/=>`.split(""),`
|
package/client/dist/index.html
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
/>
|
|
14
14
|
|
|
15
15
|
<title>API Doc</title>
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-DA78l2zr.js"></script>
|
|
17
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-Cy83rCXF.js">
|
|
18
18
|
<link rel="stylesheet" crossorigin href="./assets/index-BddYm5rR.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
@@ -202,12 +202,7 @@ class ApiDoc {
|
|
|
202
202
|
*/
|
|
203
203
|
middleware() {
|
|
204
204
|
const router = (0, express_1.Router)();
|
|
205
|
-
// 1.
|
|
206
|
-
// This is crucial for relative asset resolution
|
|
207
|
-
router.get(this.DOCS_PATH, (req, res) => {
|
|
208
|
-
res.redirect(301, req.originalUrl + "/");
|
|
209
|
-
});
|
|
210
|
-
// 2. Serve config.json
|
|
205
|
+
// 1. Serve config.json
|
|
211
206
|
router.get(`${this.DOCS_PATH}/config.json`, this.serveConfig.bind(this));
|
|
212
207
|
// 3. Serve static assets with explicit MIME types
|
|
213
208
|
router.use(`${this.DOCS_PATH}/assets`, (req, res, next) => {
|
|
@@ -252,9 +247,12 @@ class ApiDoc {
|
|
|
252
247
|
const indexPath = path.join(this.clientPath, "index.html");
|
|
253
248
|
if (fs.existsSync(indexPath)) {
|
|
254
249
|
let html = fs.readFileSync(indexPath, "utf-8");
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
const
|
|
250
|
+
// Calculate the absolute base path for the documentation
|
|
251
|
+
// This makes the app portable even when mounted at a prefix
|
|
252
|
+
const mountPath = req.baseUrl || "";
|
|
253
|
+
const docsPath = this.DOCS_PATH.startsWith("/") ? this.DOCS_PATH : `/${this.DOCS_PATH}`;
|
|
254
|
+
const fullPath = (mountPath + docsPath).replace(/\/+$/, "");
|
|
255
|
+
const baseTag = `<base href="${fullPath}/">`;
|
|
258
256
|
// Insert or replace base tag
|
|
259
257
|
if (html.includes("<base ")) {
|
|
260
258
|
html = html.replace(/<base[^>]*>/i, baseTag);
|
|
@@ -262,7 +260,7 @@ class ApiDoc {
|
|
|
262
260
|
else {
|
|
263
261
|
html = html.replace(/<head>/i, `<head>${baseTag}`);
|
|
264
262
|
}
|
|
265
|
-
// Also ensure any absolute references in index.html are corrected
|
|
263
|
+
// Also ensure any absolute references in index.html are corrected
|
|
266
264
|
html = html.replace(/\/api-docs\/assets\//g, "assets/");
|
|
267
265
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
268
266
|
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|