@qwik.dev/core 2.0.0-alpha.0 → 2.0.0-alpha.2

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 (38) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.darwin-x64.node +0 -0
  3. package/bindings/qwik.linux-x64-gnu.node +0 -0
  4. package/bindings/qwik.win32-x64-msvc.node +0 -0
  5. package/bindings/qwik_wasm_bg.wasm +0 -0
  6. package/dist/build/package.json +1 -1
  7. package/dist/cli.cjs +1384 -761
  8. package/dist/core-internal.d.ts +15 -2
  9. package/dist/core.cjs +75 -61
  10. package/dist/core.cjs.map +1 -1
  11. package/dist/core.min.mjs +1 -1
  12. package/dist/core.mjs +75 -61
  13. package/dist/core.mjs.map +1 -1
  14. package/dist/core.prod.cjs +56 -46
  15. package/dist/core.prod.mjs +58 -49
  16. package/dist/insights/index.qwik.cjs +1 -1
  17. package/dist/insights/index.qwik.mjs +1 -1
  18. package/dist/loader/index.cjs +2 -2
  19. package/dist/loader/index.mjs +2 -2
  20. package/dist/loader/package.json +1 -1
  21. package/dist/optimizer.cjs +57 -60
  22. package/dist/optimizer.mjs +59 -63
  23. package/dist/prefetch/package.json +1 -1
  24. package/dist/qwikloader.debug.js +1 -0
  25. package/dist/qwikloader.js +2 -2
  26. package/dist/server.cjs +81 -53
  27. package/dist/server.mjs +81 -53
  28. package/dist/starters/features/auth/package.json +3 -1
  29. package/dist/starters/features/drizzle/package.json +2 -1
  30. package/dist/starters/features/postcss/package.json +3 -0
  31. package/dist/starters/features/prisma/package.json +2 -1
  32. package/dist/starters/features/tailwind/package.json +3 -0
  33. package/dist/starters/features/turso/package.json +4 -1
  34. package/dist/testing/index.cjs +77 -49
  35. package/dist/testing/index.mjs +77 -49
  36. package/dist/testing/package.json +1 -1
  37. package/package.json +13 -11
  38. package/public.d.ts +2 -0
package/dist/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/cli 2.0.0-alpha.0-dev+dd93926
3
+ * @qwik.dev/core/cli 2.0.0-alpha.2-dev+58b6f8d
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
@@ -12,6 +12,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
13
13
  var __getProtoOf = Object.getPrototypeOf;
14
14
  var __hasOwnProp = Object.prototype.hasOwnProperty;
15
+ var __esm = (fn, res) => function __init() {
16
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
17
+ };
15
18
  var __commonJS = (cb, mod) => function __require() {
16
19
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
20
  };
@@ -150,6 +153,558 @@ var require_picocolors = __commonJS({
150
153
  }
151
154
  });
152
155
 
