@macintacos/caret 0.3.0 → 0.4.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.
Files changed (98) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +49 -14
  3. package/commands/discovery.md +1 -1
  4. package/dist/cli.js +1600 -200
  5. package/opencode/caret.plugin.ts +238 -14
  6. package/opencode/index.ts +8 -0
  7. package/package.json +10 -2
  8. package/ui/dist/assets/{angular-html-B6NJ8Crx.js → angular-html-kKPIob-B.js} +1 -1
  9. package/ui/dist/assets/{angular-ts-FdEJue4l.js → angular-ts-CKjP4O1R.js} +1 -1
  10. package/ui/dist/assets/{apl-8jCzQ5pt.js → apl-DCRQgCPD.js} +1 -1
  11. package/ui/dist/assets/{astro-D6Uv3Zd6.js → astro-BYbWYON5.js} +1 -1
  12. package/ui/dist/assets/{blade-DdLBtQgs.js → blade-CwhP_dxJ.js} +1 -1
  13. package/ui/dist/assets/{c-BtgVJzRT.js → c-CJEVusFw.js} +1 -1
  14. package/ui/dist/assets/{cobol-BOF3ihbS.js → cobol-DIBOqviT.js} +1 -1
  15. package/ui/dist/assets/{coffee-Br1deUOy.js → coffee-BS7TY60J.js} +1 -1
  16. package/ui/dist/assets/{cpp-BuRF7xA8.js → cpp-D1DVYlIO.js} +1 -1
  17. package/ui/dist/assets/{crystal-C2zE7OWx.js → crystal-1wNBwJ9X.js} +1 -1
  18. package/ui/dist/assets/{css-iBwOFG5O.js → css-DcRg7BqA.js} +1 -1
  19. package/ui/dist/assets/{dist-CtqCYfGw.js → dist-BPvuZVb2.js} +1 -1
  20. package/ui/dist/assets/{dist-C4FPvSXr.js → dist-BeSPrXBn.js} +1 -1
  21. package/ui/dist/assets/{dist-DIdA1vYB.js → dist-Bm-_E_MU.js} +1 -1
  22. package/ui/dist/assets/{dist-jmyqwp8P.js → dist-Buh6GXb2.js} +1 -1
  23. package/ui/dist/assets/{dist--moZHrIw.js → dist-C0x7GorT.js} +1 -1
  24. package/ui/dist/assets/{dist-Dm7ikdu5.js → dist-C2049AtS.js} +1 -1
  25. package/ui/dist/assets/{dist-zkfAcw6C.js → dist-C7ysmu-x.js} +1 -1
  26. package/ui/dist/assets/{dist-D2IYj7rL.js → dist-CA76eI1h.js} +1 -1
  27. package/ui/dist/assets/{dist-DhFSo_KF.js → dist-CZ-hU0oG.js} +1 -1
  28. package/ui/dist/assets/{dist-Diqv5yoL.js → dist-Cyz1Y8uV.js} +1 -1
  29. package/ui/dist/assets/{dist-DheG7L5T.js → dist-CzDZ2KMv.js} +1 -1
  30. package/ui/dist/assets/{dist-DXeIzOJW.js → dist-DBvtZoff.js} +1 -1
  31. package/ui/dist/assets/{dist-CDXacocg.js → dist-DNG5YE4w.js} +1 -1
  32. package/ui/dist/assets/{dist-DvWv2GjQ.js → dist-DPr7mnLy.js} +1 -1
  33. package/ui/dist/assets/{dist-DSFoRH4B.js → dist-Dhe__fm5.js} +1 -1
  34. package/ui/dist/assets/{dist-D0u8lgi2.js → dist-afCEYO1j.js} +1 -1
  35. package/ui/dist/assets/{dist-CsIQFmL2.js → dist-fAkxRpOI.js} +1 -1
  36. package/ui/dist/assets/{edge-C8C1WH_b.js → edge-DhG5RI3d.js} +1 -1
  37. package/ui/dist/assets/{elixir-ChioPNrw.js → elixir-k8JKnHNU.js} +1 -1
  38. package/ui/dist/assets/{elm-DrMVy3GL.js → elm-BCt58sPl.js} +1 -1
  39. package/ui/dist/assets/{erb-B3LvCl6V.js → erb-gEaFK19o.js} +1 -1
  40. package/ui/dist/assets/{git-rebase-Bv1Z90mV.js → git-rebase-PGNnuu_q.js} +1 -1
  41. package/ui/dist/assets/{glimmer-js-_Cj2ZxqT.js → glimmer-js-BShMa8kS.js} +1 -1
  42. package/ui/dist/assets/{glimmer-ts-eeir-ofz.js → glimmer-ts-BBjvNufU.js} +1 -1
  43. package/ui/dist/assets/{glsl-Zcj4mBmc.js → glsl-CVu5XUh6.js} +1 -1
  44. package/ui/dist/assets/{graphql-DcI0CImY.js → graphql-CpSUkXDO.js} +1 -1
  45. package/ui/dist/assets/{hack-CRMO6OEY.js → hack-vYYr_EuM.js} +1 -1
  46. package/ui/dist/assets/{haml-vpaJ2U9N.js → haml-aiyqEFS_.js} +1 -1
  47. package/ui/dist/assets/{handlebars-BmRnoKX5.js → handlebars-vKdd7ZE6.js} +1 -1
  48. package/ui/dist/assets/{html-CWopqLKh.js → html-BSDB9v3Y.js} +1 -1
  49. package/ui/dist/assets/{html-derivative-kjil5-1g.js → html-derivative-V8cBpxuT.js} +1 -1
  50. package/ui/dist/assets/{http-BsiD1_wo.js → http-DXSNVmLc.js} +1 -1
  51. package/ui/dist/assets/{hurl-BSOSzca8.js → hurl-eKV70JUb.js} +1 -1
  52. package/ui/dist/assets/{index-anQLM8ZA.js → index-C3YoPLgV.js} +4 -4
  53. package/ui/dist/assets/{java-B3dX7M_O.js → java-DGolWD2l.js} +1 -1
  54. package/ui/dist/assets/{javascript-FM1qUZzw.js → javascript-DcKrb1R6.js} +1 -1
  55. package/ui/dist/assets/{jinja-DVVPq-Qq.js → jinja-O0MduF1V.js} +1 -1
  56. package/ui/dist/assets/{jison-DZjXlKnT.js → jison-BGBc5HtG.js} +1 -1
  57. package/ui/dist/assets/{json-psWWRfU7.js → json-B-Q47BuG.js} +1 -1
  58. package/ui/dist/assets/{jsx-Bv0NBlC9.js → jsx-B__N5PZx.js} +1 -1
  59. package/ui/dist/assets/{julia-DRPZCNs5.js → julia-BfiIt3AD.js} +1 -1
  60. package/ui/dist/assets/{just-CznON7Md.js → just-CN940-eY.js} +1 -1
  61. package/ui/dist/assets/{latex-99tFYwaR.js → latex-wUKEeqEd.js} +1 -1
  62. package/ui/dist/assets/{liquid-8z3tzRYn.js → liquid-D2cnd1Ez.js} +1 -1
  63. package/ui/dist/assets/{lua-BZoKCS17.js → lua-BQiIdljT.js} +1 -1
  64. package/ui/dist/assets/{marko-BU9z-RZr.js → marko-BCqypbre.js} +1 -1
  65. package/ui/dist/assets/{mdc-C38yLzkY.js → mdc-105-eiCZ.js} +1 -1
  66. package/ui/dist/assets/{nginx-UMVInepI.js → nginx-C5dkaLo6.js} +1 -1
  67. package/ui/dist/assets/{nim-Du4jXclQ.js → nim-RJQN31Xa.js} +1 -1
  68. package/ui/dist/assets/{perl-CoEbwzPf.js → perl-DZkWjug_.js} +1 -1
  69. package/ui/dist/assets/{php-ubTDGUam.js → php-OoKYDxlw.js} +1 -1
  70. package/ui/dist/assets/{pug-Bmsmvvm7.js → pug-CDXuXfau.js} +1 -1
  71. package/ui/dist/assets/{qml-YXj-z032.js → qml-BSj8AX1e.js} +1 -1
  72. package/ui/dist/assets/{r-BNkIpWO8.js → r-DlO747T6.js} +1 -1
  73. package/ui/dist/assets/{razor-ZM--hAhl.js → razor-D1gVuaXL.js} +1 -1
  74. package/ui/dist/assets/{regexp-CHr2m78T.js → regexp-CGVqhulu.js} +1 -1
  75. package/ui/dist/assets/{rst-Xx0XAo8H.js → rst-DtURuW7a.js} +1 -1
  76. package/ui/dist/assets/{ruby-BWgyGqGH.js → ruby-Bc3kUlvr.js} +1 -1
  77. package/ui/dist/assets/{sas-CwTmTlh0.js → sas-CFQgZChj.js} +1 -1
  78. package/ui/dist/assets/{scss-DNgS20lR.js → scss-B8cq7hhb.js} +1 -1
  79. package/ui/dist/assets/{shellscript-Dkezxj03.js → shellscript-C_GHS-ym.js} +1 -1
  80. package/ui/dist/assets/{shellsession-D6yCCjOL.js → shellsession-CTplGpC8.js} +1 -1
  81. package/ui/dist/assets/{soy-lzhm7a9Y.js → soy-BgD_ErAN.js} +1 -1
  82. package/ui/dist/assets/{sql-Yo8AWGPM.js → sql-BnGnr4ii.js} +1 -1
  83. package/ui/dist/assets/{stata-D62k9gHq.js → stata-qCQsVpGc.js} +1 -1
  84. package/ui/dist/assets/{surrealql-qp-qEg-3.js → surrealql-BqH_LSaF.js} +1 -1
  85. package/ui/dist/assets/{svelte-DLztoC2n.js → svelte-Bu1vTtJQ.js} +1 -1
  86. package/ui/dist/assets/{templ-Cu6WsZcl.js → templ-B5jQzs9l.js} +1 -1
  87. package/ui/dist/assets/{tex-CqZU9zkk.js → tex-BJ-wZPSn.js} +1 -1
  88. package/ui/dist/assets/{ts-tags-ClqaCWh2.js → ts-tags-DuLm-TvJ.js} +1 -1
  89. package/ui/dist/assets/{tsx-Cj58ow-S.js → tsx-BPiBkGlY.js} +1 -1
  90. package/ui/dist/assets/{twig-CgaKnAdg.js → twig-CdQnHxAS.js} +1 -1
  91. package/ui/dist/assets/{typescript-CKElJ_dH.js → typescript-Dp_zdoqe.js} +1 -1
  92. package/ui/dist/assets/{vue-DtckUkhv.js → vue-BmKvlxSZ.js} +1 -1
  93. package/ui/dist/assets/{vue-html-Cqq7SmCi.js → vue-html-CizabNef.js} +1 -1
  94. package/ui/dist/assets/{vue-vine-Dp4BXiQa.js → vue-vine-JH1Msnx4.js} +1 -1
  95. package/ui/dist/assets/{xml-C3UNSSfc.js → xml-DW7DdZow.js} +1 -1
  96. package/ui/dist/assets/{xsl-BL_LCJsy.js → xsl-6zDkD8bR.js} +1 -1
  97. package/ui/dist/assets/{yaml-CD_CHV62.js → yaml-W1qZ5vOg.js} +1 -1
  98. package/ui/dist/index.html +1 -1
