@noego/forge 0.1.24 → 0.1.27

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 (40) hide show
  1. package/README.md +2 -0
  2. package/dist/client.cjs +3 -3
  3. package/dist/client.cjs.map +1 -1
  4. package/dist/client.d.ts +25 -0
  5. package/dist/client.mjs +895 -824
  6. package/dist/client.mjs.map +1 -1
  7. package/dist/lint/cli.js +28 -2
  8. package/dist/lint/cli.js.map +1 -1
  9. package/dist/lint/config.js +19 -2
  10. package/dist/lint/config.js.map +1 -1
  11. package/dist/lint/route_parser.js +8 -30
  12. package/dist/lint/route_parser.js.map +1 -1
  13. package/dist/lint/rules/no_invalid_html_nesting.d.ts +3 -0
  14. package/dist/lint/rules/no_invalid_html_nesting.js +123 -0
  15. package/dist/lint/rules/no_invalid_html_nesting.js.map +1 -0
  16. package/dist/lint/tests/no_invalid_html_nesting.test.d.ts +1 -0
  17. package/dist/lint/tests/no_invalid_html_nesting.test.js +61 -0
  18. package/dist/lint/tests/no_invalid_html_nesting.test.js.map +1 -0
  19. package/dist/page.svelte-4uv4nQ2i.js.map +1 -1
  20. package/dist/page.svelte-CW8PJDdH.cjs.map +1 -1
  21. package/dist-ssr/{path-BqcF5dbs.js → path-2bYzpvRB.js} +3 -1
  22. package/dist-ssr/{path-BqcF5dbs.js.map → path-2bYzpvRB.js.map} +1 -1
  23. package/dist-ssr/{path-sxXxpB6R.cjs → path-DCxJMpj7.cjs} +3 -1
  24. package/dist-ssr/{path-sxXxpB6R.cjs.map → path-DCxJMpj7.cjs.map} +1 -1
  25. package/dist-ssr/server.cjs +20 -3
  26. package/dist-ssr/server.cjs.map +1 -1
  27. package/dist-ssr/server.js +20 -3
  28. package/dist-ssr/server.js.map +1 -1
  29. package/dist-ssr/shared.cjs +1 -1
  30. package/dist-ssr/shared.js +1 -1
  31. package/dist-ssr/static.cjs +1 -1
  32. package/dist-ssr/static.d.ts +4 -0
  33. package/dist-ssr/static.js +1 -1
  34. package/dist-ssr/test.d.ts +4 -0
  35. package/dist-ssr/{url_parser-DHQiBy_-.js → url_parser-B6dvK0DX.js} +36 -3
  36. package/dist-ssr/{url_parser-DHQiBy_-.js.map → url_parser-B6dvK0DX.js.map} +1 -1
  37. package/dist-ssr/{url_parser-BGkQselu.cjs → url_parser-D7ZqJUTw.cjs} +36 -3
  38. package/dist-ssr/{url_parser-BGkQselu.cjs.map → url_parser-D7ZqJUTw.cjs.map} +1 -1
  39. package/package.json +2 -2
  40. package/src/components/RecursiveRender.svelte +39 -18
