import { a as active_reaction, i as is_runes, b as DERIVED, B as BLOCK_EFFECT, d as derived_sources, s as state_unsafe_mutation, c as increment_write_version, e as DIRTY, f as set_signal_status, C as CLEAN, U as UNOWNED, g as schedule_effect, M as MAYBE_DIRTY, h as active_effect, j as BRANCH_EFFECT, n as new_deps, u as untracked_writes, k as set_untracked_writes, H as HYDRATION_ERROR, l as get_next_sibling, m as define_property, o as set_active_reaction, p as set_active_effect, q as is_array, r as init_operations, t as get_first_child, v as HYDRATION_START, w as HYDRATION_END, x as hydration_failed, y as clear_text_content, z as array_from, A as component_root, E as is_passive_event, F as create_text, G as branch, I as push, J as pop, K as component_context, L as get, N as LEGACY_PROPS, O as flush_sync, P as render, Q as push$1, R as setContext, S as pop$1 } from "./index.js"; import { s as safe_equals, e as equals } from "./equality.js"; import "clsx"; let base = ""; let assets = base; const initial = { base, assets }; function override(paths) { base = paths.base; assets = paths.assets; } function reset() { base = initial.base; assets = initial.assets; } function set_assets(path) { assets = initial.assets = path; } let public_env = {}; let safe_public_env = {}; function set_private_env(environment) { } function set_public_env(environment) { public_env = environment; } function set_safe_public_env(environment) { safe_public_env = environment; } function source(v, stack) { var signal = { f: 0, // TODO ideally we could skip this altogether, but it causes type errors v, reactions: null, equals, rv: 0, wv: 0 }; return signal; } // @__NO_SIDE_EFFECTS__ function mutable_source(initial_value, immutable = false) { const s = source(initial_value); if (!immutable) { s.equals = safe_equals; } return s; } function set(source2, value) { if (active_reaction !== null && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 && // If the source was created locally within the current derived, then // we allow the mutation. (derived_sources === null || !derived_sources.includes(source2))) { state_unsafe_mutation(); } return internal_set(source2, value); } function internal_set(source2, value) { if (!source2.equals(value)) { source2.v; source2.v = value; source2.wv = increment_write_version(); mark_reactions(source2, DIRTY); if (active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & BRANCH_EFFECT) === 0) { if (new_deps !== null && new_deps.includes(source2)) { set_signal_status(active_effect, DIRTY); schedule_effect(active_effect); } else { if (untracked_writes === null) { set_untracked_writes([source2]); } else { untracked_writes.push(source2); } } } } return value; } function mark_reactions(signal, status) { var reactions = signal.reactions; if (reactions === null) return; var length = reactions.length; for (var i = 0; i < length; i++) { var reaction = reactions[i]; var flags = reaction.f; if ((flags & DIRTY) !== 0) continue; set_signal_status(reaction, status); if ((flags & (CLEAN | UNOWNED)) !== 0) { if ((flags & DERIVED) !== 0) { mark_reactions( /** @type {Derived} */ reaction, MAYBE_DIRTY ); } else { schedule_effect( /** @type {Effect} */ reaction ); } } } } function hydration_mismatch(location) { { console.warn(`https://svelte.dev/e/hydration_mismatch`); } } let hydrating = false; function set_hydrating(value) { hydrating = value; } let hydrate_node; function set_hydrate_node(node) { if (node === null) { hydration_mismatch(); throw HYDRATION_ERROR; } return hydrate_node = node; } function hydrate_next() { return set_hydrate_node( /** @type {TemplateNode} */ get_next_sibling(hydrate_node) ); } const all_registered_events = /* @__PURE__ */ new Set(); const root_event_handles = /* @__PURE__ */ new Set(); function handle_event_propagation(event) { var handler_element = this; var owner_document = ( /** @type {Node} */ handler_element.ownerDocument ); var event_name = event.type; var path = event.composedPath?.() || []; var current_target = ( /** @type {null | Element} */ path[0] || event.target ); var path_idx = 0; var handled_at = event.__root; if (handled_at) { var at_idx = path.indexOf(handled_at); if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ window)) { event.__root = handler_element; return; } var handler_idx = path.indexOf(handler_element); if (handler_idx === -1) { return; } if (at_idx <= handler_idx) { path_idx = at_idx; } } current_target = /** @type {Element} */ path[path_idx] || event.target; if (current_target === handler_element) return; define_property(event, "currentTarget", { configurable: true, get() { return current_target || owner_document; } }); var previous_reaction = active_reaction; var previous_effect = active_effect; set_active_reaction(null); set_active_effect(null); try { var throw_error; var other_errors = []; while (current_target !== null) { var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ current_target.host || null; try { var delegated = current_target["__" + event_name]; if (delegated !== void 0 && !/** @type {any} */ current_target.disabled) { if (is_array(delegated)) { var [fn, ...data] = delegated; fn.apply(current_target, [event, ...data]); } else { delegated.call(current_target, event); } } } catch (error) { if (throw_error) { other_errors.push(error); } else { throw_error = error; } } if (event.cancelBubble || parent_element === handler_element || parent_element === null) { break; } current_target = parent_element; } if (throw_error) { for (let error of other_errors) { queueMicrotask(() => { throw error; }); } throw throw_error; } } finally { event.__root = handler_element; delete event.currentTarget; set_active_reaction(previous_reaction); set_active_effect(previous_effect); } } function assign_nodes(start, end) { var effect = ( /** @type {Effect} */ active_effect ); if (effect.nodes_start === null) { effect.nodes_start = start; effect.nodes_end = end; } } function mount(component, options2) { return _mount(component, options2); } function hydrate(component, options2) { init_operations(); options2.intro = options2.intro ?? false; const target = options2.target; const was_hydrating = hydrating; const previous_hydrate_node = hydrate_node; try { var anchor = ( /** @type {TemplateNode} */ get_first_child(target) ); while (anchor && (anchor.nodeType !== 8 || /** @type {Comment} */ anchor.data !== HYDRATION_START)) { anchor = /** @type {TemplateNode} */ get_next_sibling(anchor); } if (!anchor) { throw HYDRATION_ERROR; } set_hydrating(true); set_hydrate_node( /** @type {Comment} */ anchor ); hydrate_next(); const instance = _mount(component, { ...options2, anchor }); if (hydrate_node === null || hydrate_node.nodeType !== 8 || /** @type {Comment} */ hydrate_node.data !== HYDRATION_END) { hydration_mismatch(); throw HYDRATION_ERROR; } set_hydrating(false); return ( /** @type {Exports} */ instance ); } catch (error) { if (error === HYDRATION_ERROR) { if (options2.recover === false) { hydration_failed(); } init_operations(); clear_text_content(target); set_hydrating(false); return mount(component, options2); } throw error; } finally { set_hydrating(was_hydrating); set_hydrate_node(previous_hydrate_node); } } const document_listeners = /* @__PURE__ */ new Map(); function _mount(Component, { target, anchor, props = {}, events, context, intro = true }) { init_operations(); var registered_events = /* @__PURE__ */ new Set(); var event_handle = (events2) => { for (var i = 0; i < events2.length; i++) { var event_name = events2[i]; if (registered_events.has(event_name)) continue; registered_events.add(event_name); var passive = is_passive_event(event_name); target.addEventListener(event_name, handle_event_propagation, { passive }); var n = document_listeners.get(event_name); if (n === void 0) { document.addEventListener(event_name, handle_event_propagation, { passive }); document_listeners.set(event_name, 1); } else { document_listeners.set(event_name, n + 1); } } }; event_handle(array_from(all_registered_events)); root_event_handles.add(event_handle); var component = void 0; var unmount2 = component_root(() => { var anchor_node = anchor ?? target.appendChild(create_text()); branch(() => { if (context) { push({}); var ctx = ( /** @type {ComponentContext} */ component_context ); ctx.c = context; } if (events) { props.$$events = events; } if (hydrating) { assign_nodes( /** @type {TemplateNode} */ anchor_node, null ); } component = Component(anchor_node, props) || {}; if (hydrating) { active_effect.nodes_end = hydrate_node; } if (context) { pop(); } }); return () => { for (var event_name of registered_events) { target.removeEventListener(event_name, handle_event_propagation); var n = ( /** @type {number} */ document_listeners.get(event_name) ); if (--n === 0) { document.removeEventListener(event_name, handle_event_propagation); document_listeners.delete(event_name); } else { document_listeners.set(event_name, n); } } root_event_handles.delete(event_handle); if (anchor_node !== anchor) { anchor_node.parentNode?.removeChild(anchor_node); } }; }); mounted_components.set(component, unmount2); return component; } let mounted_components = /* @__PURE__ */ new WeakMap(); function unmount(component, options2) { const fn = mounted_components.get(component); if (fn) { mounted_components.delete(component); return fn(options2); } return Promise.resolve(); } function asClassComponent$1(component) { return class extends Svelte4Component { /** @param {any} options */ constructor(options2) { super({ component, ...options2 }); } }; } class Svelte4Component { /** @type {any} */ #events; /** @type {Record} */ #instance; /** * @param {ComponentConstructorOptions & { * component: any; * }} options */ constructor(options2) { var sources = /* @__PURE__ */ new Map(); var add_source = (key, value) => { var s = /* @__PURE__ */ mutable_source(value); sources.set(key, s); return s; }; const props = new Proxy( { ...options2.props || {}, $$events: {} }, { get(target, prop) { return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); }, has(target, prop) { if (prop === LEGACY_PROPS) return true; get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); return Reflect.has(target, prop); }, set(target, prop, value) { set(sources.get(prop) ?? add_source(prop, value), value); return Reflect.set(target, prop, value); } } ); this.#instance = (options2.hydrate ? hydrate : mount)(options2.component, { target: options2.target, anchor: options2.anchor, props, context: options2.context, intro: options2.intro ?? false, recover: options2.recover }); if (!options2?.props?.$$host || options2.sync === false) { flush_sync(); } this.#events = props.$$events; for (const key of Object.keys(this.#instance)) { if (key === "$set" || key === "$destroy" || key === "$on") continue; define_property(this, key, { get() { return this.#instance[key]; }, /** @param {any} value */ set(value) { this.#instance[key] = value; }, enumerable: true }); } this.#instance.$set = /** @param {Record} next */ (next) => { Object.assign(props, next); }; this.#instance.$destroy = () => { unmount(this.#instance); }; } /** @param {Record} props */ $set(props) { this.#instance.$set(props); } /** * @param {string} event * @param {(...args: any[]) => any} callback * @returns {any} */ $on(event, callback) { this.#events[event] = this.#events[event] || []; const cb = (...args) => callback.call(this, ...args); this.#events[event].push(cb); return () => { this.#events[event] = this.#events[event].filter( /** @param {any} fn */ (fn) => fn !== cb ); }; } $destroy() { this.#instance.$destroy(); } } let read_implementation = null; function set_read_implementation(fn) { read_implementation = fn; } function set_manifest(_) { } function asClassComponent(component) { const component_constructor = asClassComponent$1(component); const _render = (props, { context } = {}) => { const result = render(component, { props, context }); return { css: { code: "", map: null }, head: result.head, html: result.body }; }; component_constructor.render = _render; return component_constructor; } let prerendering = false; function set_building() { } function set_prerendering() { prerendering = true; } function Root($$payload, $$props) { push$1(); let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props; { setContext("__svelte__", stores); } { stores.page.set(page); } const Pyramid_1 = constructors[1]; if (constructors[1]) { $$payload.out += ""; const Pyramid_0 = constructors[0]; $$payload.out += ``; Pyramid_0($$payload, { data: data_0, form, children: ($$payload2) => { $$payload2.out += ``; Pyramid_1($$payload2, { data: data_1, form }); $$payload2.out += ``; }, $$slots: { default: true } }); $$payload.out += ``; } else { $$payload.out += ""; const Pyramid_0 = constructors[0]; $$payload.out += ``; Pyramid_0($$payload, { data: data_0, form }); $$payload.out += ``; } $$payload.out += ` `; { $$payload.out += ""; } $$payload.out += ``; pop$1(); } const root = asClassComponent(Root); const options = { app_dir: "_app", app_template_contains_nonce: 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, 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, templates: { app: ({ head, body, assets: assets2, nonce, env }) => '\r\n\r\n \r\n \r\n \r\n \r\n ' + head + '\r\n \r\n \r\n
' + body + "
\r\n \r\n\r\n\r\n\r\n", error: ({ status, message }) => '\n\n \n \n ' + message + `
` + status + '\n
\n

' + message + "

\n
\n
\n \n\n" }, version_hash: "7vamy8" }; async function get_hooks() { let handle; let handleFetch; let handleError; let init; let reroute; let transport; return { handle, handleFetch, handleError, init, reroute, transport }; } export { assets as a, base as b, read_implementation as c, options as d, set_private_env as e, prerendering as f, set_public_env as g, get_hooks as h, set_safe_public_env as i, set_read_implementation as j, set_assets as k, set_building as l, set_manifest as m, set_prerendering as n, override as o, public_env as p, reset as r, safe_public_env as s };