@sveltejs/kit 1.0.0-next.35 → 1.0.0-next.350

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.
Files changed (69) hide show
  1. package/README.md +12 -9
  2. package/assets/app/env.js +16 -0
  3. package/assets/app/navigation.js +24 -0
  4. package/assets/app/paths.js +1 -0
  5. package/assets/app/stores.js +97 -0
  6. package/assets/client/singletons.js +13 -0
  7. package/assets/client/start.js +1788 -0
  8. package/assets/components/error.svelte +18 -2
  9. package/assets/env.js +8 -0
  10. package/assets/paths.js +13 -0
  11. package/assets/server/index.js +3371 -0
  12. package/dist/chunks/constants.js +663 -0
  13. package/dist/chunks/filesystem.js +110 -0
  14. package/dist/chunks/index.js +1363 -0
  15. package/dist/chunks/index2.js +120 -0
  16. package/dist/chunks/index3.js +183 -0
  17. package/dist/chunks/index4.js +215 -0
  18. package/dist/chunks/index5.js +15748 -0
  19. package/dist/chunks/misc.js +78 -0
  20. package/dist/chunks/multipart-parser.js +444 -0
  21. package/dist/chunks/object.js +83 -0
  22. package/dist/chunks/plugin.js +555 -0
  23. package/dist/chunks/sync.js +856 -0
  24. package/dist/chunks/write_tsconfig.js +169 -0
  25. package/dist/cli.js +1028 -87
  26. package/dist/hooks.js +28 -0
  27. package/dist/node/polyfills.js +6654 -0
  28. package/dist/node.js +301 -0
  29. package/package.json +95 -55
  30. package/types/ambient.d.ts +307 -0
  31. package/types/index.d.ts +294 -0
  32. package/types/internal.d.ts +326 -0
  33. package/types/private.d.ts +235 -0
  34. package/CHANGELOG.md +0 -371
  35. package/assets/runtime/app/navigation.js +0 -23
  36. package/assets/runtime/app/navigation.js.map +0 -1
  37. package/assets/runtime/app/paths.js +0 -2
  38. package/assets/runtime/app/paths.js.map +0 -1
  39. package/assets/runtime/app/stores.js +0 -78
  40. package/assets/runtime/app/stores.js.map +0 -1
  41. package/assets/runtime/internal/singletons.js +0 -15
  42. package/assets/runtime/internal/singletons.js.map +0 -1
  43. package/assets/runtime/internal/start.js +0 -614
  44. package/assets/runtime/internal/start.js.map +0 -1
  45. package/assets/runtime/utils-85ebcc60.js +0 -18
  46. package/assets/runtime/utils-85ebcc60.js.map +0 -1
  47. package/dist/api.js +0 -28
  48. package/dist/api.js.map +0 -1
  49. package/dist/cli.js.map +0 -1
  50. package/dist/create_app.js +0 -502
  51. package/dist/create_app.js.map +0 -1
  52. package/dist/index.js +0 -327
  53. package/dist/index.js.map +0 -1
  54. package/dist/index2.js +0 -3497
  55. package/dist/index2.js.map +0 -1
  56. package/dist/index3.js +0 -296
  57. package/dist/index3.js.map +0 -1
  58. package/dist/index4.js +0 -311
  59. package/dist/index4.js.map +0 -1
  60. package/dist/index5.js +0 -221
  61. package/dist/index5.js.map +0 -1
  62. package/dist/index6.js +0 -730
  63. package/dist/index6.js.map +0 -1
  64. package/dist/renderer.js +0 -2429
  65. package/dist/renderer.js.map +0 -1
  66. package/dist/standard.js +0 -100
  67. package/dist/standard.js.map +0 -1
  68. package/dist/utils.js +0 -61
  69. package/dist/utils.js.map +0 -1