@@ -15,21 +15,64 @@
15
15
  // config hook restricts the tool to primary agents (experimental.primary_tools +
16
16
  // per-agent permission), and the tool body re-checks the caller — defense in depth.
17
17
  //
18
- // This file is deployed verbatim (with the two __CARET_*__ markers substituted) by
19
- // `caret install-opencode` into OpenCode's auto-loaded plugin dir, so it is
20
- // self-contained: its only imports are node:child_process and @opencode-ai/plugin
21
- // (the latter resolved by OpenCode at runtime). Live in-OpenCode verification of
22
- // the exact ctx/tool/config shapes against the installed OpenCode version is a
23
- // documented follow-up; the pure logic below is covered by test/opencode/.
18
+ // This file runs in-process inside OpenCode. It ships in the @macintacos/caret npm
19
+ // package; OpenCode loads it when the package is in the user's `plugin` array, and
20
+ // it resolves its own binary and version at runtime from that package. (The legacy
21
+ // file-deploy path substitutes the two __CARET_*__ markers instead.) It stays
22
+ // self-contained: its only imports are node builtins (child_process, fs, url) and
23
+ // @opencode-ai/plugin (resolved by OpenCode at runtime). Live in-OpenCode
24
+ // verification of the exact ctx/tool/config shapes against the installed OpenCode
25
+ // version is a documented follow-up; the pure logic below is covered by
26
+ // test/opencode/.
24
27
 