156
+ // node_modules/.pnpm/@clack+core@0.3.4/node_modules/@clack/core/dist/index.mjs
157
+ function q({ onlyFirst: t = false } = {}) {
158
+ const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
159
+ return new RegExp(u, t ? void 0 : "g");
160
+ }
161
+ function S(t) {
162
+ if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
163
+ return t.replace(q(), "");
164
+ }
165
+ function j(t) {
166
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
167
+ }
168
+ function A(t, u = {}) {
169
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = S(t), t.length === 0)) return 0;
170
+ t = t.replace(DD(), " ");
171
+ const F = u.ambiguousIsNarrow ? 1 : 2;
172
+ let e2 = 0;
173
+ for (const s2 of t) {
174
+ const C2 = s2.codePointAt(0);
175
+ if (C2 <= 31 || C2 >= 127 && C2 <= 159 || C2 >= 768 && C2 <= 879) continue;
176
+ switch (Q.eastAsianWidth(s2)) {
177
+ case "F":
178
+ case "W":
179
+ e2 += 2;
180
+ break;
181
+ case "A":
182
+ e2 += F;
183
+ break;
184
+ default:
185
+ e2 += 1;
186
+ }
187
+ }
188
+ return e2;
189
+ }
190
+ function tD() {
191
+ const t = /* @__PURE__ */ new Map();
192
+ for (const [u, F] of Object.entries(r)) {
193
+ for (const [e2, s2] of Object.entries(F)) r[e2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F[e2] = r[e2], t.set(s2[0], s2[1]);
194
+ Object.defineProperty(r, u, { value: F, enumerable: false });
195
+ }
196
+ return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = T(m), r.bgColor.ansi256 = P(m), r.bgColor.ansi16m = W(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e2) => u === F && F === e2 ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
197
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
198
+ if (!F) return [0, 0, 0];
199
+ let [e2] = F;
200
+ e2.length === 3 && (e2 = [...e2].map((C2) => C2 + C2).join(""));
201
+ const s2 = Number.parseInt(e2, 16);
202
+ return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
203
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
204
+ if (u < 8) return 30 + u;
205
+ if (u < 16) return 90 + (u - 8);
206
+ let F, e2, s2;
207
+ if (u >= 232) F = ((u - 232) * 10 + 8) / 255, e2 = F, s2 = F;
208
+ else {
209
+ u -= 16;
210
+ const i = u % 36;
211
+ F = Math.floor(u / 36) / 5, e2 = Math.floor(i / 6) / 5, s2 = i % 6 / 5;
212
+ }
213
+ const C2 = Math.max(F, e2, s2) * 2;
214
+ if (C2 === 0) return 30;
215
+ let D = 30 + (Math.round(s2) << 2 | Math.round(e2) << 1 | Math.round(F));
216
+ return C2 === 2 && (D += 60), D;
217
+ }, enumerable: false }, rgbToAnsi: { value: (u, F, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e2)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
218
+ }
219
+ function R(t, u, F) {
220
+ return String(t).normalize().replace(/\r\n/g, `
221
+ `).split(`
222
+ `).map((e2) => ED(e2, u, F)).join(`
223
+ `);
224
+ }
225
+ function aD(t, u) {
226
+ if (t === u) return;
227
+ const F = t.split(`
228
+ `), e2 = u.split(`
229
+ `), s2 = [];
230
+ for (let C2 = 0; C2 < Math.max(F.length, e2.length); C2++) F[C2] !== e2[C2] && s2.push(C2);
231
+ return s2;
232
+ }
233
+ function hD(t) {
234
+ return t === V;
235
+ }
236
+ function v(t, u) {
237
+ t.isTTY && t.setRawMode(u);
238
+ }
239
+ function WD({ input: t = import_node_process.stdin, output: u = import_node_process.stdout, overwrite: F = true, hideCursor: e2 = true } = {}) {
240
+ const s2 = f.createInterface({ input: t, output: u, prompt: "", tabSize: 1 });
241
+ f.emitKeypressEvents(t, s2), t.isTTY && t.setRawMode(true);
242
+ const C2 = (D, { name: i }) => {
243
+ if (String(D) === "" && process.exit(0), !F) return;
244
+ let n = i === "return" ? 0 : -1, E2 = i === "return" ? -1 : 0;
245
+ f.moveCursor(u, n, E2, () => {
246
+ f.clearLine(u, 1, () => {
247
+ t.once("keypress", C2);
248
+ });
249
+ });
250
+ };
251
+ return e2 && process.stdout.write(import_sisteransi.cursor.hide), t.once("keypress", C2), () => {
252
+ t.off("keypress", C2), e2 && process.stdout.write(import_sisteransi.cursor.show), t.isTTY && !PD && t.setRawMode(false), s2.terminal = false, s2.close();
253
+ };
254
+ }
255
+ var import_sisteransi, import_node_process, f, import_node_readline, import_node_tty, import_picocolors, M, J, Q, X, DD, m, T, P, W, r, uD, FD, eD, g, sD, b, O, CD, I, w, N, L, iD, y, rD, ED, oD, nD, a, V, z, lD, x, xD, bD, wD, Z, yD, SD, jD, MD, TD, PD;
256
+ var init_dist = __esm({
257
+ "node_modules/.pnpm/@clack+core@0.3.4/node_modules/@clack/core/dist/index.mjs"() {
258
+ import_sisteransi = __toESM(require_src(), 1);
259
+ import_node_process = require("node:process");
260
+ f = __toESM(require("node:readline"), 1);
261
+ import_node_readline = __toESM(require("node:readline"), 1);
262
+ import_node_tty = require("node:tty");
263
+ import_picocolors = __toESM(require_picocolors(), 1);
264
+ M = { exports: {} };
265
+ (function(t) {
266
+ var u = {};
267
+ t.exports = u, u.eastAsianWidth = function(e2) {
268
+ var s2 = e2.charCodeAt(0), C2 = e2.length == 2 ? e2.charCodeAt(1) : 0, D = s2;
269
+ return 55296 <= s2 && s2 <= 56319 && 56320 <= C2 && C2 <= 57343 && (s2 &= 1023, C2 &= 1023, D = s2 << 10 | C2, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
270
+ }, u.characterLength = function(e2) {
271
+ var s2 = this.eastAsianWidth(e2);
272
+ return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
273
+ };
274
+ function F(e2) {
275
+ return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
276
+ }
277
+ u.length = function(e2) {
278
+ for (var s2 = F(e2), C2 = 0, D = 0; D < s2.length; D++) C2 = C2 + this.characterLength(s2[D]);
279
+ return C2;
280
+ }, u.slice = function(e2, s2, C2) {
281
+ textLen = u.length(e2), s2 = s2 || 0, C2 = C2 || 1, s2 < 0 && (s2 = textLen + s2), C2 < 0 && (C2 = textLen + C2);
282
+ for (var D = "", i = 0, n = F(e2), E2 = 0; E2 < n.length; E2++) {
283
+ var h2 = n[E2], o2 = u.length(h2);
284
+ if (i >= s2 - (o2 == 2 ? 1 : 0)) if (i + o2 <= C2) D += h2;
285
+ else break;
286
+ i += o2;
287
+ }
288
+ return D;
289
+ };
290
+ })(M);
291
+ J = M.exports;
292
+ Q = j(J);
293
+ X = function() {
294
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
295
+ };
296
+ DD = j(X);
297
+ m = 10;
298
+ T = (t = 0) => (u) => `\x1B[${u + t}m`;
299
+ P = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
300
+ W = (t = 0) => (u, F, e2) => `\x1B[${38 + t};2;${u};${F};${e2}m`;
301
+ r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
302
+ Object.keys(r.modifier);
303
+ uD = Object.keys(r.color);
304
+ FD = Object.keys(r.bgColor);
305
+ [...uD, ...FD];
306
+ eD = tD();
307
+ g = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
308
+ sD = 39;
309
+ b = "\x07";
310
+ O = "[";
311
+ CD = "]";
312
+ I = "m";
313
+ w = `${CD}8;;`;
314
+ N = (t) => `${g.values().next().value}${O}${t}${I}`;
315
+ L = (t) => `${g.values().next().value}${w}${t}${b}`;
316
+ iD = (t) => t.split(" ").map((u) => A(u));
317
+ y = (t, u, F) => {
318
+ const e2 = [...u];
319
+ let s2 = false, C2 = false, D = A(S(t[t.length - 1]));
320
+ for (const [i, n] of e2.entries()) {
321
+ const E2 = A(n);
322
+ if (D + E2 <= F ? t[t.length - 1] += n : (t.push(n), D = 0), g.has(n) && (s2 = true, C2 = e2.slice(i + 1).join("").startsWith(w)), s2) {
323
+ C2 ? n === b && (s2 = false, C2 = false) : n === I && (s2 = false);
324
+ continue;
325
+ }
326
+ D += E2, D === F && i < e2.length - 1 && (t.push(""), D = 0);
327
+ }
328
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
329
+ };
330
+ rD = (t) => {
331
+ const u = t.split(" ");
332
+ let F = u.length;
333
+ for (; F > 0 && !(A(u[F - 1]) > 0); ) F--;
334
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
335
+ };
336
+ ED = (t, u, F = {}) => {
337
+ if (F.trim !== false && t.trim() === "") return "";
338
+ let e2 = "", s2, C2;
339
+ const D = iD(t);
340
+ let i = [""];
341
+ for (const [E2, h2] of t.split(" ").entries()) {
342
+ F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
343
+ let o2 = A(i[i.length - 1]);
344
+ if (E2 !== 0 && (o2 >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), o2 = 0), (o2 > 0 || F.trim === false) && (i[i.length - 1] += " ", o2++)), F.hard && D[E2] > u) {
345
+ const B2 = u - o2, p = 1 + Math.floor((D[E2] - B2 - 1) / u);
346
+ Math.floor((D[E2] - 1) / u) < p && i.push(""), y(i, h2, u);
347
+ continue;
348
+ }
349
+ if (o2 + D[E2] > u && o2 > 0 && D[E2] > 0) {
350
+ if (F.wordWrap === false && o2 < u) {
351
+ y(i, h2, u);
352
+ continue;
353
+ }
354
+ i.push("");
355
+ }
356
+ if (o2 + D[E2] > u && F.wordWrap === false) {
357
+ y(i, h2, u);
358
+ continue;
359
+ }
360
+ i[i.length - 1] += h2;
361
+ }
362
+ F.trim !== false && (i = i.map((E2) => rD(E2)));
363
+ const n = [...i.join(`
364
+ `)];
365
+ for (const [E2, h2] of n.entries()) {
366
+ if (e2 += h2, g.has(h2)) {
367
+ const { groups: B2 } = new RegExp(`(?:\\${O}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(n.slice(E2).join("")) || { groups: {} };
368
+ if (B2.code !== void 0) {
369
+ const p = Number.parseFloat(B2.code);
370
+ s2 = p === sD ? void 0 : p;
371
+ } else B2.uri !== void 0 && (C2 = B2.uri.length === 0 ? void 0 : B2.uri);
372
+ }
373
+ const o2 = eD.codes.get(Number(s2));
374
+ n[E2 + 1] === `
375
+ ` ? (C2 && (e2 += L("")), s2 && o2 && (e2 += N(o2))) : h2 === `
376
+ ` && (s2 && o2 && (e2 += N(s2)), C2 && (e2 += L(C2)));
377
+ }
378
+ return e2;
379
+ };
380
+ oD = Object.defineProperty;
381
+ nD = (t, u, F) => u in t ? oD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
382
+ a = (t, u, F) => (nD(t, typeof u != "symbol" ? u + "" : u, F), F);
383
+ V = Symbol("clack:cancel");
384
+ z = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
385
+ lD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
386
+ x = class {
387
+ constructor({ render: u, input: F = import_node_process.stdin, output: e2 = import_node_process.stdout, ...s2 }, C2 = true) {
388
+ a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", /* @__PURE__ */ new Map()), a(this, "_prevFrame", ""), this.opts = s2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C2, this.input = F, this.output = e2;
389
+ }
390
+ prompt() {
391
+ const u = new import_node_tty.WriteStream(0);
392
+ return u._write = (F, e2, s2) => {
393
+ this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s2();
394
+ }, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e2) => {
395
+ this.once("submit", () => {
396
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(this.value);
397
+ }), this.once("cancel", () => {
398
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(V);
399
+ });
400
+ });
401
+ }
402
+ on(u, F) {
403
+ const e2 = this.subscribers.get(u) ?? [];
404
+ e2.push({ cb: F }), this.subscribers.set(u, e2);
405
+ }
406
+ once(u, F) {
407
+ const e2 = this.subscribers.get(u) ?? [];
408
+ e2.push({ cb: F, once: true }), this.subscribers.set(u, e2);
409
+ }
410
+ emit(u, ...F) {
411
+ const e2 = this.subscribers.get(u) ?? [], s2 = [];
412
+ for (const C2 of e2) C2.cb(...F), C2.once && s2.push(() => e2.splice(e2.indexOf(C2), 1));
413
+ for (const C2 of s2) C2();
414
+ }
415
+ unsubscribe() {
416
+ this.subscribers.clear();
417
+ }
418
+ onKeypress(u, F) {
419
+ if (this.state === "error" && (this.state = "active"), (F == null ? void 0 : F.name) && !this._track && z.has(F.name) && this.emit("cursor", z.get(F.name)), (F == null ? void 0 : F.name) && lD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === " " && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), (F == null ? void 0 : F.name) === "return") {
420
+ if (this.opts.validate) {
421
+ const e2 = this.opts.validate(this.value);
422
+ e2 && (this.error = e2, this.state = "error", this.rl.write(this.value));
423
+ }
424
+ this.state !== "error" && (this.state = "submit");
425
+ }
426
+ u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
427
+ }
428
+ close() {
429
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
430
+ `), v(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
431
+ }
432
+ restoreCursor() {
433
+ const u = R(this._prevFrame, process.stdout.columns, { hard: true }).split(`
434
+ `).length - 1;
435
+ this.output.write(import_sisteransi.cursor.move(-999, u * -1));
436
+ }
437
+ render() {
438
+ const u = R(this._render(this) ?? "", process.stdout.columns, { hard: true });
439
+ if (u !== this._prevFrame) {
440
+ if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
441
+ else {
442
+ const F = aD(this._prevFrame, u);
443
+ if (this.restoreCursor(), F && (F == null ? void 0 : F.length) === 1) {
444
+ const e2 = F[0];
445
+ this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.lines(1));
446
+ const s2 = u.split(`
447
+ `);
448
+ this.output.write(s2[e2]), this._prevFrame = u, this.output.write(import_sisteransi.cursor.move(0, s2.length - e2 - 1));
449
+ return;
450
+ } else if (F && (F == null ? void 0 : F.length) > 1) {
451
+ const e2 = F[0];
452
+ this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.down());
453
+ const s2 = u.split(`
454
+ `).slice(e2);
455
+ this.output.write(s2.join(`
456
+ `)), this._prevFrame = u;
457
+ return;
458
+ }
459
+ this.output.write(import_sisteransi.erase.down());
460
+ }
461
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
462
+ }
463
+ }
464
+ };
465
+ xD = class extends x {
466
+ get cursor() {
467
+ return this.value ? 0 : 1;
468
+ }
469
+ get _value() {
470
+ return this.cursor === 0;
471
+ }
472
+ constructor(u) {
473
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
474
+ this.value = this._value;
475
+ }), this.on("confirm", (F) => {
476
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
477
+ }), this.on("cursor", () => {
478
+ this.value = !this.value;
479
+ });
480
+ }
481
+ };
482
+ bD = Object.defineProperty;
483
+ wD = (t, u, F) => u in t ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
484
+ Z = (t, u, F) => (wD(t, typeof u != "symbol" ? u + "" : u, F), F);
485
+ yD = class extends x {
486
+ constructor(u) {
487
+ super(u, false), Z(this, "options"), Z(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
488
+ switch (F) {
489
+ case "left":
490
+ case "up":
491
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
492
+ break;
493
+ case "down":
494
+ case "right":
495
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
496
+ break;
497
+ }
498
+ this.changeValue();
499
+ });
500
+ }
501
+ get _value() {
502
+ return this.options[this.cursor];
503
+ }
504
+ changeValue() {
505
+ this.value = this._value.value;
506
+ }
507
+ };
508
+ SD = Object.defineProperty;
509
+ jD = (t, u, F) => u in t ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
510
+ MD = (t, u, F) => (jD(t, typeof u != "symbol" ? u + "" : u, F), F);
511
+ TD = class extends x {
512
+ constructor(u) {
513
+ super(u), MD(this, "valueWithCursor", ""), this.on("finalize", () => {
514
+ this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
515
+ }), this.on("value", () => {
516
+ if (this.cursor >= this.value.length) this.valueWithCursor = `${this.value}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
517
+ else {
518
+ const F = this.value.slice(0, this.cursor), e2 = this.value.slice(this.cursor);
519
+ this.valueWithCursor = `${F}${import_picocolors.default.inverse(e2[0])}${e2.slice(1)}`;
520
+ }
521
+ });
522
+ }
523
+ get cursor() {
524
+ return this._cursor;
525
+ }
526
+ };
527
+ PD = globalThis.process.platform.startsWith("win");
528
+ }
529
+ });
530
+
531
+ // node_modules/.pnpm/@clack+prompts@0.7.0/node_modules/@clack/prompts/dist/index.mjs
532
+ function q2() {
533
+ return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
534
+ }
535
+ var import_node_process2, import_picocolors2, import_sisteransi2, _2, o, H, I2, x2, S2, K, a2, d2, b2, E, C, w2, M2, U2, B, Z2, z2, X2, J2, Y, Q2, ee, y2, te, se, ie, oe, $e, f2, de;
536
+ var init_dist2 = __esm({
537
+ "node_modules/.pnpm/@clack+prompts@0.7.0/node_modules/@clack/prompts/dist/index.mjs"() {
538
+ init_dist();
539
+ init_dist();
540
+ import_node_process2 = __toESM(require("node:process"), 1);
541
+ import_picocolors2 = __toESM(require_picocolors(), 1);
542
+ import_sisteransi2 = __toESM(require_src(), 1);
543
+ _2 = q2();
544
+ o = (r2, n) => _2 ? r2 : n;
545
+ H = o("\u25C6", "*");
546
+ I2 = o("\u25A0", "x");
547
+ x2 = o("\u25B2", "x");
548
+ S2 = o("\u25C7", "o");
549
+ K = o("\u250C", "T");
550
+ a2 = o("\u2502", "|");
551
+ d2 = o("\u2514", "\u2014");
552
+ b2 = o("\u25CF", ">");
553
+ E = o("\u25CB", " ");
554
+ C = o("\u25FB", "[\u2022]");
555
+ w2 = o("\u25FC", "[+]");
556
+ M2 = o("\u25FB", "[ ]");
557
+ U2 = o("\u25AA", "\u2022");
558
+ B = o("\u2500", "-");
559
+ Z2 = o("\u256E", "+");
560
+ z2 = o("\u251C", "+");
561
+ X2 = o("\u256F", "+");
562
+ J2 = o("\u25CF", "\u2022");
563
+ Y = o("\u25C6", "*");
564
+ Q2 = o("\u25B2", "!");
565
+ ee = o("\u25A0", "x");
566
+ y2 = (r2) => {
567
+ switch (r2) {
568
+ case "initial":
569
+ case "active":
570
+ return import_picocolors2.default.cyan(H);
571
+ case "cancel":
572
+ return import_picocolors2.default.red(I2);
573
+ case "error":
574
+ return import_picocolors2.default.yellow(x2);
575
+ case "submit":
576
+ return import_picocolors2.default.green(S2);
577
+ }
578
+ };
579
+ te = (r2) => new TD({ validate: r2.validate, placeholder: r2.placeholder, defaultValue: r2.defaultValue, initialValue: r2.initialValue, render() {
580
+ var _a;
581
+ const n = `${import_picocolors2.default.gray(a2)}
582
+ ${y2(this.state)} ${r2.message}
583
+ `, i = r2.placeholder ? import_picocolors2.default.inverse(r2.placeholder[0]) + import_picocolors2.default.dim(r2.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), t = this.value ? this.valueWithCursor : i;
584
+ switch (this.state) {
585
+ case "error":
586
+ return `${n.trim()}
587
+ ${import_picocolors2.default.yellow(a2)} ${t}
588
+ ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
589
+ `;
590
+ case "submit":
591
+ return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(this.value || r2.placeholder)}`;
592
+ case "cancel":
593
+ return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${((_a = this.value) == null ? void 0 : _a.trim()) ? `
594
+ ` + import_picocolors2.default.gray(a2) : ""}`;
595
+ default:
596
+ return `${n}${import_picocolors2.default.cyan(a2)} ${t}
597
+ ${import_picocolors2.default.cyan(d2)}
598
+ `;
599
+ }
600
+ } }).prompt();
601
+ se = (r2) => {
602
+ const n = r2.active ?? "Yes", i = r2.inactive ?? "No";
603
+ return new xD({ active: n, inactive: i, initialValue: r2.initialValue ?? true, render() {
604
+ const t = `${import_picocolors2.default.gray(a2)}
605
+ ${y2(this.state)} ${r2.message}
606
+ `, s2 = this.value ? n : i;
607
+ switch (this.state) {
608
+ case "submit":
609
+ return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(s2)}`;
610
+ case "cancel":
611
+ return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}
612
+ ${import_picocolors2.default.gray(a2)}`;
613
+ default:
614
+ return `${t}${import_picocolors2.default.cyan(a2)} ${this.value ? `${import_picocolors2.default.green(b2)} ${n}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(i)}` : `${import_picocolors2.default.green(b2)} ${i}`}
615
+ ${import_picocolors2.default.cyan(d2)}
616
+ `;
617
+ }
618
+ } }).prompt();
619
+ };
620
+ ie = (r2) => {
621
+ const n = (t, s2) => {
622
+ const c2 = t.label ?? String(t.value);
623
+ return s2 === "active" ? `${import_picocolors2.default.green(b2)} ${c2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : s2 === "selected" ? `${import_picocolors2.default.dim(c2)}` : s2 === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(c2))}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(c2)}`;
624
+ };
625
+ let i = 0;
626
+ return new yD({ options: r2.options, initialValue: r2.initialValue, render() {
627
+ const t = `${import_picocolors2.default.gray(a2)}
628
+ ${y2(this.state)} ${r2.message}
629
+ `;
630
+ switch (this.state) {
631
+ case "submit":
632
+ return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "selected")}`;
633
+ case "cancel":
634
+ return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "cancelled")}
635
+ ${import_picocolors2.default.gray(a2)}`;
636
+ default: {
637
+ const s2 = r2.maxItems === void 0 ? 1 / 0 : Math.max(r2.maxItems, 5);
638
+ this.cursor >= i + s2 - 3 ? i = Math.max(Math.min(this.cursor - s2 + 3, this.options.length - s2), 0) : this.cursor < i + 2 && (i = Math.max(this.cursor - 2, 0));
639
+ const c2 = s2 < this.options.length && i > 0, l2 = s2 < this.options.length && i + s2 < this.options.length;
640
+ return `${t}${import_picocolors2.default.cyan(a2)} ${this.options.slice(i, i + s2).map((u, m2, $4) => m2 === 0 && c2 ? import_picocolors2.default.dim("...") : m2 === $4.length - 1 && l2 ? import_picocolors2.default.dim("...") : n(u, m2 + i === this.cursor ? "active" : "inactive")).join(`
641
+ ${import_picocolors2.default.cyan(a2)} `)}
642
+ ${import_picocolors2.default.cyan(d2)}
643
+ `;
644
+ }
645
+ }
646
+ } }).prompt();
647
+ };
648
+ oe = (r2 = "") => {
649
+ process.stdout.write(`${import_picocolors2.default.gray(K)} ${r2}
650
+ `);
651
+ };
652
+ $e = (r2 = "") => {
653
+ process.stdout.write(`${import_picocolors2.default.gray(a2)}
654
+ ${import_picocolors2.default.gray(d2)} ${r2}
655
+
656
+ `);
657
+ };
658
+ f2 = { message: (r2 = "", { symbol: n = import_picocolors2.default.gray(a2) } = {}) => {
659
+ const i = [`${import_picocolors2.default.gray(a2)}`];
660
+ if (r2) {
661
+ const [t, ...s2] = r2.split(`
662
+ `);
663
+ i.push(`${n} ${t}`, ...s2.map((c2) => `${import_picocolors2.default.gray(a2)} ${c2}`));
664
+ }
665
+ process.stdout.write(`${i.join(`
666
+ `)}
667
+ `);
668
+ }, info: (r2) => {
669
+ f2.message(r2, { symbol: import_picocolors2.default.blue(J2) });
670
+ }, success: (r2) => {
671
+ f2.message(r2, { symbol: import_picocolors2.default.green(Y) });
672
+ }, step: (r2) => {
673
+ f2.message(r2, { symbol: import_picocolors2.default.green(S2) });
674
+ }, warn: (r2) => {
675
+ f2.message(r2, { symbol: import_picocolors2.default.yellow(Q2) });
676
+ }, warning: (r2) => {
677
+ f2.warn(r2);
678
+ }, error: (r2) => {
679
+ f2.message(r2, { symbol: import_picocolors2.default.red(ee) });
680
+ } };
681
+ de = () => {
682
+ const r2 = _2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], n = _2 ? 80 : 120;
683
+ let i, t, s2 = false, c2 = "";
684
+ const l2 = (v2 = "") => {
685
+ s2 = true, i = WD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors2.default.gray(a2)}
686
+ `);
687
+ let g2 = 0, p = 0;
688
+ t = setInterval(() => {
689
+ const O2 = import_picocolors2.default.magenta(r2[g2]), P2 = ".".repeat(Math.floor(p)).slice(0, 3);
690
+ process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${O2} ${c2}${P2}`), g2 = g2 + 1 < r2.length ? g2 + 1 : 0, p = p < r2.length ? p + 0.125 : 0;
691
+ }, n);
692
+ }, u = (v2 = "", g2 = 0) => {
693
+ c2 = v2 ?? c2, s2 = false, clearInterval(t);
694
+ const p = g2 === 0 ? import_picocolors2.default.green(S2) : g2 === 1 ? import_picocolors2.default.red(I2) : import_picocolors2.default.red(x2);
695
+ process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c2}
696
+ `), i();
697
+ }, m2 = (v2 = "") => {
698
+ c2 = v2 ?? c2;
699
+ }, $4 = (v2) => {
700
+ const g2 = v2 > 1 ? "Something went wrong" : "Canceled";
701
+ s2 && u(g2, v2);
702
+ };
703
+ return process.on("uncaughtExceptionMonitor", () => $4(2)), process.on("unhandledRejection", () => $4(2)), process.on("SIGINT", () => $4(1)), process.on("SIGTERM", () => $4(1)), process.on("exit", $4), { start: l2, stop: u, message: m2 };
704
+ };
705
+ }
706
+ });
707
+
153
708
  // node_modules/.pnpm/which-pm-runs@1.1.0/node_modules/which-pm-runs/index.js