@@ -1,614 +0,0 @@
1
- import Root from '../../generated/root.svelte';
2
- import { pages, ignore, layout } from '../../generated/manifest.js';
3
- import { f as find_anchor, g as get_base_uri } from '../utils-85ebcc60.js';
4
- import { writable } from 'svelte/store';
5
- import { init, set_paths } from './singletons.js';
6
-
7
- function which(event) {
8
- return event.which === null ? event.button : event.which;
9
- }
10
-
11
- function scroll_state() {
12
- return {
13
- x: pageXOffset,
14
- y: pageYOffset
15
- };
16
- }
17
-
18
- class Router {
19
- constructor({ base, host, pages, ignore }) {
20
- this.base = base;
21
- this.host = host;
22
- this.pages = pages;
23
- this.ignore = ignore;
24
-
25
- this.history = window.history || {
26
- pushState: () => {},
27
- replaceState: () => {},
28
- scrollRestoration: 'auto'
29
- };
30
- }
31
-
32
- init({ renderer }) {
33
- this.renderer = renderer;
34
- renderer.router = this;
35
-
36
- if ('scrollRestoration' in this.history) {
37
- this.history.scrollRestoration = 'manual';
38
- }
39
-
40
- // Adopted from Nuxt.js
41
- // Reset scrollRestoration to auto when leaving page, allowing page reload
42
- // and back-navigation from other pages to use the browser to restore the
43
- // scrolling position.
44
- addEventListener('beforeunload', () => {
45
- this.history.scrollRestoration = 'auto';
46
- });
47
-
48
- // Setting scrollRestoration to manual again when returning to this page.
49
- addEventListener('load', () => {
50
- this.history.scrollRestoration = 'manual';
51
- });
52
-
53
- // There's no API to capture the scroll location right before the user
54
- // hits the back/forward button, so we listen for scroll events
55
- let scroll_timer;
56
- addEventListener('scroll', () => {
57
- clearTimeout(scroll_timer);
58
- scroll_timer = setTimeout(() => {
59
- // Store the scroll location in the history
60
- // This will persist even if we navigate away from the site and come back
61
- const new_state = {
62
- ...(history.state || {}),
63
- 'sveltekit:scroll': scroll_state()
64
- };
65
- history.replaceState(new_state, document.title, window.location);
66
- }, 50);
67
- });
68
-
69
- addEventListener('click', (event) => {
70
- // Adapted from https://github.com/visionmedia/page.js
71
- // MIT license https://github.com/visionmedia/page.js#license
72
- if (which(event) !== 1) return;
73
- if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
74
- if (event.defaultPrevented) return;
75
-
76
- const a = find_anchor(event.target);
77
- if (!a) return;
78
-
79
- if (!a.href) return;
80
-
81
- // check if link is inside an svg
82
- // in this case, both href and target are always inside an object
83
- const svg = typeof a.href === 'object' && a.href.constructor.name === 'SVGAnimatedString';
84
- const href = String(svg ? a.href.baseVal : a.href);
85
-
86
- if (href === location.href) {
87
- if (!location.hash) event.preventDefault();
88
- return;
89
- }
90
-
91
- // Ignore if tag has
92
- // 1. 'download' attribute
93
- // 2. rel='external' attribute
94
- if (a.hasAttribute('download') || a.getAttribute('rel') === 'external') return;
95
-
96
- // Ignore if <a> has a target
97
- if (svg ? a.target.baseVal : a.target) return;
98
-
99
- const url = new URL(href);
100
-
101
- // Don't handle hash changes
102
- if (url.pathname === location.pathname && url.search === location.search) return;
103
-
104
- const selected = this.select(url);
105
- if (selected) {
106
- const noscroll = a.hasAttribute('sveltekit:noscroll');
107
- this.renderer.notify(selected);
108
- this.history.pushState({}, '', url.href);
109
- this.navigate(selected, noscroll ? scroll_state() : false, url.hash);
110
- event.preventDefault();
111
- }
112
- });
113
-
114
- addEventListener('popstate', (event) => {
115
- if (event.state) {
116
- const url = new URL(location.href);
117
- const selected = this.select(url);
118
- if (selected) {
119
- this.navigate(selected, event.state['sveltekit:scroll']);
120
- } else {
121
- // eslint-disable-next-line
122
- location.href = location.href; // nosonar
123
- }
124
- }
125
- });
126
-
127
- // make it possible to reset focus
128
- document.body.setAttribute('tabindex', '-1');
129
-
130
- // load current page
131
- this.history.replaceState({}, '', location.href);
132
-
133
- const selected = this.select(new URL(location.href));
134
- if (selected) return this.renderer.start(selected);
135
- }
136
-
137
- select(url) {
138
- if (url.origin !== location.origin) return null;
139
- if (!url.pathname.startsWith(this.base)) return null;
140
-
141
- let path = url.pathname.slice(this.base.length);
142
-
143
- if (path === '') {
144
- path = '/';
145
- }
146
-
147
- // avoid accidental clashes between server routes and page routes
148
- if (this.ignore.some((pattern) => pattern.test(path))) return;
149
-
150
- for (const route of this.pages) {
151
- const match = route.pattern.exec(path);
152
-
153
- if (match) {
154
- const query = new URLSearchParams(url.search);
155
- const params = route.params(match);
156
-
157
- const page = { host: this.host, path, query, params };
158
-
159
- return { href: url.href, route, match, page };
160
- }
161
- }
162
- }
163
-
164
- async goto(href, { noscroll = false, replaceState = false } = {}) {
165
- const url = new URL(href, get_base_uri(document));
166
- const selected = this.select(url);
167
-
168
- if (selected) {
169
- this.renderer.notify(selected);
170
-
171
- // TODO shouldn't need to pass the hash here
172
- this.history[replaceState ? 'replaceState' : 'pushState']({}, '', href);
173
- return this.navigate(selected, noscroll ? scroll_state() : false, url.hash);
174
- }
175
-
176
- location.href = href;
177
- return new Promise(() => {
178
- /* never resolves */
179
- });
180
- }
181
-
182
- async navigate(selected, scroll, hash) {
183
- // remove trailing slashes
184
- if (location.pathname.endsWith('/') && location.pathname !== '/') {
185
- history.replaceState({}, '', `${location.pathname.slice(0, -1)}${location.search}`);
186
- }
187
-
188
- await this.renderer.render(selected);
189
-
190
- document.body.focus();
191
-
192
- const deep_linked = hash && document.getElementById(hash.slice(1));
193
- if (scroll) {
194
- scrollTo(scroll.x, scroll.y);
195
- } else if (deep_linked) {
196
- // scroll is an element id (from a hash), we need to compute y
197
- scrollTo(0, deep_linked.getBoundingClientRect().top + scrollY);
198
- } else {
199
- scrollTo(0, 0);
200
- }
201
- }
202
- }
203
-
204
- function page_store(value) {
205
- const store = writable(value);
206
- let ready = true;
207
-
208
- function notify() {
209
- ready = true;
210
- store.update((val) => val);
211
- }
212
-
213
- function set(new_value) {
214
- ready = false;
215
- store.set(new_value);
216
- }
217
-
218
- function subscribe(run) {
219
- let old_value;
220
- return store.subscribe((new_value) => {
221
- if (old_value === undefined || (ready && new_value !== old_value)) {
222
- run((old_value = new_value));
223
- }
224
- });
225
- }
226
-
227
- return { notify, set, subscribe };
228
- }
229
-
230
- class Renderer {
231
- constructor({ Root, layout, target, error, status, preloaded, session }) {
232
- this.Root = Root;
233
- this.layout = layout;
234
- this.layout_loader = () => layout;
235
-
236
- // TODO ideally we wouldn't need to store these...
237
- this.target = target;
238
-
239
- this.initial = {
240
- preloaded,
241
- error,
242
- status
243
- };
244
-
245
- this.current = {
246
- page: null,
247
- query: null,
248
- session_changed: false,
249
- nodes: [],
250
- contexts: []
251
- };
252
-
253
- this.caches = new Map();
254
-
255
- this.prefetching = {
256
- href: null,
257
- promise: null
258
- };
259
-
260
- this.stores = {
261
- page: page_store({}),
262
- navigating: writable(null),
263
- session: writable(session)
264
- };
265
-
266
- this.$session = null;
267
-
268
- this.root = null;
269
-
270
- const trigger_prefetch = (event) => {
271
- const a = find_anchor(event.target);
272
-
273
- if (a && a.hasAttribute('sveltekit:prefetch')) {
274
- this.prefetch(new URL(a.href));
275
- }
276
- };
277
-
278
- let mousemove_timeout;
279
- const handle_mousemove = (event) => {
280
- clearTimeout(mousemove_timeout);
281
- mousemove_timeout = setTimeout(() => {
282
- trigger_prefetch(event);
283
- }, 20);
284
- };
285
-
286
- addEventListener('touchstart', trigger_prefetch);
287
- addEventListener('mousemove', handle_mousemove);
288
-
289
- let ready = false;
290
- this.stores.session.subscribe(async (value) => {
291
- this.$session = value;
292
-
293
- if (!ready) return;
294
- this.current.session_changed = true;
295
-
296
- const selected = this.router.select(new URL(location.href));
297
- this.render(selected);
298
- });
299
- ready = true;
300
- }
301
-
302
- async start(selected) {
303
- const props = {
304
- stores: this.stores,
305
- error: this.initial.error,
306
- status: this.initial.status,
307
- page: selected.page
308
- };
309
-
310
- if (this.initial.error) {
311
- props.components = [this.layout.default];
312
- } else {
313
- const hydrated = await this.hydrate(selected);
314
-
315
- if (hydrated.redirect) {
316
- throw new Error('TODO client-side redirects');
317
- }
318
-
319
- Object.assign(props, hydrated.props);
320
- this.current = hydrated.state;
321
- }
322
-
323
- // remove dev-mode SSR <style> insert, since it doesn't apply
324
- // to hydrated markup (HMR requires hashes to be rewritten)
325
- // TODO only in dev
326
- // TODO it seems this doesn't always work with the classname
327
- // stabilisation in vite-plugin-svelte? see e.g.
328
- // hn.svelte.dev
329
- // const style = document.querySelector('style[data-svelte]');
330
- // if (style) style.remove();
331
-
332
- this.root = new this.Root({
333
- target: this.target,
334
- props,
335
- hydrate: true
336
- });
337
-
338
- this.initial = null;
339
- }
340
-
341
- notify(selected) {
342
- this.stores.navigating.set({
343
- from: this.current.page,
344
- to: selected.page
345
- });
346
- }
347
-
348
- async render(selected) {
349
- const token = (this.token = {});
350
-
351
- const hydrated = await this.hydrate(selected);
352
-
353
- if (this.token === token) {
354
- // check render wasn't aborted
355
- this.current = hydrated.state;
356
-
357
- this.root.$set(hydrated.props);
358
- this.stores.navigating.set(null);
359
- }
360
- }
361
-
362
- async hydrate({ route, page }) {
363
- const props = {
364
- error: null,
365
- status: 200,
366
- components: []
367
- };
368
-
369
- const fetcher = (url, opts) => {
370
- if (this.initial) {
371
- const script = document.querySelector(`script[type="svelte-data"][url="${url}"]`);
372
- if (script) {
373
- const { body, ...init } = JSON.parse(script.textContent);
374
- return Promise.resolve(new Response(body, init));
375
- }
376
- }
377
-
378
- return fetch(url, opts);
379
- };
380
-
381
- const query = page.query.toString();
382
-
383
- const state = {
384
- page,
385
- query,
386
- session_changed: false,
387
- nodes: [],
388
- contexts: []
389
- };
390
-
391
- const component_promises = [this.layout_loader(), ...route.parts.map((loader) => loader())];
392
- const props_promises = [];
393
-
394
- let context;
395
- let redirect;
396
-
397
- const changed = {
398
- params: Object.keys(page.params).filter((key) => {
399
- return !this.current.page || this.current.page.params[key] !== page.params[key];
400
- }),
401
- query: query !== this.current.query,
402
- session: this.current.session_changed,
403
- context: false
404
- };
405
-
406
- try {
407
- for (let i = 0; i < component_promises.length; i += 1) {
408
- const previous = this.current.nodes[i];
409
- const previous_context = this.current.contexts[i];
410
-
411
- const { default: component, load } = await component_promises[i];
412
- props.components[i] = component;
413
-
414
- const changed_since_last_render =
415
- !previous ||
416
- component !== previous.component ||
417
- changed.params.some((param) => previous.uses.params.has(param)) ||
418
- (changed.query && previous.uses.query) ||
419
- (changed.session && previous.uses.session) ||
420
- (changed.context && previous.uses.context);
421
-
422
- if (changed_since_last_render) {
423
- const hash = page.path + query;
424
-
425
- // see if we have some cached data
426
- const cache = this.caches.get(component);
427
- const cached = cache && cache.get(hash);
428
-
429
- let node;
430
- let loaded;
431
-
432
- if (cached && (!changed.context || !cached.node.uses.context)) {
433
- ({ node, loaded } = cached);
434
- } else {
435
- node = {
436
- component,
437
- uses: {
438
- params: new Set(),
439
- query: false,
440
- session: false,
441
- context: false
442
- }
443
- };
444
-
445
- const params = {};
446
- for (const key in page.params) {
447
- Object.defineProperty(params, key, {
448
- get() {
449
- node.uses.params.add(key);
450
- return page.params[key];
451
- },
452
- enumerable: true
453
- });
454
- }
455
-
456
- const session = this.$session;
457
-
458
- loaded =
459
- load &&
460
- (await load.call(null, {
461
- page: {
462
- host: page.host,
463
- path: page.path,
464
- params,
465
- get query() {
466
- node.uses.query = true;
467
- return page.query;
468
- }
469
- },
470
- get session() {
471
- node.uses.session = true;
472
- return session;
473
- },
474
- get context() {
475
- node.uses.context = true;
476
- return { ...context };
477
- },
478
- fetch: fetcher
479
- }));
480
- }
481
-
482
- if (loaded) {
483
- if (loaded.error) {
484
- let error = loaded.error;
485
- if (typeof error === 'string') {
486
- error = new Error(error);
487
- }
488
- if (!(error instanceof Error)) {
489
- error = new Error(
490
- `"error" property returned from load() must be a string or instance of Error, received type "${typeof error}"`
491
- );
492
- }
493
- error.status = loaded.status;
494
- throw error;
495
- }
496
-
497
- if (loaded.redirect) {
498
- redirect = loaded.redirect;
499
- break;
500
- }
501
-
502
- if (loaded.context) {
503
- changed.context = true;
504
-
505
- context = {
506
- ...context,
507
- ...loaded.context
508
- };
509
- }
510
-
511
- if (loaded.maxage) {
512
- if (!this.caches.has(component)) {
513
- this.caches.set(component, new Map());
514
- }
515
-
516
- const cache = this.caches.get(component);
517
- const cached = { node, loaded };
518
-
519
- cache.set(hash, cached);
520
-
521
- let ready = false;
522
-
523
- const timeout = setTimeout(() => {
524
- clear();
525
- }, loaded.maxage * 1000);
526
-
527
- const clear = () => {
528
- if (cache.get(hash) === cached) {
529
- cache.delete(hash);
530
- }
531
-
532
- unsubscribe();
533
- clearTimeout(timeout);
534
- };
535
-
536
- const unsubscribe = this.stores.session.subscribe(() => {
537
- if (ready) clear();
538
- });
539
-
540
- ready = true;
541
- }
542
-
543
- props_promises[i] = loaded.props;
544
- }
545
-
546
- state.nodes[i] = node;
547
- state.contexts[i] = context;
548
- } else {
549
- state.nodes[i] = previous;
550
- state.contexts[i] = context = previous_context;
551
- }
552
- }
553
-
554
- const new_props = await Promise.all(props_promises);
555
-
556
- new_props.forEach((p, i) => {
557
- if (p) {
558
- props[`props_${i}`] = p;
559
- }
560
- });
561
-
562
- if (!this.current.page || page.path !== this.current.page.path) {
563
- props.page = page;
564
- }
565
- } catch (error) {
566
- props.error = error;
567
- props.status = error.status || 500;
568
- state.nodes = [];
569
- }
570
-
571
- return { redirect, props, state };
572
- }
573
-
574
- async prefetch(url) {
575
- const page = this.router.select(url);
576
-
577
- if (page) {
578
- if (url.href !== this.prefetching.href) {
579
- this.prefetching = { href: url.href, promise: this.hydrate(page) };
580
- }
581
-
582
- return this.prefetching.promise;
583
- } else {
584
- throw new Error(`Could not prefetch ${url.href}`);
585
- }
586
- }
587
- }
588
-
589
- async function start({ paths, target, host, session, preloaded, error, status }) {
590
- const router = new Router({
591
- base: paths.base,
592
- host,
593
- pages,
594
- ignore
595
- });
596
-
597
- const renderer = new Renderer({
598
- Root,
599
- layout,
600
- target,
601
- preloaded,
602
- error,
603
- status,
604
- session
605
- });
606
-
607
- init({ router, renderer });
608
- set_paths(paths);
609
-
610
- await router.init({ renderer });
611
- }
612
-
613
- export { start };
614
- //# sourceMappingURL=start.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"start.js","sources":["../../../src/runtime/internal/router/index.js","../../../src/runtime/internal/renderer/index.js","../../../src/runtime/internal/start.js"],"sourcesContent":["import { find_anchor, get_base_uri } from '../utils';\n\nfunction which(event) {\n\treturn event.which === null ? event.button : event.which;\n}\n\nfunction scroll_state() {\n\treturn {\n\t\tx: pageXOffset,\n\t\ty: pageYOffset\n\t};\n}\n\nexport class Router {\n\tconstructor({ base, host, pages, ignore }) {\n\t\tthis.base = base;\n\t\tthis.host = host;\n\t\tthis.pages = pages;\n\t\tthis.ignore = ignore;\n\n\t\tthis.history = window.history || {\n\t\t\tpushState: () => {},\n\t\t\treplaceState: () => {},\n\t\t\tscrollRestoration: 'auto'\n\t\t};\n\t}\n\n\tinit({ renderer }) {\n\t\tthis.renderer = renderer;\n\t\trenderer.router = this;\n\n\t\tif ('scrollRestoration' in this.history) {\n\t\t\tthis.history.scrollRestoration = 'manual';\n\t\t}\n\n\t\t// Adopted from Nuxt.js\n\t\t// Reset scrollRestoration to auto when leaving page, allowing page reload\n\t\t// and back-navigation from other pages to use the browser to restore the\n\t\t// scrolling position.\n\t\taddEventListener('beforeunload', () => {\n\t\t\tthis.history.scrollRestoration = 'auto';\n\t\t});\n\n\t\t// Setting scrollRestoration to manual again when returning to this page.\n\t\taddEventListener('load', () => {\n\t\t\tthis.history.scrollRestoration = 'manual';\n\t\t});\n\n\t\t// There's no API to capture the scroll location right before the user\n\t\t// hits the back/forward button, so we listen for scroll events\n\t\tlet scroll_timer;\n\t\taddEventListener('scroll', () => {\n\t\t\tclearTimeout(scroll_timer);\n\t\t\tscroll_timer = setTimeout(() => {\n\t\t\t\t// Store the scroll location in the history\n\t\t\t\t// This will persist even if we navigate away from the site and come back\n\t\t\t\tconst new_state = {\n\t\t\t\t\t...(history.state || {}),\n\t\t\t\t\t'sveltekit:scroll': scroll_state()\n\t\t\t\t};\n\t\t\t\thistory.replaceState(new_state, document.title, window.location);\n\t\t\t}, 50);\n\t\t});\n\n\t\taddEventListener('click', (event) => {\n\t\t\t// Adapted from https://github.com/visionmedia/page.js\n\t\t\t// MIT license https://github.com/visionmedia/page.js#license\n\t\t\tif (which(event) !== 1) return;\n\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\t\t\tif (event.defaultPrevented) return;\n\n\t\t\tconst a = find_anchor(event.target);\n\t\t\tif (!a) return;\n\n\t\t\tif (!a.href) return;\n\n\t\t\t// check if link is inside an svg\n\t\t\t// in this case, both href and target are always inside an object\n\t\t\tconst svg = typeof a.href === 'object' && a.href.constructor.name === 'SVGAnimatedString';\n\t\t\tconst href = String(svg ? a.href.baseVal : a.href);\n\n\t\t\tif (href === location.href) {\n\t\t\t\tif (!location.hash) event.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Ignore if tag has\n\t\t\t// 1. 'download' attribute\n\t\t\t// 2. rel='external' attribute\n\t\t\tif (a.hasAttribute('download') || a.getAttribute('rel') === 'external') return;\n\n\t\t\t// Ignore if <a> has a target\n\t\t\tif (svg ? a.target.baseVal : a.target) return;\n\n\t\t\tconst url = new URL(href);\n\n\t\t\t// Don't handle hash changes\n\t\t\tif (url.pathname === location.pathname && url.search === location.search) return;\n\n\t\t\tconst selected = this.select(url);\n\t\t\tif (selected) {\n\t\t\t\tconst noscroll = a.hasAttribute('sveltekit:noscroll');\n\t\t\t\tthis.renderer.notify(selected);\n\t\t\t\tthis.history.pushState({}, '', url.href);\n\t\t\t\tthis.navigate(selected, noscroll ? scroll_state() : false, url.hash);\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t});\n\n\t\taddEventListener('popstate', (event) => {\n\t\t\tif (event.state) {\n\t\t\t\tconst url = new URL(location.href);\n\t\t\t\tconst selected = this.select(url);\n\t\t\t\tif (selected) {\n\t\t\t\t\tthis.navigate(selected, event.state['sveltekit:scroll']);\n\t\t\t\t} else {\n\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\tlocation.href = location.href; // nosonar\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// make it possible to reset focus\n\t\tdocument.body.setAttribute('tabindex', '-1');\n\n\t\t// load current page\n\t\tthis.history.replaceState({}, '', location.href);\n\n\t\tconst selected = this.select(new URL(location.href));\n\t\tif (selected) return this.renderer.start(selected);\n\t}\n\n\tselect(url) {\n\t\tif (url.origin !== location.origin) return null;\n\t\tif (!url.pathname.startsWith(this.base)) return null;\n\n\t\tlet path = url.pathname.slice(this.base.length);\n\n\t\tif (path === '') {\n\t\t\tpath = '/';\n\t\t}\n\n\t\t// avoid accidental clashes between server routes and page routes\n\t\tif (this.ignore.some((pattern) => pattern.test(path))) return;\n\n\t\tfor (const route of this.pages) {\n\t\t\tconst match = route.pattern.exec(path);\n\n\t\t\tif (match) {\n\t\t\t\tconst query = new URLSearchParams(url.search);\n\t\t\t\tconst params = route.params(match);\n\n\t\t\t\tconst page = { host: this.host, path, query, params };\n\n\t\t\t\treturn { href: url.href, route, match, page };\n\t\t\t}\n\t\t}\n\t}\n\n\tasync goto(href, { noscroll = false, replaceState = false } = {}) {\n\t\tconst url = new URL(href, get_base_uri(document));\n\t\tconst selected = this.select(url);\n\n\t\tif (selected) {\n\t\t\tthis.renderer.notify(selected);\n\n\t\t\t// TODO shouldn't need to pass the hash here\n\t\t\tthis.history[replaceState ? 'replaceState' : 'pushState']({}, '', href);\n\t\t\treturn this.navigate(selected, noscroll ? scroll_state() : false, url.hash);\n\t\t}\n\n\t\tlocation.href = href;\n\t\treturn new Promise(() => {\n\t\t\t/* never resolves */\n\t\t});\n\t}\n\n\tasync navigate(selected, scroll, hash) {\n\t\t// remove trailing slashes\n\t\tif (location.pathname.endsWith('/') && location.pathname !== '/') {\n\t\t\thistory.replaceState({}, '', `${location.pathname.slice(0, -1)}${location.search}`);\n\t\t}\n\n\t\tawait this.renderer.render(selected);\n\n\t\tdocument.body.focus();\n\n\t\tconst deep_linked = hash && document.getElementById(hash.slice(1));\n\t\tif (scroll) {\n\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t} else if (deep_linked) {\n\t\t\t// scroll is an element id (from a hash), we need to compute y\n\t\t\tscrollTo(0, deep_linked.getBoundingClientRect().top + scrollY);\n\t\t} else {\n\t\t\tscrollTo(0, 0);\n\t\t}\n\t}\n}\n","import { writable } from 'svelte/store';\nimport { find_anchor } from '../utils';\n\nfunction page_store(value) {\n\tconst store = writable(value);\n\tlet ready = true;\n\n\tfunction notify() {\n\t\tready = true;\n\t\tstore.update((val) => val);\n\t}\n\n\tfunction set(new_value) {\n\t\tready = false;\n\t\tstore.set(new_value);\n\t}\n\n\tfunction subscribe(run) {\n\t\tlet old_value;\n\t\treturn store.subscribe((new_value) => {\n\t\t\tif (old_value === undefined || (ready && new_value !== old_value)) {\n\t\t\t\trun((old_value = new_value));\n\t\t\t}\n\t\t});\n\t}\n\n\treturn { notify, set, subscribe };\n}\n\nexport class Renderer {\n\tconstructor({ Root, layout, target, error, status, preloaded, session }) {\n\t\tthis.Root = Root;\n\t\tthis.layout = layout;\n\t\tthis.layout_loader = () => layout;\n\n\t\t// TODO ideally we wouldn't need to store these...\n\t\tthis.target = target;\n\n\t\tthis.initial = {\n\t\t\tpreloaded,\n\t\t\terror,\n\t\t\tstatus\n\t\t};\n\n\t\tthis.current = {\n\t\t\tpage: null,\n\t\t\tquery: null,\n\t\t\tsession_changed: false,\n\t\t\tnodes: [],\n\t\t\tcontexts: []\n\t\t};\n\n\t\tthis.caches = new Map();\n\n\t\tthis.prefetching = {\n\t\t\thref: null,\n\t\t\tpromise: null\n\t\t};\n\n\t\tthis.stores = {\n\t\t\tpage: page_store({}),\n\t\t\tnavigating: writable(null),\n\t\t\tsession: writable(session)\n\t\t};\n\n\t\tthis.$session = null;\n\n\t\tthis.root = null;\n\n\t\tconst trigger_prefetch = (event) => {\n\t\t\tconst a = find_anchor(event.target);\n\n\t\t\tif (a && a.hasAttribute('sveltekit:prefetch')) {\n\t\t\t\tthis.prefetch(new URL(a.href));\n\t\t\t}\n\t\t};\n\n\t\tlet mousemove_timeout;\n\t\tconst handle_mousemove = (event) => {\n\t\t\tclearTimeout(mousemove_timeout);\n\t\t\tmousemove_timeout = setTimeout(() => {\n\t\t\t\ttrigger_prefetch(event);\n\t\t\t}, 20);\n\t\t};\n\n\t\taddEventListener('touchstart', trigger_prefetch);\n\t\taddEventListener('mousemove', handle_mousemove);\n\n\t\tlet ready = false;\n\t\tthis.stores.session.subscribe(async (value) => {\n\t\t\tthis.$session = value;\n\n\t\t\tif (!ready) return;\n\t\t\tthis.current.session_changed = true;\n\n\t\t\tconst selected = this.router.select(new URL(location.href));\n\t\t\tthis.render(selected);\n\t\t});\n\t\tready = true;\n\t}\n\n\tasync start(selected) {\n\t\tconst props = {\n\t\t\tstores: this.stores,\n\t\t\terror: this.initial.error,\n\t\t\tstatus: this.initial.status,\n\t\t\tpage: selected.page\n\t\t};\n\n\t\tif (this.initial.error) {\n\t\t\tprops.components = [this.layout.default];\n\t\t} else {\n\t\t\tconst hydrated = await this.hydrate(selected);\n\n\t\t\tif (hydrated.redirect) {\n\t\t\t\tthrow new Error('TODO client-side redirects');\n\t\t\t}\n\n\t\t\tObject.assign(props, hydrated.props);\n\t\t\tthis.current = hydrated.state;\n\t\t}\n\n\t\t// remove dev-mode SSR <style> insert, since it doesn't apply\n\t\t// to hydrated markup (HMR requires hashes to be rewritten)\n\t\t// TODO only in dev\n\t\t// TODO it seems this doesn't always work with the classname\n\t\t// stabilisation in vite-plugin-svelte? see e.g.\n\t\t// hn.svelte.dev\n\t\t// const style = document.querySelector('style[data-svelte]');\n\t\t// if (style) style.remove();\n\n\t\tthis.root = new this.Root({\n\t\t\ttarget: this.target,\n\t\t\tprops,\n\t\t\thydrate: true\n\t\t});\n\n\t\tthis.initial = null;\n\t}\n\n\tnotify(selected) {\n\t\tthis.stores.navigating.set({\n\t\t\tfrom: this.current.page,\n\t\t\tto: selected.page\n\t\t});\n\t}\n\n\tasync render(selected) {\n\t\tconst token = (this.token = {});\n\n\t\tconst hydrated = await this.hydrate(selected);\n\n\t\tif (this.token === token) {\n\t\t\t// check render wasn't aborted\n\t\t\tthis.current = hydrated.state;\n\n\t\t\tthis.root.$set(hydrated.props);\n\t\t\tthis.stores.navigating.set(null);\n\t\t}\n\t}\n\n\tasync hydrate({ route, page }) {\n\t\tconst props = {\n\t\t\terror: null,\n\t\t\tstatus: 200,\n\t\t\tcomponents: []\n\t\t};\n\n\t\tconst fetcher = (url, opts) => {\n\t\t\tif (this.initial) {\n\t\t\t\tconst script = document.querySelector(`script[type=\"svelte-data\"][url=\"${url}\"]`);\n\t\t\t\tif (script) {\n\t\t\t\t\tconst { body, ...init } = JSON.parse(script.textContent);\n\t\t\t\t\treturn Promise.resolve(new Response(body, init));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn fetch(url, opts);\n\t\t};\n\n\t\tconst query = page.query.toString();\n\n\t\tconst state = {\n\t\t\tpage,\n\t\t\tquery,\n\t\t\tsession_changed: false,\n\t\t\tnodes: [],\n\t\t\tcontexts: []\n\t\t};\n\n\t\tconst component_promises = [this.layout_loader(), ...route.parts.map((loader) => loader())];\n\t\tconst props_promises = [];\n\n\t\tlet context;\n\t\tlet redirect;\n\n\t\tconst changed = {\n\t\t\tparams: Object.keys(page.params).filter((key) => {\n\t\t\t\treturn !this.current.page || this.current.page.params[key] !== page.params[key];\n\t\t\t}),\n\t\t\tquery: query !== this.current.query,\n\t\t\tsession: this.current.session_changed,\n\t\t\tcontext: false\n\t\t};\n\n\t\ttry {\n\t\t\tfor (let i = 0; i < component_promises.length; i += 1) {\n\t\t\t\tconst previous = this.current.nodes[i];\n\t\t\t\tconst previous_context = this.current.contexts[i];\n\n\t\t\t\tconst { default: component, load } = await component_promises[i];\n\t\t\t\tprops.components[i] = component;\n\n\t\t\t\tconst changed_since_last_render =\n\t\t\t\t\t!previous ||\n\t\t\t\t\tcomponent !== previous.component ||\n\t\t\t\t\tchanged.params.some((param) => previous.uses.params.has(param)) ||\n\t\t\t\t\t(changed.query && previous.uses.query) ||\n\t\t\t\t\t(changed.session && previous.uses.session) ||\n\t\t\t\t\t(changed.context && previous.uses.context);\n\n\t\t\t\tif (changed_since_last_render) {\n\t\t\t\t\tconst hash = page.path + query;\n\n\t\t\t\t\t// see if we have some cached data\n\t\t\t\t\tconst cache = this.caches.get(component);\n\t\t\t\t\tconst cached = cache && cache.get(hash);\n\n\t\t\t\t\tlet node;\n\t\t\t\t\tlet loaded;\n\n\t\t\t\t\tif (cached && (!changed.context || !cached.node.uses.context)) {\n\t\t\t\t\t\t({ node, loaded } = cached);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode = {\n\t\t\t\t\t\t\tcomponent,\n\t\t\t\t\t\t\tuses: {\n\t\t\t\t\t\t\t\tparams: new Set(),\n\t\t\t\t\t\t\t\tquery: false,\n\t\t\t\t\t\t\t\tsession: false,\n\t\t\t\t\t\t\t\tcontext: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst params = {};\n\t\t\t\t\t\tfor (const key in page.params) {\n\t\t\t\t\t\t\tObject.defineProperty(params, key, {\n\t\t\t\t\t\t\t\tget() {\n\t\t\t\t\t\t\t\t\tnode.uses.params.add(key);\n\t\t\t\t\t\t\t\t\treturn page.params[key];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tenumerable: true\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst session = this.$session;\n\n\t\t\t\t\t\tloaded =\n\t\t\t\t\t\t\tload &&\n\t\t\t\t\t\t\t(await load.call(null, {\n\t\t\t\t\t\t\t\tpage: {\n\t\t\t\t\t\t\t\t\thost: page.host,\n\t\t\t\t\t\t\t\t\tpath: page.path,\n\t\t\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t\t\t\tget query() {\n\t\t\t\t\t\t\t\t\t\tnode.uses.query = true;\n\t\t\t\t\t\t\t\t\t\treturn page.query;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget session() {\n\t\t\t\t\t\t\t\t\tnode.uses.session = true;\n\t\t\t\t\t\t\t\t\treturn session;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget context() {\n\t\t\t\t\t\t\t\t\tnode.uses.context = true;\n\t\t\t\t\t\t\t\t\treturn { ...context };\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfetch: fetcher\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (loaded) {\n\t\t\t\t\t\tif (loaded.error) {\n\t\t\t\t\t\t\tlet error = loaded.error;\n\t\t\t\t\t\t\tif (typeof error === 'string') {\n\t\t\t\t\t\t\t\terror = new Error(error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\t\t\terror = new Error(\n\t\t\t\t\t\t\t\t\t`\"error\" property returned from load() must be a string or instance of Error, received type \"${typeof error}\"`\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terror.status = loaded.status;\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (loaded.redirect) {\n\t\t\t\t\t\t\tredirect = loaded.redirect;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (loaded.context) {\n\t\t\t\t\t\t\tchanged.context = true;\n\n\t\t\t\t\t\t\tcontext = {\n\t\t\t\t\t\t\t\t...context,\n\t\t\t\t\t\t\t\t...loaded.context\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (loaded.maxage) {\n\t\t\t\t\t\t\tif (!this.caches.has(component)) {\n\t\t\t\t\t\t\t\tthis.caches.set(component, new Map());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst cache = this.caches.get(component);\n\t\t\t\t\t\t\tconst cached = { node, loaded };\n\n\t\t\t\t\t\t\tcache.set(hash, cached);\n\n\t\t\t\t\t\t\tlet ready = false;\n\n\t\t\t\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\t\t\t\tclear();\n\t\t\t\t\t\t\t}, loaded.maxage * 1000);\n\n\t\t\t\t\t\t\tconst clear = () => {\n\t\t\t\t\t\t\t\tif (cache.get(hash) === cached) {\n\t\t\t\t\t\t\t\t\tcache.delete(hash);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tunsubscribe();\n\t\t\t\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tconst unsubscribe = this.stores.session.subscribe(() => {\n\t\t\t\t\t\t\t\tif (ready) clear();\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tready = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprops_promises[i] = loaded.props;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.nodes[i] = node;\n\t\t\t\t\tstate.contexts[i] = context;\n\t\t\t\t} else {\n\t\t\t\t\tstate.nodes[i] = previous;\n\t\t\t\t\tstate.contexts[i] = context = previous_context;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst new_props = await Promise.all(props_promises);\n\n\t\t\tnew_props.forEach((p, i) => {\n\t\t\t\tif (p) {\n\t\t\t\t\tprops[`props_${i}`] = p;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (!this.current.page || page.path !== this.current.page.path) {\n\t\t\t\tprops.page = page;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tprops.error = error;\n\t\t\tprops.status = error.status || 500;\n\t\t\tstate.nodes = [];\n\t\t}\n\n\t\treturn { redirect, props, state };\n\t}\n\n\tasync prefetch(url) {\n\t\tconst page = this.router.select(url);\n\n\t\tif (page) {\n\t\t\tif (url.href !== this.prefetching.href) {\n\t\t\t\tthis.prefetching = { href: url.href, promise: this.hydrate(page) };\n\t\t\t}\n\n\t\t\treturn this.prefetching.promise;\n\t\t} else {\n\t\t\tthrow new Error(`Could not prefetch ${url.href}`);\n\t\t}\n\t}\n}\n","import Root from 'ROOT'; // eslint-disable-line import/no-unresolved\nimport { pages, ignore, layout } from 'MANIFEST'; // eslint-disable-line import/no-unresolved\nimport { Router } from './router';\nimport { Renderer } from './renderer';\nimport { init, set_paths } from './singletons';\n\nexport async function start({ paths, target, host, session, preloaded, error, status }) {\n\tconst router = new Router({\n\t\tbase: paths.base,\n\t\thost,\n\t\tpages,\n\t\tignore\n\t});\n\n\tconst renderer = new Renderer({\n\t\tRoot,\n\t\tlayout,\n\t\ttarget,\n\t\tpreloaded,\n\t\terror,\n\t\tstatus,\n\t\tsession\n\t});\n\n\tinit({ router, renderer });\n\tset_paths(paths);\n\n\tawait router.init({ renderer });\n}\n"],"names":[],"mappings":";;;;;;AAEA,SAAS,KAAK,CAAC,KAAK,EAAE;AACtB,CAAC,OAAO,KAAK,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;AAC1D,CAAC;AACD;AACA,SAAS,YAAY,GAAG;AACxB,CAAC,OA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