diff --git a/404.html b/404.html index 4594efd..b5d70a6 100644 --- a/404.html +++ b/404.html @@ -13,8 +13,8 @@

ts-react-vike-start

React + Vike + TS

Tailwind CSS + ESLint + Prettier

Just another SSR-ready vite-react starter template with some sugar from my usual friends tailwind, lucide-icons and a strict linting setup. React 18 Streaming enabled (Server / Client) 🌊

Test the client-side navigation =>

404 Page Not Found

This page could not be found.

- - - + + + \ No newline at end of file diff --git a/assets/chunks/chunk-YdKTaHBu.js b/assets/chunks/chunk-IHE30XRr.js similarity index 99% rename from assets/chunks/chunk-YdKTaHBu.js rename to assets/chunks/chunk-IHE30XRr.js index bec8364..e6e9c27 100644 --- a/assets/chunks/chunk-YdKTaHBu.js +++ b/assets/chunks/chunk-IHE30XRr.js @@ -111,4 +111,4 @@ Error generating stack: `+o.message+` flex-nowrap bg-warning text-dark -`,hp=()=>X.jsxs("div",{children:[X.jsx(vp,{children:X.jsx(Wi,{"aria-label":"to-github",href:"https://github.com/richard-unterberg/ts-react-vike-start",external:!0,children:X.jsx(Vl,{icon:Xe.Github,size:32,className:"text-dark"})})}),X.jsxs("div",{className:"xs:block md:flex gap-6 mt-16 my-10 items-center",children:[X.jsx(Vl,{icon:Xe.MagnetIcon,className:"mx-auto mb-4 md:mx-0 text-warning",size:96}),X.jsxs("div",{className:"text-center md:text-left",children:[X.jsx("p",{className:"mb-5 font-mono",children:"ts-react-vike-start"}),X.jsx("h1",{className:"text-2xl md:text-3xl mb-2 font-bold",id:"typescript--react--vite",children:"React + Vike + TS"}),X.jsx("h2",{className:"font-normal mb-6",id:"feat-tailwind-css--eslint--prettier",children:"Tailwind CSS + ESLint + Prettier"})]})]}),X.jsx("p",{className:"mb-10",children:"Just another SSR-ready vite-react starter template with some sugar from my usual friends tailwind, lucide-icons and a strict linting setup. React 18 Streaming enabled (Server / Client) 🌊"}),X.jsx(mp,{})]}),gp=({pageContext:s,children:h})=>X.jsx(Mt.StrictMode,{children:X.jsx(Nd,{pageContext:s,children:X.jsx("div",{className:"max-w-4xl m-auto text-light font-sans",children:X.jsxs("div",{className:"relative container px-5 mx-auto text-white text-base",children:[X.jsx(hp,{}),X.jsx("div",{className:"page-portal",children:h}),X.jsx(Td,{})]})})})}),yp=s=>{const h=s.config.title;return typeof h=="string"?h:typeof h=="function"?h(s):"DON'T FORGET TO SET A TITLE in +config.h.ts"};let Ul;const wp=async s=>{const{Page:h,pageProps:d}=s;if(!h)throw new Error("Client-side render() hook expects pageContext.Page to be defined");const x=document.getElementById("react-root");if(!x)throw new Error("DOM element #react-root not found");s.isHydration||(document.title=yp(s));const P=X.jsx(gp,{pageContext:s,children:X.jsx(h,{...d})});s.isHydration?Ul=ba(x,P):(Ul||(Ul=ec(x)),Ul.render(P))},xp=Object.freeze(Object.defineProperty({__proto__:null,default:wp},Symbol.toStringTag,{value:"Module"})),kp=async()=>{console.log("Page transition start"),document.querySelector("body").classList.add("page-is-transitioning")},Ep=Object.freeze(Object.defineProperty({__proto__:null,default:kp},Symbol.toStringTag,{value:"Module"})),Sp=async()=>{console.log("Page transition end"),document.querySelector("body").classList.remove("page-is-transitioning")},Cp=Object.freeze(Object.defineProperty({__proto__:null,default:Sp},Symbol.toStringTag,{value:"Module"}));export{dp as B,ac as F,Vl as I,Ld as L,Xe as a,Ep as b,Cp as c,xp as i,X as j}; +`,hp=()=>X.jsxs("div",{children:[X.jsx(vp,{children:X.jsx(Wi,{"aria-label":"to-github",href:"https://github.com/richard-unterberg/ts-react-vike-start",external:!0,children:X.jsx(Vl,{icon:Xe.Github,size:32,className:"text-dark"})})}),X.jsxs("div",{className:"xs:block md:flex gap-6 mt-16 my-10 items-center",children:[X.jsx(Vl,{icon:Xe.MagnetIcon,className:"mx-auto mb-4 md:mx-0 text-warning",size:96}),X.jsxs("div",{className:"text-center md:text-left",children:[X.jsx("p",{className:"mb-5 font-mono",children:"ts-react-vike-start"}),X.jsx("h1",{className:"text-2xl md:text-3xl mb-2 font-bold",id:"typescript--react--vite",children:"React + Vike + TS"}),X.jsx("h2",{className:"font-normal mb-6",id:"feat-tailwind-css--eslint--prettier",children:"Tailwind CSS + ESLint + Prettier"})]})]}),X.jsx("p",{className:"mb-10",children:"Just another SSR-ready vite-react starter template with some sugar from my usual friends tailwind, lucide-icons and a strict linting setup. React 18 Streaming enabled (Server / Client) 🌊"}),X.jsx(mp,{})]}),gp=({pageContext:s,children:h})=>X.jsx(Mt.StrictMode,{children:X.jsx(Nd,{pageContext:s,children:X.jsx("div",{className:"max-w-4xl m-auto text-light font-sans",children:X.jsxs("div",{className:"relative container px-5 mx-auto text-white text-base",children:[X.jsx(hp,{}),X.jsx("div",{className:"page-portal",children:h}),X.jsx(Td,{})]})})})}),yp=s=>{const h=s.config.title;return typeof h=="string"?h:typeof h=="function"?h(s):"DON'T FORGET TO SET A TITLE in +config.h.ts"};let Ul;const wp=async s=>{const{Page:h,pageProps:d}=s;if(!h)throw new Error("Client-side render() hook expects pageContext.Page to be defined");const x=document.getElementById("react-root");if(!x)throw new Error("DOM element #react-root not found");s.isHydration||(document.title=yp(s));const P=X.jsx(gp,{pageContext:s,children:X.jsx(h,{...d})});s.isHydration?Ul=ba(x,P):(Ul||(Ul=ec(x)),Ul.render(P))},xp=Object.freeze(Object.defineProperty({__proto__:null,default:wp},Symbol.toStringTag,{value:"Module"})),kp=async()=>{console.log("Page transition start"),document.querySelector("body").classList.add("page-is-transitioning")},Ep=Object.freeze(Object.defineProperty({__proto__:null,default:kp},Symbol.toStringTag,{value:"Module"})),Sp=async()=>{console.log("Page transition end"),document.querySelector("body").classList.remove("page-is-transitioning")},Cp=Object.freeze(Object.defineProperty({__proto__:null,default:Sp},Symbol.toStringTag,{value:"Module"}));export{dp as B,ac as F,Vl as I,Ld as L,Ep as a,Cp as b,Xe as c,xp as i,X as j}; diff --git a/assets/entries/entry-client-routing.OIwUId-K.js b/assets/entries/entry-client-routing._8t991kZ.js similarity index 98% rename from assets/entries/entry-client-routing.OIwUId-K.js rename to assets/entries/entry-client-routing._8t991kZ.js index 059c895..fad4b55 100644 --- a/assets/entries/entry-client-routing.OIwUId-K.js +++ b/assets/entries/entry-client-routing._8t991kZ.js @@ -1,9 +1,9 @@ function fn(){return!(typeof process>"u"||!process.cwd||!process.versions||typeof process.versions.node>"u"||!process.release||process.release.name!=="node")}function Ee(e,t){let n;{var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0,n=new Error(e),Error.stackTraceLimit=r}return fn()&&(n.stack=dn(n.stack,t)),n}function dn(e,t){if(!e)return e;const n=hn(e);let r=0;return n.filter(o=>o.includes(" (internal/")||o.includes(" (node:internal")?!1:r1&&me(!1,ft,{onlyOnce:!0,showStackTrace:!0})}function mn(e){me(T.isClientRouting!==!1,pn,{onlyOnce:!0,showStackTrace:!0}),me(T.isClientRouting===void 0,ft,{onlyOnce:!0,showStackTrace:!0}),T.isClientRouting=!0,e&&(T.checkSingleInstance=!0),dt()}function yn(e){T.instances.push(e),dt()}function bn(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function me(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:o}=T,a=n===!0?i:n;if(o.has(a))return;o.add(a)}console.warn(r?new Error(i):i)}const wn="0.4.152",N={projectName:"Vike",projectVersion:wn,npmPackageName:"vike",githubRepository:"https://github.com/vikejs/vike"};yn(N.projectVersion);const p=new Proxy(e=>e,{get:()=>p}),E=C("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet}),Sn=`[${N.npmPackageName}]`,Pn=`[${N.npmPackageName}@${N.projectVersion}]`,Ce=2;function s(e,t){var a;if(e)return;const n=(()=>{if(!t)return null;const l=typeof t=="string"?t:JSON.stringify(t);return p.dim(`Debug info (for ${N.projectName} maintainers; you can ignore this): ${l}`)})(),r=`${N.githubRepository}/issues/new`;let i=[`You stumbled upon a bug in ${N.projectName}'s source code.`,`Go to ${p.blue(r)} and copy-paste this error; a maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=J(i),i=se(i,"Bug"),i=Y(i,!0);const o=Ee(i,Ce);throw(a=E.onBeforeLog)==null||a.call(E),o}function h(e,t,{showStackTrace:n}={}){var i;if(e)return;t=J(t),t=se(t,"Wrong Usage"),t=Y(t);const r=Ee(t,Ce);throw n&&E.showStackTraceList.add(r),(i=E.onBeforeLog)==null||i.call(E),r}function gt(e){return e=J(e),e=se(e,"Error"),e=Y(e),Ee(e,Ce)}function v(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(t=J(t),t=se(t,"Warning"),t=Y(t),n){const{alreadyLogged:o}=E,a=n===!0?t:n;if(o.has(a))return;o.add(a)}if((i=E.onBeforeLog)==null||i.call(E),r){const o=new Error(t);E.showStackTraceList.add(o),E.logger(o,"warn")}else E.logger(t,"warn")}}function $e(e,t,{onlyOnce:n}){var r;if(!e){if(t=J(t),t=Y(t),n){const{alreadyLogged:i}=E,o=t;if(i.has(o))return;i.add(o)}(r=E.onBeforeLog)==null||r.call(E),E.logger(t,"info")}}function se(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function J(e){return e.startsWith("[")?e:` ${e}`}function Y(e,t=!1){return`${t?Pn:Sn}${e}`}function W(){return typeof window<"u"&&typeof window.scrollY=="number"}const ht=C("utils/assertRouterType.ts",{});function M(){Rn(vn()),ht.isClientRouting=!0}function vn(){return ht.isClientRouting!==!1}function Rn(e){h(W(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),v(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}const En=["js","ts","cjs","cts","mjs","mts","jsx","tsx","cjsx","ctsx","mjsx","mtsx"],pt=["vue","svelte","marko","md","mdx"],_n=[...En,...pt];function mt(e){const t=_n.some(n=>e.endsWith("."+n));return s(!Cn(e)||t),t}function Cn(e){return/\.(c|m)?(j|t)sx?$/.test(e)}function $n(e){return pt.some(t=>e.endsWith("."+t))}function F(e,t,n){return typeof e=="string"?ze(e.split(""),t,n).join(""):ze(e,t,n)}function ze(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const a=e[i];s(a!==void 0),r.push(a),i++}return r}const yt=["http://","https://","tauri://"];function ke(e){return yt.some(t=>e.startsWith(t))||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function kn(e,t){s(t.includes(" but ")),h(typeof e=="string",`${t} should be a string`),!ke(e)&&(!e.startsWith("/")&&!e.includes(":")?h(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):h(!1,`${t} isn't a valid URL`))}function K(e,t){s(ke(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":ye(i.slice(1)),[a,...l]=n.split("?");s(a!==void 0);const u=["",...l].join("?")||null;s(u===null||u.startsWith("?"));const c={},g={};Array.from(new URLSearchParams(u||"")).forEach(([$,X])=>{c[$]=X,g[$]=[...g.hasOwnProperty($)?g[$]:[],X]});const{origin:f,pathname:d}=Tn(a,t);s(f===null||f===ye(f)),s(d.startsWith("/")),s(f===null||e.startsWith(f));const m=a.slice((f||"").length);An(e,f,m,u,i);let{pathname:S,hasBaseServer:k}=In(d,t);return S=On(S),s(S.startsWith("/")),{origin:f,pathname:S,pathnameOriginal:m,hasBaseServer:k,search:c,searchAll:g,searchOriginal:u,hash:o,hashOriginal:i}}function ye(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function On(e){return e=e.replace(/\s+$/,""),e=e.split("/").map(t=>ye(t).split("/").join("%2F")).join("/"),e}function Tn(e,t){var n;s(!e.includes("?")&&!e.includes("#"));{const{origin:r,pathname:i}=Ue(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{const r=typeof window<"u"?(n=window==null?void 0:window.document)==null?void 0:n.baseURI:void 0;let i;return r?i=Ue(r.split("?")[0]).pathname:i=t,{origin:null,pathname:Fn(e,i)}}}function Ue(e){if(yt.some(t=>e.startsWith(t))){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),a=["",...i].join("/")||"/";return{origin:o,pathname:a}}else return{pathname:e,origin:null}}function Fn(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const a in r){const l=r[a];l==""&&a==="0"||l!="."&&(l==".."?n.pop():(i=!1,n.push(l)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function xn(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function In(e,t){xn(e),s(Oe(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===F(t,0,-1)&&(r=F(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Oe(e){return e.startsWith("/")}function An(e,t,n,r,i){const o=jn(t,n,r,i);s(e===o)}function jn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function w(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function B(e){return e instanceof Function||typeof e=="function"}function ne(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function Ln(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function Nn(e){return j(t=>{const n=e(t);return n===null?null:!n})}function y(e,t,n="unknown"){if(!R(e))return!1;if(!(t in e))return n==="undefined";if(n==="unknown")return!0;const r=e[t];return n==="array"?Array.isArray(r):n==="object"?R(r):n==="string[]"?Array.isArray(r)&&r.every(i=>typeof i=="string"):n==="function"?B(r):Array.isArray(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="undefined"?r===void 0:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function A(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function Hn(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const Wn=e=>e!=null;function Ge(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function bt(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function fe(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Bn(e){return typeof e=="object"&&e!==null&&"then"in e&&B(e.then)}function Vn(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function Dn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}const zn=["clientRouting"];function Un(e){zn.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;h(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),h(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const wt=["render","clientRouting","prerender","doNotPrerender"];function Gn(e,t){h(!wt.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function Jn(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(l=>{i=`${i} { ${l}`,o=` }${o}`}),i+o}function Te(e,t,{definedAt:n}){const r=St(n,t),i=r==="internally"?r:`at ${r}`;let o=`${t}`;return`${e} ${p.cyan(o)} defined ${i}`}function St(e,t){if("isComputed"in e)return"internally";let n;return"files"in e?n=e.files:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:a}=i;let l=o;const u=Jn(a,t);return u&&(l=`${l} > ${p.cyan(u)}`),l}).join(" / ")}function D(e,t,n){const r=Mn(e,t);if(r===null)return null;const{value:i,definedAt:o}=r;return n&&Yn(i,n,t,o),r}function Yn(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=Vn(e),a=o!==null?`value ${p.cyan(o)}`:`type ${p.cyan(i)}`,u=`${Te("Config",n,{definedAt:r})} has an invalid ${a}: it should be a ${p.cyan(t)} instead`;h(!1,u)}function Mn(e,t){const n=e.configValues[t];return!n||n.value===null?null:n}function Pt(e,t){const n=t.find(r=>r.pageId===e);return s(t.length>0),s(n),n}function vt({definedAt:e}){if("isComputed"in e||"files"in e)return null;const{filePathToShowToUser:t}=e;return s(t),t}function Kn({definedAt:e}){const t=vt({definedAt:e});return s(t),t}function qn(e,t){const n={},r={},i={};e.forEach(l=>{Xn(l).forEach(({exportName:c,exportValue:g,isFromDefaultExport:f})=>{s(c!=="default"),i[c]=i[c]??[],i[c].push({exportValue:g,exportSource:`${l.filePath} > ${f?`\`export default { ${c} }\``:`\`export { ${c} }\``}`,filePath:l.filePath,_filePath:l.filePath,_fileType:l.fileType,_isFromDefaultExport:f})})}),t&&Object.entries(t.configValues).forEach(([l,u])=>{const{value:c}=u,g=vt(u),f=Te("Config",l,u);r[l]=r[l]??c,n[l]=n[l]??[],s(n[l].length===0),n[l].push({configValue:c,configDefinedAt:f,configDefinedByFile:g});const d=l;i[d]=i[d]??[],i[d].push({exportValue:c,exportSource:f,filePath:g,_filePath:g,_fileType:null,_isFromDefaultExport:null})});const o=Qn(),a={};return Object.entries(i).forEach(([l,u])=>{u.forEach(({exportValue:c,_fileType:g,_isFromDefaultExport:f})=>{a[l]=a[l]??c,g===".page"&&!f&&(l in o||(o[l]=c))})}),s(!("default"in a)),s(!("default"in i)),{config:r,configEntries:n,exports:a,exportsAll:i,pageExports:o}}function Xn(e){const{filePath:t,fileExports:n}=e;s(n),s(mt(t));const r=[];return Object.entries(n).sort(Nn(([i])=>i==="default")).forEach(([i,o])=>{let a=i==="default";if(a)if($n(t))i="Page";else{h(R(o),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([l,u])=>{Gn(l,t),r.push({exportName:l,exportValue:u,isFromDefaultExport:a})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:a})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&wt.includes(i)))}),r}function Qn(){return new Proxy({},{get(...e){return W()||v(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}function Zn(e){const t=".page.",n=F(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function z(e){bt(e)}function Rt(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(h(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=_e(e.map(({pageId:r})=>r).filter(r=>q(r)));if(h(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function q(e,t){return s(!e.includes("\\")),e.includes("/_error")}function er(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return q(e)}const tr=[".page",".page.server",".page.route",".page.client",".css"];function nr(e){if(bt(e),e.endsWith(".css"))return".css";s(mt(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function Et(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(Je(i.filePath)||rr(o,i.filePath)),n=nr(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:be(e),isRendererPageFile:n!==".css"&&be(e)&&Je(e),isErrorPageFile:q(e),pageId:Zn(e)};return i}function be(e){return z(e),q(e)?!1:e.includes("/_default")}function Je(e){return z(e),e.includes("/renderer/")}function rr(e,t){z(e),z(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(be(t));const n=F(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function ir(e){s(Array.isArray(e)),e.forEach(t=>{s(R(t)),s(y(t,"pageId","string")),s(y(t,"routeFilesystem")),s(y(t,"configValuesSerialized")),s(y(t,"configValuesImported"))})}function or(e){s(y(e,"configValuesImported"))}const sr=["$$registrations","_rerender_only"],ar=[".md",".mdx"];function lr(e,t,n){ur(e,t,n)}function ur(e,t,n){const i=Object.keys(e).filter(a=>!sr.includes(a)),o=i.filter(a=>a!=="default"&&a!==n);if(o.length===0){if(i.length===1)return;const a=p.cyan("export default"),l=p.cyan(`export { ${n} }`);if(i.length===0){let u=`${t} doesn't export any value, but it should have a ${a}`;n&&(u+=` or ${l}`),h(!1,u)}else s(i.length===2),v(!1,`${t} remove ${l} or ${a}`,{onlyOnce:!0})}else if(n){if(ar.some(a=>t.endsWith(a)))return;o.forEach(a=>{v(!1,`${t} should have only a single export: move ${p.cyan(`export { ${a} }`)} to +config.h.js or its own +${o}.js`,{onlyOnce:!0})})}else{const a=o.join(", ");h(!1,`${t} replace ${p.cyan(`export { ${a} }`)} with ${p.cyan(`export default { ${a} }`)}`)}}function we(e){const t={},n=(r,i,o,a)=>{t[r]={value:i,definedAt:{filePathToShowToUser:o,fileExportPathToShowToUser:[r,"default"].includes(a)?[]:[a]}},cr(i,r,o)};return e.forEach(r=>{if(r.isValueFile){const{exportValues:i,importPath:o,configName:a}=r;a!=="client"&&lr(i,o,a),Object.entries(i).forEach(([l,u])=>{const c=l!=="default",g=c?l:r.configName;c&&g in t||n(g,u,o,l)})}else{const{configName:i,importPath:o,exportValue:a,exportName:l}=r;n(i,a,o,l)}}),t}function cr(e,t,n){s(!n.includes("+config."))}const fr=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function ae(e){const t=JSON.parse(e);return _t(t)}function _t(e){return typeof e=="string"?dr(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=_t(n)}),e)}function dr(e){for(const{match:t,deserialize:n}of fr)if(t(e))return n(e,ae);return e}function Ct(e){const t={};return Object.entries(e).forEach(([n,r])=>{const{valueSerialized:i,definedAt:o}=r;s(i),s(!t[n]),t[n]={value:ae(i),definedAt:o}}),t}function gr(e,t){const n=e.map(i=>{const o={};{const{configValuesSerialized:g}=i,f=Ct(g);Object.assign(o,f)}{const{configValuesImported:g}=i,f=we(g);Object.assign(o,f)}const{pageId:a,isErrorPage:l,routeFilesystem:u,loadConfigValuesAll:c}=i;return hr(o),{pageId:a,isErrorPage:l,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=we(t.configValuesImported);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function hr(e){const t="route",n=e[t];if(!n)return;const{value:r}=n,i=typeof r,o=Te("Config",t,n);h(i==="string"||B(r),`${o} has an invalid type '${i}': it should be a string or a function instead, see https://vike.dev/route`)}function pr(e){s(y(e,"isGeneratedFile")),s(e.isGeneratedFile!==!1,"vike was re-installed(/re-built). Restart your app."),s(e.isGeneratedFile===!0,`\`isGeneratedFile === ${e.isGeneratedFile}\``),s(y(e,"pageFilesLazy","object")),s(y(e,"pageFilesEager","object")),s(y(e,"pageFilesExportNamesLazy","object")),s(y(e,"pageFilesExportNamesEager","object")),s(y(e.pageFilesLazy,".page")),s(y(e.pageFilesLazy,".page.client")||y(e.pageFilesLazy,".page.server")),s(y(e,"pageFilesList","string[]")),s(y(e,"pageConfigsSerialized")),s(y(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;ir(t),or(n);const{pageConfigs:r,pageConfigGlobal:i}=gr(t,n),o={};Q(e.pageFilesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;Ye(g),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await g(),Un(u))}}),Q(e.pageFilesExportNamesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;Ye(g),u.loadExportNames=async()=>{if(!("exportNames"in u)){const f=await g();h("exportNames"in f,"You seem to be using Vite 2 but the latest vike versions only work with Vite 3"),s(y(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}}}),Q(e.pageFilesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;s(R(g)),u.fileExports=g}),Q(e.pageFilesExportNamesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;s(R(g)),s(y(g,"exportNames","string[]"),u.filePath),u.exportNames=g.exportNames}),e.pageFilesList.forEach(l=>{o[l]=o[l]??Et(l)});const a=Object.values(o);return a.forEach(({filePath:l})=>{s(!l.includes("\\"))}),{pageFiles:a,pageConfigs:r,pageConfigGlobal:i}}function Q(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(tr.includes(n)),s(R(r)),Object.entries(r).forEach(([i,o])=>{const a=Et(i);s(a.fileType===n),t.push({filePath:i,pageFile:a,globValue:o})})}),t}function Ye(e){s(B(e))}const x=C("setPageFiles.ts",{});function mr(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=pr(e);x.pageFilesAll=t,x.pageConfigs=n,x.pageConfigGlobal=r}async function yr(e,t){e?(s(!x.pageFilesGetter),s(t===void 0)):(s(x.pageFilesGetter),s(typeof t=="boolean"),(!x.pageFilesAll||!t)&&await x.pageFilesGetter());const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=x;s(n&&r&&i);const o=br(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function br(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=_e(n),i=t.map(o=>o.pageId);return[...r,...i]}function Fe(e,t){return kt(e,t,!0)}function $t(e,t){return kt(e,t,!1)}function kt(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(m=>m.isRelevant(t)&&m.fileType!==".page.route").sort(wr(n,t)),o=m=>{const S=i.filter($=>$.pageId===t&&$.isEnv(m?"CLIENT_AND_SERVER":r));h(S.length<=1,`Merge the following files into a single file: ${S.map($=>$.filePath).join(" ")}`);const k=S[0];return s(k===void 0||!k.isDefaultPageFile),k},a=o(!1),l=o(!0),u=m=>i.filter(S=>S.isRendererPageFile&&S.isEnv(m?"CLIENT_AND_SERVER":r))[0],c=u(!1),g=u(!0),f=i.filter(m=>m.isDefaultPageFile&&!m.isRendererPageFile&&(m.isEnv(r)||m.isEnv("CLIENT_AND_SERVER")));return[a,l,...f,c,g].filter(Wn)}function wr(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(a,l)=>{if(!a.isDefaultPageFile&&l.isDefaultPageFile)return r;if(!l.isDefaultPageFile&&a.isDefaultPageFile)return i;{const u=a.isRendererPageFile,c=l.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=Me(t,a.filePath),c=Me(t,l.filePath);if(u0){const o=document.getElementsByTagName("link");i=Promise.all(n.map(a=>{if(a=Pr(a),a in Ke)return;Ke[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(!!r)for(let f=o.length-1;f>=0;f--){const d=o[f];if(d.href===a&&(!l||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":Sr,l||(g.as="script",g.crossOrigin=""),g.href=a,document.head.appendChild(g),l)return new Promise((f,d)=>{g.addEventListener("load",f),g.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},xe={},Ot={},vr={},le={},Rr=[],Tt={},Er=!0,_r=[{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:()=>de(()=>import("./pages_index.FevcZLva.js"),__vite__mapDeps([0,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]},{pageId:"/pages/features",isErrorPage:void 0,routeFilesystem:{routeString:"/features",definedBy:"/pages/features/"},loadConfigValuesAll:()=>de(()=>import("./pages_features.FWzRNCzS.js"),__vite__mapDeps([3,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]},{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:()=>de(()=>import("./pages_error.gBrDUOP9.js"),__vite__mapDeps([4,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]}],Cr={configValuesImported:[]},$r=Object.assign({}),kr={...$r};xe[".page"]=kr;const Or=Object.assign({}),Tr={...Or};le[".page"]=Tr;const Fr=Object.assign({}),xr={...Fr};le[".page.server"]=xr;const Ir=Object.assign({}),Ar={...Ir};Ot[".page.route"]=Ar;const jr=Object.assign({}),Lr={...jr};xe[".page.client"]=Lr;const Nr=Object.assign({}),Hr={...Nr};le[".page.client"]=Hr;const Wr=Object.assign({}),Br={...Wr};Tt[".page.server"]=Br;const Vr=Object.freeze(Object.defineProperty({__proto__:null,isGeneratedFile:Er,neverLoaded:Tt,pageConfigGlobalSerialized:Cr,pageConfigsSerialized:_r,pageFilesEager:Ot,pageFilesExportNamesEager:le,pageFilesExportNamesLazy:vr,pageFilesLazy:xe,pageFilesList:Rr},Symbol.toStringTag,{value:"Module"}));mr(Vr);function Ft(){s(W())}function Dr(){Ft(),M()}function zr(){Ft()}function qe(e){const t=e/1e3;if(t<120){const n=Xe(t);return`${n} second${Qe(n)}`}{const n=t/60,r=Xe(n);return`${r} minute${Qe(r)}`}}function Xe(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function Qe(e){return e==="1"?"":"s"}const Ur=C("utils/executeHook.ts",{userHookErrors:new Map});function H(e,t){const{hookName:n,hookFilePath:r,hookTimeout:{error:i,warning:o}}=t;let a,l;const u=new Promise((d,m)=>{a=S=>{c(),d(S)},l=S=>{c(),m(S)}}),c=()=>{g&&clearTimeout(g),f&&clearTimeout(f)},g=Ze(o)&&setTimeout(()=>{v(!1,`The ${n}() hook defined by ${r} is slow: it's taking more than ${qe(o)} (https://vike.dev/hooksTimeout)`,{onlyOnce:!1})},o),f=Ze(i)&&setTimeout(()=>{const d=gt(`The ${n}() hook defined by ${r} timed out: it didn't finish after ${qe(i)} (https://vike.dev/hooksTimeout)`);l(d)},i);return(async()=>{try{const d=await e();a(d)}catch(d){R(d)&&Ur.userHookErrors.set(d,{hookName:n,hookFilePath:r}),l(d)}})(),u}function Ze(e){return!!e&&e!==1/0}function Ie(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=K(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}zr();function Gr(){var r,i,o,a;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((a=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&a.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function xt(e,t){const n=Object.keys,r=typeof e;return e&&t&&r==="object"&&r===typeof t?n(e).length===n(t).length&&n(e).every(o=>xt(e[o],t[o])):e===t}function Jr(e,t){return R(e)&&R(t)&&e.constructor===t.constructor&&xt({...e,stack:null},{...t,stack:null})&&t.message===t.message}function re(e){window.location.href=e}function Yr(e){return new Promise(t=>setTimeout(t,e))}function Mr(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function It(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function Kr(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function qr(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}Dr();const Se=C("history.ts",{});function At(){let e=window.history.state;e||(e={});let t=!1;"timestamp"in e||(t=!0,e.timestamp=Le()),"scrollPosition"in e||(t=!0,e.scrollPosition=je()),"triggedBy"in e||(e.triggedBy="browser"),jt(e),t&&Ne(e)}function Ae(){const e=window.history.state||{};return jt(e),e}function je(){return{x:window.scrollX,y:window.scrollY}}function Le(){return new Date().getTime()}function et(){const e=je(),t=Ae();Ne({...t,scrollPosition:e})}function Xr(e,t){if(t)Ne(Ae(),e);else{const n=Le();Qr({timestamp:n,scrollPosition:null,triggedBy:"vike"},e)}}function jt(e){if(s(R(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(y(t,"x","number")&&y(t,"y","number"))}}function Ne(e,t){window.history.replaceState(e,"",t??null)}function Qr(e,t){Lt(e,"",t)}function Zr(){Se.pushStateOriginal=Se.pushStateOriginal??window.history.pushState,window.history.pushState=(e={},...t)=>{h(e==null||R(e),"history.pushState(state) argument state must be an object");const n={scrollPosition:je(),timestamp:Le(),...e,triggedBy:"user"};return Lt(n,...t)}}function Lt(...e){Se.pushStateOriginal.apply(history,e)}function ei(){const e="vike_pageContext",t=document.getElementById(e);h(t,`Couldn't find #${e} (which Vike automatically injects in the HTML): make sure it exists (i.e. don't remove it and make sure your HTML isn't malformed)`);const n=t.textContent;s(n);const r=ae(n);return s(y(r,"_pageId","string")),w(r,{_hasPageContextFromServer:!0}),r}async function ti(e,t){const r=$t(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function I(e,t){if(!(t in e.exports))return null;const{hooksTimeout:n}=e.config,r=ri(n,t),i=e.exports[t],o=e.exportsAll[t][0];if(s(o.exportValue===i),i===null)return null;const a=o.filePath;return s(a),s(!a.endsWith(" ")),Nt(i,{hookName:t,hookFilePath:a}),{hookFn:i,hookName:t,hookFilePath:a,hookTimeout:r}}function ni(e,t){const n=e.configValues[t];if(!n)return null;const r=n.value;if(!r)return null;const i=Kn(n);s(i),Nt(r,{hookName:t,hookFilePath:i});const o=ue(t);return{hookFn:r,hookName:t,hookFilePath:i,hookTimeout:o}}function ge(e,t){I(e,t)}function Nt(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),h(B(e),`Hook ${t}() defined by ${n} should be a function`)}function ri(e,t){const n=ii(e);if(n===!1)return{error:!1,warning:!1};const r=n[t],i=ue(t);return(r==null?void 0:r.error)!==void 0&&(i.error=r.error),(r==null?void 0:r.warning)!==void 0&&(i.warning=r.warning),i}function ii(e){if(e===void 0)return{};if(e===!1)return!1;h(R(e),`Setting ${p.cyan("hooksTimeout")} should be ${p.cyan("false")} or an object`);const t={};return Object.entries(e).forEach(([n,r])=>{if(r===!1){t[n]={error:!1,warning:!1};return}h(R(r),`Setting ${p.cyan(`hooksTimeout.${n}`)} should be ${p.cyan("false")} or an object`);const[i,o]=["error","warning"].map(a=>{const l=r[a];if(l===void 0||l===!1)return l;const u=`Setting ${p.cyan(`hooksTimeout.${n}.${a}`)} should be`;return h(typeof l=="number",`${u} ${p.cyan("false")} or a number`),h(l>0,`${u} a positive number`),l});t[n]={error:i,warning:o}}),t}function ue(e){return e==="onBeforeRoute"?{error:5*1e3,warning:1*1e3}:e==="onPrerenderStart"||e==="onBeforePrerenderStart"||e==="onBeforePrerender"||e==="prerender"?{error:10*60*1e3,warning:30*1e3}:{error:30*1e3,warning:4*1e3}}function oi(e){const t=Object.entries(e);for(const n in e)delete e[n];t.sort(([n],[r])=>Hn(n,r)).forEach(([n,r])=>{e[n]=r})}function si(e){ai(e),li(e)}function ai(e){er(e._pageId,e._pageConfigs)&&s(y(e,"is404","boolean"))}function li(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!R(t)){v(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const ui="not-serializable",ie=C("getPageContextProxyForUser.ts",{});function ci(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=JSON.stringify(n);return h(r!==ui,`pageContext[${i}] couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),fi(e,n),r}})}function fi(e,t){if(ie.prev===t||ie.prev==="__v_raw"||(hi(t),t in e)||gi(t))return;const n=JSON.stringify(t);e._hasPageContextFromServer&&!e._hasPageContextFromClient&&h(!1,`pageContext[${n}] isn't available on the client-side because ${n} is missing in passToClient, see https://vike.dev/passToClient`)}const di=["then","toJSON"];function gi(e){return!!(di.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function hi(e){ie.prev=e,window.setTimeout(()=>{ie.prev=void 0},0)}function He(e,t){if(t){const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}else{const i=e;s(i.isHydration===!0),s(i.isBackwardNavigation===null)}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(R(e.pageExports));const n=e.exports.Page;w(e,{Page:n}),pi(e),oi(e);const r=ci(e);return si(e),r}function pi(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}function Ht(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function mi(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll();{const{configValuesImported:r}=n,i=we(r);Object.assign(e.configValues,i)}{const{configValuesSerialized:r}=n,i=Ct(r);Object.assign(e.configValues,i)}return w(e,{isAllLoaded:!0}),e}const Wt="__whileFetchingAssets";async function We(e,t){const n=Fe(t._pageFilesAll,e),r=Ht(t._pageConfigs,e);let i;const o=!1;try{i=(await Promise.all([r&&mi(r,o),...n.map(m=>{var S;return(S=m.loadFile)==null?void 0:S.call(m)})]))[0]}catch(d){throw yi(d)&&Object.assign(d,{[Wt]:!0}),d}const{config:a,configEntries:l,exports:u,exportsAll:c,pageExports:g}=qn(n,i);return{config:a,configEntries:l,exports:u,exportsAll:c,pageExports:g,_pageFilesLoaded:n}}function Be(e){return e?e[Wt]===!0:!1}function yi(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}const tt=["urlPathname","urlParsed"],bi=["Page","pageExports","exports"];function Bt(e){[...bi,...tt].forEach(n=>{n in e&&(tt.includes(n)?(s(n.startsWith("url")),v(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):v(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const wi="/";function Si(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=K(e,wi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const a=r.endsWith("/");let l;return n&&r!=="/"?(a?l=F(r,0,-1):l=r,s(!l.endsWith("/"),{url:e}),s(l!=="")):l=r+(a?"":"/")+"index",s(l),l=l+t,`${l}${i||""}${o||""}`}const Pi=".pageContext.json",vi=!1;function Ri(e){return Si(e,Pi,vi)}function Vt(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${p.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;h(R(e),`${r} should be an object (but it's ${p.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),h(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${p.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),v(!("_pageId"in e),`${r} sets ${p.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),h(!("is404"in e),`${r} sets ${p.cyan("pageContext.is404")} which is forbidden, use ${p.cyan("throw render()")} instead, see https://vike.dev/render`)}function Ei(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);h(r.length===0,[n,"returned an object with following unknown keys:",Ge(r)+".","Only following keys are allowed:",Ge(t)+"."].join(" "))}function _i(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;h(A(e),`${n} should return a plain JavaScript object, ${p.cyan("undefined")}, or ${p.cyan("null")}`),Ei(e,["pageContext"],n),e.pageContext&&Vt(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function Ci(e,t){if(!A(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function $i(e){return typeof e=="object"&&e!==null&&Object.values(e).every(t=>typeof t=="string")}function ki(e,t,n=r=>r){if(s(e.length>0),e.length===1)return n(e[0]);const r=e.slice(0,e.length-1),i=e[e.length-1];return r.map(n).join(", ")+` ${t} `+n(i)}W()&&M();async function Oi(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=Ti(e._pageId,e._pageFilesAll)):n=I(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const a=await H(()=>r(i),n);h(a===void 0,`The guard() hook of ${n.hookFilePath} returns a value, but guard() doesn't accept any return value`)}function Ti(e,t){const n=t.find(u=>u.pageId===e&&u.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const a=r,l=ue("guard");return h(B(o),`guard() defined by ${a} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:a,hookTimeout:l}}function Fi(e){const t=new Error("AbortRender");return w(t,{_pageContextAbort:e,[Dt]:!0}),t}const Dt="_isAbortError";function nt(e){return typeof e=="object"&&e!==null&&Dt in e}function xi(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(y(e,"_abortCall","string")),!0):!1}function Ii(e,t,n){if(t)return;const r=n._urlRewrite??n.urlOriginal;s(r);const i=e._pageContextAbort._abortCall;$e(!1,`${p.cyan(i)} intercepted while rendering ${p.cyan(r)}`,{onlyOnce:!1})}function Ai(e){ji(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function ji(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(a=>`render('${a}')`).join(" => ");h(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function Li(e,t){const n=[e>0&&p.cyan("throw render('/some-url')"),t>0&&p.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");h(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const zt=C("router/getPageContext.ts",{});async function Ni(e){const t=ei();Bt(t),w(t,{isHydration:!0,_hasPageContextFromClient:!1}),w(t,await We(t._pageId,e));for(const n of["data","onBeforeRender"]){const r={...e,...t};if(Yt(n,r)){const i=await Gt(n,r);w(t,i)}}return Jt(t),t}async function Hi(e){const t=Rt(e._pageFilesAll,e._pageConfigs);if(!t)throw new Error("No error page defined.");const n={isHydration:!1,_pageId:t};return w(n,await Ut({...e,...n},!0)),n}async function Wi(e){const t={isHydration:!1,_pageId:e._pageId};return w(t,await Ut({...e,...t},!1)),Jt(t),t}async function Ut(e,t){const n=async o=>{const a={_hasPageContextFromClient:!1,_pageId:o},l=await We(o,e);return w(a,l),a};let r=await n(e._pageId),i=!1;if(!t&&await Bi({...e,...r})){const o=await Vi(e);if(i=!0,!o._isError)w(r,o);else{const a=Rt(e._pageFilesAll,e._pageConfigs);s(a),r=await n(a),s(y(o,"is404","boolean")),s(y(o,"pageProps","object")),s(y(o.pageProps,"is404","boolean")),s(!("serverSideError"in o)),w(r,o)}}for(const o of["guard","data","onBeforeRender"]){const a={_hasPageContextFromServer:i,...e,...r};if(o==="guard")!t&&!i&&await Oi(a,l=>He(l,!0));else if(s(o==="data"||o==="onBeforeRender"),Yt(o,a)||!i){const l=await Gt(o,a);w(r,l)}else s(i)}return w(r,{_hasPageContextFromServer:i}),r}async function Gt(e,t){const n=I(t,e);if(!n)return null;const r=He(t,!0),i=await H(()=>n.hookFn(r),n),o={};if(e==="onBeforeRender"){_i(i,n.hookFilePath);const a=i==null?void 0:i.pageContext;a&&(w(o,{_hasPageContextFromClient:!0}),w(o,a))}else{s(e==="data");const a={data:i};i&&w(o,{_hasPageContextFromClient:!0}),w(o,a)}return o}function Jt(e){e._pageContextInitHasClientData&&(zt.pageContextInitHasClientData=!0)}async function Bi(e){return!!zt.pageContextInitHasClientData||await rt("data",e)||await rt("onBeforeRender",e)}async function rt(e,t){var n;if(t._pageConfigs.length>0){const r=Pt(t._pageId,t._pageConfigs),i=((n=D(r,`${e}Env`))==null?void 0:n.value)??{};return s(R(i)),!!i.server&&!i.client}else{if(e==="data")return!1;s(e==="onBeforeRender");const{hasOnBeforeRenderServerSideOnlyHook:r}=await ti(t._pageFilesAll,t._pageId);return r}}function Yt(e,t){var n;if(t._pageConfigs.length>0){const r=Pt(t._pageId,t._pageConfigs),i=((n=D(r,`${e}Env`))==null?void 0:n.value)??{};return s(R(i)),!!i.client&&!i.server}else return!1}async function Vi(e){const t=Ri(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),a="application/json",l=o&&o.includes(a);if(!l&&n.status===404)throw re(e.urlOriginal),zi();h(l,`Wrong Content-Type for ${t}: it should be ${a} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=ae(r);if(s(R(i)),"serverSideError"in i)throw gt("The pageContext object couldn't be fetched from the server as an error occurred on the server-side. Check your server logs.");if(xi(i))throw Fi(i);return s(y(i,"_pageId","string")),Bt(i),i}function Di(e){return R(e)&&!!e._alreadyServerSideRouted}function zi(){const e=new Error("Page doesn't exist");return Object.assign(e,{_alreadyServerSideRouted:!0}),e}function Mt(e,t=!0){s(e.urlOriginal),"urlPathname"in e&&(s(typeof e.urlPathname=="string"),s(fe(e,"urlPathname"))),"urlParsed"in e&&s(fe(e,"urlParsed")),"url"in e&&s(fe(e,"url")),Object.defineProperty(e,"urlPathname",{get:qt,enumerable:t,configurable:!0}),Object.defineProperty(e,"url",{get:Ui,enumerable:!1,configurable:!0}),Object.defineProperty(e,"urlParsed",{get:Gi,enumerable:t,configurable:!0})}function Kt(e){let t=e._urlHandler;t||(t=i=>i);let n=e._urlRewrite??e.urlLogical??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),K(n,r)}function qt(){const{pathname:e}=Kt(this),t=e;return s(t.startsWith("/")),t}function Ui(){return v(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),qt.call(this)}function Gi(){const e=Kt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,hash:l,hashOriginal:u}=e,c=W(),g=d=>{v(c,`pageContext.urlParsed.${d} isn't available on the server-side (HTTP requests don't include the URL hash by design)`,{onlyOnce:!0,showStackTrace:!0})},f={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,get hash(){return g("hash"),l},get hashOriginal(){return g("hashOriginal"),u},get hashString(){return v(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),g("hashString"),u},get searchString(){return v(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),a}};return Z(f,"hashString"),Z(f,"searchString"),c||(Z(f,"hash"),Z(f,"hashOriginal")),f}function Z(e,t){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...n,enumerable:!1})}function Ji(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(A(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname)}function Yi(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(ne(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:a}=r,l={pageId:e,filesystemRoot:o,urlRoot:a};s(a.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),l),s(e.startsWith(o),l),o!=="/"?(s(!o.endsWith("/"),l),i=F(e,o.length,0)):i=e,s(i.startsWith("/"),l),i=a+(a.endsWith("/")?"":"/")+F(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=F(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function Mi(e,t,n){Ji(t);let r=e(t);if(Xt(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),h(A(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${p.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:a}=r;if(h(typeof a=="boolean",`The ${p.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!a)return null}let i=null;"precedence"in r&&(i=r.precedence,h(typeof i=="number",`The ${p.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),Qt(r,`The ${p.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return h(!("pageContext"in r),`Providing ${p.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(A(o)),Object.keys(r).forEach(a=>{h(a==="match"||a==="routeParams"||a==="precedence",`The Route Function ${n} returned an object with an unknown property ${p.cyan(a)} (the known properties are ${p.cyan("match")}, ${p.cyan("routeParams")}, and ${p.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function Xt(e,t){v(!Bn(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function it(){const e=p.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");v(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function Qt(e,t){s(t.endsWith(" should")),y(e,"routeParams")&&(s(t.endsWith(" should")),h(A(e.routeParams),`${t} be a plain JavaScript object.`),h($i(e.routeParams),`${t} only hold string values.`))}async function Ki(e,t,n,r){await Promise.all(e.filter(l=>l.fileType===".page.route").map(l=>{var u;return(u=l.loadFile)==null?void 0:u.call(l)}));const{onBeforeRouteHook:i,filesystemRoots:o}=Xi(e,t,n);return{pageRoutes:qi(o,e,t,r),onBeforeRouteHook:i}}function qi(e,t,n,r){const i=[];let o=[...r];if(n.length>0){s(e===null);const a=!0;n.filter(l=>!l.isErrorPage).forEach(l=>{const u=l.pageId;o=Zi(o,u);let c=null;{const g="route",f=D(l,g);if(f){const d=f.value,m=St(f.definedAt,g);typeof d=="string"?c={pageId:u,comesFromV1PageConfig:a,routeString:d,routeDefinedAt:m,routeType:"STRING"}:(s(B(d)),D(l,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&&it(),c={pageId:u,comesFromV1PageConfig:a,routeFunction:d,routeDefinedAt:m,routeType:"FUNCTION"})}}if(!c){const{routeFilesystem:g}=l;s(g);const{routeString:f,definedBy:d}=g;s(g.routeString.startsWith("/")),c={pageId:u,routeFilesystemDefinedBy:d,comesFromV1PageConfig:a,routeString:f,routeDefinedAt:null,routeType:"FILESYSTEM"}}s(c),i.push(c)})}if(n.length===0){s(e);const a=!1;o.filter(l=>!q(l)).forEach(l=>{const u=t.find(c=>c.pageId===l&&c.fileType===".page.route");if(!u||!("default"in u.fileExports)){const c=Yi(l,e);s(c.startsWith("/")),s(!c.endsWith("/")||c==="/"),i.push({pageId:l,comesFromV1PageConfig:a,routeString:c,routeDefinedAt:null,routeFilesystemDefinedBy:`${l}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:c,fileExports:g}=u;if(s(g.default),y(g,"default","string")){const f=g.default;h(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${c} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:l,comesFromV1PageConfig:a,routeString:f,routeDefinedAt:c,routeType:"STRING"});return}if(y(g,"default","function")){const f=g.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in g&&it(),i.push({pageId:l,comesFromV1PageConfig:a,routeFunction:f,routeDefinedAt:c,routeType:"FUNCTION"});return}h(!1,`The default export of ${c} should be a string or a function.`)}})}return i}function Xi(e,t,n){if(t.length>0)return{onBeforeRouteHook:ni(n,"onBeforeRoute"),filesystemRoots:null};let r=null;const i=[];return e.filter(o=>o.fileType===".page.route"&&o.isDefaultPageFile).forEach(({filePath:o,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){h(y(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${o} should be a function.`);const{onBeforeRoute:l}=a,u="onBeforeRoute";r={hookFilePath:o,hookFn:l,hookName:u,hookTimeout:ue(u)}}"filesystemRoutingRoot"in a&&(h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} should be a string.`),h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:Qi(o),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function Qi(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=F(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function Zi(e,t){const{length:n}=e;return e=e.filter(r=>r!==t),s(e.length===n-1),e}function Zt(){const e="/ts-react-vike-start";return s(eo(e)),e}function eo(e){return e.startsWith("/")}const he=C("createPageContext.ts",{});async function en(e){he.pageFilesData||(he.pageFilesData=await yr(!0));const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=he.pageFilesData,{pageRoutes:o,onBeforeRouteHook:a}=await Ki(t,r,i,n),l=Zt();s(Oe(l));const c={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:l,_isProduction:!0,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:a};return Mt(c),c}function tn(e){const t=e.getAttribute("href");return!!(t===null||t===""||qr(t)||no(e)||ro(t)||!io(t)||!ke(t)||!to(e))}function to(e){if(oo()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function no(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function ro(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function io(e){const t=Zt();s(Oe(t));const{hasBaseServer:n}=K(e,t);return n}function oo(){return!!window._disableAutomaticLinkInterception}function so(e,t){let n=ao(e,t);return n==="viewport"&&!e._isProduction&&($e(!1,"Viewport prefetching is disabled in development",{onlyOnce:!0}),n="hover"),{prefetchStaticAssets:n}}function ao(e,t){{const n=lo(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&h(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";h(A(n),r);const i=Object.keys(n);h(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const a=o.toLowerCase();return v(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${a}' instead`,{onlyOnce:!0}),a}h(!1,r)}return"hover"}function lo(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(h(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;h(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),v(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";h(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const nn=new Map;function uo(e){const t=rn(e);return nn.has(t)}function co(e){const t=rn(e);nn.set(t,!0)}function rn(e){return K(e,"/").pathname}function U(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function fo({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(l=>l.pageId===n&&l.fileType===".page")?(i(),!1):!(!t.some(l=>l.pageId===n&&l.fileType===".page.server")||e.some(l=>l.pageId===n&&l.fileType===".page.client"&&U(l).includes("render")))}function i(){const a=e.some(l=>U(l).includes("render"));h(a,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((l,u)=>` (${u+1}): ${l.filePath}`)].join(` +`)}function gn(e){return e.startsWith(" at ")}function hn(e){return e.split(/\r?\n/)}function C(e,t){const n=globalThis.__vike=globalThis.__vike||{};return n[e]=n[e]||t}function R(e){return typeof e=="object"&&e!==null}function _e(e){return Array.from(new Set(e))}const T=C("assertPackageInstances.ts",{instances:[],alreadyLogged:new Set}),pn="The client runtime of Server Routing as well as the client runtime of Client Routing are both being loaded. Make sure they aren't loaded both at the same time for a given page. See https://vike.dev/client-runtimes-conflict",ft="Two vike client runtime instances are being loaded. Make sure your client-side bundles don't include vike twice. (In order to reduce the size of your client-side JavaScript bundles.)";function dt(){{const e=_e(T.instances);bn(e.length<=1,`Both vike@${e[0]} and vike@${e[1]} loaded. Only one version should be loaded.`)}T.checkSingleInstance&&T.instances.length>1&&me(!1,ft,{onlyOnce:!0,showStackTrace:!0})}function mn(e){me(T.isClientRouting!==!1,pn,{onlyOnce:!0,showStackTrace:!0}),me(T.isClientRouting===void 0,ft,{onlyOnce:!0,showStackTrace:!0}),T.isClientRouting=!0,e&&(T.checkSingleInstance=!0),dt()}function yn(e){T.instances.push(e),dt()}function bn(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function me(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:o}=T,a=n===!0?i:n;if(o.has(a))return;o.add(a)}console.warn(r?new Error(i):i)}const wn="0.4.152",N={projectName:"Vike",projectVersion:wn,npmPackageName:"vike",githubRepository:"https://github.com/vikejs/vike"};yn(N.projectVersion);const p=new Proxy(e=>e,{get:()=>p}),E=C("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet}),Sn=`[${N.npmPackageName}]`,Pn=`[${N.npmPackageName}@${N.projectVersion}]`,Ce=2;function s(e,t){var a;if(e)return;const n=(()=>{if(!t)return null;const l=typeof t=="string"?t:JSON.stringify(t);return p.dim(`Debug info (for ${N.projectName} maintainers; you can ignore this): ${l}`)})(),r=`${N.githubRepository}/issues/new`;let i=[`You stumbled upon a bug in ${N.projectName}'s source code.`,`Go to ${p.blue(r)} and copy-paste this error; a maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=J(i),i=se(i,"Bug"),i=Y(i,!0);const o=Ee(i,Ce);throw(a=E.onBeforeLog)==null||a.call(E),o}function h(e,t,{showStackTrace:n}={}){var i;if(e)return;t=J(t),t=se(t,"Wrong Usage"),t=Y(t);const r=Ee(t,Ce);throw n&&E.showStackTraceList.add(r),(i=E.onBeforeLog)==null||i.call(E),r}function gt(e){return e=J(e),e=se(e,"Error"),e=Y(e),Ee(e,Ce)}function v(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(t=J(t),t=se(t,"Warning"),t=Y(t),n){const{alreadyLogged:o}=E,a=n===!0?t:n;if(o.has(a))return;o.add(a)}if((i=E.onBeforeLog)==null||i.call(E),r){const o=new Error(t);E.showStackTraceList.add(o),E.logger(o,"warn")}else E.logger(t,"warn")}}function $e(e,t,{onlyOnce:n}){var r;if(!e){if(t=J(t),t=Y(t),n){const{alreadyLogged:i}=E,o=t;if(i.has(o))return;i.add(o)}(r=E.onBeforeLog)==null||r.call(E),E.logger(t,"info")}}function se(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function J(e){return e.startsWith("[")?e:` ${e}`}function Y(e,t=!1){return`${t?Pn:Sn}${e}`}function W(){return typeof window<"u"&&typeof window.scrollY=="number"}const ht=C("utils/assertRouterType.ts",{});function M(){Rn(vn()),ht.isClientRouting=!0}function vn(){return ht.isClientRouting!==!1}function Rn(e){h(W(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),v(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}const En=["js","ts","cjs","cts","mjs","mts","jsx","tsx","cjsx","ctsx","mjsx","mtsx"],pt=["vue","svelte","marko","md","mdx"],_n=[...En,...pt];function mt(e){const t=_n.some(n=>e.endsWith("."+n));return s(!Cn(e)||t),t}function Cn(e){return/\.(c|m)?(j|t)sx?$/.test(e)}function $n(e){return pt.some(t=>e.endsWith("."+t))}function F(e,t,n){return typeof e=="string"?ze(e.split(""),t,n).join(""):ze(e,t,n)}function ze(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const a=e[i];s(a!==void 0),r.push(a),i++}return r}const yt=["http://","https://","tauri://"];function ke(e){return yt.some(t=>e.startsWith(t))||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function kn(e,t){s(t.includes(" but ")),h(typeof e=="string",`${t} should be a string`),!ke(e)&&(!e.startsWith("/")&&!e.includes(":")?h(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):h(!1,`${t} isn't a valid URL`))}function K(e,t){s(ke(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":ye(i.slice(1)),[a,...l]=n.split("?");s(a!==void 0);const u=["",...l].join("?")||null;s(u===null||u.startsWith("?"));const c={},g={};Array.from(new URLSearchParams(u||"")).forEach(([$,X])=>{c[$]=X,g[$]=[...g.hasOwnProperty($)?g[$]:[],X]});const{origin:f,pathname:d}=Tn(a,t);s(f===null||f===ye(f)),s(d.startsWith("/")),s(f===null||e.startsWith(f));const m=a.slice((f||"").length);An(e,f,m,u,i);let{pathname:S,hasBaseServer:k}=In(d,t);return S=On(S),s(S.startsWith("/")),{origin:f,pathname:S,pathnameOriginal:m,hasBaseServer:k,search:c,searchAll:g,searchOriginal:u,hash:o,hashOriginal:i}}function ye(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function On(e){return e=e.replace(/\s+$/,""),e=e.split("/").map(t=>ye(t).split("/").join("%2F")).join("/"),e}function Tn(e,t){var n;s(!e.includes("?")&&!e.includes("#"));{const{origin:r,pathname:i}=Ue(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{const r=typeof window<"u"?(n=window==null?void 0:window.document)==null?void 0:n.baseURI:void 0;let i;return r?i=Ue(r.split("?")[0]).pathname:i=t,{origin:null,pathname:Fn(e,i)}}}function Ue(e){if(yt.some(t=>e.startsWith(t))){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),a=["",...i].join("/")||"/";return{origin:o,pathname:a}}else return{pathname:e,origin:null}}function Fn(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const a in r){const l=r[a];l==""&&a==="0"||l!="."&&(l==".."?n.pop():(i=!1,n.push(l)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function xn(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function In(e,t){xn(e),s(Oe(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===F(t,0,-1)&&(r=F(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Oe(e){return e.startsWith("/")}function An(e,t,n,r,i){const o=jn(t,n,r,i);s(e===o)}function jn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function w(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function B(e){return e instanceof Function||typeof e=="function"}function ne(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function Ln(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function Nn(e){return j(t=>{const n=e(t);return n===null?null:!n})}function y(e,t,n="unknown"){if(!R(e))return!1;if(!(t in e))return n==="undefined";if(n==="unknown")return!0;const r=e[t];return n==="array"?Array.isArray(r):n==="object"?R(r):n==="string[]"?Array.isArray(r)&&r.every(i=>typeof i=="string"):n==="function"?B(r):Array.isArray(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="undefined"?r===void 0:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function A(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function Hn(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const Wn=e=>e!=null;function Ge(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function bt(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function fe(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Bn(e){return typeof e=="object"&&e!==null&&"then"in e&&B(e.then)}function Vn(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function Dn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}const zn=["clientRouting"];function Un(e){zn.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;h(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),h(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const wt=["render","clientRouting","prerender","doNotPrerender"];function Gn(e,t){h(!wt.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function Jn(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(l=>{i=`${i} { ${l}`,o=` }${o}`}),i+o}function Te(e,t,{definedAt:n}){const r=St(n,t),i=r==="internally"?r:`at ${r}`;let o=`${t}`;return`${e} ${p.cyan(o)} defined ${i}`}function St(e,t){if("isComputed"in e)return"internally";let n;return"files"in e?n=e.files:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:a}=i;let l=o;const u=Jn(a,t);return u&&(l=`${l} > ${p.cyan(u)}`),l}).join(" / ")}function D(e,t,n){const r=Mn(e,t);if(r===null)return null;const{value:i,definedAt:o}=r;return n&&Yn(i,n,t,o),r}function Yn(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=Vn(e),a=o!==null?`value ${p.cyan(o)}`:`type ${p.cyan(i)}`,u=`${Te("Config",n,{definedAt:r})} has an invalid ${a}: it should be a ${p.cyan(t)} instead`;h(!1,u)}function Mn(e,t){const n=e.configValues[t];return!n||n.value===null?null:n}function Pt(e,t){const n=t.find(r=>r.pageId===e);return s(t.length>0),s(n),n}function vt({definedAt:e}){if("isComputed"in e||"files"in e)return null;const{filePathToShowToUser:t}=e;return s(t),t}function Kn({definedAt:e}){const t=vt({definedAt:e});return s(t),t}function qn(e,t){const n={},r={},i={};e.forEach(l=>{Xn(l).forEach(({exportName:c,exportValue:g,isFromDefaultExport:f})=>{s(c!=="default"),i[c]=i[c]??[],i[c].push({exportValue:g,exportSource:`${l.filePath} > ${f?`\`export default { ${c} }\``:`\`export { ${c} }\``}`,filePath:l.filePath,_filePath:l.filePath,_fileType:l.fileType,_isFromDefaultExport:f})})}),t&&Object.entries(t.configValues).forEach(([l,u])=>{const{value:c}=u,g=vt(u),f=Te("Config",l,u);r[l]=r[l]??c,n[l]=n[l]??[],s(n[l].length===0),n[l].push({configValue:c,configDefinedAt:f,configDefinedByFile:g});const d=l;i[d]=i[d]??[],i[d].push({exportValue:c,exportSource:f,filePath:g,_filePath:g,_fileType:null,_isFromDefaultExport:null})});const o=Qn(),a={};return Object.entries(i).forEach(([l,u])=>{u.forEach(({exportValue:c,_fileType:g,_isFromDefaultExport:f})=>{a[l]=a[l]??c,g===".page"&&!f&&(l in o||(o[l]=c))})}),s(!("default"in a)),s(!("default"in i)),{config:r,configEntries:n,exports:a,exportsAll:i,pageExports:o}}function Xn(e){const{filePath:t,fileExports:n}=e;s(n),s(mt(t));const r=[];return Object.entries(n).sort(Nn(([i])=>i==="default")).forEach(([i,o])=>{let a=i==="default";if(a)if($n(t))i="Page";else{h(R(o),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([l,u])=>{Gn(l,t),r.push({exportName:l,exportValue:u,isFromDefaultExport:a})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:a})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&wt.includes(i)))}),r}function Qn(){return new Proxy({},{get(...e){return W()||v(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}function Zn(e){const t=".page.",n=F(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function z(e){bt(e)}function Rt(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(h(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=_e(e.map(({pageId:r})=>r).filter(r=>q(r)));if(h(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function q(e,t){return s(!e.includes("\\")),e.includes("/_error")}function er(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return q(e)}const tr=[".page",".page.server",".page.route",".page.client",".css"];function nr(e){if(bt(e),e.endsWith(".css"))return".css";s(mt(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function Et(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(Je(i.filePath)||rr(o,i.filePath)),n=nr(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:be(e),isRendererPageFile:n!==".css"&&be(e)&&Je(e),isErrorPageFile:q(e),pageId:Zn(e)};return i}function be(e){return z(e),q(e)?!1:e.includes("/_default")}function Je(e){return z(e),e.includes("/renderer/")}function rr(e,t){z(e),z(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(be(t));const n=F(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function ir(e){s(Array.isArray(e)),e.forEach(t=>{s(R(t)),s(y(t,"pageId","string")),s(y(t,"routeFilesystem")),s(y(t,"configValuesSerialized")),s(y(t,"configValuesImported"))})}function or(e){s(y(e,"configValuesImported"))}const sr=["$$registrations","_rerender_only"],ar=[".md",".mdx"];function lr(e,t,n){ur(e,t,n)}function ur(e,t,n){const i=Object.keys(e).filter(a=>!sr.includes(a)),o=i.filter(a=>a!=="default"&&a!==n);if(o.length===0){if(i.length===1)return;const a=p.cyan("export default"),l=p.cyan(`export { ${n} }`);if(i.length===0){let u=`${t} doesn't export any value, but it should have a ${a}`;n&&(u+=` or ${l}`),h(!1,u)}else s(i.length===2),v(!1,`${t} remove ${l} or ${a}`,{onlyOnce:!0})}else if(n){if(ar.some(a=>t.endsWith(a)))return;o.forEach(a=>{v(!1,`${t} should have only a single export: move ${p.cyan(`export { ${a} }`)} to +config.h.js or its own +${o}.js`,{onlyOnce:!0})})}else{const a=o.join(", ");h(!1,`${t} replace ${p.cyan(`export { ${a} }`)} with ${p.cyan(`export default { ${a} }`)}`)}}function we(e){const t={},n=(r,i,o,a)=>{t[r]={value:i,definedAt:{filePathToShowToUser:o,fileExportPathToShowToUser:[r,"default"].includes(a)?[]:[a]}},cr(i,r,o)};return e.forEach(r=>{if(r.isValueFile){const{exportValues:i,importPath:o,configName:a}=r;a!=="client"&&lr(i,o,a),Object.entries(i).forEach(([l,u])=>{const c=l!=="default",g=c?l:r.configName;c&&g in t||n(g,u,o,l)})}else{const{configName:i,importPath:o,exportValue:a,exportName:l}=r;n(i,a,o,l)}}),t}function cr(e,t,n){s(!n.includes("+config."))}const fr=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function ae(e){const t=JSON.parse(e);return _t(t)}function _t(e){return typeof e=="string"?dr(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=_t(n)}),e)}function dr(e){for(const{match:t,deserialize:n}of fr)if(t(e))return n(e,ae);return e}function Ct(e){const t={};return Object.entries(e).forEach(([n,r])=>{const{valueSerialized:i,definedAt:o}=r;s(i),s(!t[n]),t[n]={value:ae(i),definedAt:o}}),t}function gr(e,t){const n=e.map(i=>{const o={};{const{configValuesSerialized:g}=i,f=Ct(g);Object.assign(o,f)}{const{configValuesImported:g}=i,f=we(g);Object.assign(o,f)}const{pageId:a,isErrorPage:l,routeFilesystem:u,loadConfigValuesAll:c}=i;return hr(o),{pageId:a,isErrorPage:l,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=we(t.configValuesImported);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function hr(e){const t="route",n=e[t];if(!n)return;const{value:r}=n,i=typeof r,o=Te("Config",t,n);h(i==="string"||B(r),`${o} has an invalid type '${i}': it should be a string or a function instead, see https://vike.dev/route`)}function pr(e){s(y(e,"isGeneratedFile")),s(e.isGeneratedFile!==!1,"vike was re-installed(/re-built). Restart your app."),s(e.isGeneratedFile===!0,`\`isGeneratedFile === ${e.isGeneratedFile}\``),s(y(e,"pageFilesLazy","object")),s(y(e,"pageFilesEager","object")),s(y(e,"pageFilesExportNamesLazy","object")),s(y(e,"pageFilesExportNamesEager","object")),s(y(e.pageFilesLazy,".page")),s(y(e.pageFilesLazy,".page.client")||y(e.pageFilesLazy,".page.server")),s(y(e,"pageFilesList","string[]")),s(y(e,"pageConfigsSerialized")),s(y(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;ir(t),or(n);const{pageConfigs:r,pageConfigGlobal:i}=gr(t,n),o={};Q(e.pageFilesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;Ye(g),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await g(),Un(u))}}),Q(e.pageFilesExportNamesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;Ye(g),u.loadExportNames=async()=>{if(!("exportNames"in u)){const f=await g();h("exportNames"in f,"You seem to be using Vite 2 but the latest vike versions only work with Vite 3"),s(y(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}}}),Q(e.pageFilesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;s(R(g)),u.fileExports=g}),Q(e.pageFilesExportNamesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const g=c;s(R(g)),s(y(g,"exportNames","string[]"),u.filePath),u.exportNames=g.exportNames}),e.pageFilesList.forEach(l=>{o[l]=o[l]??Et(l)});const a=Object.values(o);return a.forEach(({filePath:l})=>{s(!l.includes("\\"))}),{pageFiles:a,pageConfigs:r,pageConfigGlobal:i}}function Q(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(tr.includes(n)),s(R(r)),Object.entries(r).forEach(([i,o])=>{const a=Et(i);s(a.fileType===n),t.push({filePath:i,pageFile:a,globValue:o})})}),t}function Ye(e){s(B(e))}const x=C("setPageFiles.ts",{});function mr(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=pr(e);x.pageFilesAll=t,x.pageConfigs=n,x.pageConfigGlobal=r}async function yr(e,t){e?(s(!x.pageFilesGetter),s(t===void 0)):(s(x.pageFilesGetter),s(typeof t=="boolean"),(!x.pageFilesAll||!t)&&await x.pageFilesGetter());const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=x;s(n&&r&&i);const o=br(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function br(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=_e(n),i=t.map(o=>o.pageId);return[...r,...i]}function Fe(e,t){return kt(e,t,!0)}function $t(e,t){return kt(e,t,!1)}function kt(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(m=>m.isRelevant(t)&&m.fileType!==".page.route").sort(wr(n,t)),o=m=>{const S=i.filter($=>$.pageId===t&&$.isEnv(m?"CLIENT_AND_SERVER":r));h(S.length<=1,`Merge the following files into a single file: ${S.map($=>$.filePath).join(" ")}`);const k=S[0];return s(k===void 0||!k.isDefaultPageFile),k},a=o(!1),l=o(!0),u=m=>i.filter(S=>S.isRendererPageFile&&S.isEnv(m?"CLIENT_AND_SERVER":r))[0],c=u(!1),g=u(!0),f=i.filter(m=>m.isDefaultPageFile&&!m.isRendererPageFile&&(m.isEnv(r)||m.isEnv("CLIENT_AND_SERVER")));return[a,l,...f,c,g].filter(Wn)}function wr(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(a,l)=>{if(!a.isDefaultPageFile&&l.isDefaultPageFile)return r;if(!l.isDefaultPageFile&&a.isDefaultPageFile)return i;{const u=a.isRendererPageFile,c=l.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=Me(t,a.filePath),c=Me(t,l.filePath);if(u0){const o=document.getElementsByTagName("link");i=Promise.all(n.map(a=>{if(a=Pr(a),a in Ke)return;Ke[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(!!r)for(let f=o.length-1;f>=0;f--){const d=o[f];if(d.href===a&&(!l||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${u}`))return;const g=document.createElement("link");if(g.rel=l?"stylesheet":Sr,l||(g.as="script",g.crossOrigin=""),g.href=a,document.head.appendChild(g),l)return new Promise((f,d)=>{g.addEventListener("load",f),g.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},xe={},Ot={},vr={},le={},Rr=[],Tt={},Er=!0,_r=[{pageId:"/pages/features",isErrorPage:void 0,routeFilesystem:{routeString:"/features",definedBy:"/pages/features/"},loadConfigValuesAll:()=>de(()=>import("./pages_features.ZsXsBJPr.js"),__vite__mapDeps([0,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]},{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:()=>de(()=>import("./pages_index.82xpb2fo.js"),__vite__mapDeps([3,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]},{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:()=>de(()=>import("./pages_error.8VM0xDBl.js"),__vite__mapDeps([4,1,2])),configValuesSerialized:{isClientSideRenderable:{definedAt:{isComputed:!0},valueSerialized:"true"},clientRouting:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:"true"}},configValuesImported:[]}],Cr={configValuesImported:[]},$r=Object.assign({}),kr={...$r};xe[".page"]=kr;const Or=Object.assign({}),Tr={...Or};le[".page"]=Tr;const Fr=Object.assign({}),xr={...Fr};le[".page.server"]=xr;const Ir=Object.assign({}),Ar={...Ir};Ot[".page.route"]=Ar;const jr=Object.assign({}),Lr={...jr};xe[".page.client"]=Lr;const Nr=Object.assign({}),Hr={...Nr};le[".page.client"]=Hr;const Wr=Object.assign({}),Br={...Wr};Tt[".page.server"]=Br;const Vr=Object.freeze(Object.defineProperty({__proto__:null,isGeneratedFile:Er,neverLoaded:Tt,pageConfigGlobalSerialized:Cr,pageConfigsSerialized:_r,pageFilesEager:Ot,pageFilesExportNamesEager:le,pageFilesExportNamesLazy:vr,pageFilesLazy:xe,pageFilesList:Rr},Symbol.toStringTag,{value:"Module"}));mr(Vr);function Ft(){s(W())}function Dr(){Ft(),M()}function zr(){Ft()}function qe(e){const t=e/1e3;if(t<120){const n=Xe(t);return`${n} second${Qe(n)}`}{const n=t/60,r=Xe(n);return`${r} minute${Qe(r)}`}}function Xe(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function Qe(e){return e==="1"?"":"s"}const Ur=C("utils/executeHook.ts",{userHookErrors:new Map});function H(e,t){const{hookName:n,hookFilePath:r,hookTimeout:{error:i,warning:o}}=t;let a,l;const u=new Promise((d,m)=>{a=S=>{c(),d(S)},l=S=>{c(),m(S)}}),c=()=>{g&&clearTimeout(g),f&&clearTimeout(f)},g=Ze(o)&&setTimeout(()=>{v(!1,`The ${n}() hook defined by ${r} is slow: it's taking more than ${qe(o)} (https://vike.dev/hooksTimeout)`,{onlyOnce:!1})},o),f=Ze(i)&&setTimeout(()=>{const d=gt(`The ${n}() hook defined by ${r} timed out: it didn't finish after ${qe(i)} (https://vike.dev/hooksTimeout)`);l(d)},i);return(async()=>{try{const d=await e();a(d)}catch(d){R(d)&&Ur.userHookErrors.set(d,{hookName:n,hookFilePath:r}),l(d)}})(),u}function Ze(e){return!!e&&e!==1/0}function Ie(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=K(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}zr();function Gr(){var r,i,o,a;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((a=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&a.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function xt(e,t){const n=Object.keys,r=typeof e;return e&&t&&r==="object"&&r===typeof t?n(e).length===n(t).length&&n(e).every(o=>xt(e[o],t[o])):e===t}function Jr(e,t){return R(e)&&R(t)&&e.constructor===t.constructor&&xt({...e,stack:null},{...t,stack:null})&&t.message===t.message}function re(e){window.location.href=e}function Yr(e){return new Promise(t=>setTimeout(t,e))}function Mr(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function It(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function Kr(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function qr(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}Dr();const Se=C("history.ts",{});function At(){let e=window.history.state;e||(e={});let t=!1;"timestamp"in e||(t=!0,e.timestamp=Le()),"scrollPosition"in e||(t=!0,e.scrollPosition=je()),"triggedBy"in e||(e.triggedBy="browser"),jt(e),t&&Ne(e)}function Ae(){const e=window.history.state||{};return jt(e),e}function je(){return{x:window.scrollX,y:window.scrollY}}function Le(){return new Date().getTime()}function et(){const e=je(),t=Ae();Ne({...t,scrollPosition:e})}function Xr(e,t){if(t)Ne(Ae(),e);else{const n=Le();Qr({timestamp:n,scrollPosition:null,triggedBy:"vike"},e)}}function jt(e){if(s(R(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(y(t,"x","number")&&y(t,"y","number"))}}function Ne(e,t){window.history.replaceState(e,"",t??null)}function Qr(e,t){Lt(e,"",t)}function Zr(){Se.pushStateOriginal=Se.pushStateOriginal??window.history.pushState,window.history.pushState=(e={},...t)=>{h(e==null||R(e),"history.pushState(state) argument state must be an object");const n={scrollPosition:je(),timestamp:Le(),...e,triggedBy:"user"};return Lt(n,...t)}}function Lt(...e){Se.pushStateOriginal.apply(history,e)}function ei(){const e="vike_pageContext",t=document.getElementById(e);h(t,`Couldn't find #${e} (which Vike automatically injects in the HTML): make sure it exists (i.e. don't remove it and make sure your HTML isn't malformed)`);const n=t.textContent;s(n);const r=ae(n);return s(y(r,"_pageId","string")),w(r,{_hasPageContextFromServer:!0}),r}async function ti(e,t){const r=$t(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function I(e,t){if(!(t in e.exports))return null;const{hooksTimeout:n}=e.config,r=ri(n,t),i=e.exports[t],o=e.exportsAll[t][0];if(s(o.exportValue===i),i===null)return null;const a=o.filePath;return s(a),s(!a.endsWith(" ")),Nt(i,{hookName:t,hookFilePath:a}),{hookFn:i,hookName:t,hookFilePath:a,hookTimeout:r}}function ni(e,t){const n=e.configValues[t];if(!n)return null;const r=n.value;if(!r)return null;const i=Kn(n);s(i),Nt(r,{hookName:t,hookFilePath:i});const o=ue(t);return{hookFn:r,hookName:t,hookFilePath:i,hookTimeout:o}}function ge(e,t){I(e,t)}function Nt(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),h(B(e),`Hook ${t}() defined by ${n} should be a function`)}function ri(e,t){const n=ii(e);if(n===!1)return{error:!1,warning:!1};const r=n[t],i=ue(t);return(r==null?void 0:r.error)!==void 0&&(i.error=r.error),(r==null?void 0:r.warning)!==void 0&&(i.warning=r.warning),i}function ii(e){if(e===void 0)return{};if(e===!1)return!1;h(R(e),`Setting ${p.cyan("hooksTimeout")} should be ${p.cyan("false")} or an object`);const t={};return Object.entries(e).forEach(([n,r])=>{if(r===!1){t[n]={error:!1,warning:!1};return}h(R(r),`Setting ${p.cyan(`hooksTimeout.${n}`)} should be ${p.cyan("false")} or an object`);const[i,o]=["error","warning"].map(a=>{const l=r[a];if(l===void 0||l===!1)return l;const u=`Setting ${p.cyan(`hooksTimeout.${n}.${a}`)} should be`;return h(typeof l=="number",`${u} ${p.cyan("false")} or a number`),h(l>0,`${u} a positive number`),l});t[n]={error:i,warning:o}}),t}function ue(e){return e==="onBeforeRoute"?{error:5*1e3,warning:1*1e3}:e==="onPrerenderStart"||e==="onBeforePrerenderStart"||e==="onBeforePrerender"||e==="prerender"?{error:10*60*1e3,warning:30*1e3}:{error:30*1e3,warning:4*1e3}}function oi(e){const t=Object.entries(e);for(const n in e)delete e[n];t.sort(([n],[r])=>Hn(n,r)).forEach(([n,r])=>{e[n]=r})}function si(e){ai(e),li(e)}function ai(e){er(e._pageId,e._pageConfigs)&&s(y(e,"is404","boolean"))}function li(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!R(t)){v(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const ui="not-serializable",ie=C("getPageContextProxyForUser.ts",{});function ci(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=JSON.stringify(n);return h(r!==ui,`pageContext[${i}] couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),fi(e,n),r}})}function fi(e,t){if(ie.prev===t||ie.prev==="__v_raw"||(hi(t),t in e)||gi(t))return;const n=JSON.stringify(t);e._hasPageContextFromServer&&!e._hasPageContextFromClient&&h(!1,`pageContext[${n}] isn't available on the client-side because ${n} is missing in passToClient, see https://vike.dev/passToClient`)}const di=["then","toJSON"];function gi(e){return!!(di.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function hi(e){ie.prev=e,window.setTimeout(()=>{ie.prev=void 0},0)}function He(e,t){if(t){const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}else{const i=e;s(i.isHydration===!0),s(i.isBackwardNavigation===null)}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(R(e.pageExports));const n=e.exports.Page;w(e,{Page:n}),pi(e),oi(e);const r=ci(e);return si(e),r}function pi(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}function Ht(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function mi(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll();{const{configValuesImported:r}=n,i=we(r);Object.assign(e.configValues,i)}{const{configValuesSerialized:r}=n,i=Ct(r);Object.assign(e.configValues,i)}return w(e,{isAllLoaded:!0}),e}const Wt="__whileFetchingAssets";async function We(e,t){const n=Fe(t._pageFilesAll,e),r=Ht(t._pageConfigs,e);let i;const o=!1;try{i=(await Promise.all([r&&mi(r,o),...n.map(m=>{var S;return(S=m.loadFile)==null?void 0:S.call(m)})]))[0]}catch(d){throw yi(d)&&Object.assign(d,{[Wt]:!0}),d}const{config:a,configEntries:l,exports:u,exportsAll:c,pageExports:g}=qn(n,i);return{config:a,configEntries:l,exports:u,exportsAll:c,pageExports:g,_pageFilesLoaded:n}}function Be(e){return e?e[Wt]===!0:!1}function yi(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}const tt=["urlPathname","urlParsed"],bi=["Page","pageExports","exports"];function Bt(e){[...bi,...tt].forEach(n=>{n in e&&(tt.includes(n)?(s(n.startsWith("url")),v(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):v(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const wi="/";function Si(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=K(e,wi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const a=r.endsWith("/");let l;return n&&r!=="/"?(a?l=F(r,0,-1):l=r,s(!l.endsWith("/"),{url:e}),s(l!=="")):l=r+(a?"":"/")+"index",s(l),l=l+t,`${l}${i||""}${o||""}`}const Pi=".pageContext.json",vi=!1;function Ri(e){return Si(e,Pi,vi)}function Vt(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${p.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;h(R(e),`${r} should be an object (but it's ${p.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),h(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${p.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),v(!("_pageId"in e),`${r} sets ${p.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),h(!("is404"in e),`${r} sets ${p.cyan("pageContext.is404")} which is forbidden, use ${p.cyan("throw render()")} instead, see https://vike.dev/render`)}function Ei(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);h(r.length===0,[n,"returned an object with following unknown keys:",Ge(r)+".","Only following keys are allowed:",Ge(t)+"."].join(" "))}function _i(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;h(A(e),`${n} should return a plain JavaScript object, ${p.cyan("undefined")}, or ${p.cyan("null")}`),Ei(e,["pageContext"],n),e.pageContext&&Vt(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function Ci(e,t){if(!A(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function $i(e){return typeof e=="object"&&e!==null&&Object.values(e).every(t=>typeof t=="string")}function ki(e,t,n=r=>r){if(s(e.length>0),e.length===1)return n(e[0]);const r=e.slice(0,e.length-1),i=e[e.length-1];return r.map(n).join(", ")+` ${t} `+n(i)}W()&&M();async function Oi(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=Ti(e._pageId,e._pageFilesAll)):n=I(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const a=await H(()=>r(i),n);h(a===void 0,`The guard() hook of ${n.hookFilePath} returns a value, but guard() doesn't accept any return value`)}function Ti(e,t){const n=t.find(u=>u.pageId===e&&u.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const a=r,l=ue("guard");return h(B(o),`guard() defined by ${a} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:a,hookTimeout:l}}function Fi(e){const t=new Error("AbortRender");return w(t,{_pageContextAbort:e,[Dt]:!0}),t}const Dt="_isAbortError";function nt(e){return typeof e=="object"&&e!==null&&Dt in e}function xi(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(y(e,"_abortCall","string")),!0):!1}function Ii(e,t,n){if(t)return;const r=n._urlRewrite??n.urlOriginal;s(r);const i=e._pageContextAbort._abortCall;$e(!1,`${p.cyan(i)} intercepted while rendering ${p.cyan(r)}`,{onlyOnce:!1})}function Ai(e){ji(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function ji(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(a=>`render('${a}')`).join(" => ");h(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function Li(e,t){const n=[e>0&&p.cyan("throw render('/some-url')"),t>0&&p.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");h(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const zt=C("router/getPageContext.ts",{});async function Ni(e){const t=ei();Bt(t),w(t,{isHydration:!0,_hasPageContextFromClient:!1}),w(t,await We(t._pageId,e));for(const n of["data","onBeforeRender"]){const r={...e,...t};if(Yt(n,r)){const i=await Gt(n,r);w(t,i)}}return Jt(t),t}async function Hi(e){const t=Rt(e._pageFilesAll,e._pageConfigs);if(!t)throw new Error("No error page defined.");const n={isHydration:!1,_pageId:t};return w(n,await Ut({...e,...n},!0)),n}async function Wi(e){const t={isHydration:!1,_pageId:e._pageId};return w(t,await Ut({...e,...t},!1)),Jt(t),t}async function Ut(e,t){const n=async o=>{const a={_hasPageContextFromClient:!1,_pageId:o},l=await We(o,e);return w(a,l),a};let r=await n(e._pageId),i=!1;if(!t&&await Bi({...e,...r})){const o=await Vi(e);if(i=!0,!o._isError)w(r,o);else{const a=Rt(e._pageFilesAll,e._pageConfigs);s(a),r=await n(a),s(y(o,"is404","boolean")),s(y(o,"pageProps","object")),s(y(o.pageProps,"is404","boolean")),s(!("serverSideError"in o)),w(r,o)}}for(const o of["guard","data","onBeforeRender"]){const a={_hasPageContextFromServer:i,...e,...r};if(o==="guard")!t&&!i&&await Oi(a,l=>He(l,!0));else if(s(o==="data"||o==="onBeforeRender"),Yt(o,a)||!i){const l=await Gt(o,a);w(r,l)}else s(i)}return w(r,{_hasPageContextFromServer:i}),r}async function Gt(e,t){const n=I(t,e);if(!n)return null;const r=He(t,!0),i=await H(()=>n.hookFn(r),n),o={};if(e==="onBeforeRender"){_i(i,n.hookFilePath);const a=i==null?void 0:i.pageContext;a&&(w(o,{_hasPageContextFromClient:!0}),w(o,a))}else{s(e==="data");const a={data:i};i&&w(o,{_hasPageContextFromClient:!0}),w(o,a)}return o}function Jt(e){e._pageContextInitHasClientData&&(zt.pageContextInitHasClientData=!0)}async function Bi(e){return!!zt.pageContextInitHasClientData||await rt("data",e)||await rt("onBeforeRender",e)}async function rt(e,t){var n;if(t._pageConfigs.length>0){const r=Pt(t._pageId,t._pageConfigs),i=((n=D(r,`${e}Env`))==null?void 0:n.value)??{};return s(R(i)),!!i.server&&!i.client}else{if(e==="data")return!1;s(e==="onBeforeRender");const{hasOnBeforeRenderServerSideOnlyHook:r}=await ti(t._pageFilesAll,t._pageId);return r}}function Yt(e,t){var n;if(t._pageConfigs.length>0){const r=Pt(t._pageId,t._pageConfigs),i=((n=D(r,`${e}Env`))==null?void 0:n.value)??{};return s(R(i)),!!i.client&&!i.server}else return!1}async function Vi(e){const t=Ri(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),a="application/json",l=o&&o.includes(a);if(!l&&n.status===404)throw re(e.urlOriginal),zi();h(l,`Wrong Content-Type for ${t}: it should be ${a} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=ae(r);if(s(R(i)),"serverSideError"in i)throw gt("The pageContext object couldn't be fetched from the server as an error occurred on the server-side. Check your server logs.");if(xi(i))throw Fi(i);return s(y(i,"_pageId","string")),Bt(i),i}function Di(e){return R(e)&&!!e._alreadyServerSideRouted}function zi(){const e=new Error("Page doesn't exist");return Object.assign(e,{_alreadyServerSideRouted:!0}),e}function Mt(e,t=!0){s(e.urlOriginal),"urlPathname"in e&&(s(typeof e.urlPathname=="string"),s(fe(e,"urlPathname"))),"urlParsed"in e&&s(fe(e,"urlParsed")),"url"in e&&s(fe(e,"url")),Object.defineProperty(e,"urlPathname",{get:qt,enumerable:t,configurable:!0}),Object.defineProperty(e,"url",{get:Ui,enumerable:!1,configurable:!0}),Object.defineProperty(e,"urlParsed",{get:Gi,enumerable:t,configurable:!0})}function Kt(e){let t=e._urlHandler;t||(t=i=>i);let n=e._urlRewrite??e.urlLogical??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),K(n,r)}function qt(){const{pathname:e}=Kt(this),t=e;return s(t.startsWith("/")),t}function Ui(){return v(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),qt.call(this)}function Gi(){const e=Kt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,hash:l,hashOriginal:u}=e,c=W(),g=d=>{v(c,`pageContext.urlParsed.${d} isn't available on the server-side (HTTP requests don't include the URL hash by design)`,{onlyOnce:!0,showStackTrace:!0})},f={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,get hash(){return g("hash"),l},get hashOriginal(){return g("hashOriginal"),u},get hashString(){return v(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),g("hashString"),u},get searchString(){return v(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),a}};return Z(f,"hashString"),Z(f,"searchString"),c||(Z(f,"hash"),Z(f,"hashOriginal")),f}function Z(e,t){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...n,enumerable:!1})}function Ji(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(A(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname)}function Yi(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(ne(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:a}=r,l={pageId:e,filesystemRoot:o,urlRoot:a};s(a.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),l),s(e.startsWith(o),l),o!=="/"?(s(!o.endsWith("/"),l),i=F(e,o.length,0)):i=e,s(i.startsWith("/"),l),i=a+(a.endsWith("/")?"":"/")+F(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=F(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function Mi(e,t,n){Ji(t);let r=e(t);if(Xt(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),h(A(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${p.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:a}=r;if(h(typeof a=="boolean",`The ${p.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!a)return null}let i=null;"precedence"in r&&(i=r.precedence,h(typeof i=="number",`The ${p.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),Qt(r,`The ${p.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return h(!("pageContext"in r),`Providing ${p.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(A(o)),Object.keys(r).forEach(a=>{h(a==="match"||a==="routeParams"||a==="precedence",`The Route Function ${n} returned an object with an unknown property ${p.cyan(a)} (the known properties are ${p.cyan("match")}, ${p.cyan("routeParams")}, and ${p.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function Xt(e,t){v(!Bn(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function it(){const e=p.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");v(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function Qt(e,t){s(t.endsWith(" should")),y(e,"routeParams")&&(s(t.endsWith(" should")),h(A(e.routeParams),`${t} be a plain JavaScript object.`),h($i(e.routeParams),`${t} only hold string values.`))}async function Ki(e,t,n,r){await Promise.all(e.filter(l=>l.fileType===".page.route").map(l=>{var u;return(u=l.loadFile)==null?void 0:u.call(l)}));const{onBeforeRouteHook:i,filesystemRoots:o}=Xi(e,t,n);return{pageRoutes:qi(o,e,t,r),onBeforeRouteHook:i}}function qi(e,t,n,r){const i=[];let o=[...r];if(n.length>0){s(e===null);const a=!0;n.filter(l=>!l.isErrorPage).forEach(l=>{const u=l.pageId;o=Zi(o,u);let c=null;{const g="route",f=D(l,g);if(f){const d=f.value,m=St(f.definedAt,g);typeof d=="string"?c={pageId:u,comesFromV1PageConfig:a,routeString:d,routeDefinedAt:m,routeType:"STRING"}:(s(B(d)),D(l,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&&it(),c={pageId:u,comesFromV1PageConfig:a,routeFunction:d,routeDefinedAt:m,routeType:"FUNCTION"})}}if(!c){const{routeFilesystem:g}=l;s(g);const{routeString:f,definedBy:d}=g;s(g.routeString.startsWith("/")),c={pageId:u,routeFilesystemDefinedBy:d,comesFromV1PageConfig:a,routeString:f,routeDefinedAt:null,routeType:"FILESYSTEM"}}s(c),i.push(c)})}if(n.length===0){s(e);const a=!1;o.filter(l=>!q(l)).forEach(l=>{const u=t.find(c=>c.pageId===l&&c.fileType===".page.route");if(!u||!("default"in u.fileExports)){const c=Yi(l,e);s(c.startsWith("/")),s(!c.endsWith("/")||c==="/"),i.push({pageId:l,comesFromV1PageConfig:a,routeString:c,routeDefinedAt:null,routeFilesystemDefinedBy:`${l}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:c,fileExports:g}=u;if(s(g.default),y(g,"default","string")){const f=g.default;h(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${c} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:l,comesFromV1PageConfig:a,routeString:f,routeDefinedAt:c,routeType:"STRING"});return}if(y(g,"default","function")){const f=g.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in g&&it(),i.push({pageId:l,comesFromV1PageConfig:a,routeFunction:f,routeDefinedAt:c,routeType:"FUNCTION"});return}h(!1,`The default export of ${c} should be a string or a function.`)}})}return i}function Xi(e,t,n){if(t.length>0)return{onBeforeRouteHook:ni(n,"onBeforeRoute"),filesystemRoots:null};let r=null;const i=[];return e.filter(o=>o.fileType===".page.route"&&o.isDefaultPageFile).forEach(({filePath:o,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){h(y(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${o} should be a function.`);const{onBeforeRoute:l}=a,u="onBeforeRoute";r={hookFilePath:o,hookFn:l,hookName:u,hookTimeout:ue(u)}}"filesystemRoutingRoot"in a&&(h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} should be a string.`),h(y(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:Qi(o),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function Qi(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=F(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function Zi(e,t){const{length:n}=e;return e=e.filter(r=>r!==t),s(e.length===n-1),e}function Zt(){const e="/ts-react-vike-start";return s(eo(e)),e}function eo(e){return e.startsWith("/")}const he=C("createPageContext.ts",{});async function en(e){he.pageFilesData||(he.pageFilesData=await yr(!0));const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=he.pageFilesData,{pageRoutes:o,onBeforeRouteHook:a}=await Ki(t,r,i,n),l=Zt();s(Oe(l));const c={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:l,_isProduction:!0,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:a};return Mt(c),c}function tn(e){const t=e.getAttribute("href");return!!(t===null||t===""||qr(t)||no(e)||ro(t)||!io(t)||!ke(t)||!to(e))}function to(e){if(oo()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function no(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function ro(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function io(e){const t=Zt();s(Oe(t));const{hasBaseServer:n}=K(e,t);return n}function oo(){return!!window._disableAutomaticLinkInterception}function so(e,t){let n=ao(e,t);return n==="viewport"&&!e._isProduction&&($e(!1,"Viewport prefetching is disabled in development",{onlyOnce:!0}),n="hover"),{prefetchStaticAssets:n}}function ao(e,t){{const n=lo(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&h(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";h(A(n),r);const i=Object.keys(n);h(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const a=o.toLowerCase();return v(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${a}' instead`,{onlyOnce:!0}),a}h(!1,r)}return"hover"}function lo(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(h(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;h(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),v(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";h(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const nn=new Map;function uo(e){const t=rn(e);return nn.has(t)}function co(e){const t=rn(e);nn.set(t,!0)}function rn(e){return K(e,"/").pathname}function U(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function fo({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(l=>l.pageId===n&&l.fileType===".page")?(i(),!1):!(!t.some(l=>l.pageId===n&&l.fileType===".page.server")||e.some(l=>l.pageId===n&&l.fileType===".page.client"&&U(l).includes("render")))}function i(){const a=e.some(l=>U(l).includes("render"));h(a,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((l,u)=>` (${u+1}): ${l.filePath}`)].join(` `)].join(" "))}function o(){return e.some(l=>U(l).includes("clientRouting"))}}function go({pageFilesClientSide:e,pageFilesServerSide:t,isHtmlOnly:n,isClientRouting:r}){let i=[];const o=t.filter(l=>!e.includes(l)),a=[];if(a.push(...e.map(l=>({id:l.filePath,onlyAssets:!1,eagerlyImported:!1}))),a.push(...o.map(l=>({id:l.filePath,onlyAssets:!0,eagerlyImported:!1}))),n)i=e.map(l=>l.filePath);else{const l=ho(r);a.push({id:l,onlyAssets:!1,eagerlyImported:!1}),i=[l]}return{clientEntries:i,clientDependencies:a}}function ho(e){return e?"@@vike/dist/esm/client/client-routing-runtime/entry.js":"@@vike/dist/esm/client/server-routing-runtime/entry.js"}function po(e,t){let n=Fe(e,t);const r=$t(e,t),{isHtmlOnly:i,isClientRouting:o}=fo({pageFilesClientSide:n,pageFilesServerSide:r,pageId:t});i&&(n=n.filter(u=>u.isEnv("CLIENT_ONLY")&&!U(u).includes("render")),n=yo(n));const{clientEntries:a,clientDependencies:l}=go({pageFilesClientSide:n,pageFilesServerSide:r,isHtmlOnly:i,isClientRouting:o});return{isHtmlOnly:i,isClientRouting:o,clientEntries:a,clientDependencies:l,pageFilesClientSide:n,pageFilesServerSide:r}}async function mo(e,t,{sharedPageFilesAlreadyLoaded:n}){const r=Fe(e,t);await Promise.all(r.map(async i=>{var o;s(i.isEnv("CLIENT_ONLY")||i.isEnv("CLIENT_AND_SERVER")),!(n&&i.isEnv("CLIENT_AND_SERVER"))&&await((o=i.loadExportNames)==null?void 0:o.call(i))}))}function yo(e){const t=[];for(const n of e)if(t.push(n),U(n).includes("overrideDefaultPages"))break;return t}function bo(e,t,n){var r,i;if(e){const o=((r=D(e,"clientRouting","boolean"))==null?void 0:r.value)??!1;return{isClientSideRenderable:((i=D(e,"isClientSideRenderable","boolean"))==null?void 0:i.value)??!1,isClientRouting:o}}else{const{isHtmlOnly:o,isClientRouting:a}=po(t,n);return{isClientSideRenderable:!o,isClientRouting:a}}}async function on(e,t){await mo(t._pageFilesAll,e,{sharedPageFilesAlreadyLoaded:!1});const n=Ht(t._pageConfigs,e),{isClientSideRenderable:r,isClientRouting:i}=bo(n,t._pageFilesAll,e);return r&&i}const sn="@",Pe=":";function wo(e,t="Invalid"){let n=`${t} Route String ${L(e)}`;h(e!=="",`${n} (empty string): set it to ${L("/")} instead`),h(["/","*"].includes(e[0]),`${n}: it should start with ${L("/")} or ${L("*")}`),h(!e.includes("**"),`${n}: set it to ${L(e.split("**").join("*"))} instead`)}function ve(e,t){wo(e);const n=an(e),r=n.map(f=>f.param?"[^/]+":f.glob?f.isLastDir?"|/.*":".*":Dn(f.static)).map(f=>`(${f})`).join(""),i=new RegExp(`^${r}/?$`),o=t.match(i);if(!o)return null;const a={},[l,...u]=o;let c=0;const g=n.filter(f=>f.glob).length>1;return n.forEach((f,d)=>{let m=u[d];if(f.param&&(a[f.param]=m),f.glob){const S=`*${g?++c:""}`;f.isLastDir&&(m=m.slice(1)),a[S]=m}}),{routeParams:a}}function an(e){const t=[],n=i=>{const o=t[t.length-1];o!=null&&o.static?o.static+=i:t.push({static:i})},r=e.split("/");return r.forEach((i,o)=>{const a=o===0,l=o===r.length-1;So(i)?(v(!i.startsWith(Pe),`Outdated Route String ${L(e)}, use ${L(e.split(Pe).join(sn))} instead`,{onlyOnce:!0}),a||n("/"),t.push({param:i.slice(1)})):i==="*"&&l&&e!=="*"&&e!=="/*"?t.push({glob:!0,isLastDir:!0}):(a||n("/"),i.split("*").forEach((u,c)=>{c!==0&&t.push({glob:!0}),u!==""&&n(u)}))}),t}function ee(e){const t=an(e),n=l=>(l==null?void 0:l.split("/").filter(Boolean).length)||0;let r=0;for(const l of t){if(!l.static)break;r+=n(l.static)}const i=t.map(l=>n(l.static)).reduce((l,u)=>l+u,0),o=t.filter(l=>l.param).length,a=t.filter(l=>l.glob).length;return{numberOfStaticPartsBeginning:r,numberOfStaticParts:i,numberOfParams:o,numberOfGlobs:a}}function So(e){return e.startsWith(sn)||e.startsWith(Pe)}function ot(e){const n=ve(e,e);return s(n),Object.keys(n.routeParams).length===0}function L(e){return W()?`'${e}'`:(e===""&&(e="''"),p.cyan(e))}function Po(e){e.sort(vo).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence<0)).sort(j(t=>t.routeType==="STRING"&&ot(t.routeString)===!1)).sort(j(t=>t.routeType==="FUNCTION"&&!t.precedence)).sort(j(t=>t.routeType==="STRING"&&ot(t.routeString)===!0)).sort(j(t=>t.routeType==="FILESYSTEM")).sort(j(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence>0))}function vo(e,t){{const n=e.precedence??0,r=t.precedence??0;if(n!==r)return n>r?-1:1}if(!t.routeString||!e.routeString)return 0;{const r=ne(i=>ee(i).numberOfStaticPartsBeginning)(e.routeString,t.routeString);if(r!==0)return r}{const r=ne(i=>ee(i).numberOfStaticParts)(e.routeString,t.routeString);if(r!==0)return r}{const r=Ln(i=>ee(i).numberOfGlobs)(e.routeString,t.routeString);if(r!==0)return r}{const r=ne(i=>ee(i).numberOfParams)(e.routeString,t.routeString);if(r!==0)return r}return 0}async function Ro(e){const t={};if(!e._onBeforeRouteHook)return null;const n=await Eo(e._onBeforeRouteHook,e);return n&&(w(t,n),y(t,"_pageId","string")||y(t,"_pageId","null"))?(y(t,"routeParams")?s(y(t,"routeParams","object")):w(t,{routeParams:{}}),w(t,{_routingProvidedByOnBeforeRouteHook:!0,_debugRouteMatches:"CUSTOM_ROUTING"}),t):(w(t,{_routingProvidedByOnBeforeRouteHook:!1}),t)}async function Eo(e,t){let n=e.hookFn(t);Xt(n,`The onBeforeRoute() hook ${e.hookFilePath}`),n=await H(()=>n,e);const r=`The onBeforeRoute() hook defined by ${e.hookFilePath}`;if(h(n==null||Ci(n,["pageContext"])&&y(n,"pageContext"),`${r} should return ${p.cyan("null")}, ${p.cyan("undefined")}, or a plain JavaScript object ${p.cyan("{ pageContext: { /* ... */ } }")}`),n==null)return null;if(h(y(n,"pageContext","object"),`${r} returned ${p.cyan("{ pageContext }")} but pageContext should be a plain JavaScript object.`),y(n.pageContext,"_pageId")&&!y(n.pageContext,"_pageId","null")){const a=`${r} returned ${p.cyan("{ pageContext: { _pageId } }")} but ${p.cyan("_pageId")} should be`;h(y(n.pageContext,"_pageId","string"),`${a} a string or null`),h(t._allPageIds.includes(n.pageContext._pageId),`${a} ${ki(t._allPageIds.map(l=>p.cyan(l)),"or")}`)}y(n.pageContext,"routeParams")&&Qt(n.pageContext,`${r} returned ${p.cyan("{ pageContext: { routeParams } }")} but routeParams should`);const i=a=>`${r} returned ${p.cyan(`{ pageContext: { ${a} } }`)} which is deprecated. Return ${p.cyan("{ pageContext: { urlLogical } }")} instead.`;y(n.pageContext,"url")&&(v(!1,i("url"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.url,delete n.pageContext.url),y(n.pageContext,"urlOriginal")&&(v(!1,i("urlOriginal"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.urlOriginal,delete n.pageContext.urlOriginal),y(n.pageContext,"urlLogical")&&kn(n.pageContext.urlLogical,`${r} returned ${p.cyan("{ pageContext: { urlLogical } }")} but ${p.cyan("urlLogical")}`),Vt(n.pageContext,{hookFilePath:e.hookFilePath,hookName:"onBeforeRoute"});const o={};return w(o,n.pageContext),o}var te;function st(...e){var t;te||(te=(t=globalThis.__brillout_debug_createDebugger)==null?void 0:t.call(globalThis,"vike:routing")),te&&te(...e)}W()&&M();async function ln(e){st("Pages routes:",e._pageRoutes),Mt(e);const t={},n=await Ro(e);if(n){if(n._routingProvidedByOnBeforeRouteHook)return s(n._pageId),n;w(t,n)}const r={};w(r,e),w(r,n);const i=r._allPageIds;s(i.length>=0),h(r._pageFilesAll.length>0||r._pageConfigs.length>0,"No *.page.js file found. You must create at least one *.page.js file."),h(i.length>0,"You must create at least one *.page.js file that isn't _default.page.*");const{urlPathname:o}=r;s(o.startsWith("/"));const a=[];await Promise.all(r._pageRoutes.map(async u=>{const{pageId:c,routeType:g}=u;if(u.routeType==="FILESYSTEM"){const{routeString:f}=u,d=ve(f,o);if(d){const{routeParams:m}=d;a.push({pageId:c,routeParams:m,routeString:f,routeType:g})}return}if(u.routeType==="STRING"){const{routeString:f}=u,d=ve(f,o);if(d){const{routeParams:m}=d;s(g==="STRING"),a.push({pageId:c,routeString:f,routeParams:m,routeType:g})}return}if(u.routeType==="FUNCTION"){const{routeFunction:f,routeDefinedAt:d}=u,m=await Mi(f,r,d);if(m){const{routeParams:S,precedence:k}=m;a.push({pageId:c,precedence:k,routeParams:S,routeType:g})}return}s(!1)})),Po(a);const l=a[0];if(st(`Route matches for URL ${p.cyan(o)} (in precedence order):`,a),w(t,{_debugRouteMatches:a}),!l)return w(t,{_pageId:null,routeParams:{}}),t;{const{routeParams:u}=l;s(A(u)),w(t,{_pageId:l.pageId,routeParams:l.routeParams})}return t}M();const at=C("prefetch.ts",{linkPrefetchHandlerAdded:new Map});async function _o(e,t){try{await We(e,t)}catch(n){if(Be(n))Re(n,!0);else throw n}}function Co(e){co(e.urlPathname),[...document.getElementsByTagName("A")].forEach(n=>{if(at.linkPrefetchHandlerAdded.has(n))return;at.linkPrefetchHandlerAdded.set(n,!0);const r=n.getAttribute("href");if(tn(n)||(s(r),uo(r)))return;const{prefetchStaticAssets:i}=so(e,n);if(i&&(i==="hover"&&(n.addEventListener("mouseover",()=>{pe(r)}),n.addEventListener("touchstart",()=>{pe(r)},{passive:!0})),i==="viewport")){const o=new IntersectionObserver(a=>{a.forEach(l=>{l.isIntersecting&&(pe(r),o.disconnect())})});o.observe(n)}})}async function pe(e){const t=await en(e);let n;try{n=await ln(t)}catch{return}n!=null&&n._pageId&&await on(n._pageId,t)&&await _o(n._pageId,t)}async function $o(e,t){const n=He(e,t);let r=null,i;r=I(e,"render"),i="render";{const l=I(e,"onRenderClient");l&&(r=l,i="onRenderClient")}if(!r){const l=ko(e);if(s(l),e._pageConfigs.length>0)h(!1,`No onRenderClient() hook defined for URL '${l}', but it's needed, see https://vike.dev/onRenderClient`);else{const u=e._pageFilesLoaded.filter(g=>g.fileType===".page.client");let c;u.length===0?c="No file `*.page.client.*` found for URL "+l:c="One of the following files should export a render() hook: "+u.map(g=>g.filePath).join(" "),h(!1,c)}}s(r);const o=r.hookFn;s(i);const a=await H(()=>o(n),r);h(a===void 0,`The ${i}() hook defined by ${r.hookFilePath} isn't allowed to return a value`)}function ko(e){let t;try{t=e.urlPathname??e.urlOriginal}catch{}return t=t??window.location.href,t}function un(e){if(e==="preserve-scroll")return;let t;if(e==="scroll-to-top-or-hash"){const n=To();if(n&&n!=="top"){const r=document.getElementById(n)||document.getElementsByName(n)[0];if(r){r.scrollIntoView();return}}t={x:0,y:0}}else s("x"in e&&"y"in e),t=e;Oo(t)}function Oo(e){const t=()=>window.scrollTo(e.x,e.y),n=()=>window.scrollX===e.x&&window.scrollY===e.y;n()||(t(),!n()&&requestAnimationFrame(()=>{t(),!n()&&setTimeout(async()=>{if(t(),n())return;const r=new Date().getTime();for(;;)if(await Yr(10),t(),n()||new Date().getTime()-r>100)return},0)}))}function To(){let{hash:e}=window.location;return e===""?null:(s(e.startsWith("#")),e=e.slice(1),e)}function Fo(){window.addEventListener("scroll",Mr(et,Math.ceil(1e3/3)),{passive:!0}),It(et)}const V=C("onBrowserHistoryNavigation.ts",{previousState:oe()});function xo(){window.addEventListener("popstate",e=>{const t=oe(),n=t.historyState.scrollPosition||"scroll-to-top-or-hash",r=t.historyState.triggedBy==="user",i=t.urlWithoutHash===V.previousState.urlWithoutHash,o=!t.historyState.timestamp||!V.previousState.historyState.timestamp?null:t.historyState.timestampcn.initialRenderIsDone&&Ve())}function jo(){cn.initialRenderIsDone=!0}function Ve(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")}function lt(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto")}const P=C("renderPageClientSide.ts",{renderCounter:0});async function G(e){var De;const{scrollTarget:t,urlOriginal:n=Ie(),overwriteLastHistoryEntry:r=!1,isBackwardNavigation:i,pageContextsFromRewrite:o=[],redirectCount:a=0,isUserLandPushStateNavigation:l,isClientSideNavigation:u=!0}=e,{abortRender:c,setHydrationCanBeAborted:g,isFirstRender:f}=Ho();if(s(u===!f),Li(o.length,a),P.clientRoutingIsDisabled){re(n);return}const d=await en(n);if(c())return;w(d,{isBackwardNavigation:i,isClientSideNavigation:u});{const b=Ai(o);w(d,b)}let m={};const S=b=>{s(b),s(!("err"in m)),s(!("errorWhileRendering"in d)),m.err=b,d.errorWhileRendering=b};if(!f){try{m={pageContextFromRoute:await ln(d)}}catch(b){S(b)}if(c())return;if(m.pageContextFromRoute){const{pageContextFromRoute:b}=m;w(d,b);let _;if(!b._pageId)_=!1;else if(_=await on(b._pageId,d),c())return;if(!_){re(n);return}const O=b._pageId&&((De=P.previousPageContext)==null?void 0:De._pageId)&&b._pageId===P.previousPageContext._pageId;if(l&&O)return}}const k=!f;if(k&&!P.isTransitioning){if(P.onPageTransitionStart){const b=P.onPageTransitionStart,{hookFn:_}=b;await H(()=>_(d),b)}if(P.isTransitioning=!0,c())return}if(f){s(!m.pageContextFromRoute),s(!m.err);try{m.pageContextFromHooks=await Ni(d)}catch(b){S(b)}if(c())return}else if(!m.err){const{pageContextFromRoute:b}=m;s(b),s(b._pageId),s(y(b,"_pageId","string")),w(d,b);try{m.pageContextFromHooks=await Wi(d)}catch(_){S(_)}if(c())return}if("err"in m){const{err:b}=m;if(nt(b)||console.error(b),ut(b,d,f))return;if(nt(b)){const _=b;Ii(b,d._isProduction,d);const O=_._pageContextAbort;if(O._urlRewrite){await G({...e,scrollTarget:"scroll-to-top-or-hash",pageContextsFromRewrite:[...o,O]});return}if(O._urlRedirect){const ce=O._urlRedirect.url;if(ce.startsWith("http")){window.location.href=ce;return}else await G({...e,scrollTarget:"scroll-to-top-or-hash",urlOriginal:ce,overwriteLastHistoryEntry:!1,isBackwardNavigation:!1,redirectCount:a+1});return}s(O.abortStatusCode),w(d,O),O.abortStatusCode===404&&w(d,{is404:!0})}else w(d,{is404:!1});try{m.pageContextFromHooks=await Hi(d)}catch(_){if(ut(_,d,f)||(f||setTimeout(()=>{window.location.pathname=n},0),Jr(b,_)))return;throw _}if(c())return}const{pageContextFromHooks:$}=m;s($),w(d,$),ge(d,"onPageTransitionStart");const X=I(d,"onPageTransitionStart");if(P.onPageTransitionStart=X,d.exports.hydrationCanBeAborted?g():v(!Gr(),"You seem to be using React; we recommend setting hydrationCanBeAborted to true, see https://vike.dev/hydrationCanBeAborted",{onlyOnce:!0}),!c()&&!(P.renderPromise&&(await P.renderPromise,s(P.renderPromise===void 0),c()))){if(Lo(n,r),P.previousPageContext=d,s(P.renderPromise===void 0),P.renderPromise=(async()=>{await $o(d,!0),Co(d),P.renderPromise=void 0})(),await P.renderPromise,s(P.renderPromise===void 0),f){ge(d,"onHydrationEnd");const b=I(d,"onHydrationEnd");if(b){const{hookFn:_}=b;if(await H(()=>_(d),b),c(!0))return}}if(!c(!0)){if(k){ge(d,"onPageTransitionEnd");const b=I(d,"onPageTransitionEnd");if(b){const{hookFn:_}=b;if(await H(()=>_(d),b),c(!0))return}P.isTransitioning=void 0}un(t),Ve(),jo()}}}function Lo(e,t){Ie()!==e&&(Ve(),Xr(e,t),Io())}function ut(e,t,n){return!!(Di(e)||No(e,t,n))}function No(e,t,n){if(!Be(e))return!1;if(n)throw Re(e,!1),e;return Re(e,!0),re(t.urlOriginal),!0}function Re(e,t){s(Be(e)),P.clientRoutingIsDisabled=!0,t&&console.log(e),$e(!1,["Failed to fetch static asset.","This usually happens when a new frontend is deployed.","Falling back to Server Routing.","(The next page navigation will use Server Routing instead of Client Routing.)"].filter(Boolean).join(" "),{onlyOnce:!0})}function Ho(){const e=++P.renderCounter;s(e>=1);let t=!1;return{abortRender:i=>!i&&e===1&&!t?!1:e!==P.renderCounter,setHydrationCanBeAborted:()=>{t=!0},isFirstRender:e===1}}function ct(){return P.renderCounter}function Wo(){document.addEventListener("click",Bo)}function Bo(e){if(!Vo(e))return;const t=Do(e.target);if(!t)return;const n=t.getAttribute("href");if(tn(t))return;s(n),e.preventDefault();const i=![null,"false"].includes(t.getAttribute("keep-scroll-position"))?"preserve-scroll":"scroll-to-top-or-hash";G({scrollTarget:i,urlOriginal:n,isBackwardNavigation:!1})}function Vo(e){return e.button===0&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}function Do(e){for(;e.tagName!=="A";){const{parentNode:t}=e;if(!t)return null;e=t}return e}function zo(){Ao(),At(),Fo(),Zr(),s(ct()===0),G({scrollTarget:"preserve-scroll",isBackwardNavigation:null,isClientSideNavigation:!1}),s(ct()===1),Wo(),xo()}M();const Uo=!0;mn(Uo);zo(); function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/entries/pages_index.FevcZLva.js","assets/chunks/chunk-YdKTaHBu.js","assets/static/onPageTransitionEnd.89EVb9i9.css","assets/entries/pages_features.FWzRNCzS.js","assets/entries/pages_error.gBrDUOP9.js"] + __vite__mapDeps.viteFileDeps = ["assets/entries/pages_features.ZsXsBJPr.js","assets/chunks/chunk-IHE30XRr.js","assets/static/onPageTransitionEnd.89EVb9i9.css","assets/entries/pages_index.82xpb2fo.js","assets/entries/pages_error.8VM0xDBl.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } \ No newline at end of file diff --git a/assets/entries/pages_error.gBrDUOP9.js b/assets/entries/pages_error.8VM0xDBl.js similarity index 94% rename from assets/entries/pages_error.gBrDUOP9.js rename to assets/entries/pages_error.8VM0xDBl.js index 9a5d40e..0a64ea8 100644 --- a/assets/entries/pages_error.gBrDUOP9.js +++ b/assets/entries/pages_error.8VM0xDBl.js @@ -1 +1 @@ -import{j as e,i as n,b as o,c as i}from"../chunks/chunk-YdKTaHBu.js";const a=({is404:r,errorInfo:t})=>r?e.jsxs(e.Fragment,{children:[e.jsx("h1",{children:"404 Page Not Found"}),e.jsx("p",{children:"This page could not be found."}),e.jsx("p",{children:t})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{children:"500 Internal Server Error"}),e.jsx("p",{children:"Something went wrong."})]}),l=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"})),d=[{configName:"onRenderClient",importPath:"/renderer/+onRenderClient.tsx",isValueFile:!0,exportValues:n},{configName:"onPageTransitionStart",importPath:"/renderer/+onPageTransitionStart.ts",isValueFile:!0,exportValues:o},{configName:"onPageTransitionEnd",importPath:"/renderer/+onPageTransitionEnd.ts",isValueFile:!0,exportValues:i},{configName:"Page",importPath:"/pages/_error/+Page.tsx",isValueFile:!0,exportValues:l}],u={onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},dataEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"}};export{d as configValuesImported,u as configValuesSerialized}; +import{j as e,i as n,a as o,b as i}from"../chunks/chunk-IHE30XRr.js";const a=({is404:r,errorInfo:t})=>r?e.jsxs(e.Fragment,{children:[e.jsx("h1",{children:"404 Page Not Found"}),e.jsx("p",{children:"This page could not be found."}),e.jsx("p",{children:t})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{children:"500 Internal Server Error"}),e.jsx("p",{children:"Something went wrong."})]}),l=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"})),d=[{configName:"onRenderClient",importPath:"/renderer/+onRenderClient.tsx",isValueFile:!0,exportValues:n},{configName:"onPageTransitionStart",importPath:"/renderer/+onPageTransitionStart.ts",isValueFile:!0,exportValues:o},{configName:"onPageTransitionEnd",importPath:"/renderer/+onPageTransitionEnd.ts",isValueFile:!0,exportValues:i},{configName:"Page",importPath:"/pages/_error/+Page.tsx",isValueFile:!0,exportValues:l}],u={onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},dataEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"}};export{d as configValuesImported,u as configValuesSerialized}; diff --git a/assets/entries/pages_features.FWzRNCzS.js b/assets/entries/pages_features.ZsXsBJPr.js similarity index 93% rename from assets/entries/pages_features.FWzRNCzS.js rename to assets/entries/pages_features.ZsXsBJPr.js index 8b382b6..4e6adcd 100644 --- a/assets/entries/pages_features.FWzRNCzS.js +++ b/assets/entries/pages_features.ZsXsBJPr.js @@ -1 +1 @@ -import{j as e,B as i,L as t,i as s,b as r,c as n}from"../chunks/chunk-YdKTaHBu.js";const o=()=>e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-3xl mb-4",id:"usage",children:"Preconditions"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-10",children:[e.jsx(i,{children:"npm, pnpm or yarn"}),e.jsxs(i,{children:[e.jsx(t,{href:"https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig",children:"editorconfig"}),"vs code extension"]}),e.jsxs(i,{children:[e.jsx(t,{href:"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",children:"prettier"}),"vs code extension"]}),e.jsxs(i,{children:[e.jsx(t,{href:"https://unocss.dev/integrations/vscode",children:"unocss"}),"vs code extension"]})]}),e.jsx("h2",{className:"mb-4 text-3xl",id:"usage",children:"Features"}),e.jsxs("div",{className:"grid grid-cols-2 mb-10 gap-3 md:grid-cols-3",children:[e.jsxs(i,{children:[e.jsx("span",{children:"👏 "}),e.jsx(t,{href:"https://github.com/facebook/react",children:"React"})," +"," ",e.jsx(t,{href:"https://github.com/vikejs/vike",children:"Vike"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🎨 "}),e.jsx(t,{href:"https://github.com/unocss/unocss",children:"Uno CSS"})]}),e.jsxs(i,{children:["✍️ ",e.jsx(t,{href:"https://github.com/fontsource/fontsource",children:"@fontsource"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🎛️ "})," Custom Theme Hook"]}),e.jsxs(i,{children:[e.jsx("span",{children:"💫 "})," ",e.jsx(t,{href:"https://github.com/lucide-icons/lucide",children:"lucide-react"})," icons"]}),e.jsxs(i,{children:[e.jsx("span",{children:"🤌 "})," Strict"," ",e.jsx(t,{href:"https://github.com/eslint/eslint",children:"eslint"})," setup"]}),e.jsxs(i,{children:[e.jsx("span",{children:"💄 "}),e.jsx(t,{href:"https://github.com/prettier/prettier",children:"Prettier"})," +"," ",e.jsx(t,{href:"https://github.com/trivago/prettier-plugin-sort-imports",children:"Prettier Sort Imports"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🚨 "}),e.jsx(t,{href:"https://github.com/typicode/husky",children:"Husky"})," +"," ",e.jsx(t,{href:"https://github.com/lint-staged/lint-staged",children:"lint-staged"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"⚙️ "}),e.jsx(t,{href:"https://github.com/editorconfig/editorconfig",children:"editorconfig"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🚓 "}),e.jsx(t,{href:"https://github.com/microsoft/TypeScript",children:"Typescript"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🌊 "}),e.jsx(t,{href:"https://github.com/brillout/react-streaming",children:"React 18 Streaming"})," ","enabled"]})]})]}),d=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"})),c=[{configName:"onRenderClient",importPath:"/renderer/+onRenderClient.tsx",isValueFile:!0,exportValues:s},{configName:"onPageTransitionStart",importPath:"/renderer/+onPageTransitionStart.ts",isValueFile:!0,exportValues:r},{configName:"onPageTransitionEnd",importPath:"/renderer/+onPageTransitionEnd.ts",isValueFile:!0,exportValues:n},{configName:"Page",importPath:"/pages/features/+Page.tsx",isValueFile:!0,exportValues:d}],l={onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},dataEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"},title:{definedAt:{filePathToShowToUser:"/pages/features/+config.h.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:'"Features & Preconditions | ts-react-vike-start"'},description:{definedAt:{filePathToShowToUser:"/pages/features/+config.h.ts",fileExportPathToShowToUser:["default","description"]},valueSerialized:'"A list of features and preconditions to get TS-React working in Vite + Vike (Vite SSR) with HMR and handful of strict ESLint rules. I want to add to work with properly in my side projects."'}};export{c as configValuesImported,l as configValuesSerialized}; +import{j as e,B as i,L as t,i as s,a as r,b as n}from"../chunks/chunk-IHE30XRr.js";const o=()=>e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-3xl mb-4",id:"usage",children:"Preconditions"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-10",children:[e.jsx(i,{children:"npm, pnpm or yarn"}),e.jsxs(i,{children:[e.jsx(t,{href:"https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig",children:"editorconfig"}),"vs code extension"]}),e.jsxs(i,{children:[e.jsx(t,{href:"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",children:"prettier"}),"vs code extension"]}),e.jsxs(i,{children:[e.jsx(t,{href:"https://unocss.dev/integrations/vscode",children:"unocss"}),"vs code extension"]})]}),e.jsx("h2",{className:"mb-4 text-3xl",id:"usage",children:"Features"}),e.jsxs("div",{className:"grid grid-cols-2 mb-10 gap-3 md:grid-cols-3",children:[e.jsxs(i,{children:[e.jsx("span",{children:"👏 "}),e.jsx(t,{href:"https://github.com/facebook/react",children:"React"})," +"," ",e.jsx(t,{href:"https://github.com/vikejs/vike",children:"Vike"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🎨 "}),e.jsx(t,{href:"https://github.com/unocss/unocss",children:"Uno CSS"})]}),e.jsxs(i,{children:["✍️ ",e.jsx(t,{href:"https://github.com/fontsource/fontsource",children:"@fontsource"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🎛️ "})," Custom Theme Hook"]}),e.jsxs(i,{children:[e.jsx("span",{children:"💫 "})," ",e.jsx(t,{href:"https://github.com/lucide-icons/lucide",children:"lucide-react"})," icons"]}),e.jsxs(i,{children:[e.jsx("span",{children:"🤌 "})," Strict"," ",e.jsx(t,{href:"https://github.com/eslint/eslint",children:"eslint"})," setup"]}),e.jsxs(i,{children:[e.jsx("span",{children:"💄 "}),e.jsx(t,{href:"https://github.com/prettier/prettier",children:"Prettier"})," +"," ",e.jsx(t,{href:"https://github.com/trivago/prettier-plugin-sort-imports",children:"Prettier Sort Imports"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🚨 "}),e.jsx(t,{href:"https://github.com/typicode/husky",children:"Husky"})," +"," ",e.jsx(t,{href:"https://github.com/lint-staged/lint-staged",children:"lint-staged"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"⚙️ "}),e.jsx(t,{href:"https://github.com/editorconfig/editorconfig",children:"editorconfig"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🚓 "}),e.jsx(t,{href:"https://github.com/microsoft/TypeScript",children:"Typescript"})]}),e.jsxs(i,{children:[e.jsx("span",{children:"🌊 "}),e.jsx(t,{href:"https://github.com/brillout/react-streaming",children:"React 18 Streaming"})," ","enabled"]})]})]}),a=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"})),c=[{configName:"onRenderClient",importPath:"/renderer/+onRenderClient.tsx",isValueFile:!0,exportValues:s},{configName:"onPageTransitionStart",importPath:"/renderer/+onPageTransitionStart.ts",isValueFile:!0,exportValues:r},{configName:"onPageTransitionEnd",importPath:"/renderer/+onPageTransitionEnd.ts",isValueFile:!0,exportValues:n},{configName:"Page",importPath:"/pages/features/+Page.tsx",isValueFile:!0,exportValues:a}],l={onBeforeRenderEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},dataEnv:{definedAt:{isComputed:!0},valueSerialized:"null"},hydrationCanBeAborted:{definedAt:{filePathToShowToUser:"/renderer/+config.h.ts",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:"true"},title:{definedAt:{filePathToShowToUser:"/pages/features/+config.h.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:'"Features & Preconditions | ts-react-vike-start"'},description:{definedAt:{filePathToShowToUser:"/pages/features/+config.h.ts",fileExportPathToShowToUser:["default","description"]},valueSerialized:'"A list of features and preconditions to get TS-React working in Vite + Vike (Vite SSR) with HMR and handful of strict ESLint rules. I want to add to work with properly in my side projects."'}};export{c as configValuesImported,l as configValuesSerialized}; diff --git a/assets/entries/pages_index.FevcZLva.js b/assets/entries/pages_index.82xpb2fo.js similarity index 96% rename from assets/entries/pages_index.FevcZLva.js rename to assets/entries/pages_index.82xpb2fo.js index e5b6d01..fc1d3c6 100644 --- a/assets/entries/pages_index.FevcZLva.js +++ b/assets/entries/pages_index.82xpb2fo.js @@ -1,4 +1,4 @@ -import{F as o,j as e,B as t,I as i,a as r,i as s,b as l,c as d}from"../chunks/chunk-YdKTaHBu.js";const n=o.h3` +import{F as o,j as e,B as t,I as i,c as r,i as s,a as l,b as d}from"../chunks/chunk-IHE30XRr.js";const n=o.h3` flex gap-2 justify-between diff --git a/features/index.html b/features/index.html index bfbf47e..d331c8d 100644 --- a/features/index.html +++ b/features/index.html @@ -13,8 +13,8 @@

ts-react-vike-start

React + Vike + TS

Tailwind CSS + ESLint + Prettier

Just another SSR-ready vite-react starter template with some sugar from my usual friends tailwind, lucide-icons and a strict linting setup. React 18 Streaming enabled (Server / Client) 🌊

Test the client-side navigation =>

Preconditions

npm, pnpm or yarn
editorconfigvs code extension
prettiervs code extension
unocssvs code extension

Features

👏 React + Vike
🎨 Uno CSS
🎛️ Custom Theme Hook
💫 lucide-react icons
🤌 Strict eslint setup
🌊 React 18 Streaming enabled
- - - + + + \ No newline at end of file diff --git a/index.html b/index.html index 02a31fe..98de439 100644 --- a/index.html +++ b/index.html @@ -13,8 +13,8 @@

ts-react-vike-start

React + Vike + TS

Tailwind CSS + ESLint + Prettier

Just another SSR-ready vite-react starter template with some sugar from my usual friends tailwind, lucide-icons and a strict linting setup. React 18 Streaming enabled (Server / Client) 🌊

Test the client-side navigation =>

Usage

Installation

clone repo and:
run npm install in root

Local Dev

Start local dev server with
npm run dev

Build

build production ready copy to dist folder:
npm run build

Preview

Preview the build from dist folder:
npm run preview

- - - + + + \ No newline at end of file