@qwik.dev/core 2.0.0-beta.39 → 2.0.0-beta.40

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 (43) hide show
  1. package/dist/backpatch/index.mjs +2 -2
  2. package/dist/backpatch/package.json +1 -1
  3. package/dist/backpatch-executor.debug.js +55 -42
  4. package/dist/backpatch-executor.js +1 -1
  5. package/dist/build/package.json +1 -1
  6. package/dist/cli.mjs +2 -2
  7. package/dist/core-internal.d.ts +1 -1
  8. package/dist/core.min.mjs +6 -6
  9. package/dist/core.mjs +2 -2
  10. package/dist/core.prod.mjs +152 -152
  11. package/dist/insights/index.qwik.mjs +81 -93
  12. package/dist/insights/vite/index.mjs +79 -84
  13. package/dist/loader/index.mjs +2 -2
  14. package/dist/loader/package.json +1 -1
  15. package/dist/optimizer.d.ts +19 -3
  16. package/dist/optimizer.mjs +2992 -3624
  17. package/dist/out-of-order-executor.debug.js +138 -161
  18. package/dist/out-of-order-executor.js +1 -1
  19. package/dist/preloader.mjs +178 -1
  20. package/dist/qwikloader.debug.js +384 -433
  21. package/dist/qwikloader.js +1 -1
  22. package/dist/server.mjs +10 -216
  23. package/dist/server.prod.mjs +1046 -1046
  24. package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/vite.config.ts +1 -1
  25. package/dist/starters/adapters/azure-swa/adapters/azure-swa/vite.config.ts +1 -1
  26. package/dist/starters/adapters/bun/adapters/bun/vite.config.ts +1 -1
  27. package/dist/starters/adapters/cloud-run/adapters/cloud-run/vite.config.ts +1 -1
  28. package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/vite.config.ts +1 -1
  29. package/dist/starters/adapters/cloudflare-workers/adapters/cloudflare-workers/vite.config.ts +1 -1
  30. package/dist/starters/adapters/deno/adapters/deno/vite.config.ts +1 -1
  31. package/dist/starters/adapters/express/adapters/express/vite.config.ts +1 -1
  32. package/dist/starters/adapters/fastify/adapters/fastify/vite.config.ts +1 -1
  33. package/dist/starters/adapters/firebase/adapters/firebase/vite.config.ts +1 -1
  34. package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/vite.config.ts +1 -1
  35. package/dist/starters/adapters/node-server/adapters/node-server/vite.config.ts +1 -1
  36. package/dist/starters/adapters/ssg/adapters/ssg/vite.config.ts +1 -1
  37. package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/vite.config.ts +1 -1
  38. package/dist/starters/features/csr/package.json +1 -1
  39. package/dist/testing/index.mjs +3 -2
  40. package/dist/testing/package.json +1 -1
  41. package/dist/worker/index.mjs +248 -315
  42. package/dist/worker/package.json +1 -1
  43. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/server 2.0.0-beta.39-dev+6fb620f
3
+ * @qwik.dev/core/server 2.0.0-beta.40-dev+a459d55
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -33,22 +33,22 @@ var qRuntimeQrl = globalThis.qRuntimeQrl === true;
33
33
  // packages/qwik/src/core/shared/utils/log.ts
34
34
  var STYLE = qDev ? `background: #564CE0; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;` : "";
35
35
 
