token-usage-dashboard 1.0.6

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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/bin/ai-usage-dashboard.js +92 -0
  4. package/build/client/_app/immutable/assets/0.fjR0gTLF.css +1 -0
  5. package/build/client/_app/immutable/assets/0.fjR0gTLF.css.br +0 -0
  6. package/build/client/_app/immutable/assets/0.fjR0gTLF.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/2.BABRsmGA.css +1 -0
  8. package/build/client/_app/immutable/assets/2.BABRsmGA.css.br +0 -0
  9. package/build/client/_app/immutable/assets/2.BABRsmGA.css.gz +0 -0
  10. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  11. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/DC6tN2WI.js +3 -0
  14. package/build/client/_app/immutable/chunks/DC6tN2WI.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/DC6tN2WI.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/DRLSLo2t.js +2 -0
  17. package/build/client/_app/immutable/chunks/DRLSLo2t.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/DRLSLo2t.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  20. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  21. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  22. package/build/client/_app/immutable/entry/app.C7Gg5PnI.js +2 -0
  23. package/build/client/_app/immutable/entry/app.C7Gg5PnI.js.br +0 -0
  24. package/build/client/_app/immutable/entry/app.C7Gg5PnI.js.gz +0 -0
  25. package/build/client/_app/immutable/entry/start.fbJ-_JRS.js +1 -0
  26. package/build/client/_app/immutable/entry/start.fbJ-_JRS.js.br +0 -0
  27. package/build/client/_app/immutable/entry/start.fbJ-_JRS.js.gz +0 -0
  28. package/build/client/_app/immutable/nodes/0.BNwlucmP.js +1 -0
  29. package/build/client/_app/immutable/nodes/0.BNwlucmP.js.br +0 -0
  30. package/build/client/_app/immutable/nodes/0.BNwlucmP.js.gz +0 -0
  31. package/build/client/_app/immutable/nodes/1.Dj3Fzim2.js +1 -0
  32. package/build/client/_app/immutable/nodes/1.Dj3Fzim2.js.br +0 -0
  33. package/build/client/_app/immutable/nodes/1.Dj3Fzim2.js.gz +0 -0
  34. package/build/client/_app/immutable/nodes/2.Csi9nKxw.js +2 -0
  35. package/build/client/_app/immutable/nodes/2.Csi9nKxw.js.br +0 -0
  36. package/build/client/_app/immutable/nodes/2.Csi9nKxw.js.gz +0 -0
  37. package/build/client/_app/version.json +1 -0
  38. package/build/client/_app/version.json.br +0 -0
  39. package/build/client/_app/version.json.gz +0 -0
  40. package/build/client/favicon.svg +1 -0
  41. package/build/client/favicon.svg.br +0 -0
  42. package/build/client/favicon.svg.gz +0 -0
  43. package/build/client/robots.txt +2 -0
  44. package/build/client/robots.txt.br +3 -0
  45. package/build/client/robots.txt.gz +0 -0
  46. package/build/env.js +70 -0
  47. package/build/handler.js +22 -0
  48. package/build/index.js +145 -0
  49. package/build/server/chunks/chunks/client.js-C1_n_a2s.js +28 -0
  50. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  51. package/build/server/chunks/chunks/exports.js-Dd48p7Ih.js +263 -0
  52. package/build/server/chunks/chunks/internal.js-b-1wrnfA.js +1201 -0
  53. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js +22 -0
  54. package/build/server/chunks/chunks/queries.js-aTxz7ubg.js +676 -0
  55. package/build/server/chunks/chunks/range.js-CLYFtcRE.js +117 -0
  56. package/build/server/chunks/chunks/refresh.js-DM1hnB2Y.js +107 -0
  57. package/build/server/chunks/chunks/request.js-B3j1_Icg.js +20 -0
  58. package/build/server/chunks/chunks/server.js-mTMwhapa.js +5374 -0
  59. package/build/server/chunks/chunks/shared.js-7DyfRqo3.js +255 -0
  60. package/build/server/chunks/chunks/utils.js-DzwqnkBT.js +1049 -0
  61. package/build/server/chunks/entries/endpoints/api/refresh/_server.ts.js-CJa6pKKD.js +21 -0
  62. package/build/server/chunks/entries/endpoints/api/settings/_server.ts.js-DQt7Bc2q.js +24 -0
  63. package/build/server/chunks/entries/endpoints/api/usage/_server.ts.js-kInjrhtE.js +17 -0
  64. package/build/server/chunks/entries/fallbacks/error.svelte.js-CVKDebWa.js +68 -0
  65. package/build/server/chunks/entries/hooks.server.js-BbojNy1X.js +16 -0
  66. package/build/server/chunks/entries/pages/_layout.svelte.js-C9kkUOBf.js +9 -0
  67. package/build/server/chunks/entries/pages/_page.server.ts.js-Oa3Sfml2.js +17 -0
  68. package/build/server/chunks/entries/pages/_page.svelte.js-D91hy9R4.js +1255 -0
  69. package/build/server/chunks/handler-br42Ds2q.js +1475 -0
  70. package/build/server/chunks/index.js-CBAFVV7O.js +3972 -0
  71. package/build/server/chunks/manifest.js-s70ajt69.js +63 -0
  72. package/build/server/chunks/nodes/0.js-Bzngkdxl.js +9 -0
  73. package/build/server/chunks/nodes/1.js-Cvu2_eGw.js +9 -0
  74. package/build/server/chunks/nodes/2.js-7xvomkGu.js +20 -0
  75. package/build/shims.js +33 -0
  76. package/package.json +64 -0
