@qwik.dev/core 2.0.0-beta.16 → 2.0.0-beta.18

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.
@@ -72,27 +72,27 @@ function jt(e = {}) {
72
72
  let w = 1;
73
73
  for (; w < p.length && p.charCodeAt(w) === 47; ++w)
74
74
  ;
75
- const I = p.length - w, N = v < I ? v : I;
76
- let $ = -1, T = 0;
77
- for (; T <= N; ++T) {
78
- if (T === N) {
79
- if (I > N) {
75
+ const I = p.length - w, M = v < I ? v : I;
76
+ let U = -1, T = 0;
77
+ for (; T <= M; ++T) {
78
+ if (T === M) {
79
+ if (I > M) {
80
80
  if (p.charCodeAt(w + T) === 47)
81
81
  return p.slice(w + T + 1);
82
82
  if (T === 0)
83
83
  return p.slice(w + T);
84
- } else v > N && (l.charCodeAt(E + T) === 47 ? $ = T : T === 0 && ($ = 0));
84
+ } else v > M && (l.charCodeAt(E + T) === 47 ? U = T : T === 0 && (U = 0));
85
85
  break;
86
86
  }
87
- const Q = l.charCodeAt(E + T), B = p.charCodeAt(w + T);
88
- if (Q !== B)
87
+ const Q = l.charCodeAt(E + T), A = p.charCodeAt(w + T);
88
+ if (Q !== A)
89
89
  break;
90
- Q === 47 && ($ = T);
90
+ Q === 47 && (U = T);
91
91
  }
92
- let F = "";
93
- for (T = E + $ + 1; T <= s; ++T)
94
- (T === s || l.charCodeAt(T) === 47) && (F.length === 0 ? F += ".." : F += "/..");
95
- return F.length > 0 ? F + p.slice(w + $) : (w += $, p.charCodeAt(w) === 47 && ++w, p.slice(w));
92
+ let R = "";
93
+ for (T = E + U + 1; T <= s; ++T)
94
+ (T === s || l.charCodeAt(T) === 47) && (R.length === 0 ? R += ".." : R += "/..");
95
+ return R.length > 0 ? R + p.slice(w + U) : (w += U, p.charCodeAt(w) === 47 && ++w, p.slice(w));
96
96
  }, t = function(l) {
97
97
  if (n(l), l.length === 0)
98
98
  return ".";
@@ -118,14 +118,14 @@ function jt(e = {}) {
118
118
  return "";
119
119
  let S = p.length - 1, I = -1;
120
120
  for (w = l.length - 1; w >= 0; --w) {
121
- const N = l.charCodeAt(w);
122
- if (N === 47) {
121
+ const M = l.charCodeAt(w);
122
+ if (M === 47) {
123
123
  if (!v) {
124
124
  E = w + 1;
125
125
  break;
126
126
  }
127
127
  } else
128
- I === -1 && (v = !1, I = w + 1), S >= 0 && (N === p.charCodeAt(S) ? --S === -1 && (s = w) : (S = -1, s = I));
128
+ I === -1 && (v = !1, I = w + 1), S >= 0 && (M === p.charCodeAt(S) ? --S === -1 && (s = w) : (S = -1, s = I));
129
129
  }
130
130
  return E === s ? s = I : s === -1 && (s = l.length), l.slice(E, s);
131
131
  } else {
@@ -175,16 +175,16 @@ function jt(e = {}) {
175
175
  let E = l.charCodeAt(0), s;
176
176
  const v = E === 47;
177
177
  v ? (p.root = "/", s = 1) : s = 0;
178
- let w = -1, S = 0, I = -1, N = !0, $ = l.length - 1, T = 0;
179
- for (; $ >= s; --$) {
180
- if (E = l.charCodeAt($), E === 47) {
181
- if (!N) {
182
- S = $ + 1;
178
+ let w = -1, S = 0, I = -1, M = !0, U = l.length - 1, T = 0;
179
+ for (; U >= s; --U) {
180
+ if (E = l.charCodeAt(U), E === 47) {
181
+ if (!M) {
182
+ S = U + 1;
183
183
  break;
184
184
  }
185
185
  continue;
186
186
  }
187
- I === -1 && (N = !1, I = $ + 1), E === 46 ? w === -1 ? w = $ : T !== 1 && (T = 1) : w !== -1 && (T = -1);
187
+ I === -1 && (M = !1, I = U + 1), E === 46 ? w === -1 ? w = U : T !== 1 && (T = 1) : w !== -1 && (T = -1);
188
188
  }
189
189
  return w === -1 || I === -1 || // We saw a non-dot character immediately before the dot
190
190
  T === 0 || // The (right-most) trimmed path component is exactly '..'
@@ -222,7 +222,7 @@ function jt(e = {}) {
222
222
  }
223
223
  };
224
224
  }
225
- const $t = {
225
+ const Ut = {
226
226
  darwin: {
227
227
  arm64: [
228
228
  {
@@ -262,7 +262,7 @@ const $t = {
262
262
  ]
263
263
  }
264
264
  };
265
- async function Ut() {
265
+ async function Bt() {
266
266
  const e = Tt(), n = {
267
267
  dynamicImport: (i) => {
268
268
  throw new Error(
@@ -286,10 +286,10 @@ async function Ut() {
286
286
  }
287
287
  return n;
288
288
  }
289
- async function Bt(e) {
289
+ async function At(e) {
290
290
  const n = Tt();
291
291
  if (n === "node" || n === "bun") {
292
- const i = $t[process.platform];
292
+ const i = Ut[process.platform];
293
293
  if (i) {
294
294
  const r = i[process.arch];
295
295
  if (r)
@@ -314,15 +314,15 @@ async function Bt(e) {
314
314
  return await i.default(), i;
315
315
  }
316
316
  }
317
- const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof process < "u" && typeof global < "u" && process.versions && process.versions.node ? "node" : typeof self < "u" && typeof location < "u" && typeof navigator < "u" && typeof fetch == "function" && typeof WorkerGlobalScope == "function" && typeof self.importScripts == "function" ? "webworker" : typeof window < "u" && typeof document < "u" && typeof location < "u" && typeof navigator < "u" && typeof Window == "function" && typeof fetch == "function" ? "browsermain" : "unknown", At = async (e = {}) => {
318
- const n = e?.sys || await Ut(), i = e?.binding || await Bt(n);
317
+ const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof process < "u" && typeof global < "u" && process.versions && process.versions.node ? "node" : typeof self < "u" && typeof location < "u" && typeof navigator < "u" && typeof fetch == "function" && typeof WorkerGlobalScope == "function" && typeof self.importScripts == "function" ? "webworker" : typeof window < "u" && typeof document < "u" && typeof location < "u" && typeof navigator < "u" && typeof Window == "function" && typeof fetch == "function" ? "browsermain" : "unknown", Ft = async (e = {}) => {
318
+ const n = e?.sys || await Bt(), i = e?.binding || await At(n);
319
319
  return {
320
320
  async transformModules(o) {
321
- return Ft(i, o);
321
+ return Rt(i, o);
322
322
  },
323
323
  sys: n
324
324
  };
325
- }, Ft = (e, n) => e.transform_modules(Rt(n)), Rt = (e) => {
325
+ }, Rt = (e, n) => e.transform_modules($t(n)), $t = (e) => {
326
326
  const n = {
327
327
  minify: "simplify",
328
328
  sourceMaps: !1,
@@ -343,8 +343,8 @@ const Tt = () => typeof Deno < "u" ? "deno" : typeof Bun < "u" ? "bun" : typeof
343
343
  return Object.entries(e).forEach(([i, r]) => {
344
344
  r != null && (n[i] = r);
345
345
  }), n.entryStrategy = e.entryStrategy?.type ?? "smart", n.manualChunks = e.entryStrategy?.manual ?? void 0, n;
346
- }, Rr = {
347
- qwik: "2.0.0-beta.16-dev+a83ccf3"
346
+ }, $r = {
347
+ qwik: "2.0.0-beta.18-dev+a8081d4"
348
348
  }, zt = (e, n = 0) => {
349
349
  for (let i = 0; i < e.length; i++) {
350
350
  const r = e.charCodeAt(i);
@@ -450,7 +450,7 @@ const Ze = [
450
450
  (e) => e.toLowerCase()
451
451
  );
452
452
  function Gt(e) {
453
- return Object.keys(e.bundles).sort(Ue);
453
+ return Object.keys(e.bundles).sort(Be);
454
454
  }
455
455
  function Kt(e) {
456
456
  const n = Wt(e), i = {}, r = {};
@@ -460,15 +460,15 @@ function Kt(e) {
460
460
  for (const c of o) {
461
461
  h[c] = e.bundles[c];
462
462
  const a = e.bundles[c];
463
- Array.isArray(a.imports) && a.imports.sort(Ue), Array.isArray(a.dynamicImports) && a.dynamicImports.sort(Ue);
463
+ Array.isArray(a.imports) && a.imports.sort(Be), Array.isArray(a.dynamicImports) && a.dynamicImports.sort(Be);
464
464
  const u = [];
465
465
  for (const t of n)
466
466
  c === r[t] && u.push(t);
467
- u.length > 0 && (u.sort(Ue), a.symbols = u);
467
+ u.length > 0 && (u.sort(Be), a.symbols = u);
468
468
  }
469
469
  return e.symbols = i, e.mapping = r, e.bundles = h, e;
470
470
  }
471
- function Ue(e, n) {
471
+ function Be(e, n) {
472
472
  return e = e.toLocaleLowerCase(), n = n.toLocaleLowerCase(), e < n ? -1 : e > n ? 1 : 0;
473
473
  }
474
474
  function tt(e) {
@@ -891,7 +891,7 @@ function ln(e, n = 0, i) {
891
891
  function cn(e) {
892
892
  return e === "win32";
893
893
  }
894
- function $e(e) {
894
+ function Ue(e) {
895
895
  const [n, i] = e.split("?"), r = i || "";
896
896
  return {
897
897
  originalId: e,
@@ -963,7 +963,7 @@ function Dt(e = {}) {
963
963
  };
964
964
  let b, x;
965
965
  const m = async () => {
966
- if (!c && (c = await At(e), b = hn(c.sys), c.sys.env !== "browsermain" && c.sys.env !== "webworker"))
966
+ if (!c && (c = await Ft(e), b = hn(c.sys), c.sys.env !== "browsermain" && c.sys.env !== "webworker"))
967
967
  try {
968
968
  x === void 0 && (x = await c.sys.dynamicImport("node:fs"));
969
969
  } catch {
@@ -978,7 +978,7 @@ function Dt(e = {}) {
978
978
  const l = (_) => {
979
979
  f = _;
980
980
  }, p = async (_) => {
981
- const y = Object.assign({}, _), C = k(), M = C.sys.path, D = (...j) => X(M.resolve(...j));
981
+ const y = Object.assign({}, _), C = k(), N = C.sys.path, D = (...j) => X(N.resolve(...j));
982
982
  t.debug = !!y.debug, y.assetsDir && (t.assetsDir = y.assetsDir), y.target === "ssr" || y.target === "client" || y.target === "lib" || y.target === "test" ? t.target = y.target : t.target || (t.target = "client"), t.target === "lib" ? t.buildMode = "development" : y.buildMode === "production" || y.buildMode === "development" ? t.buildMode = y.buildMode : t.buildMode || (t.buildMode = "development"), t.csr = !!y.csr, y.entryStrategy && typeof y.entryStrategy == "object" && (t.entryStrategy = { ...y.entryStrategy }), t.entryStrategy || (t.target === "ssr" || t.target === "test" ? t.entryStrategy = { type: "hoist" } : t.target === "lib" ? t.entryStrategy = { type: "inline" } : t.buildMode === "production" ? t.entryStrategy = { type: "smart" } : t.entryStrategy = { type: "segment" }), typeof y.rootDir == "string" && (t.rootDir = y.rootDir), typeof t.rootDir != "string" && (t.rootDir || (t.rootDir = C.sys.cwd())), t.rootDir = D(C.sys.cwd(), t.rootDir);
983
983
  let P = D(t.rootDir, yn);
984
984
  if (typeof y.srcDir == "string" ? (t.srcDir = D(t.rootDir, y.srcDir), P = t.srcDir) : t.srcDir || (t.srcDir = P), t.srcDir = D(t.rootDir, t.srcDir), Array.isArray(y.tsconfigFileNames) && y.tsconfigFileNames.length > 0 && (t.tsconfigFileNames = y.tsconfigFileNames), !t.csr && !y.input && !t.input && (t.target === "ssr" ? t.input = [D(P, "entry.ssr")] : t.target === "client" ? t.input = [D(P, "root")] : t.input = void 0), y.outDir && (t.outDir = D(t.rootDir, y.outDir)), t.clientOutDir = D(t.rootDir, y.clientOutDir || lt), t.ssrOutDir = D(t.rootDir, y.ssrOutDir || bn), t.target === "ssr" ? t.outDir || (t.outDir = t.ssrOutDir) : t.target === "lib" ? t.outDir || (t.outDir = D(t.rootDir, vn)) : t.outDir || (t.outDir = t.clientOutDir), typeof y.manifestOutput == "function" && (t.manifestOutput = y.manifestOutput), y.manifestInput && (t.manifestInput = tt(y.manifestInput) || null), typeof y.transformedModuleOutput == "function" && (t.transformedModuleOutput = y.transformedModuleOutput), y.scope !== void 0)
@@ -986,20 +986,20 @@ function Dt(e = {}) {
986
986
  else if (!t.scope && x) {
987
987
  let j = "";
988
988
  try {
989
- let U = t.rootDir;
990
- for (; j = M.resolve(U, "package.json"), !await x.promises.stat(j).catch(() => !1); ) {
991
- const L = M.resolve(U, "..");
992
- if (L === U)
989
+ let B = t.rootDir;
990
+ for (; j = N.resolve(B, "package.json"), !await x.promises.stat(j).catch(() => !1); ) {
991
+ const O = N.resolve(B, "..");
992
+ if (O === B)
993
993
  break;
994
- U = L, j = "";
994
+ B = O, j = "";
995
995
  }
996
996
  if (j) {
997
- const L = await x.promises.readFile(j, "utf-8"), O = JSON.parse(L);
998
- typeof O.name == "string" && (t.scope = O.name);
997
+ const O = await x.promises.readFile(j, "utf-8"), L = JSON.parse(O);
998
+ typeof L.name == "string" && (t.scope = L.name);
999
999
  }
1000
- } catch (U) {
1000
+ } catch (B) {
1001
1001
  console.warn(
1002
- `could not read ${j || "package.json"} to determine package name, ignoring. (${U})`
1002
+ `could not read ${j || "package.json"} to determine package name, ignoring. (${B})`
1003
1003
  );
1004
1004
  }
1005
1005
  }
@@ -1008,8 +1008,8 @@ function Dt(e = {}) {
1008
1008
  for (const j of y.experimental ?? [])
1009
1009
  Pt[j] ? (t.experimental || (t.experimental = {}))[j] = !0 : console.error(`Qwik plugin: Unknown experimental feature: ${j}`);
1010
1010
  }
1011
- const A = { ...t };
1012
- return t.input || (t.input = y.input), t.input && typeof t.input == "string" && (t.input = [t.input]), A;
1011
+ const F = { ...t };
1012
+ return t.input || (t.input = y.input), t.input && typeof t.input == "string" && (t.input = [t.input]), F;
1013
1013
  };
1014
1014
  let E = !1;
1015
1015
  const s = async (_) => {
@@ -1022,7 +1022,7 @@ function Dt(e = {}) {
1022
1022
  throw new Error(`Qwik rootDir "${t.rootDir}" not found.`);
1023
1023
  if (typeof t.srcDir == "string" && !C.existsSync(t.srcDir))
1024
1024
  throw new Error(`Qwik srcDir "${t.srcDir}" not found.`);
1025
- for (const [M, D] of Object.entries(t.input || {}))
1025
+ for (const [N, D] of Object.entries(t.input || {}))
1026
1026
  if (!await _(D))
1027
1027
  throw new Error(`Qwik input "${D}" not found.`);
1028
1028
  }
@@ -1046,14 +1046,14 @@ function Dt(e = {}) {
1046
1046
  });
1047
1047
  }
1048
1048
  }, I = (_) => f ? !!_?.ssr : t.target === "ssr" || t.target === "test";
1049
- let N = 0, $ = !1;
1050
- const T = async (_, y, C, M) => {
1049
+ let M = 0, U = !1;
1050
+ const T = async (_, y, C, N) => {
1051
1051
  if (ee(y))
1052
1052
  return;
1053
1053
  const D = f && /^(.*)\?editor(:(\d+)(:\d+)?)?$/.exec(y);
1054
1054
  if (D) {
1055
- if (!$) {
1056
- $ = !0, setTimeout(() => $ = !1, 500);
1055
+ if (!U) {
1056
+ U = !0, setTimeout(() => U = !1, 500);
1057
1057
  const [, K, H] = D, de = await _.resolve(K, C);
1058
1058
  if (de) {
1059
1059
  const ae = f.moduleGraph.getModuleById(de.id)?.file;
@@ -1071,24 +1071,24 @@ function Dt(e = {}) {
1071
1071
  }
1072
1072
  return { id: "\0editor" };
1073
1073
  }
1074
- const P = N++, A = I(M);
1075
- q(`resolveId(${P})`, `begin ${y} | ${A ? "server" : "client"} | ${C}`);
1076
- const j = C && $e(C);
1074
+ const P = M++, F = I(N);
1075
+ q(`resolveId(${P})`, `begin ${y} | ${F ? "server" : "client"} | ${C}`);
1076
+ const j = C && Ue(C);
1077
1077
  if (C = j && X(j.pathId), y.startsWith(".") && j) {
1078
1078
  const K = d(), H = K.dirname(j.pathId);
1079
1079
  H && (y = K.resolve(H, y));
1080
1080
  }
1081
- const U = $e(y), L = X(U.pathId);
1082
- let O;
1081
+ const B = Ue(y), O = X(B.pathId);
1082
+ let L;
1083
1083
  if (
1084
1084
  /**
1085
1085
  * Check if we know the QRL. During regular builds, we'll encounter and build parents before
1086
1086
  * their QRLs, so this will always match.
1087
1087
  */
1088
- h.get(L)
1088
+ h.get(O)
1089
1089
  )
1090
- q(`resolveId(${P}) Resolved already known ${L}`), O = {
1091
- id: L + U.query,
1090
+ q(`resolveId(${P}) Resolved already known ${O}`), L = {
1091
+ id: O + B.query,
1092
1092
  moduleSideEffects: !1
1093
1093
  };
1094
1094
  else if (
@@ -1097,18 +1097,18 @@ function Dt(e = {}) {
1097
1097
  * been transformed yet.
1098
1098
  */
1099
1099
  // We test with endsWith because the dev server adds the base pathname
1100
- L.endsWith(ne)
1100
+ O.endsWith(ne)
1101
1101
  )
1102
- t.resolveQwikBuild && (q(`resolveId(${P})`, "Resolved", ne), O = {
1102
+ t.resolveQwikBuild && (q(`resolveId(${P})`, "Resolved", ne), L = {
1103
1103
  id: ne,
1104
1104
  moduleSideEffects: !1
1105
1105
  });
1106
- else if (L.endsWith(re))
1107
- q(`resolveId(${P})`, "Resolved", re), O = {
1106
+ else if (O.endsWith(re))
1107
+ q(`resolveId(${P})`, "Resolved", re), L = {
1108
1108
  id: re,
1109
1109
  moduleSideEffects: !1
1110
1110
  };
1111
- else if (!f && !A && L.endsWith(We)) {
1111
+ else if (!f && !F && O.endsWith(We)) {
1112
1112
  q(`resolveId(${P})`, "Resolved", We);
1113
1113
  const K = await _.resolve(We, C, {
1114
1114
  skipSelf: !0
@@ -1119,13 +1119,13 @@ function Dt(e = {}) {
1119
1119
  type: "chunk",
1120
1120
  preserveSignature: "allow-extension"
1121
1121
  }), K;
1122
- } else if (L.endsWith(pe))
1123
- q(`resolveId(${P})`, "Resolved", pe), O = {
1122
+ } else if (O.endsWith(pe))
1123
+ q(`resolveId(${P})`, "Resolved", pe), L = {
1124
1124
  id: pe,
1125
1125
  moduleSideEffects: !1
1126
1126
  };
1127
1127
  else {
1128
- if (!A && w && y.endsWith("@qwik.dev/core")) {
1128
+ if (!F && w && y.endsWith("@qwik.dev/core")) {
1129
1129
  w = !1;
1130
1130
  const H = await _.resolve("@qwik.dev/core/handlers.mjs", C, {
1131
1131
  skipSelf: !0
@@ -1142,8 +1142,8 @@ function Dt(e = {}) {
1142
1142
  if (K) {
1143
1143
  const { parent: H, name: de, query: ae } = K, te = await _.resolve(H, C, { skipSelf: !0 });
1144
1144
  if (te) {
1145
- const Y = te.id.split("?")[0], Oe = f && C?.endsWith(".html") ? `${Y}_${de}.js` : L;
1146
- q(`resolveId(${P})`, `resolved to QRL ${de} of ${Y}`), h.set(Oe, Y), O = {
1145
+ const Y = te.id.split("?")[0], Oe = f && C?.endsWith(".html") ? `${Y}_${de}.js` : O;
1146
+ q(`resolveId(${P})`, `resolved to QRL ${de} of ${Y}`), h.set(Oe, Y), L = {
1147
1147
  id: Oe + ae,
1148
1148
  // QRL segments can't have side effects. Probably never useful, but it's here for consistency
1149
1149
  moduleSideEffects: !1
@@ -1156,61 +1156,61 @@ function Dt(e = {}) {
1156
1156
  return q(`resolveId(${P}) end`, `resolving via ${H}`), _.resolve(y, H, { skipSelf: !0 });
1157
1157
  }
1158
1158
  }
1159
- return q(`resolveId(${P}) end`, O?.id || O), O;
1159
+ return q(`resolveId(${P}) end`, L?.id || L), L;
1160
1160
  };
1161
- let F = 0;
1161
+ let R = 0;
1162
1162
  const Q = async (_, y, C) => {
1163
1163
  if (y === "\0editor")
1164
1164
  return '"opening in editor"';
1165
1165
  if (ee(y) || y.startsWith("/@fs/"))
1166
1166
  return;
1167
- const M = F++, D = I(C);
1167
+ const N = R++, D = I(C);
1168
1168
  if (t.resolveQwikBuild && y === ne)
1169
- return q(`load(${M})`, ne, t.buildMode), {
1169
+ return q(`load(${N})`, ne, t.buildMode), {
1170
1170
  moduleSideEffects: !1,
1171
1171
  code: W(D, t.target)
1172
1172
  };
1173
1173
  if (y === re)
1174
- return q(`load(${M})`, re, t.buildMode), {
1174
+ return q(`load(${N})`, re, t.buildMode), {
1175
1175
  moduleSideEffects: !1,
1176
1176
  code: await Me(D)
1177
1177
  };
1178
1178
  if (y === pe)
1179
- return q(`load(${M})`, pe, t.buildMode), {
1179
+ return q(`load(${N})`, pe, t.buildMode), {
1180
1180
  moduleSideEffects: !1,
1181
1181
  code: "export * from '@qwik.dev/core';"
1182
1182
  };
1183
- const P = $e(y);
1183
+ const P = Ue(y);
1184
1184
  y = X(P.pathId);
1185
- const A = D ? o : r;
1186
- if (f && !A.has(y)) {
1187
- const U = h.get(y);
1188
- if (U) {
1189
- const L = f.moduleGraph.getModuleById(U);
1190
- if (L) {
1191
- if (q(`load(${M})`, "transforming QRL parent", U), await f.transformRequest(L.url), !A.has(y))
1192
- return q(`load(${M})`, `QRL segment ${y} not found in ${U}`), null;
1185
+ const F = D ? o : r;
1186
+ if (f && !F.has(y)) {
1187
+ const B = h.get(y);
1188
+ if (B) {
1189
+ const O = f.moduleGraph.getModuleById(B);
1190
+ if (O) {
1191
+ if (q(`load(${N})`, "transforming QRL parent", B), await f.transformRequest(O.url), !F.has(y))
1192
+ return q(`load(${N})`, `QRL segment ${y} not found in ${B}`), null;
1193
1193
  } else
1194
- console.error(`load(${M})`, `${L} does not exist!`);
1194
+ console.error(`load(${N})`, `module ${B} does not exist in the build graph!`);
1195
1195
  }
1196
1196
  }
1197
- const j = A.get(y);
1197
+ const j = F.get(y);
1198
1198
  if (j) {
1199
- q(`load(${M})`, "Found", y);
1200
- const { code: U, map: L, segment: O } = j[0];
1201
- return { code: U, map: L, meta: { segment: O } };
1199
+ q(`load(${N})`, "Found", y);
1200
+ const { code: B, map: O, segment: L } = j[0];
1201
+ return { code: B, map: O, meta: { segment: L } };
1202
1202
  }
1203
- return q(`load(${M})`, "Not a QRL or virtual module", y), null;
1203
+ return q(`load(${N})`, "Not a QRL or virtual module", y), null;
1204
1204
  };
1205
- let B = 0;
1206
- const V = async function(_, y, C, M = {}) {
1205
+ let A = 0;
1206
+ const V = async function(_, y, C, N = {}) {
1207
1207
  if (ee(C))
1208
1208
  return;
1209
- const D = B++, P = I(M), A = P ? o : r;
1210
- if (A.has(C))
1209
+ const D = A++, P = I(N), F = P ? o : r;
1210
+ if (F.has(C))
1211
1211
  return;
1212
- const j = k(), U = d(), { pathId: L } = $e(C), O = U.parse(L), K = O.dir, H = O.base;
1213
- if (O.ext.toLowerCase() in gn || Nt.test(L)) {
1212
+ const j = k(), B = d(), { pathId: O } = Ue(C), L = B.parse(O), K = L.dir, H = L.base;
1213
+ if (L.ext.toLowerCase() in gn || Nt.test(O)) {
1214
1214
  const ae = t.target === "client" || t.target === "ssr";
1215
1215
  q(
1216
1216
  `transform(${D})`,
@@ -1219,10 +1219,10 @@ function Dt(e = {}) {
1219
1219
  const te = t.target === "lib" ? "lib" : t.buildMode === "development" ? "dev" : "prod";
1220
1220
  te !== "lib" && (y = y.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (Z, le) => t.experimental?.[le] ? "true" : "false"));
1221
1221
  let Y = H;
1222
- t.srcDir && (Y = U.relative(t.srcDir, L)), Y = X(Y);
1222
+ t.srcDir && (Y = B.relative(t.srcDir, O)), Y = X(Y);
1223
1223
  const Le = t.srcDir ? t.srcDir : X(K), Oe = t.entryStrategy;
1224
1224
  let Ve;
1225
- f && (Ve = f.moduleGraph.getModuleById(L)?.url);
1225
+ f && (Ve = f.moduleGraph.getModuleById(O)?.url);
1226
1226
  const ue = {
1227
1227
  input: [{ code: y, path: Y, devPath: Ve }],
1228
1228
  entryStrategy: P ? { type: "hoist" } : Oe,
@@ -1247,8 +1247,8 @@ function Dt(e = {}) {
1247
1247
  const ze = /* @__PURE__ */ new Set();
1248
1248
  for (const Z of fe.modules)
1249
1249
  if (Z !== je) {
1250
- const le = X(U.join(Le, Z.path));
1251
- q(`transform(${D})`, `segment ${le}`, Z.segment.displayName), h.set(le, C), A.set(le, [Z, C]), ze.add(le), t.target === "client" && !f && _.emitFile({
1250
+ const le = X(B.join(Le, Z.path));
1251
+ q(`transform(${D})`, `segment ${le}`, Z.segment.displayName), h.set(le, C), F.set(le, [Z, C]), ze.add(le), t.target === "client" && !f && _.emitFile({
1252
1252
  id: le,
1253
1253
  type: "chunk",
1254
1254
  preserveSignature: "allow-extension"
@@ -1266,26 +1266,26 @@ function Dt(e = {}) {
1266
1266
  return q(`transform(${D})`, "Not transforming", C), null;
1267
1267
  }, G = (_) => {
1268
1268
  const y = [], C = {
1269
- addInjection: (M) => y.push(M)
1269
+ addInjection: (N) => y.push(N)
1270
1270
  };
1271
- return C.generateManifest = async (M) => {
1272
- const P = k().sys.path, A = P.resolve(t.rootDir, t.outDir, "build"), j = (O) => P.relative(A, P.resolve(t.rootDir, t.outDir, O));
1271
+ return C.generateManifest = async (N) => {
1272
+ const P = k().sys.path, F = P.resolve(t.rootDir, t.outDir, "build"), j = (L) => P.relative(F, P.resolve(t.rootDir, t.outDir, L));
1273
1273
  C.canonPath = j;
1274
- const U = Array.from(i.values()).flatMap((O) => O.modules).map((O) => O.segment).filter((O) => !!O), L = Yt(
1274
+ const B = Array.from(i.values()).flatMap((L) => L.modules).map((L) => L.segment).filter((L) => !!L), O = Yt(
1275
1275
  P,
1276
- U,
1276
+ B,
1277
1277
  y,
1278
1278
  _,
1279
1279
  t,
1280
1280
  q,
1281
1281
  j
1282
1282
  );
1283
- M && Object.assign(L, M);
1284
- for (const O of Object.values(L.symbols))
1285
- O.origin && (O.origin = X(O.origin));
1286
- for (const O of Object.values(L.bundles))
1287
- O.origins && (O.origins = O.origins.sort());
1288
- return L.manifestHash = zt(JSON.stringify(L)), L;
1283
+ N && Object.assign(O, N);
1284
+ for (const L of Object.values(O.symbols))
1285
+ L.origin && (L.origin = X(L.origin));
1286
+ for (const L of Object.values(O.bundles))
1287
+ L.origins && (L.origins = L.origins.sort());
1288
+ return O.manifestHash = zt(JSON.stringify(O)), O;
1289
1289
  }, C;
1290
1290
  }, ie = () => t, J = () => Array.from(r.values()).map((_) => _[0]), q = (..._) => {
1291
1291
  t.debug && console.debug(`[QWIK PLUGIN: ${n}]`, ..._);
@@ -1304,9 +1304,9 @@ export const isDev = ${JSON.stringify(C)};
1304
1304
  }
1305
1305
  async function Me(_) {
1306
1306
  if (!t.manifestInput && t.target === "ssr" && t.buildMode === "production" && x) {
1307
- const M = d();
1308
- let D = t.manifestInputPath || M.resolve(t.clientOutDir, Ge);
1309
- await x.promises.stat(D).catch(() => !1) || (D = M.resolve(t.rootDir, lt, Ge));
1307
+ const N = d();
1308
+ let D = t.manifestInputPath || N.resolve(t.clientOutDir, Ge);
1309
+ await x.promises.stat(D).catch(() => !1) || (D = N.resolve(t.rootDir, lt, Ge));
1310
1310
  try {
1311
1311
  const P = await x.promises.readFile(D, "utf-8");
1312
1312
  t.manifestInput = tt(JSON.parse(P)) || null, console.info("Read client manifest from", D);
@@ -1347,10 +1347,10 @@ export const manifest = ${C ? JSON.stringify(C) : "globalThis.__QWIK_MANIFEST__"
1347
1347
  const { id: C } = y;
1348
1348
  if (C) {
1349
1349
  q("handleHotUpdate()", `invalidate ${C}`), i.delete(C);
1350
- for (const M of [r, o])
1351
- for (const [D, [P, A]] of M)
1352
- if (A === C) {
1353
- q("handleHotUpdate()", `invalidate ${C} segment ${D}`), M.delete(D);
1350
+ for (const N of [r, o])
1351
+ for (const [D, [P, F]] of N)
1352
+ if (F === C) {
1353
+ q("handleHotUpdate()", `invalidate ${C} segment ${D}`), N.delete(D);
1354
1354
  const j = _.server.moduleGraph.getModuleById(D);
1355
1355
  j && _.server.moduleGraph.invalidateModule(j);
1356
1356
  }
@@ -1375,37 +1375,39 @@ export const manifest = ${C ? JSON.stringify(C) : "globalThis.__QWIK_MANIFEST__"
1375
1375
  }
1376
1376
  const C = y(_);
1377
1377
  if (C) {
1378
- const M = C.meta.segment;
1379
- if (M) {
1380
- const { hash: D } = M, P = t.entryStrategy.manual?.[D] || M.entry;
1378
+ const N = C.meta.segment;
1379
+ if (N) {
1380
+ if (["qwikify$", "useVisibleTask$", "useComputed$"].includes(N.ctxName))
1381
+ return null;
1382
+ const { hash: D } = N, P = t.entryStrategy.manual?.[D] || N.entry;
1381
1383
  if (P)
1382
1384
  return P;
1383
1385
  }
1384
1386
  }
1385
1387
  return null;
1386
1388
  };
1387
- async function Lt(_, y, C, M) {
1388
- const P = await G(y).generateManifest(M);
1389
+ async function Lt(_, y, C, N) {
1390
+ const P = await G(y).generateManifest(N);
1389
1391
  P.platform = {
1390
- ...M?.platform,
1392
+ ...N?.platform,
1391
1393
  rollup: _.meta?.rollupVersion || "",
1392
1394
  env: v.sys.env,
1393
1395
  os: v.sys.os
1394
1396
  }, v.sys.env === "node" && (P.platform.node = process.versions.node);
1395
- const A = en(P, C), j = _.emitFile({
1397
+ const F = en(P, C), j = _.emitFile({
1396
1398
  type: "asset",
1397
1399
  name: "bundle-graph.json",
1398
- source: JSON.stringify(A)
1399
- }), U = _.getFileName(j);
1400
- P.bundleGraphAsset = U, P.assets[U] = {
1400
+ source: JSON.stringify(F)
1401
+ }), B = _.getFileName(j);
1402
+ P.bundleGraphAsset = B, P.assets[B] = {
1401
1403
  name: "bundle-graph.json",
1402
- size: A.length
1404
+ size: F.length
1403
1405
  };
1404
- const L = JSON.stringify(P, null, " ");
1406
+ const O = JSON.stringify(P, null, " ");
1405
1407
  _.emitFile({
1406
1408
  fileName: Ge,
1407
1409
  type: "asset",
1408
- source: L
1410
+ source: O
1409
1411
  }), typeof t.manifestOutput == "function" && await t.manifestOutput(P), typeof t.transformedModuleOutput == "function" && await t.transformedModuleOutput(J());
1410
1412
  }
1411
1413
  return {
@@ -1442,7 +1444,7 @@ const gn = {
1442
1444
  ".jsx": !0,
1443
1445
  ".ts": !0,
1444
1446
  ".tsx": !0
1445
- }, Nt = /\.qwik\.[mc]?js$/, Be = "@qwik.dev/core", Ae = "@qwik.dev/core/internal", ne = "@qwik.dev/core/build", Je = "@qwik.dev/core/jsx-runtime", Ye = "@qwik.dev/core/jsx-dev-runtime", He = "@qwik.dev/core/server", re = "@qwik-client-manifest", We = "@qwik.dev/core/preloader", pe = "@qwik-handlers", yn = "src", lt = "dist", bn = "server", vn = "lib", Ge = "q-manifest.json";
1447
+ }, Nt = /\.qwik\.[mc]?js$/, Ae = "@qwik.dev/core", Fe = "@qwik.dev/core/internal", ne = "@qwik.dev/core/build", Je = "@qwik.dev/core/jsx-runtime", Ye = "@qwik.dev/core/jsx-dev-runtime", He = "@qwik.dev/core/server", re = "@qwik-client-manifest", We = "@qwik.dev/core/preloader", pe = "@qwik-handlers", yn = "src", lt = "dist", bn = "server", vn = "lib", Ge = "q-manifest.json";
1446
1448
  async function wn(e, n, i) {
1447
1449
  if (e.env === "browsermain" || e.env === "webworker")
1448
1450
  return;
@@ -1503,7 +1505,7 @@ function zr(e = {}) {
1503
1505
  n.onDiagnostics((r, o, h) => {
1504
1506
  r.forEach((c) => {
1505
1507
  const a = n.normalizePath(o.sys.path.join(h, c.file));
1506
- c.category === "error" ? this.error(Fe(a, c)) : this.warn(Fe(a, c));
1508
+ c.category === "error" ? this.error(Re(a, c)) : this.warn(Re(a, c));
1507
1509
  });
1508
1510
  }), await n.buildStart(this);
1509
1511
  },
@@ -1564,7 +1566,7 @@ async function Xe(e, n, i) {
1564
1566
  }
1565
1567
  return r;
1566
1568
  }
1567
- function Fe(e, n) {
1569
+ function Re(e, n) {
1568
1570
  const i = n.highlights?.[0];
1569
1571
  return Object.assign(new Error(n.message), {
1570
1572
  id: e,
@@ -1576,7 +1578,7 @@ function Fe(e, n) {
1576
1578
  stack: ""
1577
1579
  });
1578
1580
  }
1579
- function R(e) {
1581
+ function $(e) {
1580
1582
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1581
1583
  }
1582
1584
  var he = {}, Ke = {}, ct;
@@ -1654,7 +1656,7 @@ function Sn() {
1654
1656
  }, he;
1655
1657
  }
1656
1658
  var kn = Sn();
1657
- const En = /* @__PURE__ */ R(kn);
1659
+ const En = /* @__PURE__ */ $(kn);
1658
1660
  var me = {}, ge = {}, ut;
1659
1661
  function Mt() {
1660
1662
  if (ut) return ge;
@@ -1705,7 +1707,7 @@ function _n() {
1705
1707
  }, me;
1706
1708
  }
1707
1709
  var Tn = _n();
1708
- const Cn = /* @__PURE__ */ R(Tn);
1710
+ const Cn = /* @__PURE__ */ $(Tn);
1709
1711
  var ye = {}, pt;
1710
1712
  function Pn() {
1711
1713
  if (pt) return ye;
@@ -1720,7 +1722,7 @@ function Pn() {
1720
1722
  }, ye;
1721
1723
  }
1722
1724
  var Dn = Pn();
1723
- const Nn = /* @__PURE__ */ R(Dn);
1725
+ const Nn = /* @__PURE__ */ $(Dn);
1724
1726
  var be = {}, ht;
1725
1727
  function Mn() {
1726
1728
  if (ht) return be;
@@ -1735,7 +1737,7 @@ function Mn() {
1735
1737
  }, be;
1736
1738
  }
1737
1739
  var qn = Mn();
1738
- const Ln = /* @__PURE__ */ R(qn);
1740
+ const Ln = /* @__PURE__ */ $(qn);
1739
1741
  var ve = {}, mt;
1740
1742
  function On() {
1741
1743
  if (mt) return ve;
@@ -1812,11 +1814,11 @@ function On() {
1812
1814
  }, ve;
1813
1815
  }
1814
1816
  var jn = On();
1815
- const $n = /* @__PURE__ */ R(jn);
1816
- var Un = Mt();
1817
- const Bn = /* @__PURE__ */ R(Un);
1817
+ const Un = /* @__PURE__ */ $(jn);
1818
+ var Bn = Mt();
1819
+ const An = /* @__PURE__ */ $(Bn);
1818
1820
  var we = {}, gt;
1819
- function An() {
1821
+ function Fn() {
1820
1822
  if (gt) return we;
1821
1823
  gt = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.J2C = void 0;
1822
1824
  const e = z();
@@ -1829,8 +1831,8 @@ function An() {
1829
1831
  })
1830
1832
  }, we;
1831
1833
  }
1832
- var Fn = An();
1833
- const Rn = /* @__PURE__ */ R(Fn);
1834
+ var Rn = Fn();
1835
+ const $n = /* @__PURE__ */ $(Rn);
1834
1836
  var xe = {}, yt;
1835
1837
  function zn() {
1836
1838
  if (yt) return xe;
@@ -1855,7 +1857,7 @@ function zn() {
1855
1857
  }, xe;
1856
1858
  }
1857
1859
  var Hn = zn();
1858
- const Wn = /* @__PURE__ */ R(Hn);
1860
+ const Wn = /* @__PURE__ */ $(Hn);
1859
1861
  var Ie = {}, bt;
1860
1862
  function Gn() {
1861
1863
  if (bt) return Ie;
@@ -1916,7 +1918,7 @@ function Gn() {
1916
1918
  }, Ie;
1917
1919
  }
1918
1920
  var Kn = Gn();
1919
- const Qn = /* @__PURE__ */ R(Kn);
1921
+ const Qn = /* @__PURE__ */ $(Kn);
1920
1922
  var Se = {}, vt;
1921
1923
  function Jn() {
1922
1924
  if (vt) return Se;
@@ -1938,7 +1940,7 @@ function Jn() {
1938
1940
  }, Se;
1939
1941
  }
1940
1942
  var Yn = Jn();
1941
- const Xn = /* @__PURE__ */ R(Yn);
1943
+ const Xn = /* @__PURE__ */ $(Yn);
1942
1944
  var ke = {}, wt;
1943
1945
  function Vn() {
1944
1946
  if (wt) return ke;
@@ -1968,7 +1970,7 @@ function Vn() {
1968
1970
  }, ke;
1969
1971
  }
1970
1972
  var Zn = Vn();
1971
- const er = /* @__PURE__ */ R(Zn);
1973
+ const er = /* @__PURE__ */ $(Zn);
1972
1974
  var Ee = {}, xt;
1973
1975
  function tr() {
1974
1976
  if (xt) return Ee;
@@ -2026,7 +2028,7 @@ function tr() {
2026
2028
  }, Ee;
2027
2029
  }
2028
2030
  var nr = tr();
2029
- const rr = /* @__PURE__ */ R(nr);
2031
+ const rr = /* @__PURE__ */ $(nr);
2030
2032
  var _e = {}, It;
2031
2033
  function or() {
2032
2034
  if (It) return _e;
@@ -2041,7 +2043,7 @@ function or() {
2041
2043
  }, _e;
2042
2044
  }
2043
2045
  var ir = or();
2044
- const sr = /* @__PURE__ */ R(ir);
2046
+ const sr = /* @__PURE__ */ $(ir);
2045
2047
  var Te = {}, St;
2046
2048
  function ar() {
2047
2049
  if (St) return Te;
@@ -2118,7 +2120,7 @@ function ar() {
2118
2120
  }, Te;
2119
2121
  }
2120
2122
  var lr = ar();
2121
- const cr = /* @__PURE__ */ R(lr);
2123
+ const cr = /* @__PURE__ */ $(lr);
2122
2124
  var Ce = {}, kt;
2123
2125
  function dr() {
2124
2126
  if (kt) return Ce;
@@ -2137,7 +2139,7 @@ function dr() {
2137
2139
  }, Ce;
2138
2140
  }
2139
2141
  var ur = dr();
2140
- const fr = /* @__PURE__ */ R(ur);
2142
+ const fr = /* @__PURE__ */ $(ur);
2141
2143
  var Pe = {}, Et;
2142
2144
  function pr() {
2143
2145
  if (Et) return Pe;
@@ -2184,7 +2186,7 @@ function pr() {
2184
2186
  }, Pe;
2185
2187
  }
2186
2188
  var hr = pr();
2187
- const mr = /* @__PURE__ */ R(hr);
2189
+ const mr = /* @__PURE__ */ $(hr);
2188
2190
  var De = {}, _t;
2189
2191
  function gr() {
2190
2192
  if (_t) return De;
@@ -2221,7 +2223,7 @@ function gr() {
2221
2223
  }, De;
2222
2224
  }
2223
2225
  var yr = gr();
2224
- const br = /* @__PURE__ */ R(yr), vr = {
2226
+ const br = /* @__PURE__ */ $(yr), vr = {
2225
2227
  56: "psd",
2226
2228
  66: "bmp",
2227
2229
  68: "dds",
@@ -2230,7 +2232,7 @@ const br = /* @__PURE__ */ R(yr), vr = {
2230
2232
  105: "icns",
2231
2233
  137: "png",
2232
2234
  255: "jpg"
2233
- }, Re = {
2235
+ }, $e = {
2234
2236
  webp: mr.WEBP,
2235
2237
  jpg: Qn.JPG,
2236
2238
  png: er.PNG,
@@ -2240,23 +2242,23 @@ const br = /* @__PURE__ */ R(yr), vr = {
2240
2242
  bmp: En.BMP,
2241
2243
  cur: Cn.CUR,
2242
2244
  dds: Nn.DDS,
2243
- icns: $n.ICNS,
2244
- ico: Bn.ICO,
2245
- j2c: Rn.J2C,
2245
+ icns: Un.ICNS,
2246
+ ico: An.ICO,
2247
+ j2c: $n.J2C,
2246
2248
  jp2: Wn.JP2,
2247
2249
  ktx: Xn.KTX,
2248
2250
  pnm: rr.PNM,
2249
2251
  psd: sr.PSD,
2250
2252
  tga: fr.TGA
2251
- }, wr = Object.keys(Re);
2253
+ }, wr = Object.keys($e);
2252
2254
  function xr(e) {
2253
2255
  const n = e[0], i = vr[n];
2254
- return i && Re[i].validate(e) ? i : wr.find((r) => Re[r].validate(e));
2256
+ return i && $e[i].validate(e) ? i : wr.find((r) => $e[r].validate(e));
2255
2257
  }
2256
2258
  function Ir(e) {
2257
2259
  const n = xr(e);
2258
2260
  if (typeof n < "u") {
2259
- const i = Re[n].calculate(e);
2261
+ const i = $e[n].calculate(e);
2260
2262
  if (i !== void 0)
2261
2263
  return i.type = n, i;
2262
2264
  }
@@ -2336,27 +2338,27 @@ const kr = (e, n, i) => async (r, o, h) => {
2336
2338
  const S = [".ts", ".tsx", ".js", ".jsx", ".mdx"].includes(p);
2337
2339
  let I = s.slice(v, w);
2338
2340
  if (m && k && S) {
2339
- const N = new URL(m), $ = new URL(k);
2340
- if (N.origin === $.origin) {
2341
- const T = a.join(n, "public", N.pathname), F = a.join(n, N.pathname);
2341
+ const M = new URL(m), U = new URL(k);
2342
+ if (M.origin === U.origin) {
2343
+ const T = a.join(n, "public", M.pathname), R = a.join(n, M.pathname);
2342
2344
  let Q;
2343
2345
  if (c.existsSync(T)) {
2344
- const J = a.join(i, "media", a.dirname(N.pathname));
2346
+ const J = a.join(i, "media", a.dirname(M.pathname));
2345
2347
  await c.promises.mkdir(J, { recursive: !0 }), await c.promises.copyFile(
2346
2348
  T,
2347
- a.join(i, "media", N.pathname)
2348
- ), Q = "~/media" + N.pathname;
2349
- } else if (c.existsSync(F))
2350
- Q = N.pathname.replace("/src/", "~/");
2349
+ a.join(i, "media", M.pathname)
2350
+ ), Q = "~/media" + M.pathname;
2351
+ } else if (c.existsSync(R))
2352
+ Q = M.pathname.replace("/src/", "~/");
2351
2353
  else
2352
2354
  return;
2353
- const B = Er(N.pathname), V = `${Q}?jsx`;
2354
- I = I.replace(/^<img/, `<${B}`), I = I.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2355
+ const A = Er(M.pathname), V = `${Q}?jsx`;
2356
+ I = I.replace(/^<img/, `<${A}`), I = I.replace(/\bwidth=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bheight=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, ""), I = I.replace(/\bsrc=(({[^}]*})|('[^']*')|("[^"]*"))\s*/, "");
2355
2357
  let G = 0;
2356
2358
  if (p === ".mdx" && s.startsWith("---") && (G = s.indexOf("---", 4) + 3, G === -1))
2357
2359
  return;
2358
2360
  const ie = `
2359
- import ${B} from '${V}';`;
2361
+ import ${A} from '${V}';`;
2360
2362
  s = `${s.slice(0, G)}${ie}${s.slice(
2361
2363
  G,
2362
2364
  v
@@ -2608,15 +2610,15 @@ const jr = (e, n) => {
2608
2610
  });
2609
2611
  }
2610
2612
  return i;
2611
- }, $r = [
2612
- Be,
2613
+ }, Ur = [
2614
+ Ae,
2613
2615
  Je,
2614
2616
  Ye,
2615
- Ae,
2617
+ Fe,
2616
2618
  "@builder.io/qwik",
2617
2619
  "@builder.io/qwik/jsx-runtime",
2618
2620
  "@builder.io/qwik/jsx-dev-runtime"
2619
- ], Ur = [".css", ".scss", ".sass", ".less", ".styl", ".stylus"], Br = [".woff", ".woff2", ".ttf"];
2621
+ ], Br = [".css", ".scss", ".sass", ".less", ".styl", ".stylus"], Ar = [".woff", ".woff2", ".ttf"];
2620
2622
  function Hr(e = {}) {
2621
2623
  let n = "serve", i = null, r = null, o = "/", h = null, c, a = null, u = null, t = null;
2622
2624
  const b = e.client?.outDir;
@@ -2643,10 +2645,10 @@ function Hr(e = {}) {
2643
2645
  s.build?.ssr || v.mode === "ssr" ? S = "ssr" : v.mode === "lib" ? S = "lib" : v.mode === "test" ? S = "test" : S = "client", n = v.command;
2644
2646
  let I;
2645
2647
  v.mode === "production" ? I = "production" : v.mode === "development" ? I = "development" : n === "build" && S === "client" ? I = "production" : I = "development", d.debug(`vite config(), command: ${n}, env.mode: ${v.mode}`), n === "serve" ? e.entryStrategy = { type: "segment" } : S === "ssr" ? e.entryStrategy = { type: "hoist" } : S === "lib" && (e.entryStrategy = { type: "inline" });
2646
- const N = S === "ssr" ? typeof s.build?.ssr == "string" ? s.build.ssr : e.ssr?.input : void 0, $ = S === "client" ? e.client?.input : void 0;
2647
- let T = s.build?.rollupOptions?.input || $ || N;
2648
+ const M = S === "ssr" ? typeof s.build?.ssr == "string" ? s.build.ssr : e.ssr?.input : void 0, U = S === "client" ? e.client?.input : void 0;
2649
+ let T = s.build?.rollupOptions?.input || U || M;
2648
2650
  T && typeof T == "string" && (T = [T]), c = s.build?.assetsDir;
2649
- const F = S === "client" && !!c && c !== "_astro", Q = {
2651
+ const R = S === "client" && !!c && c !== "_astro", Q = {
2650
2652
  target: S,
2651
2653
  buildMode: I,
2652
2654
  csr: e.csr,
@@ -2662,7 +2664,7 @@ function Hr(e = {}) {
2662
2664
  clientOutDir: b || // When ssr is true, this is probably an adapter build and not where the client build is
2663
2665
  // However, if client.outDir was explicitly set, always use it
2664
2666
  (s.build?.ssr && !b ? void 0 : s.build?.outDir),
2665
- assetsDir: F ? c : void 0,
2667
+ assetsDir: R ? c : void 0,
2666
2668
  devTools: e.devTools,
2667
2669
  sourcemap: !!s.build?.sourcemap,
2668
2670
  lint: e.lint,
@@ -2671,15 +2673,15 @@ function Hr(e = {}) {
2671
2673
  manifestInput: e.ssr?.manifestInput,
2672
2674
  manifestInputPath: e.ssr?.manifestInputPath,
2673
2675
  manifestOutput: e.client?.manifestOutput
2674
- }, B = await d.normalizeOptions(Q);
2675
- T || (T = B.input), x = Q, i = B.manifestInput, a = B.srcDir, u = B.rootDir, e.csr || (r = B.clientOutDir, h = s.base ? w.join(r, s.base) : r, t = B.ssrOutDir);
2676
+ }, A = await d.normalizeOptions(Q);
2677
+ T || (T = A.input), x = Q, i = A.manifestInput, a = A.srcDir, u = A.rootDir, e.csr || (r = A.clientOutDir, h = s.base ? w.join(r, s.base) : r, t = A.ssrOutDir);
2676
2678
  const V = I === "development", G = "globalThis.qDev", ie = "globalThis.qTest", J = "globalThis.qInspector", q = "globalThis.qSerialize", se = s?.define?.[G] ?? V, Ne = s?.define?.[J] ?? V, X = s?.define?.[q] ?? V, W = {
2677
2679
  ssr: {
2678
- noExternal: [Be, Ae, He, ne]
2680
+ noExternal: [Ae, Fe, He, ne]
2679
2681
  },
2680
2682
  envPrefix: ["VITE_", "PUBLIC_"],
2681
2683
  resolve: {
2682
- dedupe: [...$r],
2684
+ dedupe: [...Ur],
2683
2685
  conditions: I === "production" && S === "client" ? ["min"] : [],
2684
2686
  alias: {
2685
2687
  "@builder.io/qwik": "@qwik.dev/core",
@@ -2703,8 +2705,8 @@ function Hr(e = {}) {
2703
2705
  exclude: [
2704
2706
  // using optimized deps for qwik libraries will lead to duplicate imports
2705
2707
  // this breaks Qwik because it relies a lot on module scoped symbols
2706
- Be,
2707
2708
  Ae,
2709
+ Fe,
2708
2710
  He,
2709
2711
  Je,
2710
2712
  Ye,
@@ -2741,23 +2743,23 @@ function Hr(e = {}) {
2741
2743
  }
2742
2744
  };
2743
2745
  if (!e.csr) {
2744
- W.build.cssCodeSplit = !1, B.outDir && (W.build.outDir = B.outDir);
2746
+ W.build.cssCodeSplit = !1, A.outDir && (W.build.outDir = A.outDir);
2745
2747
  const Me = W.build.rollupOptions?.onwarn;
2746
2748
  W.build.rollupOptions = {
2747
2749
  ...W.build.rollupOptions,
2748
2750
  output: await xn(
2749
2751
  d,
2750
2752
  s.build?.rollupOptions?.output,
2751
- F,
2752
- B.outDir
2753
+ R,
2754
+ A.outDir
2753
2755
  ),
2754
2756
  preserveEntrySignatures: "exports-only",
2755
2757
  onwarn: (ce, qe) => {
2756
2758
  ce.plugin === "typescript" && ce.message.includes("outputToFilesystem") || (Me ? Me(ce, qe) : qe(ce));
2757
2759
  }
2758
- }, B.target === "ssr" ? n === "build" && (W.publicDir = !1, W.build.ssr = !0, s.build?.minify == null && I === "production" && (W.build.minify = !0)) : B.target === "client" || (B.target === "lib" ? (W.build.minify = !1, W.build.rollupOptions.external = [
2759
- Be,
2760
+ }, A.target === "ssr" ? n === "build" && (W.publicDir = !1, W.build.ssr = !0, s.build?.minify == null && I === "production" && (W.build.minify = !0)) : A.target === "client" || (A.target === "lib" ? (W.build.minify = !1, W.build.rollupOptions.external = [
2760
2761
  Ae,
2762
+ Fe,
2761
2763
  He,
2762
2764
  Je,
2763
2765
  Ye,
@@ -2774,15 +2776,15 @@ function Hr(e = {}) {
2774
2776
  async configResolved(s) {
2775
2777
  if (o = s.base, !(o.startsWith("/") && o.endsWith("/")))
2776
2778
  throw new Error("vite's config.base must begin and end with /");
2777
- !!s.build.sourcemap && e.optimizerOptions?.sourcemap === void 0 && d.setSourceMapSupport(!0), x ? d.normalizeOptions(x) : d.normalizeOptions(e);
2779
+ s.build.sourcemap && e.optimizerOptions?.sourcemap === void 0 && d.setSourceMapSupport(!0), x ? d.normalizeOptions(x) : d.normalizeOptions(e);
2778
2780
  },
2779
2781
  async buildStart() {
2780
2782
  g.length = 0;
2781
2783
  const s = this.resolve.bind(this);
2782
2784
  await d.validateSource(s), d.onDiagnostics((v, w, S) => {
2783
2785
  v.forEach((I) => {
2784
- const N = d.normalizePath(w.sys.path.join(S, I.file));
2785
- I.category === "error" ? this.error(Fe(N, I)) : this.warn(Fe(N, I));
2786
+ const M = d.normalizePath(w.sys.path.join(S, I.file));
2787
+ I.category === "error" ? this.error(Re(M, I)) : this.warn(Re(M, I));
2786
2788
  });
2787
2789
  }), await d.buildStart(this);
2788
2790
  },
@@ -2798,7 +2800,7 @@ function Hr(e = {}) {
2798
2800
  },
2799
2801
  transform(s, v, w) {
2800
2802
  if (v.includes(".vite/deps/") && s.slice(0, 5e3).includes("qwik") && /import[^\n]*qwik[^\n]*\n/.test(s)) {
2801
- const N = u && v.startsWith(u) ? v.slice(u.length) : v;
2803
+ const M = u && v.startsWith(u) ? v.slice(u.length) : v;
2802
2804
  throw new Error(
2803
2805
  `
2804
2806
 
@@ -2807,7 +2809,7 @@ function Hr(e = {}) {
2807
2809
  ⚠️ IMPORTANT: This dependency was pre-bundled by Vite, but it seems to use Qwik, which needs processing by the optimizer.
2808
2810
 
2809
2811
  👉 Please add the original modulename to the "optimizeDeps.exclude" array in your Vite config
2810
- 👉 ${N}
2812
+ 👉 ${M}
2811
2813
 
2812
2814
  ==============
2813
2815
 
@@ -2827,13 +2829,13 @@ function Hr(e = {}) {
2827
2829
  if (w.target === "client") {
2828
2830
  for (const [S, I] of Object.entries(v))
2829
2831
  if (I.type === "asset") {
2830
- const N = o + S;
2831
- if (Ur.some(($) => S.endsWith($)))
2832
+ const M = o + S;
2833
+ if (Br.some((U) => S.endsWith(U)))
2832
2834
  typeof I.source == "string" && I.source.length < w.inlineStylesUpToBytes ? g.push({
2833
2835
  tag: "style",
2834
2836
  location: "head",
2835
2837
  attributes: {
2836
- "data-src": N,
2838
+ "data-src": M,
2837
2839
  dangerouslySetInnerHTML: I.source
2838
2840
  }
2839
2841
  }) : g.push({
@@ -2841,19 +2843,19 @@ function Hr(e = {}) {
2841
2843
  location: "head",
2842
2844
  attributes: {
2843
2845
  rel: "stylesheet",
2844
- href: N
2846
+ href: M
2845
2847
  }
2846
2848
  });
2847
2849
  else {
2848
- const $ = Br.find((T) => S.endsWith(T));
2849
- $ && !k && g.unshift({
2850
+ const U = Ar.find((T) => S.endsWith(T));
2851
+ U && !k && g.unshift({
2850
2852
  tag: "link",
2851
2853
  location: "head",
2852
2854
  attributes: {
2853
2855
  rel: "preload",
2854
- href: N,
2856
+ href: M,
2855
2857
  as: "font",
2856
- type: `font/${$.slice(1)}`,
2858
+ type: `font/${U.slice(1)}`,
2857
2859
  crossorigin: ""
2858
2860
  }
2859
2861
  });
@@ -2871,13 +2873,13 @@ function Hr(e = {}) {
2871
2873
  if (w.target === "ssr") {
2872
2874
  const S = d.getSys();
2873
2875
  if (S.env === "node" || S.env === "bun") {
2874
- const I = Object.keys(v), N = async ($) => {
2876
+ const I = Object.keys(v), M = async (U) => {
2875
2877
  try {
2876
- const T = S.path.basename($), F = S.path.extname(T);
2877
- if ((T.startsWith("entry.") || T.startsWith("entry_")) && !T.includes("preview") && (F === ".mjs" || F === ".cjs")) {
2878
- const B = S.path.basename(T, F), V = `${B}.js`, G = B + F;
2878
+ const T = S.path.basename(U), R = S.path.extname(T);
2879
+ if ((T.startsWith("entry.") || T.startsWith("entry_")) && !T.includes("preview") && (R === ".mjs" || R === ".cjs")) {
2880
+ const A = S.path.basename(T, R), V = `${A}.js`, G = A + R;
2879
2881
  if (!I.some((J) => S.path.basename(J) === V)) {
2880
- const J = S.path.dirname($), q = await S.dynamicImport("node:fs"), se = S.path.join(w.outDir, J);
2882
+ const J = S.path.dirname(U), q = await S.dynamicImport("node:fs"), se = S.path.join(w.outDir, J);
2881
2883
  await q.promises.mkdir(se, { recursive: !0 }), await q.promises.writeFile(
2882
2884
  S.path.join(se, V),
2883
2885
  `export * from "./${G}";`
@@ -2888,7 +2890,7 @@ function Hr(e = {}) {
2888
2890
  console.error("patchModuleFormat", T);
2889
2891
  }
2890
2892
  };
2891
- await Promise.all(I.map(N));
2893
+ await Promise.all(I.map(M));
2892
2894
  }
2893
2895
  }
2894
2896
  },
@@ -2912,7 +2914,7 @@ function Hr(e = {}) {
2912
2914
  },
2913
2915
  onLog(s, v) {
2914
2916
  if (v.plugin == "vite-plugin-qwik") {
2915
- const w = Fr[s] || oe.White, S = (v.frame || "").split(`
2917
+ const w = Rr[s] || oe.White, S = (v.frame || "").split(`
2916
2918
  `).map(
2917
2919
  (I) => (I.match(/^\s*\^\s*$/) ? oe.BrightWhite : oe.BrightBlack) + I
2918
2920
  );
@@ -2930,9 +2932,9 @@ ${oe.BrightWhite}%s
2930
2932
  ), !1;
2931
2933
  }
2932
2934
  }
2933
- }, Ar()];
2935
+ }, Fr()];
2934
2936
  }
2935
- async function Ar() {
2937
+ async function Fr() {
2936
2938
  let e, n;
2937
2939
  try {
2938
2940
  e = await import("node:fs").then((a) => a.promises), n = await import("node:path");
@@ -3014,15 +3016,15 @@ const oe = {
3014
3016
  BrightBlack: "\x1B[90m",
3015
3017
  BrightWhite: "\x1B[97m",
3016
3018
  RESET: "\x1B[0m"
3017
- }, Fr = {
3019
+ }, Rr = {
3018
3020
  warn: oe.Yellow,
3019
3021
  info: oe.Cyan,
3020
3022
  debug: oe.BrightBlack
3021
3023
  }, Wr = void 0;
3022
3024
  export {
3023
- At as createOptimizer,
3025
+ Ft as createOptimizer,
3024
3026
  zr as qwikRollup,
3025
3027
  Hr as qwikVite,
3026
3028
  Wr as symbolMapper,
3027
- Rr as versions
3029
+ $r as versions
3028
3030
  };