25
28
  import { spawn } from "node:child_process";
29
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
30
+ import { homedir } from "node:os";
31
+ import { dirname } from "node:path";
32
+ import { fileURLToPath } from "node:url";
26
33
  import { type Hooks, type Plugin, tool } from "@opencode-ai/plugin";
27
34
 
28
- /** Install-time markers: `caret install-opencode` rewrites these string literals
29
- * with the resolved caret version and binary path before deploying this file. */
35
+ /** Install-time markers. The legacy file-deploy path substituted these with the
36
+ * resolved caret version and binary path; the array install leaves them as
37
+ * placeholders, so the resolvers below fall back to the package that ships this
38
+ * file. */
30
39
  export const CARET_PLUGIN_VERSION = "__CARET_VERSION__";
31
40
  const CARET_BIN = "__CARET_BIN__";
32
41
 
42
+ /** The caret binary the review tool spawns. Env override wins; then a substituted
43
+ * marker (an absolute path, from the legacy file-deploy path); else the binary that
44
+ * ships beside this module in the npm package (the array install). */
45
+ export function resolveCaretBin(opts: {
46
+ env: Record<string, string | undefined>;
47
+ marker: string;
48
+ importMetaUrl: string;
49
+ }): string {
50
+ const override = opts.env.CARET_OPENCODE_BIN?.trim();
51
+ if (override) return override;
52
+ if (opts.marker !== "__CARET_BIN__") return opts.marker;
53
+ return fileURLToPath(new URL("../bin/caret", opts.importMetaUrl));
54
+ }
55
+
56
+ /** The plugin's own caret version, for the update check. A substituted marker wins
57
+ * (file-deploy); else read it from the package.json shipped beside this module (the
58
+ * array install). "unknown" when neither is available — deliberately UNPARSEABLE so
59
+ * `isNewer` compares false and a broken read stays silent ("0.0.0" would parse and
60
+ * nag "update available (you have 0.0.0)" on every start). */
61
+ export function resolveCaretVersion(opts: {
62
+ marker: string;
63
+ importMetaUrl: string;
64
+ readFile: (path: string) => string;
65
+ }): string {
66
+ if (opts.marker !== "__CARET_VERSION__") return opts.marker;
67
+ try {
68
+ const raw = opts.readFile(fileURLToPath(new URL("../package.json", opts.importMetaUrl)));
69
+ const v = (JSON.parse(raw) as { version?: unknown }).version;
70
+ return typeof v === "string" ? v : "unknown";
71
+ } catch {
72
+ return "unknown";
73
+ }
74
+ }
75
+
33
76
  /** The plan-review tool the Plan agent calls. */
