diffing 0.1.2 → 0.2.0
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.
- package/README.md +75 -3
- package/dist/cli-agent-Vbs-ePHv.mjs +443 -0
- package/dist/cli.mjs +422 -10
- package/dist/client/assets/{angular-html-BABKYppC.js → angular-html-fdYbuxHF.js} +1 -1
- package/dist/client/assets/{angular-ts-CtXLuOQb.js → angular-ts-D3iFqR-R.js} +1 -1
- package/dist/client/assets/{apl-DOi69evI.js → apl-MnBV-iQN.js} +1 -1
- package/dist/client/assets/{astro-J8Em2tfW.js → astro-BrpK01E7.js} +1 -1
- package/dist/client/assets/{blade-B_tOnqRD.js → blade-CGmyBuwD.js} +1 -1
- package/dist/client/assets/{c-C0tRZWSi.js → c-xQnwtG9Y.js} +1 -1
- package/dist/client/assets/{cobol-Dj_rkgIY.js → cobol-ypVzOIQu.js} +1 -1
- package/dist/client/assets/{coffee-C6Vq4BFF.js → coffee-CrtE1uj2.js} +1 -1
- package/dist/client/assets/{cpp-Cno48fgF.js → cpp-DLd4XEKA.js} +1 -1
- package/dist/client/assets/{crystal-C7tmDnU1.js → crystal-CJYvpLt_.js} +1 -1
- package/dist/client/assets/{css-0v4o-iNQ.js → css-DrX2B9os.js} +1 -1
- package/dist/client/assets/{edge-CvULxRem.js → edge-BsQYk9OW.js} +1 -1
- package/dist/client/assets/{elixir-vRTauEw-.js → elixir-DU_VfGYR.js} +1 -1
- package/dist/client/assets/{elm-fLFTu1xn.js → elm-W4eOLEDv.js} +1 -1
- package/dist/client/assets/{erb-CtItcikB.js → erb-D9FdIJ2e.js} +1 -1
- package/dist/client/assets/{git-rebase-5MeRBXZD.js → git-rebase-BtPCXjbS.js} +1 -1
- package/dist/client/assets/{glimmer-js-B7yA-u8_.js → glimmer-js-BVfUGMUb.js} +1 -1
- package/dist/client/assets/{glimmer-ts-B2g1OaHc.js → glimmer-ts-BZEaHDZL.js} +1 -1
- package/dist/client/assets/{glsl-CqNPWp5Y.js → glsl-CSiNDuwt.js} +1 -1
- package/dist/client/assets/{graphql-CF78KbfF.js → graphql-Crf08Rhb.js} +1 -1
- package/dist/client/assets/{hack-Dz8fQ8O9.js → hack-DUiQuO20.js} +1 -1
- package/dist/client/assets/{haml-3Gbl257r.js → haml-BtvVTDRG.js} +1 -1
- package/dist/client/assets/{handlebars-5UZnh5L7.js → handlebars-Bu_cdZA_.js} +1 -1
- package/dist/client/assets/{html-JOaQiIkL.js → html-C4cun3zD.js} +1 -1
- package/dist/client/assets/{html-derivative-GyX6oYy3.js → html-derivative-CQnD80KV.js} +1 -1
- package/dist/client/assets/{http-t6uVAxgS.js → http-DuOJF9Kg.js} +1 -1
- package/dist/client/assets/{hurl-OLQZpg0E.js → hurl-DgrdYsYh.js} +1 -1
- package/dist/client/assets/{index-CghVgrAF.js → index-CZZd7iTh.js} +99 -68
- package/dist/client/assets/index-CkC-EvWo.css +1 -0
- package/dist/client/assets/{java-BqL_yaya.js → java-D-vtFiv8.js} +1 -1
- package/dist/client/assets/{javascript-CxBNAxR5.js → javascript-CFYFXvdN.js} +1 -1
- package/dist/client/assets/{jinja-CuaK033Z.js → jinja-fZvIg2_s.js} +1 -1
- package/dist/client/assets/{jison-aL_w2vvo.js → jison-DEzxLq5g.js} +1 -1
- package/dist/client/assets/{json-Byruj-EC.js → json-QM4VBqMC.js} +1 -1
- package/dist/client/assets/{jsx-CosY06uG.js → jsx-DLzUM_cC.js} +1 -1
- package/dist/client/assets/{julia-u1y7fV63.js → julia-Dwt1SIpn.js} +1 -1
- package/dist/client/assets/{just-DS4T9P_K.js → just-Dwp-hLcL.js} +1 -1
- package/dist/client/assets/{latex-C9c2IWW4.js → latex-CMF1JViz.js} +1 -1
- package/dist/client/assets/{liquid-DcXQgkEV.js → liquid-czkpOZWY.js} +1 -1
- package/dist/client/assets/{lua-DWe0hUn1.js → lua-DE5PD0Vh.js} +1 -1
- package/dist/client/assets/{marko-CIW7o2up.js → marko-DHeEvZiW.js} +1 -1
- package/dist/client/assets/{mdc-DKjGzb4k.js → mdc-B941liUQ.js} +1 -1
- package/dist/client/assets/{nginx-CBXzDlkk.js → nginx-Pb9t8c-r.js} +1 -1
- package/dist/client/assets/{nim-CBf_vdee.js → nim-MMUvW_R1.js} +1 -1
- package/dist/client/assets/{perl-xC9qc39I.js → perl-DXwXRmuC.js} +1 -1
- package/dist/client/assets/{php-n4vnn5oz.js → php-D42kv59r.js} +1 -1
- package/dist/client/assets/{pug-Db536lA_.js → pug-v0iesski.js} +1 -1
- package/dist/client/assets/{qml-CrATLnNN.js → qml-spxQQ-ei.js} +1 -1
- package/dist/client/assets/{r-DBQ-dydl.js → r-CobWTBG9.js} +1 -1
- package/dist/client/assets/{razor-C_wvK1iP.js → razor-B-_Ww3MB.js} +1 -1
- package/dist/client/assets/{regexp-DowFj0Xd.js → regexp-BJMVs8R0.js} +1 -1
- package/dist/client/assets/{rst-rY4UPiwe.js → rst-BHcaWsY0.js} +1 -1
- package/dist/client/assets/{ruby-C4cISY4u.js → ruby-BCMT6kog.js} +1 -1
- package/dist/client/assets/{sas-ui1PNNkD.js → sas-DHfZnd3R.js} +1 -1
- package/dist/client/assets/{scss-BZrs95TC.js → scss-DjDsJvDO.js} +1 -1
- package/dist/client/assets/{shellscript-D9YVFS67.js → shellscript-B6qaIiU-.js} +1 -1
- package/dist/client/assets/{shellsession-DK7LMzYg.js → shellsession-ByCeir2b.js} +1 -1
- package/dist/client/assets/{soy-CNkc-Oji.js → soy-C6WpnMSF.js} +1 -1
- package/dist/client/assets/{sql-BvRdqBMa.js → sql-BIvSNLV_.js} +1 -1
- package/dist/client/assets/{stata-Bawjgtiz.js → stata-PG9iZ--I.js} +1 -1
- package/dist/client/assets/{surrealql-7v7lT5jp.js → surrealql-CmvCzG09.js} +1 -1
- package/dist/client/assets/{svelte-p7w_kluv.js → svelte-ChumG88s.js} +1 -1
- package/dist/client/assets/{templ-0Gi_yZZr.js → templ-CmzuRY_a.js} +1 -1
- package/dist/client/assets/{tex-nZ_J3lks.js → tex-DL8t-_eJ.js} +1 -1
- package/dist/client/assets/{ts-tags-CuG-Aj5j.js → ts-tags-BFfE0Egm.js} +1 -1
- package/dist/client/assets/{tsx-Cc7GNb_V.js → tsx-C1bFyHcE.js} +1 -1
- package/dist/client/assets/{twig-BBlmihVM.js → twig-DkIluZEQ.js} +1 -1
- package/dist/client/assets/{typescript-aiXwsZhm.js → typescript-Gc86Bc3j.js} +1 -1
- package/dist/client/assets/{vue-Cs5tk2kn.js → vue-C88JmL53.js} +1 -1
- package/dist/client/assets/{vue-html-BEI_B8Ml.js → vue-html-Cry4aksC.js} +1 -1
- package/dist/client/assets/{vue-vine-CpWdOkP4.js → vue-vine-zlDkA3Ui.js} +1 -1
- package/dist/client/assets/{xml-madLQSkS.js → xml-NvwpIFDy.js} +1 -1
- package/dist/client/assets/{xsl-CqZR37V9.js → xsl-CDjXvY9w.js} +1 -1
- package/dist/client/assets/{yaml-DHr9ndbK.js → yaml-Bh-LPjcH.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/mcp-DKlThflu.mjs +253 -0
- package/dist/server-lock-CAdqFSfl.mjs +691 -0
- package/package.json +1 -1
- package/dist/client/assets/index-CmfB2R-C.css +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as
|
|
2
|
+
import { C as revertHunk, S as listRepoFiles, _ as getRepoRoot, a as extractPlanLines, b as gitAddFile, c as formatComments, d as getFileContent, f as getGitDiffAsync, g as getRepoName, h as getProjectStorageDir, i as writeServerLock, l as getBranchName, m as getMergeStatus, o as formatPlanReview, p as getHunkHistory, r as removeServerLock, s as sectionTitleForLine, u as getCustomGitDiffAsync, v as getTabSizeForFiles, w as isSafePath, x as isGitRepo, y as getUntrackedFilePathsAsync } from "./server-lock-CAdqFSfl.mjs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { dirname, extname, join, resolve } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, watch, writeFileSync } from "node:fs";
|
|
@@ -1222,6 +1222,173 @@ var FileCommentStore = class {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
1224
|
//#endregion
|
|
1225
|
+
//#region src/lib/plans.ts
|
|
1226
|
+
function newId() {
|
|
1227
|
+
return crypto.randomUUID();
|
|
1228
|
+
}
|
|
1229
|
+
/** Shared mutation helpers so both stores behave identically. */
|
|
1230
|
+
function applyUpsert(plans, input, now) {
|
|
1231
|
+
if (input.id) {
|
|
1232
|
+
const existing = plans.find((p) => p.id === input.id);
|
|
1233
|
+
if (existing) {
|
|
1234
|
+
existing.title = input.title;
|
|
1235
|
+
existing.body = input.body;
|
|
1236
|
+
if (input.source !== void 0) existing.source = input.source;
|
|
1237
|
+
if (input.model !== void 0) existing.model = input.model;
|
|
1238
|
+
existing.version += 1;
|
|
1239
|
+
existing.updatedAt = now;
|
|
1240
|
+
existing.decision = "pending";
|
|
1241
|
+
existing.decisionComment = void 0;
|
|
1242
|
+
existing.decidedAt = void 0;
|
|
1243
|
+
return existing;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
const plan = {
|
|
1247
|
+
id: input.id || newId(),
|
|
1248
|
+
title: input.title,
|
|
1249
|
+
body: input.body,
|
|
1250
|
+
source: input.source,
|
|
1251
|
+
model: input.model,
|
|
1252
|
+
createdAt: now,
|
|
1253
|
+
updatedAt: now,
|
|
1254
|
+
version: 1,
|
|
1255
|
+
decision: "pending",
|
|
1256
|
+
comments: []
|
|
1257
|
+
};
|
|
1258
|
+
plans.push(plan);
|
|
1259
|
+
return plan;
|
|
1260
|
+
}
|
|
1261
|
+
var FilePlanStore = class {
|
|
1262
|
+
dirPath;
|
|
1263
|
+
filePath;
|
|
1264
|
+
constructor(customRepoRoot) {
|
|
1265
|
+
if (customRepoRoot) this.dirPath = join(customRepoRoot, ".diffing");
|
|
1266
|
+
else this.dirPath = getProjectStorageDir();
|
|
1267
|
+
this.filePath = join(this.dirPath, "plans.json");
|
|
1268
|
+
}
|
|
1269
|
+
async getAll() {
|
|
1270
|
+
try {
|
|
1271
|
+
const data = await readFile(this.filePath, "utf-8");
|
|
1272
|
+
return JSON.parse(data);
|
|
1273
|
+
} catch {
|
|
1274
|
+
return [];
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
async get(id) {
|
|
1278
|
+
return (await this.getAll()).find((p) => p.id === id) ?? null;
|
|
1279
|
+
}
|
|
1280
|
+
async save(plans) {
|
|
1281
|
+
try {
|
|
1282
|
+
await mkdir(this.dirPath, { recursive: true });
|
|
1283
|
+
try {
|
|
1284
|
+
const repoRoot = getRepoRoot();
|
|
1285
|
+
await writeFile(join(this.dirPath, "repo_path.txt"), repoRoot, "utf-8");
|
|
1286
|
+
} catch {}
|
|
1287
|
+
await writeFile(this.filePath, JSON.stringify(plans, null, 2), "utf-8");
|
|
1288
|
+
} catch (err) {
|
|
1289
|
+
console.error("Failed to save plans to file:", err);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
async upsert(input) {
|
|
1293
|
+
const plans = await this.getAll();
|
|
1294
|
+
const plan = applyUpsert(plans, input, Date.now());
|
|
1295
|
+
await this.save(plans);
|
|
1296
|
+
return plan;
|
|
1297
|
+
}
|
|
1298
|
+
async update(id, fields) {
|
|
1299
|
+
const plans = await this.getAll();
|
|
1300
|
+
const plan = plans.find((p) => p.id === id);
|
|
1301
|
+
if (!plan) return null;
|
|
1302
|
+
if (fields.title !== void 0) plan.title = fields.title;
|
|
1303
|
+
if (fields.body !== void 0) plan.body = fields.body;
|
|
1304
|
+
if (fields.source !== void 0) plan.source = fields.source;
|
|
1305
|
+
if (fields.model !== void 0) plan.model = fields.model;
|
|
1306
|
+
plan.updatedAt = Date.now();
|
|
1307
|
+
await this.save(plans);
|
|
1308
|
+
return plan;
|
|
1309
|
+
}
|
|
1310
|
+
async remove(id) {
|
|
1311
|
+
const plans = await this.getAll();
|
|
1312
|
+
const idx = plans.findIndex((p) => p.id === id);
|
|
1313
|
+
if (idx === -1) return false;
|
|
1314
|
+
plans.splice(idx, 1);
|
|
1315
|
+
await this.save(plans);
|
|
1316
|
+
return true;
|
|
1317
|
+
}
|
|
1318
|
+
async setDecision(id, decision, decisionComment) {
|
|
1319
|
+
const plans = await this.getAll();
|
|
1320
|
+
const plan = plans.find((p) => p.id === id);
|
|
1321
|
+
if (!plan) return null;
|
|
1322
|
+
plan.decision = decision;
|
|
1323
|
+
plan.decisionComment = decisionComment?.trim() || void 0;
|
|
1324
|
+
plan.decidedAt = Date.now();
|
|
1325
|
+
plan.updatedAt = plan.decidedAt;
|
|
1326
|
+
await this.save(plans);
|
|
1327
|
+
return plan;
|
|
1328
|
+
}
|
|
1329
|
+
async mutate(planId, fn) {
|
|
1330
|
+
const plans = await this.getAll();
|
|
1331
|
+
const plan = plans.find((p) => p.id === planId);
|
|
1332
|
+
if (!plan) return null;
|
|
1333
|
+
if (!plan.comments) plan.comments = [];
|
|
1334
|
+
if (!fn(plan)) return null;
|
|
1335
|
+
await this.save(plans);
|
|
1336
|
+
return plan;
|
|
1337
|
+
}
|
|
1338
|
+
async addComment(planId, comment) {
|
|
1339
|
+
return this.mutate(planId, (plan) => {
|
|
1340
|
+
plan.comments.push(comment);
|
|
1341
|
+
return true;
|
|
1342
|
+
});
|
|
1343
|
+
}
|
|
1344
|
+
async updateComment(planId, commentId, fields) {
|
|
1345
|
+
return this.mutate(planId, (plan) => {
|
|
1346
|
+
const c = plan.comments.find((x) => x.id === commentId);
|
|
1347
|
+
if (!c) return false;
|
|
1348
|
+
if (fields.body !== void 0) c.body = fields.body;
|
|
1349
|
+
if (fields.status !== void 0) c.status = fields.status;
|
|
1350
|
+
return true;
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
async removeComment(planId, commentId) {
|
|
1354
|
+
return this.mutate(planId, (plan) => {
|
|
1355
|
+
const idx = plan.comments.findIndex((x) => x.id === commentId);
|
|
1356
|
+
if (idx === -1) return false;
|
|
1357
|
+
plan.comments.splice(idx, 1);
|
|
1358
|
+
return true;
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
async addReply(planId, commentId, reply) {
|
|
1362
|
+
return this.mutate(planId, (plan) => {
|
|
1363
|
+
const c = plan.comments.find((x) => x.id === commentId);
|
|
1364
|
+
if (!c) return false;
|
|
1365
|
+
if (!c.replies) c.replies = [];
|
|
1366
|
+
c.replies.push(reply);
|
|
1367
|
+
return true;
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
async removeReply(planId, commentId, replyId) {
|
|
1371
|
+
return this.mutate(planId, (plan) => {
|
|
1372
|
+
const c = plan.comments.find((x) => x.id === commentId);
|
|
1373
|
+
if (!c) return false;
|
|
1374
|
+
const idx = c.replies.findIndex((r) => r.id === replyId);
|
|
1375
|
+
if (idx === -1) return false;
|
|
1376
|
+
c.replies.splice(idx, 1);
|
|
1377
|
+
return true;
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
async updateReply(planId, commentId, replyId, body) {
|
|
1381
|
+
return this.mutate(planId, (plan) => {
|
|
1382
|
+
const c = plan.comments.find((x) => x.id === commentId);
|
|
1383
|
+
if (!c) return false;
|
|
1384
|
+
const reply = c.replies.find((r) => r.id === replyId);
|
|
1385
|
+
if (!reply) return false;
|
|
1386
|
+
reply.body = body;
|
|
1387
|
+
return true;
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
//#endregion
|
|
1225
1392
|
//#region src/lib/review-session.ts
|
|
1226
1393
|
var ReviewSession = class {
|
|
1227
1394
|
round = 0;
|
|
@@ -1319,6 +1486,100 @@ var ReviewSession = class {
|
|
|
1319
1486
|
}
|
|
1320
1487
|
};
|
|
1321
1488
|
//#endregion
|
|
1489
|
+
//#region src/lib/plan-review-session.ts
|
|
1490
|
+
var PlanReviewSession = class {
|
|
1491
|
+
round = 0;
|
|
1492
|
+
lastDecidedAt = null;
|
|
1493
|
+
lastPayload = null;
|
|
1494
|
+
waiters = /* @__PURE__ */ new Set();
|
|
1495
|
+
onStatusChange;
|
|
1496
|
+
constructor(onStatusChange) {
|
|
1497
|
+
this.onStatusChange = onStatusChange;
|
|
1498
|
+
}
|
|
1499
|
+
/** Block until the next `decide()` or until `timeoutMs` elapses. */
|
|
1500
|
+
await(opts) {
|
|
1501
|
+
const { sinceRound, timeoutMs, signal } = opts;
|
|
1502
|
+
if (sinceRound !== void 0 && sinceRound < this.round && this.lastPayload) return Promise.resolve({
|
|
1503
|
+
status: "released",
|
|
1504
|
+
payload: this.lastPayload
|
|
1505
|
+
});
|
|
1506
|
+
if (signal?.aborted) return Promise.resolve({
|
|
1507
|
+
status: "keep-waiting",
|
|
1508
|
+
round: this.round
|
|
1509
|
+
});
|
|
1510
|
+
return new Promise((resolve) => {
|
|
1511
|
+
const waiter = {
|
|
1512
|
+
resolve,
|
|
1513
|
+
timer: setTimeout(() => {
|
|
1514
|
+
this.removeWaiter(waiter);
|
|
1515
|
+
resolve({
|
|
1516
|
+
status: "keep-waiting",
|
|
1517
|
+
round: this.round
|
|
1518
|
+
});
|
|
1519
|
+
}, timeoutMs),
|
|
1520
|
+
cleanup: () => {}
|
|
1521
|
+
};
|
|
1522
|
+
if (signal) {
|
|
1523
|
+
const onAbort = () => {
|
|
1524
|
+
this.removeWaiter(waiter);
|
|
1525
|
+
resolve({
|
|
1526
|
+
status: "keep-waiting",
|
|
1527
|
+
round: this.round
|
|
1528
|
+
});
|
|
1529
|
+
};
|
|
1530
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1531
|
+
waiter.cleanup = () => signal.removeEventListener("abort", onAbort);
|
|
1532
|
+
}
|
|
1533
|
+
this.waiters.add(waiter);
|
|
1534
|
+
this.emitStatus();
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
/** Capture a decision and release every blocked waiter. */
|
|
1538
|
+
decide(input) {
|
|
1539
|
+
this.round += 1;
|
|
1540
|
+
this.lastDecidedAt = input.sentAt;
|
|
1541
|
+
const payload = {
|
|
1542
|
+
round: this.round,
|
|
1543
|
+
sentAt: input.sentAt,
|
|
1544
|
+
planId: input.planId,
|
|
1545
|
+
decision: input.decision,
|
|
1546
|
+
decisionComment: input.decisionComment,
|
|
1547
|
+
reviewXml: input.reviewXml,
|
|
1548
|
+
openCommentCount: input.openCommentCount,
|
|
1549
|
+
plan: input.plan
|
|
1550
|
+
};
|
|
1551
|
+
this.lastPayload = payload;
|
|
1552
|
+
const waiters = [...this.waiters];
|
|
1553
|
+
this.waiters.clear();
|
|
1554
|
+
for (const waiter of waiters) {
|
|
1555
|
+
clearTimeout(waiter.timer);
|
|
1556
|
+
waiter.cleanup();
|
|
1557
|
+
waiter.resolve({
|
|
1558
|
+
status: "released",
|
|
1559
|
+
payload
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
this.emitStatus();
|
|
1563
|
+
return payload;
|
|
1564
|
+
}
|
|
1565
|
+
snapshot() {
|
|
1566
|
+
return {
|
|
1567
|
+
round: this.round,
|
|
1568
|
+
waiters: this.waiters.size,
|
|
1569
|
+
lastDecidedAt: this.lastDecidedAt
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
removeWaiter(waiter) {
|
|
1573
|
+
if (!this.waiters.delete(waiter)) return;
|
|
1574
|
+
clearTimeout(waiter.timer);
|
|
1575
|
+
waiter.cleanup();
|
|
1576
|
+
this.emitStatus();
|
|
1577
|
+
}
|
|
1578
|
+
emitStatus() {
|
|
1579
|
+
this.onStatusChange?.(this.snapshot());
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
//#endregion
|
|
1322
1583
|
//#region src/server.ts
|
|
1323
1584
|
const MIME_TYPES = {
|
|
1324
1585
|
".html": "text/html",
|
|
@@ -1338,10 +1599,11 @@ const MIME_TYPES = {
|
|
|
1338
1599
|
function isCustomMode(opts) {
|
|
1339
1600
|
return opts.revisions.length > 0 || opts.pathspecs.length > 0;
|
|
1340
1601
|
}
|
|
1341
|
-
function createApp(clientDir, diffOpts = DEFAULTS$1, commentStore) {
|
|
1602
|
+
function createApp(clientDir, diffOpts = DEFAULTS$1, commentStore, planStore) {
|
|
1342
1603
|
const app = new Hono();
|
|
1343
1604
|
const customMode = isCustomMode(diffOpts);
|
|
1344
1605
|
const store = commentStore ?? new FileCommentStore();
|
|
1606
|
+
const plans = planStore ?? new FilePlanStore();
|
|
1345
1607
|
const viewedFiles = /* @__PURE__ */ new Set();
|
|
1346
1608
|
const activeClients = /* @__PURE__ */ new Set();
|
|
1347
1609
|
const broadcast = (event, data) => {
|
|
@@ -1350,23 +1612,30 @@ function createApp(clientDir, diffOpts = DEFAULTS$1, commentStore) {
|
|
|
1350
1612
|
} catch {}
|
|
1351
1613
|
};
|
|
1352
1614
|
const reviewSession = new ReviewSession((snapshot) => broadcast("agent-status", JSON.stringify(snapshot)));
|
|
1615
|
+
const planReviewSession = new PlanReviewSession((snapshot) => broadcast("plan-review-status", JSON.stringify(snapshot)));
|
|
1353
1616
|
let repoRoot;
|
|
1354
1617
|
try {
|
|
1355
1618
|
repoRoot = getRepoRoot();
|
|
1356
1619
|
} catch {
|
|
1357
1620
|
repoRoot = process.cwd();
|
|
1358
1621
|
}
|
|
1359
|
-
if (!commentStore) try {
|
|
1622
|
+
if (!commentStore && !planStore) try {
|
|
1360
1623
|
const storageDir = getProjectStorageDir();
|
|
1361
1624
|
mkdirSync(storageDir, { recursive: true });
|
|
1362
1625
|
let commentsDebounce = null;
|
|
1626
|
+
let plansDebounce = null;
|
|
1363
1627
|
watch(storageDir, (_eventType, filename) => {
|
|
1364
|
-
if (
|
|
1365
|
-
if (
|
|
1366
|
-
|
|
1628
|
+
if (!filename) return;
|
|
1629
|
+
if (filename.startsWith("comments.json")) {
|
|
1630
|
+
if (commentsDebounce) clearTimeout(commentsDebounce);
|
|
1631
|
+
commentsDebounce = setTimeout(() => broadcast("comments", Date.now().toString()), 120);
|
|
1632
|
+
} else if (filename.startsWith("plans.json")) {
|
|
1633
|
+
if (plansDebounce) clearTimeout(plansDebounce);
|
|
1634
|
+
plansDebounce = setTimeout(() => broadcast("plans", Date.now().toString()), 120);
|
|
1635
|
+
}
|
|
1367
1636
|
}).unref();
|
|
1368
1637
|
} catch (err) {
|
|
1369
|
-
console.warn("Failed to initialize
|
|
1638
|
+
console.warn("Failed to initialize storage watcher:", err);
|
|
1370
1639
|
}
|
|
1371
1640
|
let debounceTimeout = null;
|
|
1372
1641
|
try {
|
|
@@ -1722,6 +1991,148 @@ function createApp(clientDir, diffOpts = DEFAULTS$1, commentStore) {
|
|
|
1722
1991
|
app.get("/api/review/status", (c) => {
|
|
1723
1992
|
return c.json(reviewSession.snapshot());
|
|
1724
1993
|
});
|
|
1994
|
+
app.get("/api/plans", async (c) => {
|
|
1995
|
+
return c.json(await plans.getAll());
|
|
1996
|
+
});
|
|
1997
|
+
app.get("/api/plans/:id", async (c) => {
|
|
1998
|
+
const plan = await plans.get(c.req.param("id"));
|
|
1999
|
+
if (!plan) return c.json({ error: "Plan not found" }, 404);
|
|
2000
|
+
return c.json(plan);
|
|
2001
|
+
});
|
|
2002
|
+
app.post("/api/plans", async (c) => {
|
|
2003
|
+
const body = await c.req.json().catch(() => ({}));
|
|
2004
|
+
if (typeof body.body !== "string" || !body.body.trim()) return c.json({ error: "A plan body (markdown) is required" }, 400);
|
|
2005
|
+
const title = typeof body.title === "string" && body.title.trim() ? body.title.trim() : "Untitled plan";
|
|
2006
|
+
const plan = await plans.upsert({
|
|
2007
|
+
id: typeof body.id === "string" && body.id ? body.id : void 0,
|
|
2008
|
+
title,
|
|
2009
|
+
body: body.body,
|
|
2010
|
+
source: typeof body.source === "string" ? body.source : void 0,
|
|
2011
|
+
model: typeof body.model === "string" ? body.model : void 0
|
|
2012
|
+
});
|
|
2013
|
+
return c.json(plan, 201);
|
|
2014
|
+
});
|
|
2015
|
+
app.put("/api/plans/:id", async (c) => {
|
|
2016
|
+
const id = c.req.param("id");
|
|
2017
|
+
const { title, body, source, model } = await c.req.json().catch(() => ({}));
|
|
2018
|
+
const updated = await plans.update(id, {
|
|
2019
|
+
title: typeof title === "string" ? title : void 0,
|
|
2020
|
+
body: typeof body === "string" ? body : void 0,
|
|
2021
|
+
source: typeof source === "string" ? source : void 0,
|
|
2022
|
+
model: typeof model === "string" ? model : void 0
|
|
2023
|
+
});
|
|
2024
|
+
if (!updated) return c.json({ error: "Plan not found" }, 404);
|
|
2025
|
+
return c.json(updated);
|
|
2026
|
+
});
|
|
2027
|
+
app.delete("/api/plans/:id", async (c) => {
|
|
2028
|
+
if (!await plans.remove(c.req.param("id"))) return c.json({ error: "Plan not found" }, 404);
|
|
2029
|
+
return c.json({ ok: true });
|
|
2030
|
+
});
|
|
2031
|
+
app.post("/api/plans/:id/comments", async (c) => {
|
|
2032
|
+
const planId = c.req.param("id");
|
|
2033
|
+
const plan = await plans.get(planId);
|
|
2034
|
+
if (!plan) return c.json({ error: "Plan not found" }, 404);
|
|
2035
|
+
const body = await c.req.json();
|
|
2036
|
+
const lineNumber = Number.isFinite(body.lineNumber) ? Number(body.lineNumber) : 0;
|
|
2037
|
+
const startLineNumber = Number.isFinite(body.startLineNumber) ? Number(body.startLineNumber) : void 0;
|
|
2038
|
+
const anchorStart = startLineNumber ?? lineNumber;
|
|
2039
|
+
const lineContent = typeof body.lineContent === "string" && body.lineContent ? body.lineContent : lineNumber > 0 ? extractPlanLines(plan.body, anchorStart, lineNumber) : "";
|
|
2040
|
+
const sectionTitle = typeof body.sectionTitle === "string" && body.sectionTitle ? body.sectionTitle : lineNumber > 0 ? sectionTitleForLine(plan.body, anchorStart) : void 0;
|
|
2041
|
+
const comment = {
|
|
2042
|
+
id: crypto.randomUUID(),
|
|
2043
|
+
lineNumber,
|
|
2044
|
+
startLineNumber,
|
|
2045
|
+
lineContent,
|
|
2046
|
+
sectionTitle,
|
|
2047
|
+
body: body.body,
|
|
2048
|
+
status: "open",
|
|
2049
|
+
createdAt: Date.now(),
|
|
2050
|
+
replies: []
|
|
2051
|
+
};
|
|
2052
|
+
const updated = await plans.addComment(planId, comment);
|
|
2053
|
+
if (!updated) return c.json({ error: "Plan not found" }, 404);
|
|
2054
|
+
return c.json(updated, 201);
|
|
2055
|
+
});
|
|
2056
|
+
app.put("/api/plans/:id/comments/:commentId", async (c) => {
|
|
2057
|
+
const { body, status } = await c.req.json();
|
|
2058
|
+
const updated = await plans.updateComment(c.req.param("id"), c.req.param("commentId"), {
|
|
2059
|
+
body,
|
|
2060
|
+
status
|
|
2061
|
+
});
|
|
2062
|
+
if (!updated) return c.json({ error: "Plan or comment not found" }, 404);
|
|
2063
|
+
return c.json(updated);
|
|
2064
|
+
});
|
|
2065
|
+
app.delete("/api/plans/:id/comments/:commentId", async (c) => {
|
|
2066
|
+
const updated = await plans.removeComment(c.req.param("id"), c.req.param("commentId"));
|
|
2067
|
+
if (!updated) return c.json({ error: "Plan or comment not found" }, 404);
|
|
2068
|
+
return c.json(updated);
|
|
2069
|
+
});
|
|
2070
|
+
app.post("/api/plans/:id/comments/:commentId/replies", async (c) => {
|
|
2071
|
+
const { body, role, model } = await c.req.json();
|
|
2072
|
+
const reply = {
|
|
2073
|
+
id: crypto.randomUUID(),
|
|
2074
|
+
body,
|
|
2075
|
+
createdAt: Date.now(),
|
|
2076
|
+
role: role || (model ? "agent" : "user"),
|
|
2077
|
+
model: model || void 0
|
|
2078
|
+
};
|
|
2079
|
+
const updated = await plans.addReply(c.req.param("id"), c.req.param("commentId"), reply);
|
|
2080
|
+
if (!updated) return c.json({ error: "Plan or comment not found" }, 404);
|
|
2081
|
+
return c.json(updated);
|
|
2082
|
+
});
|
|
2083
|
+
app.put("/api/plans/:id/comments/:commentId/replies/:replyId", async (c) => {
|
|
2084
|
+
const { body } = await c.req.json();
|
|
2085
|
+
if (!body) return c.json({ error: "Body is required" }, 400);
|
|
2086
|
+
const updated = await plans.updateReply(c.req.param("id"), c.req.param("commentId"), c.req.param("replyId"), body);
|
|
2087
|
+
if (!updated) return c.json({ error: "Plan, comment, or reply not found" }, 404);
|
|
2088
|
+
return c.json(updated);
|
|
2089
|
+
});
|
|
2090
|
+
app.delete("/api/plans/:id/comments/:commentId/replies/:replyId", async (c) => {
|
|
2091
|
+
const updated = await plans.removeReply(c.req.param("id"), c.req.param("commentId"), c.req.param("replyId"));
|
|
2092
|
+
if (!updated) return c.json({ error: "Plan, comment, or reply not found" }, 404);
|
|
2093
|
+
return c.json(updated);
|
|
2094
|
+
});
|
|
2095
|
+
app.post("/api/plans/:id/decision", async (c) => {
|
|
2096
|
+
const planId = c.req.param("id");
|
|
2097
|
+
const body = await c.req.json().catch(() => ({}));
|
|
2098
|
+
const decision = body.decision;
|
|
2099
|
+
if (decision !== "approved" && decision !== "rejected" && decision !== "changes-requested") return c.json({ error: "decision must be one of: approved, rejected, changes-requested" }, 400);
|
|
2100
|
+
const decisionComment = typeof body.decisionComment === "string" ? body.decisionComment : void 0;
|
|
2101
|
+
const plan = await plans.setDecision(planId, decision, decisionComment);
|
|
2102
|
+
if (!plan) return c.json({ error: "Plan not found" }, 404);
|
|
2103
|
+
const openCommentCount = (plan.comments ?? []).filter((x) => x.status === "open").length;
|
|
2104
|
+
const payload = planReviewSession.decide({
|
|
2105
|
+
sentAt: Date.now(),
|
|
2106
|
+
planId,
|
|
2107
|
+
decision,
|
|
2108
|
+
decisionComment: plan.decisionComment,
|
|
2109
|
+
reviewXml: formatPlanReview(plan),
|
|
2110
|
+
openCommentCount,
|
|
2111
|
+
plan
|
|
2112
|
+
});
|
|
2113
|
+
return c.json({
|
|
2114
|
+
ok: true,
|
|
2115
|
+
round: payload.round,
|
|
2116
|
+
decision,
|
|
2117
|
+
openCommentCount,
|
|
2118
|
+
waiters: planReviewSession.snapshot().waiters
|
|
2119
|
+
});
|
|
2120
|
+
});
|
|
2121
|
+
app.get("/api/plan-review/await", async (c) => {
|
|
2122
|
+
const sinceRaw = c.req.query("sinceRound");
|
|
2123
|
+
const sinceRound = sinceRaw !== void 0 && sinceRaw !== "" ? Number(sinceRaw) : void 0;
|
|
2124
|
+
const requested = Number(c.req.query("timeoutMs")) || 25e3;
|
|
2125
|
+
const timeoutMs = Math.min(Math.max(requested, 1e3), 5e4);
|
|
2126
|
+
const result = await planReviewSession.await({
|
|
2127
|
+
sinceRound: Number.isNaN(sinceRound) ? void 0 : sinceRound,
|
|
2128
|
+
timeoutMs,
|
|
2129
|
+
signal: c.req.raw.signal
|
|
2130
|
+
});
|
|
2131
|
+
return c.json(result);
|
|
2132
|
+
});
|
|
2133
|
+
app.get("/api/plan-review/status", (c) => {
|
|
2134
|
+
return c.json(planReviewSession.snapshot());
|
|
2135
|
+
});
|
|
1725
2136
|
app.post("/api/attachments", async (c) => {
|
|
1726
2137
|
const file = (await c.req.parseBody())["file"];
|
|
1727
2138
|
if (!file || !(file instanceof File)) return c.json({ error: "No file uploaded" }, 400);
|
|
@@ -1823,14 +2234,15 @@ if (new Set([
|
|
|
1823
2234
|
"resolve",
|
|
1824
2235
|
"comments",
|
|
1825
2236
|
"url",
|
|
1826
|
-
"mcp"
|
|
2237
|
+
"mcp",
|
|
2238
|
+
"plan"
|
|
1827
2239
|
]).has(args[0])) {
|
|
1828
2240
|
if (args[0] === "mcp") {
|
|
1829
|
-
const { startMcpServer } = await import("./mcp-
|
|
2241
|
+
const { startMcpServer } = await import("./mcp-DKlThflu.mjs");
|
|
1830
2242
|
await startMcpServer();
|
|
1831
2243
|
await new Promise(() => {});
|
|
1832
2244
|
}
|
|
1833
|
-
const { runSubcommand } = await import("./cli-agent-
|
|
2245
|
+
const { runSubcommand } = await import("./cli-agent-Vbs-ePHv.mjs");
|
|
1834
2246
|
process.exit(await runSubcommand(args[0], args.slice(1)));
|
|
1835
2247
|
}
|
|
1836
2248
|
const opts = parseDiffOptions(args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./index-CghVgrAF.js";import{t}from"./html-JOaQiIkL.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
|
|
1
|
+
import{t as e}from"./index-CZZd7iTh.js";import{t}from"./html-C4cun3zD.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
|