package/dist/client.mjs CHANGED
@@ -1,130 +1,133 @@
1
- import { p as He, a as D } from "./page.svelte-4uv4nQ2i.js";
2
- import { s as mr } from "./page.svelte-4uv4nQ2i.js";
1
+ var tt = Object.defineProperty;
2
+ var rt = (e, t, r) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var oe = (e, t, r) => rt(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { p as nt, a as k } from "./page.svelte-4uv4nQ2i.js";
5
+ import { s as Pr } from "./page.svelte-4uv4nQ2i.js";
3
6
  import "svelte/internal/client";
4
- import { hydrate as Ve } from "svelte";
5
- import Ke from "../src/components/RecursiveRender.svelte";
6
- import { writable as xe, get as N } from "svelte/store";
7
- function Je(e) {
8
- const t = new He(e);
7
+ import { hydrate as ot } from "svelte";
8
+ import it from "../src/components/RecursiveRender.svelte";
9
+ import { writable as Ce, get as R } from "svelte/store";
10
+ function at(e) {
11
+ const t = new nt(e);
9
12
  return (r) => {
10
13
  const n = t.match(r);
11
14
  if (!n) return null;
12
- const o = {};
13
- for (const [i, a] of Object.entries(n))
14
- o[i] = decodeURIComponent(a);
15
- return o;
15
+ const i = {};
16
+ for (const [o, a] of Object.entries(n))
17
+ i[o] = decodeURIComponent(a);
18
+ return i;
16
19
  };
17
20
  }
18
- function Xe(e) {
21
+ function st(e) {
19
22
  return e.map((t) => {
20
- const r = t.path, n = Je(r);
23
+ const r = t.path, n = at(r);
21
24
  return { pattern: r, parser: n };
22
25
  });
23
26
  }
24
- var se = function(e, t) {
25
- return se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
27
+ var fe = function(e, t) {
28
+ return fe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
26
29
  r.__proto__ = n;
27
30
  } || function(r, n) {
28
- for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (r[o] = n[o]);
29
- }, se(e, t);
31
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
32
+ }, fe(e, t);
30
33
  };
31
- function M(e, t) {
34
+ function G(e, t) {
32
35
  if (typeof t != "function" && t !== null)
33
36
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
34
- se(e, t);
37
+ fe(e, t);
35
38
  function r() {
36
39
  this.constructor = e;
37
40
  }
38
41
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
39
42
  }
40
- function Ze(e, t, r, n) {
41
- function o(i) {
42
- return i instanceof r ? i : new r(function(a) {
43
- a(i);
43
+ function ut(e, t, r, n) {
44
+ function i(o) {
45
+ return o instanceof r ? o : new r(function(a) {
46
+ a(o);
44
47
  });
45
48
  }
46
- return new (r || (r = Promise))(function(i, a) {
47
- function c(l) {
49
+ return new (r || (r = Promise))(function(o, a) {
50
+ function u(l) {
48
51
  try {
49
- u(n.next(l));
50
- } catch (f) {
51
- a(f);
52
+ c(n.next(l));
53
+ } catch (p) {
54
+ a(p);
52
55
  }
53
56
  }
54
57
  function s(l) {
55
58
  try {
56
- u(n.throw(l));
57
- } catch (f) {
58
- a(f);
59
+ c(n.throw(l));
60
+ } catch (p) {
61
+ a(p);
59
62
  }
60
63
  }
61
- function u(l) {
62
- l.done ? i(l.value) : o(l.value).then(c, s);
64
+ function c(l) {
65
+ l.done ? o(l.value) : i(l.value).then(u, s);
63
66
  }
64
- u((n = n.apply(e, t || [])).next());
67
+ c((n = n.apply(e, t || [])).next());
65
68
  });
66
69
  }
67
- function Ae(e, t) {
70
+ function je(e, t) {
68
71
  var r = { label: 0, sent: function() {
69
- if (i[0] & 1) throw i[1];
70
- return i[1];
71
- }, trys: [], ops: [] }, n, o, i, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
72
- return a.next = c(0), a.throw = c(1), a.return = c(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
72
+ if (o[0] & 1) throw o[1];
73
+ return o[1];
74
+ }, trys: [], ops: [] }, n, i, o, a = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
75
+ return a.next = u(0), a.throw = u(1), a.return = u(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
73
76
  return this;
74
77
  }), a;
75
- function c(u) {
78
+ function u(c) {
76
79
  return function(l) {
77
- return s([u, l]);
80
+ return s([c, l]);
78
81
  };
79
82
  }
80
- function s(u) {
83
+ function s(c) {
81
84
  if (n) throw new TypeError("Generator is already executing.");
82
- for (; a && (a = 0, u[0] && (r = 0)), r; ) try {
83
- if (n = 1, o && (i = u[0] & 2 ? o.return : u[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, u[1])).done) return i;
84
- switch (o = 0, i && (u = [u[0] & 2, i.value]), u[0]) {
85
+ for (; a && (a = 0, c[0] && (r = 0)), r; ) try {
86
+ if (n = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done) return o;
87
+ switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
85
88
  case 0:
86
89
  case 1:
87
- i = u;
90
+ o = c;
88
91
  break;
89
92
  case 4:
90
- return r.label++, { value: u[1], done: !1 };
93
+ return r.label++, { value: c[1], done: !1 };
91
94
  case 5:
92
- r.label++, o = u[1], u = [0];
95
+ r.label++, i = c[1], c = [0];
93
96
  continue;
94
97
  case 7:
95
- u = r.ops.pop(), r.trys.pop();
98
+ c = r.ops.pop(), r.trys.pop();
96
99
  continue;
97
100
  default:
98
- if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (u[0] === 6 || u[0] === 2)) {
101
+ if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
99
102
  r = 0;
100
103
  continue;
101
104
  }
102
- if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
103
- r.label = u[1];
105
+ if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
106
+ r.label = c[1];
104
107
  break;
105
108
  }
106
- if (u[0] === 6 && r.label < i[1]) {
107
- r.label = i[1], i = u;
109
+ if (c[0] === 6 && r.label < o[1]) {
110
+ r.label = o[1], o = c;
108
111
  break;
109
112
  }
110
- if (i && r.label < i[2]) {
111
- r.label = i[2], r.ops.push(u);
113
+ if (o && r.label < o[2]) {
114
+ r.label = o[2], r.ops.push(c);
112
115
  break;
113
116
  }
114
- i[2] && r.ops.pop(), r.trys.pop();
117
+ o[2] && r.ops.pop(), r.trys.pop();
115
118
  continue;
116
119
  }
117
- u = t.call(e, r);
120
+ c = t.call(e, r);
118
121
  } catch (l) {
119
- u = [6, l], o = 0;
122
+ c = [6, l], i = 0;
120
123
  } finally {
121
- n = i = 0;
124
+ n = o = 0;
122
125
  }
123
- if (u[0] & 5) throw u[1];
124
- return { value: u[0] ? u[1] : void 0, done: !0 };
126
+ if (c[0] & 5) throw c[1];
127
+ return { value: c[0] ? c[1] : void 0, done: !0 };
125
128
  }
126
129
  }
127
- function F(e) {
130
+ function q(e) {
128
131
  var t = typeof Symbol == "function" && Symbol.iterator, r = t && e[t], n = 0;
129
132
  if (r) return r.call(e);
130
133
  if (e && typeof e.length == "number") return {
@@ -134,133 +137,133 @@ function F(e) {
134
137
  };
135
138
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
136
139
  }
137
- function k(e, t) {
140
+ function z(e, t) {
138
141
  var r = typeof Symbol == "function" && e[Symbol.iterator];
139
142
  if (!r) return e;
140
- var n = r.call(e), o, i = [], a;
143
+ var n = r.call(e), i, o = [], a;
141
144
  try {
142
- for (; (t === void 0 || t-- > 0) && !(o = n.next()).done; ) i.push(o.value);
143
- } catch (c) {
144
- a = { error: c };
145
+ for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
146
+ } catch (u) {
147
+ a = { error: u };
145
148
  } finally {
146
149
  try {
147
- o && !o.done && (r = n.return) && r.call(n);
150
+ i && !i.done && (r = n.return) && r.call(n);
148
151
  } finally {
149
152
  if (a) throw a.error;
150
153
  }
151
154
  }
152
- return i;
155
+ return o;
153
156
  }
154
- function G(e, t, r) {
155
- if (r || arguments.length === 2) for (var n = 0, o = t.length, i; n < o; n++)
156
- (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
157
- return e.concat(i || Array.prototype.slice.call(t));
157
+ function Y(e, t, r) {
158
+ if (r || arguments.length === 2) for (var n = 0, i = t.length, o; n < i; n++)
159
+ (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
160
+ return e.concat(o || Array.prototype.slice.call(t));
158
161
  }
159
- function U(e) {
160
- return this instanceof U ? (this.v = e, this) : new U(e);
162
+ function W(e) {
163
+ return this instanceof W ? (this.v = e, this) : new W(e);
161
164
  }
162
- function Qe(e, t, r) {
165
+ function ct(e, t, r) {
163
166
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
164
- var n = r.apply(e, t || []), o, i = [];
165
- return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", a), o[Symbol.asyncIterator] = function() {
167
+ var n = r.apply(e, t || []), i, o = [];
168
+ return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), u("next"), u("throw"), u("return", a), i[Symbol.asyncIterator] = function() {
166
169
  return this;
167
- }, o;
170
+ }, i;
168
171
  function a(d) {
169
- return function(p) {
170
- return Promise.resolve(p).then(d, f);
172
+ return function(v) {
173
+ return Promise.resolve(v).then(d, p);
171
174
  };
172
175
  }
173
- function c(d, p) {
174
- n[d] && (o[d] = function(h) {
175
- return new Promise(function(S, g) {
176
- i.push([d, h, S, g]) > 1 || s(d, h);
176
+ function u(d, v) {
177
+ n[d] && (i[d] = function(f) {
178
+ return new Promise(function(S, w) {
179
+ o.push([d, f, S, w]) > 1 || s(d, f);
177
180
  });
178
- }, p && (o[d] = p(o[d])));
181
+ }, v && (i[d] = v(i[d])));
179
182
  }
180
- function s(d, p) {
183
+ function s(d, v) {
181
184
  try {
182
- u(n[d](p));
183
- } catch (h) {
184
- v(i[0][3], h);
185
+ c(n[d](v));
186
+ } catch (f) {
187
+ h(o[0][3], f);
185
188
  }
186
189
  }
187
- function u(d) {
188
- d.value instanceof U ? Promise.resolve(d.value.v).then(l, f) : v(i[0][2], d);
190
+ function c(d) {
191
+ d.value instanceof W ? Promise.resolve(d.value.v).then(l, p) : h(o[0][2], d);
189
192
  }
190
193
  function l(d) {
191
194
  s("next", d);
192
195
  }
193
- function f(d) {
196
+ function p(d) {
194
197
  s("throw", d);
195
198
  }
196
- function v(d, p) {
197
- d(p), i.shift(), i.length && s(i[0][0], i[0][1]);
199
+ function h(d, v) {
200
+ d(v), o.shift(), o.length && s(o[0][0], o[0][1]);
198
201
  }
199
202
  }
200
- function et(e) {
203
+ function lt(e) {
201
204
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
202
205
  var t = e[Symbol.asyncIterator], r;
203
- return t ? t.call(e) : (e = typeof F == "function" ? F(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
206
+ return t ? t.call(e) : (e = typeof q == "function" ? q(e) : e[Symbol.iterator](), r = {}, n("next"), n("throw"), n("return"), r[Symbol.asyncIterator] = function() {
204
207
  return this;
205
208
  }, r);
206
- function n(i) {
207
- r[i] = e[i] && function(a) {
208
- return new Promise(function(c, s) {
209
- a = e[i](a), o(c, s, a.done, a.value);
209
+ function n(o) {
210
+ r[o] = e[o] && function(a) {
211
+ return new Promise(function(u, s) {
212
+ a = e[o](a), i(u, s, a.done, a.value);
210
213
  });
211
214
  };
212
215
  }
213
- function o(i, a, c, s) {
214
- Promise.resolve(s).then(function(u) {
215
- i({ value: u, done: c });
216
+ function i(o, a, u, s) {
217
+ Promise.resolve(s).then(function(c) {
218
+ o({ value: c, done: u });
216
219
  }, a);
217
220
  }
218
221
  }
219
- function w(e) {
222
+ function b(e) {
220
223
  return typeof e == "function";
221
224
  }
222
- function de(e) {
225
+ function me(e) {
223
226
  var t = function(n) {
224
227
  Error.call(n), n.stack = new Error().stack;
225
228
  }, r = e(t);
226
229
  return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r;
227
230
  }
228
- var ee = de(function(e) {
231
+ var ie = me(function(e) {
229
232
  return function(r) {
230
233
  e(this), this.message = r ? r.length + ` errors occurred during unsubscription:
231
- ` + r.map(function(n, o) {
232
- return o + 1 + ") " + n.toString();
234
+ ` + r.map(function(n, i) {
235
+ return i + 1 + ") " + n.toString();
233
236
  }).join(`
234
237
  `) : "", this.name = "UnsubscriptionError", this.errors = r;
235
238
  };
236
239
  });
237
- function ue(e, t) {
240
+ function de(e, t) {
238
241
  if (e) {
239
242
  var r = e.indexOf(t);
240
243
  0 <= r && e.splice(r, 1);
241
244
  }
242
245
  }
243
- var X = (function() {
246
+ var te = (function() {
244
247
  function e(t) {
245
248
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
246
249
  }
247
250
  return e.prototype.unsubscribe = function() {
248
- var t, r, n, o, i;
251
+ var t, r, n, i, o;
249
252
  if (!this.closed) {
250
253
  this.closed = !0;
251
254
  var a = this._parentage;
252
255
  if (a)
253
256
  if (this._parentage = null, Array.isArray(a))
254
257
  try {
255
- for (var c = F(a), s = c.next(); !s.done; s = c.next()) {
256
- var u = s.value;
257
- u.remove(this);
258
+ for (var u = q(a), s = u.next(); !s.done; s = u.next()) {
259
+ var c = s.value;
260
+ c.remove(this);
258
261
  }
259
- } catch (h) {
260
- t = { error: h };
262
+ } catch (f) {
263
+ t = { error: f };
261
264
  } finally {
262
265
  try {
263
- s && !s.done && (r = c.return) && r.call(c);
266
+ s && !s.done && (r = u.return) && r.call(u);
264
267
  } finally {
265
268
  if (t) throw t.error;
266
269
  }
@@ -268,42 +271,42 @@ var X = (function() {
268
271
  else
269
272
  a.remove(this);
270
273
  var l = this.initialTeardown;
271
- if (w(l))
274
+ if (b(l))
272
275
  try {
273
276
  l();
274
- } catch (h) {
275
- i = h instanceof ee ? h.errors : [h];
277
+ } catch (f) {
278
+ o = f instanceof ie ? f.errors : [f];
276
279
  }
277
- var f = this._finalizers;
278
- if (f) {
280
+ var p = this._finalizers;
281
+ if (p) {
279
282
  this._finalizers = null;
280
283
  try {
281
- for (var v = F(f), d = v.next(); !d.done; d = v.next()) {
282
- var p = d.value;
284
+ for (var h = q(p), d = h.next(); !d.done; d = h.next()) {
285
+ var v = d.value;
283
286
  try {
284
- we(p);
285
- } catch (h) {
286
- i = i ?? [], h instanceof ee ? i = G(G([], k(i)), k(h.errors)) : i.push(h);
287
+ Ee(v);
288
+ } catch (f) {
289
+ o = o ?? [], f instanceof ie ? o = Y(Y([], z(o)), z(f.errors)) : o.push(f);
287
290
  }
288
291
  }
289
- } catch (h) {
290
- n = { error: h };
292
+ } catch (f) {
293
+ n = { error: f };
291
294
  } finally {
292
295
  try {
293
- d && !d.done && (o = v.return) && o.call(v);
296
+ d && !d.done && (i = h.return) && i.call(h);
294
297
  } finally {
295
298
  if (n) throw n.error;
296
299
  }
297
300
  }
298
301
  }
299
- if (i)
300
- throw new ee(i);
302
+ if (o)
303
+ throw new ie(o);
301
304
  }
302
305
  }, e.prototype.add = function(t) {
303
306
  var r;
304
307
  if (t && t !== this)
305
308
  if (this.closed)
306
- we(t);
309
+ Ee(t);
307
310
  else {
308
311
  if (t instanceof e) {
309
312
  if (t.closed || t._hasParent(this))
@@ -320,52 +323,52 @@ var X = (function() {
320
323
  this._parentage = Array.isArray(r) ? (r.push(t), r) : r ? [r, t] : t;
321
324
  }, e.prototype._removeParent = function(t) {
322
325
  var r = this._parentage;
323
- r === t ? this._parentage = null : Array.isArray(r) && ue(r, t);
326
+ r === t ? this._parentage = null : Array.isArray(r) && de(r, t);
324
327
  }, e.prototype.remove = function(t) {
325
328
  var r = this._finalizers;
326
- r && ue(r, t), t instanceof e && t._removeParent(this);
329
+ r && de(r, t), t instanceof e && t._removeParent(this);
327
330
  }, e.EMPTY = (function() {
328
331
  var t = new e();
329
332
  return t.closed = !0, t;
330
333
  })(), e;
331
- })(), Pe = X.EMPTY;
332
- function Ie(e) {
333
- return e instanceof X || e && "closed" in e && w(e.remove) && w(e.add) && w(e.unsubscribe);
334
+ })(), Le = te.EMPTY;
335
+ function Ne(e) {
336
+ return e instanceof te || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
334
337
  }
335
- function we(e) {
336
- w(e) ? e() : e.unsubscribe();
338
+ function Ee(e) {
339
+ b(e) ? e() : e.unsubscribe();
337
340
  }
338
- var tt = {
341
+ var ft = {
339
342
  Promise: void 0
340
- }, rt = {
343
+ }, dt = {
341
344
  setTimeout: function(e, t) {
342
345
  for (var r = [], n = 2; n < arguments.length; n++)
343
346
  r[n - 2] = arguments[n];
344
- return setTimeout.apply(void 0, G([e, t], k(r)));
347
+ return setTimeout.apply(void 0, Y([e, t], z(r)));
345
348
  },
346
349
  clearTimeout: function(e) {
347
350
  return clearTimeout(e);
348
351
  },
349
352
  delegate: void 0
350
353
  };
351
- function Te(e) {
352
- rt.setTimeout(function() {
354
+ function Fe(e) {
355
+ dt.setTimeout(function() {
353
356
  throw e;
354
357
  });
355
358
  }
356
- function ge() {
359
+ function Oe() {
357
360
  }
358
- function H(e) {
361
+ function Z(e) {
359
362
  e();
360
363
  }
361
- var he = (function(e) {
362
- M(t, e);
364
+ var ye = (function(e) {
365
+ G(t, e);
363
366
  function t(r) {
364
367
  var n = e.call(this) || this;
365
- return n.isStopped = !1, r ? (n.destination = r, Ie(r) && r.add(n)) : n.destination = it, n;
368
+ return n.isStopped = !1, r ? (n.destination = r, Ne(r) && r.add(n)) : n.destination = vt, n;
366
369
  }
367
- return t.create = function(r, n, o) {
368
- return new $(r, n, o);
370
+ return t.create = function(r, n, i) {
371
+ return new B(r, n, i);
369
372
  }, t.prototype.next = function(r) {
370
373
  this.isStopped || this._next(r);
371
374
  }, t.prototype.error = function(r) {
@@ -389,7 +392,7 @@ var he = (function(e) {
389
392
  this.unsubscribe();
390
393
  }
391
394
  }, t;
392
- })(X), nt = (function() {
395
+ })(te), ht = (function() {
393
396
  function e(t) {
394
397
  this.partialObserver = t;
395
398
  }
@@ -399,7 +402,7 @@ var he = (function(e) {
399
402
  try {
400
403
  r.next(t);
401
404
  } catch (n) {
402
- Y(n);
405
+ K(n);
403
406
  }
404
407
  }, e.prototype.error = function(t) {
405
408
  var r = this.partialObserver;
@@ -407,56 +410,56 @@ var he = (function(e) {
407
410
  try {
408
411
  r.error(t);
409
412
  } catch (n) {
410
- Y(n);
413
+ K(n);
411
414
  }
412
415
  else
413
- Y(t);
416
+ K(t);
414
417
  }, e.prototype.complete = function() {
415
418
  var t = this.partialObserver;
416
419
  if (t.complete)
417
420
  try {
418
421
  t.complete();
419
422
  } catch (r) {
420
- Y(r);
423
+ K(r);
421
424
  }
422
425
  }, e;
423
- })(), $ = (function(e) {
424
- M(t, e);
425
- function t(r, n, o) {
426
- var i = e.call(this) || this, a;
427
- return w(r) || !r ? a = {
426
+ })(), B = (function(e) {
427
+ G(t, e);
428
+ function t(r, n, i) {
429
+ var o = e.call(this) || this, a;
430
+ return b(r) || !r ? a = {
428
431
  next: r ?? void 0,
429
432
  error: n ?? void 0,
430
- complete: o ?? void 0
431
- } : a = r, i.destination = new nt(a), i;
433
+ complete: i ?? void 0
434
+ } : a = r, o.destination = new ht(a), o;
432
435
  }
433
436
  return t;
434
- })(he);
435
- function Y(e) {
436
- Te(e);
437
+ })(ye);
438
+ function K(e) {
439
+ Fe(e);
437
440
  }
438
- function ot(e) {
441
+ function pt(e) {
439
442
  throw e;
440
443
  }
441
- var it = {
444
+ var vt = {
442
445
  closed: !0,
443
- next: ge,
444
- error: ot,
445
- complete: ge
446
- }, pe = (function() {
446
+ next: Oe,
447
+ error: pt,
448
+ complete: Oe
449
+ }, be = (function() {
447
450
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
448
451
  })();
449
- function ve(e) {
452
+ function we(e) {
450
453
  return e;
451
454
  }
452
- function at(e) {
453
- return e.length === 0 ? ve : e.length === 1 ? e[0] : function(r) {
454
- return e.reduce(function(n, o) {
455
- return o(n);
455
+ function mt(e) {
456
+ return e.length === 0 ? we : e.length === 1 ? e[0] : function(r) {
457
+ return e.reduce(function(n, i) {
458
+ return i(n);
456
459
  }, r);
457
460
  };
458
461
  }
459
- var E = (function() {
462
+ var x = (function() {
460
463
  function e(t) {
461
464
  t && (this._subscribe = t);
462
465
  }
@@ -464,11 +467,11 @@ var E = (function() {
464
467
  var r = new e();
465
468
  return r.source = this, r.operator = t, r;
466
469
  }, e.prototype.subscribe = function(t, r, n) {
467
- var o = this, i = ut(t) ? t : new $(t, r, n);
468
- return H(function() {
469
- var a = o, c = a.operator, s = a.source;
470
- i.add(c ? c.call(i, s) : s ? o._subscribe(i) : o._trySubscribe(i));
471
- }), i;
470
+ var i = this, o = bt(t) ? t : new B(t, r, n);
471
+ return Z(function() {
472
+ var a = i, u = a.operator, s = a.source;
473
+ o.add(u ? u.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
474
+ }), o;
472
475
  }, e.prototype._trySubscribe = function(t) {
473
476
  try {
474
477
  return this._subscribe(t);
@@ -477,61 +480,61 @@ var E = (function() {
477
480
  }
478
481
  }, e.prototype.forEach = function(t, r) {
479
482
  var n = this;
480
- return r = Se(r), new r(function(o, i) {
481
- var a = new $({
482
- next: function(c) {
483
+ return r = xe(r), new r(function(i, o) {
484
+ var a = new B({
485
+ next: function(u) {
483
486
  try {
484
- t(c);
487
+ t(u);
485
488
  } catch (s) {
486
- i(s), a.unsubscribe();
489
+ o(s), a.unsubscribe();
487
490
  }
488
491
  },
489
- error: i,
490
- complete: o
492
+ error: o,
493
+ complete: i
491
494
  });
492
495
  n.subscribe(a);
493
496
  });
494
497
  }, e.prototype._subscribe = function(t) {
495
498
  var r;
496
499
  return (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(t);
497
- }, e.prototype[pe] = function() {
500
+ }, e.prototype[be] = function() {
498
501
  return this;
499
502
  }, e.prototype.pipe = function() {
500
503
  for (var t = [], r = 0; r < arguments.length; r++)
501
504
  t[r] = arguments[r];
502
- return at(t)(this);
505
+ return mt(t)(this);
503
506
  }, e.prototype.toPromise = function(t) {
504
507
  var r = this;
505
- return t = Se(t), new t(function(n, o) {
506
- var i;
508
+ return t = xe(t), new t(function(n, i) {
509
+ var o;
507
510
  r.subscribe(function(a) {
508
- return i = a;
511
+ return o = a;
509
512
  }, function(a) {
510
- return o(a);
513
+ return i(a);
511
514
  }, function() {
512
- return n(i);
515
+ return n(o);
513
516
  });
514
517
  });
515
518
  }, e.create = function(t) {
516
519
  return new e(t);
517
520
  }, e;
518
521
  })();
519
- function Se(e) {
522
+ function xe(e) {
520
523
  var t;
521
- return (t = e ?? tt.Promise) !== null && t !== void 0 ? t : Promise;
524
+ return (t = e ?? ft.Promise) !== null && t !== void 0 ? t : Promise;
522
525
  }
523
- function st(e) {
524
- return e && w(e.next) && w(e.error) && w(e.complete);
526
+ function yt(e) {
527
+ return e && b(e.next) && b(e.error) && b(e.complete);
525
528
  }
526
- function ut(e) {
527
- return e && e instanceof he || st(e) && Ie(e);
529
+ function bt(e) {
530
+ return e && e instanceof ye || yt(e) && Ne(e);
528
531
  }
529
- function ct(e) {
530
- return w(e == null ? void 0 : e.lift);
532
+ function wt(e) {
533
+ return b(e == null ? void 0 : e.lift);
531
534
  }
532
- function P(e) {
535
+ function j(e) {
533
536
  return function(t) {
534
- if (ct(t))
537
+ if (wt(t))
535
538
  return t.lift(function(r) {
536
539
  try {
537
540
  return e(r, this);
@@ -542,32 +545,32 @@ function P(e) {
542
545
  throw new TypeError("Unable to lift unknown Observable type");
543
546
  };
544
547
  }
545
- function A(e, t, r, n, o) {
546
- return new lt(e, t, r, n, o);
548
+ function C(e, t, r, n, i) {
549
+ return new gt(e, t, r, n, i);
547
550
  }
548
- var lt = (function(e) {
549
- M(t, e);
550
- function t(r, n, o, i, a, c) {
551
+ var gt = (function(e) {
552
+ G(t, e);
553
+ function t(r, n, i, o, a, u) {
551
554
  var s = e.call(this, r) || this;
552
- return s.onFinalize = a, s.shouldUnsubscribe = c, s._next = n ? function(u) {
555
+ return s.onFinalize = a, s.shouldUnsubscribe = u, s._next = n ? function(c) {
553
556
  try {
554
- n(u);
557
+ n(c);
555
558
  } catch (l) {
556
559
  r.error(l);
557
560
  }
558
- } : e.prototype._next, s._error = i ? function(u) {
561
+ } : e.prototype._next, s._error = o ? function(c) {
559
562
  try {
560
- i(u);
563
+ o(c);
561
564
  } catch (l) {
562
565
  r.error(l);
563
566
  } finally {
564
567
  this.unsubscribe();
565
568
  }
566
- } : e.prototype._error, s._complete = o ? function() {
569
+ } : e.prototype._error, s._complete = i ? function() {
567
570
  try {
568
- o();
569
- } catch (u) {
570
- r.error(u);
571
+ i();
572
+ } catch (c) {
573
+ r.error(c);
571
574
  } finally {
572
575
  this.unsubscribe();
573
576
  }
@@ -580,56 +583,56 @@ var lt = (function(e) {
580
583
  e.prototype.unsubscribe.call(this), !n && ((r = this.onFinalize) === null || r === void 0 || r.call(this));
581
584
  }
582
585
  }, t;
583
- })(he), ft = de(function(e) {
586
+ })(ye), St = me(function(e) {
584
587
  return function() {
585
588
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
586
589
  };
587
- }), Z = (function(e) {
588
- M(t, e);
590
+ }), re = (function(e) {
591
+ G(t, e);
589
592
  function t() {
590
593
  var r = e.call(this) || this;
591
594
  return r.closed = !1, r.currentObservers = null, r.observers = [], r.isStopped = !1, r.hasError = !1, r.thrownError = null, r;
592
595
  }
593
596
  return t.prototype.lift = function(r) {
594
- var n = new _e(this, this);
597
+ var n = new Ae(this, this);
595
598
  return n.operator = r, n;
596
599
  }, t.prototype._throwIfClosed = function() {
597
600
  if (this.closed)
598
- throw new ft();
601
+ throw new St();
599
602
  }, t.prototype.next = function(r) {
600
603
  var n = this;
601
- H(function() {
602
- var o, i;
604
+ Z(function() {
605
+ var i, o;
603
606
  if (n._throwIfClosed(), !n.isStopped) {
604
607
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
605
608
  try {
606
- for (var a = F(n.currentObservers), c = a.next(); !c.done; c = a.next()) {
607
- var s = c.value;
609
+ for (var a = q(n.currentObservers), u = a.next(); !u.done; u = a.next()) {
610
+ var s = u.value;
608
611
  s.next(r);
609
612
  }
610
- } catch (u) {
611
- o = { error: u };
613
+ } catch (c) {
614
+ i = { error: c };
612
615
  } finally {
613
616
  try {
614
- c && !c.done && (i = a.return) && i.call(a);
617
+ u && !u.done && (o = a.return) && o.call(a);
615
618
  } finally {
616
- if (o) throw o.error;
619
+ if (i) throw i.error;
617
620
  }
618
621
  }
619
622
  }
620
623
  });
621
624
  }, t.prototype.error = function(r) {
622
625
  var n = this;
623
- H(function() {
626
+ Z(function() {
624
627
  if (n._throwIfClosed(), !n.isStopped) {
625
628
  n.hasError = n.isStopped = !0, n.thrownError = r;
626
- for (var o = n.observers; o.length; )
627
- o.shift().error(r);
629
+ for (var i = n.observers; i.length; )
630
+ i.shift().error(r);
628
631
  }
629
632
  });
630
633
  }, t.prototype.complete = function() {
631
634
  var r = this;
632
- H(function() {
635
+ Z(function() {
633
636
  if (r._throwIfClosed(), !r.isStopped) {
634
637
  r.isStopped = !0;
635
638
  for (var n = r.observers; n.length; )
@@ -650,105 +653,105 @@ var lt = (function(e) {
650
653
  }, t.prototype._subscribe = function(r) {
651
654
  return this._throwIfClosed(), this._checkFinalizedStatuses(r), this._innerSubscribe(r);
652
655
  }, t.prototype._innerSubscribe = function(r) {
653
- var n = this, o = this, i = o.hasError, a = o.isStopped, c = o.observers;
654
- return i || a ? Pe : (this.currentObservers = null, c.push(r), new X(function() {
655
- n.currentObservers = null, ue(c, r);
656
+ var n = this, i = this, o = i.hasError, a = i.isStopped, u = i.observers;
657
+ return o || a ? Le : (this.currentObservers = null, u.push(r), new te(function() {
658
+ n.currentObservers = null, de(u, r);
656
659
  }));
657
660
  }, t.prototype._checkFinalizedStatuses = function(r) {
658
- var n = this, o = n.hasError, i = n.thrownError, a = n.isStopped;
659
- o ? r.error(i) : a && r.complete();
661
+ var n = this, i = n.hasError, o = n.thrownError, a = n.isStopped;
662
+ i ? r.error(o) : a && r.complete();
660
663
  }, t.prototype.asObservable = function() {
661
- var r = new E();
664
+ var r = new x();
662
665
  return r.source = this, r;
663
666
  }, t.create = function(r, n) {
664
- return new _e(r, n);
667
+ return new Ae(r, n);
665
668
  }, t;
666
- })(E), _e = (function(e) {
667
- M(t, e);
669
+ })(x), Ae = (function(e) {
670
+ G(t, e);
668
671
  function t(r, n) {
669
- var o = e.call(this) || this;
670
- return o.destination = r, o.source = n, o;
672
+ var i = e.call(this) || this;
673
+ return i.destination = r, i.source = n, i;
671
674
  }
672
675
  return t.prototype.next = function(r) {
673
- var n, o;
674
- (o = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || o === void 0 || o.call(n, r);
676
+ var n, i;
677
+ (i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, r);
675
678
  }, t.prototype.error = function(r) {
676
- var n, o;
677
- (o = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || o === void 0 || o.call(n, r);
679
+ var n, i;
680
+ (i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, r);
678
681
  }, t.prototype.complete = function() {
679
682
  var r, n;
680
683
  (n = (r = this.destination) === null || r === void 0 ? void 0 : r.complete) === null || n === void 0 || n.call(r);
681
684
  }, t.prototype._subscribe = function(r) {
682
- var n, o;
683
- return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && o !== void 0 ? o : Pe;
685
+ var n, i;
686
+ return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r)) !== null && i !== void 0 ? i : Le;
684
687
  }, t;
685
- })(Z), Re = {
688
+ })(re), Ue = {
686
689
  now: function() {
687
- return (Re.delegate || Date).now();
690
+ return (Ue.delegate || Date).now();
688
691
  },
689
692
  delegate: void 0
690
- }, dt = (function(e) {
691
- M(t, e);
692
- function t(r, n, o) {
693
- r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), o === void 0 && (o = Re);
694
- var i = e.call(this) || this;
695
- return i._bufferSize = r, i._windowTime = n, i._timestampProvider = o, i._buffer = [], i._infiniteTimeWindow = !0, i._infiniteTimeWindow = n === 1 / 0, i._bufferSize = Math.max(1, r), i._windowTime = Math.max(1, n), i;
693
+ }, _t = (function(e) {
694
+ G(t, e);
695
+ function t(r, n, i) {
696
+ r === void 0 && (r = 1 / 0), n === void 0 && (n = 1 / 0), i === void 0 && (i = Ue);
697
+ var o = e.call(this) || this;
698
+ return o._bufferSize = r, o._windowTime = n, o._timestampProvider = i, o._buffer = [], o._infiniteTimeWindow = !0, o._infiniteTimeWindow = n === 1 / 0, o._bufferSize = Math.max(1, r), o._windowTime = Math.max(1, n), o;
696
699
  }
697
700
  return t.prototype.next = function(r) {
698
- var n = this, o = n.isStopped, i = n._buffer, a = n._infiniteTimeWindow, c = n._timestampProvider, s = n._windowTime;
699
- o || (i.push(r), !a && i.push(c.now() + s)), this._trimBuffer(), e.prototype.next.call(this, r);
701
+ var n = this, i = n.isStopped, o = n._buffer, a = n._infiniteTimeWindow, u = n._timestampProvider, s = n._windowTime;
702
+ i || (o.push(r), !a && o.push(u.now() + s)), this._trimBuffer(), e.prototype.next.call(this, r);
700
703
  }, t.prototype._subscribe = function(r) {
701
704
  this._throwIfClosed(), this._trimBuffer();
702
- for (var n = this._innerSubscribe(r), o = this, i = o._infiniteTimeWindow, a = o._buffer, c = a.slice(), s = 0; s < c.length && !r.closed; s += i ? 1 : 2)
703
- r.next(c[s]);
705
+ for (var n = this._innerSubscribe(r), i = this, o = i._infiniteTimeWindow, a = i._buffer, u = a.slice(), s = 0; s < u.length && !r.closed; s += o ? 1 : 2)
706
+ r.next(u[s]);
704
707
  return this._checkFinalizedStatuses(r), n;
705
708
  }, t.prototype._trimBuffer = function() {
706
- var r = this, n = r._bufferSize, o = r._timestampProvider, i = r._buffer, a = r._infiniteTimeWindow, c = (a ? 1 : 2) * n;
707
- if (n < 1 / 0 && c < i.length && i.splice(0, i.length - c), !a) {
708
- for (var s = o.now(), u = 0, l = 1; l < i.length && i[l] <= s; l += 2)
709
- u = l;
710
- u && i.splice(0, u + 1);
709
+ var r = this, n = r._bufferSize, i = r._timestampProvider, o = r._buffer, a = r._infiniteTimeWindow, u = (a ? 1 : 2) * n;
710
+ if (n < 1 / 0 && u < o.length && o.splice(0, o.length - u), !a) {
711
+ for (var s = i.now(), c = 0, l = 1; l < o.length && o[l] <= s; l += 2)
712
+ c = l;
713
+ c && o.splice(0, c + 1);
711
714
  }
712
715
  }, t;
713
- })(Z), me = (function(e) {
716
+ })(re), ge = (function(e) {
714
717
  return e && typeof e.length == "number" && typeof e != "function";
715
718
  });
716
- function Ce(e) {
717
- return w(e == null ? void 0 : e.then);
719
+ function ke(e) {
720
+ return b(e == null ? void 0 : e.then);
718
721
  }
719
- function je(e) {
720
- return w(e[pe]);
722
+ function $e(e) {
723
+ return b(e[be]);
721
724
  }
722
- function Le(e) {
723
- return Symbol.asyncIterator && w(e == null ? void 0 : e[Symbol.asyncIterator]);
725
+ function Me(e) {
726
+ return Symbol.asyncIterator && b(e == null ? void 0 : e[Symbol.asyncIterator]);
724
727
  }
725
- function Ne(e) {
728
+ function De(e) {
726
729
  return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
727
730
  }
728
- function ht() {
731
+ function Et() {
729
732
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
730
733
  }
731
- var Ue = ht();
732
- function Fe(e) {
733
- return w(e == null ? void 0 : e[Ue]);
734
+ var We = Et();
735
+ function qe(e) {
736
+ return b(e == null ? void 0 : e[We]);
734
737
  }
735
- function ke(e) {
736
- return Qe(this, arguments, function() {
737
- var r, n, o, i;
738
- return Ae(this, function(a) {
738
+ function ze(e) {
739
+ return ct(this, arguments, function() {
740
+ var r, n, i, o;
741
+ return je(this, function(a) {
739
742
  switch (a.label) {
740
743
  case 0:
741
744
  r = e.getReader(), a.label = 1;
742
745
  case 1:
743
746
  a.trys.push([1, , 9, 10]), a.label = 2;
744
747
  case 2:
745
- return [4, U(r.read())];
748
+ return [4, W(r.read())];
746
749
  case 3:
747
- return n = a.sent(), o = n.value, i = n.done, i ? [4, U(void 0)] : [3, 5];
750
+ return n = a.sent(), i = n.value, o = n.done, o ? [4, W(void 0)] : [3, 5];
748
751
  case 4:
749
752
  return [2, a.sent()];
750
753
  case 5:
751
- return [4, U(o)];
754
+ return [4, W(i)];
752
755
  case 6:
753
756
  return [4, a.sent()];
754
757
  case 7:
@@ -763,66 +766,66 @@ function ke(e) {
763
766
  });
764
767
  });
765
768
  }
766
- function $e(e) {
767
- return w(e == null ? void 0 : e.getReader);
769
+ function Be(e) {
770
+ return b(e == null ? void 0 : e.getReader);
768
771
  }
769
- function I(e) {
770
- if (e instanceof E)
772
+ function L(e) {
773
+ if (e instanceof x)
771
774
  return e;
772
775
  if (e != null) {
773
- if (je(e))
774
- return pt(e);
775
- if (me(e))
776
- return vt(e);
777
- if (Ce(e))
778
- return mt(e);
779
- if (Le(e))
780
- return Me(e);
781
- if (Fe(e))
782
- return yt(e);
783
776
  if ($e(e))
784
- return bt(e);
777
+ return Ot(e);
778
+ if (ge(e))
779
+ return xt(e);
780
+ if (ke(e))
781
+ return At(e);
782
+ if (Me(e))
783
+ return Ge(e);
784
+ if (qe(e))
785
+ return Tt(e);
786
+ if (Be(e))
787
+ return It(e);
785
788
  }
786
- throw Ne(e);
789
+ throw De(e);
787
790
  }
788
- function pt(e) {
789
- return new E(function(t) {
790
- var r = e[pe]();
791
- if (w(r.subscribe))
791
+ function Ot(e) {
792
+ return new x(function(t) {
793
+ var r = e[be]();
794
+ if (b(r.subscribe))
792
795
  return r.subscribe(t);
793
796
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
794
797
  });
795
798
  }
796
- function vt(e) {
797
- return new E(function(t) {
799
+ function xt(e) {
800
+ return new x(function(t) {
798
801
  for (var r = 0; r < e.length && !t.closed; r++)
799
802
  t.next(e[r]);
800
803
  t.complete();
801
804
  });
802
805
  }
803
- function mt(e) {
804
- return new E(function(t) {
806
+ function At(e) {
807
+ return new x(function(t) {
805
808
  e.then(function(r) {
806
809
  t.closed || (t.next(r), t.complete());
807
810
  }, function(r) {
808
811
  return t.error(r);
809
- }).then(null, Te);
812
+ }).then(null, Fe);
810
813
  });
811
814
  }
812
- function yt(e) {
813
- return new E(function(t) {
815
+ function Tt(e) {
816
+ return new x(function(t) {
814
817
  var r, n;
815
818
  try {
816
- for (var o = F(e), i = o.next(); !i.done; i = o.next()) {
817
- var a = i.value;
819
+ for (var i = q(e), o = i.next(); !o.done; o = i.next()) {
820
+ var a = o.value;
818
821
  if (t.next(a), t.closed)
819
822
  return;
820
823
  }
821
- } catch (c) {
822
- r = { error: c };
824
+ } catch (u) {
825
+ r = { error: u };
823
826
  } finally {
824
827
  try {
825
- i && !i.done && (n = o.return) && n.call(o);
828
+ o && !o.done && (n = i.return) && n.call(i);
826
829
  } finally {
827
830
  if (r) throw r.error;
828
831
  }
@@ -830,24 +833,24 @@ function yt(e) {
830
833
  t.complete();
831
834
  });
832
835
  }
833
- function Me(e) {
834
- return new E(function(t) {
835
- wt(e, t).catch(function(r) {
836
+ function Ge(e) {
837
+ return new x(function(t) {
838
+ Pt(e, t).catch(function(r) {
836
839
  return t.error(r);
837
840
  });
838
841
  });
839
842
  }
840
- function bt(e) {
841
- return Me(ke(e));
843
+ function It(e) {
844
+ return Ge(ze(e));
842
845
  }
843
- function wt(e, t) {
844
- var r, n, o, i;
845
- return Ze(this, void 0, void 0, function() {
846
- var a, c;
847
- return Ae(this, function(s) {
846
+ function Pt(e, t) {
847
+ var r, n, i, o;
848
+ return ut(this, void 0, void 0, function() {
849
+ var a, u;
850
+ return je(this, function(s) {
848
851
  switch (s.label) {
849
852
  case 0:
850
- s.trys.push([0, 5, 6, 11]), r = et(e), s.label = 1;
853
+ s.trys.push([0, 5, 6, 11]), r = lt(e), s.label = 1;
851
854
  case 1:
852
855
  return [4, r.next()];
853
856
  case 2:
@@ -860,15 +863,15 @@ function wt(e, t) {
860
863
  case 4:
861
864
  return [3, 11];
862
865
  case 5:
863
- return c = s.sent(), o = { error: c }, [3, 11];
866
+ return u = s.sent(), i = { error: u }, [3, 11];
864
867
  case 6:
865
- return s.trys.push([6, , 9, 10]), n && !n.done && (i = r.return) ? [4, i.call(r)] : [3, 8];
868
+ return s.trys.push([6, , 9, 10]), n && !n.done && (o = r.return) ? [4, o.call(r)] : [3, 8];
866
869
  case 7:
867
870
  s.sent(), s.label = 8;
868
871
  case 8:
869
872
  return [3, 10];
870
873
  case 9:
871
- if (o) throw o.error;
874
+ if (i) throw i.error;
872
875
  return [7];
873
876
  case 10:
874
877
  return [7];
@@ -878,281 +881,281 @@ function wt(e, t) {
878
881
  });
879
882
  });
880
883
  }
881
- function j(e, t, r, n, o) {
882
- n === void 0 && (n = 0), o === void 0 && (o = !1);
883
- var i = t.schedule(function() {
884
- r(), o ? e.add(this.schedule(null, n)) : this.unsubscribe();
884
+ function $(e, t, r, n, i) {
885
+ n === void 0 && (n = 0), i === void 0 && (i = !1);
886
+ var o = t.schedule(function() {
887
+ r(), i ? e.add(this.schedule(null, n)) : this.unsubscribe();
885
888
  }, n);
886
- if (e.add(i), !o)
887
- return i;
889
+ if (e.add(o), !i)
890
+ return o;
888
891
  }
889
- function De(e, t) {
890
- return t === void 0 && (t = 0), P(function(r, n) {
891
- r.subscribe(A(n, function(o) {
892
- return j(n, e, function() {
893
- return n.next(o);
892
+ function Ve(e, t) {
893
+ return t === void 0 && (t = 0), j(function(r, n) {
894
+ r.subscribe(C(n, function(i) {
895
+ return $(n, e, function() {
896
+ return n.next(i);
894
897
  }, t);
895
898
  }, function() {
896
- return j(n, e, function() {
899
+ return $(n, e, function() {
897
900
  return n.complete();
898
901
  }, t);
899
- }, function(o) {
900
- return j(n, e, function() {
901
- return n.error(o);
902
+ }, function(i) {
903
+ return $(n, e, function() {
904
+ return n.error(i);
902
905
  }, t);
903
906
  }));
904
907
  });
905
908
  }
906
- function We(e, t) {
907
- return t === void 0 && (t = 0), P(function(r, n) {
909
+ function He(e, t) {
910
+ return t === void 0 && (t = 0), j(function(r, n) {
908
911
  n.add(e.schedule(function() {
909
912
  return r.subscribe(n);
910
913
  }, t));
911
914
  });
912
915
  }
913
- function gt(e, t) {
914
- return I(e).pipe(We(t), De(t));
916
+ function Rt(e, t) {
917
+ return L(e).pipe(He(t), Ve(t));
915
918
  }
916
- function St(e, t) {
917
- return I(e).pipe(We(t), De(t));
919
+ function Ct(e, t) {
920
+ return L(e).pipe(He(t), Ve(t));
918
921
  }
919
- function _t(e, t) {
920
- return new E(function(r) {
922
+ function jt(e, t) {
923
+ return new x(function(r) {
921
924
  var n = 0;
922
925
  return t.schedule(function() {
923
926
  n === e.length ? r.complete() : (r.next(e[n++]), r.closed || this.schedule());
924
927
  });
925
928
  });
926
929
  }
927
- function Et(e, t) {
928
- return new E(function(r) {
930
+ function Lt(e, t) {
931
+ return new x(function(r) {
929
932
  var n;
930
- return j(r, t, function() {
931
- n = e[Ue](), j(r, t, function() {
932
- var o, i, a;
933
+ return $(r, t, function() {
934
+ n = e[We](), $(r, t, function() {
935
+ var i, o, a;
933
936
  try {
934
- o = n.next(), i = o.value, a = o.done;
935
- } catch (c) {
936
- r.error(c);
937
+ i = n.next(), o = i.value, a = i.done;
938
+ } catch (u) {
939
+ r.error(u);
937
940
  return;
938
941
  }
939
- a ? r.complete() : r.next(i);
942
+ a ? r.complete() : r.next(o);
940
943
  }, 0, !0);
941
944
  }), function() {
942
- return w(n == null ? void 0 : n.return) && n.return();
945
+ return b(n == null ? void 0 : n.return) && n.return();
943
946
  };
944
947
  });
945
948
  }
946
- function qe(e, t) {
949
+ function Ye(e, t) {
947
950
  if (!e)
948
951
  throw new Error("Iterable cannot be null");
949
- return new E(function(r) {
950
- j(r, t, function() {
952
+ return new x(function(r) {
953
+ $(r, t, function() {
951
954
  var n = e[Symbol.asyncIterator]();
952
- j(r, t, function() {
953
- n.next().then(function(o) {
954
- o.done ? r.complete() : r.next(o.value);
955
+ $(r, t, function() {
956
+ n.next().then(function(i) {
957
+ i.done ? r.complete() : r.next(i.value);
955
958
  });
956
959
  }, 0, !0);
957
960
  });
958
961
  });
959
962
  }
960
- function Ot(e, t) {
961
- return qe(ke(e), t);
963
+ function Nt(e, t) {
964
+ return Ye(ze(e), t);
962
965
  }
963
- function xt(e, t) {
966
+ function Ft(e, t) {
964
967
  if (e != null) {
965
- if (je(e))
966
- return gt(e, t);
967
- if (me(e))
968
- return _t(e, t);
969
- if (Ce(e))
970
- return St(e, t);
971
- if (Le(e))
972
- return qe(e, t);
973
- if (Fe(e))
974
- return Et(e, t);
975
968
  if ($e(e))
976
- return Ot(e, t);
969
+ return Rt(e, t);
970
+ if (ge(e))
971
+ return jt(e, t);
972
+ if (ke(e))
973
+ return Ct(e, t);
974
+ if (Me(e))
975
+ return Ye(e, t);
976
+ if (qe(e))
977
+ return Lt(e, t);
978
+ if (Be(e))
979
+ return Nt(e, t);
977
980
  }
978
- throw Ne(e);
981
+ throw De(e);
979
982
  }
980
- function Ge(e, t) {
981
- return t ? xt(e, t) : I(e);
983
+ function Je(e, t) {
984
+ return t ? Ft(e, t) : L(e);
982
985
  }
983
- var At = de(function(e) {
986
+ var Ut = me(function(e) {
984
987
  return function() {
985
988
  e(this), this.name = "EmptyError", this.message = "no elements in sequence";
986
989
  };
987
990
  });
988
- function Pt(e, t) {
991
+ function kt(e, t) {
989
992
  return new Promise(function(r, n) {
990
- var o = new $({
991
- next: function(i) {
992
- r(i), o.unsubscribe();
993
+ var i = new B({
994
+ next: function(o) {
995
+ r(o), i.unsubscribe();
993
996
  },
994
997
  error: n,
995
998
  complete: function() {
996
- n(new At());
999
+ n(new Ut());
997
1000
  }
998
1001
  });
999
- e.subscribe(o);
1002
+ e.subscribe(i);
1000
1003
  });
1001
1004
  }
1002
- function ye(e, t) {
1003
- return P(function(r, n) {
1004
- var o = 0;
1005
- r.subscribe(A(n, function(i) {
1006
- n.next(e.call(t, i, o++));
1005
+ function Se(e, t) {
1006
+ return j(function(r, n) {
1007
+ var i = 0;
1008
+ r.subscribe(C(n, function(o) {
1009
+ n.next(e.call(t, o, i++));
1007
1010
  }));
1008
1011
  });
1009
1012
  }
1010
- var It = Array.isArray;
1011
- function Tt(e, t) {
1012
- return It(t) ? e.apply(void 0, G([], k(t))) : e(t);
1013
+ var $t = Array.isArray;
1014
+ function Mt(e, t) {
1015
+ return $t(t) ? e.apply(void 0, Y([], z(t))) : e(t);
1013
1016
  }
1014
- function Rt(e) {
1015
- return ye(function(t) {
1016
- return Tt(e, t);
1017
+ function Dt(e) {
1018
+ return Se(function(t) {
1019
+ return Mt(e, t);
1017
1020
  });
1018
1021
  }
1019
- function Ct(e, t, r, n, o, i, a, c) {
1020
- var s = [], u = 0, l = 0, f = !1, v = function() {
1021
- f && !s.length && !u && t.complete();
1022
- }, d = function(h) {
1023
- return u < n ? p(h) : s.push(h);
1024
- }, p = function(h) {
1025
- u++;
1022
+ function Wt(e, t, r, n, i, o, a, u) {
1023
+ var s = [], c = 0, l = 0, p = !1, h = function() {
1024
+ p && !s.length && !c && t.complete();
1025
+ }, d = function(f) {
1026
+ return c < n ? v(f) : s.push(f);
1027
+ }, v = function(f) {
1028
+ c++;
1026
1029
  var S = !1;
1027
- I(r(h, l++)).subscribe(A(t, function(g) {
1028
- t.next(g);
1030
+ L(r(f, l++)).subscribe(C(t, function(w) {
1031
+ t.next(w);
1029
1032
  }, function() {
1030
1033
  S = !0;
1031
1034
  }, void 0, function() {
1032
1035
  if (S)
1033
1036
  try {
1034
- u--;
1035
- for (var g = function() {
1036
- var m = s.shift();
1037
- a || p(m);
1038
- }; s.length && u < n; )
1039
- g();
1040
- v();
1041
- } catch (m) {
1042
- t.error(m);
1037
+ c--;
1038
+ for (var w = function() {
1039
+ var g = s.shift();
1040
+ a || v(g);
1041
+ }; s.length && c < n; )
1042
+ w();
1043
+ h();
1044
+ } catch (g) {
1045
+ t.error(g);
1043
1046
  }
1044
1047
  }));
1045
1048
  };
1046
- return e.subscribe(A(t, d, function() {
1047
- f = !0, v();
1049
+ return e.subscribe(C(t, d, function() {
1050
+ p = !0, h();
1048
1051
  })), function() {
1049
1052
  };
1050
1053
  }
1051
- function Be(e, t, r) {
1052
- return r === void 0 && (r = 1 / 0), w(t) ? Be(function(n, o) {
1053
- return ye(function(i, a) {
1054
- return t(n, i, o, a);
1055
- })(I(e(n, o)));
1056
- }, r) : (typeof t == "number" && (r = t), P(function(n, o) {
1057
- return Ct(n, o, e, r);
1054
+ function Ke(e, t, r) {
1055
+ return r === void 0 && (r = 1 / 0), b(t) ? Ke(function(n, i) {
1056
+ return Se(function(o, a) {
1057
+ return t(n, o, i, a);
1058
+ })(L(e(n, i)));
1059
+ }, r) : (typeof t == "number" && (r = t), j(function(n, i) {
1060
+ return Wt(n, i, e, r);
1058
1061
  }));
1059
1062
  }
1060
- var jt = ["addListener", "removeListener"], Lt = ["addEventListener", "removeEventListener"], Nt = ["on", "off"];
1061
- function ce(e, t, r, n) {
1062
- if (w(r) && (n = r, r = void 0), n)
1063
- return ce(e, t, r).pipe(Rt(n));
1064
- var o = k(kt(e) ? Lt.map(function(c) {
1063
+ var qt = ["addListener", "removeListener"], zt = ["addEventListener", "removeEventListener"], Bt = ["on", "off"];
1064
+ function he(e, t, r, n) {
1065
+ if (b(r) && (n = r, r = void 0), n)
1066
+ return he(e, t, r).pipe(Dt(n));
1067
+ var i = z(Ht(e) ? zt.map(function(u) {
1065
1068
  return function(s) {
1066
- return e[c](t, s, r);
1069
+ return e[u](t, s, r);
1067
1070
  };
1068
- }) : Ut(e) ? jt.map(Ee(e, t)) : Ft(e) ? Nt.map(Ee(e, t)) : [], 2), i = o[0], a = o[1];
1069
- if (!i && me(e))
1070
- return Be(function(c) {
1071
- return ce(c, t, r);
1072
- })(I(e));
1073
- if (!i)
1071
+ }) : Gt(e) ? qt.map(Te(e, t)) : Vt(e) ? Bt.map(Te(e, t)) : [], 2), o = i[0], a = i[1];
1072
+ if (!o && ge(e))
1073
+ return Ke(function(u) {
1074
+ return he(u, t, r);
1075
+ })(L(e));
1076
+ if (!o)
1074
1077
  throw new TypeError("Invalid event target");
1075
- return new E(function(c) {
1078
+ return new x(function(u) {
1076
1079
  var s = function() {
1077
- for (var u = [], l = 0; l < arguments.length; l++)
1078
- u[l] = arguments[l];
1079
- return c.next(1 < u.length ? u : u[0]);
1080
+ for (var c = [], l = 0; l < arguments.length; l++)
1081
+ c[l] = arguments[l];
1082
+ return u.next(1 < c.length ? c : c[0]);
1080
1083
  };
1081
- return i(s), function() {
1084
+ return o(s), function() {
1082
1085
  return a(s);
1083
1086
  };
1084
1087
  });
1085
1088
  }
1086
- function Ee(e, t) {
1089
+ function Te(e, t) {
1087
1090
  return function(r) {
1088
1091
  return function(n) {
1089
1092
  return e[r](t, n);
1090
1093
  };
1091
1094
  };
1092
1095
  }
1093
- function Ut(e) {
1094
- return w(e.addListener) && w(e.removeListener);
1096
+ function Gt(e) {
1097
+ return b(e.addListener) && b(e.removeListener);
1095
1098
  }
1096
- function Ft(e) {
1097
- return w(e.on) && w(e.off);
1099
+ function Vt(e) {
1100
+ return b(e.on) && b(e.off);
1098
1101
  }
1099
- function kt(e) {
1100
- return w(e.addEventListener) && w(e.removeEventListener);
1102
+ function Ht(e) {
1103
+ return b(e.addEventListener) && b(e.removeEventListener);
1101
1104
  }
1102
- function te(e, t) {
1103
- return P(function(r, n) {
1104
- var o = 0;
1105
- r.subscribe(A(n, function(i) {
1106
- return e.call(t, i, o++) && n.next(i);
1105
+ function ae(e, t) {
1106
+ return j(function(r, n) {
1107
+ var i = 0;
1108
+ r.subscribe(C(n, function(o) {
1109
+ return e.call(t, o, i++) && n.next(o);
1107
1110
  }));
1108
1111
  });
1109
1112
  }
1110
- function $t(e, t) {
1111
- return t === void 0 && (t = ve), e = e ?? Mt, P(function(r, n) {
1112
- var o, i = !0;
1113
- r.subscribe(A(n, function(a) {
1114
- var c = t(a);
1115
- (i || !e(o, c)) && (i = !1, o = c, n.next(a));
1113
+ function Yt(e, t) {
1114
+ return t === void 0 && (t = we), e = e ?? Jt, j(function(r, n) {
1115
+ var i, o = !0;
1116
+ r.subscribe(C(n, function(a) {
1117
+ var u = t(a);
1118
+ (o || !e(i, u)) && (o = !1, i = u, n.next(a));
1116
1119
  }));
1117
1120
  });
1118
1121
  }
1119
- function Mt(e, t) {
1122
+ function Jt(e, t) {
1120
1123
  return e === t;
1121
1124
  }
1122
- function Dt(e) {
1125
+ function Kt(e) {
1123
1126
  e === void 0 && (e = {});
1124
1127
  var t = e.connector, r = t === void 0 ? function() {
1125
- return new Z();
1126
- } : t, n = e.resetOnError, o = n === void 0 ? !0 : n, i = e.resetOnComplete, a = i === void 0 ? !0 : i, c = e.resetOnRefCountZero, s = c === void 0 ? !0 : c;
1127
- return function(u) {
1128
- var l, f, v, d = 0, p = !1, h = !1, S = function() {
1129
- f == null || f.unsubscribe(), f = void 0;
1128
+ return new re();
1129
+ } : t, n = e.resetOnError, i = n === void 0 ? !0 : n, o = e.resetOnComplete, a = o === void 0 ? !0 : o, u = e.resetOnRefCountZero, s = u === void 0 ? !0 : u;
1130
+ return function(c) {
1131
+ var l, p, h, d = 0, v = !1, f = !1, S = function() {
1132
+ p == null || p.unsubscribe(), p = void 0;
1133
+ }, w = function() {
1134
+ S(), l = h = void 0, v = f = !1;
1130
1135
  }, g = function() {
1131
- S(), l = v = void 0, p = h = !1;
1132
- }, m = function() {
1133
- var b = l;
1134
- g(), b == null || b.unsubscribe();
1136
+ var _ = l;
1137
+ w(), _ == null || _.unsubscribe();
1135
1138
  };
1136
- return P(function(b, O) {
1137
- d++, !h && !p && S();
1138
- var B = v = v ?? r();
1139
- O.add(function() {
1140
- d--, d === 0 && !h && !p && (f = re(m, s));
1141
- }), B.subscribe(O), !l && d > 0 && (l = new $({
1142
- next: function(z) {
1143
- return B.next(z);
1139
+ return j(function(_, T) {
1140
+ d++, !f && !v && S();
1141
+ var I = h = h ?? r();
1142
+ T.add(function() {
1143
+ d--, d === 0 && !f && !v && (p = se(g, s));
1144
+ }), I.subscribe(T), !l && d > 0 && (l = new B({
1145
+ next: function(P) {
1146
+ return I.next(P);
1144
1147
  },
1145
- error: function(z) {
1146
- h = !0, S(), f = re(g, o, z), B.error(z);
1148
+ error: function(P) {
1149
+ f = !0, S(), p = se(w, i, P), I.error(P);
1147
1150
  },
1148
1151
  complete: function() {
1149
- p = !0, S(), f = re(g, a), B.complete();
1152
+ v = !0, S(), p = se(w, a), I.complete();
1150
1153
  }
1151
- }), I(b).subscribe(l));
1152
- })(u);
1154
+ }), L(_).subscribe(l));
1155
+ })(c);
1153
1156
  };
1154
1157
  }
1155
- function re(e, t) {
1158
+ function se(e, t) {
1156
1159
  for (var r = [], n = 2; n < arguments.length; n++)
1157
1160
  r[n - 2] = arguments[n];
1158
1161
  if (t === !0) {
@@ -1160,98 +1163,98 @@ function re(e, t) {
1160
1163
  return;
1161
1164
  }
1162
1165
  if (t !== !1) {
1163
- var o = new $({
1166
+ var i = new B({
1164
1167
  next: function() {
1165
- o.unsubscribe(), e();
1168
+ i.unsubscribe(), e();
1166
1169
  }
1167
1170
  });
1168
- return I(t.apply(void 0, G([], k(r)))).subscribe(o);
1171
+ return L(t.apply(void 0, Y([], z(r)))).subscribe(i);
1169
1172
  }
1170
1173
  }
1171
- function ze(e, t) {
1172
- return P(function(r, n) {
1173
- var o = null, i = 0, a = !1, c = function() {
1174
- return a && !o && n.complete();
1174
+ function Xe(e, t) {
1175
+ return j(function(r, n) {
1176
+ var i = null, o = 0, a = !1, u = function() {
1177
+ return a && !i && n.complete();
1175
1178
  };
1176
- r.subscribe(A(n, function(s) {
1177
- o == null || o.unsubscribe();
1178
- var u = 0, l = i++;
1179
- I(e(s, l)).subscribe(o = A(n, function(f) {
1180
- return n.next(t ? t(s, f, l, u++) : f);
1179
+ r.subscribe(C(n, function(s) {
1180
+ i == null || i.unsubscribe();
1181
+ var c = 0, l = o++;
1182
+ L(e(s, l)).subscribe(i = C(n, function(p) {
1183
+ return n.next(t ? t(s, p, l, c++) : p);
1181
1184
  }, function() {
1182
- o = null, c();
1185
+ i = null, u();
1183
1186
  }));
1184
1187
  }, function() {
1185
- a = !0, c();
1188
+ a = !0, u();
1186
1189
  }));
1187
1190
  });
1188
1191
  }
1189
- function Wt(e, t, r) {
1190
- var n = w(e) || t || r ? { next: e, error: t, complete: r } : e;
1191
- return n ? P(function(o, i) {
1192
+ function Xt(e, t, r) {
1193
+ var n = b(e) || t || r ? { next: e, error: t, complete: r } : e;
1194
+ return n ? j(function(i, o) {
1192
1195
  var a;
1193
1196
  (a = n.subscribe) === null || a === void 0 || a.call(n);
1194
- var c = !0;
1195
- o.subscribe(A(i, function(s) {
1196
- var u;
1197
- (u = n.next) === null || u === void 0 || u.call(n, s), i.next(s);
1197
+ var u = !0;
1198
+ i.subscribe(C(o, function(s) {
1199
+ var c;
1200
+ (c = n.next) === null || c === void 0 || c.call(n, s), o.next(s);
1198
1201
  }, function() {
1199
1202
  var s;
1200
- c = !1, (s = n.complete) === null || s === void 0 || s.call(n), i.complete();
1203
+ u = !1, (s = n.complete) === null || s === void 0 || s.call(n), o.complete();
1201
1204
  }, function(s) {
1202
- var u;
1203
- c = !1, (u = n.error) === null || u === void 0 || u.call(n, s), i.error(s);
1205
+ var c;
1206
+ u = !1, (c = n.error) === null || c === void 0 || c.call(n, s), o.error(s);
1204
1207
  }, function() {
1205
- var s, u;
1206
- c && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (u = n.finalize) === null || u === void 0 || u.call(n);
1208
+ var s, c;
1209
+ u && ((s = n.unsubscribe) === null || s === void 0 || s.call(n)), (c = n.finalize) === null || c === void 0 || c.call(n);
1207
1210
  }));
1208
- }) : ve;
1211
+ }) : we;
1209
1212
  }
1210
- const W = xe({});
1211
- async function qt() {
1212
- W.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1213
+ const V = Ce({});
1214
+ async function Zt() {
1215
+ V.update((e) => (Object.assign(e, window.__MANIFEST__), e));
1213
1216
  }
1214
- const T = /* @__PURE__ */ new Map(), V = 5e3;
1215
- function Gt(e) {
1216
- const t = T.get(e);
1217
- return t ? (T.delete(e), Date.now() - t.createdAt > V ? (t.abortController.abort(), null) : t.response$) : null;
1217
+ const N = /* @__PURE__ */ new Map(), Q = 5e3;
1218
+ function Qt(e) {
1219
+ const t = N.get(e);
1220
+ return t ? (N.delete(e), Date.now() - t.createdAt > Q ? (t.abortController.abort(), null) : t.response$) : null;
1218
1221
  }
1219
- function Bt(e, t) {
1220
- ce(document, "mouseover").pipe(Dt()).pipe(
1222
+ function er(e, t) {
1223
+ he(document, "mouseover").pipe(Kt()).pipe(
1221
1224
  // Extract <a> element from hover target
1222
- ye((o) => {
1223
- const i = o.target, a = (i == null ? void 0 : i.tagName) === "A" ? i : i == null ? void 0 : i.closest("A");
1225
+ Se((i) => {
1226
+ const o = i.target, a = (o == null ? void 0 : o.tagName) === "A" ? o : o == null ? void 0 : o.closest("A");
1224
1227
  if (!a) return null;
1225
- const c = a.getAttribute("href");
1226
- return !c || !c.startsWith("/") && !c.startsWith(".") ? null : c;
1228
+ const u = a.getAttribute("href");
1229
+ return !u || !u.startsWith("/") && !u.startsWith(".") ? null : u;
1227
1230
  }),
1228
1231
  // Drop non-link hovers
1229
- te((o) => o !== null),
1232
+ ae((i) => i !== null),
1230
1233
  // Drop if same URL as current page
1231
- te((o) => o !== window.location.pathname),
1234
+ ae((i) => i !== window.location.pathname),
1232
1235
  // Deduplicate consecutive hovers to same URL
1233
- $t(),
1236
+ Yt(),
1234
1237
  // Check that route requires server data
1235
- te((o) => {
1236
- const i = o.split("?")[0], a = "get", c = e.find(
1237
- (l) => l.method.toLowerCase() === a && t.find((f) => f.parser(i) && f.pattern === l.path)
1238
+ ae((i) => {
1239
+ const o = i.split("?")[0], a = "get", u = e.find(
1240
+ (l) => l.method.toLowerCase() === a && t.find((p) => p.parser(o) && p.pattern === l.path)
1238
1241
  );
1239
- if (!c) return !1;
1240
- const s = t.find((l) => l.parser(i) && l.pattern === c.path);
1241
- return !!N(W)[s == null ? void 0 : s.pattern];
1242
+ if (!u) return !1;
1243
+ const s = t.find((l) => l.parser(o) && l.pattern === u.path);
1244
+ return !!R(V)[s == null ? void 0 : s.pattern];
1242
1245
  }),
1243
1246
  // switchMap cancels prior prefetch when hovering a new link
1244
- ze((o) => {
1245
- const i = T.get(o);
1246
- if (i && Date.now() - i.createdAt < V)
1247
+ Xe((i) => {
1248
+ const o = N.get(i);
1249
+ if (o && Date.now() - o.createdAt < Q)
1247
1250
  return [];
1248
- const a = new AbortController(), c = new dt(1), s = {
1249
- response$: c,
1251
+ const a = new AbortController(), u = new _t(1), s = {
1252
+ response$: u,
1250
1253
  createdAt: Date.now(),
1251
1254
  abortController: a
1252
1255
  };
1253
- T.set(o, s);
1254
- const u = {
1256
+ N.set(i, s);
1257
+ const c = {
1255
1258
  method: "GET",
1256
1259
  headers: {
1257
1260
  "Content-Type": "application/json",
@@ -1259,27 +1262,27 @@ function Bt(e, t) {
1259
1262
  },
1260
1263
  signal: a.signal
1261
1264
  };
1262
- return u[Q] = !0, Ge(
1263
- fetch(o, u).then(
1264
- (l) => (c.next(l), c.complete(), o),
1265
- (l) => (c.error(l), T.delete(o), null)
1265
+ return c[ne] = !0, Je(
1266
+ fetch(i, c).then(
1267
+ (l) => (u.next(l), u.complete(), i),
1268
+ (l) => (u.error(l), N.delete(i), null)
1266
1269
  )
1267
1270
  ).pipe(
1268
- Wt({
1271
+ Xt({
1269
1272
  unsubscribe: () => {
1270
- a.abort(), T.delete(o);
1273
+ a.abort(), N.delete(i);
1271
1274
  }
1272
1275
  })
1273
1276
  );
1274
1277
  })
1275
1278
  ).subscribe(), setInterval(() => {
1276
- const o = Date.now();
1277
- for (const [i, a] of T)
1278
- o - a.createdAt > V && (a.abortController.abort(), T.delete(i));
1279
- }, V);
1279
+ const i = Date.now();
1280
+ for (const [o, a] of N)
1281
+ i - a.createdAt > Q && (a.abortController.abort(), N.delete(o));
1282
+ }, Q);
1280
1283
  }
1281
- var C = /* @__PURE__ */ ((e) => (e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.FATAL = 5] = "FATAL", e))(C || {});
1282
- const zt = {
1284
+ var U = /* @__PURE__ */ ((e) => (e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.FATAL = 5] = "FATAL", e))(U || {});
1285
+ const tr = {
1283
1286
  trace: 0,
1284
1287
  debug: 1,
1285
1288
  info: 2,
@@ -1288,14 +1291,14 @@ const zt = {
1288
1291
  fatal: 5
1289
1292
  /* FATAL */
1290
1293
  };
1291
- function Yt(e) {
1294
+ function rr(e) {
1292
1295
  if (!e) return 2;
1293
- const t = e.trim().toLowerCase(), r = zt[t];
1296
+ const t = e.trim().toLowerCase(), r = tr[t];
1294
1297
  if (typeof r == "number") return r;
1295
1298
  const n = Number(t);
1296
1299
  return Number.isFinite(n) && n >= 0 && n <= 5 ? n : 2;
1297
1300
  }
1298
- function Ye(e) {
1301
+ function Ze(e) {
1299
1302
  switch (e) {
1300
1303
  case 0:
1301
1304
  return "TRACE";
@@ -1313,7 +1316,7 @@ function Ye(e) {
1313
1316
  return "INFO";
1314
1317
  }
1315
1318
  }
1316
- function Oe(e) {
1319
+ function Ie(e) {
1317
1320
  if (e === void 0) return "undefined";
1318
1321
  if (e === null) return null;
1319
1322
  if (e instanceof Error)
@@ -1333,7 +1336,7 @@ function Oe(e) {
1333
1336
  return e;
1334
1337
  }
1335
1338
  }
1336
- class Ht {
1339
+ class nr {
1337
1340
  constructor(t, r, n) {
1338
1341
  this.name = t, this.manager = r, this.contextData = n;
1339
1342
  }
@@ -1342,7 +1345,7 @@ class Ht {
1342
1345
  * Replaces the current logger's name (not hierarchical).
1343
1346
  */
1344
1347
  named(t) {
1345
- return new le(t, this.manager, this.contextData);
1348
+ return new pe(t, this.manager, this.contextData);
1346
1349
  }
1347
1350
  /**
1348
1351
  * Creates a new logger with additional context.
@@ -1352,45 +1355,45 @@ class Ht {
1352
1355
  */
1353
1356
  withContext(t) {
1354
1357
  const r = this.contextData ? { ...this.contextData, ...t } : t;
1355
- return new le(this.name, this.manager, r);
1358
+ return new pe(this.name, this.manager, r);
1356
1359
  }
1357
1360
  trace(t, ...r) {
1358
- this.log(C.TRACE, t, r);
1361
+ this.log(U.TRACE, t, r);
1359
1362
  }
1360
1363
  debug(t, ...r) {
1361
- this.log(C.DEBUG, t, r);
1364
+ this.log(U.DEBUG, t, r);
1362
1365
  }
1363
1366
  info(t, ...r) {
1364
- this.log(C.INFO, t, r);
1367
+ this.log(U.INFO, t, r);
1365
1368
  }
1366
1369
  warn(t, ...r) {
1367
- this.log(C.WARN, t, r);
1370
+ this.log(U.WARN, t, r);
1368
1371
  }
1369
1372
  error(t, ...r) {
1370
- this.log(C.ERROR, t, r);
1373
+ this.log(U.ERROR, t, r);
1371
1374
  }
1372
1375
  fatal(t, ...r) {
1373
- this.log(C.FATAL, t, r);
1376
+ this.log(U.FATAL, t, r);
1374
1377
  }
1375
1378
  log(t, r, n) {
1376
1379
  if (!this.manager.shouldLog(t, this.name)) return;
1377
- const o = (/* @__PURE__ */ new Date()).toISOString();
1378
- let i = n.length > 0 ? n.length === 1 ? Oe(n[0]) : n.map(Oe) : void 0, a;
1379
- this.contextData && i !== void 0 ? a = { ...this.contextData, args: i } : this.contextData ? a = this.contextData : a = i, this.manager.log({
1380
- timestamp: o,
1381
- level: Ye(t),
1380
+ const i = (/* @__PURE__ */ new Date()).toISOString();
1381
+ let o = n.length > 0 ? n.length === 1 ? Ie(n[0]) : n.map(Ie) : void 0, a;
1382
+ this.contextData && o !== void 0 ? a = { ...this.contextData, args: o } : this.contextData ? a = this.contextData : a = o, this.manager.log({
1383
+ timestamp: i,
1384
+ level: Ze(t),
1382
1385
  logger: this.name,
1383
1386
  message: r,
1384
1387
  context: a
1385
1388
  });
1386
1389
  }
1387
1390
  }
1388
- class le extends Ht {
1391
+ class pe extends nr {
1389
1392
  constructor(t, r, n) {
1390
1393
  super(t, r, n);
1391
1394
  }
1392
1395
  }
1393
- class Vt {
1396
+ class or {
1394
1397
  log(t) {
1395
1398
  const r = t.context !== void 0 ? ` ${JSON.stringify(t.context)}` : "", n = `[${t.timestamp}] [${t.logger}] [${t.level}] ${t.message}${r}`;
1396
1399
  switch (t.level) {
@@ -1407,13 +1410,13 @@ class Vt {
1407
1410
  }
1408
1411
  }
1409
1412
  }
1410
- const ne = /* @__PURE__ */ Symbol.for("@noego/logger");
1411
- class Kt {
1413
+ const ue = /* @__PURE__ */ Symbol.for("@noego/logger");
1414
+ class ir {
1412
1415
  constructor() {
1413
- var o, i, a;
1416
+ var i, o, a;
1414
1417
  this.transports = [], this.loggerLevels = /* @__PURE__ */ new Map();
1415
- const t = typeof process < "u" ? (o = process.env) == null ? void 0 : o.LOG_LEVEL : void 0, r = typeof process < "u" ? (i = process.env) == null ? void 0 : i.SERVICE_NAME : void 0, n = typeof process < "u" ? (a = process.env) == null ? void 0 : a.NODE_ENV : void 0;
1416
- this.level = Yt(t), this.service = r ?? "noego", this.environment = n ?? "development";
1418
+ const t = typeof process < "u" ? (i = process.env) == null ? void 0 : i.LOG_LEVEL : void 0, r = typeof process < "u" ? (o = process.env) == null ? void 0 : o.SERVICE_NAME : void 0, n = typeof process < "u" ? (a = process.env) == null ? void 0 : a.NODE_ENV : void 0;
1419
+ this.level = rr(t), this.service = r ?? "noego", this.environment = n ?? "development";
1417
1420
  }
1418
1421
  getLevel() {
1419
1422
  return this.level;
@@ -1458,67 +1461,67 @@ class Kt {
1458
1461
  t.close && await t.close();
1459
1462
  }
1460
1463
  formatMessage(t, r, n) {
1461
- return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ye(t)}] ${n}`;
1464
+ return `[${(/* @__PURE__ */ new Date()).toISOString()}] [${r}] [${Ze(t)}] ${n}`;
1462
1465
  }
1463
1466
  }
1464
- function Jt() {
1467
+ function Qe() {
1465
1468
  const e = globalThis;
1466
- if (!e[ne]) {
1467
- const t = new Kt();
1468
- t.addTransport(new Vt()), e[ne] = t;
1469
+ if (!e[ue]) {
1470
+ const t = new ir();
1471
+ t.addTransport(new or()), e[ue] = t;
1469
1472
  }
1470
- return e[ne];
1473
+ return e[ue];
1471
1474
  }
1472
- function be(e) {
1473
- return new le(e, Jt());
1475
+ function _e(e) {
1476
+ return new pe(e, Qe());
1474
1477
  }
1475
- const y = be("forge:nav"), Xt = 1e4;
1476
- function Zt(e, t, r) {
1477
- let n = null, o = !1;
1478
- const i = new Promise((a, c) => {
1478
+ const m = _e("forge:nav"), ar = 1e4;
1479
+ function sr(e, t, r) {
1480
+ let n = null, i = !1;
1481
+ const o = new Promise((a, u) => {
1479
1482
  n = setTimeout(
1480
1483
  () => {
1481
- o = !0, y.error("Timeout fired after", t, "ms"), r(), c(new Error(`Navigation timed out after ${t}ms`));
1484
+ i = !0, m.error("Timeout fired after", t, "ms"), r(), u(new Error(`Navigation timed out after ${t}ms`));
1482
1485
  },
1483
1486
  t
1484
- ), y.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
1487
+ ), m.debug("Timeout scheduled for", t, "ms, timeoutId:", n);
1485
1488
  });
1486
1489
  return Promise.race([
1487
1490
  e.finally(() => {
1488
- n !== null && (o ? y.warn("Promise settled AFTER timeout already fired") : (y.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
1491
+ n !== null && (i ? m.warn("Promise settled AFTER timeout already fired") : (m.debug("Clearing timeout", n, "- promise settled successfully"), clearTimeout(n)));
1489
1492
  }),
1490
- i
1493
+ o
1491
1494
  ]);
1492
1495
  }
1493
- const fe = new Z();
1494
- let _ = 0, q = null;
1495
- function Qt(e) {
1496
- e && e.redirectPath && (y.debug("Handling redirect to", e.redirectPath), setTimeout(
1496
+ const ve = new re();
1497
+ let E = 0, H = null;
1498
+ function ur(e) {
1499
+ e && e.redirectPath && (m.debug("Handling redirect to", e.redirectPath), setTimeout(
1497
1500
  () => {
1498
1501
  window.dispatchEvent(new CustomEvent("forge-redirect", { detail: { path: e.redirectPath } }));
1499
1502
  },
1500
1503
  0
1501
1504
  ));
1502
1505
  }
1503
- fe.pipe(ze((e) => Ge(Zt(nr(e), Xt, () => {
1504
- y.error("Navigation timed out"), _++, q && (q.abort(), q = null);
1506
+ ve.pipe(Xe((e) => Je(sr(dr(e), ar, () => {
1507
+ m.error("Navigation timed out"), E++, H && (H.abort(), H = null);
1505
1508
  }).catch((t) => {
1506
- y.error("Navigation failed:", t);
1509
+ m.error("Navigation failed:", t);
1507
1510
  })))).subscribe({
1508
- next: Qt,
1511
+ next: ur,
1509
1512
  error: (e) => {
1510
- y.error("Stream error:", e);
1513
+ m.error("Stream error:", e);
1511
1514
  }
1512
1515
  });
1513
- function er(e) {
1516
+ function cr(e) {
1514
1517
  var t;
1515
- y.debug("Pushing navigation event to stream", {
1518
+ m.debug("Pushing navigation event to stream", {
1516
1519
  url: e.url,
1517
- currentNavigationId: _,
1518
- subscriberCount: ((t = fe.observers) == null ? void 0 : t.length) || 0
1519
- }), fe.next(e);
1520
+ currentNavigationId: E,
1521
+ subscriberCount: ((t = ve.observers) == null ? void 0 : t.length) || 0
1522
+ }), ve.next(e);
1520
1523
  }
1521
- const x = xe({
1524
+ const A = Ce({
1522
1525
  active: {
1523
1526
  layouts: [],
1524
1527
  view: null,
@@ -1531,9 +1534,9 @@ const x = xe({
1531
1534
  },
1532
1535
  phase: "idle",
1533
1536
  navigationId: 0,
1534
- page: D
1535
- }), tr = async () => {
1536
- const e = N(x).navigationId;
1537
+ page: k
1538
+ }), lr = async () => {
1539
+ const e = R(A).navigationId;
1537
1540
  try {
1538
1541
  const t = window.location.pathname + window.location.search, r = {
1539
1542
  method: "GET",
@@ -1542,101 +1545,113 @@ const x = xe({
1542
1545
  Accept: "application/json"
1543
1546
  }
1544
1547
  };
1545
- r[Q] = !0;
1548
+ r[ne] = !0;
1546
1549
  const n = await fetch(t, r);
1547
1550
  if (!n.ok) return !1;
1548
- const o = await n.json(), i = N(x).navigationId;
1549
- return e !== i ? (y.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: i }), !1) : (x.update((a) => {
1550
- var c;
1551
- return a.active.data = { layout: ((c = a.active.data) == null ? void 0 : c.layout) || [], view: o.view }, a;
1551
+ const i = await n.json(), o = R(A).navigationId;
1552
+ return e !== o ? (m.debug("Discarding stale poll response", { pollNavigationId: e, currentNavigationId: o }), !1) : (A.update((a) => {
1553
+ var u;
1554
+ return a.active.data = { layout: ((u = a.active.data) == null ? void 0 : u.layout) || [], view: i.view }, a;
1552
1555
  }), !0);
1553
1556
  } catch {
1554
1557
  return !1;
1555
1558
  }
1556
1559
  };
1557
- D.update((e) => (e.poll = tr, e));
1560
+ k.update((e) => (e.poll = lr, e));
1561
+ async function et(e, t, r, n, i) {
1562
+ if (!t.controller) return;
1563
+ let o = J(e, t.controller).toString();
1564
+ i && (o = o.replace(/\.svelte\.ts$/, ".js").replace(/\.ts$/, ".js"), /\.[a-z]+$/.test(o) || (o += ".js")), o.startsWith("/") || (o = "/" + o);
1565
+ const u = (await import(
1566
+ /* @vite-ignore */
1567
+ o
1568
+ )).default, s = new u();
1569
+ return typeof s.initialize == "function" && await Promise.resolve(s.initialize(r, n)), s;
1570
+ }
1558
1571
  function J(...e) {
1559
1572
  let t = e.map((r, n) => n === 0 ? r.replace(/\/+$/, "") : r.replace(/^\/+|\/+$/g, "")).join("/");
1560
1573
  return t.startsWith("/") || (t = "/" + t), t.split("?")[0];
1561
1574
  }
1562
- async function rr(e, t, r, n, o, i) {
1575
+ async function fr(e, t, r, n, i, o) {
1563
1576
  try {
1564
- const a = typeof t == "string" && t.indexOf("assets") !== -1, c = (r.layout || []).map((d) => {
1565
- let p = J(t, d).toString();
1566
- return a && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p;
1577
+ const a = typeof t == "string" && t.indexOf("assets") !== -1, u = (r.layout || []).map((w) => {
1578
+ let g = J(t, w).toString();
1579
+ return a && (g = g.endsWith(".svelte") ? g.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(g) ? g : g + ".js"), g;
1567
1580
  });
1568
1581
  let s = J(t, r.view).toString();
1569
1582
  a && (s = s.endsWith(".svelte") ? s.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(s) ? s : s + ".js");
1570
- const u = await Promise.all(c.map((d) => import(
1583
+ const c = await Promise.all(u.map((w) => import(
1571
1584
  /* @vite-ignore */
1572
- d
1573
- ).then((p) => p.default)));
1585
+ w
1586
+ ).then((g) => g.default)));
1574
1587
  s.startsWith("/") || (s = "/" + s);
1575
1588
  const l = await import(
1576
1589
  /* @vite-ignore */
1577
1590
  s
1578
- ).then((d) => d.default), f = window.__INITIAL_DATA__ || { layout: [], view: {} }, v = {
1579
- layouts: u,
1591
+ ).then((w) => w.default), p = window.__INITIAL_DATA__ || { layout: [], view: {} }, h = typeof t == "string" && t.indexOf("assets") !== -1, d = R(k), v = { params: n, urlParams: i, query: o, page: d }, f = await et(t, r, p.view, v, h), S = {
1592
+ layouts: c,
1580
1593
  view: l,
1581
1594
  viewPath: r.view || null,
1582
1595
  // Store original path for debugging
1583
1596
  layoutPaths: r.layout || [],
1584
1597
  // Store original paths for debugging
1585
- data: f,
1598
+ data: p,
1586
1599
  params: n,
1587
- urlParams: o,
1588
- query: i
1600
+ urlParams: i,
1601
+ query: o,
1602
+ controller: f
1589
1603
  };
1590
- x.update((d) => (d.active = v, d.phase = "idle", d)), Ve(Ke, { target: e, props: { root: x } });
1604
+ A.update((w) => (w.active = S, w.phase = "idle", w)), ot(it, { target: e, props: { root: A } });
1591
1605
  } catch (a) {
1592
- y.error("Client-side route loading failed:", a);
1606
+ m.error("Client-side route loading failed:", a);
1593
1607
  }
1594
1608
  }
1595
- function oe(e, t, r, n, o, i, a = !1, c = !0) {
1596
- er({
1609
+ function ce(e, t, r, n, i, o, a = !1, u = !0) {
1610
+ cr({
1597
1611
  url: e,
1598
1612
  base_path: t,
1599
1613
  route: r,
1600
1614
  params: n,
1601
- urlParams: o,
1602
- query: i,
1615
+ urlParams: i,
1616
+ query: o,
1603
1617
  server_loading: a,
1604
- updateUrl: c
1618
+ updateUrl: u
1605
1619
  });
1606
1620
  }
1607
- async function nr(e) {
1621
+ async function dr(e) {
1622
+ var p;
1608
1623
  const {
1609
1624
  url: t,
1610
1625
  base_path: r,
1611
1626
  route: n,
1612
- params: o,
1613
- urlParams: i,
1627
+ params: i,
1628
+ urlParams: o,
1614
1629
  query: a,
1615
- server_loading: c,
1630
+ server_loading: u,
1616
1631
  updateUrl: s
1617
- } = e, u = ++_, l = new AbortController();
1618
- q = l, y.debug("Starting navigation", {
1619
- navigationId: u,
1632
+ } = e, c = ++E, l = new AbortController();
1633
+ H = l, m.debug("Starting navigation", {
1634
+ navigationId: c,
1620
1635
  url: t,
1621
1636
  updateUrl: s,
1622
- server_loading: c,
1623
- currentNavigationId: _,
1624
- hasAbortController: !!q
1625
- }), x.update((f) => (f.phase = "loading", f.navigationId = u, f));
1637
+ server_loading: u,
1638
+ currentNavigationId: E,
1639
+ hasAbortController: !!H
1640
+ }), A.update((h) => (h.phase = "loading", h.navigationId = c, h));
1626
1641
  try {
1627
- let f = { layout: [], view: {} };
1628
- if (c) {
1629
- y.debug("Fetching server data", { navigationId: u, url: t });
1630
- let m = null;
1631
- const b = Gt(t);
1632
- if (b)
1642
+ let h = { layout: [], view: {} };
1643
+ if (u) {
1644
+ m.debug("Fetching server data", { navigationId: c, url: t });
1645
+ let y = null;
1646
+ const O = Qt(t);
1647
+ if (O)
1633
1648
  try {
1634
- y.debug("Using prefetched response for", t), m = await Pt(b);
1649
+ m.debug("Using prefetched response for", t), y = await kt(O);
1635
1650
  } catch {
1636
- y.debug("Prefetch failed, falling back to fetch", t), m = null;
1651
+ m.debug("Prefetch failed, falling back to fetch", t), y = null;
1637
1652
  }
1638
- if (!m) {
1639
- const O = {
1653
+ if (!y) {
1654
+ const M = {
1640
1655
  method: n.method,
1641
1656
  headers: {
1642
1657
  "Content-Type": "application/json",
@@ -1644,136 +1659,185 @@ async function nr(e) {
1644
1659
  },
1645
1660
  signal: l.signal
1646
1661
  };
1647
- O[Q] = !0, m = await fetch(t, O);
1662
+ M[ne] = !0, y = await fetch(t, M);
1648
1663
  }
1649
- if (y.debug("Fetch response received", {
1650
- navigationId: u,
1664
+ if (m.debug("Fetch response received", {
1665
+ navigationId: c,
1651
1666
  url: t,
1652
- ok: m.ok,
1653
- status: m.status,
1654
- redirected: m.redirected,
1655
- currentNavigationId: _
1656
- }), m.redirected || m.headers.get("X-Forge-Redirect") === "true")
1657
- return y.debug("Redirect detected"), x.update((O) => (O.phase = "idle", O)), {
1658
- redirectPath: m.headers.get("X-Forge-Redirect-Path") || void 0
1667
+ ok: y.ok,
1668
+ status: y.status,
1669
+ redirected: y.redirected,
1670
+ currentNavigationId: E
1671
+ }), y.redirected || y.headers.get("X-Forge-Redirect") === "true")
1672
+ return m.debug("Redirect detected"), A.update((M) => (M.phase = "idle", M)), {
1673
+ redirectPath: y.headers.get("X-Forge-Redirect-Path") || void 0
1659
1674
  };
1660
- if (!m.ok)
1661
- throw new Error(`Network response was not ok: ${m.status}`);
1662
- f = await m.json(), y.debug("Server data received:", f);
1675
+ if (!y.ok)
1676
+ throw new Error(`Network response was not ok: ${y.status}`);
1677
+ h = await y.json(), m.debug("Server data received:", h);
1663
1678
  }
1664
- if (u !== _) {
1665
- y.debug("Stale navigation after fetch, aborting", { navigationId: u, currentNavigationId: _ });
1679
+ if (c !== E) {
1680
+ m.debug("Stale navigation after fetch, aborting", { navigationId: c, currentNavigationId: E });
1666
1681
  return;
1667
1682
  }
1668
- y.debug("Loading components", { navigationId: u, view: n.view, layouts: n.layout });
1669
- const v = typeof r == "string" && r.indexOf("assets") !== -1, d = (n.layout || []).map((m) => {
1670
- let b = J(r, m).toString();
1671
- return v && (b = b.endsWith(".svelte") ? b.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(b) ? b : b + ".js"), b;
1683
+ m.debug("Loading components", { navigationId: c, view: n.view, layouts: n.layout });
1684
+ const d = typeof r == "string" && r.indexOf("assets") !== -1, v = (n.layout || []).map((y) => {
1685
+ let O = J(r, y).toString();
1686
+ return d && (O = O.endsWith(".svelte") ? O.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(O) ? O : O + ".js"), O;
1672
1687
  });
1673
- let p = J(r, n.view).toString();
1674
- v && (p = p.endsWith(".svelte") ? p.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(p) ? p : p + ".js"), p.startsWith("/") || (p = "/" + p);
1675
- const h = await Promise.all(d.map((m) => import(
1688
+ let f = J(r, n.view).toString();
1689
+ d && (f = f.endsWith(".svelte") ? f.replace(/\.svelte$/, ".js") : /[.][a-z]+$/.test(f) ? f : f + ".js"), f.startsWith("/") || (f = "/" + f);
1690
+ const S = await Promise.all(v.map((y) => import(
1676
1691
  /* @vite-ignore */
1677
- m
1678
- ).then((b) => b.default))), S = await import(
1692
+ y
1693
+ ).then((O) => O.default))), w = await import(
1679
1694
  /* @vite-ignore */
1680
- p
1681
- ).then((m) => m.default);
1682
- if (y.debug("Components loaded", {
1683
- navigationId: u,
1684
- currentNavigationId: _,
1685
- layoutsCount: h.length,
1686
- viewLoaded: !!S
1687
- }), u !== _) {
1688
- y.debug("Stale navigation after component load, aborting", { navigationId: u, currentNavigationId: _ });
1695
+ f
1696
+ ).then((y) => y.default);
1697
+ if (m.debug("Components loaded", {
1698
+ navigationId: c,
1699
+ currentNavigationId: E,
1700
+ layoutsCount: S.length,
1701
+ viewLoaded: !!w
1702
+ }), c !== E) {
1703
+ m.debug("Stale navigation after component load, aborting", { navigationId: c, currentNavigationId: E });
1689
1704
  return;
1690
1705
  }
1691
- const g = {
1692
- layouts: h,
1693
- view: S,
1706
+ const g = R(k), _ = { params: i, urlParams: o, query: a, page: g }, T = await et(r, n, h.view, _, d);
1707
+ if (c !== E) {
1708
+ m.debug("Stale navigation after controller resolution, aborting", { navigationId: c, currentNavigationId: E }), (p = T == null ? void 0 : T.destroy) == null || p.call(T);
1709
+ return;
1710
+ }
1711
+ const I = R(A).active.controller;
1712
+ I != null && I.destroy && I.destroy();
1713
+ const P = {
1714
+ layouts: S,
1715
+ view: w,
1694
1716
  viewPath: n.view || null,
1695
1717
  // Store original path for debugging
1696
1718
  layoutPaths: n.layout || [],
1697
1719
  // Store original paths for debugging
1698
- data: f,
1699
- params: o,
1700
- urlParams: i,
1701
- query: a
1720
+ data: h,
1721
+ params: i,
1722
+ urlParams: o,
1723
+ query: a,
1724
+ controller: T
1702
1725
  };
1703
- y.debug("Committing new state", {
1704
- navigationId: u,
1705
- currentNavigationId: _,
1706
- layoutsCount: g.layouts.length,
1707
- viewSet: !!g.view,
1708
- dataKeys: Object.keys(g.data || {})
1709
- }), x.update((m) => (m.active = g, m.phase = "idle", y.debug("ROOT.active updated", {
1710
- navigationId: u,
1711
- layoutsCount: m.active.layouts.length,
1712
- viewSet: !!m.active.view,
1713
- dataKeys: Object.keys(m.active.data || {}),
1714
- paramsKeys: Object.keys(m.active.params || {})
1715
- }), m)), typeof window < "u" && window.scroll(0, 0), s && (y.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), y.debug("Navigation complete", { navigationId: u, url: t });
1716
- } catch (f) {
1717
- if (y.error("Navigation failed", {
1718
- navigationId: u,
1719
- currentNavigationId: _,
1726
+ m.debug("Committing new state", {
1727
+ navigationId: c,
1728
+ currentNavigationId: E,
1729
+ layoutsCount: P.layouts.length,
1730
+ viewSet: !!P.view,
1731
+ dataKeys: Object.keys(P.data || {})
1732
+ }), A.update((y) => (y.active = P, y.phase = "idle", m.debug("ROOT.active updated", {
1733
+ navigationId: c,
1734
+ layoutsCount: y.active.layouts.length,
1735
+ viewSet: !!y.active.view,
1736
+ dataKeys: Object.keys(y.active.data || {}),
1737
+ paramsKeys: Object.keys(y.active.params || {})
1738
+ }), y)), typeof window < "u" && window.scroll(0, 0), s && (m.debug("Updating browser URL", { url: t }), window.history.pushState({}, "", t)), m.debug("Navigation complete", { navigationId: c, url: t });
1739
+ } catch (h) {
1740
+ if (m.error("Navigation failed", {
1741
+ navigationId: c,
1742
+ currentNavigationId: E,
1720
1743
  url: t,
1721
- error: f instanceof Error ? f.message : String(f)
1722
- }), x.update((v) => (v.phase = "idle", v)), f.name === "AbortError") {
1723
- y.debug("Navigation aborted");
1744
+ error: h instanceof Error ? h.message : String(h)
1745
+ }), A.update((d) => (d.phase = "idle", d)), h.name === "AbortError") {
1746
+ m.debug("Navigation aborted");
1724
1747
  return;
1725
1748
  }
1726
- throw f;
1749
+ throw h;
1727
1750
  }
1728
1751
  }
1729
- const R = be("forge:events");
1730
- function or(e, t, r) {
1752
+ const F = _e("forge:events");
1753
+ function hr(e, t, r) {
1731
1754
  if (!document) {
1732
- R.error("Document not found");
1755
+ F.error("Document not found");
1733
1756
  return;
1734
1757
  }
1735
1758
  document.addEventListener("click", (n) => {
1736
- var a, c;
1737
- const o = window.location.pathname, i = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (c = n.target) == null ? void 0 : c.closest("A");
1738
- if (i) {
1739
- let s = i.getAttribute("href");
1740
- if (o === s) {
1759
+ var a, u;
1760
+ const i = window.location.pathname, o = ((a = n.target) == null ? void 0 : a.tagName) === "A" ? n.target : (u = n.target) == null ? void 0 : u.closest("A");
1761
+ if (o) {
1762
+ let s = o.getAttribute("href");
1763
+ if (i === s) {
1741
1764
  n.preventDefault();
1742
1765
  return;
1743
1766
  }
1744
1767
  if (s && s.startsWith("/") || s.startsWith(".")) {
1745
- const u = s.split("?")[0], l = i.getAttribute("method") || "get", f = t.find((v) => v.method.toLowerCase() === l && r.find((d) => d.parser(u) && d.pattern === v.path));
1746
- if (f) {
1768
+ const c = s.split("?")[0], l = o.getAttribute("method") || "get", p = t.find((h) => h.method.toLowerCase() === l && r.find((d) => d.parser(c) && d.pattern === h.path));
1769
+ if (p) {
1747
1770
  n.preventDefault();
1748
- const v = r.find((b) => b.parser(u) && b.pattern === f.path), d = (v == null ? void 0 : v.parser(u)) || {}, p = new URLSearchParams(s.split("?")[1] || ""), h = Object.fromEntries(p.entries()) || {}, S = { ...d, ...h }, m = N(W)[v == null ? void 0 : v.pattern];
1749
- D.update((b) => (b.url = s, b.pathname = u, b.params = d, b.query = h, b)), R.debug("Click navigation to", s), oe(s, e, f, S, d, h, m, !0);
1771
+ const h = r.find((_) => _.parser(c) && _.pattern === p.path), d = (h == null ? void 0 : h.parser(c)) || {}, v = new URLSearchParams(s.split("?")[1] || ""), f = Object.fromEntries(v.entries()) || {}, S = { ...d, ...f }, g = R(V)[h == null ? void 0 : h.pattern];
1772
+ k.update((_) => (_.url = s, _.pathname = c, _.params = d, _.query = f, _)), F.debug("Click navigation to", s), ce(s, e, p, S, d, f, g, !0);
1750
1773
  } else
1751
- R.warn("No matching route found", s, "- using fallback navigation");
1774
+ F.warn("No matching route found", s, "- using fallback navigation");
1752
1775
  }
1753
1776
  }
1754
1777
  }), window.addEventListener("popstate", (n) => {
1755
- const o = window.location.pathname, i = window.location.pathname + window.location.search, a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(o) && u.pattern === s.path));
1756
- if (c) {
1757
- const s = r.find((h) => h.parser(o) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(window.location.search), f = Object.fromEntries(l.entries()) || {};
1758
- D.update((h) => (h.url = i, h.pathname = window.location.pathname, h.params = u, h.query = f, h));
1759
- const v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1760
- R.debug("Popstate navigation to", i), oe(i, e, c, v, u, f, p, !1);
1778
+ const i = window.location.pathname, o = window.location.pathname + window.location.search, a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(i) && c.pattern === s.path));
1779
+ if (u) {
1780
+ const s = r.find((f) => f.parser(i) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(window.location.search), p = Object.fromEntries(l.entries()) || {};
1781
+ k.update((f) => (f.url = o, f.pathname = window.location.pathname, f.params = c, f.query = p, f));
1782
+ const h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
1783
+ F.debug("Popstate navigation to", o), ce(o, e, u, h, c, p, v, !1);
1761
1784
  } else
1762
- R.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1785
+ F.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
1763
1786
  }), window.addEventListener("forge-redirect", ((n) => {
1764
- const o = n.detail.path, i = o.split("?")[0];
1765
- R.debug("Handling forge-redirect to:", o);
1766
- const a = "get", c = t.find((s) => s.method.toLowerCase() === a && r.find((u) => u.parser(i) && u.pattern === s.path));
1767
- if (c) {
1768
- const s = r.find((h) => h.parser(i) && h.pattern === c.path), u = (s == null ? void 0 : s.parser(i)) || {}, l = new URLSearchParams(o.split("?")[1] || ""), f = Object.fromEntries(l.entries()) || {}, v = { ...u, ...f }, p = N(W)[s == null ? void 0 : s.pattern];
1769
- D.update((h) => (h.url = o, h.pathname = i, h.params = u, h.query = f, h)), oe(o, e, c, v, u, f, p, !0);
1787
+ const i = n.detail.path, o = i.split("?")[0];
1788
+ F.debug("Handling forge-redirect to:", i);
1789
+ const a = "get", u = t.find((s) => s.method.toLowerCase() === a && r.find((c) => c.parser(o) && c.pattern === s.path));
1790
+ if (u) {
1791
+ const s = r.find((f) => f.parser(o) && f.pattern === u.path), c = (s == null ? void 0 : s.parser(o)) || {}, l = new URLSearchParams(i.split("?")[1] || ""), p = Object.fromEntries(l.entries()) || {}, h = { ...c, ...p }, v = R(V)[s == null ? void 0 : s.pattern];
1792
+ k.update((f) => (f.url = i, f.pathname = o, f.params = c, f.query = p, f)), ce(i, e, u, h, c, p, v, !0);
1770
1793
  } else
1771
- R.warn("No matching route found", i, "- using fallback navigation"), window.location.href = i;
1772
- })), Bt(t, r);
1794
+ F.warn("No matching route found", o, "- using fallback navigation"), window.location.href = o;
1795
+ })), er(t, r);
1773
1796
  }
1774
- const L = be("forge:client"), Q = Symbol("forge-load-function");
1775
- let K = [], ie = null;
1776
- function ir(e) {
1797
+ const Pe = "/__forge/dev-logs", pr = 100, vr = 20;
1798
+ class mr {
1799
+ constructor() {
1800
+ oe(this, "buffer", []);
1801
+ oe(this, "timer", null);
1802
+ typeof window < "u" && window.addEventListener("beforeunload", () => {
1803
+ this.beaconFlush();
1804
+ });
1805
+ }
1806
+ log(t) {
1807
+ if (this.buffer.push(t), this.buffer.length >= vr) {
1808
+ this.flush();
1809
+ return;
1810
+ }
1811
+ this.timer || (this.timer = setTimeout(() => this.flush(), pr));
1812
+ }
1813
+ flush() {
1814
+ if (this.timer && (clearTimeout(this.timer), this.timer = null), this.buffer.length === 0) return;
1815
+ const t = this.buffer;
1816
+ this.buffer = [];
1817
+ try {
1818
+ fetch(Pe, {
1819
+ method: "POST",
1820
+ headers: { "Content-Type": "application/json" },
1821
+ body: JSON.stringify(t),
1822
+ keepalive: !0
1823
+ }).catch(() => {
1824
+ });
1825
+ } catch {
1826
+ }
1827
+ }
1828
+ beaconFlush() {
1829
+ if (this.buffer.length === 0) return;
1830
+ const t = this.buffer;
1831
+ this.buffer = [];
1832
+ try {
1833
+ navigator.sendBeacon(Pe, JSON.stringify(t));
1834
+ } catch {
1835
+ }
1836
+ }
1837
+ }
1838
+ const D = _e("forge:client"), ne = Symbol("forge-load-function");
1839
+ let ee = [], X = null;
1840
+ function yr(e) {
1777
1841
  try {
1778
1842
  const t = new URL(e, window.location.origin);
1779
1843
  return t.origin === window.location.origin && !t.pathname.startsWith("/api/");
@@ -1781,64 +1845,66 @@ function ir(e) {
1781
1845
  return !e.startsWith("/api/");
1782
1846
  }
1783
1847
  }
1784
- function ar() {
1785
- typeof window < "u" && !ie && (ie = window.fetch, window.fetch = async function(e, t = {}) {
1786
- let r = { ...t };
1787
- for (const i of K)
1848
+ function br() {
1849
+ typeof window < "u" && !X && (X = window.fetch, window.fetch = async function(e, t = {}) {
1850
+ if ((typeof e == "string" ? e : e instanceof URL ? e.toString() : e.url) === "/__forge/dev-logs")
1851
+ return X(e, t);
1852
+ let n = { ...t };
1853
+ for (const a of ee)
1788
1854
  try {
1789
- if (i.length === 2) {
1790
- const a = new Headers(r.headers), c = Object.fromEntries(a.entries());
1791
- await new Promise((s, u) => {
1855
+ if (a.length === 2) {
1856
+ const u = new Headers(n.headers), s = Object.fromEntries(u.entries());
1857
+ await new Promise((c, l) => {
1792
1858
  try {
1793
- i(c, (l) => {
1794
- if (l)
1795
- u(l);
1859
+ a(s, (p) => {
1860
+ if (p)
1861
+ l(p);
1796
1862
  else {
1797
- const f = new Headers();
1798
- Object.entries(c).forEach(([v, d]) => {
1799
- d !== void 0 && f.set(v, d);
1800
- }), r.headers = f, s();
1863
+ const h = new Headers();
1864
+ Object.entries(s).forEach(([d, v]) => {
1865
+ v !== void 0 && h.set(d, v);
1866
+ }), n.headers = h, c();
1801
1867
  }
1802
1868
  });
1803
- } catch (l) {
1804
- u(l);
1869
+ } catch (p) {
1870
+ l(p);
1805
1871
  }
1806
1872
  });
1807
1873
  } else {
1808
- const a = await i(r, e);
1809
- a && typeof a == "object" && (r = a);
1874
+ const u = await a(n, e);
1875
+ u && typeof u == "object" && (n = u);
1810
1876
  }
1811
- } catch (a) {
1812
- throw L.error("Middleware error", a), a;
1877
+ } catch (u) {
1878
+ throw D.error("Middleware error", u), u;
1813
1879
  }
1814
- const n = r == null ? void 0 : r[Q];
1815
- L.debug("Fetch override request", {
1880
+ const i = n == null ? void 0 : n[ne];
1881
+ D.debug("Fetch override request", {
1816
1882
  url: e,
1817
- hasForgeSymbol: n,
1818
- headers: r == null ? void 0 : r.headers
1883
+ hasForgeSymbol: i,
1884
+ headers: n == null ? void 0 : n.headers
1819
1885
  });
1820
- const o = await ie(e, r);
1821
- if (L.debug("Fetch override response", {
1886
+ const o = await X(e, n);
1887
+ if (D.debug("Fetch override response", {
1822
1888
  url: e,
1823
1889
  responseUrl: o.url,
1824
1890
  redirected: o.redirected,
1825
1891
  status: o.status,
1826
1892
  type: o.type,
1827
- hasForgeSymbol: n
1828
- }), n && o.redirected) {
1829
- const i = typeof e == "string" ? e : e.url, a = o.url;
1830
- if (L.debug("Redirect detected", {
1831
- requested: i,
1832
- final: a,
1893
+ hasForgeSymbol: i
1894
+ }), i && o.redirected) {
1895
+ const a = typeof e == "string" ? e : e.url, u = o.url;
1896
+ if (D.debug("Redirect detected", {
1897
+ requested: a,
1898
+ final: u,
1833
1899
  redirected: o.redirected
1834
- }), ir(a)) {
1835
- const c = new URL(a), s = c.pathname + c.search;
1836
- return L.debug("Redirect detected to:", s, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1900
+ }), yr(u)) {
1901
+ const s = new URL(u), c = s.pathname + s.search;
1902
+ return D.debug("Redirect detected to:", c, "- will navigate after current request completes"), new Response(JSON.stringify({ layout: [], view: {} }), {
1837
1903
  status: 200,
1838
1904
  headers: {
1839
1905
  "Content-Type": "application/json",
1840
1906
  "X-Forge-Redirect": "true",
1841
- "X-Forge-Redirect-Path": s
1907
+ "X-Forge-Redirect-Path": c
1842
1908
  }
1843
1909
  });
1844
1910
  }
@@ -1846,54 +1912,59 @@ function ar() {
1846
1912
  return o;
1847
1913
  });
1848
1914
  }
1849
- ar();
1850
- const dr = {
1915
+ br();
1916
+ var Re;
1917
+ if (typeof window < "u") {
1918
+ const e = window.__CONFIGURATION__;
1919
+ (Re = e == null ? void 0 : e.dev) != null && Re.enable_debug_log && Qe().addTransport(new mr());
1920
+ }
1921
+ const xr = {
1851
1922
  /**
1852
1923
  * Add middleware to the fetch pipeline
1853
1924
  */
1854
1925
  configUpdate(e) {
1855
1926
  if (typeof e != "function")
1856
1927
  throw new Error("Middleware must be a function");
1857
- K.push(e);
1928
+ ee.push(e);
1858
1929
  },
1859
1930
  /**
1860
1931
  * Reset all middleware
1861
1932
  */
1862
1933
  reset() {
1863
- K.length = 0;
1934
+ ee.length = 0;
1864
1935
  },
1865
1936
  /**
1866
1937
  * Get current middleware count (for debugging)
1867
1938
  */
1868
1939
  getMiddlewareCount() {
1869
- return K.length;
1940
+ return ee.length;
1870
1941
  }
1871
1942
  };
1872
- let ae;
1873
- async function hr(e, t) {
1943
+ let le;
1944
+ async function Ar(e, t) {
1874
1945
  let r = window.__COMPONENT_DIR__ || t.component_dir;
1875
1946
  if (!r && typeof r != "string")
1876
1947
  throw new Error("No component directory provided");
1877
1948
  let n = window.__ROUTING__;
1878
- if (ae = Xe(n), window && window.location) {
1879
- const o = (window.location.pathname || "/").split("?")[0], i = ae.find((c) => c.parser(o));
1880
- let a = i ? n.find((c) => c.path === i.pattern) : null;
1881
- if (i && a) {
1882
- const c = i.parser(o) || {}, s = new URLSearchParams(window.location.search), u = Object.fromEntries(s.entries()) || {}, l = { ...c, ...u };
1883
- qt(), rr(e, r, a, l, c, u), or(r, n, ae);
1949
+ if (le = st(n), window && window.location) {
1950
+ const i = (window.location.pathname || "/").split("?")[0], o = le.find((u) => u.parser(i));
1951
+ let a = o ? n.find((u) => u.path === o.pattern) : null;
1952
+ if (o && a) {
1953
+ const u = o.parser(i) || {}, s = new URLSearchParams(window.location.search), c = Object.fromEntries(s.entries()) || {}, l = { ...u, ...c };
1954
+ Zt(), fr(e, r, a, l, u, c), hr(r, n, le);
1884
1955
  } else
1885
- L.warn("No matching route", o);
1956
+ D.warn("No matching route", i);
1886
1957
  }
1887
1958
  }
1888
1959
  export {
1889
- W as MANIFEST_STORE,
1890
- or as bootstrap_events,
1891
- hr as createApp,
1892
- dr as fetch,
1893
- rr as loadRoute,
1894
- D as page,
1895
- mr as shadowUrl,
1896
- qt as updateManifestStore,
1897
- oe as updateRoute
1960
+ V as MANIFEST_STORE,
1961
+ hr as bootstrap_events,
1962
+ Ar as createApp,
1963
+ xr as fetch,
1964
+ fr as loadRoute,
1965
+ k as page,
1966
+ Pr as shadowUrl,
1967
+ Zt as updateManifestStore,
1968
+ ce as updateRoute
1898
1969
  };
1899
1970
  //# sourceMappingURL=client.mjs.map