34
77
  export const REVIEW_TOOL = "caret_review_plan";
35
78
 
@@ -178,6 +221,164 @@ function showToast(client: ToastClient, body: ToastBody): void {
178
221
  }
179
222
  }
180
223
 
224
+ // --- version-check toast (EXC-794) -----------------------------------------
225
+
226
+ /** caret's latest-release endpoint. Unauthenticated GitHub API — throttled to at
227
+ * most once a day (see UPDATE_CHECK_INTERVAL_MS), so it never approaches the
228
+ * 60 req/hr/IP limit. */
229
+ const LATEST_RELEASE_URL = "https://api.github.com/repos/macintacos/caret/releases/latest";
230
+ /** How long the update nudge stays up — long enough to read the link. */
231
+ const UPDATE_TOAST_MS = 5_000;
232
+ /** Minimum gap between update checks. The nudge is a convenience, not a security
233
+ * fix, so checking once a day is plenty — and it keeps the network hit off every
234
+ * OpenCode start. The last-check time is persisted in a small throttle file. */
235
+ const UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60_000;
236
+
237
+ /** Semver triple `[major, minor, patch]`, or null when `v` is not `X.Y.Z` (an
238
+ * optional leading `v` is stripped; trailing prerelease/build metadata ignored). */
239
+ function parseVersionTriple(v: string): [number, number, number] | null {
240
+ const m = v
241
+ .trim()
242
+ .replace(/^v/, "")
243
+ .match(/^(\d+)\.(\d+)\.(\d+)/);
244
+ return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
245
+ }
246
+
247
+ /** True when `latest` is a strictly higher semver than `current`. Inline (no semver
248
+ * dep) so the deployed plugin stays self-contained; an unparseable version on
249
+ * either side compares false, so the check never nags on something it can't read. */
250
+ export function isNewer(latest: string, current: string): boolean {
251
+ const a = parseVersionTriple(latest);
252
+ const b = parseVersionTriple(current);
253
+ if (!a || !b) return false;
254
+ const [a0, a1, a2] = a;
255
+ const [b0, b1, b2] = b;
256
+ if (a0 !== b0) return a0 > b0;
257
+ if (a1 !== b1) return a1 > b1;
258
+ return a2 > b2;
259
+ }
260
+
261
+ /** The version (v-stripped) and release-page URL from GitHub's /releases/latest
262
+ * JSON, or null when the shape is unusable. */
263
+ export function parseLatestRelease(json: unknown): { version: string; url: string } | null {
264
+ if (typeof json !== "object" || json === null) return null;
265
+ const o = json as { tag_name?: unknown; html_url?: unknown };
266
+ if (typeof o.tag_name !== "string") return null;
267
+ const url =
268
+ typeof o.html_url === "string"
269
+ ? o.html_url
270
+ : "https://github.com/macintacos/caret/releases/latest";
271
+ return { version: o.tag_name.replace(/^v/, ""), url };
272
+ }
273
+
274
+ /** The update-available toast body, or null when the user is already current. */
275
+ export function updateToastBody(
276
+ current: string,
277
+ latest: { version: string; url: string },
278
+ ): ToastBody | null {
279
+ if (!isNewer(latest.version, current)) return null;
280
+ return {
281
+ title: "caret update available",
282
+ message: `caret ${latest.version} is available (you have ${current}). ${latest.url}`,
283
+ variant: "info",
284
+ duration: UPDATE_TOAST_MS,
285
+ };
286
+ }
287
+
288
+ /** The slice of `fetch` the update check needs — narrow so a test can pass a plain
289
+ * stub without reconstructing `fetch`'s `preconnect` sibling. The global `fetch`
290
+ * (and Bun's) is assignable to it. */
291
+ type FetchLike = (
292
+ url: string,
293
+ init?: { headers?: Record<string, string> },
294
+ ) => Promise<{ ok: boolean; json: () => Promise<unknown> }>;
295
+
296
+ /** True when the last check is old enough (or absent) to check again. Pure so the
297
+ * 24h throttle is unit-testable without a clock or the filesystem. */
298
+ export function shouldCheckForUpdate(lastCheckMs: number | null, nowMs: number): boolean {
299
+ return lastCheckMs === null || nowMs - lastCheckMs >= UPDATE_CHECK_INTERVAL_MS;
300
+ }
301
+
302
+ /** Absolute path of the throttle file holding the last-check epoch-ms. Lives under
303
+ * caret's state dir ($XDG_STATE_HOME/caret or ~/.local/state/caret), matching where
304
+ * caret keeps its other small machine-global markers (prefs.json). Pure so the
305
+ * location is testable; the plugin stays self-contained and cannot import
306
+ * src/paths.ts, so the convention is mirrored here by hand. */
307
+ export function updateCheckCachePath(
308
+ env: Record<string, string | undefined>,
309
+ home: string,
310
+ ): string {
311
+ const base = env.XDG_STATE_HOME?.trim() || `${home}/.local/state`;
312
+ return `${base}/caret/opencode-update-check`;
313
+ }
314
+
315
+ /** The throttle seam: read the last-check epoch-ms (null when never / unreadable),
316
+ * and persist a new one. Injected so realUpdateChecker's throttle is testable
317
+ * without touching disk. */
318
+ type UpdateCache = { read: () => number | null; write: (epochMs: number) => void };
319
+
320
+ /** File-backed UpdateCache. Read tolerates a missing or garbage file (→ null, so
321
+ * the check runs); write is best-effort — a failure just means we check again next
322
+ * start rather than crashing plugin load. */
323
+ function fileUpdateCache(path: string): UpdateCache {
324
+ return {
325
+ read: () => {
326
+ try {
327
+ const n = Number.parseInt(readFileSync(path, "utf-8").trim(), 10);
328
+ return Number.isFinite(n) ? n : null;
329
+ } catch {
330
+ return null;
331
+ }
332
+ },
333
+ write: (epochMs) => {
334
+ try {
335
+ mkdirSync(dirname(path), { recursive: true });
336
+ writeFileSync(path, String(epochMs));
337
+ } catch {
338
+ // best-effort — a throttle-file write must never disrupt load.
339
+ }
340
+ },
341
+ };
342
+ }
343
+
344
+ /** Best-effort startup update check: fetch caret's latest GitHub release and, if it
345
+ * is newer than this plugin's version, toast a nudge with a link. Throttled to at
346
+ * most once a day via the injected cache — the check time is stamped up front, so
347
+ * even an offline/failed start backs off a full day rather than hitting the network
348
+ * on every restart. Never throws and never blocks plugin load — a network error, a
349
+ * non-200, an unusable body, the throttle, or the `CARET_OPENCODE_NO_UPDATE_CHECK`
350
+ * opt-out all resolve silently. `fetchImpl`/`url`/`now`/`cache` are injected so it is
351
+ * unit-testable without the network or the filesystem. */
352
+ export async function realUpdateChecker(
353
+ client: ToastClient,
354
+ opts: {
355
+ currentVersion: string;
356
+ env: Record<string, string | undefined>;
357
+ fetchImpl: FetchLike;
358
+ now: () => number;
359
+ cache: UpdateCache;
360
+ url?: string;
361
+ },
362
+ ): Promise<void> {
363
+ if (opts.env.CARET_OPENCODE_NO_UPDATE_CHECK) return;
364
+ const nowMs = opts.now();
365
+ if (!shouldCheckForUpdate(opts.cache.read(), nowMs)) return;
366
+ // Stamp the check up front so a failed/offline check still backs off a day.
367
+ opts.cache.write(nowMs);
368
+ try {
369
+ const res = await opts.fetchImpl(opts.url ?? LATEST_RELEASE_URL, {
370
+ headers: { "user-agent": "caret-opencode-plugin", accept: "application/vnd.github+json" },
371
+ });
372
+ if (!res.ok) return;
373
+ const latest = parseLatestRelease(await res.json());
374
+ if (!latest) return;
375
+ const body = updateToastBody(opts.currentVersion, latest);
376
+ if (body) showToast(client, body);
377
+ } catch {
378
+ // best-effort — an update nudge must never disrupt the session.
379
+ }
380
+ }
381
+
181
382
  /** The planning-prompt steer appended to the system array so the Plan agent
182
383
  * submits its plan to caret instead of calling the native plan_exit. */
