@aopslabs/aops-server 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES +92 -18
- package/THIRD_PARTY_NOTICES.inventory.json +42 -32
- package/build/client/_app/immutable/chunks/BCjjBhRV.js +1 -0
- package/build/client/_app/immutable/entry/{app.DekpYahB.js → app.6eWjPiTT.js} +2 -2
- package/build/client/_app/immutable/entry/start.D3gplTQc.js +1 -0
- package/build/client/_app/immutable/nodes/{1.C_m2PfHM.js → 1.BvMAhla4.js} +1 -1
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{internal.js-DfNDnSaz.js → internal.js-AMt3g8E7.js} +1 -1
- package/build/server/chunks/{handler-BJwWMzoK.js → handler-BqsTaaMZ.js} +2 -2
- package/build/server/chunks/{index.js-lf8q_rBQ.js → index.js-uhRu7SLL.js} +1 -1
- package/build/server/chunks/{manifest.js-BbSaGAoy.js → manifest.js-Dn5-mn6R.js} +2 -2
- package/build/server/chunks/nodes/{1.js-DzchJAL9.js → 1.js-ClI9U15j.js} +1 -1
- package/cockpit/.vite/manifest.json +2 -2
- package/cockpit/assets/index-CVNHK-Vk.js +18 -0
- package/cockpit/assets/{index-B2e2Kw5U.css → index-DRAd9oM3.css} +1 -1
- package/cockpit/community.module-inventory.json +209 -199
- package/cockpit/index.html +2 -2
- package/npm-shrinkwrap.json +42 -35
- package/package.json +7 -6
- package/runtime-closure.package.json +15 -13
- package/scripts/community-agent-wake-endpoint.mjs +329 -0
- package/scripts/community-host.mjs +185 -1
- package/build/client/_app/immutable/chunks/DSpwhhgJ.js +0 -1
- package/build/client/_app/immutable/entry/start.DBrQBcQx.js +0 -1
- package/cockpit/assets/index-DjTrHh8F.js +0 -18
|
@@ -12,6 +12,17 @@ import { createServer, request as httpRequest } from "node:http";
|
|
|
12
12
|
import { isIP } from "node:net";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import { pathToFileURL } from "node:url";
|
|
15
|
+
import { wakeAgentSession as wakeLocalAgentSession } from "@aopslabs/aops-agent-runtime";
|
|
16
|
+
import {
|
|
17
|
+
COMMUNITY_AGENT_WAKE_ACTION_PATH,
|
|
18
|
+
COMMUNITY_AGENT_WAKE_CAPABILITY_PATH,
|
|
19
|
+
createCommunityAgentWakeContext,
|
|
20
|
+
handleCommunityAgentWakeRequest,
|
|
21
|
+
} from "./community-agent-wake-endpoint.mjs";
|
|
22
|
+
|
|
23
|
+
// Imported by the host process (never from the browser bundle or CLI package).
|
|
24
|
+
// S3 binds this runtime-keyed adapter to the authenticated loopback endpoint.
|
|
25
|
+
export const communityHostAgentWakeAdapter = wakeLocalAgentSession;
|
|
15
26
|
|
|
16
27
|
export const COMMUNITY_HOST_MODES = Object.freeze({
|
|
17
28
|
native: "direct-loopback",
|
|
@@ -29,6 +40,8 @@ const DEFAULT_OCI_INTERNAL_PORT = "5901";
|
|
|
29
40
|
const DEFAULT_COCKPIT_PORT = "5922";
|
|
30
41
|
const TRUSTED_LOCAL_AUTH_PROVIDER = "trusted-local";
|
|
31
42
|
const VALIDATED_PUBLIC_ORIGIN_HEADER = "x-aops-validated-public-origin";
|
|
43
|
+
const AGENT_WAKE_ADMISSION_TIMEOUT_MS = 1_500;
|
|
44
|
+
const AGENT_WAKE_ADMISSION_MAX_BYTES = 1024 * 1024;
|
|
32
45
|
const PACKAGE_STATIC_ROOT = path.resolve(import.meta.dirname, "../cockpit");
|
|
33
46
|
const CHECKOUT_STATIC_ROOT = path.resolve(import.meta.dirname, "../../aops-cockpit-v2/dist");
|
|
34
47
|
const DEFAULT_PATHS = Object.freeze({
|
|
@@ -624,6 +637,144 @@ export function proxyCommunityRequest(req, res, config, browserOriginPresent) {
|
|
|
624
637
|
req.pipe(upstream);
|
|
625
638
|
}
|
|
626
639
|
|
|
640
|
+
function requestCommunityAgentWakeAdmission(config, pathName, headers) {
|
|
641
|
+
return new Promise((resolve, reject) => {
|
|
642
|
+
const upstream = httpRequest({
|
|
643
|
+
hostname: config.internalHost,
|
|
644
|
+
port: config.internalPort,
|
|
645
|
+
method: "GET",
|
|
646
|
+
path: pathName,
|
|
647
|
+
headers,
|
|
648
|
+
}, (response) => {
|
|
649
|
+
const chunks = [];
|
|
650
|
+
let bytes = 0;
|
|
651
|
+
response.on("data", (chunk) => {
|
|
652
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
653
|
+
bytes += buffer.length;
|
|
654
|
+
if (bytes > AGENT_WAKE_ADMISSION_MAX_BYTES) {
|
|
655
|
+
upstream.destroy(new Error("community_agent_wake_admission_response_too_large"));
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
chunks.push(buffer);
|
|
659
|
+
});
|
|
660
|
+
response.once("end", () => {
|
|
661
|
+
try {
|
|
662
|
+
const text = Buffer.concat(chunks).toString("utf8");
|
|
663
|
+
const payload = text ? JSON.parse(text) : null;
|
|
664
|
+
resolve({ status: response.statusCode ?? 500, payload });
|
|
665
|
+
} catch {
|
|
666
|
+
reject(new Error("community_agent_wake_admission_response_invalid"));
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
response.once("error", reject);
|
|
670
|
+
});
|
|
671
|
+
upstream.setTimeout(AGENT_WAKE_ADMISSION_TIMEOUT_MS, () => {
|
|
672
|
+
upstream.destroy(new Error("community_agent_wake_admission_timeout"));
|
|
673
|
+
});
|
|
674
|
+
upstream.once("error", reject);
|
|
675
|
+
upstream.end();
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
function memberAdmissionError(payload) {
|
|
680
|
+
const structuredReason = [
|
|
681
|
+
payload?.details?.memberAuthReason,
|
|
682
|
+
payload?.data?.details?.memberAuthReason,
|
|
683
|
+
payload?.error?.details?.memberAuthReason,
|
|
684
|
+
payload?.data?.error?.details?.memberAuthReason,
|
|
685
|
+
].find((value) => typeof value === "string");
|
|
686
|
+
const structuredCodes = {
|
|
687
|
+
member_token_required: "agent_wake_member_token_required",
|
|
688
|
+
member_token_invalid_format: "agent_wake_member_token_invalid_format",
|
|
689
|
+
member_token_unknown: "agent_wake_member_token_unknown",
|
|
690
|
+
member_token_mismatch: "agent_wake_member_token_mismatch",
|
|
691
|
+
membership_inactive: "agent_wake_member_not_active",
|
|
692
|
+
membership_channel_mismatch: "agent_wake_member_cross_channel",
|
|
693
|
+
};
|
|
694
|
+
if (structuredReason && structuredCodes[structuredReason]) {
|
|
695
|
+
return structuredCodes[structuredReason];
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
// Mixed-version trusted-local fallback only. Current released ChatV3 hosts
|
|
699
|
+
// do not yet emit memberAuthReason; remove after the package uptake window.
|
|
700
|
+
const detail = [
|
|
701
|
+
payload?.message,
|
|
702
|
+
payload?.error,
|
|
703
|
+
payload?.detail,
|
|
704
|
+
payload?.data?.message,
|
|
705
|
+
payload?.data?.error,
|
|
706
|
+
].filter((value) => typeof value === "string").join(" ").toLowerCase();
|
|
707
|
+
if (detail.includes("invalid member token format")) return "agent_wake_member_token_invalid_format";
|
|
708
|
+
if (detail.includes("unknown member token")) return "agent_wake_member_token_unknown";
|
|
709
|
+
if (detail.includes("member token mismatch")) return "agent_wake_member_token_mismatch";
|
|
710
|
+
if (detail.includes("membership is not active")) return "agent_wake_member_not_active";
|
|
711
|
+
if (detail.includes("not a member of this channel")) return "agent_wake_member_cross_channel";
|
|
712
|
+
return "agent_wake_admission_required";
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
function responseData(payload) {
|
|
716
|
+
if (payload?.ok === true && payload.data !== undefined) return payload.data;
|
|
717
|
+
if (payload?.result?.data !== undefined) return payload.result.data;
|
|
718
|
+
return payload;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function parseVerifiedMemberTokenId(memberToken) {
|
|
722
|
+
const match = /^cv3m_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})_[A-Za-z0-9_-]{16,}$/i.exec(memberToken);
|
|
723
|
+
return match?.[1] ?? null;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export async function verifyCommunityAgentWakeAdmission(req, config, selector = {}) {
|
|
727
|
+
const headers = {
|
|
728
|
+
accept: "application/json",
|
|
729
|
+
host: config.upstreamAuthority,
|
|
730
|
+
};
|
|
731
|
+
const cookie = typeof req.headers.cookie === "string" ? req.headers.cookie.trim() : "";
|
|
732
|
+
if (cookie) headers.cookie = cookie;
|
|
733
|
+
if (typeof req.headers.origin === "string" && req.headers.origin.trim()) {
|
|
734
|
+
headers.origin = config.upstreamOrigin;
|
|
735
|
+
}
|
|
736
|
+
const auth = await requestCommunityAgentWakeAdmission(config, "/api/auth/me", headers);
|
|
737
|
+
if (auth.status !== 200) throw new Error("agent_wake_admission_required");
|
|
738
|
+
const principal = auth.payload?.ok === true ? auth.payload?.data?.principal : null;
|
|
739
|
+
const principalId = nonEmpty(principal?.id) || nonEmpty(principal?.userId);
|
|
740
|
+
if (!principalId) throw new Error("agent_wake_admission_required");
|
|
741
|
+
|
|
742
|
+
const memberTokenHeader = typeof req.headers["x-chatv3-member-token"] === "string"
|
|
743
|
+
? req.headers["x-chatv3-member-token"].trim()
|
|
744
|
+
: "";
|
|
745
|
+
const memberToken = /^Bearer\s+/i.test(memberTokenHeader)
|
|
746
|
+
? memberTokenHeader.replace(/^Bearer\s+/i, "").trim()
|
|
747
|
+
: memberTokenHeader;
|
|
748
|
+
if (!memberToken) throw new Error("agent_wake_member_token_required");
|
|
749
|
+
const channelId = nonEmpty(selector.channelId);
|
|
750
|
+
const targetMemberId = nonEmpty(selector.targetMemberId);
|
|
751
|
+
if (!channelId || !targetMemberId) throw new Error("agent_wake_target_not_active");
|
|
752
|
+
const roster = await requestCommunityAgentWakeAdmission(
|
|
753
|
+
config,
|
|
754
|
+
`/api/chatv3/v1/channels/${encodeURIComponent(channelId)}/members?status=active&limit=500`,
|
|
755
|
+
{ ...headers, "x-chatv3-member-token": memberToken },
|
|
756
|
+
);
|
|
757
|
+
if (roster.status !== 200) throw new Error(memberAdmissionError(roster.payload));
|
|
758
|
+
const callerMemberId = parseVerifiedMemberTokenId(memberToken);
|
|
759
|
+
if (!callerMemberId) throw new Error("agent_wake_member_token_invalid_format");
|
|
760
|
+
const members = responseData(roster.payload);
|
|
761
|
+
if (!Array.isArray(members)) throw new Error("agent_wake_admission_required");
|
|
762
|
+
const callerMember = members.find((member) => member?.id === callerMemberId);
|
|
763
|
+
if (!callerMember || callerMember.channelId !== channelId || callerMember.status !== "active") {
|
|
764
|
+
throw new Error("agent_wake_member_not_active");
|
|
765
|
+
}
|
|
766
|
+
const targetMember = members.find((member) => member?.id === targetMemberId);
|
|
767
|
+
if (!targetMember || targetMember.channelId !== channelId || targetMember.status !== "active") {
|
|
768
|
+
throw new Error("agent_wake_target_not_active");
|
|
769
|
+
}
|
|
770
|
+
return {
|
|
771
|
+
principalId,
|
|
772
|
+
callerMemberId,
|
|
773
|
+
callerChannelId: channelId,
|
|
774
|
+
targetMember,
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
|
|
627
778
|
function openStaticFile(filePath) {
|
|
628
779
|
const flags = fsConstants.O_RDONLY | (fsConstants.O_NOFOLLOW ?? 0);
|
|
629
780
|
const descriptor = openSync(filePath, flags);
|
|
@@ -719,7 +870,7 @@ async function loadHandler(handlerEntry) {
|
|
|
719
870
|
return loaded.handler;
|
|
720
871
|
}
|
|
721
872
|
|
|
722
|
-
export async function runCommunityHost(options, env = process.env, hostPaths = DEFAULT_PATHS) {
|
|
873
|
+
export async function runCommunityHost(options, env = process.env, hostPaths = DEFAULT_PATHS, hostRuntime = {}) {
|
|
723
874
|
const config = resolveCommunityHostConfig(options, env);
|
|
724
875
|
const cockpitOnly = config.mode === COMMUNITY_HOST_MODES.cockpit;
|
|
725
876
|
if (!cockpitOnly && env !== process.env) throw new Error("community_host_process_env_required");
|
|
@@ -734,6 +885,20 @@ export async function runCommunityHost(options, env = process.env, hostPaths = D
|
|
|
734
885
|
process.env.ORIGIN = config.handlerOrigin ?? config.publicOrigin;
|
|
735
886
|
}
|
|
736
887
|
const handler = cockpitOnly ? null : await loadHandler(paths.handlerEntry);
|
|
888
|
+
const agentWakeContext = cockpitOnly
|
|
889
|
+
? createCommunityAgentWakeContext({
|
|
890
|
+
wake: hostRuntime.wakeAgentSession ?? communityHostAgentWakeAdapter,
|
|
891
|
+
verifyAdmission: (req, selector) => (
|
|
892
|
+
hostRuntime.verifyAgentWakeAdmission
|
|
893
|
+
? hostRuntime.verifyAgentWakeAdmission(req, config, selector)
|
|
894
|
+
: verifyCommunityAgentWakeAdmission(req, config, selector)
|
|
895
|
+
),
|
|
896
|
+
registryPath: nonEmpty(env.AOPS_AGENT_WAKE_REGISTRY_PATH) || undefined,
|
|
897
|
+
securityHeaders: STATIC_SECURITY_HEADERS,
|
|
898
|
+
now: hostRuntime.agentWakeNow ?? Date.now,
|
|
899
|
+
grantTtlMs: hostRuntime.agentWakeGrantTtlMs,
|
|
900
|
+
})
|
|
901
|
+
: null;
|
|
737
902
|
let innerServer;
|
|
738
903
|
let innerSockets = new Set();
|
|
739
904
|
let edgeServer;
|
|
@@ -802,6 +967,25 @@ export async function runCommunityHost(options, env = process.env, hostPaths = D
|
|
|
802
967
|
res.end(req.method === "HEAD" ? undefined : '{"status":"healthy","service":"aops-cockpit"}');
|
|
803
968
|
return;
|
|
804
969
|
}
|
|
970
|
+
if (
|
|
971
|
+
cockpitOnly &&
|
|
972
|
+
agentWakeContext &&
|
|
973
|
+
(url.pathname === COMMUNITY_AGENT_WAKE_CAPABILITY_PATH || url.pathname === COMMUNITY_AGENT_WAKE_ACTION_PATH)
|
|
974
|
+
) {
|
|
975
|
+
void handleCommunityAgentWakeRequest(req, res, url, browser, agentWakeContext).catch(() => {
|
|
976
|
+
if (!res.headersSent) {
|
|
977
|
+
res.writeHead(500, {
|
|
978
|
+
...STATIC_SECURITY_HEADERS,
|
|
979
|
+
"content-type": "application/json; charset=utf-8",
|
|
980
|
+
"cache-control": "no-store",
|
|
981
|
+
});
|
|
982
|
+
res.end('{"ok":false,"code":"agent_wake_internal_error"}');
|
|
983
|
+
} else {
|
|
984
|
+
res.destroy();
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
805
989
|
if (
|
|
806
990
|
!shouldHandleApiPath(url.pathname) &&
|
|
807
991
|
(config.mode === COMMUNITY_HOST_MODES.oci || cockpitOnly)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aD as ve,aE as bt,aA as oe,aF as kt,aB as A,G as U,ag as T}from"./2_TffmqH.js";import{o as Be}from"./B2EkC-sy.js";const V=[];function Ae(e,t=ve){let n=null;const r=new Set;function a(o){if(bt(e,o)&&(e=o,n)){const c=!V.length;for(const l of r)l[1](),V.push(l,e);if(c){for(let l=0;l<V.length;l+=2)V[l][0](V[l+1]);V.length=0}}}function i(o){a(o(e))}function s(o,c=ve){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,i)||ve),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}const Et="8ec9dbd13f555253a1450fda1018707576832e24",L=globalThis.__sveltekit_z9ks1d?.base??"",St=globalThis.__sveltekit_z9ks1d?.assets??L??"";new URL("sveltekit-internal://");function Rt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function xt(e){return e.split("%25").map(decodeURI).join("%25")}function Lt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,Ut=/^\/\((?:[^)]+)\)$/;function Tt(e){const t=[];return{pattern:e==="/"||Ut.test(e)?/^\/$/:new RegExp(`^${Pt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return be(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return be(String.fromCharCode(...c.slice(2).split("-").map(m=>parseInt(m,16))));const u=At.exec(c),[,p,w,d,f]=u;return t.push({name:d,matcher:f,optional:!!p,rest:!!w,chained:w?l===1&&s[0]==="":!1}),w?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return be(c)}).join("")}).join("")}/?$`),params:t}}function It(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Pt(e){return e.slice(1).split("/").filter(It)}function Ot(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-s];if(c.chained&&c.rest&&s&&(l=a.slice(o-s,o+1).filter(u=>u).join("/"),s=0),l===void 0)if(c.rest)l="";else continue;if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const u=t[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(s=0),!u&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(c.optional&&c.chained){s++;continue}return}if(!s)return r}function be(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}class Ue{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Te{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Ie extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}function C(){}function $t(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Ct(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Nt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&Y.delete(Pe(e)),Nt(e,t));const Y=new Map;function jt(e,t){const n=Pe(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);r.getAttribute("data-b64")!==null&&(a=Ct(a));const o=r.getAttribute("data-ttl");return o&&Y.set(n,{body:a,init:i,ttl:1e3*Number(o)}),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function qt(e,t,n){if(Y.size>0){const r=Pe(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Pe(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${$t(...a)}"]`}return r}function Dt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,u]])=>{const{pattern:p,params:w}=Tt(o),d={id:o,exec:f=>{const m=p.exec(f);if(m)return Ot(m,w,r)},errors:[1,...u||[]].map(f=>e[f]),layouts:[0,...l||[]].map(s),leaf:i(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function i(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Qe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const Ze="sveltekit:snapshot",et="sveltekit:scroll",tt="sveltekit:states",Vt="sveltekit:pageurl",B="sveltekit:history",Q="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const zt=new Set([...nt]);[...zt];function Mt(e){return e.filter(t=>t!=null)}function re(e,t){return e+"/"+t}function Oe(e){return e instanceof Ue||e instanceof Ie?e.status:500}function Bt(e){return e instanceof Ie?e.text:"Internal Error"}const Ft=new Set(["icon","shortcut icon","apple-touch-icon"]);let W=null;const j=Qe(et)??{},Z=Qe(Ze)??{},N={url:Ye({}),page:Ye({}),navigating:Ae(null),updated:fn()};function $e(e){j[e]=D()}function Kt(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;Z[n];)delete Z[n],n+=1}function ee(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}let Ce,Se,se,I,Re,v;const ie=[],ce=[];let S=null;function le(){S?.fork?.then(e=>e?.discard()),S=null,M={element:void 0,href:void 0}}const ae=new Map,at=new Set,Gt=new Set,X=new Set;let _={branch:[],error:null,url:null},ot=!1,ue=!1,Ke=!0,te=!1,J=!1,st=!1,Ne=!1,it,y,R,$;const fe=new Set,Ge=new Map,He=new Map;async function gn(e,t,n){if(globalThis.__sveltekit_z9ks1d.data){const{q:i={},p:s={},l:o={},f:c={}}=globalThis.__sveltekit_z9ks1d.data;for(const l in i)i[l];for(const l in o)o[l];for(const l in c)c[l];for(const l in s)s[l]}document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Ce=Dt(e),I=document.documentElement,Re=t,Se=e.nodes[0],se=e.nodes[1],Se(),se(),y=history.state?.[B],R=history.state?.[Q],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[Q]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await sn(Re,n)):(await F({type:"enter",url:gt(v.hash?un(new URL(location.href)):location.href),replace_state:!0}),a()),on()}function Ht(){ie.length=0,Ne=!1}function ct(e){ce.some(t=>t?.snapshot)&&(Z[e]=ce.map(t=>t?.snapshot?.capture()))}function lt(e){Z[e]?.forEach((t,n)=>{ce[n]?.snapshot?.restore(t)})}function We(){$e(y),Fe(et,j),ct(R),Fe(Ze,Z)}async function Wt(e,t,n,r){let a,i;t.invalidateAll&&le(),await F({type:"goto",url:gt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){Ne=!0,a=new Set;for(const[s,o]of Ge)for(const[c,l]of o)l.resource?.reset(),a.add(re(s,c));i=new Set;for(const[s,o]of He)for(const c of o.keys())i.add(re(s,c))}t.invalidate&&t.invalidate.forEach(an)}}),t.invalidateAll&&oe().then(oe).then(()=>{for(const[s,o]of Ge)for(const[c,{resource:l}]of o)a?.has(re(s,c))&&l.start();for(const[s,o]of He)for(const[c,{resource:l}]of o)i?.has(re(s,c))&&l.reconnect()})}async function Jt(e){if(e.id!==S?.id){le();const t={};fe.add(t),S={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(fe.delete(t),n.type==="loaded"&&n.state.error&&le(),n)),fork:null}}return S.promise}async function ke(e){const t=(await ge(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function ut(e,t,n){const r={params:_.params,route:{id:_.route?.id??null},url:new URL(location.href)};if(_={...e.state,nav:r},vt(e.props.page),it=new v.root({target:t,props:{...e.props,stores:N,components:ce},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){const a={from:null,to:{...r,scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};X.forEach(i=>i(a))}lt(R),ue=!0}async function de({url:e,params:t,branch:n,errors:r,status:a,error:i,route:s,form:o}){let c="never";if(L&&(e.pathname===L||e.pathname===L+"/"))c="always";else for(const f of n)f?.slash!==void 0&&(c=f.slash);e.pathname=Rt(e.pathname,c),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:s},props:{constructors:Mt(n).map(f=>f.node.component),page:ze(x)}};o!==void 0&&(l.props.form=o);let u={},p=!x,w=0;for(let f=0;f<Math.max(n.length,_.branch.length);f+=1){const m=n[f],g=_.branch[f];m?.data!==g?.data&&(p=!0),m&&(u={...u,...m.data},p&&(l.props[`data_${w}`]=u),w+=1)}return(!_.url||e.href!==_.url.href||_.error!==i||o!==void 0&&o!==x.form||p)&&(l.props.page={error:i,params:t,route:{id:s?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:p?u:x.data}),l}async function je({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null;const o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:o}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function Yt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=ue?qt(r,a.href,t):jt(r,t);return{resolved:a,promise:i}}function Xt(e,t,n,r,a,i){if(Ne)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ie.some(o=>o(new URL(s))))return!0;return!1}function qe(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Qt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:ze(x),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(S?.id===e)return fe.delete(S.token),S.promise;const{errors:s,layouts:o,leaf:c}=a,l=[...o,c];s.forEach(g=>g?.().catch(C)),l.forEach(g=>g?.[1]().catch(C));const u=_.url?e!==he(_.url):!1,p=_.route?a.id!==_.route.id:!1,w=Qt(_.url,n);let d=!1;const f=l.map(async(g,h)=>{if(!g)return;const b=_.branch[h];return g[1]===b?.loader&&!Xt(d,p,u,w,b.universal?.uses,r)?b:(d=!0,je({loader:g[1],url:n,params:r,route:a,parent:async()=>{const P={};for(let O=0;O<h;O+=1)Object.assign(P,(await f[O])?.data);return P},server_data_node:qe(g[0]?{type:"skip"}:null,g[0]?b?.server:void 0)}))});for(const g of f)g.catch(C);const m=[];for(let g=0;g<l.length;g+=1)if(l[g])try{m.push(await f[g])}catch(h){if(h instanceof Te)return{type:"redirect",location:h.location};if(i&&fe.has(i))return Zt({error:await K(h,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=Oe(h),E;if(h instanceof Ue)E=h.body;else{if(await N.updated.check())return await rt(),await ee(n);E=await K(h,{params:r,url:n,route:{id:a.id}})}const P=await en(g,m,s);return P?de({url:n,params:r,branch:m.slice(0,P.idx).concat(P.node),errors:s,status:b,error:E,route:a}):await ht(n,{id:a.id},E,b)}else m.push(void 0);return de({url:n,params:r,branch:m,errors:s,status:200,error:null,route:a,form:t?void 0:null})}async function en(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function De({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await je({loader:Se,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await se(),loader:se,universal:null,server:null,data:null};return de({url:n,params:a,branch:[s,o],status:e,error:t,errors:[],route:null})}catch(s){if(s instanceof Te){await Wt(new URL(s.location,location.href),{},0);return}const o=await v.get_error_template(),c=await K(s,{url:n,params:a,route:r}),l=String(c?.message??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),u=o({status:e,message:l}),p=new DOMParser().parseFromString(u,"text/html");throw document.documentElement.replaceChild(document.adoptNode(p.head),document.head),document.documentElement.replaceChild(document.adoptNode(p.body),document.body),s}}async function tn(e){const t=e.href;if(ae.has(t))return ae.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>Yt(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ae.set(t,r),n=await r}catch{ae.delete(t);return}return n}async function ge(e,t){if(e&&!me(e,L,v.hash)){const n=await tn(e);if(!n)return;const r=nn(n);for(const a of Ce){const i=a.exec(r);if(i)return{id:he(e),invalidating:t,route:a,params:Lt(i),url:e}}}}function nn(e){return xt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function he(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ve(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const c={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return te||at.forEach(l=>l(c)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:c={},accept:l=C,block:u=C,event:p}){const w=$;$=c;const d=await ge(t,!1),f=e==="enter"?Ve(_,d,t,e):dt({url:t,type:e,delta:n?.delta,intent:d,scroll:n?.scroll,event:p});if(!f){u(),$===c&&($=w);return}const m=y,g=R;l(),te=!0,ue&&f.navigation.type!=="enter"&&N.navigating.set(ne.current=f.navigation);let h=d&&await ft(d);if(!h){if(me(t,L,v.hash))return await ee(t,i);h=await ht(t,{id:null},await K(new Ie(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=d?.url||t,$!==c){f.reject(new Error("navigation aborted"));return}if(!h)return;if(h.type==="redirect"){if(o<20){await F({type:e,url:new URL(h.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:c}),f.fulfil(void 0);return}if(h=await De({status:500,error:await K(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!h)return}else if(h.props.page.status>=400&&await N.updated.check())return await rt(),await ee(t,i);if(Ht(),$e(m),ct(g),h.props.page.url.pathname!==t.pathname&&(t.pathname=h.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,G={[B]:y+=k,[Q]:R+=k,[tt]:s};(i?history.replaceState:history.pushState).call(history,G,"",t),i||Kt(y,R)}const b=d&&S?.id===d.id?S.fork:null;S?.fork&&!b?le():(S=null,M={element:void 0,href:void 0}),h.props.page.state=s;let E;if(ue){const k=(await Promise.all(Array.from(Gt,H=>H(f.navigation)))).filter(H=>typeof H=="function");if(k.length>0){let H=function(){k.forEach(we=>{X.delete(we)})};k.push(H),k.forEach(we=>{X.add(we)})}const G=f.navigation.to;_={...h.state,nav:{params:G.params,route:G.route,url:G.url}},h.props.page&&(h.props.page.url=t),!r&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const _e=b&&await b;_e?E=_e.commit():(W=null,it.$set(h.props),W&&Object.assign(h.props.page,W),vt(h.props.page),E=kt?.()),st=!0}else await ut(h,Re,!1);const{activeElement:P}=document;if(await E,await oe(),await oe(),$!==c){f.reject(new Error("navigation aborted"));return}h.props.page&&W&&Object.assign(h.props.page,W);let O=null;if(Ke){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const yt=document.activeElement!==P&&document.activeElement!==document.body;!r&&!yt&&ln(t,!O),Ke=!0,te=!1,f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=D()),X.forEach(k=>k(f.navigation)),e==="popstate"&<(R),N.navigating.set(ne.current=null)}async function ht(e,t,n,r,a){return e.origin===Me&&e.pathname===location.pathname&&!ot?await De({status:r,error:n,url:e,route:t}):await ee(e,a)}let M={element:void 0,href:void 0};function rn(){let e,t;I.addEventListener("mousemove",s=>{const o=s.target;clearTimeout(e),e=setTimeout(()=>{a(o,q.hover)},20)});function n(s){s.defaultPrevented||a(s.composedPath()[0],q.tap)}I.addEventListener("mousedown",n),I.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(s=>{for(const o of s)o.isIntersecting&&(ke(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(s,o){const c=_t(s,I),l=c===M.element&&c?.href===M.href&&o>=t;if(!c||l)return;const{url:u,external:p,download:w}=Le(c,L,v.hash);if(p||w)return;const d=pe(c),f=u&&he(_.url)===he(u);if(!(d.reload||f))if(o<=d.preload_data){M={element:c,href:c.href},t=q.tap;const m=await ge(u,!1);if(!m)return;Jt(m)}else o<=d.preload_code&&(M={element:c,href:c.href},t=o,ke(u))}function i(){r.disconnect();for(const s of I.querySelectorAll("a")){const{url:o,external:c,download:l}=Le(s,L,v.hash);if(c||l)continue;const u=pe(s);u.reload||(u.preload_code===q.viewport&&r.observe(s),u.preload_code===q.eager&&ke(o))}}X.add(i),i()}function K(e,t){if(e instanceof Ue)return e.body;const n=Oe(e),r=Bt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function an(e){if(typeof e=="function")ie.push(e);else{const{href:t}=new URL(e,location.href);ie.push(n=>n.href===t)}}function on(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!te){const r=Ve(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||rn(),I.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=_t(t.composedPath()[0],I);if(!n)return;const{url:r,external:a,target:i,download:s}=Le(n,L,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=pe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[l,u]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=l===ye(location);if(a||o.reload&&(!p||!u)){dt({url:r,type:"link",event:t})?te=!0:t.preventDefault();return}if(u!==void 0&&p){const[,w]=_.url.href.split("#");if(w===u){if(t.preventDefault(),u===""||u==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=n.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(J=!0,$e(y),e(r),!o.replace_state)return;J=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),I.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(me(s,L,!1))return;const o=t.target,c=pe(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(o,r);s.search=new URLSearchParams(l).toString(),F({type:"form",url:s,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[B]){const n=t.state[B];if($={},n===y)return;const r=j[n],a=t.state[tt]??{},i=new URL(t.state[Vt]??location.href),s=t.state[Q],o=_.url?ye(location)===ye(_.url):!1;if(s===R&&(st||o)){a!==x.state&&(x.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const l=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:l},accept:()=>{y=n,R=s},block:()=>{history.go(-l)},nav_token:$,event:t})}else if(!J){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{J&&(J=!1,history.replaceState({...history.state,[B]:++y,[Q]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&N.navigating.set(ne.current=null)});function e(t){_.url=x.url=t,N.page.set(ze(x)),N.page.notify()}}async function sn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:c}){ot=!0;const l=new URL(location.href);let u;({params:a={},route:i={id:null}}=await ge(l,!1)||{}),u=Ce.find(({id:d})=>d===i.id);let p,w=!0;try{const d=r.map(async(m,g)=>{const h=o[g];return h?.uses&&(h.uses=cn(h.uses)),je({loader:v.nodes[m],url:l,params:a,route:i,parent:async()=>{const b={};for(let E=0;E<g;E+=1)Object.assign(b,(await d[E]).data);return b},server_data_node:qe(h)})}),f=await Promise.all(d);if(u){const m=u.layouts;for(let g=0;g<m.length;g++)m[g]||f.splice(g,0,void 0)}p=await de({url:l,params:a,branch:f,status:t,error:n,errors:u?.errors,form:c,route:u??null})}catch(d){if(d instanceof Te)return await ee(new URL(d.location,location.href));p=await De({status:Oe(d),error:await K(d,{url:l,params:a,route:i}),url:l,route:i}),e.textContent="",w=!1}p&&(p.props.page&&(p.props.page.state={}),await ut(p,e,w))}function cn(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function ln(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],c=a.getRangeAt(s);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Ve(e,t,n,r,a=null){let i,s;const o=new Promise((l,u)=>{i=l,s=u});return o.catch(C),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function ze(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function un(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}const Me=location.origin;function gt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function z(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Je={...q,"":q.hover};function mt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function _t(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=mt(e)}}function Le(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||me(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Me&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function pe(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=z(o,"preload-code")),a===null&&(a=z(o,"preload-data")),t===null&&(t=z(o,"keepfocus")),n===null&&(n=z(o,"noscroll")),i===null&&(i=z(o,"reload")),s===null&&(s=z(o,"replacestate")),o=mt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Je[r??"off"],preload_data:Je[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(s)}}function Ye(e){const t=Ae(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&s(o=c)})}return{notify:r,set:a,subscribe:i}}const wt={v:C};function fn(){const{set:e,subscribe:t}=Ae(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${St}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Et;return s&&(e(!0),wt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function me(e,t,n){return e.origin!==Me||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function mn(e){}let x,ne,Ee;const dn=Be.toString().includes("$$")||/function \w+\(\) \{\}/.test(Be.toString()),Xe="a:";dn?(x={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Xe)},ne={current:null},Ee={current:!1}):(x=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL(Xe));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},ne=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},Ee=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},wt.v=()=>Ee.current=!0);function vt(e){Object.assign(x,e)}export{gn as a,mn as l,x as p,N as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/DSpwhhgJ.js";export{o as load_css,r as start};
|