import { r as root, d as decode_pathname, D as DEV, n as normalize_path, a as disable_search, w as with_request_store, b as resolve, m as make_trackable } from './chunks/root-D12ma0No.js'; import { j as json, t as text, R as Redirect, S as SvelteKitError, H as HttpError, e as error, A as ActionFailure } from './chunks/index-B2LGyy1l.js'; import { b as base, a as app_dir, f as find_route, c as assets, r as relative, o as override, d as reset } from './chunks/routing-NqiTWnxU.js'; import { f as format_server_error, i as is_form_content_type, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, h as has_prerendered_path, a as handle_fatal_error, M as MUTATIVE_METHODS, r as redirect_response, m as method_not_allowed, n as negotiate, g as get_global_name, c as create_remote_key, s as serialize_uses, b as clarify_devalue_error, d as handle_error_and_jsonify, E as ENDPOINT_METHODS, P as PAGE_METHODS, e as get_status, j as normalize_error, k as static_error_page, p as parse_remote_arg, l as stringify, o as deserialize_binary_form, q as get_node_type, t as stringify$1, u as escape_html, S as SVELTE_KIT_ASSETS } from './chunks/shared-DWC9PG0H.js'; import { t as text_encoder, g as get_relative_path, b as base64_encode, a as text_decoder } from './chunks/utils-D_bK1W85.js'; import { w as writable, r as readable } from './chunks/index-MqY7A75_.js'; import { s as set_private_env, a as set_public_env, p as public_env } from './chunks/shared-server-DaWdgxVh.js'; import { v as validate_layout_server_exports, a as validate_layout_exports, b as validate_page_server_exports, c as validate_page_exports } from './chunks/exports-B5ORJhfK.js'; import { u as uneval } from './chunks/index3-C4geC3K_.js'; /** * @template {{ tracing: { enabled: boolean, root: import('@opentelemetry/api').Span, current: import('@opentelemetry/api').Span } }} T * @param {T} event_like * @param {import('@opentelemetry/api').Span} current * @returns {T} */ function merge_tracing(event_like, current) { return { ...event_like, tracing: { ...event_like.tracing, current } }; } var cookie = {}; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ var hasRequiredCookie; function requireCookie () { if (hasRequiredCookie) return cookie; hasRequiredCookie = 1; /** * Module exports. * @public */ cookie.parse = parse; cookie.serialize = serialize; /** * Module variables. * @private */ var __toString = Object.prototype.toString; /** * RegExp to match field-content in RFC 7230 sec 3.2 * * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] * field-vchar = VCHAR / obs-text * obs-text = %x80-FF */ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; /** * Parse a cookie header. * * Parse the given cookie header string into an object * The object has the various cookies as keys(names) => values * * @param {string} str * @param {object} [options] * @return {object} * @public */ function parse(str, options) { if (typeof str !== 'string') { throw new TypeError('argument str must be a string'); } var obj = {}; var opt = options || {}; var dec = opt.decode || decode; var index = 0; while (index < str.length) { var eqIdx = str.indexOf('=', index); // no more cookie pairs if (eqIdx === -1) { break } var endIdx = str.indexOf(';', index); if (endIdx === -1) { endIdx = str.length; } else if (endIdx < eqIdx) { // backtrack on prior semicolon index = str.lastIndexOf(';', eqIdx - 1) + 1; continue } var key = str.slice(index, eqIdx).trim(); // only assign once if (undefined === obj[key]) { var val = str.slice(eqIdx + 1, endIdx).trim(); // quoted values if (val.charCodeAt(0) === 0x22) { val = val.slice(1, -1); } obj[key] = tryDecode(val, dec); } index = endIdx + 1; } return obj; } /** * Serialize data into a cookie header. * * Serialize the a name value pair into a cookie string suitable for * http headers. An optional options object specified cookie parameters. * * serialize('foo', 'bar', { httpOnly: true }) * => "foo=bar; httpOnly" * * @param {string} name * @param {string} val * @param {object} [options] * @return {string} * @public */ function serialize(name, val, options) { var opt = options || {}; var enc = opt.encode || encode; if (typeof enc !== 'function') { throw new TypeError('option encode is invalid'); } if (!fieldContentRegExp.test(name)) { throw new TypeError('argument name is invalid'); } var value = enc(val); if (value && !fieldContentRegExp.test(value)) { throw new TypeError('argument val is invalid'); } var str = name + '=' + value; if (null != opt.maxAge) { var maxAge = opt.maxAge - 0; if (isNaN(maxAge) || !isFinite(maxAge)) { throw new TypeError('option maxAge is invalid') } str += '; Max-Age=' + Math.floor(maxAge); } if (opt.domain) { if (!fieldContentRegExp.test(opt.domain)) { throw new TypeError('option domain is invalid'); } str += '; Domain=' + opt.domain; } if (opt.path) { if (!fieldContentRegExp.test(opt.path)) { throw new TypeError('option path is invalid'); } str += '; Path=' + opt.path; } if (opt.expires) { var expires = opt.expires; if (!isDate(expires) || isNaN(expires.valueOf())) { throw new TypeError('option expires is invalid'); } str += '; Expires=' + expires.toUTCString(); } if (opt.httpOnly) { str += '; HttpOnly'; } if (opt.secure) { str += '; Secure'; } if (opt.partitioned) { str += '; Partitioned'; } if (opt.priority) { var priority = typeof opt.priority === 'string' ? opt.priority.toLowerCase() : opt.priority; switch (priority) { case 'low': str += '; Priority=Low'; break case 'medium': str += '; Priority=Medium'; break case 'high': str += '; Priority=High'; break default: throw new TypeError('option priority is invalid') } } if (opt.sameSite) { var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite; switch (sameSite) { case true: str += '; SameSite=Strict'; break; case 'lax': str += '; SameSite=Lax'; break; case 'strict': str += '; SameSite=Strict'; break; case 'none': str += '; SameSite=None'; break; default: throw new TypeError('option sameSite is invalid'); } } return str; } /** * URL-decode string value. Optimized to skip native call when no %. * * @param {string} str * @returns {string} */ function decode (str) { return str.indexOf('%') !== -1 ? decodeURIComponent(str) : str } /** * URL-encode value. * * @param {string} val * @returns {string} */ function encode (val) { return encodeURIComponent(val) } /** * Determine if value is a Date. * * @param {*} val * @private */ function isDate (val) { return __toString.call(val) === '[object Date]' || val instanceof Date } /** * Try decoding a string using a decoding function. * * @param {string} str * @param {function} decode * @private */ function tryDecode(str, decode) { try { return decode(str); } catch (e) { return str; } } return cookie; } var cookieExports = requireCookie(); var defaultParseOptions = { decodeValues: true, map: false, silent: false, split: "auto", // auto = split strings but not arrays }; function isForbiddenKey(key) { return typeof key !== "string" || key in {}; } function createNullObj() { return Object.create(null); } function isNonEmptyString(str) { return typeof str === "string" && !!str.trim(); } function parseString(setCookieValue, options) { var parts = setCookieValue.split(";").filter(isNonEmptyString); var nameValuePairStr = parts.shift(); var parsed = parseNameValuePair(nameValuePairStr); var name = parsed.name; var value = parsed.value; options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; if (isForbiddenKey(name)) { return null; } try { value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value } catch (e) { console.error( "set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.", e ); } var cookie = createNullObj(); cookie.name = name; cookie.value = value; parts.forEach(function (part) { var sides = part.split("="); var key = sides.shift().trimLeft().toLowerCase(); if (isForbiddenKey(key)) { return; } var value = sides.join("="); if (key === "expires") { cookie.expires = new Date(value); } else if (key === "max-age") { var n = parseInt(value, 10); if (!Number.isNaN(n)) cookie.maxAge = n; } else if (key === "secure") { cookie.secure = true; } else if (key === "httponly") { cookie.httpOnly = true; } else if (key === "samesite") { cookie.sameSite = value; } else if (key === "partitioned") { cookie.partitioned = true; } else if (key) { cookie[key] = value; } }); return cookie; } function parseNameValuePair(nameValuePairStr) { // Parses name-value-pair according to rfc6265bis draft var name = ""; var value = ""; var nameValueArr = nameValuePairStr.split("="); if (nameValueArr.length > 1) { name = nameValueArr.shift(); value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part } else { value = nameValuePairStr; } return { name: name, value: value }; } function parseSetCookie(input, options) { options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; if (!input) { if (!options.map) { return []; } else { return createNullObj(); } } if (input.headers) { if (typeof input.headers.getSetCookie === "function") { // for fetch responses - they combine headers of the same type in the headers array, // but getSetCookie returns an uncombined array input = input.headers.getSetCookie(); } else if (input.headers["set-cookie"]) { // fast-path for node.js (which automatically normalizes header names to lower-case) input = input.headers["set-cookie"]; } else { // slow-path for other environments - see #25 var sch = input.headers[ Object.keys(input.headers).find(function (key) { return key.toLowerCase() === "set-cookie"; }) ]; // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36 if (!sch && input.headers.cookie && !options.silent) { console.warn( "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning." ); } input = sch; } } var split = options.split; var isArray = Array.isArray(input); if (split === "auto") { split = !isArray; } if (!isArray) { input = [input]; } input = input.filter(isNonEmptyString); if (split) { input = input.map(splitCookiesString).flat(); } if (!options.map) { return input .map(function (str) { return parseString(str, options); }) .filter(Boolean); } else { var cookies = createNullObj(); return input.reduce(function (cookies, str) { var cookie = parseString(str, options); if (cookie && !isForbiddenKey(cookie.name)) { cookies[cookie.name] = cookie; } return cookies; }, cookies); } } /* Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 React Native's fetch does this for *every* header, including set-cookie. Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation */ function splitCookiesString(cookiesString) { if (Array.isArray(cookiesString)) { return cookiesString; } if (typeof cookiesString !== "string") { return []; } var cookiesStrings = []; var pos = 0; var start; var ch; var lastComma; var nextStart; var cookiesSeparatorFound; function skipWhitespace() { while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { pos += 1; } return pos < cookiesString.length; } function notSpecialChar() { ch = cookiesString.charAt(pos); return ch !== "=" && ch !== ";" && ch !== ","; } while (pos < cookiesString.length) { start = pos; cookiesSeparatorFound = false; while (skipWhitespace()) { ch = cookiesString.charAt(pos); if (ch === ",") { // ',' is a cookie separator if we have later first '=', not ';' or ',' lastComma = pos; pos += 1; skipWhitespace(); nextStart = pos; while (pos < cookiesString.length && notSpecialChar()) { pos += 1; } // currently special character if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { // we found cookies separator cookiesSeparatorFound = true; // pos is inside the next cookie, so back up and return it. pos = nextStart; cookiesStrings.push(cookiesString.substring(start, lastComma)); start = pos; } else { // in param ',' or param separator ';', // we continue from that comma pos = lastComma + 1; } } else { pos += 1; } } if (!cookiesSeparatorFound || pos >= cookiesString.length) { cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); } } return cookiesStrings; } // named export for CJS parseSetCookie.parseSetCookie = parseSetCookie; // for backwards compatibility parseSetCookie.parse = parseSetCookie; parseSetCookie.parseString = parseString; parseSetCookie.splitCookiesString = splitCookiesString; let read_implementation = null; function set_read_implementation(fn) { read_implementation = fn; } const options = { app_template_contains_nonce: false, async: false, csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } }, csrf_check_origin: true, csrf_trusted_origins: [], embedded: false, env_public_prefix: "PUBLIC_", env_private_prefix: "", hash_routing: false, hooks: null, // added lazily, via `get_hooks` preload_strategy: "modulepreload", root, service_worker: false, service_worker_options: void 0, templates: { app: ({ head, body, assets, nonce, env }) => '\n\n
\n \n \n \n \n \n