168 lines
5.5 KiB
JavaScript
168 lines
5.5 KiB
JavaScript
import { r as index_server_exports } from "../../chunks/internal.js";
|
|
import { y as noop } from "../../chunks/shared.js";
|
|
import "../../chunks/internal2.js";
|
|
import "../../chunks/exports.js";
|
|
import { _ as escape_html, b as writable, c as getContext, et as noop$1 } from "../../chunks/async.js";
|
|
import "@sveltejs/kit/internal";
|
|
import "@sveltejs/kit/internal/server";
|
|
var PRELOAD_PRIORITIES = {
|
|
tap: 1,
|
|
hover: 2,
|
|
viewport: 3,
|
|
eager: 4,
|
|
false: -1
|
|
};
|
|
({ ...PRELOAD_PRIORITIES }), PRELOAD_PRIORITIES.hover;
|
|
/** @param {any} value */
|
|
function notifiable_store(value) {
|
|
const store = writable(value);
|
|
let ready = true;
|
|
function notify() {
|
|
ready = true;
|
|
store.update((val) => val);
|
|
}
|
|
/** @param {any} new_value */
|
|
function set(new_value) {
|
|
ready = false;
|
|
store.set(new_value);
|
|
}
|
|
/** @param {(value: any) => void} run */
|
|
function subscribe(run) {
|
|
/** @type {any} */
|
|
let old_value;
|
|
return store.subscribe((new_value) => {
|
|
if (old_value === void 0 || ready && new_value !== old_value) run(old_value = new_value);
|
|
});
|
|
}
|
|
return {
|
|
notify,
|
|
set,
|
|
subscribe
|
|
};
|
|
}
|
|
var updated_listener = { v: noop };
|
|
function create_updated_store() {
|
|
const { set, subscribe } = writable(false);
|
|
return {
|
|
subscribe,
|
|
check: async () => false
|
|
};
|
|
}
|
|
var updated$1;
|
|
var is_legacy = noop$1.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop$1.toString());
|
|
var placeholder_url = "a:";
|
|
if (is_legacy) {
|
|
new URL(placeholder_url);
|
|
updated$1 = { current: false };
|
|
} else {
|
|
new class Page {
|
|
data = {};
|
|
form = null;
|
|
error = null;
|
|
params = {};
|
|
route = { id: null };
|
|
state = {};
|
|
status = -1;
|
|
url = new URL(placeholder_url);
|
|
}();
|
|
new class Navigating {
|
|
current = null;
|
|
}();
|
|
updated$1 = new class Updated {
|
|
current = false;
|
|
}();
|
|
updated_listener.v = () => updated$1.current = true;
|
|
}
|
|
//#endregion
|
|
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/client/client.js
|
|
/** @import { RemoteFunctionDataNode, ServerNodesResponse, ServerRedirectNode } from 'types' */
|
|
/** @import { CacheEntry } from './remote-functions/cache.svelte.js' */
|
|
/** @import { Query } from './remote-functions/query/instance.svelte.js' */
|
|
/** @import { LiveQuery } from './remote-functions/query-live/instance.svelte.js' */
|
|
var { onMount, tick } = index_server_exports;
|
|
({
|
|
url: /* @__PURE__ */ notifiable_store({}),
|
|
page: /* @__PURE__ */ notifiable_store({}),
|
|
navigating: /* @__PURE__ */ writable(null),
|
|
updated: /* @__PURE__ */ create_updated_store()
|
|
}).updated.check;
|
|
//#endregion
|
|
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/state/server.js
|
|
function context() {
|
|
return getContext("__request__");
|
|
}
|
|
//#endregion
|
|
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/state/index.js
|
|
/**
|
|
* A read-only reactive object with information about the current page, serving several use cases:
|
|
* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))
|
|
* - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))
|
|
* - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))
|
|
* - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error
|
|
*
|
|
* ```svelte
|
|
* <!--- file: +layout.svelte --->
|
|
* <script>
|
|
* import { page } from '$app/state';
|
|
* <\/script>
|
|
*
|
|
* <p>Currently at {page.url.pathname}</p>
|
|
*
|
|
* {#if page.error}
|
|
* <span class="red">Problem detected</span>
|
|
* {:else}
|
|
* <span class="small">All systems operational</span>
|
|
* {/if}
|
|
* ```
|
|
*
|
|
* Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes)
|
|
*
|
|
* ```svelte
|
|
* <!--- file: +page.svelte --->
|
|
* <script>
|
|
* import { page } from '$app/state';
|
|
* const id = $derived(page.params.id); // This will correctly update id for usage on this page
|
|
* $: badId = page.params.id; // Do not use; will never update after initial load
|
|
* <\/script>
|
|
* ```
|
|
*
|
|
* On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.
|
|
*
|
|
* @type {import('@sveltejs/kit').Page}
|
|
*/
|
|
var page = {
|
|
get data() {
|
|
return context().page.data;
|
|
},
|
|
get error() {
|
|
return context().page.error;
|
|
},
|
|
get form() {
|
|
return context().page.form;
|
|
},
|
|
get params() {
|
|
return context().page.params;
|
|
},
|
|
get route() {
|
|
return context().page.route;
|
|
},
|
|
get state() {
|
|
return context().page.state;
|
|
},
|
|
get status() {
|
|
return context().page.status;
|
|
},
|
|
get url() {
|
|
return context().page.url;
|
|
}
|
|
};
|
|
//#endregion
|
|
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/components/error.svelte
|
|
function Error$1($$renderer, $$props) {
|
|
$$renderer.component(($$renderer) => {
|
|
$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
|
});
|
|
}
|
|
//#endregion
|
|
export { Error$1 as default };
|