36
- var throwErrorAndStop = (e, ...t) => {
37
- const n = De(false, e, ...t);
36
+ var throwErrorAndStop = (t, ...e) => {
37
+ const n = De(false, t, ...e);
38
38
  debugger;
39
39
  throw n;
40
40
  };
41
41
 
42
- var logErrorAndStop = (e, ...t) => {
43
- const n = De(qDev, e, ...t);
42
+ var logErrorAndStop = (t, ...e) => {
43
+ const n = De(qDev, t, ...e);
44
44
  debugger;
45
45
  return n;
46
46
  };
47
47
 
48
- var De = (e, t, ...n) => {
49
- const r = t instanceof Error ? t : new Error(t);
48
+ var De = (t, e, ...n) => {
49
+ const r = e instanceof Error ? e : new Error(e);
50
50
  !qTest && console.error("%cQWIK ERROR", STYLE, r.message, ...n, r.stack);
51
- e && !qTest && setTimeout(() => {
51
+ t && !qTest && setTimeout(() => {
52
52
  throw r;
53
53
  }, 0);
54
54
  return r;
@@ -57,27 +57,27 @@ var De = (e, t, ...n) => {
57
57
  // packages/qwik/src/core/shared/error/assert.ts
58
58
  var ASSERT_DISCLAIMER = "Internal assert, this is likely caused by a bug in Qwik: ";
59
59
 
60
- function assertTrue(e, t, ...n) {
60
+ function assertTrue(t, e, ...n) {
61
61
  if (je) {
62
- if (e === true) {
62
+ if (t === true) {
63
63
  return;
64
64
  }
65
- throwErrorAndStop(ASSERT_DISCLAIMER + t, ...n);
65
+ throwErrorAndStop(ASSERT_DISCLAIMER + e, ...n);
66
66
  }
67
67
  }
68
68
 
69
69
  // packages/qwik/src/core/client/util-mapArray.ts
70
- var Xe = (e, t, n) => {
70
+ var Xe = (t, e, n) => {
71
71
  isDev2 && assertTrue(n % 2 === 0, "Expecting even number.");
72
72
  let r = n >> 1;
73
- let s = e.length - 2 >> 1;
73
+ let s = t.length - 2 >> 1;
74
74
  while (r <= s) {
75
75
  const n = r + (s - r >> 1);
76
- const i = e[n << 1];
77
- if (i === t) {
76
+ const i = t[n << 1];
77
+ if (i === e) {
78
78
  return n << 1;
79
79
  }
80
- if (i < t) {
80
+ if (i < e) {
81
81
  r = n + 1;
82
82
  } else {
83
83
  s = n - 1;
@@ -86,55 +86,55 @@ var Xe = (e, t, n) => {
86
86
  return r << 1 ^ -1;
87
87
  };
88
88
 
89
- var We = (e, t, n, r, s = false) => {
90
- const i = Xe(e, t, r);
89
+ var We = (t, e, n, r, s = false) => {
90
+ const i = Xe(t, e, r);
91
91
  if (i >= 0) {
92
92
  if (n == null && !s) {
93
- e.splice(i, 2);
93
+ t.splice(i, 2);
94
94
  } else {
95
- e[i + 1] = n;
95
+ t[i + 1] = n;
96
96
  }
97
97
  } else if (n != null || s) {
98
- e.splice(i ^ -1, 0, t, n);
98
+ t.splice(i ^ -1, 0, e, n);
99
99
  }
100
100
  };
101
101
 
102
- var mapApp_remove = (e, t, n) => {
103
- const r = Xe(e, t, n);
102
+ var mapApp_remove = (t, e, n) => {
103
+ const r = Xe(t, e, n);
104
104
  let s = null;
105
105
  if (r >= 0) {
106
- s = e[r + 1];
107
- e.splice(r, 2);
106
+ s = t[r + 1];
107
+ t.splice(r, 2);
108
108
  return s;
109
109
  }
110
110
  return s;
111
111
  };
112
112
 
113
- var Ue = (e, t, n) => {
114
- const r = Xe(e, t, n);
113
+ var Ue = (t, e, n) => {
114
+ const r = Xe(t, e, n);
115
115
  if (r >= 0) {
116
- return e[r + 1];
116
+ return t[r + 1];
117
117
  } else {
118
118
  return null;
119
119
  }
120
120
  };
121
121
 
122
- var Ve = (e, t, n) => Xe(e, t, n) >= 0;
122
+ var Ve = (t, e, n) => Xe(t, e, n) >= 0;
123
123
 
124
124
  // packages/qwik/src/core/shared/error/error.ts
125
125
  import { isDev as isDev3 } from "@qwik.dev/core/build";
126
126
 
127
127
  // packages/qwik/src/core/shared/utils/types.ts
128
- var Be = e => typeof e === "object" && e !== null;
128
+ var Be = t => typeof t === "object" && t !== null;
129
129
 
130
- var He = e => Array.isArray(e);
130
+ var He = t => Array.isArray(t);
131
131
 
132
- var Qe = e => typeof e === "string";
132
+ var Qe = t => typeof t === "string";
133
133
 
134
134
  // packages/qwik/src/core/shared/error/error.ts
135
135
  var baseUrl = "https://qwikdev-build-v2.qwik-8nx.pages.dev/docs/errors/#q";
136
136
 
137
- var codeToText = (e, ...t) => {
137
+ var codeToText = (t, ...e) => {
138
138
  if (isDev3) {
139
139
  const n = [ "Error while serializing class or style attributes",
140
140
  // 0
@@ -213,25 +213,25 @@ var codeToText = (e, ...t) => {
213
213
  "Invalid serialized Promise dependency",
214
214
  // 37
215
215
  "Invalid serialized Uint8Array payload" ];
216
- let r = n[e] ?? "";
217
- if (t.length) {
218
- r = r.replaceAll(/{{(\d+)}}/g, (e, n) => {
219
- let r = t[n];
216
+ let r = n[t] ?? "";
217
+ if (e.length) {
218
+ r = r.replaceAll(/{{(\d+)}}/g, (t, n) => {
219
+ let r = e[n];
220
220
  if (r && Be(r) && r.constructor === Object) {
221
221
  r = JSON.stringify(r).slice(0, 50);
222
222
  }
223
223
  return r;
224
224
  });
225
225
  }
226
- return `Code(Q${e}): ${r}`;
226
+ return `Code(Q${t}): ${r}`;
227
227
  } else {
228
- return `Code(Q${e}) ${baseUrl}${e}`;
228
+ return `Code(Q${t}) ${baseUrl}${t}`;
229
229
  }
230
230
  };
231
231
 
232
- var Ye = (e, t = []) => {
233
- const n = codeToText(e, ...t);
234
- return logErrorAndStop(n, ...t);
232
+ var Ye = (t, e = []) => {
233
+ const n = codeToText(t, ...e);
234
+ return logErrorAndStop(n, ...e);
235
235
  };
236
236
 
237
237
  // packages/qwik/src/core/shared/qrl/qrl-utils.ts
@@ -416,92 +416,92 @@ var VNodeDataChar = {
416
416
  /* ******* */ "~"
417
417
  };
418
418
 
419
- var ir = (e, t) => {
420
- const n = parseInt(e, 10) - 1;
421
- const r = n + t;
422
- return -(r * (r + 1) / 2 + t + 1);
419
+ var ir = (t, e) => {
420
+ const n = parseInt(t, 10) - 1;
421
+ const r = n + e;
422
+ return -(r * (r + 1) / 2 + e + 1);
423
423
  };
424
424
 
425
425
  // packages/qwik/src/core/shared/utils/character-escaping.ts
426
- function escapeHTML(e) {
427
- let t = "";
428
- const n = e.length;
426
+ function escapeHTML(t) {
427
+ let e = "";
428
+ const n = t.length;
429
429
  let r = 0;
430
430
  let s = r;
431
431
  for (;r < n; r++) {
432
- const n = e.charCodeAt(r);
432
+ const n = t.charCodeAt(r);
433
433
  if (n === 60) {
434
- t += e.substring(s, r) + "&lt;";
434
+ e += t.substring(s, r) + "&lt;";
435
435
  } else if (n === 62) {
436
- t += e.substring(s, r) + "&gt;";
436
+ e += t.substring(s, r) + "&gt;";
437
437
  } else if (n === 38) {
438
- t += e.substring(s, r) + "&amp;";
438
+ e += t.substring(s, r) + "&amp;";
439
439
  } else if (n === 34) {
440
- t += e.substring(s, r) + "&quot;";
440
+ e += t.substring(s, r) + "&quot;";
441
441
  } else if (n === 39) {
442
- t += e.substring(s, r) + "&#39;";
442
+ e += t.substring(s, r) + "&#39;";
443
443
  } else {
444
444
  continue;
445
445
  }
446
446
  s = r + 1;
447
447
  }
448
448
  if (s === 0) {
449
- return e;
449
+ return t;
450
450
  } else {
451
- return t + e.substring(s);
451
+ return e + t.substring(s);
452
452
  }
453
453
  }
454
454
 
455
- function encodeVNodeDataString(e) {
456
- let t = "";
457
- const n = e.length;
455
+ function encodeVNodeDataString(t) {
456
+ let e = "";
457
+ const n = t.length;
458
458
  let r = 0;
459
459
  let s = r;
460
460
  for (;r < n; r++) {
461
- const n = e.charCodeAt(r);
461
+ const n = t.charCodeAt(r);
462
462
  if (n >= VNodeDataSeparator.ADVANCE_1 && n <= VNodeDataSeparator.ADVANCE_8192) {
463
- t += e.substring(s, r) + "\\" + e.charAt(r);
463
+ e += t.substring(s, r) + "\\" + t.charAt(r);
464
464
  } else {
465
465
  continue;
466
466
  }
467
467
  s = r + 1;
468
468
  }
469
469
  if (s === 0) {
470
- return e;
470
+ return t;
471
471
  } else {
472
- return t + e.substring(s);
472
+ return e + t.substring(s);
473
473
  }
474
474
  }
475
475
 
476
- function encodeVNodeDataKey(e) {
477
- const t = encodeURI(e);
476
+ function encodeVNodeDataKey(t) {
477
+ const e = encodeURI(t);
478
478
  let n = "";
479
- const r = t.length;
479
+ const r = e.length;
480
480
  let s = 0;
481
481
  let i = s;
482
482
  for (;s < r; s++) {
483
- const e = t.charCodeAt(s);
483
+ const t = e.charCodeAt(s);
484
484
  let r = null;
485
- if (e === 59) {
485
+ if (t === 59) {
486
486
  r = "%3B";
487
- } else if (e === 61) {
487
+ } else if (t === 61) {
488
488
  r = "%3D";
489
- } else if (e === 63) {
489
+ } else if (t === 63) {
490
490
  r = "%3F";
491
- } else if (e === 64) {
491
+ } else if (t === 64) {
492
492
  r = "%40";
493
- } else if (e === 126) {
493
+ } else if (t === 126) {
494
494
  r = "%7E";
495
495
  } else {
496
496
  continue;
497
497
  }
498
- n += t.substring(i, s) + r;
498
+ n += e.substring(i, s) + r;
499
499
  i = s + 1;
500
500
  }
501
501
  if (i === 0) {
502
- return t;
502
+ return e;
503
503
  } else {
504
- return n + t.substring(i);
504
+ return n + e.substring(i);
505
505
  }
506
506
  }
507
507
 
@@ -538,7 +538,7 @@ var QRuntimeAttr = "q:runtime";
538
538
 
539
539
  var QVersionAttr = "q:version";
540
540
 
541
- var vr = "q:base";
541
+ var br = "q:base";
542
542
 
543
543
  var QLocaleAttr = "q:locale";
544
544
 
@@ -603,76 +603,76 @@ import { isDev as isDev5, isServer as Ce } from "@qwik.dev/core/build";
603
603
 
604
604
  var Jr = 100;
605
605
 
606
- var Yr = e => !!e && typeof e == "object" && typeof e.then === "function";
606
+ var Yr = t => !!t && typeof t == "object" && typeof t.then === "function";
607
607
 
608
- var Kr = (e, t) => Yr(e) ? e.then(t) : t(e);
608
+ var Kr = (t, e) => Yr(t) ? t.then(e) : e(t);
609
609
 
610
- var checkError = e => {
611
- if (Ce && e instanceof ReferenceError && e.message.includes("window")) {
612
- e.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + e.message;
610
+ var checkError = t => {
611
+ if (Ce && t instanceof ReferenceError && t.message.includes("window")) {
612
+ t.message = 'It seems like you forgot to add "if (isBrowser) {...}" here:' + t.message;
613
613
  }
614
614
  };
615
615
 
616
- var ti = e => {
617
- throw e;
616
+ var ti = t => {
617
+ throw t;
618
618
  };
619
619
 
620
- function n(e, t = ti) {
620
+ function n(t, e = ti) {
621
621
  let n = false;
622
622
  let r;
623
623
  try {
624
- r = e();
624
+ r = t();
625
625
  n = true;
626
- } catch (e) {
627
- r = e;
626
+ } catch (t) {
627
+ r = t;
628
628
  }
629
629
  if (!Yr(r)) {
630
630
  if (n) {
631
631
  return r;
632
632
  }
633
633
  isDev5 && checkError(r);
634
- return t(r);
634
+ return e(r);
635
635
  }
636
636
  let s = Jr;
637
637
  const i = async n => {
638
638
  while (Yr(n)) {
639
639
  try {
640
640
  await n;
641
- return await e();
642
- } catch (e) {
643
- if (Yr(e)) {
641
+ return await t();
642
+ } catch (t) {
643
+ if (Yr(t)) {
644
644
  if (! --s) {
645
645
  n = new Error("Exceeded max retry count in retryOnPromise");
646
646
  break;
647
647
  } else {
648
- n = e;
648
+ n = t;
649
649
  }
650
650
  } else {
651
- n = e;
651
+ n = t;
652
652
  break;
653
653
  }
654
654
  }
655
655
  }
656
656
  isDev5 && checkError(n);
657
- return t(n);
657
+ return e(n);
658
658
  };
659
659
  return n ? r.catch(i) : i(r);
660
660
  }
661
661
 
662
662
  // packages/qwik/src/core/shared/utils/scoped-styles.ts
663
- function isClassAttr(e) {
664
- return e === "class";
663
+ function isClassAttr(t) {
664
+ return t === "class";
665
665
  }
666
666
 
667
- function convertStyleIdsToString(e) {
668
- return Array.from(e).join(" ");
667
+ function convertStyleIdsToString(t) {
668
+ return Array.from(t).join(" ");
669
669
  }
670
670
 
671
671
  // packages/qwik/src/core/shared/utils/event-names.ts
672
- var ri = e => e.charCodeAt(0) === 113 && e.charCodeAt(1) === 45 && (e.charCodeAt(3) === 58 || e.charCodeAt(3) === 112 && e.charCodeAt(4) === 58);
672
+ var ri = t => t.charCodeAt(0) === 113 && t.charCodeAt(1) === 45 && (t.charCodeAt(3) === 58 || t.charCodeAt(3) === 112 && t.charCodeAt(4) === 58);
673
673
 
674
- function isPreventDefault(e) {
675
- return e.startsWith("preventdefault:");
674
+ function isPreventDefault(t) {
675
+ return t.startsWith("preventdefault:");
676
676
  }
677
677
 
678
678
  // packages/qwik/src/core/shared/utils/unitless_number.ts
@@ -682,95 +682,95 @@ var li = /* @__PURE__ */ new Set([ "animationIterationCount", "aspectRatio", "bo
682
682
  // TODO: Remove these since they shouldn't be used in modern code
683
683
  "msFlex", "msFlexPositive", "WebkitAnimationIterationCount", "WebkitBoxFlex", "WebkitBoxOrdinalGroup", "WebkitColumnCount", "WebkitColumns", "WebkitFlex", "WebkitFlexGrow", "WebkitFlexShrink", "WebkitLineClamp" ]);
684
684
 
685
- var isUnitlessNumber = e => li.has(e);
685
+ var isUnitlessNumber = t => li.has(t);
686
686
 
687
687
  // packages/qwik/src/core/shared/utils/styles.ts
688
- var ci = e => {
689
- if (!e) {
688
+ var ci = t => {
689
+ if (!t) {
690
690
  return "";
691
691
  }
692
- if (Qe(e)) {
693
- return e.trim();
692
+ if (Qe(t)) {
693
+ return t.trim();
694
694
  }
695
- const t = [];
696
- if (He(e)) {
697
- for (let n = 0; n < e.length; n++) {
698
- const r = e[n];
695
+ const e = [];
696
+ if (He(t)) {
697
+ for (let n = 0; n < t.length; n++) {
698
+ const r = t[n];
699
699
  const s = ci(r);
700
700
  if (s) {
701
- t.push(s);
701
+ e.push(s);
702
702
  }
703
703
  }
704
704
  } else {
705
- for (const [n, r] of Object.entries(e)) {
705
+ for (const [n, r] of Object.entries(t)) {
706
706
  if (r) {
707
- t.push(n.trim());
707
+ e.push(n.trim());
708
708
  }
709
709
  }
710
710
  }
711
- return t.join(" ");
711
+ return e.join(" ");
712
712
  };
713
713
 
714
- var fi = e => e.replace(/([A-Z])/g, "-$1").toLowerCase();
714
+ var fi = t => t.replace(/([A-Z])/g, "-$1").toLowerCase();
715
715
 
716
- var ai = e => {
717
- if (e == null) {
716
+ var ai = t => {
717
+ if (t == null) {
718
718
  return "";
719
719
  }
720
- if (typeof e == "object") {
721
- if (He(e)) {
722
- throw Ye(0 /* stringifyClassOrStyle */ , [ e, "style" ]);
720
+ if (typeof t == "object") {
721
+ if (He(t)) {
722
+ throw Ye(0 /* stringifyClassOrStyle */ , [ t, "style" ]);
723
723
  } else {
724
- const t = [];
725
- for (const n in e) {
726
- if (Object.prototype.hasOwnProperty.call(e, n)) {
727
- const r = e[n];
724
+ const e = [];
725
+ for (const n in t) {
726
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
727
+ const r = t[n];
728
728
  if (r != null && typeof r !== "function") {
729
729
  if (n.startsWith("--")) {
730
- t.push(n + ":" + r);
730
+ e.push(n + ":" + r);
731
731
  } else {
732
- t.push(fi(n) + ":" + hi(n, r));
732
+ e.push(fi(n) + ":" + hi(n, r));
733
733
  }
734
734
  }
735
735
  }
736
736
  }
737
- return t.join(";");
737
+ return e.join(";");
738
738
  }
739
739
  }
740
- return String(e);
740
+ return String(t);
741
741
  };
742
742
 
743
- var serializeBooleanOrNumberAttribute = e => e != null ? String(e) : null;
744
-
745
- function r(e, t, n) {
746
- if (isClassAttr(e)) {
747
- const e = ci(t);
748
- t = n ? n + (e.length ? " " + e : e) : e;
749
- } else if (e === "style") {
750
- t = ai(t);
751
- } else if (isEnumeratedBooleanAttribute(e) || typeof t === "number") {
752
- t = serializeBooleanOrNumberAttribute(t);
753
- } else if (t === false || t == null) {
754
- t = null;
755
- } else if (t === true && isPreventDefault(e)) {
756
- t = "";
743
+ var serializeBooleanOrNumberAttribute = t => t != null ? String(t) : null;
744
+
745
+ function r(t, e, n) {
746
+ if (isClassAttr(t)) {
747
+ const t = ci(e);
748
+ e = n ? n + (t.length ? " " + t : t) : t;
749
+ } else if (t === "style") {
750
+ e = ai(e);
751
+ } else if (isEnumeratedBooleanAttribute(t) || typeof e === "number") {
752
+ e = serializeBooleanOrNumberAttribute(e);
753
+ } else if (e === false || e == null) {
754
+ e = null;
755
+ } else if (e === true && isPreventDefault(t)) {
756
+ e = "";
757
757
  }
758
- return t;
758
+ return e;
759
759
  }
760
760
 
761
- function isEnumeratedBooleanAttribute(e) {
762
- return isAriaAttribute(e) || [ "spellcheck", "draggable", "contenteditable" ].includes(e);
761
+ function isEnumeratedBooleanAttribute(t) {
762
+ return isAriaAttribute(t) || [ "spellcheck", "draggable", "contenteditable" ].includes(t);
763
763
  }
764
764
 
765
- var hi = (e, t) => {
766
- if (typeof t === "number" && t !== 0 && !isUnitlessNumber(e)) {
767
- return t + "px";
765
+ var hi = (t, e) => {
766
+ if (typeof e === "number" && e !== 0 && !isUnitlessNumber(t)) {
767
+ return e + "px";
768
768
  }
769
- return t;
769
+ return e;
770
770
  };
771
771
 
772
- function isAriaAttribute(e) {
773
- return e.startsWith("aria-");
772
+ function isAriaAttribute(t) {
773
+ return t.startsWith("aria-");
774
774
  }
775
775
 
776
776
  // packages/qwik/src/core/preloader/bundle-graph.ts
@@ -778,43 +778,43 @@ var base;
778
778
 
779
779
  var graph;
780
780
 
781
- var parseBundleGraph = e => {
782
- const t = /* @__PURE__ */ new Map;
781
+ var parseBundleGraph = t => {
782
+ const e = /* @__PURE__ */ new Map;
783
783
  let n = 0;
784
- while (n < e.length) {
785
- const r = e[n++];
784
+ while (n < t.length) {
785
+ const r = t[n++];
786
786
  const s = [];
787
787
  let i;
788
788
  let o = 1;
789
- while (i = e[n], typeof i === "number") {
789
+ while (i = t[n], typeof i === "number") {
790
790
  if (i < 0) {
791
791
  o = -i / 10;
792
792
  } else {
793
793
  s.push({
794
- fn: e[i],
794
+ fn: t[i],
795
795
  mn: o,
796
796
  wn: 1
797
797
  });
798
798
  }
799
799
  n++;
800
800
  }
801
- t.set(r, s);
801
+ e.set(r, s);
802
802
  }
803
- return t;
803
+ return e;
804
804
  };
805
805
 
806
- var initPreloader = e => {
807
- if (base != null || !e) {
806
+ var initPreloader = t => {
807
+ if (base != null || !t) {
808
808
  return;
809
809
  }
810
810
  base = "";
811
- graph = parseBundleGraph(e);
811
+ graph = parseBundleGraph(t);
812
812
  };
813
813
 
814
814
  // packages/qwik/src/core/shared/utils/objects.ts
815
- var Oi = e => {
816
- for (const t in e) {
817
- if (Object.prototype.hasOwnProperty.call(e, t)) {
815
+ var Oi = t => {
816
+ for (const e in t) {
817
+ if (Object.prototype.hasOwnProperty.call(t, e)) {
818
818
  return false;
819
819
  }
820
820
  }
@@ -822,30 +822,30 @@ var Oi = e => {
822
822
  };
823
823
 
824
824
  // packages/qwik/src/core/ssr/stream-writer.ts
825
- var stringifyRootRefPath = e => {
826
- let t = String(e[0]);
827
- for (let n = 1; n < e.length; n++) {
828
- t += " " + e[n];
825
+ var stringifyRootRefPath = t => {
826
+ let e = String(t[0]);
827
+ for (let n = 1; n < t.length; n++) {
828
+ e += " " + t[n];
829
829
  }
830
- return t;
830
+ return e;
831
831
  };
832
832
 
833
- var writeStringRootRef = (e, t) => e.write(String(t));
833
+ var writeStringRootRef = (t, e) => t.write(String(e));
834
834
 
835
- var writeStringRootRefPath = (e, t) => e.write(stringifyRootRefPath(t));
835
+ var writeStringRootRefPath = (t, e) => t.write(stringifyRootRefPath(e));
836
836
 
837
- var writeStringRootRefDelta = (e, t, n) => e.write(String(t - n));
837
+ var writeStringRootRefDelta = (t, e, n) => t.write(String(e - n));
838
838
 
839
- var ji = e => ({
840
- write: e,
841
- writeRootRef(e) {
842
- return writeStringRootRef(this, e);
839
+ var ji = t => ({
840
+ write: t,
841
+ writeRootRef(t) {
842
+ return writeStringRootRef(this, t);
843
843
  },
844
- writeRootRefPath(e) {
845
- return writeStringRootRefPath(this, e);
844
+ writeRootRefPath(t) {
845
+ return writeStringRootRefPath(this, t);
846
846
  },
847
- writeRootRefDelta(e, t) {
848
- return writeStringRootRefDelta(this, e, t);
847
+ writeRootRefDelta(t, e) {
848
+ return writeStringRootRefDelta(this, t, e);
849
849
  }
850
850
  });
851
851
 
@@ -873,8 +873,8 @@ var PAREN_CLOSE = ")";
873
873
  var Xi = ",";
874
874
 
875
875
  // packages/qwik/src/server/platform.ts
876
- var getDevSegmentPath = (e, t, n, r) => {
877
- const s = e?.[t];
876
+ var getDevSegmentPath = (t, e, n, r) => {
877
+ const s = t?.[e];
878
878
  if (s) {
879
879
  return s;
880
880
  }
@@ -892,28 +892,28 @@ var getDevSegmentPath = (e, t, n, r) => {
892
892
  return [ n, i ];
893
893
  };
894
894
 
895
- function pi(e, t) {
896
- const n = t?.mapper;
897
- const r = e.symbolMapper ? e.symbolMapper : (e, t, r) => {
895
+ function pi(t, e) {
896
+ const n = e?.mapper;
897
+ const r = t.symbolMapper ? t.symbolMapper : (t, e, r) => {
898
898
  if (n || isDev6 && import.meta.env?.MODE !== "test") {
899
- const t = sd(e);
900
- const s = !isDev6 ? n[t] : getDevSegmentPath(n, t, e, r);
899
+ const e = sd(t);
900
+ const s = !isDev6 ? n[e] : getDevSegmentPath(n, e, t, r);
901
901
  if (!s) {
902
- if (t === Ge) {
903
- return [ t, "" ];
902
+ if (e === Ge) {
903
+ return [ e, "" ];
904
904
  }
905
- const s = globalThis.__qwik_reg_symbols?.has(t);
905
+ const s = globalThis.__qwik_reg_symbols?.has(e);
906
906
  if (s) {
907
- return [ e, "_" ];
907
+ return [ t, "_" ];
908
908
  }
909
- console.error("Cannot resolve symbol", e, "in", n, r);
909
+ console.error("Cannot resolve symbol", t, "in", n, r);
910
910
  }
911
911
  return s;
912
912
  }
913
913
  };
914
914
  const s = {
915
915
  isServer: true,
916
- async importSymbol(e, t, n) {
916
+ async importSymbol(t, e, n) {
917
917
  const r = sd(n);
918
918
  const s = globalThis.__qwik_reg_symbols?.get(r);
919
919
  if (s) {
@@ -925,24 +925,24 @@ function pi(e, t) {
925
925
  console.error("server can not rerender");
926
926
  return Promise.resolve();
927
927
  },
928
- chunkForSymbol(e, t, s) {
929
- return r(e, n, s);
928
+ chunkForSymbol(t, e, s) {
929
+ return r(t, n, s);
930
930
  }
931
931
  };
932
932
  return s;
933
933
  }
934
934
 
935
- async function setServerPlatform(e, t) {
936
- const n = pi(e, t);
935
+ async function setServerPlatform(t, e) {
936
+ const n = pi(t, e);
937
937
  mi(n);
938
938
  }
939
939
 
940
- var sd = e => {
941
- const t = e.lastIndexOf("_");
942
- if (t > -1) {
943
- return e.slice(t + 1);
940
+ var sd = t => {
941
+ const e = t.lastIndexOf("_");
942
+ if (e > -1) {
943
+ return t.slice(e + 1);
944
944
  }
945
- return e;
945
+ return t;
946
946
  };
947
947
 
948
948
  // packages/qwik/src/server/ssr-render.ts
@@ -956,7 +956,7 @@ import { _SubscriptionData as Gs, _SharedContainer as Cc, _jsxSorted as fo, _jsx
956
956
  // packages/qwik/src/server/ooos-utils.ts
957
957
  import { _SubscriptionPatch as Ku } from "@qwik.dev/core/internal";
958
958
 
959
- var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
959
+ var recordExternalRootEffect = (t, e, n, r, s, i, o, a) => {
960
960
  if (!r || o !== null && !a) {
961
961
  return;
962
962
  }
@@ -964,11 +964,11 @@ var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
964
964
  if (o !== null && s && (typeof s === "object" || typeof s === "function")) {
965
965
  l = n.get(s) || s;
966
966
  }
967
- const c = e.Ne(l);
968
- t.Rt(l);
969
- t.Rt(i);
967
+ const c = t.Ne(l);
968
+ e.Rt(l);
969
+ e.Rt(i);
970
970
  if (o !== null && typeof o !== "string") {
971
- t.Rt(o);
971
+ e.Rt(o);
972
972
  }
973
973
  r.push({
974
974
  rootObj: l,
@@ -978,15 +978,15 @@ var recordExternalRootEffect = (e, t, n, r, s, i, o, a) => {
978
978
  });
979
979
  };
980
980
 
981
- var collectSubscriptionPatches = (e, t, n) => {
982
- if (!t?.length) {
981
+ var collectSubscriptionPatches = (t, e, n) => {
982
+ if (!e?.length) {
983
983
  return;
984
984
  }
985
985
  const r = [];
986
986
  const s = /* @__PURE__ */ new Map;
987
- for (let i = 0; i < t.length; i++) {
988
- const o = t[i];
989
- const a = o.rootId === void 0 ? e.Ne(o.rootObj) : o.rootId;
987
+ for (let i = 0; i < e.length; i++) {
988
+ const o = e[i];
989
+ const a = o.rootId === void 0 ? t.Ne(o.rootObj) : o.rootId;
990
990
  if (a === void 0 || a >= n) {
991
991
  continue;
992
992
  }
@@ -1003,12 +1003,12 @@ var collectSubscriptionPatches = (e, t, n) => {
1003
1003
  }
1004
1004
  } else {
1005
1005
  if (c instanceof Map) {
1006
- let e = c.get(o.prop);
1007
- if (!e) {
1008
- e = /* @__PURE__ */ new Set;
1009
- c.set(o.prop, e);
1006
+ let t = c.get(o.prop);
1007
+ if (!t) {
1008
+ t = /* @__PURE__ */ new Set;
1009
+ c.set(o.prop, t);
1010
1010
  }
1011
- e.add(o.effect);
1011
+ t.add(o.effect);
1012
1012
  }
1013
1013
  }
1014
1014
  }
@@ -1018,46 +1018,46 @@ var collectSubscriptionPatches = (e, t, n) => {
1018
1018
  // packages/qwik/src/server/preload-impl.ts
1019
1019
  import { getPlatform as wi } from "@qwik.dev/core";
1020
1020
 
1021
- var simplifyPath = (e, t) => {
1022
- if (t == null) {
1021
+ var simplifyPath = (t, e) => {
1022
+ if (e == null) {
1023
1023
  return null;
1024
1024
  }
1025
- const n = `${e}${t}`.split("/");
1025
+ const n = `${t}${e}`.split("/");
1026
1026
  const r = [];
1027
- for (let e = 0; e < n.length; e++) {
1028
- const t = n[e];
1029
- if (t === ".." && r.length > 0) {
1027
+ for (let t = 0; t < n.length; t++) {
1028
+ const e = n[t];
1029
+ if (e === ".." && r.length > 0) {
1030
1030
  r.pop();
1031
1031
  } else {
1032
- r.push(t);
1032
+ r.push(e);
1033
1033
  }
1034
1034
  }
1035
1035
  return r.join("/");
1036
1036
  };
1037
1037
 
1038
- var getBase = e => {
1039
- let t = e.De;
1038
+ var getBase = t => {
1039
+ let e = t.De;
1040
1040
  if (import.meta.env?.DEV && !qTest) {
1041
- t = import.meta.env?.BASE_URL;
1041
+ e = import.meta.env?.BASE_URL;
1042
1042
  }
1043
- return t;
1043
+ return e;
1044
1044
  };
1045
1045
 
1046
- var preloaderPre = (e, t, n) => {
1047
- const {resolvedManifest: r} = e;
1048
- const s = getBase(e);
1046
+ var preloaderPre = (t, e, n) => {
1047
+ const {resolvedManifest: r} = t;
1048
+ const s = getBase(t);
1049
1049
  const i = simplifyPath(s, r?.manifest?.preloader);
1050
1050
  let o = r?.manifest.bundleGraphAsset;
1051
1051
  if (o) {
1052
1052
  o = (import.meta.env?.BASE_URL || "/") + o;
1053
1053
  }
1054
- if (!(import.meta.env?.DEV && !qTest) && i && o && t !== false) {
1055
- const r = e.resolvedManifest?.manifest.bundleGraph;
1054
+ if (!(import.meta.env?.DEV && !qTest) && i && o && e !== false) {
1055
+ const r = t.resolvedManifest?.manifest.bundleGraph;
1056
1056
  initPreloader(r);
1057
1057
  const a = [];
1058
- if (t) {
1059
- if (t.maxIdlePreloads) {
1060
- a.push(`P:${t.maxIdlePreloads}`);
1058
+ if (e) {
1059
+ if (e.maxIdlePreloads) {
1060
+ a.push(`P:${e.maxIdlePreloads}`);
1061
1061
  }
1062
1062
  }
1063
1063
  const l = a.length ? `,{${a.join(",")}}` : "";
@@ -1068,15 +1068,15 @@ var preloaderPre = (e, t, n) => {
1068
1068
  if (n) {
1069
1069
  c["nonce"] = n;
1070
1070
  }
1071
- e.openElement("link", null, c, null, null, null);
1072
- e.closeElement();
1073
- e.openElement("link", null, {
1071
+ t.openElement("link", null, c, null, null, null);
1072
+ t.closeElement();
1073
+ t.openElement("link", null, {
1074
1074
  rel: "preload",
1075
1075
  href: o,
1076
1076
  as: "fetch",
1077
1077
  crossorigin: "anonymous"
1078
1078
  }, null, null, null);
1079
- e.closeElement();
1079
+ t.closeElement();
1080
1080
  const u = `let b=fetch("${o}");import("${i}").then(({l})=>l(${JSON.stringify(s)},b${l}));`;
1081
1081
  const h = {
1082
1082
  type: "module",
@@ -1086,37 +1086,37 @@ var preloaderPre = (e, t, n) => {
1086
1086
  if (n) {
1087
1087
  h["nonce"] = n;
1088
1088
  }
1089
- e.writeScript(h, u);
1089
+ t.writeScript(h, u);
1090
1090
  }
1091
1091
  const a = simplifyPath(s, r?.manifest.core);
1092
1092
  if (a) {
1093
- const t = {
1093
+ const e = {
1094
1094
  rel: "modulepreload",
1095
1095
  href: a
1096
1096
  };
1097
1097
  if (n) {
1098
- t["nonce"] = n;
1098
+ e["nonce"] = n;
1099
1099
  }
1100
- e.openElement("link", null, t, null, null, null);
1101
- e.closeElement();
1100
+ t.openElement("link", null, e, null, null, null);
1101
+ t.closeElement();
1102
1102
  }
1103
1103
  };
1104
1104
 
1105
- var includePreloader = (e, t, n, r) => {
1106
- if (n.length === 0 || t === false) {
1105
+ var includePreloader = (t, e, n, r) => {
1106
+ if (n.length === 0 || e === false) {
1107
1107
  return null;
1108
1108
  }
1109
- const {ssrPreloads: s} = normalizePreLoaderOptions(typeof t === "boolean" ? void 0 : t);
1109
+ const {ssrPreloads: s} = normalizePreLoaderOptions(typeof e === "boolean" ? void 0 : e);
1110
1110
  let i = s;
1111
- const o = getBase(e);
1111
+ const o = getBase(t);
1112
1112
  const a = [];
1113
- const {resolvedManifest: l} = e;
1113
+ const {resolvedManifest: l} = t;
1114
1114
  if (i) {
1115
- const e = l?.manifest.preloader;
1116
- const t = l?.manifest.core;
1115
+ const t = l?.manifest.preloader;
1116
+ const e = l?.manifest.core;
1117
1117
  for (let r = 0; r < n.length; r++) {
1118
1118
  const s = n[r];
1119
- if (s === e || s === t) {
1119
+ if (s === t || s === e) {
1120
1120
  continue;
1121
1121
  }
1122
1122
  a.push(s);
@@ -1137,43 +1137,43 @@ var includePreloader = (e, t, n, r) => {
1137
1137
  h += `window.addEventListener('load',f=>{f=_=>import("${c}").then(({p})=>p(${JSON.stringify(n)}));try{requestIdleCallback(f,{timeout:2000})}catch(e){setTimeout(f,200)}})`;
1138
1138
  }
1139
1139
  if (h) {
1140
- const t = {
1140
+ const e = {
1141
1141
  type: "module",
1142
1142
  async: "true",
1143
1143
  "q:type": "preload"
1144
1144
  };
1145
1145
  if (r) {
1146
- t["nonce"] = r;
1146
+ e["nonce"] = r;
1147
1147
  }
1148
- e.writeScript(t, h);
1148
+ t.writeScript(e, h);
1149
1149
  }
1150
1150
  return null;
1151
1151
  };
1152
1152
 
1153
- var preloaderPost = (e, t, n) => {
1153
+ var preloaderPost = (t, e, n) => {
1154
1154
  if (import.meta.env?.DEV && !qTest) {
1155
1155
  return;
1156
1156
  }
1157
- if (t.preloader !== false) {
1158
- const r = Array.from(e.serializationCtx.It);
1157
+ if (e.preloader !== false) {
1158
+ const r = Array.from(t.serializationCtx.It);
1159
1159
  const s = getBundles(r);
1160
- includePreloader(e, t.preloader, s, n);
1160
+ includePreloader(t, e.preloader, s, n);
1161
1161
  }
1162
1162
  };
1163
1163
 
1164
- function normalizePreLoaderOptions(e) {
1164
+ function normalizePreLoaderOptions(t) {
1165
1165
  return {
1166
1166
  ...preLoaderOptionsDefault,
1167
- ...e
1167
+ ...t
1168
1168
  };
1169
1169
  }
1170
1170
 
1171
- var getBundles = e => {
1172
- const t = wi();
1173
- const n = e?.map(e => {
1174
- const n = e.gt;
1175
- const r = e.St;
1176
- const s = t.chunkForSymbol(n, r, e.dev?.file);
1171
+ var getBundles = t => {
1172
+ const e = wi();
1173
+ const n = t?.map(t => {
1174
+ const n = t.gt;
1175
+ const r = t.St;
1176
+ const s = e.chunkForSymbol(n, r, t.dev?.file);
1177
1177
  if (s) {
1178
1178
  return s[1];
1179
1179
  }
@@ -1188,40 +1188,40 @@ var preLoaderOptionsDefault = {
1188
1188
  };
1189
1189
 
1190
1190
  // packages/qwik/src/server/scripts.ts
1191
- var QWIK_LOADER_DEFAULT_MINIFIED = 'const e=document,t=window,n="w",r="wp",o="d",s="dp",i="e",a="ep",c="capture:",l="readystatechange",p=0,u=new Set,d=new Set([e]),f=new Map,h={};let q,b,g;const m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return d.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},S=e=>{if(e.length){const t=()=>E(e);g=g?g.then(t,t):t()}},C=t=>{if(void 0===t._qwikjson_){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){t._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},_=e=>{h[e]=1,I(l)},k=t=>{const n=t.getAttribute("q:instance");return"paused"===t.getAttribute("q:container")&&"loading"===e.readyState&&!h[n]&&new Promise(t=>{w(e,l,()=>{("loading"!==e.readyState||h[n])&&t()})})},$=(e,t)=>new CustomEvent(e,{detail:t}),I=(t,n)=>{e.dispatchEvent($(t,n))},N=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),R=e=>e.replace(/-./g,e=>e[1].toUpperCase()),T=e=>{const t=e.indexOf(":");return{scope:e.slice(0,t),eventName:R(e.slice(t+1))}},x=e=>2===e.length,B=e=>e.charAt(0),L=e=>!!e&&1===e.nodeType,U=(e,t,n)=>e.hasAttribute(n)&&(!!e._qDispatch?.[t]||e.hasAttribute("q-"+t)),j=(t,n,r,o,s,i,a,c=!0)=>{const l={qBase:r,symbol:i,element:n,reqTime:a};if(!s){const n=(e["qFuncs_"+t.getAttribute("q:instance")]||[])[+i];if(!n&&c){const e=Error("sym:"+i);I("qerror",{importError:"sync",error:e,...l}),console.error(e)}return n}const p=`${i}|${r}|${s}`,u=f.get(p);if(u)return u;const d=new URL(s,o).href,h=import(d);return C(t),h.then(e=>{const t=e[i];if(t)f.set(p,t),I("qsymbol",l);else{const e=Error(`${i} not in ${d}`);I("qerror",{importError:"no-symbol",error:e,...l}),console.error(e)}return t},e=>{I("qerror",{importError:"async",error:e,...l}),console.error(e)})},D=(t,n,r,o,s,i=!0)=>{let a=!1;s&&(i&&t.hasAttribute("preventdefault:"+s)&&n.preventDefault(),t.hasAttribute("stoppropagation:"+s)&&n.stopPropagation());const c=t._qDispatch?.[r];if(c){if("function"==typeof c){const e=()=>c(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}else if(c.length)for(let e=0;e<c.length;e++){const r=c[e];if(r){const e=()=>r(n,t);if(a)o.push(async()=>{const t=e();A(t)&&await t});else{const t=e();A(t)&&(a=!0,o.push(()=>t))}}}return}const l=t.getAttribute("q-"+r);if(l){const r=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=r.getAttribute("q:base"),i=new URL(s,e.baseURI),c=l.split("|"),p=k(r);for(let e=0;e<c.length;e++){const l=c[e],u=performance.now(),[d,f,h]=l.split("#"),q=e=>{if(e&&t.isConnected){const r=e=>{I("qerror",{error:e,qBase:s,symbol:f,element:t,reqTime:u})};try{const o=e.call(h,n,t);if(A(o))return o.catch(r)}catch(e){return r(e)}}},b=(e=!0)=>j(r,t,s,i,d,f,u,e),g=p?void 0:b();if(p)a=!0,o.push(async()=>{await p,await q(await b(!1)||await b())});else if(A(g))a=!0,o.push(()=>g.then(q));else if(a)a=!0,o.push(async()=>{await q(g||await b())});else{const e=q(g);A(e)&&(a=!0,o.push(()=>e))}}}},O=(e,t=i,n=!0)=>{const r=N(e.type),o=t+":"+r,s=c+r,a=[],l=[],p=[];let u=e.target;for(;u;)L(u)?(a.push(u),l.push(U(u,o,s)),u=u.parentElement):u=u.parentElement;for(let t=a.length-1;t>=0;t--)if(l[t]&&(D(a[t],e,o,p,r,n),e.cancelBubble))return void S(p);for(let t=0;t<a.length;t++)if(!l[t]&&(D(a[t],e,o,p,r,n),!e.bubbles||e.cancelBubble))return void S(p);S(p)},P=e=>O(e,a,!1),F=(e,t,n=!0)=>{const r=N(t.type),o=e+":"+r,s=v("[q-"+CSS.escape(o)+"]"),i=[];for(let e=0;e<s.length;e++){const a=s[e];D(a,t,o,i,r,n)}S(i)},J=e=>{F(o,e)},M=e=>{F(s,e,!1)},Z=e=>{F(n,e)},z=e=>{F(r,e,!1)},G=()=>{const n=e.readyState;if("interactive"==n||"complete"==n){if(b=1,d.forEach(y),u.has("d:qinit")){u.delete("d:qinit");const e=$("qinit"),t=v("[q-d\\\\:qinit]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qinit",n),o.removeAttribute("q-d:qinit")}S(n)}if(u.has("d:qidle")&&(u.delete("d:qidle"),(t.requestIdleCallback??t.setTimeout).bind(t)(()=>{const e=$("qidle"),t=v("[q-d\\\\:qidle]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qidle",n),o.removeAttribute("q-d:qidle")}S(n)})),u.has("e:qvisible")){q||(q=new IntersectionObserver(e=>{const t=[];for(let n=0;n<e.length;n++){const r=e[n];r.isIntersecting&&(q.unobserve(r.target),D(r.target,$("qvisible",r),"e:qvisible",t))}S(t)}));const e=v("[q-e\\\\:qvisible]:not([q\\\\:observed])");for(let t=0;t<e.length;t++){const n=e[t];q.observe(n),n.setAttribute("q:observed","true")}}}},H=(...e)=>{for(let r=0;r<e.length;r++){const s=e[r];if(0===s)_(e[++r]);else if("string"==typeof s){if(!u.has(s)){u.add(s);const{scope:e,eventName:r}=T(s),i=x(e),a=B(e);a===n?w(t,r,i?z:Z,!0,i):d.forEach(e=>w(e,r,a===o?i?M:J:i?P:O,!0,i)),1!==b||"e:qvisible"!==s&&"d:qinit"!==s&&"d:qidle"!==s||G()}}else d.has(s)||(u.forEach(e=>{const{scope:t,eventName:r}=T(e),i=x(t),a=B(t);a!==n&&w(s,r,a===o?i?M:J:i?P:O,!0,i)}),d.add(s))}},K=t._qwikEv;K?.roots||(Array.isArray(K)?H(...K):H("e:click","e:input"),t._qwikEv={events:u,roots:d,push:H},w(e,l,G),G())';
1191
+ var QWIK_LOADER_DEFAULT_MINIFIED = 'var e,t,n,r=document,o=window,s="w",i="wp",a="d",c="dp",l="e",p="ep",u="capture:",d="readystatechange",f=0,h=new Set,q=new Set([r]),b=new Map,g={},m=(e,t)=>Array.from(e.querySelectorAll(t)),v=e=>{const t=[];return q.forEach(n=>t.push(...m(n,e))),t},w=(e,t,n,r=!1,o=!1)=>e.addEventListener(t,n,{capture:r,passive:o}),y=e=>{H(e);const t=m(e,"[q\\\\:shadowroot]");for(let e=0;e<t.length;e++){const n=t[e].shadowRoot;n&&y(n)}},A=e=>e&&"function"==typeof e.then,E=async e=>{for(let t=0;t<e.length;t++)await e[t]()},S=e=>{if(e.length){const t=()=>E(e);n=n?n.then(t,t):t()}},C=e=>{if(void 0===e._qwikjson_){let t=(e===r.documentElement?r.body:e).lastElementChild;for(;t;){if("SCRIPT"===t.tagName&&"qwik/json"===t.getAttribute("type")){e._qwikjson_=JSON.parse(t.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}t=t.previousElementSibling}}},_=e=>{g[e]=1,I(d)},k=e=>{const t=e.getAttribute("q:instance");return"paused"===e.getAttribute("q:container")&&"loading"===r.readyState&&!g[t]&&new Promise(e=>{w(r,d,()=>{("loading"!==r.readyState||g[t])&&e()})})},$=(e,t)=>new CustomEvent(e,{detail:t}),I=(e,t)=>{r.dispatchEvent($(e,t))},N=e=>e.replace(/([A-Z-])/g,e=>"-"+e.toLowerCase()),R=e=>e.replace(/-./g,e=>e[1].toUpperCase()),T=e=>{const t=e.indexOf(":");return{scope:e.slice(0,t),eventName:R(e.slice(t+1))}},x=e=>2===e.length,B=e=>e.charAt(0),L=e=>!!e&&1===e.nodeType,U=(e,t,n)=>e.hasAttribute(n)&&(!!e._qDispatch?.[t]||e.hasAttribute("q-"+t)),j=(e,t,n,o,s,i,a,c=!0)=>{const l={qBase:n,symbol:i,element:t,reqTime:a};if(!s){const t=(r["qFuncs_"+e.getAttribute("q:instance")]||[])[+i];if(!t&&c){const e=Error("sym:"+i);I("qerror",{importError:"sync",error:e,...l}),console.error(e)}return t}const p=`${i}|${n}|${s}`,u=b.get(p);if(u)return u;const d=new URL(s,o).href,f=import(d);return C(e),f.then(e=>{const t=e[i];if(t)b.set(p,t),I("qsymbol",l);else{const e=Error(`${i} not in ${d}`);I("qerror",{importError:"no-symbol",error:e,...l}),console.error(e)}return t},e=>{I("qerror",{importError:"async",error:e,...l}),console.error(e)})},D=(e,t,n,o,s,i=!0)=>{let a=!1;s&&(i&&e.hasAttribute("preventdefault:"+s)&&t.preventDefault(),e.hasAttribute("stoppropagation:"+s)&&t.stopPropagation());const c=e._qDispatch?.[n];if(c){if("function"==typeof c){const n=()=>c(t,e);if(a)o.push(async()=>{const e=n();A(e)&&await e});else{const e=n();A(e)&&(a=!0,o.push(()=>e))}}else if(c.length)for(let n=0;n<c.length;n++){const r=c[n];if(r){const n=()=>r(t,e);if(a)o.push(async()=>{const e=n();A(e)&&await e});else{const e=n();A(e)&&(a=!0,o.push(()=>e))}}}return}const l=e.getAttribute("q-"+n);if(l){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),s=n.getAttribute("q:base"),i=new URL(s,r.baseURI),c=l.split("|"),p=k(n);for(let r=0;r<c.length;r++){const l=c[r],u=performance.now(),[d,f,h]=l.split("#"),q=n=>{if(n&&e.isConnected){const r=t=>{I("qerror",{error:t,qBase:s,symbol:f,element:e,reqTime:u})};try{const o=n.call(h,t,e);if(A(o))return o.catch(r)}catch(e){return r(e)}}},b=(t=!0)=>j(n,e,s,i,d,f,u,t),g=p?void 0:b();if(p)a=!0,o.push(async()=>{await p,await q(await b(!1)||await b())});else if(A(g))a=!0,o.push(()=>g.then(q));else if(a)a=!0,o.push(async()=>{await q(g||await b())});else{const e=q(g);A(e)&&(a=!0,o.push(()=>e))}}}},O=(e,t=l,n=!0)=>{const r=N(e.type),o=t+":"+r,s=u+r,i=[],a=[],c=[];let p=e.target;for(;p;)L(p)?(i.push(p),a.push(U(p,o,s)),p=p.parentElement):p=p.parentElement;for(let t=i.length-1;t>=0;t--)if(a[t]&&(D(i[t],e,o,c,r,n),e.cancelBubble))return void S(c);for(let t=0;t<i.length;t++)if(!a[t]&&(D(i[t],e,o,c,r,n),!e.bubbles||e.cancelBubble))return void S(c);S(c)},P=e=>O(e,p,!1),F=(e,t,n=!0)=>{const r=N(t.type),o=e+":"+r,s=v("[q-"+CSS.escape(o)+"]"),i=[];for(let e=0;e<s.length;e++){const a=s[e];D(a,t,o,i,r,n)}S(i)},J=e=>{F(a,e)},M=e=>{F(c,e,!1)},Z=e=>{F(s,e)},z=e=>{F(i,e,!1)},G=()=>{const n=r.readyState;if("interactive"==n||"complete"==n){if(t=1,q.forEach(y),h.has("d:qinit")){h.delete("d:qinit");const e=$("qinit"),t=v("[q-d\\\\:qinit]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qinit",n),o.removeAttribute("q-d:qinit")}S(n)}if(h.has("d:qidle")&&(h.delete("d:qidle"),(o.requestIdleCallback??o.setTimeout).bind(o)(()=>{const e=$("qidle"),t=v("[q-d\\\\:qidle]"),n=[];for(let r=0;r<t.length;r++){const o=t[r];D(o,e,"d:qidle",n),o.removeAttribute("q-d:qidle")}S(n)})),h.has("e:qvisible")){e||(e=new IntersectionObserver(t=>{const n=[];for(let r=0;r<t.length;r++){const o=t[r];o.isIntersecting&&(e.unobserve(o.target),D(o.target,$("qvisible",o),"e:qvisible",n))}S(n)}));const t=v("[q-e\\\\:qvisible]:not([q\\\\:observed])");for(let n=0;n<t.length;n++){const r=t[n];e.observe(r),r.setAttribute("q:observed","true")}}}},H=(...e)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r===f)_(e[++n]);else if("string"==typeof r){if(!h.has(r)){h.add(r);const{scope:e,eventName:n}=T(r),i=x(e),c=B(e);c===s?w(o,n,i?z:Z,!0,i):q.forEach(e=>w(e,n,c===a?i?M:J:i?P:O,!0,i)),1!==t||"e:qvisible"!==r&&"d:qinit"!==r&&"d:qidle"!==r||G()}}else q.has(r)||(h.forEach(e=>{const{scope:t,eventName:n}=T(e),o=x(t),i=B(t);i!==s&&w(r,n,i===a?o?M:J:o?P:O,!0,o)}),q.add(r))}},K=o._qwikEv;K?.roots||(Array.isArray(K)?H(...K):H("e:click","e:input"),o._qwikEv={events:h,roots:q,push:H},w(r,d,G),G())';
1192
1192
 
1193
- var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst windowPrefix = "w";\nconst passiveWindowPrefix = "wp";\nconst documentPrefix = "d";\nconst passiveDocumentPrefix = "dp";\nconst elementPrefix = "e";\nconst passiveElementPrefix = "ep";\nconst capturePrefix = "capture:";\nconst readyStateChange = "readystatechange";\nconst QwikEvContainerReady = 0;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nconst symbols = /* @__PURE__ */ new Map();\nconst readyContainers = {};\nlet observer;\nlet hasInitialized;\nlet queuedTasks;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst addEventListener = (el, eventName, handler, capture = false, passive = false) => el.addEventListener(eventName, handler, { capture, passive });\nconst findShadowRoots = (fragment) => {\n addEventOrRoot(fragment);\n const shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n for (let i = 0; i < shadowRoots.length; i++) {\n const parent = shadowRoots[i];\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst runTasks = async (tasks) => {\n for (let i = 0; i < tasks.length; i++) {\n await tasks[i]();\n }\n};\nconst queueTasks = (tasks) => {\n if (tasks.length) {\n const run = () => runTasks(tasks);\n queuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n }\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst markContainerReady = (hash) => {\n readyContainers[hash] = 1;\n emitEvent(readyStateChange);\n};\nconst waitForContainerReady = (container) => {\n const hash = container.getAttribute("q:instance");\n return container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n const ready = () => {\n if (doc.readyState !== "loading" || readyContainers[hash]) {\n resolve();\n }\n };\n addEventListener(doc, readyStateChange, ready);\n });\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nconst kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nconst parseKebabEvent = (event) => {\n const separatorIndex = event.indexOf(":");\n const scope = event.slice(0, separatorIndex);\n return {\n scope,\n eventName: kebabToCamel(event.slice(separatorIndex + 1))\n };\n};\nconst isPassiveScope = (scope) => scope.length === 2;\nconst getRootScope = (scope) => scope.charAt(0);\nconst isElementNode = (node) => !!node && node.nodeType === 1;\nconst isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nconst resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n const eventData = {\n qBase,\n symbol,\n element,\n reqTime\n };\n if (!chunk) {\n const handler2 = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n if (!handler2 && reportSyncError) {\n const error = new Error("sym:" + symbol);\n emitEvent("qerror", {\n importError: "sync",\n error,\n ...eventData\n });\n console.error(error);\n }\n return handler2;\n }\n const key = `${symbol}|${qBase}|${chunk}`;\n const handler = symbols.get(key);\n if (handler) {\n return handler;\n }\n const href = new URL(chunk, base).href;\n const module = import(\n href\n );\n resolveContainer(container);\n return module.then(\n (module2) => {\n const handler2 = module2[symbol];\n if (!handler2) {\n const error = new Error(`${symbol} not in ${href}`);\n emitEvent("qerror", {\n importError: "no-symbol",\n error,\n ...eventData\n });\n console.error(error);\n } else {\n symbols.set(key, handler2);\n emitEvent("qsymbol", eventData);\n }\n return handler2;\n },\n (error) => {\n emitEvent("qerror", {\n importError: "async",\n error,\n ...eventData\n });\n console.error(error);\n return void 0;\n }\n );\n};\nconst dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n let defer = false;\n if (kebabName) {\n if (allowPreventDefault && element.hasAttribute("preventdefault:" + kebabName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + kebabName)) {\n ev.stopPropagation();\n }\n }\n const handlers = element._qDispatch?.[scopedKebabName];\n if (handlers) {\n if (typeof handlers === "function") {\n const run = () => handlers(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n } else if (handlers.length) {\n for (let i = 0; i < handlers.length; i++) {\n const handler = handlers[i];\n if (handler) {\n const run = () => handler(ev, element);\n if (defer) {\n tasks.push(async () => {\n const result = run();\n if (isPromise(result)) {\n await result;\n }\n });\n } else {\n const result = run();\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n }\n return;\n }\n const attrValue = element.getAttribute("q-" + scopedKebabName);\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const base = new URL(qBase, doc.baseURI);\n const qrls = attrValue.split("|");\n const waitForReady = waitForContainerReady(container);\n for (let i = 0; i < qrls.length; i++) {\n const qrl = qrls[i];\n const reqTime = performance.now();\n const [chunk, symbol, capturedIds] = qrl.split("#");\n const run = (handler2) => {\n if (handler2 && element.isConnected) {\n const onError = (error) => {\n emitEvent("qerror", {\n error,\n qBase,\n symbol,\n element,\n reqTime\n });\n };\n try {\n const result = handler2.call(capturedIds, ev, element);\n if (isPromise(result)) {\n return result.catch(onError);\n }\n } catch (error) {\n return onError(error);\n }\n }\n };\n const resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n const handler = waitForReady ? void 0 : resolve();\n if (waitForReady) {\n defer = true;\n tasks.push(async () => {\n await waitForReady;\n await run(await resolve(false) || await resolve());\n });\n } else if (isPromise(handler)) {\n defer = true;\n tasks.push(() => handler.then(run));\n } else if (defer) {\n defer = true;\n tasks.push(async () => {\n await run(handler || await resolve());\n });\n } else {\n const result = run(handler);\n if (isPromise(result)) {\n defer = true;\n tasks.push(() => result);\n }\n }\n }\n }\n};\nconst processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const captureAttribute = capturePrefix + kebabName;\n const elements = [];\n const captureHandlers = [];\n const tasks = [];\n let current = ev.target;\n while (current) {\n if (isElementNode(current)) {\n elements.push(current);\n captureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n current = current.parentElement;\n } else {\n current = current.parentElement;\n }\n }\n for (let i = elements.length - 1; i >= 0; i--) {\n if (captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n for (let i = 0; i < elements.length; i++) {\n if (!captureHandlers[i]) {\n dispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n if (!ev.bubbles || ev.cancelBubble) {\n queueTasks(tasks);\n return;\n }\n }\n }\n queueTasks(tasks);\n};\nconst processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nconst broadcast = (scope, ev, allowPreventDefault = true) => {\n const kebabName = camelToKebab(ev.type);\n const scopedKebabName = scope + ":" + kebabName;\n const elements = querySelectorAll("[q-" + CSS.escape(scopedKebabName) + "]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n }\n queueTasks(tasks);\n};\nconst processDocumentEvent = (ev) => {\n broadcast(documentPrefix, ev);\n};\nconst processPassiveDocumentEvent = (ev) => {\n broadcast(passiveDocumentPrefix, ev, false);\n};\nconst processWindowEvent = (ev) => {\n broadcast(windowPrefix, ev);\n};\nconst processPassiveWindowEvent = (ev) => {\n broadcast(passiveWindowPrefix, ev, false);\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (readyState == "interactive" || readyState == "complete") {\n hasInitialized = 1;\n roots.forEach(findShadowRoots);\n if (events.has("d:qinit")) {\n events.delete("d:qinit");\n const ev = createEvent("qinit");\n const elements = querySelectorAll("[q-d\\\\:qinit]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qinit", tasks);\n el.removeAttribute("q-d:qinit");\n }\n queueTasks(tasks);\n }\n if (events.has("d:qidle")) {\n events.delete("d:qidle");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => {\n const ev = createEvent("qidle");\n const elements = querySelectorAll("[q-d\\\\:qidle]");\n const tasks = [];\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n dispatch(el, ev, "d:qidle", tasks);\n el.removeAttribute("q-d:qidle");\n }\n queueTasks(tasks);\n });\n }\n if (events.has("e:qvisible")) {\n observer || (observer = new IntersectionObserver((entries) => {\n const tasks = [];\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i];\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(\n entry.target,\n createEvent("qvisible", entry),\n "e:qvisible",\n tasks\n );\n }\n }\n queueTasks(tasks);\n }));\n const elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n observer.observe(el);\n el.setAttribute("q:observed", "true");\n }\n }\n }\n};\nconst addEventOrRoot = (...eventNames) => {\n for (let i = 0; i < eventNames.length; i++) {\n const eventNameOrRoot = eventNames[i];\n if (eventNameOrRoot === QwikEvContainerReady) {\n markContainerReady(eventNames[++i]);\n } else if (typeof eventNameOrRoot === "string") {\n if (!events.has(eventNameOrRoot)) {\n events.add(eventNameOrRoot);\n const { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope === windowPrefix) {\n addEventListener(\n win,\n eventName,\n passive ? processPassiveWindowEvent : processWindowEvent,\n true,\n passive\n );\n } else {\n roots.forEach(\n (root) => addEventListener(\n root,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n )\n );\n }\n if (hasInitialized === 1 && (eventNameOrRoot === "e:qvisible" || eventNameOrRoot === "d:qinit" || eventNameOrRoot === "d:qidle")) {\n processReadyStateChange();\n }\n }\n } else {\n if (!roots.has(eventNameOrRoot)) {\n events.forEach((kebabEventName) => {\n const { scope, eventName } = parseKebabEvent(kebabEventName);\n const passive = isPassiveScope(scope);\n const rootScope = getRootScope(scope);\n if (rootScope !== windowPrefix) {\n addEventListener(\n eventNameOrRoot,\n eventName,\n rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent,\n true,\n passive\n );\n }\n });\n roots.add(eventNameOrRoot);\n }\n }\n }\n};\nconst _qwikEv = win._qwikEv;\nif (!_qwikEv?.roots) {\n if (Array.isArray(_qwikEv)) {\n addEventOrRoot(..._qwikEv);\n } else {\n addEventOrRoot("e:click", "e:input");\n }\n win._qwikEv = {\n events,\n roots,\n push: addEventOrRoot\n };\n addEventListener(doc, readyStateChange, processReadyStateChange);\n processReadyStateChange();\n}';
1193
+ var QWIK_LOADER_DEFAULT_DEBUG = '//#region packages/qwik/src/qwikloader.ts\nvar doc = document;\nvar win = window;\nvar windowPrefix = "w";\nvar passiveWindowPrefix = "wp";\nvar documentPrefix = "d";\nvar passiveDocumentPrefix = "dp";\nvar elementPrefix = "e";\nvar passiveElementPrefix = "ep";\nvar capturePrefix = "capture:";\nvar readyStateChange = "readystatechange";\nvar QwikEvContainerReady = 0;\nvar events = /* @__PURE__ */ new Set();\nvar roots = /* @__PURE__ */ new Set([doc]);\nvar symbols = /* @__PURE__ */ new Map();\nvar readyContainers = {};\nvar observer;\nvar hasInitialized;\nvar queuedTasks;\nvar nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nvar querySelectorAll = (query) => {\n\tconst elements = [];\n\troots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n\treturn elements;\n};\nvar addEventListener = (el, eventName, handler, capture = false, passive = false) => el.addEventListener(eventName, handler, {\n\tcapture,\n\tpassive\n});\nvar findShadowRoots = (fragment) => {\n\taddEventOrRoot(fragment);\n\tconst shadowRoots = nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]");\n\tfor (let i = 0; i < shadowRoots.length; i++) {\n\t\tconst shadowRoot = shadowRoots[i].shadowRoot;\n\t\tshadowRoot && findShadowRoots(shadowRoot);\n\t}\n};\nvar isPromise = (promise) => promise && typeof promise.then === "function";\nvar runTasks = async (tasks) => {\n\tfor (let i = 0; i < tasks.length; i++) await tasks[i]();\n};\nvar queueTasks = (tasks) => {\n\tif (tasks.length) {\n\t\tconst run = () => runTasks(tasks);\n\t\tqueuedTasks = queuedTasks ? queuedTasks.then(run, run) : run();\n\t}\n};\nvar resolveContainer = (containerEl) => {\n\tif (containerEl._qwikjson_ === void 0) {\n\t\tlet script = (containerEl === doc.documentElement ? doc.body : containerEl).lastElementChild;\n\t\twhile (script) {\n\t\t\tif (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n\t\t\t\tcontainerEl._qwikjson_ = JSON.parse(script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1"));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tscript = script.previousElementSibling;\n\t\t}\n\t}\n};\nvar markContainerReady = (hash) => {\n\treadyContainers[hash] = 1;\n\temitEvent(readyStateChange);\n};\nvar waitForContainerReady = (container) => {\n\tconst hash = container.getAttribute("q:instance");\n\treturn container.getAttribute("q:container") === "paused" && doc.readyState === "loading" && !readyContainers[hash] && new Promise((resolve) => {\n\t\tconst ready = () => {\n\t\t\tif (doc.readyState !== "loading" || readyContainers[hash]) resolve();\n\t\t};\n\t\taddEventListener(doc, readyStateChange, ready);\n\t});\n};\nvar createEvent = (eventName, detail) => new CustomEvent(eventName, { detail });\nvar emitEvent = (eventName, detail) => {\n\tdoc.dispatchEvent(createEvent(eventName, detail));\n};\nvar camelToKebab = (str) => str.replace(/([A-Z-])/g, (a) => "-" + a.toLowerCase());\nvar kebabToCamel = (eventName) => eventName.replace(/-./g, (a) => a[1].toUpperCase());\nvar parseKebabEvent = (event) => {\n\tconst separatorIndex = event.indexOf(":");\n\treturn {\n\t\tscope: event.slice(0, separatorIndex),\n\t\teventName: kebabToCamel(event.slice(separatorIndex + 1))\n\t};\n};\nvar isPassiveScope = (scope) => scope.length === 2;\nvar getRootScope = (scope) => scope.charAt(0);\nvar isElementNode = (node) => !!node && node.nodeType === 1;\nvar isCaptureHandlerElement = (element, scopedKebabName, captureAttribute) => element.hasAttribute(captureAttribute) && (!!element._qDispatch?.[scopedKebabName] || element.hasAttribute("q-" + scopedKebabName));\nvar resolveHandler = (container, element, qBase, base, chunk, symbol, reqTime, reportSyncError = true) => {\n\tconst eventData = {\n\t\tqBase,\n\t\tsymbol,\n\t\telement,\n\t\treqTime\n\t};\n\tif (!chunk) {\n\t\tconst handler = (doc["qFuncs_" + container.getAttribute("q:instance")] || [])[+symbol];\n\t\tif (!handler && reportSyncError) {\n\t\t\tconst error = /* @__PURE__ */ new Error("sym:" + symbol);\n\t\t\temitEvent("qerror", {\n\t\t\t\timportError: "sync",\n\t\t\t\terror,\n\t\t\t\t...eventData\n\t\t\t});\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn handler;\n\t}\n\tconst key = `${symbol}|${qBase}|${chunk}`;\n\tconst handler = symbols.get(key);\n\tif (handler) return handler;\n\tconst href = new URL(chunk, base).href;\n\tconst module = import(\n\t\t\t\thref\n);\n\tresolveContainer(container);\n\treturn module.then((module) => {\n\t\tconst handler = module[symbol];\n\t\tif (!handler) {\n\t\t\tconst error = /* @__PURE__ */ new Error(`${symbol} not in ${href}`);\n\t\t\temitEvent("qerror", {\n\t\t\t\timportError: "no-symbol",\n\t\t\t\terror,\n\t\t\t\t...eventData\n\t\t\t});\n\t\t\tconsole.error(error);\n\t\t} else {\n\t\t\tsymbols.set(key, handler);\n\t\t\temitEvent("qsymbol", eventData);\n\t\t}\n\t\treturn handler;\n\t}, (error) => {\n\t\temitEvent("qerror", {\n\t\t\timportError: "async",\n\t\t\terror,\n\t\t\t...eventData\n\t\t});\n\t\tconsole.error(error);\n\t});\n};\n/**\n* Dispatch an event by invoking QRL handlers. If there are multiple handlers, they are awaited in\n* order.\n*/\nvar dispatch = (element, ev, scopedKebabName, tasks, kebabName, allowPreventDefault = true) => {\n\tlet defer = false;\n\tif (kebabName) {\n\t\tif (allowPreventDefault && element.hasAttribute("preventdefault:" + kebabName)) ev.preventDefault();\n\t\tif (element.hasAttribute("stoppropagation:" + kebabName)) ev.stopPropagation();\n\t}\n\tconst handlers = element._qDispatch?.[scopedKebabName];\n\tif (handlers) {\n\t\tif (typeof handlers === "function") {\n\t\t\tconst run = () => handlers(ev, element);\n\t\t\tif (defer) tasks.push(async () => {\n\t\t\t\tconst result = run();\n\t\t\t\tif (isPromise(result)) await result;\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst result = run();\n\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\tdefer = true;\n\t\t\t\t\ttasks.push(() => result);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (handlers.length) for (let i = 0; i < handlers.length; i++) {\n\t\t\tconst handler = handlers[i];\n\t\t\tif (handler) {\n\t\t\t\tconst run = () => handler(ev, element);\n\t\t\t\tif (defer) tasks.push(async () => {\n\t\t\t\t\tconst result = run();\n\t\t\t\t\tif (isPromise(result)) await result;\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tconst result = run();\n\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\tdefer = true;\n\t\t\t\t\t\ttasks.push(() => result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\tconst attrValue = element.getAttribute("q-" + scopedKebabName);\n\tif (attrValue) {\n\t\tconst container = element.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n\t\tconst qBase = container.getAttribute("q:base");\n\t\tconst base = new URL(qBase, doc.baseURI);\n\t\tconst qrls = attrValue.split("|");\n\t\tconst waitForReady = waitForContainerReady(container);\n\t\tfor (let i = 0; i < qrls.length; i++) {\n\t\t\tconst qrl = qrls[i];\n\t\t\tconst reqTime = performance.now();\n\t\t\tconst [chunk, symbol, capturedIds] = qrl.split("#");\n\t\t\tconst run = (handler) => {\n\t\t\t\tif (handler && element.isConnected) {\n\t\t\t\t\tconst onError = (error) => {\n\t\t\t\t\t\temitEvent("qerror", {\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tqBase,\n\t\t\t\t\t\t\tsymbol,\n\t\t\t\t\t\t\telement,\n\t\t\t\t\t\t\treqTime\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = handler.call(capturedIds, ev, element);\n\t\t\t\t\t\tif (isPromise(result)) return result.catch(onError);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treturn onError(error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst resolve = (reportSyncError = true) => resolveHandler(container, element, qBase, base, chunk, symbol, reqTime, reportSyncError);\n\t\t\tconst handler = waitForReady ? void 0 : resolve();\n\t\t\tif (waitForReady) {\n\t\t\t\tdefer = true;\n\t\t\t\ttasks.push(async () => {\n\t\t\t\t\tawait waitForReady;\n\t\t\t\t\tawait run(await resolve(false) || await resolve());\n\t\t\t\t});\n\t\t\t} else if (isPromise(handler)) {\n\t\t\t\tdefer = true;\n\t\t\t\ttasks.push(() => handler.then(run));\n\t\t\t} else if (defer) {\n\t\t\t\tdefer = true;\n\t\t\t\ttasks.push(async () => {\n\t\t\t\t\tawait run(handler || await resolve());\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst result = run(handler);\n\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\tdefer = true;\n\t\t\t\t\ttasks.push(() => result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n/**\n* Event handler responsible for processing element events.\n*\n* If browser emits an event, the `eventProcessor` walks the DOM tree looking for corresponding\n* `(${event.type})`. If found the event\'s URL is parsed and `import()`ed.\n*\n* @param ev - Browser event.\n*/\nvar processElementEvent = (ev, scope = elementPrefix, allowPreventDefault = true) => {\n\tconst kebabName = camelToKebab(ev.type);\n\tconst scopedKebabName = scope + ":" + kebabName;\n\tconst captureAttribute = capturePrefix + kebabName;\n\tconst elements = [];\n\tconst captureHandlers = [];\n\tconst tasks = [];\n\tlet current = ev.target;\n\twhile (current) if (isElementNode(current)) {\n\t\telements.push(current);\n\t\tcaptureHandlers.push(isCaptureHandlerElement(current, scopedKebabName, captureAttribute));\n\t\tcurrent = current.parentElement;\n\t} else current = current.parentElement;\n\tfor (let i = elements.length - 1; i >= 0; i--) if (captureHandlers[i]) {\n\t\tdispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n\t\tif (ev.cancelBubble) {\n\t\t\tqueueTasks(tasks);\n\t\t\treturn;\n\t\t}\n\t}\n\tfor (let i = 0; i < elements.length; i++) if (!captureHandlers[i]) {\n\t\tdispatch(elements[i], ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n\t\tif (!ev.bubbles || ev.cancelBubble) {\n\t\t\tqueueTasks(tasks);\n\t\t\treturn;\n\t\t}\n\t}\n\tqueueTasks(tasks);\n};\nvar processPassiveElementEvent = (ev) => processElementEvent(ev, passiveElementPrefix, false);\nvar broadcast = (scope, ev, allowPreventDefault = true) => {\n\tconst kebabName = camelToKebab(ev.type);\n\tconst scopedKebabName = scope + ":" + kebabName;\n\tconst elements = querySelectorAll("[q-" + CSS.escape(scopedKebabName) + "]");\n\tconst tasks = [];\n\tfor (let i = 0; i < elements.length; i++) {\n\t\tconst el = elements[i];\n\t\tdispatch(el, ev, scopedKebabName, tasks, kebabName, allowPreventDefault);\n\t}\n\tqueueTasks(tasks);\n};\n/**\n* Event handler responsible for processing browser events.\n*\n* If browser emits an event, the `eventProcessor` walks the DOM tree looking for corresponding\n* `(${event.type})`. If found the event\'s URL is parsed and `import()`ed.\n*\n* @param ev - Browser event.\n*/\nvar processDocumentEvent = (ev) => {\n\tbroadcast(documentPrefix, ev);\n};\nvar processPassiveDocumentEvent = (ev) => {\n\tbroadcast(passiveDocumentPrefix, ev, false);\n};\nvar processWindowEvent = (ev) => {\n\tbroadcast(windowPrefix, ev);\n};\nvar processPassiveWindowEvent = (ev) => {\n\tbroadcast(passiveWindowPrefix, ev, false);\n};\n/**\n* Called when the document is ready and whenever a container is added, so make this idempotent. For\n* qidle and qinit we remove the attributes immediately, and for qvisible we add an attribute\n*/\nvar processReadyStateChange = () => {\n\tconst readyState = doc.readyState;\n\tif (readyState == "interactive" || readyState == "complete") {\n\t\thasInitialized = 1;\n\t\troots.forEach(findShadowRoots);\n\t\tif (events.has("d:qinit")) {\n\t\t\tevents.delete("d:qinit");\n\t\t\tconst ev = createEvent("qinit");\n\t\t\tconst elements = querySelectorAll("[q-d\\\\:qinit]");\n\t\t\tconst tasks = [];\n\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\tconst el = elements[i];\n\t\t\t\tdispatch(el, ev, "d:qinit", tasks);\n\t\t\t\tel.removeAttribute("q-d:qinit");\n\t\t\t}\n\t\t\tqueueTasks(tasks);\n\t\t}\n\t\tif (events.has("d:qidle")) {\n\t\t\tevents.delete("d:qidle");\n\t\t\t(win.requestIdleCallback ?? win.setTimeout).bind(win)(() => {\n\t\t\t\tconst ev = createEvent("qidle");\n\t\t\t\tconst elements = querySelectorAll("[q-d\\\\:qidle]");\n\t\t\t\tconst tasks = [];\n\t\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\t\tconst el = elements[i];\n\t\t\t\t\tdispatch(el, ev, "d:qidle", tasks);\n\t\t\t\t\tel.removeAttribute("q-d:qidle");\n\t\t\t\t}\n\t\t\t\tqueueTasks(tasks);\n\t\t\t});\n\t\t}\n\t\tif (events.has("e:qvisible")) {\n\t\t\tobserver || (observer = new IntersectionObserver((entries) => {\n\t\t\t\tconst tasks = [];\n\t\t\t\tfor (let i = 0; i < entries.length; i++) {\n\t\t\t\t\tconst entry = entries[i];\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tobserver.unobserve(entry.target);\n\t\t\t\t\t\tdispatch(entry.target, createEvent("qvisible", entry), "e:qvisible", tasks);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tqueueTasks(tasks);\n\t\t\t}));\n\t\t\tconst elements = querySelectorAll("[q-e\\\\:qvisible]:not([q\\\\:observed])");\n\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\tconst el = elements[i];\n\t\t\t\tobserver.observe(el);\n\t\t\t\tel.setAttribute("q:observed", "true");\n\t\t\t}\n\t\t}\n\t}\n};\nvar addEventOrRoot = (...eventNames) => {\n\tfor (let i = 0; i < eventNames.length; i++) {\n\t\tconst eventNameOrRoot = eventNames[i];\n\t\tif (eventNameOrRoot === QwikEvContainerReady) markContainerReady(eventNames[++i]);\n\t\telse if (typeof eventNameOrRoot === "string") {\n\t\t\tif (!events.has(eventNameOrRoot)) {\n\t\t\t\tevents.add(eventNameOrRoot);\n\t\t\t\tconst { scope, eventName } = parseKebabEvent(eventNameOrRoot);\n\t\t\t\tconst passive = isPassiveScope(scope);\n\t\t\t\tconst rootScope = getRootScope(scope);\n\t\t\t\tif (rootScope === windowPrefix) addEventListener(win, eventName, passive ? processPassiveWindowEvent : processWindowEvent, true, passive);\n\t\t\t\telse roots.forEach((root) => addEventListener(root, eventName, rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent, true, passive));\n\t\t\t\tif (hasInitialized === 1 && (eventNameOrRoot === "e:qvisible" || eventNameOrRoot === "d:qinit" || eventNameOrRoot === "d:qidle")) processReadyStateChange();\n\t\t\t}\n\t\t} else if (!roots.has(eventNameOrRoot)) {\n\t\t\tevents.forEach((kebabEventName) => {\n\t\t\t\tconst { scope, eventName } = parseKebabEvent(kebabEventName);\n\t\t\t\tconst passive = isPassiveScope(scope);\n\t\t\t\tconst rootScope = getRootScope(scope);\n\t\t\t\tif (rootScope !== windowPrefix) addEventListener(eventNameOrRoot, eventName, rootScope === documentPrefix ? passive ? processPassiveDocumentEvent : processDocumentEvent : passive ? processPassiveElementEvent : processElementEvent, true, passive);\n\t\t\t});\n\t\t\troots.add(eventNameOrRoot);\n\t\t}\n\t}\n};\nvar _qwikEv = win._qwikEv;\nif (!_qwikEv?.roots) {\n\tif (Array.isArray(_qwikEv)) addEventOrRoot(..._qwikEv);\n\telse addEventOrRoot("e:click", "e:input");\n\twin._qwikEv = {\n\t\tevents,\n\t\troots,\n\t\tpush: addEventOrRoot\n\t};\n\taddEventListener(doc, readyStateChange, processReadyStateChange);\n\tprocessReadyStateChange();\n}\n//#endregion';
1194
1194
 
1195
- var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]';function e(e,n){const o=n||e.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const n=o.querySelectorAll(t),r=n[n.length-1];if(r){const t=JSON.parse(r.textContent||"[]"),n=e.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let c=n.currentNode,i=c.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],r=t[e+1];let l=t[e+2];for(;i<o&&(c=n.nextNode(),c);)c.hasAttribute(":")&&i++;const s=c;null==l||!1===l?s.removeAttribute(r):("boolean"==typeof l&&(l=""),s.setAttribute(r,l))}}}}const n=document.currentScript;if(n){const t=n.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");t&&e(document,t)}`;
1195
+ var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `var t='script[type="qwik/backpatch"]';function e(e,n){const o=n||e.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const n=o.querySelectorAll(t),r=n[n.length-1];if(r){const t=JSON.parse(r.textContent||"[]"),n=e.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let c=n.currentNode,i=c.hasAttribute(":")?0:-1;for(let e=0;e<t.length;e+=3){const o=t[e],r=t[e+1];let l=t[e+2];for(;i<o&&(c=n.nextNode(),c);)c.hasAttribute(":")&&i++;const a=c;null==l||!1===l?a.removeAttribute(r):("boolean"==typeof l&&(l=""),a.setAttribute(r,l))}}}}var n=document.currentScript;if(n){const t=n.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");t&&e(document,t)}`;
1196
1196
 
1197
- var QWIK_BACKPATCH_EXECUTOR_DEBUG = `const BACKPATCH_DATA_SELECTOR = 'script[type="qwik/backpatch"]';\nfunction executeBackpatch(doc, containerElement) {\n const container = containerElement || doc.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n if (container) {\n const scripts = container.querySelectorAll(BACKPATCH_DATA_SELECTOR);\n const script = scripts[scripts.length - 1];\n if (script) {\n const data = JSON.parse(script.textContent || "[]");\n const walker = doc.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n let currentNode = walker.currentNode;\n let currentNodeIdx = currentNode.hasAttribute(":") ? 0 : -1;\n for (let i = 0; i < data.length; i += 3) {\n const elementIdx = data[i];\n const attrName = data[i + 1];\n let value = data[i + 2];\n while (currentNodeIdx < elementIdx) {\n currentNode = walker.nextNode();\n if (!currentNode) {\n break;\n }\n if (currentNode.hasAttribute(":")) {\n currentNodeIdx++;\n }\n }\n const element = currentNode;\n if (value == null || value === false) {\n element.removeAttribute(attrName);\n } else {\n if (typeof value === "boolean") {\n value = "";\n }\n element.setAttribute(attrName, value);\n }\n }\n }\n }\n}\nconst executorScript = document.currentScript;\nif (executorScript) {\n const container = executorScript.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n if (container) {\n executeBackpatch(document, container);\n }\n}`;
1197
+ var QWIK_BACKPATCH_EXECUTOR_DEBUG = '//#region packages/qwik/src/backpatch-executor-shared.ts\n/**\n* Shared backpatch executor logic that can be imported by both the inline script\n* (backpatch-executor.ts) and test utilities.\n*/\nvar BACKPATCH_DATA_SELECTOR = "script[type=\\"qwik/backpatch\\"]";\n/**\n* Execute backpatch operations on a document.\n*\n* @param doc - The document to execute backpatch on\n* @param containerElement - Optional specific container element (if not provided, will search for\n* it)\n*/\nfunction executeBackpatch(doc, containerElement) {\n\tconst container = containerElement || doc.querySelector("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n\tif (container) {\n\t\tconst scripts = container.querySelectorAll(BACKPATCH_DATA_SELECTOR);\n\t\tconst script = scripts[scripts.length - 1];\n\t\tif (script) {\n\t\t\tconst data = JSON.parse(script.textContent || "[]");\n\t\t\tconst walker = doc.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n\t\t\tlet currentNode = walker.currentNode;\n\t\t\tlet currentNodeIdx = currentNode.hasAttribute(":") ? 0 : -1;\n\t\t\tfor (let i = 0; i < data.length; i += 3) {\n\t\t\t\tconst elementIdx = data[i];\n\t\t\t\tconst attrName = data[i + 1];\n\t\t\t\tlet value = data[i + 2];\n\t\t\t\twhile (currentNodeIdx < elementIdx) {\n\t\t\t\t\tcurrentNode = walker.nextNode();\n\t\t\t\t\tif (!currentNode) break;\n\t\t\t\t\tif (currentNode.hasAttribute(":")) currentNodeIdx++;\n\t\t\t\t}\n\t\t\t\tconst element = currentNode;\n\t\t\t\tif (value == null || value === false) element.removeAttribute(attrName);\n\t\t\t\telse {\n\t\t\t\t\tif (typeof value === "boolean") value = "";\n\t\t\t\t\telement.setAttribute(attrName, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n//#endregion\n//#region packages/qwik/src/backpatch-executor.ts\n/**\n* Qwik Backpatch Executor\n*\n* This script executes the backpatch operations by finding the backpatch data script within the\n* same container and applying the patches to the DOM elements.\n*\n* This is the inline script version that auto-executes when loaded in the browser. The actual logic\n* is in backpatch-executor-shared.ts for reusability.\n*/\nvar executorScript = document.currentScript;\nif (executorScript) {\n\tconst container = executorScript.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n\tif (container) executeBackpatch(document, container);\n}\n//#endregion';
1198
1198
 
1199
- var QWIK_OUT_OF_ORDER_EXECUTOR_MINIFIED = `const t='template[q\\\\:r="',e="q:r",n='[q\\\\:rp="',r="q:g",l="q:i",o="q:o",s="[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])",u=u=>{const i=new WeakMap,c=()=>{const t=u.currentScript;return t&&t.closest(s)||u},f=(t,e,n,r)=>{let l=i.get(t);return l||i.set(t,l={}),l[e]||(l[e]={r:{},n:0,t:n,o:r})},a=(t,e)=>t?(e&&e.style&&(e.style.display="none"),t.style&&(t.style.display="contents"),1):0,q=t=>{const e=t.o;let n,r,l=0;if("p"===e)for(const e in t.r)n=t.r[e],n[0]&&a(n[0],n[1])&&(n[0]=0,l++);else if("s"===e)for(r=t.n;(n=t.r[r])&&n[0]&&a(n[0],n[1]);r++)n[0]=0,l++,t.n=r+1;else if("r"===e){if(t.t<0)return 0;for(t.n<0&&(t.n=t.t-1),r=t.n;(n=t.r[r])&&n[0]&&a(n[0],n[1]);r--)n[0]=0,l++,t.n=r-1}else{if(t.t<0)return 0;for(r=0;r<t.t;r++)if(n=t.r[r],!n)return 0;for(r=0;r<t.t;r++)n=t.r[r],n[0]&&a(n[0],n[1])&&(n[0]=0,l++)}return l},p=s=>{const i=c(),p=((n,r)=>{const l=u.currentScript,o=l?l.previousElementSibling:null;if(o&&"template"===o.localName&&o.getAttribute(e)===r+"")return o;const s=n.querySelectorAll(t+r+'"]');return s.length?s[s.length-1]:null})(i,s);if(!p)return;const g=((e,r,l)=>{if(!l)return null;const o=((t,e)=>t.querySelector(n+e+'"]'))(e,r),s=o?((e,n)=>e.querySelector(t+n+'"]'))(o,r):null,u=s?s.parentNode:null;return s&&o&&u?(u.insertBefore(l.content,s),s.remove(),l.remove(),[o,o.previousElementSibling]):null})(i,s,p);if(!g)return;((t,e)=>{var n;const r=u;null==(n=r.qProcessOOOS)||n.call(r,t,e)})(s,g[0]||null);const m=p.getAttribute(r);if(m){const t=+(p.getAttribute(l)||0),e=f(i,m,-1,p.getAttribute(o)||"p");return e.r[t]=g,void q(e)}a(g[0]||null,g[1])};p.g=(t,e,n)=>{const r=f(c(),t,e,n);r.t=e,r.o=n,"r"===r.o&&0===r.n&&(r.n=e-1),q(r)},p.d=u,globalThis.qO=p};u(document)`;
1199
+ var QWIK_OUT_OF_ORDER_EXECUTOR_MINIFIED = `var t='template[q\\\\:r="',e="q:r",r='[q\\\\:rp="',n="q:g",l="q:i",o="q:o",i="[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])",u=u=>{const s=new WeakMap,c=()=>{const t=u.currentScript;return t&&t.closest(i)||u},f=(t,e,r,n)=>{let l=s.get(t);return l||s.set(t,l={}),l[e]||(l[e]={r:{},n:0,t:r,o:n})},a=(t,e)=>t?(e&&e.style&&(e.style.display="none"),t.style&&(t.style.display="contents"),1):0,q=t=>{const e=t.o;let r,n,l=0;if("p"===e)for(const e in t.r)r=t.r[e],r[0]&&a(r[0],r[1])&&(r[0]=0,l++);else if("s"===e)for(n=t.n;(r=t.r[n])&&r[0]&&a(r[0],r[1]);n++)r[0]=0,l++,t.n=n+1;else if("r"===e){if(t.t<0)return 0;for(t.n<0&&(t.n=t.t-1),n=t.n;(r=t.r[n])&&r[0]&&a(r[0],r[1]);n--)r[0]=0,l++,t.n=n-1}else{if(t.t<0)return 0;for(n=0;n<t.t;n++)if(r=t.r[n],!r)return 0;for(n=0;n<t.t;n++)r=t.r[n],r[0]&&a(r[0],r[1])&&(r[0]=0,l++)}return l},p=i=>{const s=c(),p=((r,n)=>{const l=u.currentScript,o=l?l.previousElementSibling:null;if(o&&"template"===o.localName&&o.getAttribute(e)===n+"")return o;const i=r.querySelectorAll(t+n+'"]');return i.length?i[i.length-1]:null})(s,i);if(!p)return;const g=((e,n,l)=>{if(!l)return null;const o=((t,e)=>t.querySelector(r+e+'"]'))(e,n),i=o?((e,r)=>e.querySelector(t+r+'"]'))(o,n):null,u=i?i.parentNode:null;return i&&o&&u?(u.insertBefore(l.content,i),i.remove(),l.remove(),[o,o.previousElementSibling]):null})(s,i,p);if(!g)return;((t,e)=>{var r;const n=u;null===(r=n.qProcessOOOS)||void 0===r||r.call(n,t,e)})(i,g[0]||null);const m=p.getAttribute(n);if(m){const t=+(p.getAttribute(l)||0),e=f(s,m,-1,p.getAttribute(o)||"p");return e.r[t]=g,void q(e)}a(g[0]||null,g[1])};p.g=(t,e,r)=>{const n=f(c(),t,e,r);n.t=e,n.o=r,"r"===n.o&&0===n.n&&(n.n=e-1),q(n)},p.d=u,globalThis.qO=p};u(document)`;
1200
1200
 
1201
- var QWIK_OUT_OF_ORDER_EXECUTOR_DEBUG = `const Q_RESOLVED_SELECTOR = 'template[q\\\\:r="';\nconst Q_RESOLVED_ATTR = "q:r";\nconst Q_RESULT_PARENT_SELECTOR = '[q\\\\:rp="';\nconst Q_GROUP_ATTR = "q:g";\nconst Q_INDEX_ATTR = "q:i";\nconst Q_ORDER_ATTR = "q:o";\nconst Q_CONTAINER_SELECTOR = "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])";\nconst installOutOfOrderExecutor = (doc) => {\n const groups = /* @__PURE__ */ new WeakMap();\n const process = (boundaryId, content) => {\n var _a;\n const executorDoc = doc;\n (_a = executorDoc.qProcessOOOS) == null ? void 0 : _a.call(executorDoc, boundaryId, content);\n };\n const getScope = () => {\n const script = doc.currentScript;\n return script ? script.closest(Q_CONTAINER_SELECTOR) || doc : doc;\n };\n const group = (scope, groupId, total, order) => {\n let scopedGroups = groups.get(scope);\n if (!scopedGroups) {\n groups.set(scope, scopedGroups = {});\n }\n return scopedGroups[groupId] || (scopedGroups[groupId] = {\n r: {},\n n: 0,\n t: total,\n o: order\n });\n };\n const getResolvedTemplate = (scope, boundaryId) => {\n const currentScript = doc.currentScript;\n const previousElement = currentScript ? currentScript.previousElementSibling : null;\n if (previousElement && previousElement.localName === "template" && previousElement.getAttribute(Q_RESOLVED_ATTR) === String(boundaryId)) {\n return previousElement;\n }\n const templates = scope.querySelectorAll(Q_RESOLVED_SELECTOR + boundaryId + '"]');\n return templates.length ? templates[templates.length - 1] : null;\n };\n const getPlaceholderTemplate = (content, boundaryId) => {\n return content.querySelector(Q_RESOLVED_SELECTOR + boundaryId + '"]');\n };\n const getResultParent = (scope, boundaryId) => {\n return scope.querySelector(Q_RESULT_PARENT_SELECTOR + boundaryId + '"]');\n };\n const reveal = (content, fallback) => {\n if (!content) {\n return 0;\n }\n if (fallback && fallback.style) {\n fallback.style.display = "none";\n }\n if (content.style) {\n content.style.display = "contents";\n }\n return 1;\n };\n const move = (scope, boundaryId, resolved) => {\n if (!resolved) {\n return null;\n }\n const content = getResultParent(scope, boundaryId);\n const placeholder = content ? getPlaceholderTemplate(content, boundaryId) : null;\n const parent = placeholder ? placeholder.parentNode : null;\n if (!placeholder || !content || !parent) {\n return null;\n }\n parent.insertBefore(resolved.content, placeholder);\n placeholder.remove();\n resolved.remove();\n return [content, content.previousElementSibling];\n };\n const flush = (group2) => {\n const order = group2.o;\n let entry;\n let index;\n let swapped = 0;\n if (order === "p") {\n for (const key in group2.r) {\n entry = group2.r[key];\n if (entry[0] && reveal(entry[0], entry[1])) {\n entry[0] = 0;\n swapped++;\n }\n }\n } else if (order === "s") {\n for (index = group2.n; (entry = group2.r[index]) && entry[0]; index++) {\n if (!reveal(entry[0], entry[1])) {\n break;\n }\n entry[0] = 0;\n swapped++;\n group2.n = index + 1;\n }\n } else if (order === "r") {\n if (group2.t < 0) {\n return 0;\n }\n if (group2.n < 0) {\n group2.n = group2.t - 1;\n }\n for (index = group2.n; (entry = group2.r[index]) && entry[0]; index--) {\n if (!reveal(entry[0], entry[1])) {\n break;\n }\n entry[0] = 0;\n swapped++;\n group2.n = index - 1;\n }\n } else {\n if (group2.t < 0) {\n return 0;\n }\n for (index = 0; index < group2.t; index++) {\n entry = group2.r[index];\n if (!entry) {\n return 0;\n }\n }\n for (index = 0; index < group2.t; index++) {\n entry = group2.r[index];\n if (entry[0] && reveal(entry[0], entry[1])) {\n entry[0] = 0;\n swapped++;\n }\n }\n }\n return swapped;\n };\n const qO = ((boundaryId) => {\n const scope = getScope();\n const resolved = getResolvedTemplate(scope, boundaryId);\n if (!resolved) {\n return;\n }\n const entry = move(scope, boundaryId, resolved);\n if (!entry) {\n return;\n }\n process(boundaryId, entry[0] || null);\n const groupId = resolved.getAttribute(Q_GROUP_ATTR);\n if (groupId) {\n const index = +(resolved.getAttribute(Q_INDEX_ATTR) || 0);\n const currentGroup = group(scope, groupId, -1, resolved.getAttribute(Q_ORDER_ATTR) || "p");\n currentGroup.r[index] = entry;\n flush(currentGroup);\n return;\n }\n reveal(entry[0] || null, entry[1]);\n });\n qO.g = (groupId, total, order) => {\n const currentGroup = group(getScope(), groupId, total, order);\n currentGroup.t = total;\n currentGroup.o = order;\n if (currentGroup.o === "r" && currentGroup.n === 0) {\n currentGroup.n = total - 1;\n }\n flush(currentGroup);\n };\n qO.d = doc;\n globalThis.qO = qO;\n};\ninstallOutOfOrderExecutor(document)`;
1201
+ var QWIK_OUT_OF_ORDER_EXECUTOR_DEBUG = '//#region packages/qwik/src/out-of-order-executor-shared.ts\n/** Shared out-of-order Suspense executor logic for the inline script and source tests. */\nvar Q_RESOLVED_SELECTOR = "template[q\\\\:r=\\"";\nvar Q_RESOLVED_ATTR = "q:r";\nvar Q_RESULT_PARENT_SELECTOR = "[q\\\\:rp=\\"";\nvar Q_GROUP_ATTR = "q:g";\nvar Q_INDEX_ATTR = "q:i";\nvar Q_ORDER_ATTR = "q:o";\nvar Q_CONTAINER_SELECTOR = "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])";\nvar installOutOfOrderExecutor = (doc) => {\n\tconst groups = /* @__PURE__ */ new WeakMap();\n\tconst process = (boundaryId, content) => {\n\t\tvar _executorDoc$qProcess;\n\t\tconst executorDoc = doc;\n\t\t(_executorDoc$qProcess = executorDoc.qProcessOOOS) === null || _executorDoc$qProcess === void 0 || _executorDoc$qProcess.call(executorDoc, boundaryId, content);\n\t};\n\tconst getScope = () => {\n\t\tconst script = doc.currentScript;\n\t\treturn script ? script.closest(Q_CONTAINER_SELECTOR) || doc : doc;\n\t};\n\tconst group = (scope, groupId, total, order) => {\n\t\tlet scopedGroups = groups.get(scope);\n\t\tif (!scopedGroups) groups.set(scope, scopedGroups = {});\n\t\treturn scopedGroups[groupId] || (scopedGroups[groupId] = {\n\t\t\tr: {},\n\t\t\tn: 0,\n\t\t\tt: total,\n\t\t\to: order\n\t\t});\n\t};\n\tconst getResolvedTemplate = (scope, boundaryId) => {\n\t\tconst currentScript = doc.currentScript;\n\t\tconst previousElement = currentScript ? currentScript.previousElementSibling : null;\n\t\tif (previousElement && previousElement.localName === "template" && previousElement.getAttribute(Q_RESOLVED_ATTR) === String(boundaryId)) return previousElement;\n\t\tconst templates = scope.querySelectorAll(Q_RESOLVED_SELECTOR + boundaryId + "\\"]");\n\t\treturn templates.length ? templates[templates.length - 1] : null;\n\t};\n\tconst getPlaceholderTemplate = (content, boundaryId) => {\n\t\treturn content.querySelector(Q_RESOLVED_SELECTOR + boundaryId + "\\"]");\n\t};\n\tconst getResultParent = (scope, boundaryId) => {\n\t\treturn scope.querySelector(Q_RESULT_PARENT_SELECTOR + boundaryId + "\\"]");\n\t};\n\tconst reveal = (content, fallback) => {\n\t\tif (!content) return 0;\n\t\tif (fallback && fallback.style) fallback.style.display = "none";\n\t\tif (content.style) content.style.display = "contents";\n\t\treturn 1;\n\t};\n\tconst move = (scope, boundaryId, resolved) => {\n\t\tif (!resolved) return null;\n\t\tconst content = getResultParent(scope, boundaryId);\n\t\tconst placeholder = content ? getPlaceholderTemplate(content, boundaryId) : null;\n\t\tconst parent = placeholder ? placeholder.parentNode : null;\n\t\tif (!placeholder || !content || !parent) return null;\n\t\tparent.insertBefore(resolved.content, placeholder);\n\t\tplaceholder.remove();\n\t\tresolved.remove();\n\t\treturn [content, content.previousElementSibling];\n\t};\n\tconst flush = (group) => {\n\t\tconst order = group.o;\n\t\tlet entry;\n\t\tlet index;\n\t\tlet swapped = 0;\n\t\tif (order === "p") for (const key in group.r) {\n\t\t\tentry = group.r[key];\n\t\t\tif (entry[0] && reveal(entry[0], entry[1])) {\n\t\t\t\tentry[0] = 0;\n\t\t\t\tswapped++;\n\t\t\t}\n\t\t}\n\t\telse if (order === "s") for (index = group.n; (entry = group.r[index]) && entry[0]; index++) {\n\t\t\tif (!reveal(entry[0], entry[1])) break;\n\t\t\tentry[0] = 0;\n\t\t\tswapped++;\n\t\t\tgroup.n = index + 1;\n\t\t}\n\t\telse if (order === "r") {\n\t\t\tif (group.t < 0) return 0;\n\t\t\tif (group.n < 0) group.n = group.t - 1;\n\t\t\tfor (index = group.n; (entry = group.r[index]) && entry[0]; index--) {\n\t\t\t\tif (!reveal(entry[0], entry[1])) break;\n\t\t\t\tentry[0] = 0;\n\t\t\t\tswapped++;\n\t\t\t\tgroup.n = index - 1;\n\t\t\t}\n\t\t} else {\n\t\t\tif (group.t < 0) return 0;\n\t\t\tfor (index = 0; index < group.t; index++) {\n\t\t\t\tentry = group.r[index];\n\t\t\t\tif (!entry) return 0;\n\t\t\t}\n\t\t\tfor (index = 0; index < group.t; index++) {\n\t\t\t\tentry = group.r[index];\n\t\t\t\tif (entry[0] && reveal(entry[0], entry[1])) {\n\t\t\t\t\tentry[0] = 0;\n\t\t\t\t\tswapped++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn swapped;\n\t};\n\tconst qO = ((boundaryId) => {\n\t\tconst scope = getScope();\n\t\tconst resolved = getResolvedTemplate(scope, boundaryId);\n\t\tif (!resolved) return;\n\t\tconst entry = move(scope, boundaryId, resolved);\n\t\tif (!entry) return;\n\t\tprocess(boundaryId, entry[0] || null);\n\t\tconst groupId = resolved.getAttribute(Q_GROUP_ATTR);\n\t\tif (groupId) {\n\t\t\tconst index = +(resolved.getAttribute(Q_INDEX_ATTR) || 0);\n\t\t\tconst currentGroup = group(scope, groupId, -1, resolved.getAttribute(Q_ORDER_ATTR) || "p");\n\t\t\tcurrentGroup.r[index] = entry;\n\t\t\tflush(currentGroup);\n\t\t\treturn;\n\t\t}\n\t\treveal(entry[0] || null, entry[1]);\n\t});\n\tqO.g = (groupId, total, order) => {\n\t\tconst currentGroup = group(getScope(), groupId, total, order);\n\t\tcurrentGroup.t = total;\n\t\tcurrentGroup.o = order;\n\t\tif (currentGroup.o === "r" && currentGroup.n === 0) currentGroup.n = total - 1;\n\t\tflush(currentGroup);\n\t};\n\tqO.d = doc;\n\tglobalThis.qO = qO;\n};\n//#endregion\n//#region packages/qwik/src/out-of-order-executor.ts\n/**\n* Qwik Out-of-Order Suspense Executor\n*\n* This is the inline script entry. The actual logic lives in out-of-order-executor-shared.ts so\n* source tests can install the same executor.\n*/\ninstallOutOfOrderExecutor(document);\n//#endregion';
1202
1202
 
1203
- function getQwikLoaderScript(e = {}) {
1204
- return e.debug ? QWIK_LOADER_DEFAULT_DEBUG : QWIK_LOADER_DEFAULT_MINIFIED;
1203
+ function getQwikLoaderScript(t = {}) {
1204
+ return t.debug ? QWIK_LOADER_DEFAULT_DEBUG : QWIK_LOADER_DEFAULT_MINIFIED;
1205
1205
  }
1206
1206
 
1207
1207
  var QWIK_PREFETCH_MINIFIED = globalThis.QWIK_PREFETCH_MINIFIED;
1208
1208
 
1209
1209
  var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
1210
1210
 
1211
- function getQwikPrefetchWorkerScript(e = {}) {
1212
- return e.debug ? QWIK_PREFETCH_DEBUG : QWIK_PREFETCH_MINIFIED;
1211
+ function getQwikPrefetchWorkerScript(t = {}) {
1212
+ return t.debug ? QWIK_PREFETCH_DEBUG : QWIK_PREFETCH_MINIFIED;
1213
1213
  }
1214
1214
 
1215
- function getQwikBackpatchExecutorScript(e = {}) {
1216
- return e.debug ? QWIK_BACKPATCH_EXECUTOR_DEBUG : QWIK_BACKPATCH_EXECUTOR_MINIFIED;
1215
+ function getQwikBackpatchExecutorScript(t = {}) {
1216
+ return t.debug ? QWIK_BACKPATCH_EXECUTOR_DEBUG : QWIK_BACKPATCH_EXECUTOR_MINIFIED;
1217
1217
  }
1218
1218
 
1219
- function getQwikOutOfOrderExecutorScript(e = {}) {
1219
+ function getQwikOutOfOrderExecutorScript(t = {}) {
1220
1220
  if (!__EXPERIMENTAL__.suspense) {
1221
1221
  return "";
1222
1222
  }
1223
- const t = e.debug ? QWIK_OUT_OF_ORDER_EXECUTOR_DEBUG : QWIK_OUT_OF_ORDER_EXECUTOR_MINIFIED;
1224
- return `if(!globalThis.qO||globalThis.qO.d!==document){${t}}`;
1223
+ const e = t.debug ? QWIK_OUT_OF_ORDER_EXECUTOR_DEBUG : QWIK_OUT_OF_ORDER_EXECUTOR_MINIFIED;
1224
+ return `if(!globalThis.qO||globalThis.qO.d!==document){${e}\n}`;
1225
1225
  }
1226
1226
 
1227
1227
  // packages/qwik/src/server/ssr-node.ts
@@ -1230,18 +1230,18 @@ import { _isJSXNode as to, _EMPTY_OBJ, _EFFECT_BACK_REF as Vi } from "@qwik.dev/
1230
1230
  import { isDev as isDev7 } from "@qwik.dev/core/build";
1231
1231
 
1232
1232
  var SsrNode = class {
1233
- constructor(e, t, n, r, s, i) {
1234
- this.parentComponent = e;
1233
+ constructor(t, e, n, r, s, i) {
1234
+ this.parentComponent = t;
1235
1235
  this.attributesIndex = n;
1236
1236
  this.cleanupQueue = r;
1237
1237
  this.vnodeData = s;
1238
1238
  this.currentFile = i;
1239
- this.id = t;
1239
+ this.id = e;
1240
1240
  this.flags = 1 /* Updatable */;
1241
1241
  this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_OBJ;
1242
1242
  this.parentComponent?.addChild(this);
1243
- if (isDev7 && t.indexOf("undefined") != -1) {
1244
- throw new Error(`Invalid SSR node id: ${t}`);
1243
+ if (isDev7 && e.indexOf("undefined") != -1) {
1244
+ throw new Error(`Invalid SSR node id: ${e}`);
1245
1245
  }
1246
1246
  }
1247
1247
  parentComponent;
@@ -1265,17 +1265,17 @@ var SsrNode = class {
1265
1265
  get [Vi]() {
1266
1266
  return this.getProp(wr);
1267
1267
  }
1268
- setProp(e, t) {
1268
+ setProp(t, e) {
1269
1269
  if (this.attrs === _EMPTY_OBJ) {
1270
1270
  this.setEmptyArrayAsVNodeDataAttributes();
1271
1271
  }
1272
- if (e.startsWith(Dr)) {
1273
- (this.localProps ||= {})[e] = t;
1272
+ if (t.startsWith(Dr)) {
1273
+ (this.localProps ||= {})[t] = e;
1274
1274
  } else {
1275
- this.attrs[e] = t;
1275
+ this.attrs[t] = e;
1276
1276
  }
1277
- if (e == Or && t) {
1278
- this.cleanupQueue.push(t);
1277
+ if (t == Or && e) {
1278
+ this.cleanupQueue.push(e);
1279
1279
  }
1280
1280
  }
1281
1281
  setEmptyArrayAsVNodeDataAttributes() {
@@ -1283,55 +1283,55 @@ var SsrNode = class {
1283
1283
  this.vnodeData[this.attributesIndex] = {};
1284
1284
  this.attrs = this.vnodeData[this.attributesIndex];
1285
1285
  } else {
1286
- const e = this.vnodeData.length > 1 ? 1 : 0;
1287
- this.vnodeData.splice(e, 0, {});
1288
- this.attributesIndex = e;
1286
+ const t = this.vnodeData.length > 1 ? 1 : 0;
1287
+ this.vnodeData.splice(t, 0, {});
1288
+ this.attributesIndex = t;
1289
1289
  this.attrs = this.vnodeData[this.attributesIndex];
1290
1290
  }
1291
1291
  }
1292
- getProp(e) {
1293
- if (e.startsWith(Dr)) {
1294
- return this.localProps ? this.localProps[e] ?? null : null;
1292
+ getProp(t) {
1293
+ if (t.startsWith(Dr)) {
1294
+ return this.localProps ? this.localProps[t] ?? null : null;
1295
1295
  } else {
1296
- return this.attrs[e] ?? null;
1296
+ return this.attrs[t] ?? null;
1297
1297
  }
1298
1298
  }
1299
- removeProp(e) {
1300
- if (e.startsWith(Dr)) {
1299
+ removeProp(t) {
1300
+ if (t.startsWith(Dr)) {
1301
1301
  if (this.localProps) {
1302
- delete this.localProps[e];
1302
+ delete this.localProps[t];
1303
1303
  }
1304
1304
  } else {
1305
- delete this.attrs[e];
1305
+ delete this.attrs[t];
1306
1306
  }
1307
1307
  }
1308
- addChild(e) {
1308
+ addChild(t) {
1309
1309
  if (!this.children) {
1310
1310
  this.children = [];
1311
1311
  }
1312
- this.children.push(e);
1312
+ this.children.push(t);
1313
1313
  }
1314
1314
  setTreeNonUpdatable() {
1315
1315
  if (this.flags & 1 /* Updatable */) {
1316
1316
  this.flags &= ~1 /* Updatable */;
1317
1317
  if (this.children) {
1318
- for (let e = 0; e < this.children.length; e++) {
1319
- const t = this.children[e];
1320
- t.setTreeNonUpdatable();
1318
+ for (let t = 0; t < this.children.length; t++) {
1319
+ const e = this.children[t];
1320
+ e.setTreeNonUpdatable();
1321
1321
  }
1322
1322
  }
1323
1323
  }
1324
1324
  }
1325
1325
  toString() {
1326
1326
  if (isDev7) {
1327
- let e = "";
1328
- for (const t in this.attrs) {
1329
- const n = this.attrs[t];
1330
- e += `${t}=`;
1331
- e += `${typeof n === "string" || typeof n === "number" ? JSON.stringify(n) : "*"}`;
1332
- e += ", ";
1333
- }
1334
- return `<SSRNode id="${this.id}" ${e} />`;
1327
+ let t = "";
1328
+ for (const e in this.attrs) {
1329
+ const n = this.attrs[e];
1330
+ t += `${e}=`;
1331
+ t += `${typeof n === "string" || typeof n === "number" ? JSON.stringify(n) : "*"}`;
1332
+ t += ", ";
1333
+ }
1334
+ return `<SSRNode id="${this.id}" ${t} />`;
1335
1335
  } else {
1336
1336
  return `<SSRNode id="${this.id}" />`;
1337
1337
  }
@@ -1339,16 +1339,16 @@ var SsrNode = class {
1339
1339
  };
1340
1340
 
1341
1341
  var DomRef = class {
1342
- constructor(e) {
1343
- this.he = e;
1342
+ constructor(t) {
1343
+ this.he = t;
1344
1344
  }
1345
1345
  he;
1346
1346
  __brand__="DomRef";
1347
1347
  };
1348
1348
 
1349
1349
  var SsrComponentFrame = class {
1350
- constructor(e) {
1351
- this.componentNode = e;
1350
+ constructor(t) {
1351
+ this.componentNode = t;
1352
1352
  }
1353
1353
  componentNode;
1354
1354
  slots=[];
@@ -1356,83 +1356,83 @@ var SsrComponentFrame = class {
1356
1356
  scopedStyleIds=/* @__PURE__ */ new Set;
1357
1357
  projectionScopedStyle=null;
1358
1358
  projectionComponentFrame=null;
1359
- distributeChildrenIntoSlots(e, t, n) {
1360
- this.projectionScopedStyle = t;
1359
+ distributeChildrenIntoSlots(t, e, n) {
1360
+ this.projectionScopedStyle = e;
1361
1361
  this.projectionComponentFrame = n;
1362
- if (to(e)) {
1363
- const t = this.getSlotName(e);
1364
- We(this.slots, t, e, 0);
1365
- } else if (Array.isArray(e) && e.length > 0) {
1366
- const t = [];
1367
- for (let n = 0; n < e.length; n++) {
1368
- const r = e[n];
1362
+ if (to(t)) {
1363
+ const e = this.getSlotName(t);
1364
+ We(this.slots, e, t, 0);
1365
+ } else if (Array.isArray(t) && t.length > 0) {
1366
+ const e = [];
1367
+ for (let n = 0; n < t.length; n++) {
1368
+ const r = t[n];
1369
1369
  if (to(r)) {
1370
- const e = this.getSlotName(r);
1371
- if (e === QDefaultSlot) {
1372
- t.push(r);
1370
+ const t = this.getSlotName(r);
1371
+ if (t === QDefaultSlot) {
1372
+ e.push(r);
1373
1373
  } else {
1374
- this.updateSlot(e, r);
1374
+ this.updateSlot(t, r);
1375
1375
  }
1376
1376
  } else {
1377
- t.push(r);
1377
+ e.push(r);
1378
1378
  }
1379
1379
  }
1380
- t.length > 0 && We(this.slots, QDefaultSlot, t, 0);
1380
+ e.length > 0 && We(this.slots, QDefaultSlot, e, 0);
1381
1381
  } else {
1382
- We(this.slots, QDefaultSlot, e, 0);
1382
+ We(this.slots, QDefaultSlot, t, 0);
1383
1383
  }
1384
1384
  }
1385
- updateSlot(e, t) {
1386
- let n = Ue(this.slots, e, 0);
1385
+ updateSlot(t, e) {
1386
+ let n = Ue(this.slots, t, 0);
1387
1387
  if (n === null) {
1388
- n = t;
1388
+ n = e;
1389
1389
  } else if (Array.isArray(n)) {
1390
- n.push(t);
1390
+ n.push(e);
1391
1391
  } else {
1392
- n = [ n, t ];
1392
+ n = [ n, e ];
1393
1393
  }
1394
- We(this.slots, e, n, 0);
1394
+ We(this.slots, t, n, 0);
1395
1395
  }
1396
- getSlotName(e) {
1397
- if (e.props[cr]) {
1398
- return e.props[cr];
1396
+ getSlotName(t) {
1397
+ if (t.props[cr]) {
1398
+ return t.props[cr];
1399
1399
  }
1400
1400
  return QDefaultSlot;
1401
1401
  }
1402
- hasSlot(e) {
1403
- return Ve(this.slots, e, 0);
1402
+ hasSlot(t) {
1403
+ return Ve(this.slots, t, 0);
1404
1404
  }
1405
- claimChildrenForSlot(e) {
1406
- return mapApp_remove(this.slots, e, 0);
1405
+ claimChildrenForSlot(t) {
1406
+ return mapApp_remove(this.slots, t, 0);
1407
1407
  }
1408
- consumeChildrenForSlot(e, t) {
1409
- const n = this.claimChildrenForSlot(t);
1410
- this.componentNode.setProp(t, e.id);
1411
- e.setProp(QSlotParent, this.componentNode.id);
1408
+ consumeChildrenForSlot(t, e) {
1409
+ const n = this.claimChildrenForSlot(e);
1410
+ this.componentNode.setProp(e, t.id);
1411
+ t.setProp(QSlotParent, this.componentNode.id);
1412
1412
  return n;
1413
1413
  }
1414
1414
  };
1415
1415
 
1416
1416
  // packages/qwik/src/server/ssr-stream-writer.ts
1417
- var renderSSRChunks = (e, t) => {
1417
+ var renderSSRChunks = (t, e) => {
1418
1418
  let n = "";
1419
- for (let r = 0; r < e.length; r++) {
1420
- const s = e[r];
1419
+ for (let r = 0; r < t.length; r++) {
1420
+ const s = t[r];
1421
1421
  if (typeof s === "string") {
1422
1422
  n += s;
1423
1423
  } else if (s.type === "root-ref-delta") {
1424
- const e = t ? t[s.localId] ?? s.localId : s.localId;
1425
- const r = t ? t[s.localBaseId] ?? s.localBaseId : s.localBaseId;
1426
- n += String(e - r);
1424
+ const t = e ? e[s.localId] ?? s.localId : s.localId;
1425
+ const r = e ? e[s.localBaseId] ?? s.localBaseId : s.localBaseId;
1426
+ n += String(t - r);
1427
1427
  } else {
1428
- const e = s.type === "root-ref" ? s.localId : s.localPath[0];
1429
- n += String(t ? t[e] ?? e : e);
1428
+ const t = s.type === "root-ref" ? s.localId : s.localPath[0];
1429
+ n += String(e ? e[t] ?? t : t);
1430
1430
  if (s.type !== "root-ref-path") {
1431
1431
  continue;
1432
1432
  }
1433
1433
  const r = s.localPath;
1434
- for (let e = 1; e < r.length; e++) {
1435
- n += " " + r[e];
1434
+ for (let t = 1; t < r.length; t++) {
1435
+ n += " " + r[t];
1436
1436
  }
1437
1437
  }
1438
1438
  }
@@ -1441,66 +1441,66 @@ var renderSSRChunks = (e, t) => {
1441
1441
 
1442
1442
  var StringSSRWriter = class {
1443
1443
  buffer=[];
1444
- write(e) {
1445
- this.buffer.push(e);
1444
+ write(t) {
1445
+ this.buffer.push(t);
1446
1446
  }
1447
- writeRootRef(e) {
1448
- writeStringRootRef(this, e);
1447
+ writeRootRef(t) {
1448
+ writeStringRootRef(this, t);
1449
1449
  }
1450
- writeRootRefPath(e) {
1451
- writeStringRootRefPath(this, e);
1450
+ writeRootRefPath(t) {
1451
+ writeStringRootRefPath(this, t);
1452
1452
  }
1453
- writeRootRefDelta(e, t) {
1454
- writeStringRootRefDelta(this, e, t);
1453
+ writeRootRefDelta(t, e) {
1454
+ writeStringRootRefDelta(this, t, e);
1455
1455
  }
1456
1456
  clear() {
1457
1457
  this.buffer.length = 0;
1458
1458
  }
1459
- toString(e) {
1459
+ toString(t) {
1460
1460
  return this.buffer.join("");
1461
1461
  }
1462
1462
  };
1463
1463
 
1464
1464
  var StringBufferSegmentWriter = class {
1465
1465
  chunks=[];
1466
- write(e) {
1467
- this.chunks.push(e);
1466
+ write(t) {
1467
+ this.chunks.push(t);
1468
1468
  }
1469
- writeRootRef(e) {
1469
+ writeRootRef(t) {
1470
1470
  this.chunks.push({
1471
1471
  type: "root-ref",
1472
- localId: e
1472
+ localId: t
1473
1473
  });
1474
1474
  }
1475
- writeRootRefPath(e) {
1475
+ writeRootRefPath(t) {
1476
1476
  this.chunks.push({
1477
1477
  type: "root-ref-path",
1478
- localPath: e
1478
+ localPath: t
1479
1479
  });
1480
1480
  }
1481
- writeRootRefDelta(e, t) {
1481
+ writeRootRefDelta(t, e) {
1482
1482
  this.chunks.push({
1483
1483
  type: "root-ref-delta",
1484
- localId: e,
1485
- localBaseId: t
1484
+ localId: t,
1485
+ localBaseId: e
1486
1486
  });
1487
1487
  }
1488
1488
  clear() {
1489
1489
  this.chunks.length = 0;
1490
1490
  }
1491
1491
  extract() {
1492
- const e = this.chunks;
1492
+ const t = this.chunks;
1493
1493
  this.chunks = [];
1494
- return e;
1494
+ return t;
1495
1495
  }
1496
- toString(e) {
1497
- return renderSSRChunks(this.chunks, e);
1496
+ toString(t) {
1497
+ return renderSSRChunks(this.chunks, t);
1498
1498
  }
1499
1499
  };
1500
1500
 
1501
1501
  // packages/qwik/src/server/tag-nesting.ts
1502
- var allowedContent = e => {
1503
- switch (e) {
1502
+ var allowedContent = t => {
1503
+ switch (t) {
1504
1504
  case 2 /* TEXT */ :
1505
1505
  return [ "text content", null ];
1506
1506
 
@@ -1550,8 +1550,8 @@ var allowedContent = e => {
1550
1550
  }
1551
1551
  };
1552
1552
 
1553
- var initialTag = e => {
1554
- switch (e) {
1553
+ var initialTag = t => {
1554
+ switch (t) {
1555
1555
  case "html":
1556
1556
  return 32 /* HTML */;
1557
1557
 
@@ -1562,61 +1562,61 @@ var initialTag = e => {
1562
1562
  return 130 /* BODY */;
1563
1563
 
1564
1564
  default:
1565
- return isTagAllowed(10 /* ANYTHING */ , e);
1565
+ return isTagAllowed(10 /* ANYTHING */ , t);
1566
1566
  }
1567
1567
  };
1568
1568
 
1569
- function isTagAllowed(e, t) {
1570
- switch (e) {
1569
+ function isTagAllowed(t, e) {
1570
+ switch (t) {
1571
1571
  case 2 /* TEXT */ :
1572
1572
  case 0 /* NOT_ALLOWED */ :
1573
1573
  return 0 /* NOT_ALLOWED */;
1574
1574
 
1575
1575
  case 32 /* HTML */ :
1576
- return isInHtml(t);
1576
+ return isInHtml(e);
1577
1577
 
1578
1578
  case 64 /* HEAD */ :
1579
- return isInHead(t);
1579
+ return isInHead(e);
1580
1580
 
1581
1581
  case 130 /* BODY */ :
1582
1582
  case 10 /* ANYTHING */ :
1583
1583
  case 1026 /* PHRASING_CONTAINER */ :
1584
- return isInAnything(t);
1584
+ return isInAnything(e);
1585
1585
 
1586
1586
  case 4096 /* TABLE */ :
1587
- return isInTable(t);
1587
+ return isInTable(e);
1588
1588
 
1589
1589
  case 8192 /* TABLE_BODY */ :
1590
- return isInTableBody(t);
1590
+ return isInTableBody(e);
1591
1591
 
1592
1592
  case 16384 /* TABLE_ROW */ :
1593
- return isInTableRow(t);
1593
+ return isInTableRow(e);
1594
1594
 
1595
1595
  case 32768 /* TABLE_COLGROUP */ :
1596
- return isInTableColGroup(t);
1596
+ return isInTableColGroup(e);
1597
1597
 
1598
1598
  case 258 /* PHRASING_ANY */ :
1599
- return isInPhrasing(t, true);
1599
+ return isInPhrasing(e, true);
1600
1600
 
1601
1601
  case 514 /* PHRASING_INSIDE_INPUT */ :
1602
- return isInPhrasing(t, false);
1602
+ return isInPhrasing(e, false);
1603
1603
 
1604
1604
  case 2050 /* PICTURE */ :
1605
- return isInPicture(t);
1605
+ return isInPicture(e);
1606
1606
 
1607
1607
  case 4098 /* BUTTON */ :
1608
- return isInButton(t);
1608
+ return isInButton(e);
1609
1609
 
1610
1610
  case 1 /* DOCUMENT */ :
1611
- if (t === "html") {
1611
+ if (e === "html") {
1612
1612
  return 32 /* HTML */;
1613
1613
  }
1614
1614
  }
1615
1615
  return 0 /* NOT_ALLOWED */;
1616
1616
  }
1617
1617
 
1618
- function isInHtml(e) {
1619
- switch (e) {
1618
+ function isInHtml(t) {
1619
+ switch (t) {
1620
1620
  case "head":
1621
1621
  return 64 /* HEAD */;
1622
1622
 
@@ -1628,8 +1628,8 @@ function isInHtml(e) {
1628
1628
  }
1629
1629
  }
1630
1630
 
1631
- function isInHead(e) {
1632
- switch (e) {
1631
+ function isInHead(t) {
1632
+ switch (t) {
1633
1633
  case "title":
1634
1634
  case "script":
1635
1635
  case "noscript":
@@ -1649,8 +1649,8 @@ function isInHead(e) {
1649
1649
  }
1650
1650
  }
1651
1651
 
1652
- function isSelfClosingTag(e) {
1653
- switch (e) {
1652
+ function isSelfClosingTag(t) {
1653
+ switch (t) {
1654
1654
  case "area":
1655
1655
  case "base":
1656
1656
  case "basefont":
@@ -1676,11 +1676,11 @@ function isSelfClosingTag(e) {
1676
1676
  }
1677
1677
  }
1678
1678
 
1679
- function isInAnything(e) {
1680
- if (isSelfClosingTag(e)) {
1679
+ function isInAnything(t) {
1680
+ if (isSelfClosingTag(t)) {
1681
1681
  return 4 /* EMPTY */;
1682
1682
  }
1683
- switch (e) {
1683
+ switch (t) {
1684
1684
  case "script":
1685
1685
  case "style":
1686
1686
  case "noscript":
@@ -1714,8 +1714,8 @@ function isInAnything(e) {
1714
1714
  }
1715
1715
  }
1716
1716
 
1717
- function isInTable(e) {
1718
- switch (e) {
1717
+ function isInTable(t) {
1718
+ switch (t) {
1719
1719
  case "caption":
1720
1720
  return 10 /* ANYTHING */;
1721
1721
 
@@ -1735,8 +1735,8 @@ function isInTable(e) {
1735
1735
  }
1736
1736
  }
1737
1737
 
1738
- function isInTableBody(e) {
1739
- switch (e) {
1738
+ function isInTableBody(t) {
1739
+ switch (t) {
1740
1740
  case "tr":
1741
1741
  return 16384 /* TABLE_ROW */;
1742
1742
 
@@ -1748,8 +1748,8 @@ function isInTableBody(e) {
1748
1748
  }
1749
1749
  }
1750
1750
 
1751
- function isInTableRow(e) {
1752
- switch (e) {
1751
+ function isInTableRow(t) {
1752
+ switch (t) {
1753
1753
  case "td":
1754
1754
  case "th":
1755
1755
  return 10 /* ANYTHING */;
@@ -1762,8 +1762,8 @@ function isInTableRow(e) {
1762
1762
  }
1763
1763
  }
1764
1764
 
1765
- function isInTableColGroup(e) {
1766
- switch (e) {
1765
+ function isInTableColGroup(t) {
1766
+ switch (t) {
1767
1767
  case "col":
1768
1768
  return 4 /* EMPTY */;
1769
1769
 
@@ -1775,8 +1775,8 @@ function isInTableColGroup(e) {
1775
1775
  }
1776
1776
  }
1777
1777
 
1778
- function isInPicture(e) {
1779
- switch (e) {
1778
+ function isInPicture(t) {
1779
+ switch (t) {
1780
1780
  case "source":
1781
1781
  return 4 /* EMPTY */;
1782
1782
 
@@ -1791,8 +1791,8 @@ function isInPicture(e) {
1791
1791
  }
1792
1792
  }
1793
1793
 
1794
- function isInButton(e) {
1795
- switch (e) {
1794
+ function isInButton(t) {
1795
+ switch (t) {
1796
1796
  case "button":
1797
1797
  case "input":
1798
1798
  case "textarea":
@@ -1804,19 +1804,19 @@ function isInButton(e) {
1804
1804
  return 2050 /* PICTURE */;
1805
1805
 
1806
1806
  default:
1807
- return isInPhrasing(e, false);
1807
+ return isInPhrasing(t, false);
1808
1808
  }
1809
1809
  }
1810
1810
 
1811
- function isInPhrasing(e, t) {
1812
- switch (e) {
1811
+ function isInPhrasing(t, e) {
1812
+ switch (t) {
1813
1813
  case "svg":
1814
1814
  case "math":
1815
1815
  return 1026 /* PHRASING_CONTAINER */;
1816
1816
 
1817
1817
  case "input":
1818
1818
  case "textarea":
1819
- return t ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
1819
+ return e ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
1820
1820
 
1821
1821
  case "a":
1822
1822
  case "abbr":
@@ -1872,7 +1872,7 @@ function isInPhrasing(e, t) {
1872
1872
  case "var":
1873
1873
  case "video":
1874
1874
  case "wbr":
1875
- return t ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
1875
+ return e ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
1876
1876
 
1877
1877
  case "script":
1878
1878
  case "style":
@@ -1891,30 +1891,30 @@ function createTimer() {
1891
1891
  if (typeof performance === "undefined") {
1892
1892
  return () => 0;
1893
1893
  }
1894
- const e = performance.now();
1894
+ const t = performance.now();
1895
1895
  return () => {
1896
- const t = performance.now();
1897
- const n = t - e;
1896
+ const e = performance.now();
1897
+ const n = e - t;
1898
1898
  return n / 1e6;
1899
1899
  };
1900
1900
  }
1901
1901
 
1902
- function getBuildBase(e) {
1903
- let t = e.base;
1904
- if (typeof e.base === "function") {
1905
- t = e.base(e);
1902
+ function getBuildBase(t) {
1903
+ let e = t.base;
1904
+ if (typeof t.base === "function") {
1905
+ e = t.base(t);
1906
1906
  }
1907
- if (typeof t === "string") {
1908
- if (!t.endsWith("/")) {
1909
- t += "/";
1907
+ if (typeof e === "string") {
1908
+ if (!e.endsWith("/")) {
1909
+ e += "/";
1910
1910
  }
1911
- return t;
1911
+ return e;
1912
1912
  }
1913
1913
  return `${import.meta.env?.BASE_URL || "/"}build/`;
1914
1914
  }
1915
1915
 
1916
1916
  var versions = {
1917
- qwik: "2.0.0-beta.39-dev+6fb620f",
1917
+ qwik: "2.0.0-beta.40-dev+a459d55",
1918
1918
  qwikDom: "2.1.19"
1919
1919
  };
1920
1920
 
@@ -1925,91 +1925,91 @@ var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
1925
1925
 
1926
1926
  var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
1927
1927
 
1928
- function vNodeData_incrementElementCount(e) {
1929
- const t = e.length;
1930
- const n = t > 1 ? e[t - 1] : 0;
1928
+ function vNodeData_incrementElementCount(t) {
1929
+ const e = t.length;
1930
+ const n = e > 1 ? t[e - 1] : 0;
1931
1931
  if (n >= 0) {
1932
- e.push(-1);
1932
+ t.push(-1);
1933
1933
  } else {
1934
- e[t - 1] = n - 1;
1934
+ t[e - 1] = n - 1;
1935
1935
  }
1936
1936
  }
1937
1937
 
1938
- function vNodeData_addTextSize(e, t) {
1939
- const n = e.length;
1940
- const r = n > 1 ? e[n - 1] : 0;
1938
+ function vNodeData_addTextSize(t, e) {
1939
+ const n = t.length;
1940
+ const r = n > 1 ? t[n - 1] : 0;
1941
1941
  if (n > 1 && r >= 0) {
1942
- e[0] |= 1 /* TEXT_DATA */;
1942
+ t[0] |= 1 /* TEXT_DATA */;
1943
1943
  }
1944
- e.push(t);
1945
- if (t == 0) {
1946
- e[0] |= 1 /* TEXT_DATA */;
1944
+ t.push(e);
1945
+ if (e == 0) {
1946
+ t[0] |= 1 /* TEXT_DATA */;
1947
1947
  }
1948
1948
  }
1949
1949
 
1950
- function vNodeData_openFragment(e, t) {
1951
- e.push(t, OPEN_FRAGMENT);
1952
- e[0] |= 2 /* VIRTUAL_NODE */;
1950
+ function vNodeData_openFragment(t, e) {
1951
+ t.push(e, OPEN_FRAGMENT);
1952
+ t[0] |= 2 /* VIRTUAL_NODE */;
1953
1953
  }
1954
1954
 
1955
- function vNodeData_closeFragment(e) {
1956
- e.push(CLOSE_FRAGMENT);
1955
+ function vNodeData_closeFragment(t) {
1956
+ t.push(CLOSE_FRAGMENT);
1957
1957
  }
1958
1958
 
1959
- function vNodeData_openElement(e) {
1960
- e.push({}, WRITE_ELEMENT_ATTRS);
1961
- e[0] |= 4 /* ELEMENT_NODE */;
1959
+ function vNodeData_openElement(t) {
1960
+ t.push({}, WRITE_ELEMENT_ATTRS);
1961
+ t[0] |= 4 /* ELEMENT_NODE */;
1962
1962
  }
1963
1963
 
1964
- function vNodeData_createSsrNodeReference(e, t, n, r, s) {
1965
- t[0] |= 8 /* REFERENCE */;
1964
+ function vNodeData_createSsrNodeReference(t, e, n, r, s) {
1965
+ e[0] |= 8 /* REFERENCE */;
1966
1966
  const i = [ -1 ];
1967
1967
  let o = -1;
1968
- for (let e = 1; e < t.length; e++) {
1969
- const n = t[e];
1968
+ for (let t = 1; t < e.length; t++) {
1969
+ const n = e[t];
1970
1970
  if (typeof n === "object" && n !== null) {
1971
- o = e;
1972
- e++;
1973
- if (t[e] !== WRITE_ELEMENT_ATTRS) {
1971
+ o = t;
1972
+ t++;
1973
+ if (e[t] !== WRITE_ELEMENT_ATTRS) {
1974
1974
  i[i.length - 1]++;
1975
1975
  i.push(-1);
1976
1976
  }
1977
1977
  } else if (n === CLOSE_FRAGMENT) {
1978
1978
  i.pop();
1979
1979
  } else if (n < 0) {
1980
- const e = 0 - n;
1981
- i[i.length - 1] += e;
1980
+ const t = 0 - n;
1981
+ i[i.length - 1] += t;
1982
1982
  } else {
1983
1983
  i[i.length - 1]++;
1984
1984
  }
1985
1985
  }
1986
1986
  let a = String(n);
1987
- if (t[0] & (2 /* VIRTUAL_NODE */ | 1 /* TEXT_DATA */)) {
1988
- for (let e = 0; e < i.length; e++) {
1989
- const t = i[e];
1990
- if (t >= 0) {
1991
- a += encodeAsAlphanumeric(t);
1987
+ if (e[0] & (2 /* VIRTUAL_NODE */ | 1 /* TEXT_DATA */)) {
1988
+ for (let t = 0; t < i.length; t++) {
1989
+ const e = i[t];
1990
+ if (e >= 0) {
1991
+ a += encodeAsAlphanumeric(e);
1992
1992
  }
1993
1993
  }
1994
1994
  }
1995
- return new SsrNode(e, a, o, r, t, s);
1995
+ return new SsrNode(t, a, o, r, e, s);
1996
1996
  }
1997
1997
 
1998
1998
  var ALPHANUMERIC = [];
1999
1999
 
2000
- function encodeAsAlphanumeric(e) {
2001
- while (ALPHANUMERIC.length <= e) {
2002
- let e = ALPHANUMERIC.length;
2003
- let t = "";
2000
+ function encodeAsAlphanumeric(t) {
2001
+ while (ALPHANUMERIC.length <= t) {
2002
+ let t = ALPHANUMERIC.length;
2003
+ let e = "";
2004
2004
  do {
2005
- t = String.fromCharCode((t.length === 0 ? 65 : 97) + e % 26
2006
- /* A-Z */) + t;
2007
- e = Math.floor(e / 26
2005
+ e = String.fromCharCode((e.length === 0 ? 65 : 97) + t % 26
2006
+ /* A-Z */) + e;
2007
+ t = Math.floor(t / 26
2008
2008
  /* A-Z */);
2009
- } while (e !== 0);
2010
- ALPHANUMERIC.push(t);
2009
+ } while (t !== 0);
2010
+ ALPHANUMERIC.push(e);
2011
2011
  }
2012
- return ALPHANUMERIC[e];
2012
+ return ALPHANUMERIC[t];
2013
2013
  }
2014
2014
 
2015
2015
  // packages/qwik/src/server/ssr-container.ts
@@ -2017,27 +2017,27 @@ var VALID_ELEMENT_NAME = /^[A-Za-z][A-Za-z0-9._:-]*$/;
2017
2017
 
2018
2018
  var NO_SCRIPT_HERE_ELEMENTS = /* @__PURE__ */ new Set([ "script", "style", "textarea", "title", "iframe", "noframes", "noscript", "xmp", "template", "svg", "math" ]);
2019
2019
 
2020
- function ssrCreateContainer(e) {
2021
- e.renderOptions ||= {};
2020
+ function ssrCreateContainer(t) {
2021
+ t.renderOptions ||= {};
2022
2022
  return new SSRContainer({
2023
- tagName: e.tagName || "div",
2024
- writer: e.writer || new StringSSRWriter,
2025
- streamHandler: e.streamHandler,
2026
- locale: e.locale || "",
2027
- timing: e.timing || {
2023
+ tagName: t.tagName || "div",
2024
+ writer: t.writer || new StringSSRWriter,
2025
+ streamHandler: t.streamHandler,
2026
+ locale: t.locale || "",
2027
+ timing: t.timing || {
2028
2028
  firstFlush: 0,
2029
2029
  render: 0,
2030
2030
  snapshot: 0
2031
2031
  },
2032
- buildBase: e.buildBase || "/build/",
2033
- resolvedManifest: e.resolvedManifest || {
2032
+ buildBase: t.buildBase || "/build/",
2033
+ resolvedManifest: t.resolvedManifest || {
2034
2034
  mapper: {},
2035
2035
  manifest: {
2036
2036
  manifestHash: "dev",
2037
2037
  mapping: {}
2038
2038
  }
2039
2039
  },
2040
- renderOptions: e.renderOptions
2040
+ renderOptions: t.renderOptions
2041
2041
  });
2042
2042
  }
2043
2043
 
@@ -2121,88 +2121,88 @@ var SSRContainer = class extends Cc {
2121
2121
  emittedSyncFnCount=0;
2122
2122
  rootContainerSerializedRootCount=0;
2123
2123
  emittedVNodeDataOwners=null;
2124
- constructor(e) {
2125
- super(e.renderOptions.serverData ?? {}, e.locale);
2126
- this.symbolToChunkResolver = e => {
2127
- const t = e.lastIndexOf("_");
2128
- const n = this.resolvedManifest.mapper[t == -1 ? e : e.substring(t + 1)];
2124
+ constructor(t) {
2125
+ super(t.renderOptions.serverData ?? {}, t.locale);
2126
+ this.symbolToChunkResolver = t => {
2127
+ const e = t.lastIndexOf("_");
2128
+ const n = this.resolvedManifest.mapper[e == -1 ? t : t.substring(e + 1)];
2129
2129
  return n ? n[1] : "";
2130
2130
  };
2131
- this.serializationCtx = this.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, e.writer);
2131
+ this.serializationCtx = this.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, t.writer);
2132
2132
  this.renderTimer = createTimer();
2133
- this.tag = e.tagName;
2134
- this.isHtml = e.tagName === "html";
2135
- this.writer = e.writer;
2136
- this.streamHandler = e.streamHandler;
2137
- this.timing = e.timing;
2138
- this.De = e.buildBase;
2139
- this.resolvedManifest = e.resolvedManifest;
2140
- this.renderOptions = e.renderOptions;
2141
- const t = this.renderOptions.streaming?.outOfOrder === true;
2133
+ this.tag = t.tagName;
2134
+ this.isHtml = t.tagName === "html";
2135
+ this.writer = t.writer;
2136
+ this.streamHandler = t.streamHandler;
2137
+ this.timing = t.timing;
2138
+ this.De = t.buildBase;
2139
+ this.resolvedManifest = t.resolvedManifest;
2140
+ this.renderOptions = t.renderOptions;
2141
+ const e = this.renderOptions.streaming?.outOfOrder === true;
2142
2142
  if (!__EXPERIMENTAL__.suspense) {
2143
- if (t) {
2143
+ if (e) {
2144
2144
  throw new Error('Out-of-order Suspense streaming requires `experimental: ["suspense"]` in the `qwikVite` plugin.');
2145
2145
  }
2146
2146
  this.outOfOrderStreaming = false;
2147
2147
  } else {
2148
- this.outOfOrderStreaming = t;
2148
+ this.outOfOrderStreaming = e;
2149
2149
  }
2150
2150
  this.Fe = 1e5;
2151
2151
  const n = this.renderOptions.qwikLoader;
2152
2152
  this.qlInclude = n ? typeof n === "object" ? n.include === "never" ? 2 /* Done */ : 0 /* Module */ : n === "inline" ? 1 /* Inline */ : n === "never" ? 2 /* Done */ : 0 /* Module */ : 0 /* Module */;
2153
2153
  if (this.qlInclude === 0 /* Module */) {
2154
- const e = this.resolvedManifest?.manifest.qwikLoader;
2155
- if (!e) {
2154
+ const t = this.resolvedManifest?.manifest.qwikLoader;
2155
+ if (!t) {
2156
2156
  this.qlInclude = 1 /* Inline */;
2157
2157
  }
2158
2158
  }
2159
2159
  this.m();
2160
2160
  }
2161
- ensureProjectionResolved(e) {}
2162
- handleError(e, t) {
2163
- throw e;
2161
+ ensureProjectionResolved(t) {}
2162
+ handleError(t, e) {
2163
+ throw t;
2164
2164
  }
2165
- addBackpatchEntry(e, t, n) {
2166
- const r = parseInt(e, 10);
2165
+ addBackpatchEntry(t, e, n) {
2166
+ const r = parseInt(t, 10);
2167
2167
  const s = {
2168
- attrName: t,
2168
+ attrName: e,
2169
2169
  value: n
2170
2170
  };
2171
2171
  const i = this.backpatchMap.get(r) || [];
2172
2172
  i.push(s);
2173
2173
  this.backpatchMap.set(r, i);
2174
2174
  }
2175
- async render(e) {
2175
+ async render(t) {
2176
2176
  this.openContainer();
2177
- await this.renderJSX(e, {
2177
+ await this.renderJSX(t, {
2178
2178
  currentStyleScoped: null,
2179
2179
  parentComponentFrame: this.getComponentFrame()
2180
2180
  });
2181
2181
  await this.closeContainer();
2182
2182
  }
2183
- async renderJSX(e, t) {
2184
- await zn(this, e, t);
2183
+ async renderJSX(t, e) {
2184
+ await zn(this, t, e);
2185
2185
  }
2186
2186
  v() {
2187
2187
  return this.i === 2 /* OOOSReady */;
2188
2188
  }
2189
- /** Queue OOOS serialization/write work that must not overlap with root state serialization. */ S(e) {
2189
+ /** Queue OOOS serialization/write work that must not overlap with root state serialization. */ S(t) {
2190
2190
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming) {
2191
- return e();
2191
+ return t();
2192
2192
  }
2193
2193
  if (this.i === 0 /* NotReady */) {
2194
- return e();
2194
+ return t();
2195
2195
  }
2196
- const t = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.A()).then(e) : this.renderQueue.then(e);
2197
- this.renderQueue = t.catch(() => {});
2198
- return t;
2196
+ const e = this.i === 1 /* DataStreamStarted */ ? this.renderQueue.then(() => this.A()).then(t) : this.renderQueue.then(t);
2197
+ this.renderQueue = e.catch(() => {});
2198
+ return e;
2199
2199
  }
2200
2200
  A() {
2201
2201
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || this.v()) {
2202
2202
  return;
2203
2203
  }
2204
- return this.rootContainerReadyPromise ||= new Promise(e => {
2205
- this.resolveRootContainerReady = e;
2204
+ return this.rootContainerReadyPromise ||= new Promise(t => {
2205
+ this.resolveRootContainerReady = t;
2206
2206
  });
2207
2207
  }
2208
2208
  C() {
@@ -2222,13 +2222,13 @@ var SSRContainer = class extends Cc {
2222
2222
  this.outOfOrderUsed = true;
2223
2223
  return ++this.outOfOrderId;
2224
2224
  }
2225
- emitOutOfOrderSegmentScripts(e) {
2226
- if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || !e) {
2225
+ emitOutOfOrderSegmentScripts(t) {
2226
+ if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || !t) {
2227
2227
  return;
2228
2228
  }
2229
- this.write(e);
2229
+ this.write(t);
2230
2230
  }
2231
- async segment(e, t, n) {
2231
+ async segment(t, e, n) {
2232
2232
  if (!__EXPERIMENTAL__.suspense) {
2233
2233
  throw new Error('Out-of-order Suspense streaming requires `experimental: ["suspense"]` in the `qwikVite` plugin.');
2234
2234
  }
@@ -2237,30 +2237,30 @@ var SSRContainer = class extends Cc {
2237
2237
  }
2238
2238
  this.markVNodeRefForSerialization(n.parentComponentFrame?.componentNode);
2239
2239
  const r = new StringBufferSegmentWriter;
2240
- const s = this.createSegmentContainer(e, r);
2240
+ const s = this.createSegmentContainer(t, r);
2241
2241
  this.outOfOrderSegments.push(s);
2242
2242
  try {
2243
- await s.renderJSX(t, n);
2243
+ await s.renderJSX(e, n);
2244
2244
  await s.resolvePromiseAttributes();
2245
- const e = r.extract();
2245
+ const t = r.extract();
2246
2246
  return {
2247
2247
  container: s,
2248
2248
  writer: r,
2249
- htmlChunks: e
2249
+ htmlChunks: t
2250
2250
  };
2251
- } catch (e) {
2251
+ } catch (t) {
2252
2252
  this.removeOutOfOrderSegment(s);
2253
- throw e;
2253
+ throw t;
2254
2254
  }
2255
2255
  }
2256
2256
  I() {
2257
- let e = this;
2258
- while (e instanceof SSRSegmentContainer) {
2259
- e = e.Le;
2257
+ let t = this;
2258
+ while (t instanceof SSRSegmentContainer) {
2259
+ t = t.Le;
2260
2260
  }
2261
- return e;
2261
+ return t;
2262
2262
  }
2263
- createSegmentContainer(e, t) {
2263
+ createSegmentContainer(t, e) {
2264
2264
  const n = this.I();
2265
2265
  const r = this.getOrCreateLastNode();
2266
2266
  this.addRoot(r);
@@ -2277,7 +2277,7 @@ var SSRContainer = class extends Cc {
2277
2277
  };
2278
2278
  const i = new SSRSegmentContainer({
2279
2279
  tagName: this.tag,
2280
- writer: t,
2280
+ writer: e,
2281
2281
  streamHandler: noopStreamHandler,
2282
2282
  locale: this.en,
2283
2283
  timing: this.timing,
@@ -2288,14 +2288,14 @@ var SSRContainer = class extends Cc {
2288
2288
  const o = i;
2289
2289
  o.Bn = true;
2290
2290
  o.yt = this.yt;
2291
- i.serializationCtx = i.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, t);
2291
+ i.serializationCtx = i.serializationCtxFactory(SsrNode, DomRef, this.symbolToChunkResolver, e);
2292
2292
  i.serializationCtx.Et = this.serializationCtx.Et.bind(this.serializationCtx);
2293
2293
  i.currentElementFrame = s;
2294
2294
  i.currentComponentNode = this.currentComponentNode;
2295
2295
  i.depthFirstElementCount = 0;
2296
2296
  i.vNodeDatas = [ s.vNodeData ];
2297
2297
  i.componentStack = this.componentStack.slice();
2298
- i.vnodeSegment = e;
2298
+ i.vnodeSegment = t;
2299
2299
  i.styleIds = this.styleIds;
2300
2300
  i.emittedQwikEventNames = this.emittedQwikEventNames;
2301
2301
  i.qlInclude = 2 /* Done */;
@@ -2303,52 +2303,52 @@ var SSRContainer = class extends Cc {
2303
2303
  o._didAddQwikLoader = true;
2304
2304
  return i;
2305
2305
  }
2306
- queueOutOfOrderSegment(e) {
2306
+ queueOutOfOrderSegment(t) {
2307
2307
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming) {
2308
2308
  return;
2309
2309
  }
2310
- this.outOfOrderPendingSegments.push(e);
2310
+ this.outOfOrderPendingSegments.push(t);
2311
2311
  }
2312
- removeOutOfOrderSegment(e) {
2313
- const t = this.outOfOrderSegments;
2314
- for (let n = 0; n < t.length; n++) {
2315
- if (t[n] === e) {
2316
- t.splice(n, 1);
2312
+ removeOutOfOrderSegment(t) {
2313
+ const e = this.outOfOrderSegments;
2314
+ for (let n = 0; n < e.length; n++) {
2315
+ if (e[n] === t) {
2316
+ e.splice(n, 1);
2317
2317
  return;
2318
2318
  }
2319
2319
  }
2320
2320
  }
2321
- setContext(e, t, n) {
2322
- const r = e;
2321
+ setContext(t, e, n) {
2322
+ const r = t;
2323
2323
  let s = r.getProp(mr);
2324
2324
  if (s == null) {
2325
2325
  r.setProp(mr, s = []);
2326
2326
  }
2327
- We(s, t.id, n, 0, true);
2327
+ We(s, e.id, n, 0, true);
2328
2328
  this.addRoot(r);
2329
2329
  }
2330
- resolveContext(e, t) {
2331
- let n = e;
2330
+ resolveContext(t, e) {
2331
+ let n = t;
2332
2332
  while (n) {
2333
- const e = n.getProp(mr);
2334
- if (e != null && Ve(e, t.id, 0)) {
2335
- return Ue(e, t.id, 0);
2333
+ const t = n.getProp(mr);
2334
+ if (t != null && Ve(t, e.id, 0)) {
2335
+ return Ue(t, e.id, 0);
2336
2336
  }
2337
2337
  n = n.parentComponent;
2338
2338
  }
2339
2339
  return void 0;
2340
2340
  }
2341
- getParentHost(e) {
2342
- const t = e;
2343
- return t.parentComponent;
2341
+ getParentHost(t) {
2342
+ const e = t;
2343
+ return e.parentComponent;
2344
2344
  }
2345
- setHostProp(e, t, n) {
2346
- const r = e;
2347
- return r.setProp(t, n);
2345
+ setHostProp(t, e, n) {
2346
+ const r = t;
2347
+ return r.setProp(e, n);
2348
2348
  }
2349
- getHostProp(e, t) {
2350
- const n = e;
2351
- return n.getProp(t);
2349
+ getHostProp(t, e) {
2350
+ const n = t;
2351
+ return n.getProp(e);
2352
2352
  }
2353
2353
  /**
2354
2354
  * Renders opening tag for container. It could be a html tag for regular apps or custom element
@@ -2357,24 +2357,24 @@ var SSRContainer = class extends Cc {
2357
2357
  if (this.tag == "html") {
2358
2358
  this.write("<!DOCTYPE html>");
2359
2359
  }
2360
- const e = this.renderOptions.containerAttributes || {};
2361
- const t = e[QRenderAttr];
2362
- e[kr] = "paused" /* PAUSED */;
2363
- e[QRuntimeAttr] = "2";
2364
- e[QVersionAttr] = this.je ?? "dev";
2365
- e[QRenderAttr] = (t ? t + "-" : "") + (isDev8 ? "ssr-dev" : "ssr");
2366
- e[vr] = this.De || "";
2367
- e[QLocaleAttr] = this.en;
2368
- e[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
2369
- e[QInstanceAttr] = this.Ht;
2360
+ const t = this.renderOptions.containerAttributes || {};
2361
+ const e = t[QRenderAttr];
2362
+ t[kr] = "paused" /* PAUSED */;
2363
+ t[QRuntimeAttr] = "2";
2364
+ t[QVersionAttr] = this.je ?? "dev";
2365
+ t[QRenderAttr] = (e ? e + "-" : "") + (isDev8 ? "ssr-dev" : "ssr");
2366
+ t[br] = this.De || "";
2367
+ t[QLocaleAttr] = this.en;
2368
+ t[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
2369
+ t[QInstanceAttr] = this.Ht;
2370
2370
  const n = this.renderOptions.statePrewarm;
2371
2371
  if (typeof n === "number") {
2372
- e[QStatePrewarmAttr] = String(n);
2372
+ t[QStatePrewarmAttr] = String(n);
2373
2373
  } else {
2374
- delete e[QStatePrewarmAttr];
2374
+ delete t[QStatePrewarmAttr];
2375
2375
  }
2376
- this.un.containerAttributes = e;
2377
- this.openElement(this.tag, null, e);
2376
+ this.un.containerAttributes = t;
2377
+ this.openElement(this.tag, null, t);
2378
2378
  if (!this.isHtml) {
2379
2379
  this.emitContainerDataFrame = this.currentElementFrame;
2380
2380
  }
@@ -2384,19 +2384,19 @@ var SSRContainer = class extends Cc {
2384
2384
  }
2385
2385
  Tt=0;
2386
2386
  /** Renders opening tag for DOM element */
2387
- openElement(e, t, n, r = null, s = null, i = null, o = true) {
2388
- if (!VALID_ELEMENT_NAME.test(e)) {
2389
- throw Ye(36 /* invalidElementName */ , [ JSON.stringify(e) ]);
2387
+ openElement(t, e, n, r = null, s = null, i = null, o = true) {
2388
+ if (!VALID_ELEMENT_NAME.test(t)) {
2389
+ throw Ye(36 /* invalidElementName */ , [ JSON.stringify(t) ]);
2390
2390
  }
2391
- const a = isQwikStyleElement(e, n) || isQwikStyleElement(e, r);
2392
- if (NO_SCRIPT_HERE_ELEMENTS.has(e)) {
2391
+ const a = isQwikStyleElement(t, n) || isQwikStyleElement(t, r);
2392
+ if (NO_SCRIPT_HERE_ELEMENTS.has(t)) {
2393
2393
  this.Tt++;
2394
2394
  }
2395
2395
  if (
2396
2396
  // don't append qwik loader before qwik style elements
2397
2397
  // it will confuse the resuming, because styles are expected to be the first nodes in subtree
2398
2398
  !a && this.qlInclude === 1 /* Inline */) {
2399
- if (this.Tt === 0 && this.size > 30 * 1024 && e !== "body") {
2399
+ if (this.Tt === 0 && this.size > 30 * 1024 && t !== "body") {
2400
2400
  this.emitQwikLoaderInline();
2401
2401
  }
2402
2402
  }
@@ -2405,27 +2405,27 @@ var SSRContainer = class extends Cc {
2405
2405
  if (!a && this.currentElementFrame) {
2406
2406
  vNodeData_incrementElementCount(this.currentElementFrame.vNodeData);
2407
2407
  }
2408
- this.createAndPushFrame(e, this.depthFirstElementCount++, i);
2409
- if (this.isHtml && e === "body" && this.emitContainerDataFrame === null) {
2408
+ this.createAndPushFrame(t, this.depthFirstElementCount++, i);
2409
+ if (this.isHtml && t === "body" && this.emitContainerDataFrame === null) {
2410
2410
  this.emitContainerDataFrame = this.currentElementFrame;
2411
2411
  }
2412
2412
  vNodeData_openElement(this.currentElementFrame.vNodeData);
2413
2413
  this.write(LT);
2414
- this.write(e);
2414
+ this.write(t);
2415
2415
  const c = this.getOrCreateLastNode();
2416
2416
  if (n) {
2417
- l = this.writeAttrs(e, n, false, s, i, o);
2417
+ l = this.writeAttrs(t, n, false, s, i, o);
2418
2418
  }
2419
2419
  this.write(" " + Br);
2420
- if (t !== null) {
2420
+ if (e !== null) {
2421
2421
  this.write(ATTR_EQUALS_QUOTE);
2422
- this.write(escapeHTML(t));
2422
+ this.write(escapeHTML(e));
2423
2423
  this.write(Li);
2424
2424
  } else if (qTest) {
2425
2425
  this.write(EMPTY_ATTR);
2426
2426
  }
2427
2427
  if (r && !Oi(r)) {
2428
- l = this.writeAttrs(e, r, true, s, i, o) || l;
2428
+ l = this.writeAttrs(t, r, true, s, i, o) || l;
2429
2429
  }
2430
2430
  this.write(GT);
2431
2431
  if (c) {
@@ -2437,9 +2437,9 @@ var SSRContainer = class extends Cc {
2437
2437
  if (this.currentElementFrame === this.emitContainerDataFrame) {
2438
2438
  this.emitContainerDataFrame = null;
2439
2439
  this.onRenderDone();
2440
- const e = createTimer();
2440
+ const t = createTimer();
2441
2441
  return Kr(Kr(this.emitContainerData(), () => this._closeElement()), () => {
2442
- this.timing.snapshot = e();
2442
+ this.timing.snapshot = t();
2443
2443
  });
2444
2444
  }
2445
2445
  this._closeElement();
@@ -2449,33 +2449,33 @@ var SSRContainer = class extends Cc {
2449
2449
  this.timing.render = this.renderTimer();
2450
2450
  }
2451
2451
  /** Drain cleanup queue and cleanup tasks etc. */ drainCleanupQueue() {
2452
- let e = this.cleanupQueue.pop();
2453
- while (e) {
2454
- for (let t = 0; t < e.length; t++) {
2455
- const n = e[t];
2452
+ let t = this.cleanupQueue.pop();
2453
+ while (t) {
2454
+ for (let e = 0; e < t.length; e++) {
2455
+ const n = t[e];
2456
2456
  if (hasDestroy(n)) {
2457
2457
  n.cn();
2458
2458
  }
2459
2459
  }
2460
- e = this.cleanupQueue.pop();
2460
+ t = this.cleanupQueue.pop();
2461
2461
  }
2462
2462
  }
2463
2463
  _closeElement() {
2464
- const e = this.popFrame();
2465
- const t = e.elementName;
2466
- if (!isSelfClosingTag(t)) {
2464
+ const t = this.popFrame();
2465
+ const e = t.elementName;
2466
+ if (!isSelfClosingTag(e)) {
2467
2467
  this.write(CLOSE_TAG);
2468
- this.write(t);
2468
+ this.write(e);
2469
2469
  this.write(GT);
2470
2470
  }
2471
2471
  this.lastNode = null;
2472
- if (NO_SCRIPT_HERE_ELEMENTS.has(t)) {
2472
+ if (NO_SCRIPT_HERE_ELEMENTS.has(e)) {
2473
2473
  this.Tt--;
2474
2474
  }
2475
2475
  }
2476
- /** Writes opening data to vNodeData for fragment boundaries */ openFragment(e) {
2476
+ /** Writes opening data to vNodeData for fragment boundaries */ openFragment(t) {
2477
2477
  this.lastNode = null;
2478
- vNodeData_openFragment(this.currentElementFrame.vNodeData, e);
2478
+ vNodeData_openFragment(this.currentElementFrame.vNodeData, t);
2479
2479
  this.getOrCreateLastNode();
2480
2480
  }
2481
2481
  /** Writes closing data to vNodeData for fragment boundaries */ closeFragment() {
@@ -2485,29 +2485,29 @@ var SSRContainer = class extends Cc {
2485
2485
  }
2486
2486
  this.lastNode = null;
2487
2487
  }
2488
- openProjection(e) {
2489
- this.openFragment(e);
2490
- const t = this.getComponentFrame();
2491
- if (t) {
2492
- const e = this.getOrCreateLastNode();
2493
- this.markVNodeRefForSerialization(e);
2488
+ openProjection(t) {
2489
+ this.openFragment(t);
2490
+ const e = this.getComponentFrame();
2491
+ if (e) {
2492
+ const t = this.getOrCreateLastNode();
2493
+ this.markVNodeRefForSerialization(t);
2494
2494
  if (!this.vnodeSegment) {
2495
- this.addRoot(t.componentNode);
2495
+ this.addRoot(e.componentNode);
2496
2496
  } else {
2497
- this.markVNodeRefForSerialization(t.componentNode);
2497
+ this.markVNodeRefForSerialization(e.componentNode);
2498
2498
  }
2499
- t.projectionDepth++;
2499
+ e.projectionDepth++;
2500
2500
  }
2501
2501
  }
2502
2502
  closeProjection() {
2503
- const e = this.getComponentFrame();
2504
- if (e) {
2505
- e.projectionDepth--;
2503
+ const t = this.getComponentFrame();
2504
+ if (t) {
2505
+ t.projectionDepth--;
2506
2506
  }
2507
2507
  this.closeFragment();
2508
2508
  }
2509
- /** Writes opening data to vNodeData for component boundaries */ openComponent(e) {
2510
- this.openFragment(e);
2509
+ /** Writes opening data to vNodeData for component boundaries */ openComponent(t) {
2510
+ this.openFragment(t);
2511
2511
  this.currentComponentNode = this.getOrCreateLastNode();
2512
2512
  this.componentStack.push(new SsrComponentFrame(this.currentComponentNode));
2513
2513
  }
@@ -2517,89 +2517,89 @@ var SSRContainer = class extends Cc {
2517
2517
  * @param projectionDepth - How many levels of projection to skip. This is needed when projections
2518
2518
  * are nested inside other projections we need to have a way to read from a frame above.
2519
2519
  * @returns
2520
- */ getComponentFrame(e = 0) {
2521
- const t = this.componentStack.length;
2522
- const n = t - e - 1;
2520
+ */ getComponentFrame(t = 0) {
2521
+ const e = this.componentStack.length;
2522
+ const n = e - t - 1;
2523
2523
  return n >= 0 ? this.componentStack[n] : null;
2524
2524
  }
2525
2525
  getParentComponentFrame() {
2526
- const e = this.getComponentFrame()?.projectionDepth || 0;
2527
- return this.getComponentFrame(e);
2526
+ const t = this.getComponentFrame()?.projectionDepth || 0;
2527
+ return this.getComponentFrame(t);
2528
2528
  }
2529
2529
  /** Writes closing data to vNodeData for component boundaries and emit unclaimed projections inline */ async closeComponent() {
2530
- const e = this.componentStack.pop();
2531
- await this.emitUnclaimedProjectionForComponent(e);
2530
+ const t = this.componentStack.pop();
2531
+ await this.emitUnclaimedProjectionForComponent(t);
2532
2532
  this.closeFragment();
2533
2533
  this.currentComponentNode = this.currentComponentNode?.parentComponent || null;
2534
2534
  }
2535
- async emitUnclaimedProjectionForComponent(e) {
2536
- if (e.slots.length === 0) {
2535
+ async emitUnclaimedProjectionForComponent(t) {
2536
+ if (t.slots.length === 0) {
2537
2537
  return;
2538
2538
  }
2539
2539
  this.openElement(Pr, null, QTemplateProps, null);
2540
- const t = e.projectionScopedStyle;
2541
- for (let n = 0; n < e.slots.length; n += 2) {
2542
- const r = e.slots[n];
2543
- const s = e.slots[n + 1];
2540
+ const e = t.projectionScopedStyle;
2541
+ for (let n = 0; n < t.slots.length; n += 2) {
2542
+ const r = t.slots[n];
2543
+ const s = t.slots[n + 1];
2544
2544
  if (this.vnodeSegment) {
2545
- this.markVNodeRefForSerialization(e.componentNode);
2545
+ this.markVNodeRefForSerialization(t.componentNode);
2546
2546
  }
2547
2547
  this.openFragment(isDev8 ? {
2548
2548
  [Ze]: "P" /* Projection */ ,
2549
- [QSlotParent]: e.componentNode.id,
2549
+ [QSlotParent]: t.componentNode.id,
2550
2550
  [cr]: r
2551
2551
  } : {
2552
- [QSlotParent]: e.componentNode.id,
2552
+ [QSlotParent]: t.componentNode.id,
2553
2553
  [cr]: r
2554
2554
  });
2555
2555
  const i = this.getOrCreateLastNode();
2556
2556
  i.vnodeData[0] |= 16 /* SERIALIZE */;
2557
- e.componentNode.setProp(r, i.id);
2557
+ t.componentNode.setProp(r, i.id);
2558
2558
  await this.renderJSX(s, {
2559
- currentStyleScoped: t,
2560
- parentComponentFrame: e.projectionComponentFrame
2559
+ currentStyleScoped: e,
2560
+ parentComponentFrame: t.projectionComponentFrame
2561
2561
  });
2562
2562
  this.closeFragment();
2563
2563
  }
2564
2564
  this.closeElement();
2565
2565
  }
2566
- /** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */ textNode(e) {
2567
- this.write(escapeHTML(e));
2568
- vNodeData_addTextSize(this.currentElementFrame.vNodeData, e.length);
2566
+ /** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */ textNode(t) {
2567
+ this.write(escapeHTML(t));
2568
+ vNodeData_addTextSize(this.currentElementFrame.vNodeData, t.length);
2569
2569
  this.lastNode = null;
2570
2570
  }
2571
- htmlNode(e) {
2572
- this.write(e);
2571
+ htmlNode(t) {
2572
+ this.write(t);
2573
2573
  }
2574
- commentNode(e) {
2575
- this.write("\x3c!--" + e + "--\x3e");
2574
+ commentNode(t) {
2575
+ this.write("\x3c!--" + t + "--\x3e");
2576
2576
  }
2577
- addRoot(e) {
2577
+ addRoot(t) {
2578
2578
  if (this.t) {
2579
- const t = this.serializationCtx.Ne(e);
2580
- return t;
2579
+ const e = this.serializationCtx.Ne(t);
2580
+ return e;
2581
2581
  }
2582
- return this.serializationCtx.Rt(e);
2582
+ return this.serializationCtx.Rt(t);
2583
2583
  }
2584
2584
  getOrCreateLastNode() {
2585
2585
  if (!this.lastNode) {
2586
- const e = this.currentElementFrame;
2587
- const t = e.depthFirstElementIdx + 1;
2588
- const n = e.refBase ?? (this.vnodeSegment ? ir(this.vnodeSegment, t) : t + this.vNodeDataOffset);
2589
- this.lastNode = vNodeData_createSsrNodeReference(this.currentComponentNode, e.vNodeData, n, this.cleanupQueue, e.currentFile);
2586
+ const t = this.currentElementFrame;
2587
+ const e = t.depthFirstElementIdx + 1;
2588
+ const n = t.refBase ?? (this.vnodeSegment ? ir(this.vnodeSegment, e) : e + this.vNodeDataOffset);
2589
+ this.lastNode = vNodeData_createSsrNodeReference(this.currentComponentNode, t.vNodeData, n, this.cleanupQueue, t.currentFile);
2590
2590
  }
2591
2591
  return this.lastNode;
2592
2592
  }
2593
- addUnclaimedProjection(e, t, n) {
2594
- e.slots.push(t, n);
2593
+ addUnclaimedProjection(t, e, n) {
2594
+ t.slots.push(e, n);
2595
2595
  }
2596
2596
  m() {
2597
- const e = this.resolvedManifest.manifest.injections;
2598
- if (!e) {
2597
+ const t = this.resolvedManifest.manifest.injections;
2598
+ if (!t) {
2599
2599
  return;
2600
2600
  }
2601
- for (let t = 0; t < e.length; t++) {
2602
- const n = e[t];
2601
+ for (let e = 0; e < t.length; e++) {
2602
+ const n = t[e];
2603
2603
  const r = ao(n.tag, null, n.attributes || {}, null, 0, null);
2604
2604
  if (n.location === "head") {
2605
2605
  this.additionalHeadNodes.push(r);
@@ -2608,44 +2608,44 @@ var SSRContainer = class extends Cc {
2608
2608
  }
2609
2609
  }
2610
2610
  }
2611
- Ye(e, t, n, r) {
2611
+ Ye(t, e, n, r) {
2612
2612
  if (r) {
2613
- const e = this.getComponentFrame(0);
2614
- e.scopedStyleIds.add(t);
2615
- const r = convertStyleIdsToString(e.scopedStyleIds);
2613
+ const t = this.getComponentFrame(0);
2614
+ t.scopedStyleIds.add(e);
2615
+ const r = convertStyleIdsToString(t.scopedStyleIds);
2616
2616
  this.setHostProp(n, yr, r);
2617
2617
  }
2618
- if (!this.styleIds.has(t)) {
2619
- this.styleIds.add(t);
2618
+ if (!this.styleIds.has(e)) {
2619
+ this.styleIds.add(e);
2620
2620
  if (this.currentElementFrame?.elementName === "html") {
2621
2621
  this.additionalHeadNodes.push(fo("style", null, {
2622
- dangerouslySetInnerHTML: e,
2623
- [dr]: t
2624
- }, null, 0, t));
2622
+ dangerouslySetInnerHTML: t,
2623
+ [dr]: e
2624
+ }, null, 0, e));
2625
2625
  } else {
2626
- this._styleNode(t, e);
2626
+ this._styleNode(e, t);
2627
2627
  }
2628
2628
  }
2629
2629
  }
2630
- _styleNode(e, t) {
2630
+ _styleNode(t, e) {
2631
2631
  this.openElement("style", null, {
2632
- [dr]: e
2632
+ [dr]: t
2633
2633
  });
2634
- this.write(t);
2634
+ this.write(e);
2635
2635
  this.closeElement();
2636
2636
  }
2637
- ft(e) {
2637
+ ft(t) {
2638
2638
  if (this.isHtml && this.currentElementFrame?.elementName === "html") {
2639
- this.additionalHeadNodes.push(e);
2639
+ this.additionalHeadNodes.push(t);
2640
2640
  return true;
2641
2641
  }
2642
2642
  return false;
2643
2643
  }
2644
2644
  ////////////////////////////////////
2645
2645
  emitContainerData() {
2646
- const e = this.renderOptions.streaming?.inOrder?.strategy === "disabled";
2647
- const t = !e || __EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed;
2648
- return Kr(Kr(t ? this.streamHandler.flush() : void 0, () => this.resolvePromiseAttributes()), () => {
2646
+ const t = this.renderOptions.streaming?.inOrder?.strategy === "disabled";
2647
+ const e = !t || __EXPERIMENTAL__.suspense && this.outOfOrderStreaming && this.outOfOrderUsed;
2648
+ return Kr(Kr(e ? this.streamHandler.flush() : void 0, () => this.resolvePromiseAttributes()), () => {
2649
2649
  this.i = 1 /* DataStreamStarted */;
2650
2650
  return Kr(this.emitStateData(), () => {
2651
2651
  this.t = true;
@@ -2668,11 +2668,11 @@ var SSRContainer = class extends Cc {
2668
2668
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || !this.outOfOrderUsed) {
2669
2669
  return;
2670
2670
  }
2671
- for (let e = 0; e < this.outOfOrderSegments.length; e++) {
2672
- const t = this.outOfOrderSegments[e];
2673
- if (t.F === 1 /* EarlyFinalized */) {
2674
- t.rr();
2675
- e--;
2671
+ for (let t = 0; t < this.outOfOrderSegments.length; t++) {
2672
+ const e = this.outOfOrderSegments[t];
2673
+ if (e.F === 1 /* EarlyFinalized */) {
2674
+ e.rr();
2675
+ t--;
2676
2676
  }
2677
2677
  }
2678
2678
  }
@@ -2705,19 +2705,19 @@ var SSRContainer = class extends Cc {
2705
2705
  *
2706
2706
  * NOTE: Not every element will need vNodeData. So we need to encode how many elements should be
2707
2707
  * skipped. By choosing different separators we can encode different numbers of elements to skip.
2708
- */ emitVNodeData(e) {
2709
- this.I().markVNodeDataOwnerEmitted(e);
2710
- if (!e && !this.serializationCtx.le.length && !this.hasVNodeRefsForSerialization) {
2708
+ */ emitVNodeData(t) {
2709
+ this.I().markVNodeDataOwnerEmitted(t);
2710
+ if (!t && !this.serializationCtx.le.length && !this.hasVNodeRefsForSerialization) {
2711
2711
  return;
2712
2712
  }
2713
- this.emitVNodeDataScript(e, this.vNodeDatas.entries());
2713
+ this.emitVNodeDataScript(t, this.vNodeDatas.entries());
2714
2714
  }
2715
- emitVNodeDataScript(e, t, n = false) {
2715
+ emitVNodeDataScript(t, e, n = false) {
2716
2716
  const r = {
2717
2717
  type: "qwik/vnode"
2718
2718
  };
2719
- if (__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && e) {
2720
- r[hr] = e;
2719
+ if (__EXPERIMENTAL__.suspense && this.outOfOrderStreaming && t) {
2720
+ r[hr] = t;
2721
2721
  }
2722
2722
  if (n) {
2723
2723
  r[QStatePatchAttr] = true;
@@ -2725,39 +2725,39 @@ var SSRContainer = class extends Cc {
2725
2725
  this.openScript(r);
2726
2726
  const s = [];
2727
2727
  let i = 0;
2728
- for (const [e, n] of t) {
2729
- const t = n[0];
2730
- if (t & 16 /* SERIALIZE */) {
2731
- i = this.emitVNodeSeparators(i, e);
2732
- if (t & 8 /* REFERENCE */) {
2728
+ for (const [t, n] of e) {
2729
+ const e = n[0];
2730
+ if (e & 16 /* SERIALIZE */) {
2731
+ i = this.emitVNodeSeparators(i, t);
2732
+ if (e & 8 /* REFERENCE */) {
2733
2733
  this.write(VNodeDataSeparator.REFERENCE_CH);
2734
2734
  }
2735
- if (t & (1 /* TEXT_DATA */ | 2 /* VIRTUAL_NODE */ | 4 /* ELEMENT_NODE */)) {
2736
- let e = null;
2737
- let t = 0;
2735
+ if (e & (1 /* TEXT_DATA */ | 2 /* VIRTUAL_NODE */ | 4 /* ELEMENT_NODE */)) {
2736
+ let t = null;
2737
+ let e = 0;
2738
2738
  for (let r = 1; r < n.length; r++) {
2739
2739
  const i = n[r];
2740
2740
  if (typeof i === "object" && i !== null) {
2741
- s.push(e);
2742
- e = i;
2741
+ s.push(t);
2742
+ t = i;
2743
2743
  } else if (i === OPEN_FRAGMENT) {
2744
- t++;
2744
+ e++;
2745
2745
  this.write(VNodeDataChar.OPEN_CHAR);
2746
2746
  } else if (i === CLOSE_FRAGMENT) {
2747
- if (e) {
2748
- this.writeFragmentAttrs(e);
2749
- e = s.pop();
2747
+ if (t) {
2748
+ this.writeFragmentAttrs(t);
2749
+ t = s.pop();
2750
2750
  }
2751
- t--;
2751
+ e--;
2752
2752
  this.write(VNodeDataChar.CLOSE_CHAR);
2753
2753
  } else if (i === WRITE_ELEMENT_ATTRS) {
2754
- if (e && !Oi(e)) {
2754
+ if (t && !Oi(t)) {
2755
2755
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2756
2756
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2757
- this.writeFragmentAttrs(e);
2757
+ this.writeFragmentAttrs(t);
2758
2758
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2759
2759
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2760
- e = s.pop();
2760
+ t = s.pop();
2761
2761
  }
2762
2762
  } else if (i >= 0) {
2763
2763
  this.write(encodeAsAlphanumeric(i));
@@ -2765,10 +2765,10 @@ var SSRContainer = class extends Cc {
2765
2765
  this.write(String(0 - i));
2766
2766
  }
2767
2767
  }
2768
- while (t-- > 0) {
2769
- if (e) {
2770
- this.writeFragmentAttrs(e);
2771
- e = s.pop();
2768
+ while (e-- > 0) {
2769
+ if (t) {
2770
+ this.writeFragmentAttrs(t);
2771
+ t = s.pop();
2772
2772
  }
2773
2773
  this.write(VNodeDataChar.CLOSE_CHAR);
2774
2774
  }
@@ -2776,34 +2776,34 @@ var SSRContainer = class extends Cc {
2776
2776
  }
2777
2777
  }
2778
2778
  this.closeScript();
2779
- if (n && !e) {
2779
+ if (n && !t) {
2780
2780
  this.emitInlineScript("document.qProcessVNodeDataPatch&&document.qProcessVNodeDataPatch(document.currentScript.previousElementSibling)");
2781
2781
  }
2782
2782
  }
2783
- markVNodeRefForSerialization(e) {
2784
- if (e) {
2783
+ markVNodeRefForSerialization(t) {
2784
+ if (t) {
2785
2785
  this.hasVNodeRefsForSerialization = true;
2786
- e.vnodeData[0] |= 16 /* SERIALIZE */ | 8 /* REFERENCE */;
2786
+ t.vnodeData[0] |= 16 /* SERIALIZE */ | 8 /* REFERENCE */;
2787
2787
  }
2788
2788
  }
2789
- markVNodeDataOwnerEmitted(e) {
2789
+ markVNodeDataOwnerEmitted(t) {
2790
2790
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming) {
2791
2791
  return;
2792
2792
  }
2793
- (this.emittedVNodeDataOwners ||= /* @__PURE__ */ new Set).add(e);
2793
+ (this.emittedVNodeDataOwners ||= /* @__PURE__ */ new Set).add(t);
2794
2794
  }
2795
- isVNodeDataOwnerEmitted(e) {
2796
- return this.emittedVNodeDataOwners?.has(e) === true;
2795
+ isVNodeDataOwnerEmitted(t) {
2796
+ return this.emittedVNodeDataOwners?.has(t) === true;
2797
2797
  }
2798
- getVNodeDataOwnerFromNodeId(e) {
2799
- const t = parseInt(e, 10);
2800
- if (t >= 0) {
2798
+ getVNodeDataOwnerFromNodeId(t) {
2799
+ const e = parseInt(t, 10);
2800
+ if (e >= 0) {
2801
2801
  return {
2802
2802
  owner: void 0,
2803
- localIndex: t
2803
+ localIndex: e
2804
2804
  };
2805
2805
  }
2806
- const n = -t - 1;
2806
+ const n = -e - 1;
2807
2807
  const r = Math.floor((Math.sqrt(8 * n + 1) - 1) / 2);
2808
2808
  const s = r * (r + 1) / 2;
2809
2809
  const i = n - s;
@@ -2813,19 +2813,19 @@ var SSRContainer = class extends Cc {
2813
2813
  localIndex: i
2814
2814
  };
2815
2815
  }
2816
- writeFragmentAttrs(e) {
2817
- for (const t in e) {
2818
- const n = e[t];
2816
+ writeFragmentAttrs(t) {
2817
+ for (const e in t) {
2818
+ const n = t[e];
2819
2819
  let r = n;
2820
2820
  let s;
2821
2821
  let i = null;
2822
- if (t === Ir && typeof n === "number") {
2822
+ if (e === Ir && typeof n === "number") {
2823
2823
  s = n;
2824
2824
  r = String(n);
2825
2825
  } else if (typeof n !== "string") {
2826
2826
  s = this.addRoot(n);
2827
2827
  if (s === void 0) {
2828
- if (t === sr) {
2828
+ if (e === sr) {
2829
2829
  this.write(VNodeDataChar.RENDER_FN_CHAR);
2830
2830
  this.write(VNodeDataChar.RENDER_HASH_PREFIX_CHAR);
2831
2831
  this.write(encodeVNodeDataString(encodeVNodeDataKey(n.ot)));
@@ -2834,7 +2834,7 @@ var SSRContainer = class extends Cc {
2834
2834
  }
2835
2835
  r = String(s);
2836
2836
  }
2837
- switch (t) {
2837
+ switch (e) {
2838
2838
  case yr:
2839
2839
  this.write(VNodeDataChar.SCOPED_STYLE_CHAR);
2840
2840
  break;
@@ -2886,7 +2886,7 @@ var SSRContainer = class extends Cc {
2886
2886
  {
2887
2887
  i = encodeURI;
2888
2888
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2889
- this.write(encodeVNodeDataString(encodeVNodeDataKey(t)));
2889
+ this.write(encodeVNodeDataString(encodeVNodeDataKey(e)));
2890
2890
  this.write(VNodeDataChar.SEPARATOR_CHAR);
2891
2891
  }
2892
2892
  }
@@ -2907,28 +2907,28 @@ var SSRContainer = class extends Cc {
2907
2907
  if (!this.serializationCtx.le.length && !this.serializationCtx.Te.size) {
2908
2908
  return;
2909
2909
  }
2910
- const e = this.stateScriptAttrs();
2911
- this.openScript(e);
2910
+ const t = this.stateScriptAttrs();
2911
+ this.openScript(t);
2912
2912
  this.serializationCtx.re(this.writer);
2913
2913
  return Kr(this.serializationCtx.Ut(), () => {
2914
2914
  this.closeScript();
2915
2915
  });
2916
2916
  }
2917
2917
  /** Add q-d:qidle attribute to eagerly resume some state if needed */ stateScriptAttrs() {
2918
- const e = {
2918
+ const t = {
2919
2919
  type: "qwik/state",
2920
2920
  [QInstanceAttr]: this.Ht
2921
2921
  };
2922
- const t = this.serializationCtx.Te;
2923
- if (t.size > 0) {
2924
- e["q-d:qidle"] = la(null, "_res", _, null, [ ...t ]);
2922
+ const e = this.serializationCtx.Te;
2923
+ if (e.size > 0) {
2924
+ t["q-d:qidle"] = la(null, "_res", _, null, [ ...e ]);
2925
2925
  }
2926
- return e;
2926
+ return t;
2927
2927
  }
2928
- emitSyncFnsData(e = false) {
2929
- const t = this.serializationCtx.Re;
2930
- const n = e ? this.emittedSyncFnCount : 0;
2931
- if (t.length > n) {
2928
+ emitSyncFnsData(t = false) {
2929
+ const e = this.serializationCtx.Re;
2930
+ const n = t ? this.emittedSyncFnCount : 0;
2931
+ if (e.length > n) {
2932
2932
  const r = {
2933
2933
  "q:func": "qwik/json"
2934
2934
  };
@@ -2936,44 +2936,44 @@ var SSRContainer = class extends Cc {
2936
2936
  r["nonce"] = this.renderOptions.serverData.nonce;
2937
2937
  }
2938
2938
  this.openScript(r);
2939
- if (e) {
2940
- const e = Q_FUNCS_PREFIX.replace("HASH", this.Ht).slice(0, -1);
2941
- this.write(`(${e}||(${e}=[])).push(`);
2939
+ if (t) {
2940
+ const t = Q_FUNCS_PREFIX.replace("HASH", this.Ht).slice(0, -1);
2941
+ this.write(`(${t}||(${t}=[])).push(`);
2942
2942
  } else {
2943
2943
  this.write(Q_FUNCS_PREFIX.replace("HASH", this.Ht));
2944
2944
  }
2945
- if (!e) {
2945
+ if (!t) {
2946
2946
  this.write(Fi);
2947
2947
  }
2948
- this.writeArray(e ? t.slice(n) : t, Xi);
2949
- if (!e) {
2948
+ this.writeArray(t ? e.slice(n) : e, Xi);
2949
+ if (!t) {
2950
2950
  this.write(Di);
2951
2951
  }
2952
- if (e) {
2952
+ if (t) {
2953
2953
  this.write(")");
2954
2954
  }
2955
2955
  this.closeScript();
2956
- this.emittedSyncFnCount = t.length;
2956
+ this.emittedSyncFnCount = e.length;
2957
2957
  }
2958
2958
  }
2959
2959
  emitPatchDataIfNeeded() {
2960
- const e = [];
2961
- for (const [t, n] of this.backpatchMap) {
2960
+ const t = [];
2961
+ for (const [e, n] of this.backpatchMap) {
2962
2962
  for (let r = 0; r < n.length; r++) {
2963
2963
  const s = n[r];
2964
- e.push(t, s.attrName, Tu(s.value) ? s.value.untrackedValue : s.value);
2964
+ t.push(e, s.attrName, Tu(s.value) ? s.value.untrackedValue : s.value);
2965
2965
  }
2966
2966
  }
2967
2967
  this.backpatchMap.clear();
2968
- if (e.length > 0) {
2968
+ if (t.length > 0) {
2969
2969
  this.isBackpatchExecutorEmitted = true;
2970
- const t = {
2970
+ const e = {
2971
2971
  type: ELEMENT_BACKPATCH_DATA
2972
2972
  };
2973
2973
  if (this.renderOptions.serverData?.nonce) {
2974
- t["nonce"] = this.renderOptions.serverData.nonce;
2974
+ e["nonce"] = this.renderOptions.serverData.nonce;
2975
2975
  }
2976
- this.writeScript(t, JSON.stringify(e).replaceAll("<", "\\u003C"));
2976
+ this.writeScript(e, JSON.stringify(t).replaceAll("<", "\\u003C"));
2977
2977
  }
2978
2978
  }
2979
2979
  emitBackpatchDataAndExecutorIfNeeded() {
@@ -2988,16 +2988,16 @@ var SSRContainer = class extends Cc {
2988
2988
  return;
2989
2989
  }
2990
2990
  this.isBackpatchExecutorEmitted = false;
2991
- const e = {
2991
+ const t = {
2992
2992
  type: "text/javascript"
2993
2993
  };
2994
2994
  if (this.renderOptions.serverData?.nonce) {
2995
- e["nonce"] = this.renderOptions.serverData.nonce;
2995
+ t["nonce"] = this.renderOptions.serverData.nonce;
2996
2996
  }
2997
- const t = getQwikBackpatchExecutorScript({
2997
+ const e = getQwikBackpatchExecutorScript({
2998
2998
  debug: isDev8
2999
2999
  });
3000
- this.writeScript(e, t);
3000
+ this.writeScript(t, e);
3001
3001
  }
3002
3002
  emitOutOfOrderExecutorIfNeeded() {
3003
3003
  if (!__EXPERIMENTAL__.suspense || !this.outOfOrderStreaming || !this.outOfOrderUsed || this.isOutOfOrderExecutorEmitted) {
@@ -3011,25 +3011,25 @@ var SSRContainer = class extends Cc {
3011
3011
  debug: isDev8
3012
3012
  }));
3013
3013
  }
3014
- emitInlineScript(e) {
3015
- const t = {
3014
+ emitInlineScript(t) {
3015
+ const e = {
3016
3016
  type: "text/javascript"
3017
3017
  };
3018
3018
  if (this.renderOptions.serverData?.nonce) {
3019
- t["nonce"] = this.renderOptions.serverData.nonce;
3019
+ e["nonce"] = this.renderOptions.serverData.nonce;
3020
3020
  }
3021
- this.writeScript(t, e);
3021
+ this.writeScript(e, t);
3022
3022
  }
3023
- writeScript(e, t) {
3024
- this.openScript(e);
3025
- if (t) {
3026
- this.write(t);
3023
+ writeScript(t, e) {
3024
+ this.openScript(t);
3025
+ if (e) {
3026
+ this.write(e);
3027
3027
  }
3028
3028
  this.closeScript();
3029
3029
  }
3030
- openScript(e) {
3030
+ openScript(t) {
3031
3031
  this.write("<script");
3032
- this.writeAttrs("script", e, true, null, null, true);
3032
+ this.writeAttrs("script", t, true, null, null, true);
3033
3033
  this.write(GT);
3034
3034
  }
3035
3035
  closeScript() {
@@ -3046,21 +3046,21 @@ var SSRContainer = class extends Cc {
3046
3046
  emitQwikLoaderAtTopIfNeeded() {
3047
3047
  if (this.qlInclude === 0 /* Module */) {
3048
3048
  this.qlInclude = 2 /* Done */;
3049
- const e = this.De + this.resolvedManifest.manifest.qwikLoader;
3050
- const t = {
3049
+ const t = this.De + this.resolvedManifest.manifest.qwikLoader;
3050
+ const e = {
3051
3051
  rel: "modulepreload",
3052
- href: e
3052
+ href: t
3053
3053
  };
3054
3054
  const n = this.renderOptions.serverData?.nonce;
3055
3055
  if (n) {
3056
- t["nonce"] = n;
3056
+ e["nonce"] = n;
3057
3057
  }
3058
- this.openElement("link", null, t);
3058
+ this.openElement("link", null, e);
3059
3059
  this.closeElement();
3060
3060
  const r = {
3061
3061
  async: true,
3062
3062
  type: "module",
3063
- src: e
3063
+ src: t
3064
3064
  };
3065
3065
  if (n) {
3066
3066
  r["nonce"] = n;
@@ -3070,18 +3070,18 @@ var SSRContainer = class extends Cc {
3070
3070
  }
3071
3071
  emitQwikLoaderInline() {
3072
3072
  this.qlInclude = 2 /* Done */;
3073
- const e = getQwikLoaderScript({
3073
+ const t = getQwikLoaderScript({
3074
3074
  debug: this.renderOptions.debug
3075
3075
  });
3076
- const t = {
3076
+ const e = {
3077
3077
  id: "qwikloader",
3078
3078
  async: true,
3079
3079
  type: "module"
3080
3080
  };
3081
3081
  if (this.renderOptions.serverData?.nonce) {
3082
- t["nonce"] = this.renderOptions.serverData.nonce;
3082
+ e["nonce"] = this.renderOptions.serverData.nonce;
3083
3083
  }
3084
- this.writeScript(t, e);
3084
+ this.writeScript(e, t);
3085
3085
  }
3086
3086
  emitQwikLoaderAtBottomIfNeeded() {
3087
3087
  if (!this.isStatic()) {
@@ -3091,36 +3091,36 @@ var SSRContainer = class extends Cc {
3091
3091
  this.emitNewQwikEvents(true);
3092
3092
  }
3093
3093
  }
3094
- emitNewQwikEvents(e = false) {
3095
- const t = [];
3096
- for (const e of this.serializationCtx.xt) {
3097
- if (!this.emittedQwikEventNames.has(e)) {
3098
- this.emittedQwikEventNames.add(e);
3099
- t.push(JSON.stringify(e));
3094
+ emitNewQwikEvents(t = false) {
3095
+ const e = [];
3096
+ for (const t of this.serializationCtx.xt) {
3097
+ if (!this.emittedQwikEventNames.has(t)) {
3098
+ this.emittedQwikEventNames.add(t);
3099
+ e.push(JSON.stringify(t));
3100
3100
  }
3101
3101
  }
3102
- if (e) {
3103
- t.push(`${QwikEvContainerReady}`, JSON.stringify(this.Ht));
3102
+ if (t) {
3103
+ e.push(`${QwikEvContainerReady}`, JSON.stringify(this.Ht));
3104
3104
  }
3105
- this.emitQwikEvents(t);
3105
+ this.emitQwikEvents(e);
3106
3106
  }
3107
- emitQwikEvents(e) {
3108
- if (e.length > 0) {
3109
- const t = {};
3107
+ emitQwikEvents(t) {
3108
+ if (t.length > 0) {
3109
+ const e = {};
3110
3110
  const n = this.renderOptions.serverData?.nonce;
3111
3111
  if (n) {
3112
- t["nonce"] = n;
3112
+ e["nonce"] = n;
3113
3113
  }
3114
- this.openScript(t);
3114
+ this.openScript(e);
3115
3115
  this.write(`(window._qwikEv||(window._qwikEv=[])).push(`);
3116
- this.writeArray(e, Xi);
3116
+ this.writeArray(t, Xi);
3117
3117
  this.write(PAREN_CLOSE);
3118
3118
  this.closeScript();
3119
3119
  }
3120
3120
  }
3121
3121
  // Keep in sync with process-vnode-data.unit.ts
3122
- emitVNodeSeparators(e, t) {
3123
- let n = t - e;
3122
+ emitVNodeSeparators(t, e) {
3123
+ let n = e - t;
3124
3124
  while (n != 0) {
3125
3125
  if (n >= 8192) {
3126
3126
  this.write(VNodeDataSeparator.ADVANCE_8192_CH);
@@ -3142,38 +3142,38 @@ var SSRContainer = class extends Cc {
3142
3142
  n = 0;
3143
3143
  }
3144
3144
  }
3145
- return t;
3145
+ return e;
3146
3146
  }
3147
- createAndPushFrame(e, t, n) {
3147
+ createAndPushFrame(t, e, n) {
3148
3148
  let r = 10 /* ANYTHING */;
3149
3149
  if (isDev8) {
3150
3150
  if (!this.currentElementFrame) {
3151
- r = initialTag(e);
3151
+ r = initialTag(t);
3152
3152
  } else {
3153
- let t = this.currentElementFrame;
3154
- const s = t.tagNesting;
3155
- r = isTagAllowed(s, e);
3153
+ let e = this.currentElementFrame;
3154
+ const s = e.tagNesting;
3155
+ r = isTagAllowed(s, t);
3156
3156
  if (r === 0 /* NOT_ALLOWED */) {
3157
3157
  const r = [];
3158
- while (t) {
3159
- r.unshift(t);
3160
- t = t.parent;
3158
+ while (e) {
3159
+ r.unshift(e);
3160
+ e = e.parent;
3161
3161
  }
3162
3162
  const i = [];
3163
3163
  if (n) {
3164
3164
  i.push(`Error found in file: ${n}`);
3165
3165
  }
3166
- i.push(`HTML rules do not allow '<${e}>' at this location.`, ` (The HTML parser will try to recover by auto-closing or inserting additional tags which will confuse Qwik when it resumes.)`, ` Offending tag: <${e}>`, ` Existing tag context:`);
3166
+ i.push(`HTML rules do not allow '<${t}>' at this location.`, ` (The HTML parser will try to recover by auto-closing or inserting additional tags which will confuse Qwik when it resumes.)`, ` Offending tag: <${t}>`, ` Existing tag context:`);
3167
3167
  let o = " ";
3168
3168
  let a = "";
3169
- for (let e = 0; e < r.length; e++) {
3170
- const t = r[e];
3171
- const [n, s] = allowedContent(t.tagNesting);
3172
- i.push(`${o}<${t.elementName}>${a !== n ? ` [${n}]${s ? ` -> ${s}` : ""}` : ""}`);
3169
+ for (let t = 0; t < r.length; t++) {
3170
+ const e = r[t];
3171
+ const [n, s] = allowedContent(e.tagNesting);
3172
+ i.push(`${o}<${e.elementName}>${a !== n ? ` [${n}]${s ? ` -> ${s}` : ""}` : ""}`);
3173
3173
  a = n;
3174
3174
  o += " ";
3175
3175
  }
3176
- i.push(`${o}<${e}> <= is not allowed as a child of ${allowedContent(s)[0]}.`);
3176
+ i.push(`${o}<${t}> <= is not allowed as a child of ${allowedContent(s)[0]}.`);
3177
3177
  throw newTagError(i.join("\n"));
3178
3178
  }
3179
3179
  }
@@ -3181,8 +3181,8 @@ var SSRContainer = class extends Cc {
3181
3181
  const s = {
3182
3182
  tagNesting: r,
3183
3183
  parent: this.currentElementFrame,
3184
- elementName: e,
3185
- depthFirstElementIdx: t,
3184
+ elementName: t,
3185
+ depthFirstElementIdx: e,
3186
3186
  vNodeData: [ 0 /* NONE */ ],
3187
3187
  currentFile: isDev8 ? n || null : null,
3188
3188
  refBase: null
@@ -3191,44 +3191,44 @@ var SSRContainer = class extends Cc {
3191
3191
  this.vNodeDatas.push(s.vNodeData);
3192
3192
  }
3193
3193
  popFrame() {
3194
- const e = this.currentElementFrame;
3195
- this.currentElementFrame = e.parent;
3196
- return e;
3194
+ const t = this.currentElementFrame;
3195
+ this.currentElementFrame = t.parent;
3196
+ return t;
3197
3197
  }
3198
3198
  ////////////////////////////////////
3199
- write(e) {
3200
- this.size += e.length;
3201
- this.writer.write(e);
3199
+ write(t) {
3200
+ this.size += t.length;
3201
+ this.writer.write(t);
3202
3202
  }
3203
- writeRootRef(e) {
3204
- this.size += String(e).length;
3205
- this.writer.writeRootRef(e);
3203
+ writeRootRef(t) {
3204
+ this.size += String(t).length;
3205
+ this.writer.writeRootRef(t);
3206
3206
  }
3207
- writeRootRefPath(e) {
3208
- this.size += String(e[0]).length;
3209
- this.writer.writeRootRefPath(e);
3210
- for (let t = 1; t < e.length; t++) {
3211
- this.size += 1 + String(e[t]).length;
3207
+ writeRootRefPath(t) {
3208
+ this.size += String(t[0]).length;
3209
+ this.writer.writeRootRefPath(t);
3210
+ for (let e = 1; e < t.length; e++) {
3211
+ this.size += 1 + String(t[e]).length;
3212
3212
  }
3213
3213
  }
3214
- writeRootRefDelta(e, t) {
3215
- const n = e - t;
3214
+ writeRootRefDelta(t, e) {
3215
+ const n = t - e;
3216
3216
  this.size += String(n).length;
3217
- this.writer.writeRootRefDelta(e, t);
3217
+ this.writer.writeRootRefDelta(t, e);
3218
3218
  }
3219
- writeArray(e, t) {
3220
- for (let n = 0; n < e.length; n++) {
3221
- const r = e[n];
3219
+ writeArray(t, e) {
3220
+ for (let n = 0; n < t.length; n++) {
3221
+ const r = t[n];
3222
3222
  if (n > 0) {
3223
- this.write(t);
3223
+ this.write(e);
3224
3224
  }
3225
3225
  this.write(r);
3226
3226
  }
3227
3227
  }
3228
- writeAttrs(e, t, s, i, o, a) {
3228
+ writeAttrs(t, e, s, i, o, a) {
3229
3229
  let l = void 0;
3230
- for (let c in t) {
3231
- let u = t[c];
3230
+ for (let c in e) {
3231
+ let u = e[c];
3232
3232
  if (isSSRUnsafeAttr(c)) {
3233
3233
  if (isDev8) {
3234
3234
  throw Ye(32 /* unsafeAttr */ , [ c ]);
@@ -3238,12 +3238,12 @@ var SSRContainer = class extends Cc {
3238
3238
  if (ri(c)) {
3239
3239
  u = _setEvent(this.serializationCtx, c, u, a);
3240
3240
  } else if (c === "ref") {
3241
- const e = this.getOrCreateLastNode();
3241
+ const t = this.getOrCreateLastNode();
3242
3242
  if (Tu(u)) {
3243
- u.Ct = new DomRef(e);
3243
+ u.Ct = new DomRef(t);
3244
3244
  continue;
3245
3245
  } else if (typeof u === "function") {
3246
- u(new DomRef(e));
3246
+ u(new DomRef(t));
3247
3247
  continue;
3248
3248
  } else if (u == null) {
3249
3249
  continue;
@@ -3251,25 +3251,25 @@ var SSRContainer = class extends Cc {
3251
3251
  throw Ye(15 /* invalidRefValue */ , [ o ]);
3252
3252
  }
3253
3253
  } else if (c === Lr || c === Fr) {
3254
- const e = this.addRoot(u);
3255
- if (e === void 0) {
3254
+ const t = this.addRoot(u);
3255
+ if (t === void 0) {
3256
3256
  continue;
3257
3257
  }
3258
- u = typeof e === "number" ? [ e ] : String(e);
3258
+ u = typeof t === "number" ? [ t ] : String(t);
3259
3259
  } else if (Tu(u)) {
3260
- const e = this.getOrCreateLastNode();
3261
- const t = new Gs({
3260
+ const t = this.getOrCreateLastNode();
3261
+ const e = new Gs({
3262
3262
  j: i,
3263
3263
  rt: s
3264
3264
  });
3265
3265
  const r = u;
3266
- u = n(() => this.trackSignalValue(r, e, c, t));
3266
+ u = n(() => this.trackSignalValue(r, t, c, e));
3267
3267
  }
3268
3268
  if (Yr(u)) {
3269
- const e = this.getOrCreateLastNode();
3269
+ const t = this.getOrCreateLastNode();
3270
3270
  this.addPromiseAttribute(u);
3271
- u.then(t => {
3272
- this.addBackpatchEntry(e.id, c, r(c, t, i));
3271
+ u.then(e => {
3272
+ this.addBackpatchEntry(t.id, c, r(c, e, i));
3273
3273
  });
3274
3274
  continue;
3275
3275
  }
@@ -3279,13 +3279,13 @@ var SSRContainer = class extends Cc {
3279
3279
  c = kr;
3280
3280
  u = "html" /* HTML */;
3281
3281
  }
3282
- if (e === "style") {
3282
+ if (t === "style") {
3283
3283
  continue;
3284
3284
  }
3285
3285
  } else if (isPreventDefault(c)) {
3286
3286
  addPreventDefaultEventToSerializationContext(this.serializationCtx, c);
3287
3287
  }
3288
- if (e === "textarea" && c === "value") {
3288
+ if (t === "textarea" && c === "value") {
3289
3289
  if (u && typeof u !== "string") {
3290
3290
  if (isDev8) {
3291
3291
  throw Ye(23 /* wrongTextareaValue */ , [ o, u ]);
@@ -3305,8 +3305,8 @@ var SSRContainer = class extends Cc {
3305
3305
  if (Array.isArray(h)) {
3306
3306
  this.writeEscapedChunks(h);
3307
3307
  } else {
3308
- const e = escapeHTML(String(h));
3309
- this.write(e);
3308
+ const t = escapeHTML(String(h));
3309
+ this.write(t);
3310
3310
  }
3311
3311
  this.write(Li);
3312
3312
  }
@@ -3314,9 +3314,9 @@ var SSRContainer = class extends Cc {
3314
3314
  }
3315
3315
  return l;
3316
3316
  }
3317
- writeEscapedChunks(e) {
3318
- for (let t = 0; t < e.length; t++) {
3319
- const n = e[t];
3317
+ writeEscapedChunks(t) {
3318
+ for (let e = 0; e < t.length; e++) {
3319
+ const n = t[e];
3320
3320
  if (typeof n === "string") {
3321
3321
  this.write(escapeHTML(n));
3322
3322
  } else if (typeof n === "number") {
@@ -3328,9 +3328,9 @@ var SSRContainer = class extends Cc {
3328
3328
  }
3329
3329
  }
3330
3330
  }
3331
- addPromiseAttribute(e) {
3331
+ addPromiseAttribute(t) {
3332
3332
  this.promiseAttributes ||= [];
3333
- this.promiseAttributes.push(e);
3333
+ this.promiseAttributes.push(t);
3334
3334
  }
3335
3335
  async resolvePromiseAttributes() {
3336
3336
  if (this.promiseAttributes) {
@@ -3341,19 +3341,19 @@ var SSRContainer = class extends Cc {
3341
3341
  };
3342
3342
 
3343
3343
  var SSRSegmentContainer = class extends SSRContainer {
3344
- constructor(e, t) {
3345
- super(e);
3346
- this.Le = t;
3344
+ constructor(t, e) {
3345
+ super(t);
3346
+ this.Le = e;
3347
3347
  }
3348
3348
  Le;
3349
3349
  F=0 /* Rendering */;
3350
3350
  sr=null;
3351
3351
  subscriptionPatchRecords=[];
3352
3352
  pendingVNodeDataPatches=null;
3353
- _n(e, t, n, r) {
3354
- recordExternalRootEffect(this.Le.serializationCtx, this.serializationCtx, this.Le.yt, this.subscriptionPatchRecords, e, t, n, r);
3353
+ _n(t, e, n, r) {
3354
+ recordExternalRootEffect(this.Le.serializationCtx, this.serializationCtx, this.Le.yt, this.subscriptionPatchRecords, t, e, n, r);
3355
3355
  }
3356
- async P(e, t) {
3356
+ async P(t, e) {
3357
3357
  const n = this.Le;
3358
3358
  const r = n.v();
3359
3359
  const s = this.serializationCtx;
@@ -3362,21 +3362,21 @@ var SSRSegmentContainer = class extends SSRContainer {
3362
3362
  this.ar(n, s);
3363
3363
  const o = this.lr(n, r, s);
3364
3364
  if (r && (i.newRootLocalIds.length > 0 || o !== void 0)) {
3365
- s.be = n.serializationCtx.ee;
3366
- await this.emitStatePatchData(e, i.newRootStart, i.newRootLocalIds, o);
3365
+ s.ve = n.serializationCtx.ee;
3366
+ await this.emitStatePatchData(t, i.newRootStart, i.newRootLocalIds, o);
3367
3367
  n.serializationCtx.ge = n.serializationCtx.le.length + (n.serializationCtx._e ? 1 : 0);
3368
3368
  n.serializationCtx.ee += s.ee;
3369
3369
  }
3370
3370
  this.emitPendingVNodeDataPatches();
3371
3371
  if (r) {
3372
3372
  this.t = true;
3373
- this.emitVNodeData(e);
3374
- const t = this.serializationCtx;
3373
+ this.emitVNodeData(t);
3374
+ const e = this.serializationCtx;
3375
3375
  this.serializationCtx = n.serializationCtx;
3376
3376
  this.emittedSyncFnCount = n.emittedSyncFnCount;
3377
3377
  this.emitSyncFnsData(true);
3378
3378
  n.emittedSyncFnCount = this.emittedSyncFnCount;
3379
- this.serializationCtx = t;
3379
+ this.serializationCtx = e;
3380
3380
  this.emitNewQwikEvents();
3381
3381
  }
3382
3382
  this.emitPatchDataIfNeeded();
@@ -3389,8 +3389,8 @@ var SSRSegmentContainer = class extends SSRContainer {
3389
3389
  this.F = 1 /* EarlyFinalized */;
3390
3390
  }
3391
3391
  return {
3392
- html: renderSSRChunks(t.htmlChunks, a),
3393
- scripts: t.writer.toString(a)
3392
+ html: renderSSRChunks(e.htmlChunks, a),
3393
+ scripts: e.writer.toString(a)
3394
3394
  };
3395
3395
  } finally {
3396
3396
  if (this.F !== 1 /* EarlyFinalized */) {
@@ -3411,19 +3411,19 @@ var SSRSegmentContainer = class extends SSRContainer {
3411
3411
  this.serializationCtx.qe = void 0;
3412
3412
  }
3413
3413
  }
3414
- markVNodeDataForSerialization(e, t = 16 /* SERIALIZE */) {
3415
- const n = e.vnodeData[0];
3416
- const r = n | t;
3414
+ markVNodeDataForSerialization(t, e = 16 /* SERIALIZE */) {
3415
+ const n = t.vnodeData[0];
3416
+ const r = n | e;
3417
3417
  if (r !== n) {
3418
- e.vnodeData[0] = r;
3419
- this.queueLateVNodeDataPatch(e, r & ~n);
3418
+ t.vnodeData[0] = r;
3419
+ this.queueLateVNodeDataPatch(t, r & ~n);
3420
3420
  }
3421
3421
  }
3422
- queueLateVNodeDataPatch(e, t) {
3423
- if (!(t & (16 /* SERIALIZE */ | 8 /* REFERENCE */))) {
3422
+ queueLateVNodeDataPatch(t, e) {
3423
+ if (!(e & (16 /* SERIALIZE */ | 8 /* REFERENCE */))) {
3424
3424
  return;
3425
3425
  }
3426
- const n = this.getVNodeDataOwnerFromNodeId(e.id);
3426
+ const n = this.getVNodeDataOwnerFromNodeId(t.id);
3427
3427
  if (!this.I().isVNodeDataOwnerEmitted(n.owner)) {
3428
3428
  return;
3429
3429
  }
@@ -3431,154 +3431,154 @@ var SSRSegmentContainer = class extends SSRContainer {
3431
3431
  if (!r) {
3432
3432
  this.pendingVNodeDataPatches.set(n.owner, r = /* @__PURE__ */ new Map);
3433
3433
  }
3434
- r.set(n.localIndex, e.vnodeData);
3434
+ r.set(n.localIndex, t.vnodeData);
3435
3435
  }
3436
3436
  emitPendingVNodeDataPatches() {
3437
- const e = this.pendingVNodeDataPatches;
3437
+ const t = this.pendingVNodeDataPatches;
3438
3438
  this.pendingVNodeDataPatches = null;
3439
- if (!e) {
3439
+ if (!t) {
3440
3440
  return;
3441
3441
  }
3442
- for (const [t, n] of e) {
3442
+ for (const [e, n] of t) {
3443
3443
  if (n.size === 0) {
3444
3444
  continue;
3445
3445
  }
3446
- const e = Array.from(n).sort((e, t) => e[0] - t[0]);
3447
- this.emitVNodeDataScript(t, e, true);
3446
+ const t = Array.from(n).sort((t, e) => t[0] - e[0]);
3447
+ this.emitVNodeDataScript(e, t, true);
3448
3448
  }
3449
3449
  }
3450
- ir(e, t) {
3451
- const n = this.commitSegmentRoots(e, t);
3452
- t.qe = (t, r, s) => {
3453
- this.commitSegmentRoot(e, t, r, s, n);
3450
+ ir(t, e) {
3451
+ const n = this.commitSegmentRoots(t, e);
3452
+ e.qe = (e, r, s) => {
3453
+ this.commitSegmentRoot(t, e, r, s, n);
3454
3454
  };
3455
3455
  return n;
3456
3456
  }
3457
- lr(e, t, n) {
3457
+ lr(t, e, n) {
3458
3458
  let r = void 0;
3459
- const s = t ? this.collectSubscriptionPatches(e, e.rootContainerSerializedRootCount) : void 0;
3459
+ const s = e ? this.collectSubscriptionPatches(t, t.rootContainerSerializedRootCount) : void 0;
3460
3460
  if (s) {
3461
3461
  r = n.Rt(s);
3462
3462
  }
3463
3463
  return r;
3464
3464
  }
3465
- commitSegmentRoots(e, t) {
3465
+ commitSegmentRoots(t, e) {
3466
3466
  const n = [];
3467
- const r = e.v() ? e.serializationCtx.ge : e.serializationCtx.le.length;
3467
+ const r = t.v() ? t.serializationCtx.ge : t.serializationCtx.le.length;
3468
3468
  const s = [];
3469
3469
  const i = {
3470
3470
  rootIdMap: n,
3471
3471
  newRootStart: r,
3472
3472
  newRootLocalIds: s
3473
3473
  };
3474
- this.promoteSharedSegmentRoots(e, t, i);
3475
- const o = t.le;
3476
- const a = t.Pe;
3477
- for (let t = 0; t < o.length; t++) {
3478
- const n = a[t];
3479
- this.commitSegmentRoot(e, t, o[t], n, i);
3474
+ this.promoteSharedSegmentRoots(t, e, i);
3475
+ const o = e.le;
3476
+ const a = e.Pe;
3477
+ for (let e = 0; e < o.length; e++) {
3478
+ const n = a[e];
3479
+ this.commitSegmentRoot(t, e, o[e], n, i);
3480
3480
  }
3481
3481
  return i;
3482
3482
  }
3483
- promoteSharedSegmentRoots(e, t, n) {
3484
- const r = t.le;
3485
- const s = t.Pe;
3486
- for (let t = 0; t < s.length; t++) {
3487
- const i = s[t];
3488
- if (this.isRootOrUsedByOtherLiveSegment(e, i)) {
3489
- this.commitSegmentRoot(e, t, r[t], i, n);
3483
+ promoteSharedSegmentRoots(t, e, n) {
3484
+ const r = e.le;
3485
+ const s = e.Pe;
3486
+ for (let e = 0; e < s.length; e++) {
3487
+ const i = s[e];
3488
+ if (this.isRootOrUsedByOtherLiveSegment(t, i)) {
3489
+ this.commitSegmentRoot(t, e, r[e], i, n);
3490
3490
  }
3491
3491
  }
3492
3492
  }
3493
- isRootOrUsedByOtherLiveSegment(e, t) {
3494
- if (e.serializationCtx.Ne(t) !== void 0) {
3493
+ isRootOrUsedByOtherLiveSegment(t, e) {
3494
+ if (t.serializationCtx.Ne(e) !== void 0) {
3495
3495
  return true;
3496
3496
  }
3497
- const n = e.outOfOrderSegments;
3498
- for (let e = 0; e < n.length; e++) {
3499
- const r = n[e];
3497
+ const n = t.outOfOrderSegments;
3498
+ for (let t = 0; t < n.length; t++) {
3499
+ const r = n[t];
3500
3500
  if (r === this) {
3501
3501
  continue;
3502
3502
  }
3503
3503
  const s = r.serializationCtx.Pe;
3504
- for (let e = 0; e < s.length; e++) {
3505
- if (s[e] === t) {
3504
+ for (let t = 0; t < s.length; t++) {
3505
+ if (s[t] === e) {
3506
3506
  return true;
3507
3507
  }
3508
3508
  }
3509
3509
  }
3510
3510
  return false;
3511
3511
  }
3512
- commitSegmentRoot(e, t, n, r, s) {
3513
- if (s.rootIdMap[t] !== void 0) {
3512
+ commitSegmentRoot(t, e, n, r, s) {
3513
+ if (s.rootIdMap[e] !== void 0) {
3514
3514
  return;
3515
3515
  }
3516
- let i = e.serializationCtx.Ne(r);
3516
+ let i = t.serializationCtx.Ne(r);
3517
3517
  if (i === void 0) {
3518
- i = e.serializationCtx.Ie(n, r);
3519
- s.newRootLocalIds.push(t);
3520
- this.seedCommittedRootForLiveSegments(e, r);
3518
+ i = t.serializationCtx.Ie(n, r);
3519
+ s.newRootLocalIds.push(e);
3520
+ this.seedCommittedRootForLiveSegments(t, r);
3521
3521
  }
3522
- const o = e.serializationCtx;
3523
- s.rootIdMap[t] = e.v() && i >= o.ve ? i + (o._e ? 1 : 0) : i;
3522
+ const o = t.serializationCtx;
3523
+ s.rootIdMap[e] = t.v() && i >= o.be ? i + (o._e ? 1 : 0) : i;
3524
3524
  }
3525
- seedCommittedRootForLiveSegments(e, t) {
3526
- const n = e.outOfOrderSegments;
3527
- for (let e = 0; e < n.length; e++) {
3528
- const r = n[e];
3525
+ seedCommittedRootForLiveSegments(t, e) {
3526
+ const n = t.outOfOrderSegments;
3527
+ for (let t = 0; t < n.length; t++) {
3528
+ const r = n[t];
3529
3529
  if (r !== this && r.F === 0 /* Rendering */) {
3530
- r.serializationCtx.Rt(t);
3530
+ r.serializationCtx.Rt(e);
3531
3531
  }
3532
3532
  }
3533
3533
  }
3534
- ar(e, t) {
3535
- for (const n of t.xt) {
3536
- e.serializationCtx.xt.add(n);
3534
+ ar(t, e) {
3535
+ for (const n of e.xt) {
3536
+ t.serializationCtx.xt.add(n);
3537
3537
  }
3538
- for (const n of t.It) {
3539
- e.serializationCtx.It.add(n);
3538
+ for (const n of e.It) {
3539
+ t.serializationCtx.It.add(n);
3540
3540
  }
3541
3541
  }
3542
- collectSubscriptionPatches(e, t) {
3543
- return collectSubscriptionPatches(e.serializationCtx, this.subscriptionPatchRecords, t);
3542
+ collectSubscriptionPatches(t, e) {
3543
+ return collectSubscriptionPatches(t.serializationCtx, this.subscriptionPatchRecords, e);
3544
3544
  }
3545
- emitStatePatchData(e, t, n, r) {
3546
- const s = this.statePatchScriptAttrs(e);
3545
+ emitStatePatchData(t, e, n, r) {
3546
+ const s = this.statePatchScriptAttrs(t);
3547
3547
  this.openScript(s);
3548
3548
  this.serializationCtx.re(this.writer);
3549
3549
  this.serializationCtx.ae = this.markVNodeDataForSerialization.bind(this);
3550
- return Kr(this.serializationCtx.Me(t, n, r, 0), () => {
3550
+ return Kr(this.serializationCtx.Me(e, n, r, 0), () => {
3551
3551
  this.closeScript();
3552
3552
  });
3553
3553
  }
3554
- statePatchScriptAttrs(e) {
3555
- const t = this.stateScriptAttrs();
3556
- t[QStatePatchAttr] = true;
3557
- if (e) {
3558
- t[hr] = e;
3554
+ statePatchScriptAttrs(t) {
3555
+ const e = this.stateScriptAttrs();
3556
+ e[QStatePatchAttr] = true;
3557
+ if (t) {
3558
+ e[hr] = t;
3559
3559
  }
3560
- return t;
3560
+ return e;
3561
3561
  }
3562
3562
  };
3563
3563
 
3564
- var isQwikStyleElement = (e, t) => {
3565
- if (e === "style" && t != null) {
3566
- return Object.prototype.hasOwnProperty.call(t, dr) || Object.prototype.hasOwnProperty.call(t, yr);
3564
+ var isQwikStyleElement = (t, e) => {
3565
+ if (t === "style" && e != null) {
3566
+ return Object.prototype.hasOwnProperty.call(e, dr) || Object.prototype.hasOwnProperty.call(e, yr);
3567
3567
  }
3568
3568
  return false;
3569
3569
  };
3570
3570
 
3571
- function newTagError(e) {
3572
- return Ye(12 /* tagError */ , [ e ]);
3571
+ function newTagError(t) {
3572
+ return Ye(12 /* tagError */ , [ t ]);
3573
3573
  }
3574
3574
 
3575
- function hasDestroy(e) {
3576
- return e && typeof e === "object" && typeof e.cn === "function";
3575
+ function hasDestroy(t) {
3576
+ return t && typeof t === "object" && typeof t.cn === "function";
3577
3577
  }
3578
3578
 
3579
- function isSSRUnsafeAttr(e) {
3580
- for (let t = 0; t < e.length; t++) {
3581
- const n = e.charCodeAt(t);
3579
+ function isSSRUnsafeAttr(t) {
3580
+ for (let e = 0; e < t.length; e++) {
3581
+ const n = t.charCodeAt(e);
3582
3582
  if (n === 62 || n === 47 || n === 61 || n === 34 || n === 39 || n === 9 || n === 10 || n === 12 || n === 32) {
3583
3583
  return true;
3584
3584
  }
@@ -3590,24 +3590,24 @@ function randomStr() {
3590
3590
  return (Math.random().toString(36) + "000000").slice(2, 8);
3591
3591
  }
3592
3592
 
3593
- function addPreventDefaultEventToSerializationContext(e, t) {
3594
- const n = "e" + t.substring(14);
3593
+ function addPreventDefaultEventToSerializationContext(t, e) {
3594
+ const n = "e" + e.substring(14);
3595
3595
  if (n) {
3596
- e.xt.add(n);
3596
+ t.xt.add(n);
3597
3597
  }
3598
3598
  }
3599
3599
 
3600
3600
  // packages/qwik/src/server/ssr-stream-handler.ts
3601
3601
  var StreamHandler = class {
3602
- constructor(e, t) {
3603
- this.opts = e;
3604
- this.timing = t;
3605
- this.inOrderStreaming = e.streaming?.inOrder ?? {
3602
+ constructor(t, e) {
3603
+ this.opts = t;
3604
+ this.timing = e;
3605
+ this.inOrderStreaming = t.streaming?.inOrder ?? {
3606
3606
  strategy: "auto",
3607
3607
  maximumInitialChunk: 2e4,
3608
3608
  maximumChunk: 1e4
3609
3609
  };
3610
- this.nativeStream = e.stream;
3610
+ this.nativeStream = t.stream;
3611
3611
  this.stream = this.setupStreamWriter();
3612
3612
  }
3613
3613
  opts;
@@ -3625,30 +3625,30 @@ var StreamHandler = class {
3625
3625
  flushQueued=false;
3626
3626
  stream;
3627
3627
  setupStreamWriter() {
3628
- const e = this;
3629
- let t;
3628
+ const t = this;
3629
+ let e;
3630
3630
  switch (this.inOrderStreaming.strategy) {
3631
3631
  case "disabled":
3632
- t = ji(t => {
3633
- if (t === void 0 || t === null) {
3632
+ e = ji(e => {
3633
+ if (e === void 0 || e === null) {
3634
3634
  return;
3635
3635
  }
3636
- e.enqueue(t);
3636
+ t.enqueue(e);
3637
3637
  });
3638
3638
  break;
3639
3639
 
3640
3640
  case "direct":
3641
3641
  {
3642
3642
  const n = this.nativeStream;
3643
- t = ji(t => {
3644
- if (t === void 0 || t === null) {
3643
+ e = ji(e => {
3644
+ if (e === void 0 || e === null) {
3645
3645
  return;
3646
3646
  }
3647
- if (e.pendingFlush) {
3648
- const r = e.pendingFlush.then(() => n.write(t));
3649
- return e.trackPendingFlush(r);
3647
+ if (t.pendingFlush) {
3648
+ const r = t.pendingFlush.then(() => n.write(e));
3649
+ return t.trackPendingFlush(r);
3650
3650
  }
3651
- return e.trackPendingFlush(n.write(t));
3651
+ return t.trackPendingFlush(n.write(e));
3652
3652
  });
3653
3653
  break;
3654
3654
  }
@@ -3658,54 +3658,54 @@ var StreamHandler = class {
3658
3658
  {
3659
3659
  const n = this.inOrderStreaming.maximumChunk ?? 0;
3660
3660
  const r = this.inOrderStreaming.maximumInitialChunk ?? 0;
3661
- t = ji(t => {
3662
- if (t === void 0 || t === null) {
3661
+ e = ji(e => {
3662
+ if (e === void 0 || e === null) {
3663
3663
  return;
3664
3664
  }
3665
- e.enqueue(t);
3666
- if (e.streamBlockDepth === 0) {
3667
- const t = e.networkFlushes === 0 ? r : n;
3668
- if (e.bufferSize >= t) {
3669
- return e.flush();
3665
+ t.enqueue(e);
3666
+ if (t.streamBlockDepth === 0) {
3667
+ const e = t.networkFlushes === 0 ? r : n;
3668
+ if (t.bufferSize >= e) {
3669
+ return t.flush();
3670
3670
  }
3671
3671
  }
3672
3672
  });
3673
3673
  break;
3674
3674
  }
3675
3675
  }
3676
- return t;
3676
+ return e;
3677
3677
  }
3678
- enqueue(e) {
3679
- const t = e.length;
3678
+ enqueue(t) {
3679
+ const e = t.length;
3680
3680
  if (this.streamBlockDepth > 0) {
3681
- this.streamBlockBuffer += e;
3682
- this.streamBlockBufferSize += t;
3681
+ this.streamBlockBuffer += t;
3682
+ this.streamBlockBufferSize += e;
3683
3683
  } else {
3684
- this.bufferSize += t;
3685
- this.buffer += e;
3684
+ this.bufferSize += e;
3685
+ this.buffer += t;
3686
3686
  }
3687
3687
  }
3688
- trackPendingFlush(e) {
3689
- if (!Yr(e)) {
3688
+ trackPendingFlush(t) {
3689
+ if (!Yr(t)) {
3690
3690
  return;
3691
3691
  }
3692
- const t = Promise.resolve(e).finally(() => {
3693
- if (this.pendingFlush === t) {
3692
+ const e = Promise.resolve(t).finally(() => {
3693
+ if (this.pendingFlush === e) {
3694
3694
  this.pendingFlush = void 0;
3695
3695
  }
3696
3696
  });
3697
- this.pendingFlush = t;
3698
- return t;
3697
+ this.pendingFlush = e;
3698
+ return e;
3699
3699
  }
3700
3700
  flushBuffer() {
3701
- const e = this.buffer;
3701
+ const t = this.buffer;
3702
3702
  this.buffer = "";
3703
3703
  this.bufferSize = 0;
3704
3704
  this.networkFlushes++;
3705
3705
  if (this.networkFlushes === 1) {
3706
3706
  this.timing.firstFlush = this.firstFlushTimer();
3707
3707
  }
3708
- return this.trackPendingFlush(this.nativeStream.write(e));
3708
+ return this.trackPendingFlush(this.nativeStream.write(t));
3709
3709
  }
3710
3710
  flush() {
3711
3711
  if (!this.buffer) {
@@ -3714,13 +3714,13 @@ var StreamHandler = class {
3714
3714
  if (this.pendingFlush) {
3715
3715
  if (!this.flushQueued) {
3716
3716
  this.flushQueued = true;
3717
- const e = this.pendingFlush.then(() => {
3717
+ const t = this.pendingFlush.then(() => {
3718
3718
  this.flushQueued = false;
3719
3719
  this.pendingFlush = void 0;
3720
3720
  return this.flush();
3721
3721
  });
3722
- this.pendingFlush = e.finally(() => {
3723
- if (this.pendingFlush === e) {
3722
+ this.pendingFlush = t.finally(() => {
3723
+ if (this.pendingFlush === t) {
3724
3724
  this.pendingFlush = void 0;
3725
3725
  }
3726
3726
  });
@@ -3748,10 +3748,10 @@ var StreamHandler = class {
3748
3748
  };
3749
3749
 
3750
3750
  // packages/qwik/src/server/ssr-render.ts
3751
- var renderToString = async (e, t = {}) => {
3751
+ var renderToString = async (t, e = {}) => {
3752
3752
  const n = new StringSSRWriter;
3753
- const r = await renderToStream(e, {
3754
- ...t,
3753
+ const r = await renderToStream(t, {
3754
+ ...e,
3755
3755
  stream: n
3756
3756
  });
3757
3757
  return {
@@ -3763,12 +3763,12 @@ var renderToString = async (e, t = {}) => {
3763
3763
  };
3764
3764
  };
3765
3765
 
3766
- var renderToStream = async (e, t) => {
3767
- if (__EXPERIMENTAL__.suspense && t.streaming?.outOfOrder === void 0) {
3768
- t = {
3769
- ...t,
3766
+ var renderToStream = async (t, e) => {
3767
+ if (__EXPERIMENTAL__.suspense && e.streaming?.outOfOrder === void 0) {
3768
+ e = {
3769
+ ...e,
3770
3770
  streaming: {
3771
- ...t.streaming,
3771
+ ...e.streaming,
3772
3772
  outOfOrder: true
3773
3773
  }
3774
3774
  };
@@ -3778,11 +3778,11 @@ var renderToStream = async (e, t) => {
3778
3778
  render: 0,
3779
3779
  snapshot: 0
3780
3780
  };
3781
- const r = t.containerTagName ?? "html";
3782
- const s = getBuildBase(t);
3783
- const i = resolveManifest(t.manifest);
3784
- const o = typeof t.locale === "function" ? t.locale(t) : t.serverData?.locale || t.locale || t.containerAttributes?.locale || "";
3785
- const a = new StreamHandler(t, n);
3781
+ const r = e.containerTagName ?? "html";
3782
+ const s = getBuildBase(e);
3783
+ const i = resolveManifest(e.manifest);
3784
+ const o = typeof e.locale === "function" ? e.locale(e) : e.serverData?.locale || e.locale || e.containerAttributes?.locale || "";
3785
+ const a = new StreamHandler(e, n);
3786
3786
  const l = ssrCreateContainer({
3787
3787
  tagName: r,
3788
3788
  locale: o,
@@ -3791,10 +3791,10 @@ var renderToStream = async (e, t) => {
3791
3791
  timing: n,
3792
3792
  buildBase: s,
3793
3793
  resolvedManifest: i,
3794
- renderOptions: t
3794
+ renderOptions: e
3795
3795
  });
3796
- await setServerPlatform(t, i);
3797
- await l.render(e);
3796
+ await setServerPlatform(e, i);
3797
+ await l.render(t);
3798
3798
  await l.l;
3799
3799
  await a.flush();
3800
3800
  const c = {
@@ -3807,23 +3807,23 @@ var renderToStream = async (e, t) => {
3807
3807
  return c;
3808
3808
  };
3809
3809
 
3810
- function resolveManifest(e) {
3811
- const t = Ea();
3812
- const n = e ? {
3813
- ...t,
3814
- ...e
3815
- } : t;
3810
+ function resolveManifest(t) {
3811
+ const e = Ea();
3812
+ const n = t ? {
3813
+ ...e,
3814
+ ...t
3815
+ } : e;
3816
3816
  if (!n || "mapper" in n) {
3817
3817
  return n;
3818
3818
  }
3819
3819
  if (n.mapping) {
3820
- const e = {};
3821
- for (const t in n.mapping) {
3822
- const r = n.mapping[t];
3823
- e[sd(t)] = [ t, r ];
3820
+ const t = {};
3821
+ for (const e in n.mapping) {
3822
+ const r = n.mapping[e];
3823
+ t[sd(e)] = [ e, r ];
3824
3824
  }
3825
3825
  return {
3826
- mapper: e,
3826
+ mapper: t,
3827
3827
  manifest: n,
3828
3828
  injections: n.injections || []
3829
3829
  };
@@ -3834,11 +3834,11 @@ function resolveManifest(e) {
3834
3834
  var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
3835
3835
 
3836
3836
  // packages/qwik/src/server/index.ts
3837
- async function setServerPlatform2(e) {
3838
- const t = pi({
3839
- manifest: e
3840
- }, resolveManifest(e));
3841
- setPlatform2(t);
3837
+ async function setServerPlatform2(t) {
3838
+ const e = pi({
3839
+ manifest: t
3840
+ }, resolveManifest(t));
3841
+ setPlatform2(e);
3842
3842
  }
3843
3843
 
3844
3844
  export { getQwikBackpatchExecutorScript, getQwikLoaderScript, getQwikPrefetchWorkerScript, renderToStream, renderToString, resolveManifest, setServerPlatform2 as setServerPlatform, versions };