@@ -0,0 +1,1201 @@
1
+ import { r as render, s as set, L as LEGACY_PROPS, g as get, f as flushSync, d as define_property, m as mutable_source, i as init_operations, a as get_first_child, b as get_next_sibling, H as HYDRATION_ERROR, c as set_hydrating, e as set_hydrate_node, h as hydration_failed, j as clear_text_content, k as component_root, l as hydrate_node, n as create_text, o as array_from, p as is_passive_event, q as set_active_reaction, t as set_active_effect, u as active_reaction, v as active_effect, w as setContext, x as hydrating, y as block, z as branch, A as queue_micro_task, B as invoke_error_boundary, C as current_batch, D as pause_effect, E as move_effect, F as defer_effect, G as set_component_context, I as Batch, J as component_context, K as internal_set, M as destroy_effect, N as next, O as skip_nodes, P as derived, Q as effect_tracking, R as render_effect, S as svelte_boundary_reset_noop, T as svelte_boundary_reset_onerror, U as source, V as untrack, W as increment, X as hydrate_next, Y as push$1, Z as mark_as_component, _ as hydration_mismatch, $ as pop$1, a0 as run, a1 as noop, a2 as hasContext, a3 as getContext, a4 as getAllContexts, a5 as createContext, a6 as ssr_context, a7 as lifecycle_function_unavailable, a8 as EFFECT_TRANSPARENT, a9 as EFFECT_PRESERVED, aa as experimental_async_required, ab as get_render_context, ac as uneval, ad as hydratable_serialization_failed } from './server.js-mTMwhapa.js';
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __defProp = Object.defineProperty;
5
+ var __exportAll = (all, no_symbols) => {
6
+ let target = {};
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
12
+ return target;
13
+ };
14
+ /**
15
+ * `$env/dynamic/public`
16
+ * @type {Record<string, string>}
17
+ */
18
+ var public_env = {};
19
+ /** @type {(environment: Record<string, string>) => void} */
20
+ function set_private_env(environment) {}
21
+ /** @type {(environment: Record<string, string>) => void} */
22
+ function set_public_env(environment) {
23
+ public_env = environment;
24
+ }
25
+ //#endregion
26
+ //#region \0virtual:__sveltekit/server
27
+ var read_implementation = null;
28
+ function set_read_implementation(fn) {
29
+ read_implementation = fn;
30
+ }
31
+ //#endregion
32
+ //#region node_modules/svelte/src/internal/client/dom/elements/events.js
33
+ /**
34
+ * Used on elements, as a map of event type -> event handler,
35
+ * and on events themselves to track which element handled an event
36
+ */
37
+ var event_symbol = Symbol("events");
38
+ /** @type {Set<string>} */
39
+ var all_registered_events = /* @__PURE__ */ new Set();
40
+ /** @type {Set<(events: Array<string>) => void>} */
41
+ var root_event_handles = /* @__PURE__ */ new Set();
42
+ var last_propagated_event = null;
43
+ var last_propagated_event_clear_scheduled = false;
44
+ /**
45
+ * @this {EventTarget}
46
+ * @param {Event} event
47
+ * @returns {void}
48
+ */
49
+ function handle_event_propagation(event) {
50
+ var handler_element = this;
51
+ var owner_document = handler_element.ownerDocument;
52
+ var event_name = event.type;
53
+ var path = event.composedPath?.() || [];
54
+ var current_target = path[0] || event.target;
55
+ last_propagated_event = event;
56
+ if (!last_propagated_event_clear_scheduled) {
57
+ last_propagated_event_clear_scheduled = true;
58
+ setTimeout(() => {
59
+ last_propagated_event_clear_scheduled = false;
60
+ last_propagated_event = null;
61
+ });
62
+ }
63
+ var path_idx = 0;
64
+ var handled_at = last_propagated_event === event && event[event_symbol];
65
+ if (handled_at) {
66
+ var at_idx = path.indexOf(handled_at);
67
+ if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
68
+ event[event_symbol] = handler_element;
69
+ return;
70
+ }
71
+ var handler_idx = path.indexOf(handler_element);
72
+ if (handler_idx === -1) return;
73
+ if (at_idx <= handler_idx) path_idx = at_idx;
74
+ }
75
+ current_target = path[path_idx] || event.target;
76
+ if (current_target === handler_element) return;
77
+ define_property(event, "currentTarget", {
78
+ configurable: true,
79
+ get() {
80
+ return current_target || owner_document;
81
+ }
82
+ });
83
+ var previous_reaction = active_reaction;
84
+ var previous_effect = active_effect;
85
+ set_active_reaction(null);
86
+ set_active_effect(null);
87
+ try {
88
+ /**
89
+ * @type {unknown}
90
+ */
91
+ var throw_error;
92
+ /**
93
+ * @type {unknown[]}
94
+ */
95
+ var other_errors = [];
96
+ while (current_target !== null) {
97
+ if (current_target === handler_element) break;
98
+ try {
99
+ var delegated = current_target[event_symbol]?.[event_name];
100
+ if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
101
+ } catch (error) {
102
+ if (throw_error) other_errors.push(error);
103
+ else throw_error = error;
104
+ }
105
+ if (event.cancelBubble) break;
106
+ path_idx++;
107
+ current_target = path_idx < path.length ? path[path_idx] : null;
108
+ }
109
+ if (throw_error) {
110
+ for (let error of other_errors) queueMicrotask(() => {
111
+ throw error;
112
+ });
113
+ throw throw_error;
114
+ }
115
+ } finally {
116
+ event[event_symbol] = handler_element;
117
+ delete event.currentTarget;
118
+ set_active_reaction(previous_reaction);
119
+ set_active_effect(previous_effect);
120
+ }
121
+ }
122
+ //#endregion
123
+ //#region node_modules/svelte/src/internal/client/dom/template.js
124
+ /**
125
+ * @param {TemplateNode} start
126
+ * @param {TemplateNode | null} end
127
+ */
128
+ function assign_nodes(start, end) {
129
+ var effect = active_effect;
130
+ if (effect.nodes === null) effect.nodes = {
131
+ start,
132
+ end,
133
+ a: null,
134
+ t: null
135
+ };
136
+ }
137
+ //#endregion
138
+ //#region node_modules/svelte/src/reactivity/create-subscriber.js
139
+ /**
140
+ * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
141
+ * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
142
+ *
143
+ * If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
144
+ * the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
145
+ *
146
+ * If `start` returns a cleanup function, it will be called when the effect is destroyed.
147
+ *
148
+ * If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
149
+ * are active, and the returned teardown function will only be called when all effects are destroyed.
150
+ *
151
+ * It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
152
+ *
153
+ * ```js
154
+ * import { createSubscriber } from 'svelte/reactivity';
155
+ * import { on } from 'svelte/events';
156
+ *
157
+ * export class MediaQuery {
158
+ * #query;
159
+ * #subscribe;
160
+ *
161
+ * constructor(query) {
162
+ * this.#query = window.matchMedia(`(${query})`);
163
+ *
164
+ * this.#subscribe = createSubscriber((update) => {
165
+ * // when the `change` event occurs, re-run any effects that read `this.current`
166
+ * const off = on(this.#query, 'change', update);
167
+ *
168
+ * // stop listening when all the effects are destroyed
169
+ * return () => off();
170
+ * });
171
+ * }
172
+ *
173
+ * get current() {
174
+ * // This makes the getter reactive, if read in an effect
175
+ * this.#subscribe();
176
+ *
177
+ * // Return the current state of the query, whether or not we're in an effect
178
+ * return this.#query.matches;
179
+ * }
180
+ * }
181
+ * ```
182
+ * @param {(update: () => void) => (() => void) | void} start
183
+ * @since 5.7.0
184
+ */
185
+ function createSubscriber(start) {
186
+ let subscribers = 0;
187
+ let version = source(0);
188
+ /** @type {(() => void) | void} */
189
+ let stop;
190
+ return () => {
191
+ if (effect_tracking()) {
192
+ get(version);
193
+ render_effect(() => {
194
+ if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
195
+ subscribers += 1;
196
+ return () => {
197
+ queue_micro_task(() => {
198
+ subscribers -= 1;
199
+ if (subscribers === 0) {
200
+ stop?.();
201
+ stop = void 0;
202
+ increment(version);
203
+ }
204
+ });
205
+ };
206
+ });
207
+ }
208
+ };
209
+ }
210
+ //#endregion
211
+ //#region node_modules/svelte/src/internal/client/dom/blocks/boundary.js
212
+ /** @import { Effect, Source, TemplateNode, } from '#client' */
213
+ /**
214
+ * @typedef {{
215
+ * onerror?: ((error: unknown, reset: () => void) => void) | null;
216
+ * failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
217
+ * pending?: ((anchor: Node) => void) | null;
218
+ * }} BoundaryProps
219
+ */
220
+ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
221
+ /**
222
+ * @param {TemplateNode} node
223
+ * @param {BoundaryProps} props
224
+ * @param {((anchor: Node) => void)} children
225
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
226
+ * @returns {void}
227
+ */
228
+ function boundary(node, props, children, transform_error) {
229
+ new Boundary(node, props, children, transform_error);
230
+ }
231
+ var Boundary = class {
232
+ /** @type {Boundary | null} */
233
+ parent;
234
+ is_pending = false;
235
+ /**
236
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
237
+ * Inherited from parent boundary, or defaults to identity.
238
+ * @type {(error: unknown) => unknown}
239
+ */
240
+ transform_error;
241
+ /** @type {TemplateNode} */
242
+ #anchor;
243
+ /** @type {TemplateNode | null} */
244
+ #hydrate_open = hydrating ? hydrate_node : null;
245
+ /** @type {BoundaryProps} */
246
+ #props;
247
+ /** @type {((anchor: Node) => void)} */
248
+ #children;
249
+ /** @type {Effect} */
250
+ #effect;
251
+ /** @type {Effect | null} */
252
+ #main_effect = null;
253
+ /** @type {Effect | null} */
254
+ #pending_effect = null;
255
+ /** @type {Effect | null} */
256
+ #failed_effect = null;
257
+ /** @type {DocumentFragment | null} */
258
+ #offscreen_fragment = null;
259
+ #local_pending_count = 0;
260
+ #pending_count = 0;
261
+ #pending_count_update_queued = false;
262
+ /** @type {Set<Effect>} */
263
+ #dirty_effects = /* @__PURE__ */ new Set();
264
+ /** @type {Set<Effect>} */
265
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
266
+ /**
267
+ * A source containing the number of pending async deriveds/expressions.
268
+ * Only created if `$effect.pending()` is used inside the boundary,
269
+ * otherwise updating the source results in needless `Batch.ensure()`
270
+ * calls followed by no-op flushes
271
+ * @type {Source<number> | null}
272
+ */
273
+ #effect_pending = null;
274
+ #effect_pending_subscriber = createSubscriber(() => {
275
+ this.#effect_pending = source(this.#local_pending_count);
276
+ return () => {
277
+ this.#effect_pending = null;
278
+ };
279
+ });
280
+ /**
281
+ * @param {TemplateNode} node
282
+ * @param {BoundaryProps} props
283
+ * @param {((anchor: Node) => void)} children
284
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
285
+ */
286
+ constructor(node, props, children, transform_error) {
287
+ this.#anchor = node;
288
+ this.#props = props;
289
+ this.#children = (anchor) => {
290
+ var effect = active_effect;
291
+ effect.b = this;
292
+ effect.f |= 128;
293
+ children(anchor);
294
+ };
295
+ this.parent = active_effect.b;
296
+ this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
297
+ this.#effect = block(() => {
298
+ if (hydrating) {
299
+ const comment = this.#hydrate_open;
300
+ hydrate_next();
301
+ const server_rendered_pending = comment.data === "[!";
302
+ if (comment.data.startsWith("[?")) {
303
+ const serialized_error = JSON.parse(comment.data.slice(2));
304
+ this.#hydrate_failed_content(serialized_error);
305
+ } else if (server_rendered_pending) this.#hydrate_pending_content();
306
+ else this.#hydrate_resolved_content();
307
+ } else this.#render();
308
+ }, flags);
309
+ if (hydrating) this.#anchor = hydrate_node;
310
+ }
311
+ #hydrate_resolved_content() {
312
+ try {
313
+ this.#main_effect = branch(() => this.#children(this.#anchor));
314
+ } catch (error) {
315
+ this.error(error);
316
+ }
317
+ }
318
+ /**
319
+ * @param {unknown} error The deserialized error from the server's hydration comment
320
+ */
321
+ #hydrate_failed_content(error) {
322
+ const failed = this.#props.failed;
323
+ const { reset, invoke_onerror } = this.#create_reset(error);
324
+ queue_micro_task(invoke_onerror);
325
+ if (!failed) return;
326
+ this.#failed_effect = branch(() => {
327
+ failed(this.#anchor, () => error, () => reset);
328
+ });
329
+ }
330
+ /**
331
+ * Creates the `reset` function for a failed boundary, along with a function
332
+ * that invokes `onerror` with it (if provided)
333
+ * @param {unknown} error
334
+ * @returns {{ reset: () => void, invoke_onerror: () => void }}
335
+ */
336
+ #create_reset(error) {
337
+ var did_reset = false;
338
+ var calling_on_error = false;
339
+ const reset = () => {
340
+ if (did_reset) {
341
+ svelte_boundary_reset_noop();
342
+ return;
343
+ }
344
+ did_reset = true;
345
+ if (calling_on_error) svelte_boundary_reset_onerror();
346
+ if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
347
+ this.#failed_effect = null;
348
+ });
349
+ this.#run(() => {
350
+ this.#render();
351
+ });
352
+ };
353
+ const invoke_onerror = () => {
354
+ try {
355
+ calling_on_error = true;
356
+ this.#props.onerror?.(error, reset);
357
+ calling_on_error = false;
358
+ } catch (err) {
359
+ invoke_error_boundary(err, this.#effect && this.#effect.parent);
360
+ }
361
+ };
362
+ return {
363
+ reset,
364
+ invoke_onerror
365
+ };
366
+ }
367
+ #hydrate_pending_content() {
368
+ const pending = this.#props.pending;
369
+ if (!pending) return;
370
+ this.is_pending = true;
371
+ this.#pending_effect = branch(() => pending(this.#anchor));
372
+ queue_micro_task(() => {
373
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
374
+ var anchor = create_text();
375
+ var handled = false;
376
+ fragment.append(anchor);
377
+ this.#main_effect = this.#run(() => {
378
+ try {
379
+ return branch(() => this.#children(anchor));
380
+ } catch (error) {
381
+ try {
382
+ this.error(error);
383
+ handled = true;
384
+ } catch (error) {
385
+ invoke_error_boundary(error, this.#effect.parent);
386
+ }
387
+ return null;
388
+ }
389
+ });
390
+ if (this.#main_effect === null) {
391
+ this.#offscreen_fragment = null;
392
+ if (handled) this.#resolve(current_batch);
393
+ return;
394
+ }
395
+ if (this.#pending_count === 0) {
396
+ this.#anchor.before(fragment);
397
+ this.#offscreen_fragment = null;
398
+ pause_effect(this.#pending_effect, () => {
399
+ this.#pending_effect = null;
400
+ });
401
+ this.#resolve(current_batch);
402
+ }
403
+ });
404
+ }
405
+ #render() {
406
+ try {
407
+ this.is_pending = this.has_pending_snippet();
408
+ this.#pending_count = 0;
409
+ this.#local_pending_count = 0;
410
+ this.#main_effect = branch(() => {
411
+ this.#children(this.#anchor);
412
+ });
413
+ if (this.#pending_count > 0) {
414
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
415
+ move_effect(this.#main_effect, fragment);
416
+ const pending = this.#props.pending;
417
+ this.#pending_effect = branch(() => pending(this.#anchor));
418
+ } else this.#resolve(current_batch);
419
+ } catch (error) {
420
+ this.error(error);
421
+ }
422
+ }
423
+ /**
424
+ * @param {Batch} batch
425
+ */
426
+ #resolve(batch) {
427
+ this.is_pending = false;
428
+ batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
429
+ }
430
+ /**
431
+ * Defer an effect inside a pending boundary until the boundary resolves
432
+ * @param {Effect} effect
433
+ */
434
+ defer_effect(effect) {
435
+ defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
436
+ }
437
+ /**
438
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
439
+ * @returns {boolean}
440
+ */
441
+ is_rendered() {
442
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
443
+ }
444
+ has_pending_snippet() {
445
+ return !!this.#props.pending;
446
+ }
447
+ /**
448
+ * @template T
449
+ * @param {() => T} fn
450
+ */
451
+ #run(fn) {
452
+ var previous_effect = active_effect;
453
+ var previous_reaction = active_reaction;
454
+ var previous_ctx = component_context;
455
+ set_active_effect(this.#effect);
456
+ set_active_reaction(this.#effect);
457
+ set_component_context(this.#effect.ctx);
458
+ try {
459
+ Batch.ensure();
460
+ return fn();
461
+ } finally {
462
+ set_active_effect(previous_effect);
463
+ set_active_reaction(previous_reaction);
464
+ set_component_context(previous_ctx);
465
+ }
466
+ }
467
+ /**
468
+ * Updates the pending count associated with the currently visible pending snippet,
469
+ * if any, such that we can replace the snippet with content once work is done
470
+ * @param {1 | -1} d
471
+ * @param {Batch} batch
472
+ */
473
+ #update_pending_count(d, batch) {
474
+ if (!this.has_pending_snippet()) {
475
+ if (this.parent) this.parent.#update_pending_count(d, batch);
476
+ return;
477
+ }
478
+ this.#pending_count += d;
479
+ if (this.#pending_count === 0) {
480
+ this.#resolve(batch);
481
+ if (this.#pending_effect) pause_effect(this.#pending_effect, () => {
482
+ this.#pending_effect = null;
483
+ });
484
+ if (this.#offscreen_fragment) {
485
+ this.#anchor.before(this.#offscreen_fragment);
486
+ this.#offscreen_fragment = null;
487
+ }
488
+ }
489
+ }
490
+ /**
491
+ * Update the source that powers `$effect.pending()` inside this boundary,
492
+ * and controls when the current `pending` snippet (if any) is removed.
493
+ * Do not call from inside the class
494
+ * @param {1 | -1} d
495
+ * @param {Batch} batch
496
+ */
497
+ update_pending_count(d, batch) {
498
+ this.#update_pending_count(d, batch);
499
+ this.#local_pending_count += d;
500
+ if (!this.#effect_pending || this.#pending_count_update_queued) return;
501
+ this.#pending_count_update_queued = true;
502
+ queue_micro_task(() => {
503
+ this.#pending_count_update_queued = false;
504
+ if (this.#effect_pending) internal_set(this.#effect_pending, this.#local_pending_count);
505
+ });
506
+ }
507
+ get_effect_pending() {
508
+ this.#effect_pending_subscriber();
509
+ return get(this.#effect_pending);
510
+ }
511
+ /** @param {unknown} error */
512
+ error(error) {
513
+ if (!this.#props.onerror && !this.#props.failed) throw error;
514
+ if (current_batch?.is_fork) {
515
+ if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
516
+ if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
517
+ if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
518
+ current_batch.oncommit(() => {
519
+ this.#handle_error(error);
520
+ });
521
+ } else this.#handle_error(error);
522
+ }
523
+ /**
524
+ * @param {unknown} error
525
+ */
526
+ #handle_error(error) {
527
+ if (this.#main_effect) {
528
+ destroy_effect(this.#main_effect);
529
+ this.#main_effect = null;
530
+ }
531
+ if (this.#pending_effect) {
532
+ destroy_effect(this.#pending_effect);
533
+ this.#pending_effect = null;
534
+ }
535
+ if (this.#failed_effect) {
536
+ destroy_effect(this.#failed_effect);
537
+ this.#failed_effect = null;
538
+ }
539
+ if (hydrating) {
540
+ set_hydrate_node(this.#hydrate_open);
541
+ next();
542
+ set_hydrate_node(skip_nodes());
543
+ }
544
+ let failed = this.#props.failed;
545
+ /** @param {unknown} transformed_error */
546
+ const handle_error_result = (transformed_error) => {
547
+ const { reset, invoke_onerror } = this.#create_reset(transformed_error);
548
+ invoke_onerror();
549
+ if (failed) this.#failed_effect = this.#run(() => {
550
+ try {
551
+ return branch(() => {
552
+ var effect = active_effect;
553
+ effect.b = this;
554
+ effect.f |= 128;
555
+ failed(this.#anchor, () => transformed_error, () => reset);
556
+ });
557
+ } catch (error) {
558
+ invoke_error_boundary(error, this.#effect.parent);
559
+ return null;
560
+ }
561
+ });
562
+ };
563
+ queue_micro_task(() => {
564
+ /** @type {unknown} */
565
+ var result;
566
+ try {
567
+ result = this.transform_error(error);
568
+ } catch (e) {
569
+ invoke_error_boundary(e, this.#effect && this.#effect.parent);
570
+ return;
571
+ }
572
+ if (result !== null && typeof result === "object" && typeof result.then === "function")
573
+ /** @type {any} */ result.then(
574
+ handle_error_result,
575
+ /** @param {unknown} e */
576
+ (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
577
+ );
578
+ else handle_error_result(result);
579
+ });
580
+ }
581
+ };
582
+ /**
583
+ * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
584
+ * Transitions will play during the initial render unless the `intro` option is set to `false`.
585
+ *
586
+ * @template {Record<string, any>} Props
587
+ * @template {Record<string, any>} Exports
588
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
589
+ * @param {MountOptions<Props>} options
590
+ * @returns {Exports}
591
+ */
592
+ function mount$1(component, options) {
593
+ return _mount(component, options);
594
+ }
595
+ /**
596
+ * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
597
+ *
598
+ * @template {Record<string, any>} Props
599
+ * @template {Record<string, any>} Exports
600
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
601
+ * @param {{} extends Props ? {
602
+ * target: Document | Element | ShadowRoot;
603
+ * props?: Props;
604
+ * events?: Record<string, (e: any) => any>;
605
+ * context?: Map<any, any>;
606
+ * intro?: boolean;
607
+ * recover?: boolean;
608
+ * transformError?: (error: unknown) => unknown;
609
+ * } : {
610
+ * target: Document | Element | ShadowRoot;
611
+ * props: Props;
612
+ * events?: Record<string, (e: any) => any>;
613
+ * context?: Map<any, any>;
614
+ * intro?: boolean;
615
+ * recover?: boolean;
616
+ * transformError?: (error: unknown) => unknown;
617
+ * }} options
618
+ * @returns {Exports}
619
+ */
620
+ function hydrate$1(component, options) {
621
+ init_operations();
622
+ options.intro = options.intro ?? false;
623
+ const target = options.target;
624
+ const was_hydrating = hydrating;
625
+ const previous_hydrate_node = hydrate_node;
626
+ try {
627
+ var anchor = /* @__PURE__ */ get_first_child(target);
628
+ while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
629
+ if (!anchor) throw HYDRATION_ERROR;
630
+ set_hydrating(true);
631
+ set_hydrate_node(anchor);
632
+ const instance = _mount(component, {
633
+ ...options,
634
+ anchor
635
+ });
636
+ set_hydrating(false);
637
+ return instance;
638
+ } catch (error) {
639
+ if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
640
+ if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
641
+ if (options.recover === false) hydration_failed();
642
+ init_operations();
643
+ clear_text_content(target);
644
+ set_hydrating(false);
645
+ return mount$1(component, options);
646
+ } finally {
647
+ set_hydrating(was_hydrating);
648
+ set_hydrate_node(previous_hydrate_node);
649
+ }
650
+ }
651
+ /** @type {Map<EventTarget, Map<string, number>>} */
652
+ var listeners = /* @__PURE__ */ new Map();
653
+ /**
654
+ * @template {Record<string, any>} Exports
655
+ * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
656
+ * @param {MountOptions} options
657
+ * @returns {Exports}
658
+ */
659
+ function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
660
+ init_operations();
661
+ /** @type {Exports} */
662
+ var component = void 0;
663
+ var unmount = component_root(() => {
664
+ var anchor_node = anchor ?? target.appendChild(create_text());
665
+ boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
666
+ push$1({});
667
+ var ctx = component_context;
668
+ if (context) ctx.c = context;
669
+ if (events)
670
+ /** @type {any} */ props.$$events = events;
671
+ if (hydrating) assign_nodes(anchor_node, null);
672
+ component = Component(anchor_node, props) || mark_as_component();
673
+ if (hydrating) {
674
+ /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
675
+ if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
676
+ hydration_mismatch();
677
+ throw HYDRATION_ERROR;
678
+ }
679
+ }
680
+ pop$1();
681
+ }, transformError);
682
+ /** @type {Set<string>} */
683
+ var registered_events = /* @__PURE__ */ new Set();
684
+ /** @param {Array<string>} events */
685
+ var event_handle = (events) => {
686
+ for (var i = 0; i < events.length; i++) {
687
+ var event_name = events[i];
688
+ if (registered_events.has(event_name)) continue;
689
+ registered_events.add(event_name);
690
+ var passive = is_passive_event(event_name);
691
+ for (const node of [target, document]) {
692
+ var counts = listeners.get(node);
693
+ if (counts === void 0) {
694
+ counts = /* @__PURE__ */ new Map();
695
+ listeners.set(node, counts);
696
+ }
697
+ var count = counts.get(event_name);
698
+ if (count === void 0) {
699
+ node.addEventListener(event_name, handle_event_propagation, { passive });
700
+ counts.set(event_name, 1);
701
+ } else counts.set(event_name, count + 1);
702
+ }
703
+ }
704
+ };
705
+ event_handle(array_from(all_registered_events));
706
+ root_event_handles.add(event_handle);
707
+ return () => {
708
+ for (var event_name of registered_events) for (const node of [target, document]) {
709
+ var counts = listeners.get(node);
710
+ var count = counts.get(event_name);
711
+ if (--count == 0) {
712
+ node.removeEventListener(event_name, handle_event_propagation);
713
+ counts.delete(event_name);
714
+ if (counts.size === 0) listeners.delete(node);
715
+ } else counts.set(event_name, count);
716
+ }
717
+ root_event_handles.delete(event_handle);
718
+ if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
719
+ };
720
+ });
721
+ mounted_components.set(component, unmount);
722
+ return component;
723
+ }
724
+ /**
725
+ * References of the components that were mounted or hydrated.
726
+ * Uses a `WeakMap` to avoid memory leaks.
727
+ */
728
+ var mounted_components = /* @__PURE__ */ new WeakMap();
729
+ /**
730
+ * Unmounts a component that was previously mounted using `mount` or `hydrate`.
731
+ *
732
+ * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
733
+ *
734
+ * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
735
+ *
736
+ * ```js
737
+ * import { mount, unmount } from 'svelte';
738
+ * import App from './App.svelte';
739
+ *
740
+ * const app = mount(App, { target: document.body });
741
+ *
742
+ * // later...
743
+ * unmount(app, { outro: true });
744
+ * ```
745
+ * @param {Record<string, any>} component
746
+ * @param {{ outro?: boolean }} [options]
747
+ * @returns {Promise<void>}
748
+ */
749
+ function unmount$1(component, options) {
750
+ const fn = mounted_components.get(component);
751
+ if (fn) {
752
+ mounted_components.delete(component);
753
+ return fn(options);
754
+ }
755
+ return Promise.resolve();
756
+ }
757
+ //#endregion
758
+ //#region node_modules/svelte/src/legacy/legacy-client.js
759
+ /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
760
+ /**
761
+ * Takes the component function and returns a Svelte 4 compatible component constructor.
762
+ *
763
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
764
+ *
765
+ * @template {Record<string, any>} Props
766
+ * @template {Record<string, any>} Exports
767
+ * @template {Record<string, any>} Events
768
+ * @template {Record<string, any>} Slots
769
+ *
770
+ * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
771
+ * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
772
+ */
773
+ function asClassComponent$1(component) {
774
+ return class extends Svelte4Component {
775
+ /** @param {any} options */
776
+ constructor(options) {
777
+ super({
778
+ component,
779
+ ...options
780
+ });
781
+ }
782
+ };
783
+ }
784
+ /**
785
+ * Support using the component as both a class and function during the transition period
786
+ * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
787
+ */
788
+ var Svelte4Component = class {
789
+ /** @type {any} */
790
+ #events;
791
+ /** @type {Record<string, any>} */
792
+ #instance;
793
+ /**
794
+ * @param {ComponentConstructorOptions & {
795
+ * component: any;
796
+ * }} options
797
+ */
798
+ constructor(options) {
799
+ var sources = /* @__PURE__ */ new Map();
800
+ /**
801
+ * @param {string | symbol} key
802
+ * @param {unknown} value
803
+ */
804
+ var add_source = (key, value) => {
805
+ var s = /* @__PURE__ */ mutable_source(value, false, false);
806
+ sources.set(key, s);
807
+ return s;
808
+ };
809
+ const props = new Proxy({
810
+ ...options.props || {},
811
+ $$events: {}
812
+ }, {
813
+ get(target, prop) {
814
+ return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
815
+ },
816
+ has(target, prop) {
817
+ if (prop === LEGACY_PROPS) return true;
818
+ get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
819
+ return Reflect.has(target, prop);
820
+ },
821
+ set(target, prop, value) {
822
+ set(sources.get(prop) ?? add_source(prop, value), value);
823
+ return Reflect.set(target, prop, value);
824
+ }
825
+ });
826
+ this.#instance = (options.hydrate ? hydrate$1 : mount$1)(options.component, {
827
+ target: options.target,
828
+ anchor: options.anchor,
829
+ props,
830
+ context: options.context,
831
+ intro: options.intro ?? false,
832
+ recover: options.recover,
833
+ transformError: options.transformError
834
+ });
835
+ if ((!options?.props?.$$host || options.sync === false)) flushSync();
836
+ this.#events = props.$$events;
837
+ for (const key of Object.keys(this.#instance)) {
838
+ if (key === "$set" || key === "$destroy" || key === "$on") continue;
839
+ define_property(this, key, {
840
+ get() {
841
+ return this.#instance[key];
842
+ },
843
+ /** @param {any} value */
844
+ set(value) {
845
+ this.#instance[key] = value;
846
+ },
847
+ enumerable: true
848
+ });
849
+ }
850
+ this.#instance.$set = (next) => {
851
+ Object.assign(props, next);
852
+ };
853
+ this.#instance.$destroy = () => {
854
+ unmount$1(this.#instance);
855
+ };
856
+ }
857
+ /** @param {Record<string, any>} props */
858
+ $set(props) {
859
+ this.#instance.$set(props);
860
+ }
861
+ /**
862
+ * @param {string} event
863
+ * @param {(...args: any[]) => any} callback
864
+ * @returns {any}
865
+ */
866
+ $on(event, callback) {
867
+ this.#events[event] = this.#events[event] || [];
868
+ /** @param {any[]} args */
869
+ const cb = (...args) => callback.call(this, ...args);
870
+ this.#events[event].push(cb);
871
+ return () => {
872
+ this.#events[event] = this.#events[event].filter(
873
+ /** @param {any} fn */
874
+ (fn) => fn !== cb
875
+ );
876
+ };
877
+ }
878
+ $destroy() {
879
+ this.#instance.$destroy();
880
+ }
881
+ };
882
+ //#endregion
883
+ //#region node_modules/svelte/src/legacy/legacy-server.js
884
+ /** @import { SvelteComponent } from '../index.js' */
885
+ /** @import { Csp } from '../server/public.js' */
886
+ /** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
887
+ /**
888
+ * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
889
+ *
890
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
891
+ *
892
+ * @template {Record<string, any>} Props
893
+ * @template {Record<string, any>} Exports
894
+ * @template {Record<string, any>} Events
895
+ * @template {Record<string, any>} Slots
896
+ *
897
+ * @param {SvelteComponent<Props, Events, Slots>} component
898
+ * @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}
899
+ */
900
+ function asClassComponent(component) {
901
+ const component_constructor = asClassComponent$1(component);
902
+ /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */
903
+ const _render = (props, { context, csp, transformError } = {}) => {
904
+ const result = render(component, {
905
+ props,
906
+ context,
907
+ csp,
908
+ transformError
909
+ });
910
+ const munged = Object.defineProperties({}, {
911
+ css: { value: {
912
+ code: "",
913
+ map: null
914
+ } },
915
+ head: { get: () => result.head },
916
+ html: { get: () => result.body },
917
+ then: {
918
+ /**
919
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
920
+ *
921
+ * @template TResult1
922
+ * @template [TResult2=never]
923
+ * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
924
+ * @param { (reason: unknown) => TResult2 } onrejected
925
+ */
926
+ value: (onfulfilled, onrejected) => {
927
+ {
928
+ const user_result = onfulfilled({
929
+ css: munged.css,
930
+ head: munged.head,
931
+ html: munged.html
932
+ });
933
+ return Promise.resolve(user_result);
934
+ }
935
+ } }
936
+ });
937
+ return munged;
938
+ };
939
+ component_constructor.render = _render;
940
+ return component_constructor;
941
+ }
942
+ //#endregion
943
+ //#region node_modules/svelte/src/internal/server/abort-signal.js
944
+ function getAbortSignal() {
945
+ let context = ssr_context;
946
+ while (context !== null) {
947
+ if (context.r !== null) return context.r.global.get_abort_signal();
948
+ context = context.p;
949
+ }
950
+ return new AbortController().signal;
951
+ }
952
+ //#endregion
953
+ //#region node_modules/svelte/src/internal/server/hydratable.js
954
+ /** @import { HydratableLookupEntry } from '#server' */
955
+ /**
956
+ * @template T
957
+ * @param {string} key
958
+ * @param {() => T} fn
959
+ * @returns {T}
960
+ */
961
+ function hydratable(key, fn) {
962
+ experimental_async_required();
963
+ const { hydratable } = get_render_context();
964
+ let entry = hydratable.lookup.get(key);
965
+ if (entry !== void 0) return entry.value;
966
+ const value = fn();
967
+ entry = encode(key, value, hydratable.unresolved_promises);
968
+ hydratable.lookup.set(key, entry);
969
+ return value;
970
+ }
971
+ /**
972
+ * @param {string} key
973
+ * @param {any} value
974
+ * @param {Map<Promise<any>, string>} [unresolved]
975
+ */
976
+ function encode(key, value, unresolved) {
977
+ /** @type {HydratableLookupEntry} */
978
+ const entry = {
979
+ value,
980
+ serialized: ""
981
+ };
982
+ let uid = 1;
983
+ entry.serialized = uneval(entry.value, (value, uneval) => {
984
+ if (is_promise(value)) {
985
+ const placeholder = `"${uid++}"`;
986
+ const p = value.then((v) => {
987
+ entry.serialized = entry.serialized.replace(placeholder, () => `r(${uneval(v)})`);
988
+ }).catch((devalue_error) => hydratable_serialization_failed(key, serialization_stack(entry.stack, devalue_error?.stack)));
989
+ p.catch(() => {}).finally(() => unresolved?.delete(p));
990
+ (entry.promises ??= []).push(p);
991
+ return placeholder;
992
+ }
993
+ });
994
+ return entry;
995
+ }
996
+ /**
997
+ * @param {any} value
998
+ * @returns {value is Promise<any>}
999
+ */
1000
+ function is_promise(value) {
1001
+ return Object.prototype.toString.call(value) === "[object Promise]";
1002
+ }
1003
+ /**
1004
+ * @param {string | undefined} root_stack
1005
+ * @param {string | undefined} uneval_stack
1006
+ */
1007
+ function serialization_stack(root_stack, uneval_stack) {
1008
+ let out = "";
1009
+ if (root_stack) out += root_stack + "\n";
1010
+ if (uneval_stack) out += "Caused by:\n" + uneval_stack + "\n";
1011
+ return out || "<missing stack trace>";
1012
+ }
1013
+ //#endregion
1014
+ //#region node_modules/svelte/src/internal/server/blocks/snippet.js
1015
+ /** @import { Snippet } from 'svelte' */
1016
+ /** @import { Renderer } from '../renderer' */
1017
+ /** @import { Getters } from '#shared' */
1018
+ /**
1019
+ * Create a snippet programmatically
1020
+ * @template {unknown[]} Params
1021
+ * @param {(...params: Getters<Params>) => {
1022
+ * render: () => string
1023
+ * setup?: (element: Element) => void | (() => void)
1024
+ * }} fn
1025
+ * @returns {Snippet<Params>}
1026
+ */
1027
+ function createRawSnippet(fn) {
1028
+ return (renderer, ...args) => {
1029
+ var getters = args.map((value) => () => value);
1030
+ renderer.push(fn(...getters).render().trim());
1031
+ };
1032
+ }
1033
+ //#endregion
1034
+ //#region node_modules/svelte/src/index-server.js
1035
+ /** @import { SSRContext } from '#server' */
1036
+ /** @import { Renderer } from './internal/server/renderer.js' */
1037
+ var index_server_exports = /* @__PURE__ */ __exportAll({
1038
+ afterUpdate: () => noop,
1039
+ beforeUpdate: () => noop,
1040
+ createContext: () => createContext,
1041
+ createEventDispatcher: () => createEventDispatcher,
1042
+ createRawSnippet: () => createRawSnippet,
1043
+ flushSync: () => noop,
1044
+ fork: () => fork,
1045
+ getAbortSignal: () => getAbortSignal,
1046
+ getAllContexts: () => getAllContexts,
1047
+ getContext: () => getContext,
1048
+ hasContext: () => hasContext,
1049
+ hydratable: () => hydratable,
1050
+ hydrate: () => hydrate,
1051
+ mount: () => mount,
1052
+ onDestroy: () => onDestroy,
1053
+ onMount: () => noop,
1054
+ setContext: () => setContext,
1055
+ settled: () => settled,
1056
+ tick: () => tick,
1057
+ unmount: () => unmount,
1058
+ untrack: () => run
1059
+ });
1060
+ /** @param {() => void} fn */
1061
+ function onDestroy(fn) {
1062
+ /** @type {Renderer} */ ssr_context.r.on_destroy(fn);
1063
+ }
1064
+ function createEventDispatcher() {
1065
+ return noop;
1066
+ }
1067
+ function mount() {
1068
+ lifecycle_function_unavailable("mount");
1069
+ }
1070
+ function hydrate() {
1071
+ lifecycle_function_unavailable("hydrate");
1072
+ }
1073
+ function unmount() {
1074
+ lifecycle_function_unavailable("unmount");
1075
+ }
1076
+ function fork() {
1077
+ lifecycle_function_unavailable("fork");
1078
+ }
1079
+ async function tick() {}
1080
+ async function settled() {}
1081
+ //#endregion
1082
+ //#region .svelte-kit/generated/root.svelte
1083
+ function Root($$renderer, $$props) {
1084
+ $$renderer.component(($$renderer) => {
1085
+ let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;
1086
+ setContext("__svelte__", stores);
1087
+ stores.page.set(page);
1088
+ const Pyramid_1 = derived(() => constructors[1]);
1089
+ if (constructors[1]) {
1090
+ $$renderer.push("<!--[0-->");
1091
+ const Pyramid_0 = constructors[0];
1092
+ if (Pyramid_0) {
1093
+ $$renderer.push("<!--[-->");
1094
+ Pyramid_0($$renderer, {
1095
+ data: data_0,
1096
+ form,
1097
+ params: page.params,
1098
+ children: ($$renderer) => {
1099
+ if (Pyramid_1()) {
1100
+ $$renderer.push("<!--[-->");
1101
+ Pyramid_1()($$renderer, {
1102
+ data: data_1,
1103
+ form,
1104
+ params: page.params
1105
+ });
1106
+ $$renderer.push("<!--]-->");
1107
+ } else {
1108
+ $$renderer.push("<!--[!-->");
1109
+ $$renderer.push("<!--]-->");
1110
+ }
1111
+ },
1112
+ $$slots: { default: true }
1113
+ });
1114
+ $$renderer.push("<!--]-->");
1115
+ } else {
1116
+ $$renderer.push("<!--[!-->");
1117
+ $$renderer.push("<!--]-->");
1118
+ }
1119
+ } else {
1120
+ $$renderer.push("<!--[-1-->");
1121
+ const Pyramid_0 = constructors[0];
1122
+ if (Pyramid_0) {
1123
+ $$renderer.push("<!--[-->");
1124
+ Pyramid_0($$renderer, {
1125
+ data: data_0,
1126
+ form,
1127
+ params: page.params
1128
+ });
1129
+ $$renderer.push("<!--]-->");
1130
+ } else {
1131
+ $$renderer.push("<!--[!-->");
1132
+ $$renderer.push("<!--]-->");
1133
+ }
1134
+ }
1135
+ $$renderer.push(`<!--]--> `);
1136
+ $$renderer.push("<!--[-1-->");
1137
+ $$renderer.push(`<!--]-->`);
1138
+ });
1139
+ }
1140
+ //#endregion
1141
+ //#region .svelte-kit/generated/root.js
1142
+ var root_default = asClassComponent(Root);
1143
+ //#endregion
1144
+ //#region .svelte-kit/generated/shared/error-template.js
1145
+ var error_template_default = ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n";
1146
+ //#endregion
1147
+ //#region .svelte-kit/generated/server/internal.js
1148
+ var options = {
1149
+ app_template_contains_nonce: false,
1150
+ async: false,
1151
+ csp: {
1152
+ "mode": "auto",
1153
+ "directives": {
1154
+ "upgrade-insecure-requests": false,
1155
+ "block-all-mixed-content": false
1156
+ },
1157
+ "reportOnly": {
1158
+ "upgrade-insecure-requests": false,
1159
+ "block-all-mixed-content": false
1160
+ }
1161
+ },
1162
+ csrf_check_origin: true,
1163
+ csrf_trusted_origins: [],
1164
+ embedded: false,
1165
+ env_public_prefix: "PUBLIC_",
1166
+ env_private_prefix: "",
1167
+ hash_routing: false,
1168
+ hooks: null,
1169
+ preload_strategy: "modulepreload",
1170
+ root: root_default,
1171
+ service_worker: false,
1172
+ service_worker_options: void 0,
1173
+ server_error_boundaries: false,
1174
+ templates: {
1175
+ app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\" data-theme=\"%aiusage.theme%\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"color-scheme\" content=\"light dark\" />\n <meta\n name=\"description\"\n content=\"Every token your AI coding tools have spent, from the transcripts already on your machine.\"\n />\n <meta name=\"robots\" content=\"noindex\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.svg\" type=\"image/svg+xml\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
1176
+ error: error_template_default
1177
+ },
1178
+ version_hash: "s9j3o6"
1179
+ };
1180
+ async function get_hooks() {
1181
+ let handle;
1182
+ let handleFetch;
1183
+ let handleError;
1184
+ let handleValidationError;
1185
+ let init;
1186
+ ({handle, handleFetch, handleError, handleValidationError, init} = await import('../entries/hooks.server.js-BbojNy1X.js'));
1187
+ let reroute;
1188
+ let transport;
1189
+ return {
1190
+ handle,
1191
+ handleFetch,
1192
+ handleError,
1193
+ handleValidationError,
1194
+ init,
1195
+ reroute,
1196
+ transport
1197
+ };
1198
+ }
1199
+
1200
+ export { set_public_env as a, set_read_implementation as b, get_hooks as g, index_server_exports as i, options as o, public_env as p, read_implementation as r, set_private_env as s };
1201
+ //# sourceMappingURL=internal.js-b-1wrnfA.js.map