154
709
  var require_which_pm_runs = __commonJS({
155
710
  "node_modules/.pnpm/which-pm-runs@1.1.0/node_modules/which-pm-runs/index.js"(exports2, module2) {
@@ -709,667 +1264,216 @@ var require_merge_stream = __commonJS({
709
1264
  }
710
1265
  });
711
1266
 
712
- // packages/qwik/src/cli/index.ts
713
- var cli_exports = {};
714
- __export(cli_exports, {
715
- runCli: () => runCli,
716
- updateApp: () => updateApp
717
- });
718
- module.exports = __toCommonJS(cli_exports);
719
-
720
- // node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
721
- var FORCE_COLOR;
722
- var NODE_DISABLE_COLORS;
723
- var NO_COLOR;
724
- var TERM;
725
- var isTTY = true;
726
- if (typeof process !== "undefined") {
727
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
728
- isTTY = process.stdout && process.stdout.isTTY;
729
- }
730
- var $ = {
731
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
732
- };
733
- function init(x3, y3) {
734
- let rgx = new RegExp(`\\x1b\\[${y3}m`, "g");
735
- let open = `\x1B[${x3}m`, close = `\x1B[${y3}m`;
736
- return function(txt) {
737
- if (!$.enabled || txt == null) return txt;
738
- return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
739
- };
740
- }
741
- var reset = init(0, 0);
742
- var bold = init(1, 22);
743
- var dim = init(2, 22);
744
- var italic = init(3, 23);
745
- var underline = init(4, 24);
746
- var inverse = init(7, 27);
747
- var hidden = init(8, 28);
748
- var strikethrough = init(9, 29);
749
- var black = init(30, 39);
750
- var red = init(31, 39);
751
- var green = init(32, 39);
752
- var yellow = init(33, 39);
753
- var blue = init(34, 39);
754
- var magenta = init(35, 39);
755
- var cyan = init(36, 39);
756
- var white = init(37, 39);
757
- var gray = init(90, 39);
758
- var grey = init(90, 39);
759
- var bgBlack = init(40, 49);
760
- var bgRed = init(41, 49);
761
- var bgGreen = init(42, 49);
762
- var bgYellow = init(43, 49);
763
- var bgBlue = init(44, 49);
764
- var bgMagenta = init(45, 49);
765
- var bgCyan = init(46, 49);
766
- var bgWhite = init(47, 49);
767
-
768
- // packages/qwik/src/cli/utils/app-command.ts
769
- var import_node_fs = require("node:fs");
770
- var import_node_path = require("node:path");
771
- var AppCommand = class {
772
- args;
773
- task;
774
- cwd;
775
- _rootDir;
776
- _rootPkgJson;
777
- constructor(opts) {
778
- this._rootDir = opts.rootDir;
779
- this.cwd = opts.cwd;
780
- this.args = opts.args.slice();
781
- this.task = this.args[0];
782
- }
783
- get rootDir() {
784
- if (!this._rootDir) {
785
- const fsRoot = (0, import_node_path.resolve)("/");
786
- let testDir = process.cwd();
787
- for (let i = 0; i < 20; i++) {
788
- const pkgPath = (0, import_node_path.join)(testDir, "package.json");
789
- if ((0, import_node_fs.existsSync)(pkgPath)) {
790
- this._rootDir = testDir;
791
- break;
792
- }
793
- if (testDir === fsRoot) {
794
- break;
795
- }
796
- testDir = (0, import_node_path.dirname)(testDir);
797
- }
798
- if (!this._rootDir) {
799
- throw new Error(`Unable to find Qwik app package.json`);
800
- }
801
- }
802
- return this._rootDir;
803
- }
804
- set rootDir(rootDir) {
805
- this._rootDir = rootDir;
806
- }
807
- get packageJson() {
808
- if (!this._rootPkgJson) {
809
- const pkgJsonPath = (0, import_node_path.join)(this.rootDir, "package.json");
810
- this._rootPkgJson = JSON.parse((0, import_node_fs.readFileSync)(pkgJsonPath, "utf-8"));
811
- }
812
- return this._rootPkgJson;
813
- }
814
- getArg(name) {
815
- const key = `--${name}`;
816
- const matcher = new RegExp(`^${key}($|=)`);
817
- const index = this.args.findIndex((arg) => matcher.test(arg));
818
- if (index === -1) {
819
- return;
820
- }
821
- if (this.args[index].includes("=")) {
822
- return this.args[index].split("=")[1];
823
- }
824
- return this.args[index + 1];
825
- }
826
- };
827
-
828
- // node_modules/.pnpm/@clack+core@0.3.4/node_modules/@clack/core/dist/index.mjs
829
- var import_sisteransi = __toESM(require_src(), 1);
830
- var import_node_process = require("node:process");
831
- var f = __toESM(require("node:readline"), 1);
832
- var import_node_readline = __toESM(require("node:readline"), 1);
833
- var import_node_tty = require("node:tty");
834
- var import_picocolors = __toESM(require_picocolors(), 1);
835
- function q({ onlyFirst: t = false } = {}) {
836
- const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
837
- return new RegExp(u, t ? void 0 : "g");
838
- }
839
- function S(t) {
840
- if (typeof t != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
841
- return t.replace(q(), "");
842
- }
843
- function j(t) {
844
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
845
- }
846
- var M = { exports: {} };
847
- (function(t) {
848
- var u = {};
849
- t.exports = u, u.eastAsianWidth = function(e2) {
850
- var s2 = e2.charCodeAt(0), C2 = e2.length == 2 ? e2.charCodeAt(1) : 0, D = s2;
851
- return 55296 <= s2 && s2 <= 56319 && 56320 <= C2 && C2 <= 57343 && (s2 &= 1023, C2 &= 1023, D = s2 << 10 | C2, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
852
- }, u.characterLength = function(e2) {
853
- var s2 = this.eastAsianWidth(e2);
854
- return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1;
855
- };
856
- function F(e2) {
857
- return e2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
858
- }
859
- u.length = function(e2) {
860
- for (var s2 = F(e2), C2 = 0, D = 0; D < s2.length; D++) C2 = C2 + this.characterLength(s2[D]);
861
- return C2;
862
- }, u.slice = function(e2, s2, C2) {
863
- textLen = u.length(e2), s2 = s2 || 0, C2 = C2 || 1, s2 < 0 && (s2 = textLen + s2), C2 < 0 && (C2 = textLen + C2);
864
- for (var D = "", i = 0, n = F(e2), E2 = 0; E2 < n.length; E2++) {
865
- var h2 = n[E2], o2 = u.length(h2);
866
- if (i >= s2 - (o2 == 2 ? 1 : 0)) if (i + o2 <= C2) D += h2;
867
- else break;
868
- i += o2;
869
- }
870
- return D;
871
- };
872
- })(M);
873
- var J = M.exports;
874
- var Q = j(J);
875
- var X = function() {
876
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
877
- };
878
- var DD = j(X);
879
- function A(t, u = {}) {
880
- if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = S(t), t.length === 0)) return 0;
881
- t = t.replace(DD(), " ");
882
- const F = u.ambiguousIsNarrow ? 1 : 2;
883
- let e2 = 0;
884
- for (const s2 of t) {
885
- const C2 = s2.codePointAt(0);
886
- if (C2 <= 31 || C2 >= 127 && C2 <= 159 || C2 >= 768 && C2 <= 879) continue;
887
- switch (Q.eastAsianWidth(s2)) {
888
- case "F":
889
- case "W":
890
- e2 += 2;
891
- break;
892
- case "A":
893
- e2 += F;
894
- break;
895
- default:
896
- e2 += 1;
897
- }
898
- }
899
- return e2;
900
- }
901
- var m = 10;
902
- var T = (t = 0) => (u) => `\x1B[${u + t}m`;
903
- var P = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
904
- var W = (t = 0) => (u, F, e2) => `\x1B[${38 + t};2;${u};${F};${e2}m`;
905
- var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
906
- Object.keys(r.modifier);
907
- var uD = Object.keys(r.color);
908
- var FD = Object.keys(r.bgColor);
909
- [...uD, ...FD];
910
- function tD() {
911
- const t = /* @__PURE__ */ new Map();
912
- for (const [u, F] of Object.entries(r)) {
913
- for (const [e2, s2] of Object.entries(F)) r[e2] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F[e2] = r[e2], t.set(s2[0], s2[1]);
914
- Object.defineProperty(r, u, { value: F, enumerable: false });
915
- }
916
- return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = T(m), r.bgColor.ansi256 = P(m), r.bgColor.ansi16m = W(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e2) => u === F && F === e2 ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
917
- const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
918
- if (!F) return [0, 0, 0];
919
- let [e2] = F;
920
- e2.length === 3 && (e2 = [...e2].map((C2) => C2 + C2).join(""));
921
- const s2 = Number.parseInt(e2, 16);
922
- return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255];
923
- }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
924
- if (u < 8) return 30 + u;
925
- if (u < 16) return 90 + (u - 8);
926
- let F, e2, s2;
927
- if (u >= 232) F = ((u - 232) * 10 + 8) / 255, e2 = F, s2 = F;
928
- else {
929
- u -= 16;
930
- const i = u % 36;
931
- F = Math.floor(u / 36) / 5, e2 = Math.floor(i / 6) / 5, s2 = i % 6 / 5;
932
- }
933
- const C2 = Math.max(F, e2, s2) * 2;
934
- if (C2 === 0) return 30;
935
- let D = 30 + (Math.round(s2) << 2 | Math.round(e2) << 1 | Math.round(F));
936
- return C2 === 2 && (D += 60), D;
937
- }, enumerable: false }, rgbToAnsi: { value: (u, F, e2) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e2)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
938
- }
939
- var eD = tD();
940
- var g = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
941
- var sD = 39;
942
- var b = "\x07";
943
- var O = "[";
944
- var CD = "]";
945
- var I = "m";
946
- var w = `${CD}8;;`;
947
- var N = (t) => `${g.values().next().value}${O}${t}${I}`;
948
- var L = (t) => `${g.values().next().value}${w}${t}${b}`;
949
- var iD = (t) => t.split(" ").map((u) => A(u));
950
- var y = (t, u, F) => {
951
- const e2 = [...u];
952
- let s2 = false, C2 = false, D = A(S(t[t.length - 1]));
953
- for (const [i, n] of e2.entries()) {
954
- const E2 = A(n);
955
- if (D + E2 <= F ? t[t.length - 1] += n : (t.push(n), D = 0), g.has(n) && (s2 = true, C2 = e2.slice(i + 1).join("").startsWith(w)), s2) {
956
- C2 ? n === b && (s2 = false, C2 = false) : n === I && (s2 = false);
957
- continue;
958
- }
959
- D += E2, D === F && i < e2.length - 1 && (t.push(""), D = 0);
1267
+ // packages/qwik/src/cli/migrate-v2/tools/visit-not-ignored-files.ts
1268
+ function visitNotIgnoredFiles(dirPath, visitor) {
1269
+ let ig;
1270
+ if ((0, import_fs2.existsSync)(".gitignore")) {
1271
+ ig = (0, import_ignore.default)();
1272
+ ig.add(".git");
1273
+ ig.add((0, import_fs2.readFileSync)(".gitignore", "utf-8"));
1274
+ }
1275
+ dirPath = (0, import_path4.relative)(process.cwd(), dirPath);
1276
+ if (dirPath !== "" && (ig == null ? void 0 : ig.ignores(dirPath))) {
1277
+ return;
960
1278
  }
961
- !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
962
- };
963
- var rD = (t) => {
964
- const u = t.split(" ");
965
- let F = u.length;
966
- for (; F > 0 && !(A(u[F - 1]) > 0); ) F--;
967
- return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
968
- };
969
- var ED = (t, u, F = {}) => {
970
- if (F.trim !== false && t.trim() === "") return "";
971
- let e2 = "", s2, C2;
972
- const D = iD(t);
973
- let i = [""];
974
- for (const [E2, h2] of t.split(" ").entries()) {
975
- F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
976
- let o2 = A(i[i.length - 1]);
977
- if (E2 !== 0 && (o2 >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), o2 = 0), (o2 > 0 || F.trim === false) && (i[i.length - 1] += " ", o2++)), F.hard && D[E2] > u) {
978
- const B2 = u - o2, p = 1 + Math.floor((D[E2] - B2 - 1) / u);
979
- Math.floor((D[E2] - 1) / u) < p && i.push(""), y(i, h2, u);
1279
+ for (const child of (0, import_fs2.readdirSync)((0, import_path4.join)(process.cwd(), dirPath))) {
1280
+ const fullPath = (0, import_path4.join)(dirPath, child);
1281
+ if (ig == null ? void 0 : ig.ignores(fullPath)) {
980
1282
  continue;
981
1283
  }
982
- if (o2 + D[E2] > u && o2 > 0 && D[E2] > 0) {
983
- if (F.wordWrap === false && o2 < u) {
984
- y(i, h2, u);
985
- continue;
986
- }
987
- i.push("");
988
- }
989
- if (o2 + D[E2] > u && F.wordWrap === false) {
990
- y(i, h2, u);
991
- continue;
1284
+ if ((0, import_fs2.lstatSync)(fullPath).isFile()) {
1285
+ visitor(fullPath);
1286
+ } else {
1287
+ visitNotIgnoredFiles(fullPath, visitor);
992
1288
  }
993
- i[i.length - 1] += h2;
994
1289
  }
995
- F.trim !== false && (i = i.map((E2) => rD(E2)));
996
- const n = [...i.join(`
997
- `)];
998
- for (const [E2, h2] of n.entries()) {
999
- if (e2 += h2, g.has(h2)) {
1000
- const { groups: B2 } = new RegExp(`(?:\\${O}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(n.slice(E2).join("")) || { groups: {} };
1001
- if (B2.code !== void 0) {
1002
- const p = Number.parseFloat(B2.code);
1003
- s2 = p === sD ? void 0 : p;
1004
- } else B2.uri !== void 0 && (C2 = B2.uri.length === 0 ? void 0 : B2.uri);
1005
- }
1006
- const o2 = eD.codes.get(Number(s2));
1007
- n[E2 + 1] === `
1008
- ` ? (C2 && (e2 += L("")), s2 && o2 && (e2 += N(o2))) : h2 === `
1009
- ` && (s2 && o2 && (e2 += N(s2)), C2 && (e2 += L(C2)));
1010
- }
1011
- return e2;
1012
- };
1013
- function R(t, u, F) {
1014
- return String(t).normalize().replace(/\r\n/g, `
1015
- `).split(`
1016
- `).map((e2) => ED(e2, u, F)).join(`
1017
- `);
1018
1290
  }
1019
- var oD = Object.defineProperty;
1020
- var nD = (t, u, F) => u in t ? oD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
1021
- var a = (t, u, F) => (nD(t, typeof u != "symbol" ? u + "" : u, F), F);
1022
- function aD(t, u) {
1023
- if (t === u) return;
1024
- const F = t.split(`
1025
- `), e2 = u.split(`
1026
- `), s2 = [];
1027
- for (let C2 = 0; C2 < Math.max(F.length, e2.length); C2++) F[C2] !== e2[C2] && s2.push(C2);
1028
- return s2;
1029
- }
1030
- var V = Symbol("clack:cancel");
1031
- function hD(t) {
1032
- return t === V;
1033
- }
1034
- function v(t, u) {
1035
- t.isTTY && t.setRawMode(u);
1036
- }
1037
- var z = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
1038
- var lD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
1039
- var x = class {
1040
- constructor({ render: u, input: F = import_node_process.stdin, output: e2 = import_node_process.stdout, ...s2 }, C2 = true) {
1041
- a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", /* @__PURE__ */ new Map()), a(this, "_prevFrame", ""), this.opts = s2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C2, this.input = F, this.output = e2;
1042
- }
1043
- prompt() {
1044
- const u = new import_node_tty.WriteStream(0);
1045
- return u._write = (F, e2, s2) => {
1046
- this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s2();
1047
- }, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e2) => {
1048
- this.once("submit", () => {
1049
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(this.value);
1050
- }), this.once("cancel", () => {
1051
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v(this.input, false), F(V);
1052
- });
1053
- });
1054
- }
1055
- on(u, F) {
1056
- const e2 = this.subscribers.get(u) ?? [];
1057
- e2.push({ cb: F }), this.subscribers.set(u, e2);
1058
- }
1059
- once(u, F) {
1060
- const e2 = this.subscribers.get(u) ?? [];
1061
- e2.push({ cb: F, once: true }), this.subscribers.set(u, e2);
1062
- }
1063
- emit(u, ...F) {
1064
- const e2 = this.subscribers.get(u) ?? [], s2 = [];
1065
- for (const C2 of e2) C2.cb(...F), C2.once && s2.push(() => e2.splice(e2.indexOf(C2), 1));
1066
- for (const C2 of s2) C2();
1067
- }
1068
- unsubscribe() {
1069
- this.subscribers.clear();
1070
- }
1071
- onKeypress(u, F) {
1072
- if (this.state === "error" && (this.state = "active"), (F == null ? void 0 : F.name) && !this._track && z.has(F.name) && this.emit("cursor", z.get(F.name)), (F == null ? void 0 : F.name) && lD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u === " " && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), (F == null ? void 0 : F.name) === "return") {
1073
- if (this.opts.validate) {
1074
- const e2 = this.opts.validate(this.value);
1075
- e2 && (this.error = e2, this.state = "error", this.rl.write(this.value));
1076
- }
1077
- this.state !== "error" && (this.state = "submit");
1078
- }
1079
- u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
1080
- }
1081
- close() {
1082
- this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1083
- `), v(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
1291
+ var import_fs2, import_ignore, import_path4;
1292
+ var init_visit_not_ignored_files = __esm({
1293
+ "packages/qwik/src/cli/migrate-v2/tools/visit-not-ignored-files.ts"() {
1294
+ "use strict";
1295
+ import_fs2 = require("fs");
1296
+ import_ignore = __toESM(require("ignore"), 1);
1297
+ import_path4 = require("path");
1084
1298
  }
1085
- restoreCursor() {
1086
- const u = R(this._prevFrame, process.stdout.columns, { hard: true }).split(`
1087
- `).length - 1;
1088
- this.output.write(import_sisteransi.cursor.move(-999, u * -1));
1089
- }
1090
- render() {
1091
- const u = R(this._render(this) ?? "", process.stdout.columns, { hard: true });
1092
- if (u !== this._prevFrame) {
1093
- if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
1094
- else {
1095
- const F = aD(this._prevFrame, u);
1096
- if (this.restoreCursor(), F && (F == null ? void 0 : F.length) === 1) {
1097
- const e2 = F[0];
1098
- this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.lines(1));
1099
- const s2 = u.split(`
1100
- `);
1101
- this.output.write(s2[e2]), this._prevFrame = u, this.output.write(import_sisteransi.cursor.move(0, s2.length - e2 - 1));
1102
- return;
1103
- } else if (F && (F == null ? void 0 : F.length) > 1) {
1104
- const e2 = F[0];
1105
- this.output.write(import_sisteransi.cursor.move(0, e2)), this.output.write(import_sisteransi.erase.down());
1106
- const s2 = u.split(`
1107
- `).slice(e2);
1108
- this.output.write(s2.join(`
1109
- `)), this._prevFrame = u;
1110
- return;
1111
- }
1112
- this.output.write(import_sisteransi.erase.down());
1113
- }
1114
- this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
1299
+ });
1300
+
1301
+ // packages/qwik/src/cli/migrate-v2/rename-import.ts
1302
+ var rename_import_exports = {};
1303
+ __export(rename_import_exports, {
1304
+ replaceImportInFiles: () => replaceImportInFiles
1305
+ });
1306
+ function replaceImportInFiles(changes, library) {
1307
+ const project = new import_ts_morph.Project();
1308
+ visitNotIgnoredFiles(".", (path3) => {
1309
+ if (!path3.endsWith(".ts") && !path3.endsWith(".tsx")) {
1310
+ return;
1115
1311
  }
1116
- }
1117
- };
1118
- var xD = class extends x {
1119
- get cursor() {
1120
- return this.value ? 0 : 1;
1121
- }
1122
- get _value() {
1123
- return this.cursor === 0;
1124
- }
1125
- constructor(u) {
1126
- super(u, false), this.value = !!u.initialValue, this.on("value", () => {
1127
- this.value = this._value;
1128
- }), this.on("confirm", (F) => {
1129
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
1130
- }), this.on("cursor", () => {
1131
- this.value = !this.value;
1132
- });
1133
- }
1134
- };
1135
- var bD = Object.defineProperty;
1136
- var wD = (t, u, F) => u in t ? bD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
1137
- var Z = (t, u, F) => (wD(t, typeof u != "symbol" ? u + "" : u, F), F);
1138
- var yD = class extends x {
1139
- constructor(u) {
1140
- super(u, false), Z(this, "options"), Z(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
1141
- switch (F) {
1142
- case "left":
1143
- case "up":
1144
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
1145
- break;
1146
- case "down":
1147
- case "right":
1148
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
1149
- break;
1312
+ project.addSourceFileAtPath(path3);
1313
+ });
1314
+ project.getSourceFiles().forEach((sourceFile) => {
1315
+ let hasChanges = false;
1316
+ sourceFile.getImportDeclarations().forEach((importDeclaration) => {
1317
+ if (importDeclaration.getModuleSpecifierValue().startsWith(library)) {
1318
+ for (const [oldImport, newImport] of changes) {
1319
+ importDeclaration.getNamedImports().forEach((namedImport) => {
1320
+ if (namedImport.getName() === oldImport) {
1321
+ namedImport.setName(newImport);
1322
+ hasChanges = true;
1323
+ }
1324
+ });
1325
+ }
1150
1326
  }
1151
- this.changeValue();
1152
1327
  });
1153
- }
1154
- get _value() {
1155
- return this.options[this.cursor];
1156
- }
1157
- changeValue() {
1158
- this.value = this._value.value;
1159
- }
1160
- };
1161
- var SD = Object.defineProperty;
1162
- var jD = (t, u, F) => u in t ? SD(t, u, { enumerable: true, configurable: true, writable: true, value: F }) : t[u] = F;
1163
- var MD = (t, u, F) => (jD(t, typeof u != "symbol" ? u + "" : u, F), F);
1164
- var TD = class extends x {
1165
- constructor(u) {
1166
- super(u), MD(this, "valueWithCursor", ""), this.on("finalize", () => {
1167
- this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
1168
- }), this.on("value", () => {
1169
- if (this.cursor >= this.value.length) this.valueWithCursor = `${this.value}${import_picocolors.default.inverse(import_picocolors.default.hidden("_"))}`;
1170
- else {
1171
- const F = this.value.slice(0, this.cursor), e2 = this.value.slice(this.cursor);
1172
- this.valueWithCursor = `${F}${import_picocolors.default.inverse(e2[0])}${e2.slice(1)}`;
1328
+ sourceFile.getDescendantsOfKind(import_ts_morph.ts.SyntaxKind.Identifier).forEach((identifier) => {
1329
+ for (const [oldImport, newImport] of changes) {
1330
+ if (identifier.getText() === oldImport) {
1331
+ identifier.replaceWithText(newImport);
1332
+ hasChanges = true;
1333
+ }
1173
1334
  }
1174
1335
  });
1336
+ if (hasChanges) {
1337
+ sourceFile.saveSync();
1338
+ f2.info(`Updated imports in ${sourceFile.getFilePath()}`);
1339
+ }
1340
+ });
1341
+ }
1342
+ var import_ts_morph;
1343
+ var init_rename_import = __esm({
1344
+ "packages/qwik/src/cli/migrate-v2/rename-import.ts"() {
1345
+ "use strict";
1346
+ import_ts_morph = require("ts-morph");
1347
+ init_visit_not_ignored_files();
1348
+ init_dist2();
1175
1349
  }
1176
- get cursor() {
1177
- return this._cursor;
1178
- }
1350
+ });
1351
+
1352
+ // packages/qwik/src/cli/index.ts
1353
+ var cli_exports = {};
1354
+ __export(cli_exports, {
1355
+ runCli: () => runCli,
1356
+ updateApp: () => updateApp
1357
+ });
1358
+ module.exports = __toCommonJS(cli_exports);
1359
+
1360
+ // node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
1361
+ var FORCE_COLOR;
1362
+ var NODE_DISABLE_COLORS;
1363
+ var NO_COLOR;
1364
+ var TERM;
1365
+ var isTTY = true;
1366
+ if (typeof process !== "undefined") {
1367
+ ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
1368
+ isTTY = process.stdout && process.stdout.isTTY;
1369
+ }
1370
+ var $ = {
1371
+ enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
1179
1372
  };
1180
- var PD = globalThis.process.platform.startsWith("win");
1181
- function WD({ input: t = import_node_process.stdin, output: u = import_node_process.stdout, overwrite: F = true, hideCursor: e2 = true } = {}) {
1182
- const s2 = f.createInterface({ input: t, output: u, prompt: "", tabSize: 1 });
1183
- f.emitKeypressEvents(t, s2), t.isTTY && t.setRawMode(true);
1184
- const C2 = (D, { name: i }) => {
1185
- if (String(D) === "" && process.exit(0), !F) return;
1186
- let n = i === "return" ? 0 : -1, E2 = i === "return" ? -1 : 0;
1187
- f.moveCursor(u, n, E2, () => {
1188
- f.clearLine(u, 1, () => {
1189
- t.once("keypress", C2);
1190
- });
1191
- });
1192
- };
1193
- return e2 && process.stdout.write(import_sisteransi.cursor.hide), t.once("keypress", C2), () => {
1194
- t.off("keypress", C2), e2 && process.stdout.write(import_sisteransi.cursor.show), t.isTTY && !PD && t.setRawMode(false), s2.terminal = false, s2.close();
1373
+ function init(x3, y3) {
1374
+ let rgx = new RegExp(`\\x1b\\[${y3}m`, "g");
1375
+ let open = `\x1B[${x3}m`, close = `\x1B[${y3}m`;
1376
+ return function(txt) {
1377
+ if (!$.enabled || txt == null) return txt;
1378
+ return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close;
1195
1379
  };
1196
1380
  }
1381
+ var reset = init(0, 0);
1382
+ var bold = init(1, 22);
1383
+ var dim = init(2, 22);
1384
+ var italic = init(3, 23);
1385
+ var underline = init(4, 24);
1386
+ var inverse = init(7, 27);
1387
+ var hidden = init(8, 28);
1388
+ var strikethrough = init(9, 29);
1389
+ var black = init(30, 39);
1390
+ var red = init(31, 39);
1391
+ var green = init(32, 39);
1392
+ var yellow = init(33, 39);
1393
+ var blue = init(34, 39);
1394
+ var magenta = init(35, 39);
1395
+ var cyan = init(36, 39);
1396
+ var white = init(37, 39);
1397
+ var gray = init(90, 39);
1398
+ var grey = init(90, 39);
1399
+ var bgBlack = init(40, 49);
1400
+ var bgRed = init(41, 49);
1401
+ var bgGreen = init(42, 49);
1402
+ var bgYellow = init(43, 49);
1403
+ var bgBlue = init(44, 49);
1404
+ var bgMagenta = init(45, 49);
1405
+ var bgCyan = init(46, 49);
1406
+ var bgWhite = init(47, 49);
1197
1407
 
1198
- // node_modules/.pnpm/@clack+prompts@0.7.0/node_modules/@clack/prompts/dist/index.mjs
1199
- var import_node_process2 = __toESM(require("node:process"), 1);
1200
- var import_picocolors2 = __toESM(require_picocolors(), 1);
1201
- var import_sisteransi2 = __toESM(require_src(), 1);
1202
- function q2() {
1203
- return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1204
- }
1205
- var _2 = q2();
1206
- var o = (r2, n) => _2 ? r2 : n;
1207
- var H = o("\u25C6", "*");
1208
- var I2 = o("\u25A0", "x");
1209
- var x2 = o("\u25B2", "x");
1210
- var S2 = o("\u25C7", "o");
1211
- var K = o("\u250C", "T");
1212
- var a2 = o("\u2502", "|");
1213
- var d2 = o("\u2514", "\u2014");
1214
- var b2 = o("\u25CF", ">");
1215
- var E = o("\u25CB", " ");
1216
- var C = o("\u25FB", "[\u2022]");
1217
- var w2 = o("\u25FC", "[+]");
1218
- var M2 = o("\u25FB", "[ ]");
1219
- var U2 = o("\u25AA", "\u2022");
1220
- var B = o("\u2500", "-");
1221
- var Z2 = o("\u256E", "+");
1222
- var z2 = o("\u251C", "+");
1223
- var X2 = o("\u256F", "+");
1224
- var J2 = o("\u25CF", "\u2022");
1225
- var Y = o("\u25C6", "*");
1226
- var Q2 = o("\u25B2", "!");
1227
- var ee = o("\u25A0", "x");
1228
- var y2 = (r2) => {
1229
- switch (r2) {
1230
- case "initial":
1231
- case "active":
1232
- return import_picocolors2.default.cyan(H);
1233
- case "cancel":
1234
- return import_picocolors2.default.red(I2);
1235
- case "error":
1236
- return import_picocolors2.default.yellow(x2);
1237
- case "submit":
1238
- return import_picocolors2.default.green(S2);
1408
+ // packages/qwik/src/cli/utils/app-command.ts
1409
+ var import_node_fs = require("node:fs");
1410
+ var import_node_path = require("node:path");
1411
+ var AppCommand = class {
1412
+ args;
1413
+ task;
1414
+ cwd;
1415
+ _rootDir;
1416
+ _rootPkgJson;
1417
+ constructor(opts) {
1418
+ this._rootDir = opts.rootDir;
1419
+ this.cwd = opts.cwd;
1420
+ this.args = opts.args.slice();
1421
+ this.task = this.args[0];
1239
1422
  }
1240
- };
1241
- var te = (r2) => new TD({ validate: r2.validate, placeholder: r2.placeholder, defaultValue: r2.defaultValue, initialValue: r2.initialValue, render() {
1242
- var _a;
1243
- const n = `${import_picocolors2.default.gray(a2)}
1244
- ${y2(this.state)} ${r2.message}
1245
- `, i = r2.placeholder ? import_picocolors2.default.inverse(r2.placeholder[0]) + import_picocolors2.default.dim(r2.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), t = this.value ? this.valueWithCursor : i;
1246
- switch (this.state) {
1247
- case "error":
1248
- return `${n.trim()}
1249
- ${import_picocolors2.default.yellow(a2)} ${t}
1250
- ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
1251
- `;
1252
- case "submit":
1253
- return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(this.value || r2.placeholder)}`;
1254
- case "cancel":
1255
- return `${n}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${((_a = this.value) == null ? void 0 : _a.trim()) ? `
1256
- ` + import_picocolors2.default.gray(a2) : ""}`;
1257
- default:
1258
- return `${n}${import_picocolors2.default.cyan(a2)} ${t}
1259
- ${import_picocolors2.default.cyan(d2)}
1260
- `;
1423
+ get rootDir() {
1424
+ if (!this._rootDir) {
1425
+ const fsRoot = (0, import_node_path.resolve)("/");
1426
+ let testDir = process.cwd();
1427
+ for (let i = 0; i < 20; i++) {
1428
+ const pkgPath = (0, import_node_path.join)(testDir, "package.json");
1429
+ if ((0, import_node_fs.existsSync)(pkgPath)) {
1430
+ this._rootDir = testDir;
1431
+ break;
1432
+ }
1433
+ if (testDir === fsRoot) {
1434
+ break;
1435
+ }
1436
+ testDir = (0, import_node_path.dirname)(testDir);
1437
+ }
1438
+ if (!this._rootDir) {
1439
+ throw new Error(`Unable to find Qwik app package.json`);
1440
+ }
1441
+ }
1442
+ return this._rootDir;
1261
1443
  }
1262
- } }).prompt();
1263
- var se = (r2) => {
1264
- const n = r2.active ?? "Yes", i = r2.inactive ?? "No";
1265
- return new xD({ active: n, inactive: i, initialValue: r2.initialValue ?? true, render() {
1266
- const t = `${import_picocolors2.default.gray(a2)}
1267
- ${y2(this.state)} ${r2.message}
1268
- `, s2 = this.value ? n : i;
1269
- switch (this.state) {
1270
- case "submit":
1271
- return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(s2)}`;
1272
- case "cancel":
1273
- return `${t}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s2))}
1274
- ${import_picocolors2.default.gray(a2)}`;
1275
- default:
1276
- return `${t}${import_picocolors2.default.cyan(a2)} ${this.value ? `${import_picocolors2.default.green(b2)} ${n}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(i)}` : `${import_picocolors2.default.green(b2)} ${i}`}
1277
- ${import_picocolors2.default.cyan(d2)}
1278
- `;
1444
+ set rootDir(rootDir) {
1445
+ this._rootDir = rootDir;
1446
+ }
1447
+ get packageJson() {
1448
+ if (!this._rootPkgJson) {
1449
+ const pkgJsonPath = (0, import_node_path.join)(this.rootDir, "package.json");
1450
+ this._rootPkgJson = JSON.parse((0, import_node_fs.readFileSync)(pkgJsonPath, "utf-8"));
1279
1451
  }
1280
- } }).prompt();
1281
- };
1282
- var ie = (r2) => {
1283
- const n = (t, s2) => {
1284
- const c2 = t.label ?? String(t.value);
1285
- return s2 === "active" ? `${import_picocolors2.default.green(b2)} ${c2} ${t.hint ? import_picocolors2.default.dim(`(${t.hint})`) : ""}` : s2 === "selected" ? `${import_picocolors2.default.dim(c2)}` : s2 === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(c2))}` : `${import_picocolors2.default.dim(E)} ${import_picocolors2.default.dim(c2)}`;
1286
- };
1287
- let i = 0;
1288
- return new yD({ options: r2.options, initialValue: r2.initialValue, render() {
1289
- const t = `${import_picocolors2.default.gray(a2)}
1290
- ${y2(this.state)} ${r2.message}
1291
- `;
1292
- switch (this.state) {
1293
- case "submit":
1294
- return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "selected")}`;
1295
- case "cancel":
1296
- return `${t}${import_picocolors2.default.gray(a2)} ${n(this.options[this.cursor], "cancelled")}
1297
- ${import_picocolors2.default.gray(a2)}`;
1298
- default: {
1299
- const s2 = r2.maxItems === void 0 ? 1 / 0 : Math.max(r2.maxItems, 5);
1300
- this.cursor >= i + s2 - 3 ? i = Math.max(Math.min(this.cursor - s2 + 3, this.options.length - s2), 0) : this.cursor < i + 2 && (i = Math.max(this.cursor - 2, 0));
1301
- const c2 = s2 < this.options.length && i > 0, l2 = s2 < this.options.length && i + s2 < this.options.length;
1302
- return `${t}${import_picocolors2.default.cyan(a2)} ${this.options.slice(i, i + s2).map((u, m2, $4) => m2 === 0 && c2 ? import_picocolors2.default.dim("...") : m2 === $4.length - 1 && l2 ? import_picocolors2.default.dim("...") : n(u, m2 + i === this.cursor ? "active" : "inactive")).join(`
1303
- ${import_picocolors2.default.cyan(a2)} `)}
1304
- ${import_picocolors2.default.cyan(d2)}
1305
- `;
1306
- }
1452
+ return this._rootPkgJson;
1453
+ }
1454
+ getArg(name) {
1455
+ const key = `--${name}`;
1456
+ const matcher = new RegExp(`^${key}($|=)`);
1457
+ const index = this.args.findIndex((arg) => matcher.test(arg));
1458
+ if (index === -1) {
1459
+ return;
1307
1460
  }
1308
- } }).prompt();
1309
- };
1310
- var oe = (r2 = "") => {
1311
- process.stdout.write(`${import_picocolors2.default.gray(K)} ${r2}
1312
- `);
1313
- };
1314
- var $e = (r2 = "") => {
1315
- process.stdout.write(`${import_picocolors2.default.gray(a2)}
1316
- ${import_picocolors2.default.gray(d2)} ${r2}
1317
-
1318
- `);
1319
- };
1320
- var f2 = { message: (r2 = "", { symbol: n = import_picocolors2.default.gray(a2) } = {}) => {
1321
- const i = [`${import_picocolors2.default.gray(a2)}`];
1322
- if (r2) {
1323
- const [t, ...s2] = r2.split(`
1324
- `);
1325
- i.push(`${n} ${t}`, ...s2.map((c2) => `${import_picocolors2.default.gray(a2)} ${c2}`));
1461
+ if (this.args[index].includes("=")) {
1462
+ return this.args[index].split("=")[1];
1463
+ }
1464
+ return this.args[index + 1];
1326
1465
  }
1327
- process.stdout.write(`${i.join(`
1328
- `)}
1329
- `);
1330
- }, info: (r2) => {
1331
- f2.message(r2, { symbol: import_picocolors2.default.blue(J2) });
1332
- }, success: (r2) => {
1333
- f2.message(r2, { symbol: import_picocolors2.default.green(Y) });
1334
- }, step: (r2) => {
1335
- f2.message(r2, { symbol: import_picocolors2.default.green(S2) });
1336
- }, warn: (r2) => {
1337
- f2.message(r2, { symbol: import_picocolors2.default.yellow(Q2) });
1338
- }, warning: (r2) => {
1339
- f2.warn(r2);
1340
- }, error: (r2) => {
1341
- f2.message(r2, { symbol: import_picocolors2.default.red(ee) });
1342
- } };
1343
- var de = () => {
1344
- const r2 = _2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], n = _2 ? 80 : 120;
1345
- let i, t, s2 = false, c2 = "";
1346
- const l2 = (v2 = "") => {
1347
- s2 = true, i = WD(), c2 = v2.replace(/\.+$/, ""), process.stdout.write(`${import_picocolors2.default.gray(a2)}
1348
- `);
1349
- let g2 = 0, p = 0;
1350
- t = setInterval(() => {
1351
- const O2 = import_picocolors2.default.magenta(r2[g2]), P2 = ".".repeat(Math.floor(p)).slice(0, 3);
1352
- process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${O2} ${c2}${P2}`), g2 = g2 + 1 < r2.length ? g2 + 1 : 0, p = p < r2.length ? p + 0.125 : 0;
1353
- }, n);
1354
- }, u = (v2 = "", g2 = 0) => {
1355
- c2 = v2 ?? c2, s2 = false, clearInterval(t);
1356
- const p = g2 === 0 ? import_picocolors2.default.green(S2) : g2 === 1 ? import_picocolors2.default.red(I2) : import_picocolors2.default.red(x2);
1357
- process.stdout.write(import_sisteransi2.cursor.move(-999, 0)), process.stdout.write(import_sisteransi2.erase.down(1)), process.stdout.write(`${p} ${c2}
1358
- `), i();
1359
- }, m2 = (v2 = "") => {
1360
- c2 = v2 ?? c2;
1361
- }, $4 = (v2) => {
1362
- const g2 = v2 > 1 ? "Something went wrong" : "Canceled";
1363
- s2 && u(g2, v2);
1364
- };
1365
- return process.on("uncaughtExceptionMonitor", () => $4(2)), process.on("unhandledRejection", () => $4(2)), process.on("SIGINT", () => $4(1)), process.on("SIGTERM", () => $4(1)), process.on("exit", $4), { start: l2, stop: u, message: m2 };
1366
1466
  };
1367
1467
 
1468
+ // packages/qwik/src/cli/add/run-add-interactive.ts
1469
+ init_dist2();
1470
+
1368
1471
  // packages/qwik/src/cli/utils/integrations.ts
1369
1472
  var import_node_fs3 = __toESM(require("node:fs"), 1);
1370
1473
  var import_node_path3 = require("node:path");
1371
1474
 
1372
1475
  // packages/qwik/src/cli/utils/utils.ts
1476
+ init_dist2();
1373
1477
  var import_which_pm_runs = __toESM(require_which_pm_runs(), 1);
1374
1478
  var import_node_fs2 = __toESM(require("node:fs"), 1);
1375
1479
  var import_node_path2 = require("node:path");
@@ -1419,6 +1523,10 @@ async function readPackageJson(dir) {
1419
1523
  const pkgJson = JSON.parse(await import_node_fs2.default.promises.readFile(path3, "utf-8"));
1420
1524
  return pkgJson;
1421
1525
  }
1526
+ async function writePackageJson(dir, pkgJson) {
1527
+ const path3 = (0, import_node_path2.join)(dir, "package.json");
1528
+ await import_node_fs2.default.promises.writeFile(path3, JSON.stringify(pkgJson, null, 2) + "\n");
1529
+ }
1422
1530
  function dashToTitleCase(str) {
1423
1531
  return str.toLocaleLowerCase().split("-").map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
1424
1532
  }
@@ -1567,7 +1675,7 @@ async function loadIntegrations() {
1567
1675
  const dirItems = await import_node_fs3.default.promises.readdir(dir);
1568
1676
  await Promise.all(
1569
1677
  dirItems.map(async (dirItem) => {
1570
- var _a, _b, _c;
1678
+ var _a, _b, _c, _d;
1571
1679
  const dirPath = (0, import_node_path3.join)(dir, dirItem);
1572
1680
  const stat = await import_node_fs3.default.promises.stat(dirPath);
1573
1681
  if (stat.isDirectory()) {
@@ -1579,7 +1687,8 @@ async function loadIntegrations() {
1579
1687
  dir: dirPath,
1580
1688
  pkgJson,
1581
1689
  docs: ((_b = pkgJson.__qwik__) == null ? void 0 : _b.docs) ?? [],
1582
- priority: ((_c = pkgJson == null ? void 0 : pkgJson.__qwik__) == null ? void 0 : _c.priority) ?? 0
1690
+ priority: ((_c = pkgJson == null ? void 0 : pkgJson.__qwik__) == null ? void 0 : _c.priority) ?? 0,
1691
+ alwaysInRoot: ((_d = pkgJson.__qwik__) == null ? void 0 : _d.alwaysInRoot) ?? []
1583
1692
  };
1584
1693
  loadingIntegrations.push(integration);
1585
1694
  }
@@ -1606,6 +1715,7 @@ async function loadIntegrations() {
1606
1715
  var import_node_path6 = require("node:path");
1607
1716
 
1608
1717
  // packages/qwik/src/cli/utils/install-deps.ts
1718
+ init_dist2();
1609
1719
  function installDeps(pkgManager, dir) {
1610
1720
  return runCommand(pkgManager, ["install"], dir);
1611
1721
  }
@@ -1626,43 +1736,45 @@ function logNextStep(nextSteps, packageManager) {
1626
1736
  }
1627
1737
 
1628
1738
  // packages/qwik/src/cli/add/update-app.ts
1629
- var import_node_path5 = require("node:path");
1739
+ init_dist2();
1630
1740
  var import_node_fs5 = __toESM(require("node:fs"), 1);
1741
+ var import_node_path5 = require("node:path");
1631
1742
 
1632
1743
  // packages/qwik/src/cli/add/update-files.ts
1633
1744
  var import_node_fs4 = __toESM(require("node:fs"), 1);
1634
1745
  var import_node_path4 = require("node:path");
1635
- async function mergeIntegrationDir(fileUpdates, opts, srcDir, destDir) {
1746
+ async function mergeIntegrationDir(fileUpdates, opts, srcDir, destDir, alwaysInRoot) {
1636
1747
  const items = await import_node_fs4.default.promises.readdir(srcDir);
1637
1748
  await Promise.all(
1638
1749
  items.map(async (itemName) => {
1639
1750
  const destName = itemName === "gitignore" ? ".gitignore" : itemName;
1640
1751
  const ext = (0, import_node_path4.extname)(destName);
1641
1752
  const srcChildPath = (0, import_node_path4.join)(srcDir, itemName);
1642
- const destChildPath = (0, import_node_path4.join)(destDir, destName);
1753
+ const destRootPath = (0, import_node_path4.join)(destDir, destName);
1643
1754
  const s2 = await import_node_fs4.default.promises.stat(srcChildPath);
1644
1755
  if (s2.isDirectory()) {
1645
- await mergeIntegrationDir(fileUpdates, opts, srcChildPath, destChildPath);
1756
+ await mergeIntegrationDir(fileUpdates, opts, srcChildPath, destRootPath, alwaysInRoot);
1646
1757
  } else if (s2.isFile()) {
1758
+ const finalDestPath = getFinalDestPath(opts, destRootPath, destDir, destName, alwaysInRoot);
1647
1759
  if (destName === "package.json") {
1648
- await mergePackageJsons(fileUpdates, srcChildPath, destChildPath);
1760
+ await mergePackageJsons(fileUpdates, srcChildPath, destRootPath);
1649
1761
  } else if (destName === "settings.json") {
1650
- await mergeJsons(fileUpdates, srcChildPath, destChildPath);
1762
+ await mergeJsons(fileUpdates, srcChildPath, finalDestPath);
1651
1763
  } else if (destName === "README.md") {
1652
- await mergeReadmes(fileUpdates, srcChildPath, destChildPath);
1764
+ await mergeReadmes(fileUpdates, srcChildPath, finalDestPath);
1653
1765
  } else if (destName === ".gitignore" || destName === ".prettierignore" || destName === ".eslintignore") {
1654
- await mergeIgnoresFile(fileUpdates, srcChildPath, destChildPath);
1766
+ await mergeIgnoresFile(fileUpdates, srcChildPath, destRootPath);
1655
1767
  } else if (ext === ".css") {
1656
- await mergeCss(fileUpdates, srcChildPath, destChildPath, opts);
1657
- } else if (import_node_fs4.default.existsSync(destChildPath)) {
1768
+ await mergeCss(fileUpdates, srcChildPath, finalDestPath, opts);
1769
+ } else if (import_node_fs4.default.existsSync(finalDestPath)) {
1658
1770
  fileUpdates.files.push({
1659
- path: destChildPath,
1771
+ path: finalDestPath,
1660
1772
  content: await import_node_fs4.default.promises.readFile(srcChildPath),
1661
1773
  type: "overwrite"
1662
1774
  });
1663
1775
  } else {
1664
1776
  fileUpdates.files.push({
1665
- path: destChildPath,
1777
+ path: finalDestPath,
1666
1778
  content: await import_node_fs4.default.promises.readFile(srcChildPath),
1667
1779
  type: "create"
1668
1780
  });
@@ -1671,6 +1783,14 @@ async function mergeIntegrationDir(fileUpdates, opts, srcDir, destDir) {
1671
1783
  })
1672
1784
  );
1673
1785
  }
1786
+ function getFinalDestPath(opts, destRootPath, destDir, destName, alwaysInRoot) {
1787
+ const projectDir = opts.projectDir ? opts.projectDir : "";
1788
+ const rootDirEndIndex = destDir.indexOf(opts.rootDir) + opts.rootDir.length;
1789
+ const destWithoutRoot = destDir.slice(rootDirEndIndex);
1790
+ const destChildPath = (0, import_node_path4.join)(opts.rootDir, projectDir, destWithoutRoot, destName);
1791
+ const finalDestPath = alwaysInRoot && alwaysInRoot.some((rootItem) => destName.includes(rootItem) || destDir.includes(rootItem)) ? destRootPath : destChildPath;
1792
+ return finalDestPath;
1793
+ }
1674
1794
  async function mergePackageJsons(fileUpdates, srcPath, destPath) {
1675
1795
  var _a;
1676
1796
  const srcContent = await import_node_fs4.default.promises.readFile(srcPath, "utf-8");
@@ -1807,25 +1927,25 @@ var import_fs = __toESM(require("fs"), 1);
1807
1927
  var import_path = require("path");
1808
1928
 
1809
1929
  // packages/qwik/src/cli/code-mod/code-mod.ts
1810
- function updateViteConfig(ts, sourceText, updates) {
1930
+ function updateViteConfig(ts2, sourceText, updates) {
1811
1931
  if (!(updates == null ? void 0 : updates.imports) && !(updates == null ? void 0 : updates.qwikViteConfig) && !(updates == null ? void 0 : updates.viteConfig) && !(updates == null ? void 0 : updates.vitePlugins) && !(updates == null ? void 0 : updates.vitePluginsPrepend)) {
1812
1932
  return null;
1813
1933
  }
1814
- sourceText = transformSource(ts, sourceText, () => (tsSourceFile) => {
1934
+ sourceText = transformSource(ts2, sourceText, () => (tsSourceFile) => {
1815
1935
  if (updates.imports) {
1816
1936
  for (const importData of updates.imports) {
1817
- tsSourceFile = ensureImport(ts, tsSourceFile, importData);
1937
+ tsSourceFile = ensureImport(ts2, tsSourceFile, importData);
1818
1938
  }
1819
1939
  }
1820
1940
  const statements = [];
1821
1941
  for (const s2 of tsSourceFile.statements) {
1822
- if (ts.isExportAssignment(s2) && s2.expression && ts.isCallExpression(s2.expression)) {
1823
- if (ts.isIdentifier(s2.expression.expression) && s2.expression.expression.text === "defineConfig" && (updates.viteConfig || updates.qwikViteConfig || updates.vitePlugins || updates.vitePluginsPrepend)) {
1942
+ if (ts2.isExportAssignment(s2) && s2.expression && ts2.isCallExpression(s2.expression)) {
1943
+ if (ts2.isIdentifier(s2.expression.expression) && s2.expression.expression.text === "defineConfig" && (updates.viteConfig || updates.qwikViteConfig || updates.vitePlugins || updates.vitePluginsPrepend)) {
1824
1944
  statements.push(
1825
- ts.factory.updateExportAssignment(
1945
+ ts2.factory.updateExportAssignment(
1826
1946
  s2,
1827
1947
  s2.modifiers,
1828
- updateDefineConfig(ts, s2.expression, updates)
1948
+ updateDefineConfig(ts2, s2.expression, updates)
1829
1949
  )
1830
1950
  );
1831
1951
  continue;
@@ -1833,20 +1953,20 @@ function updateViteConfig(ts, sourceText, updates) {
1833
1953
  }
1834
1954
  statements.push(s2);
1835
1955
  }
1836
- return ts.factory.updateSourceFile(tsSourceFile, statements);
1956
+ return ts2.factory.updateSourceFile(tsSourceFile, statements);
1837
1957
  });
1838
1958
  return sourceText;
1839
1959
  }
1840
- function ensureImport(ts, tsSourceFile, importData) {
1960
+ function ensureImport(ts2, tsSourceFile, importData) {
1841
1961
  if (importData && importData.importPath) {
1842
1962
  if (Array.isArray(importData.namedImports)) {
1843
1963
  importData.namedImports.forEach((namedImport) => {
1844
- tsSourceFile = ensureNamedImport(ts, tsSourceFile, namedImport, importData.importPath);
1964
+ tsSourceFile = ensureNamedImport(ts2, tsSourceFile, namedImport, importData.importPath);
1845
1965
  });
1846
1966
  }
1847
1967
  if (typeof importData.defaultImport === "string") {
1848
1968
  tsSourceFile = ensureDefaultImport(
1849
- ts,
1969
+ ts2,
1850
1970
  tsSourceFile,
1851
1971
  importData.defaultImport,
1852
1972
  importData.importPath
@@ -1855,36 +1975,36 @@ function ensureImport(ts, tsSourceFile, importData) {
1855
1975
  }
1856
1976
  return tsSourceFile;
1857
1977
  }
1858
- function ensureNamedImport(ts, tsSourceFile, namedImport, importPath) {
1859
- if (!hasNamedImport(ts, tsSourceFile, namedImport, importPath)) {
1860
- tsSourceFile = appendImports(ts, tsSourceFile, null, namedImport, importPath);
1978
+ function ensureNamedImport(ts2, tsSourceFile, namedImport, importPath) {
1979
+ if (!hasNamedImport(ts2, tsSourceFile, namedImport, importPath)) {
1980
+ tsSourceFile = appendImports(ts2, tsSourceFile, null, namedImport, importPath);
1861
1981
  }
1862
1982
  return tsSourceFile;
1863
1983
  }
1864
- function ensureDefaultImport(ts, tsSourceFile, defaultImport, importPath) {
1865
- if (!hasDefaultImport(ts, tsSourceFile, importPath)) {
1866
- tsSourceFile = appendImports(ts, tsSourceFile, defaultImport, null, importPath);
1984
+ function ensureDefaultImport(ts2, tsSourceFile, defaultImport, importPath) {
1985
+ if (!hasDefaultImport(ts2, tsSourceFile, importPath)) {
1986
+ tsSourceFile = appendImports(ts2, tsSourceFile, defaultImport, null, importPath);
1867
1987
  }
1868
1988
  return tsSourceFile;
1869
1989
  }
1870
- function hasNamedImport(ts, tsSourceFile, namedImport, importPath) {
1871
- return !!findNamedImport(ts, tsSourceFile, namedImport, importPath);
1990
+ function hasNamedImport(ts2, tsSourceFile, namedImport, importPath) {
1991
+ return !!findNamedImport(ts2, tsSourceFile, namedImport, importPath);
1872
1992
  }
1873
- function hasDefaultImport(ts, tsSourceFile, importPath) {
1874
- return !!findDefaultImport(ts, tsSourceFile, importPath);
1993
+ function hasDefaultImport(ts2, tsSourceFile, importPath) {
1994
+ return !!findDefaultImport(ts2, tsSourceFile, importPath);
1875
1995
  }
1876
- function findNamedImport(ts, tsSourceFile, namedImport, importPath) {
1877
- return findImportDeclarations(ts, tsSourceFile).find((n) => {
1878
- if (n.importClause && n.moduleSpecifier && ts.isStringLiteral(n.moduleSpecifier)) {
1996
+ function findNamedImport(ts2, tsSourceFile, namedImport, importPath) {
1997
+ return findImportDeclarations(ts2, tsSourceFile).find((n) => {
1998
+ if (n.importClause && n.moduleSpecifier && ts2.isStringLiteral(n.moduleSpecifier)) {
1879
1999
  if (n.moduleSpecifier.text !== importPath) {
1880
2000
  return false;
1881
2001
  }
1882
2002
  const namedImports = n.importClause.namedBindings;
1883
- if (namedImports && ts.isNamedImports(namedImports) && namedImports.elements) {
2003
+ if (namedImports && ts2.isNamedImports(namedImports) && namedImports.elements) {
1884
2004
  return namedImports.elements.some((namedImportElement) => {
1885
- if (ts.isImportSpecifier(namedImportElement)) {
2005
+ if (ts2.isImportSpecifier(namedImportElement)) {
1886
2006
  const importName = namedImportElement.name;
1887
- if (importName && ts.isIdentifier(importName)) {
2007
+ if (importName && ts2.isIdentifier(importName)) {
1888
2008
  return importName.text === namedImport;
1889
2009
  }
1890
2010
  }
@@ -1895,11 +2015,11 @@ function findNamedImport(ts, tsSourceFile, namedImport, importPath) {
1895
2015
  return false;
1896
2016
  });
1897
2017
  }
1898
- function findDefaultImport(ts, tsSourceFile, importPath) {
1899
- return findImportDeclarations(ts, tsSourceFile).find((n) => {
2018
+ function findDefaultImport(ts2, tsSourceFile, importPath) {
2019
+ return findImportDeclarations(ts2, tsSourceFile).find((n) => {
1900
2020
  if (n.importClause && n.moduleSpecifier) {
1901
2021
  const modulePath = n.moduleSpecifier;
1902
- if (ts.isStringLiteral(modulePath) && modulePath.text === importPath) {
2022
+ if (ts2.isStringLiteral(modulePath) && modulePath.text === importPath) {
1903
2023
  const moduleDefault = n.importClause.name;
1904
2024
  if (moduleDefault && moduleDefault.text === importPath) {
1905
2025
  return true;
@@ -1909,18 +2029,18 @@ function findDefaultImport(ts, tsSourceFile, importPath) {
1909
2029
  return false;
1910
2030
  });
1911
2031
  }
1912
- function findImportDeclarations(ts, tsSourceFile) {
1913
- return tsSourceFile.statements.filter(ts.isImportDeclaration);
2032
+ function findImportDeclarations(ts2, tsSourceFile) {
2033
+ return tsSourceFile.statements.filter(ts2.isImportDeclaration);
1914
2034
  }
1915
- function appendImports(ts, tsSourceFile, defaultImport, namedImport, importPath) {
2035
+ function appendImports(ts2, tsSourceFile, defaultImport, namedImport, importPath) {
1916
2036
  const statements = tsSourceFile.statements.slice();
1917
2037
  let foundExistingImport = false;
1918
2038
  for (let i = statements.length - 1; i >= 0; i--) {
1919
2039
  const n = statements[i];
1920
- if (!ts.isImportDeclaration(n)) {
2040
+ if (!ts2.isImportDeclaration(n)) {
1921
2041
  continue;
1922
2042
  }
1923
- if (!n.moduleSpecifier || !ts.isStringLiteral(n.moduleSpecifier)) {
2043
+ if (!n.moduleSpecifier || !ts2.isStringLiteral(n.moduleSpecifier)) {
1924
2044
  continue;
1925
2045
  }
1926
2046
  if (n.moduleSpecifier.text !== importPath) {
@@ -1930,13 +2050,13 @@ function appendImports(ts, tsSourceFile, defaultImport, namedImport, importPath)
1930
2050
  const existingNamedImports = [];
1931
2051
  if (n.importClause) {
1932
2052
  const namedImports = n.importClause.namedBindings;
1933
- if (namedImports && ts.isNamedImports(namedImports) && namedImports.elements) {
2053
+ if (namedImports && ts2.isNamedImports(namedImports) && namedImports.elements) {
1934
2054
  existingNamedImports.push(...namedImports.elements);
1935
2055
  }
1936
2056
  }
1937
2057
  if (typeof namedImport === "string") {
1938
- const identifier = ts.factory.createIdentifier(namedImport);
1939
- const importSpecifier = ts.factory.createImportSpecifier(false, void 0, identifier);
2058
+ const identifier = ts2.factory.createIdentifier(namedImport);
2059
+ const importSpecifier = ts2.factory.createImportSpecifier(false, void 0, identifier);
1940
2060
  existingNamedImports.push(importSpecifier);
1941
2061
  }
1942
2062
  existingNamedImports.sort((a3, b3) => {
@@ -1946,16 +2066,16 @@ function appendImports(ts, tsSourceFile, defaultImport, namedImport, importPath)
1946
2066
  });
1947
2067
  let defaultIdentifier = n.importClause ? n.importClause.name : void 0;
1948
2068
  if (typeof defaultImport === "string") {
1949
- defaultIdentifier = ts.factory.createIdentifier(defaultImport);
2069
+ defaultIdentifier = ts2.factory.createIdentifier(defaultImport);
1950
2070
  }
1951
2071
  let namedBindings = void 0;
1952
2072
  if (existingNamedImports.length > 0) {
1953
- namedBindings = ts.factory.createNamedImports(existingNamedImports);
2073
+ namedBindings = ts2.factory.createNamedImports(existingNamedImports);
1954
2074
  }
1955
- statements[i] = ts.factory.updateImportDeclaration(
2075
+ statements[i] = ts2.factory.updateImportDeclaration(
1956
2076
  n,
1957
2077
  void 0,
1958
- ts.factory.createImportClause(false, defaultIdentifier, namedBindings),
2078
+ ts2.factory.createImportClause(false, defaultIdentifier, namedBindings),
1959
2079
  n.moduleSpecifier,
1960
2080
  void 0
1961
2081
  );
@@ -1964,61 +2084,61 @@ function appendImports(ts, tsSourceFile, defaultImport, namedImport, importPath)
1964
2084
  let defaultIdentifier = void 0;
1965
2085
  let namedBindings = void 0;
1966
2086
  if (typeof defaultImport === "string") {
1967
- defaultIdentifier = ts.factory.createIdentifier(defaultImport);
2087
+ defaultIdentifier = ts2.factory.createIdentifier(defaultImport);
1968
2088
  }
1969
2089
  if (typeof namedImport === "string") {
1970
- namedBindings = ts.factory.createNamedImports([
1971
- ts.factory.createImportSpecifier(
2090
+ namedBindings = ts2.factory.createNamedImports([
2091
+ ts2.factory.createImportSpecifier(
1972
2092
  false,
1973
2093
  void 0,
1974
- ts.factory.createIdentifier(namedImport)
2094
+ ts2.factory.createIdentifier(namedImport)
1975
2095
  )
1976
2096
  ]);
1977
2097
  }
1978
- const newNamedImport = ts.factory.createImportDeclaration(
2098
+ const newNamedImport = ts2.factory.createImportDeclaration(
1979
2099
  void 0,
1980
- ts.factory.createImportClause(false, defaultIdentifier, namedBindings),
1981
- ts.factory.createStringLiteral(importPath)
2100
+ ts2.factory.createImportClause(false, defaultIdentifier, namedBindings),
2101
+ ts2.factory.createStringLiteral(importPath)
1982
2102
  );
1983
- const lastImportIndex = findLastImportIndex(ts, tsSourceFile);
2103
+ const lastImportIndex = findLastImportIndex(ts2, tsSourceFile);
1984
2104
  statements.splice(lastImportIndex + 1, 0, newNamedImport);
1985
2105
  }
1986
- return ts.factory.updateSourceFile(tsSourceFile, statements);
2106
+ return ts2.factory.updateSourceFile(tsSourceFile, statements);
1987
2107
  }
1988
- function findLastImportIndex(ts, tsSourceFile) {
2108
+ function findLastImportIndex(ts2, tsSourceFile) {
1989
2109
  for (let i = tsSourceFile.statements.length - 1; i >= 0; i--) {
1990
2110
  const s2 = tsSourceFile.statements[i];
1991
- if (ts.isImportDeclaration(s2)) {
2111
+ if (ts2.isImportDeclaration(s2)) {
1992
2112
  return i;
1993
2113
  }
1994
- if (ts.isStringLiteral(s2) && s2.text === "use strict") {
2114
+ if (ts2.isStringLiteral(s2) && s2.text === "use strict") {
1995
2115
  return i;
1996
2116
  }
1997
2117
  }
1998
2118
  return 0;
1999
2119
  }
2000
- function updateDefineConfig(ts, callExp, updates) {
2120
+ function updateDefineConfig(ts2, callExp, updates) {
2001
2121
  const args = [];
2002
2122
  for (let i = 0; i < callExp.arguments.length; i++) {
2003
2123
  const exp = callExp.arguments[i];
2004
2124
  if (i === 0) {
2005
- if (ts.isArrowFunction(exp) && ts.isBlock(exp.body)) {
2125
+ if (ts2.isArrowFunction(exp) && ts2.isBlock(exp.body)) {
2006
2126
  args.push(
2007
- ts.factory.updateArrowFunction(
2127
+ ts2.factory.updateArrowFunction(
2008
2128
  exp,
2009
2129
  exp.modifiers,
2010
2130
  exp.typeParameters,
2011
2131
  exp.parameters,
2012
2132
  exp.type,
2013
2133
  exp.equalsGreaterThanToken,
2014
- updateDefineConfigFnReturn(ts, exp.body, updates)
2134
+ updateDefineConfigFnReturn(ts2, exp.body, updates)
2015
2135
  )
2016
2136
  );
2017
2137
  continue;
2018
2138
  }
2019
- if (ts.isFunctionExpression(exp) && ts.isBlock(exp.body)) {
2139
+ if (ts2.isFunctionExpression(exp) && ts2.isBlock(exp.body)) {
2020
2140
  args.push(
2021
- ts.factory.updateFunctionExpression(
2141
+ ts2.factory.updateFunctionExpression(
2022
2142
  exp,
2023
2143
  exp.modifiers,
2024
2144
  exp.asteriskToken,
@@ -2026,53 +2146,53 @@ function updateDefineConfig(ts, callExp, updates) {
2026
2146
  exp.typeParameters,
2027
2147
  exp.parameters,
2028
2148
  exp.type,
2029
- updateDefineConfigFnReturn(ts, exp.body, updates)
2149
+ updateDefineConfigFnReturn(ts2, exp.body, updates)
2030
2150
  )
2031
2151
  );
2032
2152
  continue;
2033
2153
  }
2034
- if (ts.isObjectLiteralExpression(exp)) {
2035
- args.push(updateVitConfigObj(ts, exp, updates));
2154
+ if (ts2.isObjectLiteralExpression(exp)) {
2155
+ args.push(updateVitConfigObj(ts2, exp, updates));
2036
2156
  continue;
2037
2157
  }
2038
2158
  }
2039
2159
  args.push(exp);
2040
2160
  }
2041
- return ts.factory.updateCallExpression(callExp, callExp.expression, callExp.typeArguments, args);
2161
+ return ts2.factory.updateCallExpression(callExp, callExp.expression, callExp.typeArguments, args);
2042
2162
  }
2043
- function updateDefineConfigFnReturn(ts, fnBody, updates) {
2163
+ function updateDefineConfigFnReturn(ts2, fnBody, updates) {
2044
2164
  const statements = [];
2045
2165
  for (const s2 of fnBody.statements) {
2046
- if (ts.isReturnStatement(s2) && s2.expression && ts.isObjectLiteralExpression(s2.expression)) {
2166
+ if (ts2.isReturnStatement(s2) && s2.expression && ts2.isObjectLiteralExpression(s2.expression)) {
2047
2167
  statements.push(
2048
- ts.factory.updateReturnStatement(s2, updateVitConfigObj(ts, s2.expression, updates))
2168
+ ts2.factory.updateReturnStatement(s2, updateVitConfigObj(ts2, s2.expression, updates))
2049
2169
  );
2050
2170
  } else {
2051
2171
  statements.push(s2);
2052
2172
  }
2053
2173
  }
2054
- return ts.factory.updateBlock(fnBody, statements);
2174
+ return ts2.factory.updateBlock(fnBody, statements);
2055
2175
  }
2056
- function updateVitConfigObj(ts, obj, updates) {
2176
+ function updateVitConfigObj(ts2, obj, updates) {
2057
2177
  if (updates.viteConfig) {
2058
- obj = updateObjectLiteralExpression(ts, obj, updates.viteConfig);
2178
+ obj = updateObjectLiteralExpression(ts2, obj, updates.viteConfig);
2059
2179
  }
2060
2180
  if (updates.vitePlugins || updates.vitePluginsPrepend || updates.qwikViteConfig) {
2061
- obj = updatePlugins(ts, obj, updates);
2181
+ obj = updatePlugins(ts2, obj, updates);
2062
2182
  }
2063
2183
  return obj;
2064
2184
  }
2065
- function updatePlugins(ts, obj, updates) {
2185
+ function updatePlugins(ts2, obj, updates) {
2066
2186
  const properties = [];
2067
2187
  for (const p of obj.properties) {
2068
- if (ts.isPropertyAssignment(p)) {
2069
- if (p.name && ts.isIdentifier(p.name) && p.name.text === "plugins") {
2070
- if (ts.isArrayLiteralExpression(p.initializer)) {
2188
+ if (ts2.isPropertyAssignment(p)) {
2189
+ if (p.name && ts2.isIdentifier(p.name) && p.name.text === "plugins") {
2190
+ if (ts2.isArrayLiteralExpression(p.initializer)) {
2071
2191
  properties.push(
2072
- ts.factory.updatePropertyAssignment(
2192
+ ts2.factory.updatePropertyAssignment(
2073
2193
  p,
2074
2194
  p.name,
2075
- updatePluginsArray(ts, p.initializer, updates)
2195
+ updatePluginsArray(ts2, p.initializer, updates)
2076
2196
  )
2077
2197
  );
2078
2198
  continue;
@@ -2081,17 +2201,17 @@ function updatePlugins(ts, obj, updates) {
2081
2201
  }
2082
2202
  properties.push(p);
2083
2203
  }
2084
- return ts.factory.updateObjectLiteralExpression(obj, properties);
2204
+ return ts2.factory.updateObjectLiteralExpression(obj, properties);
2085
2205
  }
2086
- function updatePluginsArray(ts, arr, updates) {
2206
+ function updatePluginsArray(ts2, arr, updates) {
2087
2207
  var _a, _b;
2088
2208
  const elms = [...arr.elements];
2089
2209
  if (updates.vitePlugins) {
2090
2210
  for (const vitePlugin of updates.vitePlugins) {
2091
- const pluginExp = createPluginCall(ts, vitePlugin);
2211
+ const pluginExp = createPluginCall(ts2, vitePlugin);
2092
2212
  const pluginName = (_a = pluginExp == null ? void 0 : pluginExp.expression) == null ? void 0 : _a.escapedText;
2093
2213
  const alreadyDefined = elms.some(
2094
- (el) => ts.isCallExpression(el) && ts.isIdentifier(el.expression) && el.expression.escapedText === pluginName
2214
+ (el) => ts2.isCallExpression(el) && ts2.isIdentifier(el.expression) && el.expression.escapedText === pluginName
2095
2215
  );
2096
2216
  if (pluginExp && !alreadyDefined) {
2097
2217
  elms.push(pluginExp);
@@ -2100,10 +2220,10 @@ function updatePluginsArray(ts, arr, updates) {
2100
2220
  }
2101
2221
  if (updates.vitePluginsPrepend) {
2102
2222
  for (const vitePlugin of updates.vitePluginsPrepend) {
2103
- const pluginExp = createPluginCall(ts, vitePlugin);
2223
+ const pluginExp = createPluginCall(ts2, vitePlugin);
2104
2224
  const pluginName = (_b = pluginExp == null ? void 0 : pluginExp.expression) == null ? void 0 : _b.escapedText;
2105
2225
  const alreadyDefined = elms.some(
2106
- (el) => ts.isCallExpression(el) && ts.isIdentifier(el.expression) && el.expression.escapedText === pluginName
2226
+ (el) => ts2.isCallExpression(el) && ts2.isIdentifier(el.expression) && el.expression.escapedText === pluginName
2107
2227
  );
2108
2228
  if (pluginExp && !alreadyDefined) {
2109
2229
  elms.unshift(pluginExp);
@@ -2113,68 +2233,68 @@ function updatePluginsArray(ts, arr, updates) {
2113
2233
  if (updates.qwikViteConfig) {
2114
2234
  for (let i = 0; i < elms.length; i++) {
2115
2235
  const elm = elms[i];
2116
- if (ts.isCallExpression(elm) && ts.isIdentifier(elm.expression)) {
2236
+ if (ts2.isCallExpression(elm) && ts2.isIdentifier(elm.expression)) {
2117
2237
  if (elm.expression.escapedText === "qwikVite") {
2118
- elms[i] = updateQwikRouterPlugin(ts, elm, updates.qwikViteConfig);
2238
+ elms[i] = updateQwikRouterPlugin(ts2, elm, updates.qwikViteConfig);
2119
2239
  }
2120
2240
  }
2121
2241
  }
2122
2242
  }
2123
- return ts.factory.updateArrayLiteralExpression(arr, elms);
2243
+ return ts2.factory.updateArrayLiteralExpression(arr, elms);
2124
2244
  }
2125
- function createPluginCall(ts, vitePlugin) {
2245
+ function createPluginCall(ts2, vitePlugin) {
2126
2246
  if (typeof vitePlugin === "string") {
2127
- const tmp = ts.createSourceFile(
2247
+ const tmp = ts2.createSourceFile(
2128
2248
  "tmp.ts",
2129
2249
  "export default " + vitePlugin,
2130
- ts.ScriptTarget.Latest
2250
+ ts2.ScriptTarget.Latest
2131
2251
  );
2132
2252
  for (const s2 of tmp.statements) {
2133
- if (ts.isExportAssignment(s2)) {
2253
+ if (ts2.isExportAssignment(s2)) {
2134
2254
  return s2.expression;
2135
2255
  }
2136
2256
  }
2137
2257
  }
2138
2258
  return null;
2139
2259
  }
2140
- function updateQwikRouterPlugin(ts, callExp, qwikViteConfig) {
2260
+ function updateQwikRouterPlugin(ts2, callExp, qwikViteConfig) {
2141
2261
  const args = callExp.arguments.slice();
2142
- const config = args[0] && ts.isObjectLiteralExpression(args[0]) ? args[0] : ts.factory.createObjectLiteralExpression();
2143
- args[0] = updateObjectLiteralExpression(ts, config, qwikViteConfig);
2144
- return ts.factory.updateCallExpression(callExp, callExp.expression, callExp.typeArguments, args);
2262
+ const config = args[0] && ts2.isObjectLiteralExpression(args[0]) ? args[0] : ts2.factory.createObjectLiteralExpression();
2263
+ args[0] = updateObjectLiteralExpression(ts2, config, qwikViteConfig);
2264
+ return ts2.factory.updateCallExpression(callExp, callExp.expression, callExp.typeArguments, args);
2145
2265
  }
2146
- function updateObjectLiteralExpression(ts, obj, updateObj) {
2266
+ function updateObjectLiteralExpression(ts2, obj, updateObj) {
2147
2267
  for (const [propName, value] of Object.entries(updateObj)) {
2148
2268
  if (typeof value === "string") {
2149
- const tmp = ts.createSourceFile("tmp.ts", "export default " + value, ts.ScriptTarget.Latest);
2269
+ const tmp = ts2.createSourceFile("tmp.ts", "export default " + value, ts2.ScriptTarget.Latest);
2150
2270
  for (const s2 of tmp.statements) {
2151
- if (ts.isExportAssignment(s2)) {
2271
+ if (ts2.isExportAssignment(s2)) {
2152
2272
  const exp = s2.expression;
2153
2273
  let added = false;
2154
2274
  const properties = [];
2155
2275
  for (const p of obj.properties) {
2156
- if (p.name && ts.isIdentifier(p.name) && p.name.text === propName) {
2157
- properties.push(ts.factory.createPropertyAssignment(propName, exp));
2276
+ if (p.name && ts2.isIdentifier(p.name) && p.name.text === propName) {
2277
+ properties.push(ts2.factory.createPropertyAssignment(propName, exp));
2158
2278
  added = true;
2159
2279
  } else {
2160
2280
  properties.push(p);
2161
2281
  }
2162
2282
  }
2163
2283
  if (!added) {
2164
- properties.unshift(ts.factory.createPropertyAssignment(propName, exp));
2284
+ properties.unshift(ts2.factory.createPropertyAssignment(propName, exp));
2165
2285
  }
2166
- obj = ts.factory.updateObjectLiteralExpression(obj, properties);
2286
+ obj = ts2.factory.updateObjectLiteralExpression(obj, properties);
2167
2287
  }
2168
2288
  }
2169
2289
  }
2170
2290
  }
2171
2291
  return obj;
2172
2292
  }
2173
- function transformSource(ts, sourceText, transformer) {
2174
- const t = ts.transform(ts.createSourceFile("/tmp.ts", sourceText, ts.ScriptTarget.Latest), [
2293
+ function transformSource(ts2, sourceText, transformer) {
2294
+ const t = ts2.transform(ts2.createSourceFile("/tmp.ts", sourceText, ts2.ScriptTarget.Latest), [
2175
2295
  transformer
2176
2296
  ]);
2177
- const p = ts.createPrinter({
2297
+ const p = ts2.createPrinter({
2178
2298
  removeComments: false,
2179
2299
  omitTrailingSemicolon: false,
2180
2300
  noEmitHelpers: true
@@ -2196,8 +2316,8 @@ async function updateViteConfigs(fileUpdates, integration, rootDir) {
2196
2316
  throw new Error(`Could not find vite.config.ts or vite.config.mts in ${rootDir}`);
2197
2317
  }
2198
2318
  const destContent = await import_fs.default.promises.readFile(viteConfigPath, "utf-8");
2199
- const ts = (await import("typescript")).default;
2200
- let updatedContent = updateViteConfig(ts, destContent, viteConfig);
2319
+ const ts2 = (await import("typescript")).default;
2320
+ let updatedContent = updateViteConfig(ts2, destContent, viteConfig);
2201
2321
  if (updatedContent) {
2202
2322
  try {
2203
2323
  const prettier = (await import("prettier")).default;
@@ -2244,7 +2364,13 @@ async function updateApp(pkgManager, opts) {
2244
2364
  ...integration.pkgJson.devDependencies
2245
2365
  };
2246
2366
  }
2247
- await mergeIntegrationDir(fileUpdates, opts, integration.dir, opts.rootDir);
2367
+ await mergeIntegrationDir(
2368
+ fileUpdates,
2369
+ opts,
2370
+ integration.dir,
2371
+ opts.rootDir,
2372
+ integration.alwaysInRoot
2373
+ );
2248
2374
  if (true) {
2249
2375
  await updateViteConfigs(fileUpdates, integration, opts.rootDir);
2250
2376
  }
@@ -2303,7 +2429,6 @@ async function runAddInteractive(app, id) {
2303
2429
  const pkgManager = getPackageManager();
2304
2430
  const integrations2 = await loadIntegrations();
2305
2431
  let integration;
2306
- printHeader();
2307
2432
  if (typeof id === "string") {
2308
2433
  integration = integrations2.find((i) => i.id === id);
2309
2434
  if (!integration) {
@@ -2332,15 +2457,20 @@ async function runAddInteractive(app, id) {
2332
2457
  ...integration.pkgJson.dependencies,
2333
2458
  ...integration.pkgJson.devDependencies
2334
2459
  }).length > 0;
2335
- let runInstall = false;
2460
+ let runInstall2 = false;
2336
2461
  if (integrationHasDeps) {
2337
- runInstall = true;
2462
+ runInstall2 = true;
2338
2463
  }
2339
- const result = await updateApp(pkgManager, {
2464
+ const updateAppOptions = {
2340
2465
  rootDir: app.rootDir,
2341
2466
  integration: integration.id,
2342
- installDeps: runInstall
2343
- });
2467
+ installDeps: runInstall2
2468
+ };
2469
+ const projectDir = app.getArg("projectDir");
2470
+ if (projectDir) {
2471
+ updateAppOptions.projectDir = projectDir;
2472
+ }
2473
+ const result = await updateApp(pkgManager, updateAppOptions);
2344
2474
  if (app.getArg("skipConfirmation") !== "true") {
2345
2475
  await logUpdateAppResult(pkgManager, result);
2346
2476
  }
@@ -2436,6 +2566,7 @@ function logUpdateAppCommitResult(result, pkgManager) {
2436
2566
  }
2437
2567
 
2438
2568
  // packages/qwik/src/cli/add/print-add-help.ts
2569
+ init_dist2();
2439
2570
  var SPACE_TO_HINT = 25;
2440
2571
  var MAX_HINT_LENGTH = 50;
2441
2572
  function renderIntegration(integrations2) {
@@ -2488,6 +2619,7 @@ async function runAddCommand(app) {
2488
2619
  // packages/qwik/src/cli/new/run-new-command.ts
2489
2620
  var import_node_fs7 = __toESM(require("node:fs"), 1);
2490
2621
  var import_path2 = require("path");
2622
+ init_dist2();
2491
2623
 
2492
2624
  // packages/qwik/src/cli/utils/templates.ts
2493
2625
  var import_node_fs6 = __toESM(require("node:fs"), 1);
@@ -4751,6 +4883,486 @@ function isString(s2) {
4751
4883
  return typeof s2 === "string" && s2.trim().length > 0;
4752
4884
  }
4753
4885
 
4886
+ // packages/qwik/src/cli/run.ts
4887
+ init_dist2();
4888
+
4889
+ // packages/qwik/src/cli/migrate-v2/run-migration.ts
4890
+ init_dist2();
4891
+
4892
+ // packages/qwik/src/cli/migrate-v2/replace-package.ts
4893
+ var import_path5 = require("path");
4894
+
4895
+ // packages/qwik/src/cli/migrate-v2/tools/binary-extensions.ts
4896
+ var import_path3 = require("path");
4897
+ var binaryExtensions = /* @__PURE__ */ new Set([
4898
+ // types originally from https://github.com/sindresorhus/binary-extensions/blob/40e44b510d87a63dcf42300bc8fbcb105f45a61c/binary-extensions.json
4899
+ ".3dm",
4900
+ ".3ds",
4901
+ ".3g2",
4902
+ ".3gp",
4903
+ ".7z",
4904
+ ".a",
4905
+ ".aac",
4906
+ ".adp",
4907
+ ".ai",
4908
+ ".aif",
4909
+ ".aiff",
4910
+ ".als",
4911
+ ".alz",
4912
+ ".ape",
4913
+ ".apk",
4914
+ ".appimage",
4915
+ ".ar",
4916
+ ".arj",
4917
+ ".asf",
4918
+ ".au",
4919
+ ".avi",
4920
+ ".bak",
4921
+ ".baml",
4922
+ ".bh",
4923
+ ".bin",
4924
+ ".bk",
4925
+ ".bmp",
4926
+ ".btif",
4927
+ ".bz2",
4928
+ ".bzip2",
4929
+ ".cab",
4930
+ ".caf",
4931
+ ".cgm",
4932
+ ".class",
4933
+ ".cmx",
4934
+ ".cpio",
4935
+ ".cr2",
4936
+ ".cur",
4937
+ ".dat",
4938
+ ".dcm",
4939
+ ".deb",
4940
+ ".dex",
4941
+ ".djvu",
4942
+ ".dll",
4943
+ ".dmg",
4944
+ ".dng",
4945
+ ".doc",
4946
+ ".docm",
4947
+ ".docx",
4948
+ ".dot",
4949
+ ".dotm",
4950
+ ".dra",
4951
+ ".DS_Store",
4952
+ ".dsk",
4953
+ ".dts",
4954
+ ".dtshd",
4955
+ ".dvb",
4956
+ ".dwg",
4957
+ ".dxf",
4958
+ ".ecelp4800",
4959
+ ".ecelp7470",
4960
+ ".ecelp9600",
4961
+ ".egg",
4962
+ ".eol",
4963
+ ".eot",
4964
+ ".epub",
4965
+ ".exe",
4966
+ ".f4v",
4967
+ ".fbs",
4968
+ ".fh",
4969
+ ".fla",
4970
+ ".flac",
4971
+ ".flatpak",
4972
+ ".fli",
4973
+ ".flv",
4974
+ ".fpx",
4975
+ ".fst",
4976
+ ".fvt",
4977
+ ".g3",
4978
+ ".gh",
4979
+ ".gif",
4980
+ ".glb",
4981
+ ".graffle",
4982
+ ".gz",
4983
+ ".gzip",
4984
+ ".h261",
4985
+ ".h263",
4986
+ ".h264",
4987
+ ".icns",
4988
+ ".ico",
4989
+ ".ief",
4990
+ ".img",
4991
+ ".ipa",
4992
+ ".iso",
4993
+ ".jar",
4994
+ ".jpeg",
4995
+ ".jpg",
4996
+ ".jpgv",
4997
+ ".jpm",
4998
+ ".jxr",
4999
+ ".key",
5000
+ ".keystore",
5001
+ ".ktx",
5002
+ ".lha",
5003
+ ".lib",
5004
+ ".lvp",
5005
+ ".lz",
5006
+ ".lzh",
5007
+ ".lzma",
5008
+ ".lzo",
5009
+ ".m3u",
5010
+ ".m4a",
5011
+ ".m4v",
5012
+ ".mar",
5013
+ ".mdi",
5014
+ ".mht",
5015
+ ".mid",
5016
+ ".midi",
5017
+ ".mj2",
5018
+ ".mka",
5019
+ ".mkv",
5020
+ ".mmr",
5021
+ ".mng",
5022
+ ".mobi",
5023
+ ".mov",
5024
+ ".movie",
5025
+ ".mp3",
5026
+ ".mp4",
5027
+ ".mp4a",
5028
+ ".mpeg",
5029
+ ".mpg",
5030
+ ".mpga",
5031
+ ".msi",
5032
+ ".mxu",
5033
+ ".nef",
5034
+ ".npx",
5035
+ ".npy",
5036
+ ".numbers",
5037
+ ".nupkg",
5038
+ ".o",
5039
+ ".odp",
5040
+ ".ods",
5041
+ ".odt",
5042
+ ".oga",
5043
+ ".ogg",
5044
+ ".ogv",
5045
+ ".otf",
5046
+ ".ott",
5047
+ ".pages",
5048
+ ".pbm",
5049
+ ".pbf",
5050
+ ".pcx",
5051
+ ".pdb",
5052
+ ".pdf",
5053
+ ".pea",
5054
+ ".pgm",
5055
+ ".pic",
5056
+ ".pkg",
5057
+ ".plist",
5058
+ ".png",
5059
+ ".pnm",
5060
+ ".pot",
5061
+ ".potm",
5062
+ ".potx",
5063
+ ".ppa",
5064
+ ".ppam",
5065
+ ".ppm",
5066
+ ".pps",
5067
+ ".ppsm",
5068
+ ".ppsx",
5069
+ ".ppt",
5070
+ ".pptm",
5071
+ ".pptx",
5072
+ ".psd",
5073
+ ".pxd",
5074
+ ".pxz",
5075
+ ".pya",
5076
+ ".pyc",
5077
+ ".pyo",
5078
+ ".pyv",
5079
+ ".qt",
5080
+ ".rar",
5081
+ ".ras",
5082
+ ".raw",
5083
+ ".resources",
5084
+ ".rgb",
5085
+ ".rip",
5086
+ ".rlc",
5087
+ ".rmf",
5088
+ ".rmvb",
5089
+ ".rpm",
5090
+ ".rtf",
5091
+ ".rz",
5092
+ ".s3m",
5093
+ ".s7z",
5094
+ ".scpt",
5095
+ ".sgi",
5096
+ ".shar",
5097
+ ".snap",
5098
+ ".sil",
5099
+ ".sketch",
5100
+ ".slk",
5101
+ ".smv",
5102
+ ".snk",
5103
+ ".so",
5104
+ ".stl",
5105
+ ".suo",
5106
+ ".sub",
5107
+ ".swf",
5108
+ ".tar",
5109
+ ".tbz",
5110
+ ".tbz2",
5111
+ ".tga",
5112
+ ".tgz",
5113
+ ".thmx",
5114
+ ".tif",
5115
+ ".tiff",
5116
+ ".tlz",
5117
+ ".ttc",
5118
+ ".ttf",
5119
+ ".txz",
5120
+ ".udf",
5121
+ ".uvh",
5122
+ ".uvi",
5123
+ ".uvm",
5124
+ ".uvp",
5125
+ ".uvs",
5126
+ ".uvu",
5127
+ ".viv",
5128
+ ".vob",
5129
+ ".war",
5130
+ ".wav",
5131
+ ".wax",
5132
+ ".wbmp",
5133
+ ".wdp",
5134
+ ".weba",
5135
+ ".webm",
5136
+ ".webp",
5137
+ ".whl",
5138
+ ".wim",
5139
+ ".wm",
5140
+ ".wma",
5141
+ ".wmv",
5142
+ ".wmx",
5143
+ ".woff",
5144
+ ".woff2",
5145
+ ".wrm",
5146
+ ".wvx",
5147
+ ".xbm",
5148
+ ".xif",
5149
+ ".xla",
5150
+ ".xlam",
5151
+ ".xls",
5152
+ ".xlsb",
5153
+ ".xlsm",
5154
+ ".xlsx",
5155
+ ".xlt",
5156
+ ".xltm",
5157
+ ".xltx",
5158
+ ".xm",
5159
+ ".xmind",
5160
+ ".xpi",
5161
+ ".xpm",
5162
+ ".xwd",
5163
+ ".xz",
5164
+ ".z",
5165
+ ".zip",
5166
+ ".zipx"
5167
+ ]);
5168
+ function isBinaryPath(path3) {
5169
+ return binaryExtensions.has((0, import_path3.extname)(path3).toLowerCase());
5170
+ }
5171
+
5172
+ // packages/qwik/src/cli/migrate-v2/replace-package.ts
5173
+ init_visit_not_ignored_files();
5174
+ var import_fs3 = require("fs");
5175
+ init_dist2();
5176
+ function updateFileContent(path3, content) {
5177
+ (0, import_fs3.writeFileSync)(path3, content);
5178
+ f2.info(`"${path3}" has been updated`);
5179
+ }
5180
+ function replacePackage(oldPackageName, newPackageName) {
5181
+ replacePackageInDependencies(oldPackageName, newPackageName);
5182
+ replaceMentions(oldPackageName, newPackageName);
5183
+ }
5184
+ function replacePackageInDependencies(oldPackageName, newPackageName) {
5185
+ visitNotIgnoredFiles(".", (path3) => {
5186
+ if ((0, import_path5.basename)(path3) !== "package.json") {
5187
+ return;
5188
+ }
5189
+ try {
5190
+ const packageJson = JSON.parse((0, import_fs3.readFileSync)(path3, "utf-8"));
5191
+ for (const deps of [
5192
+ packageJson.dependencies ?? {},
5193
+ packageJson.devDependencies ?? {},
5194
+ packageJson.peerDependencies ?? {},
5195
+ packageJson.optionalDependencies ?? {}
5196
+ ]) {
5197
+ if (oldPackageName in deps) {
5198
+ deps[newPackageName] = deps[oldPackageName];
5199
+ delete deps[oldPackageName];
5200
+ }
5201
+ }
5202
+ updateFileContent(path3, JSON.stringify(packageJson, null, 2));
5203
+ } catch (e2) {
5204
+ console.warn(`Could not replace ${oldPackageName} with ${newPackageName} in ${path3}.`);
5205
+ }
5206
+ });
5207
+ }
5208
+ function replaceMentions(oldPackageName, newPackageName) {
5209
+ visitNotIgnoredFiles(".", (path3) => {
5210
+ if (isBinaryPath(path3)) {
5211
+ return;
5212
+ }
5213
+ const ignoredFiles = [
5214
+ "yarn.lock",
5215
+ "package-lock.json",
5216
+ "pnpm-lock.yaml",
5217
+ "bun.lockb",
5218
+ "CHANGELOG.md"
5219
+ ];
5220
+ if (ignoredFiles.includes((0, import_path5.basename)(path3))) {
5221
+ return;
5222
+ }
5223
+ try {
5224
+ const contents = (0, import_fs3.readFileSync)(path3, "utf-8");
5225
+ if (!contents.includes(oldPackageName)) {
5226
+ return;
5227
+ }
5228
+ updateFileContent(path3, contents.replace(new RegExp(oldPackageName, "g"), newPackageName));
5229
+ } catch {
5230
+ f2.warn(
5231
+ `An error was thrown when trying to update ${path3}. If you believe the migration should have updated it, be sure to review the file and open an issue.`
5232
+ );
5233
+ }
5234
+ });
5235
+ }
5236
+
5237
+ // packages/qwik/src/cli/migrate-v2/update-dependencies.ts
5238
+ var import_node_child_process4 = require("node:child_process");
5239
+
5240
+ // packages/qwik/src/cli/migrate-v2/versions.ts
5241
+ var versionTagPriority = ["latest", "v2", "rc", "beta", "alpha"];
5242
+ var packageNames = [
5243
+ "@qwik.dev/core",
5244
+ "@qwik.dev/router",
5245
+ "@qwik.dev/react",
5246
+ "eslint-plugin-qwik"
5247
+ ];
5248
+
5249
+ // packages/qwik/src/cli/migrate-v2/update-dependencies.ts
5250
+ var import_semver = require("semver");
5251
+ init_dist2();
5252
+ async function updateDependencies() {
5253
+ const packageJson = await readPackageJson(process.cwd());
5254
+ const devDependencies = packageJson.devDependencies ??= {};
5255
+ const dependencies = packageJson.dependencies ??= {};
5256
+ const version = getPackageTag();
5257
+ for (const name of packageNames) {
5258
+ if (dependencies[name] || devDependencies[name]) {
5259
+ delete dependencies[name];
5260
+ devDependencies[name] = version;
5261
+ }
5262
+ }
5263
+ await writePackageJson(process.cwd(), packageJson);
5264
+ const loading = de();
5265
+ loading.start(`Updating dependencies...`);
5266
+ await runInstall();
5267
+ loading.stop("Dependencies have been updated");
5268
+ }
5269
+ function getPackageTag() {
5270
+ var _a;
5271
+ const tags = (_a = (0, import_node_child_process4.execSync)("npm dist-tag @qwik.dev/core", {
5272
+ encoding: "utf-8"
5273
+ })) == null ? void 0 : _a.split("\n").filter(Boolean).map(
5274
+ (data) => data.split(":").map((v2) => v2 == null ? void 0 : v2.trim()).filter(Boolean)
5275
+ ).filter((v2) => v2.length === 2).sort((a3, b3) => {
5276
+ let aIndex = versionTagPriority.indexOf(a3[0]);
5277
+ let bIndex = versionTagPriority.indexOf(b3[0]);
5278
+ if (aIndex === -1) {
5279
+ aIndex = Infinity;
5280
+ } else if (bIndex === -1) {
5281
+ bIndex = Infinity;
5282
+ }
5283
+ return aIndex - bIndex;
5284
+ });
5285
+ for (const [, version] of tags) {
5286
+ if ((0, import_semver.major)(version) === 2) {
5287
+ return version;
5288
+ }
5289
+ }
5290
+ f2.warn('Failed to resolve the Qwik version tag, version "2.0.0" will be installed');
5291
+ return "2.0.0";
5292
+ }
5293
+ async function installTsMorph() {
5294
+ var _a, _b;
5295
+ const packageJson = await readPackageJson(process.cwd());
5296
+ if (((_a = packageJson.dependencies) == null ? void 0 : _a["ts-morph"]) || ((_b = packageJson.devDependencies) == null ? void 0 : _b["ts-morph"])) {
5297
+ return false;
5298
+ }
5299
+ const loading = de();
5300
+ loading.start("Fetching migration tools..");
5301
+ (packageJson.devDependencies ??= {})["ts-morph"] = "latest";
5302
+ await writePackageJson(process.cwd(), packageJson);
5303
+ await runInstall();
5304
+ loading.stop("Migration tools have been loaded");
5305
+ return true;
5306
+ }
5307
+ async function runInstall() {
5308
+ const { install } = installDeps(getPackageManager(), process.cwd());
5309
+ const passed = await install;
5310
+ if (!passed) {
5311
+ throw new Error("Failed to install dependencies");
5312
+ }
5313
+ }
5314
+ async function removeTsMorphFromPackageJson() {
5315
+ var _a, _b;
5316
+ const packageJson = await readPackageJson(process.cwd());
5317
+ (_a = packageJson.dependencies) == null ? true : delete _a["ts-morph"];
5318
+ (_b = packageJson.devDependencies) == null ? true : delete _b["ts-morph"];
5319
+ }
5320
+
5321
+ // packages/qwik/src/cli/migrate-v2/run-migration.ts
5322
+ async function runV2Migration(app) {
5323
+ oe(
5324
+ `\u2728 ${bgMagenta(" This command will migrate your Qwik application from v1 to v2")}
5325
+ This includes the following:
5326
+ - "@builder.io/qwik", "@builder.io/qwik-city" and "@builder.io/qwik-react" packages will be rescoped to "@qwik.dev/core", "@qwik.dev/router" and "@qwik.dev/react" respectively
5327
+ - related dependencies will be updated
5328
+
5329
+ ${bold(bgRed('Warning: migration tool is experimental and will migrate your application to the "alpha" release of Qwik V2'))}`
5330
+ );
5331
+ const proceed = await se({
5332
+ message: "Do you want to proceed?",
5333
+ initialValue: true
5334
+ });
5335
+ if (hD(proceed) || !proceed) {
5336
+ bye();
5337
+ }
5338
+ try {
5339
+ const installedTsMorph = await installTsMorph();
5340
+ const { replaceImportInFiles: replaceImportInFiles2 } = await Promise.resolve().then(() => (init_rename_import(), rename_import_exports));
5341
+ replaceImportInFiles2(
5342
+ [
5343
+ ["QwikCityProvider", "QwikRouterProvider"],
5344
+ ["qwikCity", "qwikRouter"],
5345
+ ["QwikCityVitePluginOptions", "QwikRouterVitePluginOptions"],
5346
+ ["QwikCityPlugin", "QwikRouterPlugin"],
5347
+ ["createQwikCity", "createQwikRouter"],
5348
+ ["QwikCityNodeRequestOptions", "QwikRouterNodeRequestOptions"]
5349
+ ],
5350
+ "@builder.io/qwik-city"
5351
+ );
5352
+ replacePackage("@builder.io/qwik-city", "@qwik.dev/router");
5353
+ replacePackage("@builder.io/qwik-react", "@qwik.dev/react");
5354
+ replacePackage("@builder.io/qwik", "@qwik.dev/core");
5355
+ if (installedTsMorph) {
5356
+ await removeTsMorphFromPackageJson();
5357
+ }
5358
+ await updateDependencies();
5359
+ f2.success(`${green(`Your application has been successfully migrated to v2!`)}`);
5360
+ } catch (error) {
5361
+ console.error(error);
5362
+ throw error;
5363
+ }
5364
+ }
5365
+
4754
5366
  // packages/qwik/src/cli/run.ts
4755
5367
  var SPACE_TO_HINT2 = 18;
4756
5368
  var COMMANDS = [
@@ -4789,6 +5401,13 @@ var COMMANDS = [
4789
5401
  run: () => runJokeCommand(),
4790
5402
  showInHelp: true
4791
5403
  },
5404
+ {
5405
+ value: "migrate-v2",
5406
+ label: "migrate-v2",
5407
+ hint: "Rescopes the application from @builder.io/* namespace to @qwik.dev/*",
5408
+ run: (app) => runV2Migration(app),
5409
+ showInHelp: false
5410
+ },
4792
5411
  {
4793
5412
  value: "help",
4794
5413
  label: "help",
@@ -4839,6 +5458,10 @@ async function runCommand2(app) {
4839
5458
  await runJokeCommand();
4840
5459
  return;
4841
5460
  }
5461
+ case "migrate-v2": {
5462
+ await runV2Migration(app);
5463
+ return;
5464
+ }
4842
5465
  case "version": {
4843
5466
  printVersion();
4844
5467
  return;
@@ -4881,7 +5504,7 @@ async function printHelp(app) {
4881
5504
  await runCommand2(Object.assign(app, { task: args[0], args }));
4882
5505
  }
4883
5506
  function printVersion() {
4884
- console.log("2.0.0-alpha.0-dev+dd93926");
5507
+ console.log("2.0.0-alpha.2-dev+58b6f8d");
4885
5508
  }
4886
5509
  // Annotate the CommonJS export names for ESM import in node:
4887
5510
  0 && (module.exports = {