radames's picture
static
64ae803
raw
history blame
27.5 kB
import{S as Ye,i as Xe,s as Ze,a as Qe,e as T,c as xe,b as F,g as X,t as D,d as Z,f as V,h as B,j as et,o as ke,k as tt,l as nt,m as rt,n as be,p as H,q as at,r as ot,u as st,v as J,w as G,x as ae,y as K,z,A as Be}from"./chunks/index-4b3edc7c.js";import{g as Fe,f as Je,s as Y,a as Ee,b as it,i as lt}from"./chunks/singletons-417a4827.js";function ct(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&!r.endsWith("/")?r+"/":r}function ft(r){for(const e in r)r[e]=r[e].replace(/%23/g,"#").replace(/%3[Bb]/g,";").replace(/%2[Cc]/g,",").replace(/%2[Ff]/g,"/").replace(/%3[Ff]/g,"?").replace(/%3[Aa]/g,":").replace(/%40/g,"@").replace(/%26/g,"&").replace(/%3[Dd]/g,"=").replace(/%2[Bb]/g,"+").replace(/%24/g,"$");return r}const ut=["href","pathname","search","searchParams","toString","toJSON"];function pt(r,e){const n=new URL(r);for(const o of ut){let a=n[o];Object.defineProperty(n,o,{get(){return e(),a},enumerable:!0,configurable:!0})}return n[Symbol.for("nodejs.util.inspect.custom")]=(o,a,l)=>l(r,a),dt(n),n}function dt(r){Object.defineProperty(r,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}function ht(r){let e=5381;if(typeof r=="string"){let n=r.length;for(;n;)e=e*33^r.charCodeAt(--n)}else if(ArrayBuffer.isView(r)){const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);let o=n.length;for(;o;)e=e*33^n[--o]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const pe=window.fetch;window.fetch=(r,e)=>{if((r instanceof Request?r.method:(e==null?void 0:e.method)||"GET")!=="GET"){const o=new URL(r instanceof Request?r.url:r.toString(),document.baseURI).href;ue.delete(o)}return pe(r,e)};const ue=new Map;function mt(r,e,n){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(r instanceof Request?r.url:r)}]`;(n==null?void 0:n.body)&&(typeof n.body=="string"||ArrayBuffer.isView(n.body))&&(a+=`[data-hash="${ht(n.body)}"]`);const l=document.querySelector(a);if(l!=null&&l.textContent){const{body:t,...i}=JSON.parse(l.textContent),f=l.getAttribute("data-ttl");return f&&ue.set(e,{body:t,init:i,ttl:1e3*Number(f)}),Promise.resolve(new Response(t,i))}return pe(r,n)}function _t(r,e){const n=ue.get(r);if(n){if(performance.now()<n.ttl)return new Response(n.body,n.init);ue.delete(r)}return pe(r,e)}const gt=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function wt(r){const e=[],n=[];let o=!0;return{pattern:r===""?/^\/$/:new RegExp(`^${r.split(/(?:\/|$)/).filter(yt).map((l,t,i)=>{const f=decodeURIComponent(l),d=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(f);if(d)return e.push(d[1]),n.push(d[2]),"(?:/(.*))?";const g=t===i.length-1;return f&&"/"+f.split(/\[(.+?)\]/).map((y,U)=>{if(U%2){const k=gt.exec(y);if(!k)throw new Error(`Invalid param: ${y}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,C,M,q]=k;return e.push(M),n.push(q),C?"(.*?)":"([^/]+?)"}return g&&y.includes(".")&&(o=!1),y.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${o?"/?":""}$`),names:e,types:n}}function yt(r){return!/^\([^)]+\)$/.test(r)}function bt(r,e,n,o){const a={};for(let l=0;l<e.length;l+=1){const t=e[l],i=n[l],f=r[l+1]||"";if(i){const d=o[i];if(!d)throw new Error(`Missing "${i}" param matcher`);if(!d(f))return}a[t]=f}return a}function vt(r,e,n,o){const a=new Set(e);return Object.entries(n).map(([i,[f,d,g]])=>{const{pattern:y,names:U,types:k}=wt(i),C={id:i,exec:M=>{const q=y.exec(M);if(q)return bt(q,U,k,o)},errors:[1,...g||[]].map(M=>r[M]),layouts:[0,...d||[]].map(t),leaf:l(f)};return C.errors.length=C.layouts.length=Math.max(C.errors.length,C.layouts.length),C});function l(i){const f=i<0;return f&&(i=~i),[f,r[i]]}function t(i){return i===void 0?i:[a.has(i),r[i]]}}function kt(r){let e,n,o;var a=r[0][0];function l(t){return{props:{data:t[2],form:t[1]}}}return a&&(e=J(a,l(r))),{c(){e&&G(e.$$.fragment),n=T()},l(t){e&&ae(e.$$.fragment,t),n=T()},m(t,i){e&&K(e,t,i),F(t,n,i),o=!0},p(t,i){const f={};if(i&4&&(f.data=t[2]),i&2&&(f.form=t[1]),a!==(a=t[0][0])){if(e){X();const d=e;D(d.$$.fragment,1,0,()=>{z(d,1)}),Z()}a?(e=J(a,l(t)),G(e.$$.fragment),V(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(f)},i(t){o||(e&&V(e.$$.fragment,t),o=!0)},o(t){e&&D(e.$$.fragment,t),o=!1},d(t){t&&B(n),e&&z(e,t)}}}function Et(r){let e,n,o;var a=r[0][0];function l(t){return{props:{data:t[2],$$slots:{default:[Ot]},$$scope:{ctx:t}}}}return a&&(e=J(a,l(r))),{c(){e&&G(e.$$.fragment),n=T()},l(t){e&&ae(e.$$.fragment,t),n=T()},m(t,i){e&&K(e,t,i),F(t,n,i),o=!0},p(t,i){const f={};if(i&4&&(f.data=t[2]),i&1051&&(f.$$scope={dirty:i,ctx:t}),a!==(a=t[0][0])){if(e){X();const d=e;D(d.$$.fragment,1,0,()=>{z(d,1)}),Z()}a?(e=J(a,l(t)),G(e.$$.fragment),V(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(f)},i(t){o||(e&&V(e.$$.fragment,t),o=!0)},o(t){e&&D(e.$$.fragment,t),o=!1},d(t){t&&B(n),e&&z(e,t)}}}function $t(r){let e,n,o;var a=r[0][1];function l(t){return{props:{data:t[3],form:t[1]}}}return a&&(e=J(a,l(r))),{c(){e&&G(e.$$.fragment),n=T()},l(t){e&&ae(e.$$.fragment,t),n=T()},m(t,i){e&&K(e,t,i),F(t,n,i),o=!0},p(t,i){const f={};if(i&8&&(f.data=t[3]),i&2&&(f.form=t[1]),a!==(a=t[0][1])){if(e){X();const d=e;D(d.$$.fragment,1,0,()=>{z(d,1)}),Z()}a?(e=J(a,l(t)),G(e.$$.fragment),V(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(f)},i(t){o||(e&&V(e.$$.fragment,t),o=!0)},o(t){e&&D(e.$$.fragment,t),o=!1},d(t){t&&B(n),e&&z(e,t)}}}function Rt(r){let e,n,o;var a=r[0][1];function l(t){return{props:{data:t[3],$$slots:{default:[St]},$$scope:{ctx:t}}}}return a&&(e=J(a,l(r))),{c(){e&&G(e.$$.fragment),n=T()},l(t){e&&ae(e.$$.fragment,t),n=T()},m(t,i){e&&K(e,t,i),F(t,n,i),o=!0},p(t,i){const f={};if(i&8&&(f.data=t[3]),i&1043&&(f.$$scope={dirty:i,ctx:t}),a!==(a=t[0][1])){if(e){X();const d=e;D(d.$$.fragment,1,0,()=>{z(d,1)}),Z()}a?(e=J(a,l(t)),G(e.$$.fragment),V(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(f)},i(t){o||(e&&V(e.$$.fragment,t),o=!0)},o(t){e&&D(e.$$.fragment,t),o=!1},d(t){t&&B(n),e&&z(e,t)}}}function St(r){let e,n,o;var a=r[0][2];function l(t){return{props:{data:t[4],form:t[1]}}}return a&&(e=J(a,l(r))),{c(){e&&G(e.$$.fragment),n=T()},l(t){e&&ae(e.$$.fragment,t),n=T()},m(t,i){e&&K(e,t,i),F(t,n,i),o=!0},p(t,i){const f={};if(i&16&&(f.data=t[4]),i&2&&(f.form=t[1]),a!==(a=t[0][2])){if(e){X();const d=e;D(d.$$.fragment,1,0,()=>{z(d,1)}),Z()}a?(e=J(a,l(t)),G(e.$$.fragment),V(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(f)},i(t){o||(e&&V(e.$$.fragment,t),o=!0)},o(t){e&&D(e.$$.fragment,t),o=!1},d(t){t&&B(n),e&&z(e,t)}}}function Ot(r){let e,n,o,a;const l=[Rt,$t],t=[];function i(f,d){return f[0][2]?0:1}return e=i(r),n=t[e]=l[e](r),{c(){n.c(),o=T()},l(f){n.l(f),o=T()},m(f,d){t[e].m(f,d),F(f,o,d),a=!0},p(f,d){let g=e;e=i(f),e===g?t[e].p(f,d):(X(),D(t[g],1,1,()=>{t[g]=null}),Z(),n=t[e],n?n.p(f,d):(n=t[e]=l[e](f),n.c()),V(n,1),n.m(o.parentNode,o))},i(f){a||(V(n),a=!0)},o(f){D(n),a=!1},d(f){t[e].d(f),f&&B(o)}}}function Ge(r){let e,n=r[6]&&Ke(r);return{c(){e=tt("div"),n&&n.c(),this.h()},l(o){e=nt(o,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var a=rt(e);n&&n.l(a),a.forEach(B),this.h()},h(){be(e,"id","svelte-announcer"),be(e,"aria-live","assertive"),be(e,"aria-atomic","true"),H(e,"position","absolute"),H(e,"left","0"),H(e,"top","0"),H(e,"clip","rect(0 0 0 0)"),H(e,"clip-path","inset(50%)"),H(e,"overflow","hidden"),H(e,"white-space","nowrap"),H(e,"width","1px"),H(e,"height","1px")},m(o,a){F(o,e,a),n&&n.m(e,null)},p(o,a){o[6]?n?n.p(o,a):(n=Ke(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(o){o&&B(e),n&&n.d()}}}function Ke(r){let e;return{c(){e=at(r[7])},l(n){e=ot(n,r[7])},m(n,o){F(n,e,o)},p(n,o){o&128&&st(e,n[7])},d(n){n&&B(e)}}}function Lt(r){let e,n,o,a,l;const t=[Et,kt],i=[];function f(g,y){return g[0][1]?0:1}e=f(r),n=i[e]=t[e](r);let d=r[5]&&Ge(r);return{c(){n.c(),o=Qe(),d&&d.c(),a=T()},l(g){n.l(g),o=xe(g),d&&d.l(g),a=T()},m(g,y){i[e].m(g,y),F(g,o,y),d&&d.m(g,y),F(g,a,y),l=!0},p(g,[y]){let U=e;e=f(g),e===U?i[e].p(g,y):(X(),D(i[U],1,1,()=>{i[U]=null}),Z(),n=i[e],n?n.p(g,y):(n=i[e]=t[e](g),n.c()),V(n,1),n.m(o.parentNode,o)),g[5]?d?d.p(g,y):(d=Ge(g),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},i(g){l||(V(n),l=!0)},o(g){D(n),l=!1},d(g){i[e].d(g),g&&B(o),d&&d.d(g),g&&B(a)}}}function It(r,e,n){let{stores:o}=e,{page:a}=e,{components:l}=e,{form:t}=e,{data_0:i=null}=e,{data_1:f=null}=e,{data_2:d=null}=e;et(o.page.notify);let g=!1,y=!1,U=null;return ke(()=>{const k=o.page.subscribe(()=>{g&&(n(6,y=!0),n(7,U=document.title||"untitled page"))});return n(5,g=!0),k}),r.$$set=k=>{"stores"in k&&n(8,o=k.stores),"page"in k&&n(9,a=k.page),"components"in k&&n(0,l=k.components),"form"in k&&n(1,t=k.form),"data_0"in k&&n(2,i=k.data_0),"data_1"in k&&n(3,f=k.data_1),"data_2"in k&&n(4,d=k.data_2)},r.$$.update=()=>{r.$$.dirty&768&&o.page.set(a)},[l,t,i,f,d,g,y,U,o,a]}class Nt extends Ye{constructor(e){super(),Xe(this,e,It,Lt,Ze,{stores:8,page:9,components:0,form:1,data_0:2,data_1:3,data_2:4})}}const jt=function(){const e=document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),At=function(r,e){return new URL(r,e).href},ze={},te=function(e,n,o){return!n||n.length===0?e():Promise.all(n.map(a=>{if(a=At(a,o),a in ze)return;ze[a]=!0;const l=a.endsWith(".css"),t=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${t}`))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":jt,l||(i.as="script",i.crossOrigin=""),i.href=a,document.head.appendChild(i),l)return new Promise((f,d)=>{i.addEventListener("load",f),i.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())},Pt={},de=[()=>te(()=>import("./chunks/0-44d1e017.js"),["chunks/0-44d1e017.js","components/pages/_layout.svelte-798ee4f5.js","assets/app-a867e11d.css","chunks/index-4b3edc7c.js"],import.meta.url),()=>te(()=>import("./chunks/1-2d7e1e8c.js"),["chunks/1-2d7e1e8c.js","components/error.svelte-4b5d4e03.js","chunks/index-4b3edc7c.js","chunks/stores-8b40e86a.js","chunks/singletons-417a4827.js","chunks/index-f611e2e3.js"],import.meta.url),()=>te(()=>import("./chunks/2-121c4bf3.js"),["chunks/2-121c4bf3.js","components/pages/_/_layout.svelte-e1e512de.js","assets/app-a867e11d.css","chunks/index-4b3edc7c.js"],import.meta.url),()=>te(()=>import("./chunks/3-9adc748c.js"),["chunks/3-9adc748c.js","chunks/_page-5ebac806.js","chunks/store-29c2f555.js","chunks/index-f611e2e3.js","chunks/index-4b3edc7c.js","components/pages/_page.svelte-8fe72707.js","chunks/App-b4e90bcb.js","assets/App-ef755855.css","chunks/stores-8b40e86a.js","chunks/singletons-417a4827.js"],import.meta.url),()=>te(()=>import("./chunks/4-48e0fa9a.js"),["chunks/4-48e0fa9a.js","chunks/_page-0c68c67b.js","chunks/store-29c2f555.js","chunks/index-f611e2e3.js","chunks/index-4b3edc7c.js","components/pages/_/_page.svelte-a6955271.js","chunks/App-b4e90bcb.js","assets/App-ef755855.css","chunks/stores-8b40e86a.js","chunks/singletons-417a4827.js"],import.meta.url)],Ut=[],Tt={"":[3],"+":[4,[2]]},Dt={handleError:({error:r})=>{console.error(r)}};class $e{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Me{constructor(e,n){this.status=e,this.location=n}}const Vt="/__data.json";async function qt(r){var e;for(const n in r)if(typeof((e=r[n])==null?void 0:e.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(r).map(async([o,a])=>[o,await a])));return r}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");const Ct=-1,Bt=-2,Ft=-3,Jt=-4,Gt=-5,Kt=-6;function zt(r){const e=JSON.parse(r);if(typeof e=="number")return a(e);const n=e,o=Array(n.length);function a(l){if(l===Ct)return;if(l===Ft)return NaN;if(l===Jt)return 1/0;if(l===Gt)return-1/0;if(l===Kt)return-0;if(l in o)return o[l];const t=n[l];if(!t||typeof t!="object")o[l]=t;else if(Array.isArray(t))if(typeof t[0]=="string")switch(t[0]){case"Date":o[l]=new Date(t[1]);break;case"Set":const f=new Set;o[l]=f;for(let y=1;y<t.length;y+=1)f.add(a(t[y]));break;case"Map":const d=new Map;o[l]=d;for(let y=1;y<t.length;y+=2)d.set(a(t[y]),a(t[y+1]));break;case"RegExp":o[l]=new RegExp(t[1],t[2]);break;case"Object":o[l]=Object(t[1]);break;case"BigInt":o[l]=BigInt(t[1]);break;case"null":const g=Object.create(null);o[l]=g;for(let y=1;y<t.length;y+=2)g[t[y]]=a(t[y+1]);break}else{const i=new Array(t.length);o[l]=i;for(let f=0;f<t.length;f+=1){const d=t[f];d!==Bt&&(i[f]=a(d))}}else{const i={};o[l]=i;for(const f in t){const d=t[f];i[f]=a(d)}}return o[l]}return a(0)}const We="sveltekit:scroll",W="sveltekit:index",le=vt(de,Ut,Tt,Pt),Re=de[0],Se=de[1];Re();Se();let re={};try{re=JSON.parse(sessionStorage[We])}catch{}function ve(r){re[r]=Ee()}function Mt({target:r,base:e,trailing_slash:n}){var Ve;const o=[];let a=null;const l={before_navigate:[],after_navigate:[]};let t={branch:[],error:null,url:null},i=!1,f=!1,d=!0,g=!1,y=!1,U,k=(Ve=history.state)==null?void 0:Ve[W];k||(k=Date.now(),history.replaceState({...history.state,[W]:k},"",location.href));const C=re[k];C&&(history.scrollRestoration="manual",scrollTo(C.x,C.y));let M=!1,q,Oe,oe;async function Le(){oe=oe||Promise.resolve(),await oe,oe=null;const s=new URL(location.href),p=ge(s,!0);a=null,await Ne(p,s,[])}async function he(s,{noscroll:p=!1,replaceState:h=!1,keepfocus:c=!1,state:u={}},m,_){return typeof s=="string"&&(s=new URL(s,Fe(document))),we({url:s,scroll:p?Ee():null,keepfocus:c,redirect_chain:m,details:{state:u,replaceState:h},nav_token:_,accepted:()=>{},blocked:()=>{},type:"goto"})}async function Ie(s){const p=ge(s,!1);if(!p)throw new Error("Attempted to prefetch a URL that does not belong to this app");return a={id:p.id,promise:Pe(p)},a.promise}async function Ne(s,p,h,c,u={},m){var $,E;Oe=u;let _=s&&await Pe(s);if(_||(_=await De(p,null,ne(new Error(`Not found: ${p.pathname}`),{url:p,params:{},routeId:null}),404)),p=(s==null?void 0:s.url)||p,Oe!==u)return!1;if(_.type==="redirect")if(h.length>10||h.includes(p.pathname))_=await se({status:500,error:ne(new Error("Redirect loop"),{url:p,params:{},routeId:null}),url:p,routeId:null});else return he(new URL(_.location,p).href,{},[...h,p.pathname],u),!1;else((E=($=_.props)==null?void 0:$.page)==null?void 0:E.status)>=400&&await Y.updated.check()&&await ie(p);if(o.length=0,y=!1,g=!0,c&&c.details){const{details:b}=c,v=b.replaceState?0:1;b.state[W]=k+=v,history[b.replaceState?"replaceState":"pushState"](b.state,"",p)}if(a=null,f){t=_.state,_.props.page&&(_.props.page.url=p);const b=fe();U.$set(_.props),b()}else je(_);if(c){const{scroll:b,keepfocus:v}=c;if(!v){const S=document.body,L=S.getAttribute("tabindex");S.tabIndex=-1,S.focus({preventScroll:!0}),setTimeout(()=>{var I;(I=getSelection())==null||I.removeAllRanges()}),L!==null?S.setAttribute("tabindex",L):S.removeAttribute("tabindex")}if(await Be(),d){const S=p.hash&&document.getElementById(p.hash.slice(1));b?scrollTo(b.x,b.y):S?S.scrollIntoView():scrollTo(0,0)}}else await Be();d=!0,_.props.page&&(q=_.props.page),m&&m(),g=!1}function je(s){var u,m;t=s.state;const p=document.querySelector("style[data-sveltekit]");p&&p.remove(),q=s.props.page;const h=fe();U=new Nt({target:r,props:{...s.props,stores:Y},hydrate:!0}),h();const c={from:null,to:ce("to",{params:t.params,routeId:(m=(u=t.route)==null?void 0:u.id)!=null?m:null,url:new URL(location.href)}),type:"load"};l.after_navigate.forEach(_=>_(c)),f=!0}async function x({url:s,params:p,branch:h,status:c,error:u,route:m,form:_}){var L;const $=h.filter(Boolean),E={type:"loaded",state:{url:s,params:p,branch:h,error:u,route:m},props:{components:$.map(I=>I.node.component)}};_!==void 0&&(E.props.form=_);let b={},v=!q;for(let I=0;I<$.length;I+=1){const A=$[I];b={...b,...A.data},(v||!t.branch.some(P=>P===A))&&(E.props[`data_${I}`]=b,v=v||Object.keys((L=A.data)!=null?L:{}).length>0)}if(v||(v=Object.keys(q.data).length!==Object.keys(b).length),!t.url||s.href!==t.url.href||t.error!==u||_!==void 0||v){E.props.page={error:u,params:p,routeId:m&&m.id,status:c,url:s,form:_,data:v?b:q.data};const I=(A,P)=>{Object.defineProperty(E.props.page,A,{get:()=>{throw new Error(`$page.${A} has been replaced by $page.url.${P}`)}})};I("origin","origin"),I("path","pathname"),I("query","searchParams")}return E}async function me({loader:s,parent:p,url:h,params:c,routeId:u,server_data_node:m}){var b,v,S,L,I;let _=null;const $={dependencies:new Set,params:new Set,parent:!1,url:!1},E=await s();if((b=E.shared)!=null&&b.load){let A=function(...O){for(const w of O){const{href:R}=new URL(w,h);$.dependencies.add(R)}};const P={routeId:u,params:new Proxy(c,{get:(O,w)=>($.params.add(w),O[w])}),data:(v=m==null?void 0:m.data)!=null?v:null,url:pt(h,()=>{$.url=!0}),async fetch(O,w){let R;O instanceof Request?(R=O.url,w={body:O.method==="GET"||O.method==="HEAD"?void 0:await O.blob(),cache:O.cache,credentials:O.credentials,headers:O.headers,integrity:O.integrity,keepalive:O.keepalive,method:O.method,mode:O.mode,redirect:O.redirect,referrer:O.referrer,referrerPolicy:O.referrerPolicy,signal:O.signal,...w}):R=O;const j=new URL(R,h).href;return A(j),f?_t(j,w):mt(R,j,w)},setHeaders:()=>{},depends:A,parent(){return $.parent=!0,p()}};Object.defineProperties(P,{props:{get(){throw new Error("@migration task: Replace `props` with `data` stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1},session:{get(){throw new Error("session is no longer available. See https://github.com/sveltejs/kit/discussions/5883")},enumerable:!1},stuff:{get(){throw new Error("@migration task: Remove stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1}}),_=(S=await E.shared.load.call(null,P))!=null?S:null,_=_?await qt(_):null}return{node:E,loader:s,server:m,shared:(L=E.shared)!=null&&L.load?{type:"data",data:_,uses:$}:null,data:(I=_!=null?_:m==null?void 0:m.data)!=null?I:null}}function Ae(s,p,h,c){if(y)return!0;if(!h)return!1;if(h.parent&&p||h.url&&s)return!0;for(const u of h.params)if(c[u]!==t.params[u])return!0;for(const u of h.dependencies)if(o.some(m=>m(new URL(u))))return!0;return!1}function _e(s,p){var h,c;return(s==null?void 0:s.type)==="data"?{type:"data",data:s.data,uses:{dependencies:new Set((h=s.uses.dependencies)!=null?h:[]),params:new Set((c=s.uses.params)!=null?c:[]),parent:!!s.uses.parent,url:!!s.uses.url}}:(s==null?void 0:s.type)==="skip"&&p!=null?p:null}async function Pe({id:s,invalidating:p,url:h,params:c,route:u}){var O;if((a==null?void 0:a.id)===s)return a.promise;const{errors:m,layouts:_,leaf:$}=u,E=[..._,$];m.forEach(w=>w==null?void 0:w().catch(()=>{})),E.forEach(w=>w==null?void 0:w[1]().catch(()=>{}));let b=null;const v=t.url?s!==t.url.pathname+t.url.search:!1,S=E.reduce((w,R,j)=>{var ee;const N=t.branch[j],Q=!!(R!=null&&R[0])&&((N==null?void 0:N.loader)!==R[1]||Ae(v,w.some(Boolean),(ee=N.server)==null?void 0:ee.uses,c));return w.push(Q),w},[]);if(S.some(Boolean)){try{b=await He(h,S)}catch(w){return se({status:500,error:ne(w,{url:h,params:c,routeId:u.id}),url:h,routeId:u.id})}if(b.type==="redirect")return b}const L=b==null?void 0:b.nodes;let I=!1;const A=E.map(async(w,R)=>{var ee;if(!w)return;const j=t.branch[R],N=L==null?void 0:L[R];if((!N||N.type==="skip")&&w[1]===(j==null?void 0:j.loader)&&!Ae(v,I,(ee=j.shared)==null?void 0:ee.uses,c))return j;if(I=!0,(N==null?void 0:N.type)==="error")throw N;return me({loader:w[1],url:h,params:c,routeId:u.id,parent:async()=>{var Ce;const qe={};for(let ye=0;ye<R;ye+=1)Object.assign(qe,(Ce=await A[ye])==null?void 0:Ce.data);return qe},server_data_node:_e(N===void 0&&w[0]?{type:"skip"}:N!=null?N:null,j==null?void 0:j.server)})});for(const w of A)w.catch(()=>{});const P=[];for(let w=0;w<E.length;w+=1)if(E[w])try{P.push(await A[w])}catch(R){if(R instanceof Me)return{type:"redirect",location:R.location};let j=500,N;L!=null&&L.includes(R)?(j=(O=R.status)!=null?O:j,N=R.error):R instanceof $e?(j=R.status,N=R.body):N=ne(R,{params:c,url:h,routeId:u.id});const Q=await Ue(w,P,m);return Q?await x({url:h,params:c,branch:P.slice(0,Q.idx).concat(Q.node),status:j,error:N,route:u}):await De(h,u.id,N,j)}else P.push(void 0);return await x({url:h,params:c,branch:P,status:200,error:null,route:u,form:p?void 0:null})}async function Ue(s,p,h){for(;s--;)if(h[s]){let c=s;for(;!p[c];)c-=1;try{return{idx:c+1,node:{node:await h[s](),loader:h[s],data:{},server:null,shared:null}}}catch{continue}}}async function se({status:s,error:p,url:h,routeId:c}){var b;const u={},m=await Re();let _=null;if(m.server)try{const v=await He(h,[!0]);if(v.type!=="data"||v.nodes[0]&&v.nodes[0].type!=="data")throw 0;_=(b=v.nodes[0])!=null?b:null}catch{(h.origin!==location.origin||h.pathname!==location.pathname||i)&&await ie(h)}const $=await me({loader:Re,url:h,params:u,routeId:c,parent:()=>Promise.resolve({}),server_data_node:_e(_)}),E={node:await Se(),loader:Se,shared:null,server:null,data:null};return await x({url:h,params:u,branch:[$,E],status:s,error:p,route:null})}function ge(s,p){if(Te(s))return;const h=decodeURI(s.pathname.slice(e.length)||"/");for(const c of le){const u=c.exec(h);if(u){const m=new URL(s.origin+ct(s.pathname,n)+s.search+s.hash);return{id:m.pathname+m.search,invalidating:p,route:c,params:ft(u),url:m}}}}function Te(s){return s.origin!==location.origin||!s.pathname.startsWith(e)}async function we({url:s,scroll:p,keepfocus:h,redirect_chain:c,details:u,type:m,delta:_,nav_token:$,accepted:E,blocked:b}){var A,P,O,w;let v=!1;const S=ge(s,!1),L={from:ce("from",{params:t.params,routeId:(P=(A=t.route)==null?void 0:A.id)!=null?P:null,url:t.url}),to:ce("to",{params:(O=S==null?void 0:S.params)!=null?O:null,routeId:(w=S==null?void 0:S.route.id)!=null?w:null,url:s}),type:m};_!==void 0&&(L.delta=_);const I={...L,cancel:()=>{v=!0}};if(l.before_navigate.forEach(R=>R(I)),v){b();return}ve(k),E(),f&&Y.navigating.set(L),await Ne(S,s,c,{scroll:p,keepfocus:h,details:u},$,()=>{l.after_navigate.forEach(R=>R(L)),Y.navigating.set(null)})}async function De(s,p,h,c){return s.origin===location.origin&&s.pathname===location.pathname&&!i?await se({status:c,error:h,url:s,routeId:p}):await ie(s)}function ie(s){return location.href=s.href,new Promise(()=>{})}return{after_navigate:s=>{ke(()=>(l.after_navigate.push(s),()=>{const p=l.after_navigate.indexOf(s);l.after_navigate.splice(p,1)}))},before_navigate:s=>{ke(()=>(l.before_navigate.push(s),()=>{const p=l.before_navigate.indexOf(s);l.before_navigate.splice(p,1)}))},disable_scroll_handling:()=>{(g||!f)&&(d=!1)},goto:(s,p={})=>he(s,p,[]),invalidate:s=>{if(s===void 0)throw new Error("`invalidate()` (with no arguments) has been replaced by `invalidateAll()`");if(typeof s=="function")o.push(s);else{const{href:p}=new URL(s,location.href);o.push(h=>h.href===p)}return Le()},invalidateAll:()=>(y=!0,Le()),prefetch:async s=>{const p=new URL(s,Fe(document));await Ie(p)},prefetch_routes:async s=>{const h=(s?le.filter(c=>s.some(u=>c.exec(u))):le).map(c=>Promise.all([...c.layouts,c.leaf].map(u=>u==null?void 0:u[1]())));await Promise.all(h)},apply_action:async s=>{if(s.type==="error"){const p=new URL(location.href),{branch:h,route:c}=t;if(!c)return;const u=await Ue(t.branch.length,h,c.errors);if(u){const m=await x({url:p,params:t.params,branch:h.slice(0,u.idx).concat(u.node),status:500,error:s.error,route:c});t=m.state;const _=fe();U.$set(m.props),_()}}else if(s.type==="redirect")he(s.location,{},[]);else{const p={form:s.data,page:{...q,form:s.data,status:s.status}},h=fe();U.$set(p),h()}},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",c=>{var _,$;let u=!1;const m={from:ce("from",{params:t.params,routeId:($=(_=t.route)==null?void 0:_.id)!=null?$:null,url:t.url}),to:null,type:"unload",cancel:()=>u=!0};l.before_navigate.forEach(E=>E(m)),u?(c.preventDefault(),c.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ve(k);try{sessionStorage[We]=JSON.stringify(re)}catch{}}});const s=c=>{const{url:u,options:m}=Je(c);if(u&&m.prefetch){if(Te(u))return;Ie(u)}};let p;const h=c=>{clearTimeout(p),p=setTimeout(()=>{var u;(u=c.target)==null||u.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",s),addEventListener("mousemove",h),addEventListener("sveltekit:trigger_prefetch",s),addEventListener("click",c=>{if(c.button||c.which!==1||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey||c.defaultPrevented)return;const{a:u,url:m,options:_}=Je(c);if(!u||!m)return;const $=u instanceof SVGAElement;if(!$&&m.protocol!==location.protocol&&!(m.protocol==="https:"||m.protocol==="http:"))return;const E=(u.getAttribute("rel")||"").split(/\s+/);if(u.hasAttribute("download")||E.includes("external")||_.reload||($?u.target.baseVal:u.target))return;const[b,v]=m.href.split("#");if(v!==void 0&&b===location.href.split("#")[0]){M=!0,ve(k),t.url=m,Y.page.set({...q,url:m}),Y.page.notify();return}we({url:m,scroll:_.noscroll?Ee():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:m.href===location.href},accepted:()=>c.preventDefault(),blocked:()=>c.preventDefault(),type:"link"})}),addEventListener("popstate",c=>{if(c.state){if(c.state[W]===k)return;const u=c.state[W]-k;we({url:new URL(location.href),scroll:re[c.state[W]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{k=c.state[W]},blocked:()=>{history.go(-u)},type:"popstate",delta:u})}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[W]:++k},"",location.href))});for(const c of document.querySelectorAll("link"))c.rel==="icon"&&(c.href=c.href);addEventListener("pageshow",c=>{c.persisted&&Y.navigating.set(null)})},_hydrate:async({status:s,error:p,node_ids:h,params:c,routeId:u,data:m,form:_})=>{var b;i=!0;const $=new URL(location.href);let E;try{const v=h.map(async(S,L)=>{const I=m[L];return me({loader:de[S],url:$,params:c,routeId:u,parent:async()=>{const A={};for(let P=0;P<L;P+=1)Object.assign(A,(await v[P]).data);return A},server_data_node:_e(I)})});E=await x({url:$,params:c,branch:await Promise.all(v),status:s,error:p,form:_,route:(b=le.find(S=>S.id===u))!=null?b:null})}catch(v){if(v instanceof Me){await ie(new URL(v.location,location.href));return}E=await se({status:v instanceof $e?v.status:500,error:ne(v,{url:$,params:c,routeId:u}),url:$,routeId:u})}je(E)}}}async function He(r,e){const n=new URL(r);n.pathname=r.pathname.replace(/\/$/,"")+Vt;const o=await pe(n.href,{headers:{"x-sveltekit-invalidated":e.map(l=>l?"1":"").join(",")}}),a=await o.text();if(!o.ok)throw new Error(JSON.parse(a));return zt(a)}function ne(r,e){var n;return r instanceof $e?r.body:(n=Dt.handleError({error:r,event:e}))!=null?n:{message:e.routeId!=null?"Internal Error":"Not Found"}}const Ht=["hash","href","host","hostname","origin","pathname","port","protocol","search","searchParams","toString","toJSON"];function ce(r,e){for(const n of Ht)Object.defineProperty(e,n,{get(){throw new Error(`The navigation shape changed - ${r}.${n} should now be ${r}.url.${n}`)},enumerable:!1});return e}function fe(){return()=>{}}async function Xt({env:r,hydrate:e,paths:n,target:o,trailing_slash:a}){it(n);const l=Mt({target:o,base:n.base,trailing_slash:a});lt({client:l}),e?await l._hydrate(e):l.goto(location.href,{replaceState:!0}),l._start_router()}export{Xt as start};