183
384
  export function planningSteer(): string {
@@ -316,16 +517,24 @@ const nodeSpawnRunner: SpawnRunner = (bin, env, stdin, onStderr) =>
316
517
  // The plugin
317
518
  // ---------------------------------------------------------------------------
318
519
 
319
- /** Build the caret OpenCode plugin. The DI seam (bin/run) keeps the tool's
320
- * execute() unit-testable; the default export wires the production runner. */
321
- export function createCaretPlugin(opts: { bin?: string; run?: SpawnRunner } = {}): Plugin {
322
- const bin = opts.bin ?? process.env.CARET_OPENCODE_BIN ?? CARET_BIN;
520
+ /** Build the caret OpenCode plugin. The DI seam (bin/run/checkUpdate) keeps the
521
+ * tool's execute() and the startup update check unit-testable; the default export
522
+ * wires the production runner and update checker. */
523
+ export function createCaretPlugin(
524
+ opts: { bin?: string; run?: SpawnRunner; checkUpdate?: (client: ToastClient) => void } = {},
525
+ ): Plugin {
526
+ const bin =
527
+ opts.bin ??
528
+ resolveCaretBin({ env: process.env, marker: CARET_BIN, importMetaUrl: import.meta.url });
323
529
  const run = opts.run ?? nodeSpawnRunner;
324
530
 
325
531
  return async (input) => {
326
532
  // OpenCode gives every plugin its SDK client; caret uses it to surface the
327
533
  // review link as a toast (EXC-691). Narrowed structurally for skew-safety.
328
534
  const client = (input as { client?: ToastClient }).client;
535
+ // Best-effort startup update nudge (EXC-794); fire-and-forget so it never
536
+ // delays plugin load. Only the production default export wires this.
537
+ if (opts.checkUpdate) opts.checkUpdate(client);
329
538
  const hooks: Hooks = {
330
539
  // Restrict the review tool to primary agents + allow/deny per agent.
331
540
  config: async (config) => {
@@ -406,6 +615,21 @@ export function createCaretPlugin(opts: { bin?: string; run?: SpawnRunner } = {}
406
615
  };
407
616
  }
408
617
 
409
- /** The deployed plugin OpenCode auto-loads (bare default-export function). */
410
- const CaretPlugin: Plugin = createCaretPlugin();
618
+ /** The plugin OpenCode loads (bare default-export function). Wires the production
619
+ * update checker: on load, check caret's latest release and toast if behind. */
620
+ const CaretPlugin: Plugin = createCaretPlugin({
621
+ checkUpdate: (client) => {
622
+ void realUpdateChecker(client, {
623
+ currentVersion: resolveCaretVersion({
624
+ marker: CARET_PLUGIN_VERSION,
625
+ importMetaUrl: import.meta.url,
626
+ readFile: (p) => readFileSync(p, "utf-8"),
627
+ }),
628
+ env: process.env,
629
+ fetchImpl: fetch,
630
+ now: () => Date.now(),
631
+ cache: fileUpdateCache(updateCheckCachePath(process.env, homedir())),
632
+ });
633
+ },
634
+ });
411
635
  export default CaretPlugin;
@@ -0,0 +1,8 @@
1
+ // The published entrypoint OpenCode imports when `@macintacos/caret` appears in a
2
+ // user's `plugin` array. OpenCode's loader iterates a plugin module's exports
3
+ // (Object.values) and rejects the whole module on the FIRST export that isn't a
4
+ // Plugin — and caret.plugin.ts additionally exports test helpers/constants for
5
+ // test/opencode/. So this file re-exports ONLY the default plugin, leaving a module
6
+ // namespace of exactly `{ default }`. (This is why the array path does not need the
7
+ // deploy-time `stripNonDefaultExports` the retired file-deploy relied on.)
8
+ export { default } from "./caret.plugin.ts";
package/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "@macintacos/caret",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI for inline review, annotation, and approval.",
7
+ "main": "./opencode/index.ts",
8
+ "exports": {
9
+ ".": "./opencode/index.ts"
10
+ },
11
+ "bin": {
12
+ "caret": "./bin/caret"
13
+ },
7
14
  "homepage": "https://github.com/macintacos/caret",
8
15
  "repository": {
9
16
  "type": "git",
@@ -29,7 +36,6 @@
29
36
  },
30
37
  "devDependencies": {
31
38
  "@happy-dom/global-registrator": "^20.9.0",
32
- "@opencode-ai/plugin": "^1.16.2",
33
39
  "@playwright/test": "^1.60.0",
34
40
  "@sveltejs/vite-plugin-svelte": "^7.1.2",
35
41
  "@tailwindcss/vite": "^4.3.2",
@@ -55,10 +61,12 @@
55
61
  "@commander-js/extra-typings": "^15.0.0",
56
62
  "@internationalized/date": "^3.12.2",
57
63
  "@lezer/highlight": "^1.2.3",
64
+ "@opencode-ai/plugin": "^1.16.2",
58
65
  "@pierre/diffs": "1.2.7",
59
66
  "bits-ui": "^2.18.1",
60
67
  "clsx": "^2.1.1",
61
68
  "commander": "^15.0.0",
69
+ "jsonc-parser": "^3.3.1",
62
70
  "marked": "^18.0.4",
63
71
  "pino": "^10.3.1",
64
72
  "prettier": "3.8.3",
@@ -1 +1 @@
1
- import{O as e}from"./index-anQLM8ZA.js";import{t}from"./html-CWopqLKh.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{O as e}from"./index-C3YoPLgV.js";import{t}from"./html-BSDB9v3Y.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};