import { c as create_ssr_component, s as setContext, v as validate_component, m as missing_component } from "./chunks/index-445fd704.js"; import { s as set_paths, b as base, a as assets } from "./chunks/paths-396f020f.js"; function afterUpdate() { } const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => { let { stores } = $$props; let { page } = $$props; let { components } = $$props; let { props_0 = null } = $$props; let { props_1 = null } = $$props; let { props_2 = null } = $$props; setContext("__svelte__", stores); afterUpdate(stores.page.notify); if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0) $$bindings.stores(stores); if ($$props.page === void 0 && $$bindings.page && page !== void 0) $$bindings.page(page); if ($$props.components === void 0 && $$bindings.components && components !== void 0) $$bindings.components(components); if ($$props.props_0 === void 0 && $$bindings.props_0 && props_0 !== void 0) $$bindings.props_0(props_0); if ($$props.props_1 === void 0 && $$bindings.props_1 && props_1 !== void 0) $$bindings.props_1(props_1); if ($$props.props_2 === void 0 && $$bindings.props_2 && props_2 !== void 0) $$bindings.props_2(props_2); { stores.page.set(page); } return ` ${components[1] ? `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, Object.assign(props_0 || {}), {}, { default: () => { return `${components[2] ? `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, Object.assign(props_1 || {}), {}, { default: () => { return `${validate_component(components[2] || missing_component, "svelte:component").$$render($$result, Object.assign(props_2 || {}), {}, {})}`; } })}` : `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, Object.assign(props_1 || {}), {}, {})}`}`; } })}` : `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, Object.assign(props_0 || {}), {}, {})}`} ${``}`; }); function to_headers(object) { const headers = new Headers(); if (object) { for (const key2 in object) { const value = object[key2]; if (!value) continue; if (Array.isArray(value)) { value.forEach((value2) => { headers.append(key2, value2); }); } else { headers.set(key2, value); } } } return headers; } function hash(value) { let hash2 = 5381; let i = value.length; if (typeof value === "string") { while (i) hash2 = hash2 * 33 ^ value.charCodeAt(--i); } else { while (i) hash2 = hash2 * 33 ^ value[--i]; } return (hash2 >>> 0).toString(36); } function lowercase_keys(obj) { const clone = {}; for (const key2 in obj) { clone[key2.toLowerCase()] = obj[key2]; } return clone; } function decode_params(params) { for (const key2 in params) { params[key2] = params[key2].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 params; } function is_pojo(body) { if (typeof body !== "object") return false; if (body) { if (body instanceof Uint8Array) return false; if (body instanceof ReadableStream) return false; if (body._readableState && typeof body.pipe === "function") { throw new Error("Node streams are no longer supported \u2014 use a ReadableStream instead"); } } return true; } function normalize_request_method(event) { const method = event.request.method.toLowerCase(); return method === "delete" ? "del" : method; } function error(body) { return new Response(body, { status: 500 }); } function is_string(s2) { return typeof s2 === "string" || s2 instanceof String; } const text_types = /* @__PURE__ */ new Set([ "application/xml", "application/json", "application/x-www-form-urlencoded", "multipart/form-data" ]); const bodyless_status_codes = /* @__PURE__ */ new Set([101, 204, 205, 304]); function is_text(content_type) { if (!content_type) return true; const type = content_type.split(";")[0].toLowerCase(); return type.startsWith("text/") || type.endsWith("+xml") || text_types.has(type); } async function render_endpoint(event, mod) { const method = normalize_request_method(event); let handler = mod[method]; if (!handler && method === "head") { handler = mod.get; } if (!handler) { const allowed = []; for (const method2 in ["get", "post", "put", "patch"]) { if (mod[method2]) allowed.push(method2.toUpperCase()); } if (mod.del) allowed.push("DELETE"); if (mod.get || mod.head) allowed.push("HEAD"); return event.request.headers.get("x-sveltekit-load") ? new Response(void 0, { status: 204 }) : new Response(`${event.request.method} method not allowed`, { status: 405, headers: { allow: allowed.join(", ") } }); } const response = await handler(event); const preface = `Invalid response from route ${event.url.pathname}`; if (typeof response !== "object") { return error(`${preface}: expected an object, got ${typeof response}`); } if (response.fallthrough) { throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching"); } const { status = 200, body = {} } = response; const headers = response.headers instanceof Headers ? new Headers(response.headers) : to_headers(response.headers); const type = headers.get("content-type"); if (!is_text(type) && !(body instanceof Uint8Array || is_string(body))) { return error(`${preface}: body must be an instance of string or Uint8Array if content-type is not a supported textual content-type`); } let normalized_body; if (is_pojo(body) && (!type || type.startsWith("application/json"))) { headers.set("content-type", "application/json; charset=utf-8"); normalized_body = JSON.stringify(body); } else { normalized_body = body; } if ((typeof normalized_body === "string" || normalized_body instanceof Uint8Array) && !headers.has("etag")) { const cache_control = headers.get("cache-control"); if (!cache_control || !/(no-store|immutable)/.test(cache_control)) { headers.set("etag", `"${hash(normalized_body)}"`); } } return new Response(method !== "head" && !bodyless_status_codes.has(status) ? normalized_body : void 0, { status, headers }); } var chars$1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"; var unsafeChars = /[<>\b\f\n\r\t\0\u2028\u2029]/g; var reserved = /^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/; var escaped = { "<": "\\u003C", ">": "\\u003E", "/": "\\u002F", "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }; var objectProtoOwnPropertyNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); function devalue(value) { var counts = /* @__PURE__ */ new Map(); function walk(thing) { if (typeof thing === "function") { throw new Error("Cannot stringify a function"); } if (counts.has(thing)) { counts.set(thing, counts.get(thing) + 1); return; } counts.set(thing, 1); if (!isPrimitive(thing)) { var type = getType(thing); switch (type) { case "Number": case "String": case "Boolean": case "Date": case "RegExp": return; case "Array": thing.forEach(walk); break; case "Set": case "Map": Array.from(thing).forEach(walk); break; default: var proto = Object.getPrototypeOf(thing); if (proto !== Object.prototype && proto !== null && Object.getOwnPropertyNames(proto).sort().join("\0") !== objectProtoOwnPropertyNames) { throw new Error("Cannot stringify arbitrary non-POJOs"); } if (Object.getOwnPropertySymbols(thing).length > 0) { throw new Error("Cannot stringify POJOs with symbolic keys"); } Object.keys(thing).forEach(function(key2) { return walk(thing[key2]); }); } } } walk(value); var names = /* @__PURE__ */ new Map(); Array.from(counts).filter(function(entry) { return entry[1] > 1; }).sort(function(a, b) { return b[1] - a[1]; }).forEach(function(entry, i) { names.set(entry[0], getName(i)); }); function stringify(thing) { if (names.has(thing)) { return names.get(thing); } if (isPrimitive(thing)) { return stringifyPrimitive(thing); } var type = getType(thing); switch (type) { case "Number": case "String": case "Boolean": return "Object(" + stringify(thing.valueOf()) + ")"; case "RegExp": return "new RegExp(" + stringifyString(thing.source) + ', "' + thing.flags + '")'; case "Date": return "new Date(" + thing.getTime() + ")"; case "Array": var members = thing.map(function(v, i) { return i in thing ? stringify(v) : ""; }); var tail = thing.length === 0 || thing.length - 1 in thing ? "" : ","; return "[" + members.join(",") + tail + "]"; case "Set": case "Map": return "new " + type + "([" + Array.from(thing).map(stringify).join(",") + "])"; default: var obj = "{" + Object.keys(thing).map(function(key2) { return safeKey(key2) + ":" + stringify(thing[key2]); }).join(",") + "}"; var proto = Object.getPrototypeOf(thing); if (proto === null) { return Object.keys(thing).length > 0 ? "Object.assign(Object.create(null)," + obj + ")" : "Object.create(null)"; } return obj; } } var str = stringify(value); if (names.size) { var params_1 = []; var statements_1 = []; var values_1 = []; names.forEach(function(name, thing) { params_1.push(name); if (isPrimitive(thing)) { values_1.push(stringifyPrimitive(thing)); return; } var type = getType(thing); switch (type) { case "Number": case "String": case "Boolean": values_1.push("Object(" + stringify(thing.valueOf()) + ")"); break; case "RegExp": values_1.push(thing.toString()); break; case "Date": values_1.push("new Date(" + thing.getTime() + ")"); break; case "Array": values_1.push("Array(" + thing.length + ")"); thing.forEach(function(v, i) { statements_1.push(name + "[" + i + "]=" + stringify(v)); }); break; case "Set": values_1.push("new Set"); statements_1.push(name + "." + Array.from(thing).map(function(v) { return "add(" + stringify(v) + ")"; }).join(".")); break; case "Map": values_1.push("new Map"); statements_1.push(name + "." + Array.from(thing).map(function(_a) { var k = _a[0], v = _a[1]; return "set(" + stringify(k) + ", " + stringify(v) + ")"; }).join(".")); break; default: values_1.push(Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}"); Object.keys(thing).forEach(function(key2) { statements_1.push("" + name + safeProp(key2) + "=" + stringify(thing[key2])); }); } }); statements_1.push("return " + str); return "(function(" + params_1.join(",") + "){" + statements_1.join(";") + "}(" + values_1.join(",") + "))"; } else { return str; } } function getName(num) { var name = ""; do { name = chars$1[num % chars$1.length] + name; num = ~~(num / chars$1.length) - 1; } while (num >= 0); return reserved.test(name) ? name + "_" : name; } function isPrimitive(thing) { return Object(thing) !== thing; } function stringifyPrimitive(thing) { if (typeof thing === "string") return stringifyString(thing); if (thing === void 0) return "void 0"; if (thing === 0 && 1 / thing < 0) return "-0"; var str = String(thing); if (typeof thing === "number") return str.replace(/^(-)?0\./, "$1."); return str; } function getType(thing) { return Object.prototype.toString.call(thing).slice(8, -1); } function escapeUnsafeChar(c) { return escaped[c] || c; } function escapeUnsafeChars(str) { return str.replace(unsafeChars, escapeUnsafeChar); } function safeKey(key2) { return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? key2 : escapeUnsafeChars(JSON.stringify(key2)); } function safeProp(key2) { return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key2) ? "." + key2 : "[" + escapeUnsafeChars(JSON.stringify(key2)) + "]"; } function stringifyString(str) { var result = '"'; for (var i = 0; i < str.length; i += 1) { var char = str.charAt(i); var code = char.charCodeAt(0); if (char === '"') { result += '\\"'; } else if (char in escaped) { result += escaped[char]; } else if (code >= 55296 && code <= 57343) { var next = str.charCodeAt(i + 1); if (code <= 56319 && (next >= 56320 && next <= 57343)) { result += char + str[++i]; } else { result += "\\u" + code.toString(16).toUpperCase(); } } else { result += char; } } result += '"'; return result; } function noop() { } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function"); } Promise.resolve(); const subscriber_queue = []; function readable(value, start) { return { subscribe: writable(value, start).subscribe }; } function writable(value, start = noop) { let stop; const subscribers = /* @__PURE__ */ new Set(); function set(new_value) { if (safe_not_equal(value, new_value)) { value = new_value; if (stop) { const run_queue = !subscriber_queue.length; for (const subscriber of subscribers) { subscriber[1](); subscriber_queue.push(subscriber, value); } if (run_queue) { for (let i = 0; i < subscriber_queue.length; i += 2) { subscriber_queue[i][0](subscriber_queue[i + 1]); } subscriber_queue.length = 0; } } } } function update(fn) { set(fn(value)); } function subscribe(run, invalidate = noop) { const subscriber = [run, invalidate]; subscribers.add(subscriber); if (subscribers.size === 1) { stop = start(set) || noop; } run(value); return () => { subscribers.delete(subscriber); if (subscribers.size === 0) { stop(); stop = null; } }; } return { set, update, subscribe }; } function coalesce_to_error(err) { return err instanceof Error || err && err.name && err.message ? err : new Error(JSON.stringify(err)); } const render_json_payload_script_dict = { "<": "\\u003C", "\u2028": "\\u2028", "\u2029": "\\u2029" }; const render_json_payload_script_regex = new RegExp(`[${Object.keys(render_json_payload_script_dict).join("")}]`, "g"); function render_json_payload_script(attrs, payload) { const safe_payload = JSON.stringify(payload).replace(render_json_payload_script_regex, (match) => render_json_payload_script_dict[match]); let safe_attrs = ""; for (const [key2, value] of Object.entries(attrs)) { if (value === void 0) continue; safe_attrs += ` sveltekit:data-${key2}=${escape_html_attr(value)}`; } return `