reactive-md 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +333 -319
- package/CHANGELOG.md +334 -320
- package/CONTRIBUTING-ch.md +22 -22
- package/CONTRIBUTING.md +22 -22
- package/README-ch.md +431 -431
- package/README-en.md +431 -431
- package/README.md +429 -429
- package/SECURITY-ch.md +83 -83
- package/SECURITY.md +83 -83
- package/bin/reactive-md.mjs +39 -39
- package/cli/args.mjs +263 -263
- package/cli/assets.mjs +395 -395
- package/cli/build.mjs +445 -445
- package/cli/check.mjs +444 -444
- package/cli/document.mjs +130 -130
- package/cli/errors.mjs +61 -61
- package/cli/fs-utils.mjs +133 -133
- package/cli/glob.mjs +203 -203
- package/cli/help.mjs +323 -323
- package/cli/init.mjs +1577 -1577
- package/cli/lint.mjs +177 -177
- package/cli/main.mjs +65 -65
- package/cli/migrate.mjs +368 -368
- package/cli/package-loader.mjs +41 -41
- package/cli/package.mjs +211 -211
- package/dist-library/{LocalDocumentView-sthUP0ct.js → LocalDocumentView-BuqgJZEY.js} +11 -11
- package/dist-library/{LocalDocumentViewCore-GiWV3bey.js → LocalDocumentViewCore-DXE0I0Qc.js} +210 -209
- package/dist-library/{LocalReactiveDocumentCore-ZjQSGyHE.js → LocalReactiveDocumentCore-CWBe4Mm5.js} +8 -8
- package/dist-library/{authoring-Dsune4Hy.js → authoring-Ci_KzJ0q.js} +53 -53
- package/dist-library/{compile-wUv8KEge.js → compile-Dx6Uw3D9.js} +11 -11
- package/dist-library/{compiler-core-As_m-MNm.js → compiler-core-DDDdvuLy.js} +883 -818
- package/dist-library/compiler-dxLPB9Ym.js +86 -0
- package/dist-library/{component-state-C52ZFJGl.js → component-state-BRwvTV0d.js} +15 -14
- package/dist-library/component-state-CwKX_SN5.js +763 -0
- package/dist-library/{config-BadfhjdP.js → config-DXLvctiZ.js} +68 -66
- package/dist-library/config-validation-D3D7Dy2J.js +586 -0
- package/dist-library/{controls-CcT6n7k_.js → controls-DoZyLCrV.js} +3 -3
- package/dist-library/{coordinate-CWS9p5q_.js → coordinate-B1VFK9fd.js} +2 -2
- package/dist-library/{data-table-Bgccxd7h.js → data-table-8-3F15Jf.js} +3 -3
- package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
- package/dist-library/{display-B-VhqVND.js → display-B_uutKkN.js} +1 -1
- package/dist-library/{config-validation-F47AcE6o.js → document-theme-C8J6UyNO.js} +193 -731
- package/dist-library/{export-BqVmTXm8.js → export-CIAIPBov.js} +35 -34
- package/dist-library/{gallery-CY6mTx8i.js → gallery-Dv1rOvL0.js} +1 -1
- package/dist-library/{html-CNT4KD-2.js → html-Cr4CBwAH.js} +42 -41
- package/dist-library/identity-BUx0Q_-d.js +40 -0
- package/dist-library/{incremental-Dv0FSp_U.js → incremental-9nx92u9c.js} +12 -10
- package/dist-library/{layout-C0YlEPGr.js → layout-BBB2VF0S.js} +1 -1
- package/dist-library/{mount-preset-KxvtKgJb.js → mount-preset-DMZ5wd3t.js} +3 -3
- package/dist-library/observability-4KqXhIEU.js +421 -0
- package/dist-library/observability-core-Bcu7vpnl.js +24 -0
- package/dist-library/{options-1aDLK7JY.js → options-BBp9IcHm.js} +4 -4
- package/dist-library/{package-core-WFK1RhAZ.js → package-core-K5xesGqy.js} +30 -29
- package/dist-library/{parser-standard-Yuf3A_VI.js → parser-standard-CBA1-hdG.js} +352 -352
- package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
- package/dist-library/preset-core-DeZPA8IE.js +1298 -0
- package/dist-library/react-0DCh-Mar.js +7 -0
- package/dist-library/reactive-md-authoring.js +19 -19
- package/dist-library/reactive-md-build.js +48 -10
- package/dist-library/reactive-md-compiler-standard.js +6 -6
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-default-packs.js +3 -2
- package/dist-library/reactive-md-default-preset.js +3 -2
- package/dist-library/reactive-md-export.js +4 -4
- package/dist-library/reactive-md-minimal-preset.js +2 -2
- package/dist-library/reactive-md-minimal-react-preset.js +3 -3
- package/dist-library/reactive-md-observability.js +4 -0
- package/dist-library/reactive-md-plugin-chart.js +3 -3
- package/dist-library/reactive-md-plugin-data.js +5 -5
- package/dist-library/reactive-md-plugin-diagram.js +4 -4
- package/dist-library/reactive-md-plugin-forms.js +4 -4
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +3 -3
- package/dist-library/reactive-md-plugin-network.js +4 -3
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-print.css +304 -304
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-server.js +6 -6
- package/dist-library/reactive-md-react-unstyled.js +11 -11
- package/dist-library/reactive-md-react.js +11 -11
- package/dist-library/reactive-md-runtime-browser.js +2 -1
- package/dist-library/reactive-md-runtime.js +4 -3
- package/dist-library/reactive-md-sdk.js +8 -7
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +5 -5
- package/dist-library/reactive-md.js +556 -367
- package/dist-library/{registry-B9NGct4d.js → registry-D6OGkOcX.js} +3 -3
- package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
- package/dist-library/{resources-D2GDQS0p.js → resources-B0x_w3s9.js} +71 -46
- package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
- package/dist-library/{runtime-kcA7bG7G.js → runtime-BpQdZmFI.js} +311 -305
- package/dist-library/{schema-BufhKUSM.js → schema-BryM_VRW.js} +14 -14
- package/dist-library/{sdk-core-BoJT1SIt.js → sdk-core-ChslheKs.js} +33 -32
- package/dist-library/{session-core-nmJHuR9c.js → session-core-dxQCJBNa.js} +15 -14
- package/dist-library/{shareable-DpbE-59H.js → shareable-B8xMoGEa.js} +179 -176
- package/dist-library/types/build/diagnostics.d.ts +1 -1
- package/dist-library/types/local/index.d.ts +6 -0
- package/dist-library/types/local/observability-codes.d.ts +2 -0
- package/dist-library/types/local/observability-core.d.ts +25 -0
- package/dist-library/types/local/observability-messages.d.ts +6 -0
- package/dist-library/types/local/observability.d.ts +43 -0
- package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
- package/dist-library/types/local/transport/worker.d.ts +52 -1
- package/dist-library/types/local/types.d.ts +8 -0
- package/dist-library/types/observability.d.ts +7 -0
- package/dist-library/{types-BeNtPqdY.js → types-Ib5kSScP.js} +1 -1
- package/dist-library/types-daDo2c_w.js +3 -0
- package/dist-library/{validation-BEBA_HvS.js → validation-B3RI0xOk.js} +251 -249
- package/dist-library/version-DAxuGOG2.js +147 -0
- package/dist-library/{visual-frame-CyV1FXzs.js → visual-frame-_rcd5HUv.js} +1 -1
- package/dist-library/{visuals-BZbZYA7w.js → visuals-DkDhNdEZ.js} +17 -17
- package/dist-standalone/reactive-md-standalone.js +118 -118
- package/docs/README-ch.md +101 -95
- package/docs/README.md +101 -95
- package/docs/compatibility/api-stability-ch.md +25 -0
- package/docs/compatibility/api-stability-en.md +25 -0
- package/docs/compatibility/compatibility-ch.md +146 -129
- package/docs/compatibility/compatibility-en.md +146 -129
- package/docs/compatibility/compatibility-manifest.schema.json +161 -0
- package/docs/compatibility/deprecation-ch.md +21 -0
- package/docs/compatibility/deprecation-en.md +21 -0
- package/docs/compatibility/source-versioning-ch.md +162 -162
- package/docs/compatibility/source-versioning-en.md +162 -162
- package/docs/compatibility/support-matrix-ch.md +108 -0
- package/docs/compatibility/support-matrix-en.md +108 -0
- package/docs/development/component-development-ch.md +66 -66
- package/docs/development/component-development-en.md +66 -66
- package/docs/development/component-development-reference-ch.md +253 -253
- package/docs/development/component-development-reference-en.md +238 -238
- package/docs/development/component-protocol-ch.md +748 -748
- package/docs/development/component-protocol-en.md +750 -750
- package/docs/development/extension-tutorial-ch.md +308 -308
- package/docs/development/extension-tutorial-en.md +308 -308
- package/docs/development/performance-overview-ch.md +422 -422
- package/docs/development/performance-overview-en.md +422 -422
- package/docs/guides/local-guide-ch.md +532 -532
- package/docs/guides/local-guide-en.md +532 -532
- package/docs/integration/author-tools-ch.md +64 -64
- package/docs/integration/author-tools-en.md +64 -64
- package/docs/integration/compiler-ch.md +49 -49
- package/docs/integration/compiler-en.md +36 -36
- package/docs/integration/directory-discovery-en.md +1 -1
- package/docs/integration/editor-ch.md +295 -295
- package/docs/integration/editor-en.md +303 -303
- package/docs/integration/extension-sdk-ch.md +394 -394
- package/docs/integration/extension-sdk-en.md +379 -379
- package/docs/integration/local-integration-ch.md +646 -646
- package/docs/integration/local-integration-en.md +662 -662
- package/docs/integration/shareable-export-ch.md +307 -307
- package/docs/integration/shareable-export-en.md +309 -309
- package/docs/reference/diagnostics-counting-ch.md +104 -104
- package/docs/reference/diagnostics-counting-en.md +104 -104
- package/docs/reference/html-compatibility-ch.md +93 -93
- package/docs/reference/html-compatibility-en.md +95 -95
- package/docs/reference/local-interaction-syntax-ch.md +724 -724
- package/docs/reference/local-interaction-syntax-en.md +722 -722
- package/docs/reference/public-api-ch.md +33 -4
- package/docs/reference/public-api-en.md +33 -4
- package/docs/reference/theme-protocol-ch.md +198 -198
- package/docs/reference/theme-protocol-en.md +217 -217
- package/docs/releases/release-0.4.0-ch.md +91 -91
- package/docs/releases/release-0.4.0-en.md +91 -91
- package/docs/releases/release-0.4.1-ch.md +25 -25
- package/docs/releases/release-0.4.1-en.md +25 -25
- package/docs/releases/release-0.5.0-ch.md +43 -43
- package/docs/releases/release-0.5.0-en.md +43 -43
- package/docs/releases/release-0.5.1-ch.md +41 -41
- package/docs/releases/release-0.5.1-en.md +41 -41
- package/docs/releases/release-0.5.2-ch.md +37 -37
- package/docs/releases/release-0.5.2-en.md +37 -37
- package/docs/releases/release-0.5.3-ch.md +26 -26
- package/docs/releases/release-0.5.3-en.md +26 -26
- package/docs/releases/release-0.6.0-ch.md +59 -59
- package/docs/releases/release-0.6.0-en.md +59 -59
- package/docs/releases/release-0.6.1-ch.md +29 -29
- package/docs/releases/release-0.6.1-en.md +29 -29
- package/docs/releases/release-0.7.0-ch.md +86 -86
- package/docs/releases/release-0.7.0-en.md +86 -86
- package/docs/releases/release-0.9.2-ch.md +33 -0
- package/docs/releases/release-0.9.2-en.md +33 -0
- package/examples/component-package/README-ch.md +101 -101
- package/examples/component-package/README.md +133 -133
- package/examples/conformance/README-ch.md +55 -55
- package/examples/conformance/README.md +55 -55
- package/examples/conformance/component-protocol-1.json +482 -482
- package/examples/conformance/component-protocol-1.schema.json +76 -76
- package/examples/conformance/local-draft-1.json +50 -50
- package/examples/conformance/local-draft-2.json +212 -212
- package/examples/game-2048-package/LICENSE +21 -21
- package/examples/game-2048-package/NOTICES.md +11 -11
- package/examples/game-2048-package/README-ch.md +91 -91
- package/examples/game-2048-package/README.md +98 -98
- package/examples/game-2048-package/package.json +35 -35
- package/examples/game-2048-package/sample/document.reactive.md +17 -17
- package/examples/game-2048-package/scripts/build-export.mjs +44 -44
- package/examples/game-2048-package/scripts/build.mjs +130 -130
- package/examples/game-2048-package/scripts/verify.mjs +180 -180
- package/examples/game-2048-package/src/component.css +161 -161
- package/examples/game-2048-package/src/components.tsx +326 -326
- package/examples/game-2048-package/src/game-engine.ts +228 -228
- package/examples/game-2048-package/src/harness.tsx +34 -34
- package/examples/game-2048-package/src/manifest.ts +85 -85
- package/examples/game-2048-package/src/node-entry.ts +30 -30
- package/examples/game-2048-package/src/sample.ts +4 -4
- package/examples/game-2048-package/tsconfig.json +15 -15
- package/examples/integration/README-ch.md +82 -82
- package/examples/integration/README.md +82 -82
- package/examples/integration/core/index.mjs +32 -32
- package/examples/integration/extension-sdk/README-ch.md +24 -24
- package/examples/integration/extension-sdk/README.md +24 -24
- package/examples/integration/worker/index.html +19 -19
- package/examples/integration/worker/main.js +61 -61
- package/examples/integration/worker/package.json +13 -13
- package/examples/integration/worker/worker.js +3 -3
- package/examples/local/README-ch.md +76 -76
- package/examples/local/README.md +76 -76
- package/examples/local/charts.reactive.md +73 -73
- package/examples/local/recipes/invoice-zh.reactive.md +36 -36
- package/examples/local/recipes/invoice.reactive.md +36 -36
- package/examples/local/recipes/workshop-zh.reactive.md +33 -33
- package/examples/local/recipes/workshop.reactive.md +33 -33
- package/examples/local/showcase/README-ch.md +22 -22
- package/examples/local/showcase/README.md +31 -31
- package/examples/local/showcase/explore.reactive.md +102 -102
- package/examples/local/showcase/flow.reactive.md +86 -86
- package/examples/local/showcase/forms.reactive.md +126 -126
- package/examples/local/showcase/functions.reactive.md +119 -119
- package/examples/local/showcase/layout.reactive.md +100 -100
- package/examples/local/showcase/statistics.reactive.md +108 -108
- package/examples/local/showcase/tasks.reactive.md +89 -89
- package/examples/local/showcase/zh/explore.reactive.md +102 -102
- package/examples/local/showcase/zh/flow.reactive.md +86 -86
- package/examples/local/showcase/zh/forms.reactive.md +126 -126
- package/examples/local/showcase/zh/functions.reactive.md +119 -119
- package/examples/local/showcase/zh/layout.reactive.md +100 -100
- package/examples/local/showcase/zh/statistics.reactive.md +108 -108
- package/examples/local/showcase/zh/tasks.reactive.md +89 -89
- package/examples/minimal-extension/README-ch.md +78 -78
- package/examples/minimal-extension/README.md +78 -78
- package/examples/minimal-extension/index.html +15 -15
- package/examples/minimal-extension/package.json +26 -26
- package/examples/minimal-extension/sample/document.reactive.md +10 -10
- package/examples/minimal-extension/scripts/build.mjs +32 -32
- package/examples/minimal-extension/scripts/export.mjs +72 -72
- package/examples/minimal-extension/scripts/test-node.mjs +75 -75
- package/examples/minimal-extension/src/extension.tsx +90 -90
- package/examples/minimal-extension/src/preview.tsx +12 -12
- package/examples/minimal-extension/src/source.ts +4 -4
- package/examples/minimal-extension/tsconfig.json +14 -14
- package/examples/sci-fi-theme/README-ch.md +133 -133
- package/examples/sci-fi-theme/README.md +148 -148
- package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
- package/examples/sci-fi-theme/demo/demo.css +638 -638
- package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
- package/examples/sci-fi-theme/demo/index.html +13 -13
- package/examples/sci-fi-theme/demo/main.tsx +215 -215
- package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
- package/examples/sci-fi-theme/docs/design-system.md +474 -474
- package/examples/sci-fi-theme/package.json +28 -28
- package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
- package/examples/sci-fi-theme/src/components.css +2370 -2370
- package/examples/sci-fi-theme/src/index.ts +6 -6
- package/examples/sci-fi-theme/src/notch.css +142 -142
- package/examples/sci-fi-theme/src/sci-fi.css +7 -7
- package/examples/sci-fi-theme/src/theme.ts +39 -39
- package/examples/sci-fi-theme/tsconfig.json +20 -20
- package/examples/sci-fi-theme/vite.config.ts +24 -24
- package/examples/tetris-package/LICENSE +21 -21
- package/examples/tetris-package/NOTICES.md +11 -11
- package/examples/tetris-package/README-ch.md +91 -91
- package/examples/tetris-package/README.md +95 -95
- package/examples/tetris-package/package.json +35 -35
- package/examples/tetris-package/sample/document.reactive.md +16 -16
- package/examples/tetris-package/scripts/build-export.mjs +44 -44
- package/examples/tetris-package/scripts/build.mjs +130 -130
- package/examples/tetris-package/scripts/verify.mjs +173 -173
- package/examples/tetris-package/src/component.css +145 -145
- package/examples/tetris-package/src/components.tsx +334 -334
- package/examples/tetris-package/src/harness.tsx +34 -34
- package/examples/tetris-package/src/manifests.ts +93 -93
- package/examples/tetris-package/src/node-entry.ts +16 -16
- package/examples/tetris-package/src/sample.ts +4 -4
- package/examples/tetris-package/src/tetris-engine.ts +325 -325
- package/examples/tetris-package/tsconfig.json +15 -15
- package/package.json +7 -1
- package/dist-library/compiler-eOfcinZs.js +0 -62
- package/dist-library/component-state-BoLCGee4.js +0 -801
- package/dist-library/preset-core-CKc5YXSM.js +0 -1443
- package/dist-library/react-D5iGiUdL.js +0 -7
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { f as e, l as t, r as n, u as r } from "./latex-1w7aQgD5.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { $ as
|
|
2
|
+
import { C as i, D as a, T as o, a as s, b as c, j as l, k as u, w as d, x as f, y as p } from "./version-DAxuGOG2.js";
|
|
3
|
+
import { _ as m, f as h, g, h as _, l as v, o as y, r as b, v as x, y as S } from "./document-theme-C8J6UyNO.js";
|
|
4
|
+
import { a as C, c as w, i as T, o as E, t as D } from "./compile-Dx6Uw3D9.js";
|
|
5
|
+
import { $ as O, B as k, C as A, D as j, E as M, F as N, G as P, H as ee, I as F, K as I, L, N as R, O as te, P as ne, Q as z, R as B, S as re, T as V, U as ie, V as ae, W as oe, X as H, Z as se, _ as ce, d as U, et as le, f as ue, h as W, j as de, k as G, l as K, m as q, p as fe, q as J, s as pe, u as me, w as he, z as Y } from "./validation-B3RI0xOk.js";
|
|
6
|
+
import { C as ge, b as _e, x as ve } from "./config-validation-D3D7Dy2J.js";
|
|
7
|
+
import { n as ye, t as be } from "./types-daDo2c_w.js";
|
|
8
|
+
import { k as xe } from "./preset-core-DeZPA8IE.js";
|
|
6
9
|
import { o as Se } from "./props-sJ8vk0cr.js";
|
|
7
|
-
import { _ as Ce, a as we, b as X, c as Te, d as Ee, f as Z, g as De, h as Oe, i as ke, l as Ae, m as je, o as Me, p as Ne, s as Pe, u as Fe, v as Ie, y as Le } from "./registry-core-
|
|
10
|
+
import { _ as Ce, a as we, b as X, c as Te, d as Ee, f as Z, g as De, h as Oe, i as ke, l as Ae, m as je, o as Me, p as Ne, s as Pe, u as Fe, v as Ie, y as Le } from "./registry-core-C9xOunaw.js";
|
|
8
11
|
// node_modules/bail/index.js
|
|
9
12
|
function Re(e) {
|
|
10
13
|
if (e) throw e;
|
|
@@ -2651,7 +2654,7 @@ function kt(e) {
|
|
|
2651
2654
|
return t;
|
|
2652
2655
|
function r(n) {
|
|
2653
2656
|
if (n === null) e.consume(n);
|
|
2654
|
-
else return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"),
|
|
2657
|
+
else return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), F(e, t, "linePrefix");
|
|
2655
2658
|
}
|
|
2656
2659
|
function i(t) {
|
|
2657
2660
|
return e.enter("paragraph"), a(t);
|
|
@@ -2665,7 +2668,7 @@ function kt(e) {
|
|
|
2665
2668
|
}
|
|
2666
2669
|
function o(t) {
|
|
2667
2670
|
if (t === null) e.exit("chunkText"), e.exit("paragraph"), e.consume(t);
|
|
2668
|
-
else return
|
|
2671
|
+
else return P(t) ? (e.consume(t), e.exit("chunkText"), a) : (e.consume(t), o);
|
|
2669
2672
|
}
|
|
2670
2673
|
}
|
|
2671
2674
|
// node_modules/micromark-util-edit-map/index.js
|
|
@@ -2766,7 +2769,7 @@ function Pt(e) {
|
|
|
2766
2769
|
}
|
|
2767
2770
|
function h(n) {
|
|
2768
2771
|
if (n === null) g(e.exit("chunkFlow"), !0), _(0), e.consume(n);
|
|
2769
|
-
else return
|
|
2772
|
+
else return P(n) ? (e.consume(n), g(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(n), h);
|
|
2770
2773
|
}
|
|
2771
2774
|
function g(e, n) {
|
|
2772
2775
|
let s = t.sliceStream(e);
|
|
@@ -2799,7 +2802,7 @@ function Pt(e) {
|
|
|
2799
2802
|
}
|
|
2800
2803
|
}
|
|
2801
2804
|
function Ft(e, t, n) {
|
|
2802
|
-
return
|
|
2805
|
+
return F(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
2803
2806
|
}
|
|
2804
2807
|
// node_modules/micromark-core-commonmark/lib/attention.js
|
|
2805
2808
|
var It = {
|
|
@@ -2832,7 +2835,7 @@ function Lt(e, t) {
|
|
|
2832
2835
|
start: { ...c.start },
|
|
2833
2836
|
end: { ...l.end }
|
|
2834
2837
|
};
|
|
2835
|
-
e[i][1].end = { ...c.start }, e[n][1].start = { ...l.end }, r = [], e[i][1].end.offset - e[i][1].start.offset && (r =
|
|
2838
|
+
e[i][1].end = { ...c.start }, e[n][1].start = { ...l.end }, r = [], e[i][1].end.offset - e[i][1].start.offset && (r = z(r, [[
|
|
2836
2839
|
"enter",
|
|
2837
2840
|
e[i][1],
|
|
2838
2841
|
t
|
|
@@ -2840,7 +2843,7 @@ function Lt(e, t) {
|
|
|
2840
2843
|
"exit",
|
|
2841
2844
|
e[i][1],
|
|
2842
2845
|
t
|
|
2843
|
-
]])), r =
|
|
2846
|
+
]])), r = z(r, [
|
|
2844
2847
|
[
|
|
2845
2848
|
"enter",
|
|
2846
2849
|
d,
|
|
@@ -2861,7 +2864,7 @@ function Lt(e, t) {
|
|
|
2861
2864
|
u,
|
|
2862
2865
|
t
|
|
2863
2866
|
]
|
|
2864
|
-
]), r =
|
|
2867
|
+
]), r = z(r, ne(t.parser.constructs.insideSpan.null, e.slice(i + 1, n), t)), r = z(r, [
|
|
2865
2868
|
[
|
|
2866
2869
|
"exit",
|
|
2867
2870
|
u,
|
|
@@ -2884,7 +2887,7 @@ function Lt(e, t) {
|
|
|
2884
2887
|
]
|
|
2885
2888
|
]);
|
|
2886
2889
|
let f = 0;
|
|
2887
|
-
e[n][1].end.offset - e[n][1].start.offset && (f = 2, r =
|
|
2890
|
+
e[n][1].end.offset - e[n][1].start.offset && (f = 2, r = z(r, [[
|
|
2888
2891
|
"enter",
|
|
2889
2892
|
e[n][1],
|
|
2890
2893
|
t
|
|
@@ -2892,7 +2895,7 @@ function Lt(e, t) {
|
|
|
2892
2895
|
"exit",
|
|
2893
2896
|
e[n][1],
|
|
2894
2897
|
t
|
|
2895
|
-
]])),
|
|
2898
|
+
]])), O(e, i - 1, n - i + 3, r), n = i + r.length - f - 2;
|
|
2896
2899
|
break;
|
|
2897
2900
|
}
|
|
2898
2901
|
}
|
|
@@ -2900,14 +2903,14 @@ function Lt(e, t) {
|
|
|
2900
2903
|
return e;
|
|
2901
2904
|
}
|
|
2902
2905
|
function Rt(e, t) {
|
|
2903
|
-
let n = this.parser.constructs.attentionMarkers.null, r = this.previous, i =
|
|
2906
|
+
let n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = N(r), a;
|
|
2904
2907
|
return o;
|
|
2905
2908
|
function o(t) {
|
|
2906
2909
|
return a = t, e.enter("attentionSequence"), s(t);
|
|
2907
2910
|
}
|
|
2908
2911
|
function s(o) {
|
|
2909
2912
|
if (o === a) return e.consume(o), s;
|
|
2910
|
-
let c = e.exit("attentionSequence"), l =
|
|
2913
|
+
let c = e.exit("attentionSequence"), l = N(o), u = !l || l === 2 && i || n.includes(o) && o !== 42 && o !== 95, d = !i || i === 2 && l || n.includes(r) && r !== 42 && r !== 95;
|
|
2911
2914
|
return c._open = !!(a === 42 ? u : u && (i || !d)), c._close = !!(a === 42 ? d : d && (l || !u)), t(o);
|
|
2912
2915
|
}
|
|
2913
2916
|
}
|
|
@@ -2926,28 +2929,28 @@ function Vt(e, t, n) {
|
|
|
2926
2929
|
return e.enter("autolink"), e.enter("autolinkMarker"), e.consume(t), e.exit("autolinkMarker"), e.enter("autolinkProtocol"), a;
|
|
2927
2930
|
}
|
|
2928
2931
|
function a(t) {
|
|
2929
|
-
return
|
|
2932
|
+
return B(t) ? (e.consume(t), o) : t === 64 ? n(t) : l(t);
|
|
2930
2933
|
}
|
|
2931
2934
|
function o(e) {
|
|
2932
|
-
return e === 43 || e === 45 || e === 46 ||
|
|
2935
|
+
return e === 43 || e === 45 || e === 46 || Y(e) ? (r = 1, s(e)) : l(e);
|
|
2933
2936
|
}
|
|
2934
2937
|
function s(t) {
|
|
2935
|
-
return t === 58 ? (e.consume(t), r = 0, c) : (t === 43 || t === 45 || t === 46 ||
|
|
2938
|
+
return t === 58 ? (e.consume(t), r = 0, c) : (t === 43 || t === 45 || t === 46 || Y(t)) && r++ < 32 ? (e.consume(t), s) : (r = 0, l(t));
|
|
2936
2939
|
}
|
|
2937
2940
|
function c(r) {
|
|
2938
|
-
return r === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(r), e.exit("autolinkMarker"), e.exit("autolink"), t) : r === null || r === 32 || r === 60 ||
|
|
2941
|
+
return r === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(r), e.exit("autolinkMarker"), e.exit("autolink"), t) : r === null || r === 32 || r === 60 || ae(r) ? n(r) : (e.consume(r), c);
|
|
2939
2942
|
}
|
|
2940
2943
|
function l(t) {
|
|
2941
|
-
return t === 64 ? (e.consume(t), u) :
|
|
2944
|
+
return t === 64 ? (e.consume(t), u) : k(t) ? (e.consume(t), l) : n(t);
|
|
2942
2945
|
}
|
|
2943
2946
|
function u(e) {
|
|
2944
|
-
return
|
|
2947
|
+
return Y(e) ? d(e) : n(e);
|
|
2945
2948
|
}
|
|
2946
2949
|
function d(n) {
|
|
2947
2950
|
return n === 46 ? (e.consume(n), r = 0, u) : n === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(n), e.exit("autolinkMarker"), e.exit("autolink"), t) : f(n);
|
|
2948
2951
|
}
|
|
2949
2952
|
function f(t) {
|
|
2950
|
-
if ((t === 45 ||
|
|
2953
|
+
if ((t === 45 || Y(t)) && r++ < 63) {
|
|
2951
2954
|
let n = t === 45 ? f : d;
|
|
2952
2955
|
return e.consume(t), n;
|
|
2953
2956
|
}
|
|
@@ -2972,14 +2975,14 @@ function Ut(e, t, n) {
|
|
|
2972
2975
|
return n(t);
|
|
2973
2976
|
}
|
|
2974
2977
|
function a(n) {
|
|
2975
|
-
return
|
|
2978
|
+
return J(n) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(n), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), t) : (e.exit("blockQuotePrefix"), t(n));
|
|
2976
2979
|
}
|
|
2977
2980
|
}
|
|
2978
2981
|
function Wt(e, t, n) {
|
|
2979
2982
|
let r = this;
|
|
2980
2983
|
return i;
|
|
2981
2984
|
function i(t) {
|
|
2982
|
-
return
|
|
2985
|
+
return J(t) ? F(e, a, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : a(t);
|
|
2983
2986
|
}
|
|
2984
2987
|
function a(r) {
|
|
2985
2988
|
return e.attempt(Ht, t, n)(r);
|
|
@@ -2999,7 +3002,7 @@ function qt(e, t, n) {
|
|
|
2999
3002
|
return e.enter("characterEscape"), e.enter("escapeMarker"), e.consume(t), e.exit("escapeMarker"), i;
|
|
3000
3003
|
}
|
|
3001
3004
|
function i(r) {
|
|
3002
|
-
return
|
|
3005
|
+
return oe(r) ? (e.enter("characterEscapeValue"), e.consume(r), e.exit("characterEscapeValue"), e.exit("characterEscape"), t) : n(r);
|
|
3003
3006
|
}
|
|
3004
3007
|
}
|
|
3005
3008
|
// node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
@@ -3014,15 +3017,15 @@ function Yt(e, t, n) {
|
|
|
3014
3017
|
return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(t), e.exit("characterReferenceMarker"), c;
|
|
3015
3018
|
}
|
|
3016
3019
|
function c(t) {
|
|
3017
|
-
return t === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(t), e.exit("characterReferenceMarkerNumeric"), l) : (e.enter("characterReferenceValue"), a = 31, o =
|
|
3020
|
+
return t === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(t), e.exit("characterReferenceMarkerNumeric"), l) : (e.enter("characterReferenceValue"), a = 31, o = Y, u(t));
|
|
3018
3021
|
}
|
|
3019
3022
|
function l(t) {
|
|
3020
|
-
return t === 88 || t === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(t), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), a = 6, o =
|
|
3023
|
+
return t === 88 || t === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(t), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), a = 6, o = ie, u) : (e.enter("characterReferenceValue"), a = 7, o = ee, u(t));
|
|
3021
3024
|
}
|
|
3022
3025
|
function u(s) {
|
|
3023
3026
|
if (s === 59 && i) {
|
|
3024
3027
|
let i = e.exit("characterReferenceValue");
|
|
3025
|
-
return o ===
|
|
3028
|
+
return o === Y && !Et(r.sliceSerialize(i)) ? n(s) : (e.enter("characterReferenceMarker"), e.consume(s), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
|
|
3026
3029
|
}
|
|
3027
3030
|
return o(s) && i++ < a ? (e.consume(s), u) : n(s);
|
|
3028
3031
|
}
|
|
@@ -3062,19 +3065,19 @@ function $t(e, t, n) {
|
|
|
3062
3065
|
return a = n && n[1].type === "linePrefix" ? n[2].sliceSerialize(n[1], !0).length : 0, s = t, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), u(t);
|
|
3063
3066
|
}
|
|
3064
3067
|
function u(t) {
|
|
3065
|
-
return t === s ? (o++, e.consume(t), u) : o < 3 ? n(t) : (e.exit("codeFencedFenceSequence"),
|
|
3068
|
+
return t === s ? (o++, e.consume(t), u) : o < 3 ? n(t) : (e.exit("codeFencedFenceSequence"), J(t) ? F(e, d, "whitespace")(t) : d(t));
|
|
3066
3069
|
}
|
|
3067
3070
|
function d(n) {
|
|
3068
|
-
return n === null ||
|
|
3071
|
+
return n === null || P(n) ? (e.exit("codeFencedFence"), r.interrupt ? t(n) : e.check(Xt, h, b)(n)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", { contentType: "string" }), f(n));
|
|
3069
3072
|
}
|
|
3070
3073
|
function f(t) {
|
|
3071
|
-
return t === null ||
|
|
3074
|
+
return t === null || P(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(t)) : J(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), F(e, p, "whitespace")(t)) : t === 96 && t === s ? n(t) : (e.consume(t), f);
|
|
3072
3075
|
}
|
|
3073
3076
|
function p(t) {
|
|
3074
|
-
return t === null ||
|
|
3077
|
+
return t === null || P(t) ? d(t) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", { contentType: "string" }), m(t));
|
|
3075
3078
|
}
|
|
3076
3079
|
function m(t) {
|
|
3077
|
-
return t === null ||
|
|
3080
|
+
return t === null || P(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), d(t)) : t === 96 && t === s ? n(t) : (e.consume(t), m);
|
|
3078
3081
|
}
|
|
3079
3082
|
function h(t) {
|
|
3080
3083
|
return e.attempt(i, b, g)(t);
|
|
@@ -3083,13 +3086,13 @@ function $t(e, t, n) {
|
|
|
3083
3086
|
return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), _;
|
|
3084
3087
|
}
|
|
3085
3088
|
function _(t) {
|
|
3086
|
-
return a > 0 &&
|
|
3089
|
+
return a > 0 && J(t) ? F(e, v, "linePrefix", a + 1)(t) : v(t);
|
|
3087
3090
|
}
|
|
3088
3091
|
function v(t) {
|
|
3089
|
-
return t === null ||
|
|
3092
|
+
return t === null || P(t) ? e.check(Xt, h, b)(t) : (e.enter("codeFlowValue"), y(t));
|
|
3090
3093
|
}
|
|
3091
3094
|
function y(t) {
|
|
3092
|
-
return t === null ||
|
|
3095
|
+
return t === null || P(t) ? (e.exit("codeFlowValue"), v(t)) : (e.consume(t), y);
|
|
3093
3096
|
}
|
|
3094
3097
|
function b(n) {
|
|
3095
3098
|
return e.exit("codeFenced"), t(n);
|
|
@@ -3101,16 +3104,16 @@ function $t(e, t, n) {
|
|
|
3101
3104
|
return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), c;
|
|
3102
3105
|
}
|
|
3103
3106
|
function c(t) {
|
|
3104
|
-
return e.enter("codeFencedFence"),
|
|
3107
|
+
return e.enter("codeFencedFence"), J(t) ? F(e, l, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : l(t);
|
|
3105
3108
|
}
|
|
3106
3109
|
function l(t) {
|
|
3107
3110
|
return t === s ? (e.enter("codeFencedFenceSequence"), u(t)) : n(t);
|
|
3108
3111
|
}
|
|
3109
3112
|
function u(t) {
|
|
3110
|
-
return t === s ? (i++, e.consume(t), u) : i >= o ? (e.exit("codeFencedFenceSequence"),
|
|
3113
|
+
return t === s ? (i++, e.consume(t), u) : i >= o ? (e.exit("codeFencedFenceSequence"), J(t) ? F(e, d, "whitespace")(t) : d(t)) : n(t);
|
|
3111
3114
|
}
|
|
3112
3115
|
function d(r) {
|
|
3113
|
-
return r === null ||
|
|
3116
|
+
return r === null || P(r) ? (e.exit("codeFencedFence"), t(r)) : n(r);
|
|
3114
3117
|
}
|
|
3115
3118
|
}
|
|
3116
3119
|
}
|
|
@@ -3125,13 +3128,13 @@ var en = {
|
|
|
3125
3128
|
function nn(e, t, n) {
|
|
3126
3129
|
return r;
|
|
3127
3130
|
function r(t) {
|
|
3128
|
-
return e.enter("codeIndented"),
|
|
3131
|
+
return e.enter("codeIndented"), L(e, i, n, "linePrefix", 4, 4)(t);
|
|
3129
3132
|
}
|
|
3130
3133
|
function i(t) {
|
|
3131
|
-
return t === null ? o(t) :
|
|
3134
|
+
return t === null ? o(t) : P(t) ? e.attempt(tn, i, o)(t) : (e.enter("codeFlowValue"), a(t));
|
|
3132
3135
|
}
|
|
3133
3136
|
function a(t) {
|
|
3134
|
-
return t === null ||
|
|
3137
|
+
return t === null || P(t) ? (e.exit("codeFlowValue"), i(t)) : (e.consume(t), a);
|
|
3135
3138
|
}
|
|
3136
3139
|
function o(n) {
|
|
3137
3140
|
return e.exit("codeIndented"), t(n);
|
|
@@ -3141,10 +3144,10 @@ function rn(e, t, n) {
|
|
|
3141
3144
|
let r = this;
|
|
3142
3145
|
return i;
|
|
3143
3146
|
function i(o) {
|
|
3144
|
-
return r.parser.lazy[r.now().line] ? n(o) :
|
|
3147
|
+
return r.parser.lazy[r.now().line] ? n(o) : P(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), i) : L(e, t, a, "linePrefix", 4, 4)(o);
|
|
3145
3148
|
}
|
|
3146
3149
|
function a(e) {
|
|
3147
|
-
return
|
|
3150
|
+
return P(e) ? i(e) : n(e);
|
|
3148
3151
|
}
|
|
3149
3152
|
}
|
|
3150
3153
|
// node_modules/micromark-core-commonmark/lib/code-text.js
|
|
@@ -3178,10 +3181,10 @@ function cn(e, t, n) {
|
|
|
3178
3181
|
return t === 96 ? (e.consume(t), r++, s) : (e.exit("codeTextSequence"), c(t));
|
|
3179
3182
|
}
|
|
3180
3183
|
function c(t) {
|
|
3181
|
-
return t === null ? n(t) : t === 32 ? (e.enter("space"), e.consume(t), e.exit("space"), c) : t === 96 ? (a = e.enter("codeTextSequence"), i = 0, u(t)) :
|
|
3184
|
+
return t === null ? n(t) : t === 32 ? (e.enter("space"), e.consume(t), e.exit("space"), c) : t === 96 ? (a = e.enter("codeTextSequence"), i = 0, u(t)) : P(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), c) : (e.enter("codeTextData"), l(t));
|
|
3182
3185
|
}
|
|
3183
3186
|
function l(t) {
|
|
3184
|
-
return t === null || t === 32 || t === 96 ||
|
|
3187
|
+
return t === null || t === 32 || t === 96 || P(t) ? (e.exit("codeTextData"), c(t)) : (e.consume(t), l);
|
|
3185
3188
|
}
|
|
3186
3189
|
function u(n) {
|
|
3187
3190
|
return n === 96 ? (e.consume(n), i++, u) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(n)) : (a.type = "codeTextData", l(n));
|
|
@@ -3257,7 +3260,7 @@ function dn(e) {
|
|
|
3257
3260
|
i && (r[1].end = { ...u.get(i)[1].start }, s = u.slice(i, n), s.unshift(r), u.splice(i, n - i + 1, s));
|
|
3258
3261
|
}
|
|
3259
3262
|
}
|
|
3260
|
-
return
|
|
3263
|
+
return O(e, 0, Infinity, u.slice(0)), !l;
|
|
3261
3264
|
}
|
|
3262
3265
|
function fn(e, t) {
|
|
3263
3266
|
let n = e.get(t)[1], r = e.get(t)[2], i = t - 1, a = [], o = n._tokenizer;
|
|
@@ -3293,7 +3296,7 @@ function gn(e, t) {
|
|
|
3293
3296
|
return e.enter("content"), n = e.enter("chunkContent", { contentType: "content" }), i(t);
|
|
3294
3297
|
}
|
|
3295
3298
|
function i(t) {
|
|
3296
|
-
return t === null ? a(t) :
|
|
3299
|
+
return t === null ? a(t) : P(t) ? e.check(mn, o, a)(t) : (e.consume(t), i);
|
|
3297
3300
|
}
|
|
3298
3301
|
function a(n) {
|
|
3299
3302
|
return e.exit("chunkContent"), e.exit("content"), t(n);
|
|
@@ -3309,10 +3312,10 @@ function _n(e, t, n) {
|
|
|
3309
3312
|
let r = this;
|
|
3310
3313
|
return i;
|
|
3311
3314
|
function i(t) {
|
|
3312
|
-
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"),
|
|
3315
|
+
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), F(e, a, "linePrefix");
|
|
3313
3316
|
}
|
|
3314
3317
|
function a(i) {
|
|
3315
|
-
if (i === null ||
|
|
3318
|
+
if (i === null || P(i)) return n(i);
|
|
3316
3319
|
let a = r.events[r.events.length - 1];
|
|
3317
3320
|
return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(i) : e.interrupt(r.parser.constructs.flow, n, t)(i);
|
|
3318
3321
|
}
|
|
@@ -3322,19 +3325,19 @@ function vn(e, t, n, r, i, a, o, s, c) {
|
|
|
3322
3325
|
let l = c || Infinity, u = 0;
|
|
3323
3326
|
return d;
|
|
3324
3327
|
function d(t) {
|
|
3325
|
-
return t === 60 ? (e.enter(r), e.enter(i), e.enter(a), e.consume(t), e.exit(a), f) : t === null || t === 32 || t === 41 ||
|
|
3328
|
+
return t === 60 ? (e.enter(r), e.enter(i), e.enter(a), e.consume(t), e.exit(a), f) : t === null || t === 32 || t === 41 || ae(t) ? n(t) : (e.enter(r), e.enter(o), e.enter(s), e.enter("chunkString", { contentType: "string" }), h(t));
|
|
3326
3329
|
}
|
|
3327
3330
|
function f(n) {
|
|
3328
3331
|
return n === 62 ? (e.enter(a), e.consume(n), e.exit(a), e.exit(i), e.exit(r), t) : (e.enter(s), e.enter("chunkString", { contentType: "string" }), p(n));
|
|
3329
3332
|
}
|
|
3330
3333
|
function p(t) {
|
|
3331
|
-
return t === 62 ? (e.exit("chunkString"), e.exit(s), f(t)) : t === null || t === 60 ||
|
|
3334
|
+
return t === 62 ? (e.exit("chunkString"), e.exit(s), f(t)) : t === null || t === 60 || P(t) ? n(t) : (e.consume(t), t === 92 ? m : p);
|
|
3332
3335
|
}
|
|
3333
3336
|
function m(t) {
|
|
3334
3337
|
return t === 60 || t === 62 || t === 92 ? (e.consume(t), p) : p(t);
|
|
3335
3338
|
}
|
|
3336
3339
|
function h(i) {
|
|
3337
|
-
return !u && (i === null || i === 41 ||
|
|
3340
|
+
return !u && (i === null || i === 41 || I(i)) ? (e.exit("chunkString"), e.exit(s), e.exit(o), e.exit(r), t(i)) : u < l && i === 40 ? (e.consume(i), u++, h) : i === 41 ? (e.consume(i), u--, h) : i === null || i === 32 || i === 40 || ae(i) ? n(i) : (e.consume(i), i === 92 ? g : h);
|
|
3338
3341
|
}
|
|
3339
3342
|
function g(t) {
|
|
3340
3343
|
return t === 40 || t === 41 || t === 92 ? (e.consume(t), h) : h(t);
|
|
@@ -3350,10 +3353,10 @@ function yn(e, t, n, r, i, a) {
|
|
|
3350
3353
|
function u(l) {
|
|
3351
3354
|
return s > 999 || l === null || l === 91 || l === 93 && !c ||
|
|
3352
3355
|
/* c8 ignore next 3 */
|
|
3353
|
-
l === 94 && !s && "_hiddenFootnoteSupport" in o.parser.constructs ? n(l) : l === 93 ? (e.exit(a), e.enter(i), e.consume(l), e.exit(i), e.exit(r), t) :
|
|
3356
|
+
l === 94 && !s && "_hiddenFootnoteSupport" in o.parser.constructs ? n(l) : l === 93 ? (e.exit(a), e.enter(i), e.consume(l), e.exit(i), e.exit(r), t) : P(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), u) : (e.enter("chunkString", { contentType: "string" }), d(l));
|
|
3354
3357
|
}
|
|
3355
3358
|
function d(t) {
|
|
3356
|
-
return t === null || t === 91 || t === 93 ||
|
|
3359
|
+
return t === null || t === 91 || t === 93 || P(t) || s++ > 999 ? (e.exit("chunkString"), u(t)) : (e.consume(t), c ||= !J(t), t === 92 ? f : d);
|
|
3357
3360
|
}
|
|
3358
3361
|
function f(t) {
|
|
3359
3362
|
return t === 91 || t === 92 || t === 93 ? (e.consume(t), s++, d) : d(t);
|
|
@@ -3370,10 +3373,10 @@ function bn(e, t, n, r, i, a) {
|
|
|
3370
3373
|
return n === o ? (e.enter(i), e.consume(n), e.exit(i), e.exit(r), t) : (e.enter(a), l(n));
|
|
3371
3374
|
}
|
|
3372
3375
|
function l(t) {
|
|
3373
|
-
return t === o ? (e.exit(a), c(o)) : t === null ? n(t) :
|
|
3376
|
+
return t === o ? (e.exit(a), c(o)) : t === null ? n(t) : P(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), F(e, l, "linePrefix")) : (e.enter("chunkString", { contentType: "string" }), u(t));
|
|
3374
3377
|
}
|
|
3375
3378
|
function u(t) {
|
|
3376
|
-
return t === o || t === null ||
|
|
3379
|
+
return t === o || t === null || P(t) ? (e.exit("chunkString"), l(t)) : (e.consume(t), t === 92 ? d : u);
|
|
3377
3380
|
}
|
|
3378
3381
|
function d(t) {
|
|
3379
3382
|
return t === o || t === 92 ? (e.consume(t), u) : u(t);
|
|
@@ -3384,7 +3387,7 @@ function xn(e, t) {
|
|
|
3384
3387
|
let n;
|
|
3385
3388
|
return r;
|
|
3386
3389
|
function r(i) {
|
|
3387
|
-
return
|
|
3390
|
+
return P(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), n = !0, r) : J(i) ? F(e, r, n ? "linePrefix" : "lineSuffix")(i) : t(i);
|
|
3388
3391
|
}
|
|
3389
3392
|
}
|
|
3390
3393
|
// node_modules/micromark-core-commonmark/lib/definition.js
|
|
@@ -3405,10 +3408,10 @@ function wn(e, t, n) {
|
|
|
3405
3408
|
return yn.call(r, e, s, n, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(t);
|
|
3406
3409
|
}
|
|
3407
3410
|
function s(t) {
|
|
3408
|
-
return i =
|
|
3411
|
+
return i = H(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)), t === 58 ? (e.enter("definitionMarker"), e.consume(t), e.exit("definitionMarker"), c) : n(t);
|
|
3409
3412
|
}
|
|
3410
3413
|
function c(t) {
|
|
3411
|
-
return
|
|
3414
|
+
return I(t) ? xn(e, l)(t) : l(t);
|
|
3412
3415
|
}
|
|
3413
3416
|
function l(t) {
|
|
3414
3417
|
return vn(e, u, n, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")(t);
|
|
@@ -3417,25 +3420,25 @@ function wn(e, t, n) {
|
|
|
3417
3420
|
return e.attempt(Cn, d, d)(t);
|
|
3418
3421
|
}
|
|
3419
3422
|
function d(t) {
|
|
3420
|
-
return
|
|
3423
|
+
return J(t) ? F(e, f, "whitespace")(t) : f(t);
|
|
3421
3424
|
}
|
|
3422
3425
|
function f(a) {
|
|
3423
|
-
return a === null ||
|
|
3426
|
+
return a === null || P(a) ? (e.exit("definition"), r.parser.defined.push(i), t(a)) : n(a);
|
|
3424
3427
|
}
|
|
3425
3428
|
}
|
|
3426
3429
|
function Tn(e, t, n) {
|
|
3427
3430
|
return r;
|
|
3428
3431
|
function r(t) {
|
|
3429
|
-
return
|
|
3432
|
+
return I(t) ? xn(e, i)(t) : n(t);
|
|
3430
3433
|
}
|
|
3431
3434
|
function i(t) {
|
|
3432
3435
|
return bn(e, a, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(t);
|
|
3433
3436
|
}
|
|
3434
3437
|
function a(t) {
|
|
3435
|
-
return
|
|
3438
|
+
return J(t) ? F(e, o, "whitespace")(t) : o(t);
|
|
3436
3439
|
}
|
|
3437
3440
|
function o(e) {
|
|
3438
|
-
return e === null ||
|
|
3441
|
+
return e === null || P(e) ? t(e) : n(e);
|
|
3439
3442
|
}
|
|
3440
3443
|
}
|
|
3441
3444
|
// node_modules/micromark-core-commonmark/lib/hard-break-escape.js
|
|
@@ -3449,7 +3452,7 @@ function Dn(e, t, n) {
|
|
|
3449
3452
|
return e.enter("hardBreakEscape"), e.consume(t), i;
|
|
3450
3453
|
}
|
|
3451
3454
|
function i(r) {
|
|
3452
|
-
return
|
|
3455
|
+
return P(r) ? (e.exit("hardBreakEscape"), t(r)) : n(r);
|
|
3453
3456
|
}
|
|
3454
3457
|
}
|
|
3455
3458
|
// node_modules/micromark-core-commonmark/lib/heading-atx.js
|
|
@@ -3471,7 +3474,7 @@ function kn(e, t) {
|
|
|
3471
3474
|
end: e[n][1].end,
|
|
3472
3475
|
contentType: "text"
|
|
3473
3476
|
};
|
|
3474
|
-
|
|
3477
|
+
O(e, r, n - r + 1, [
|
|
3475
3478
|
[
|
|
3476
3479
|
"enter",
|
|
3477
3480
|
i,
|
|
@@ -3506,16 +3509,16 @@ function An(e, t, n) {
|
|
|
3506
3509
|
return e.enter("atxHeadingSequence"), o(t);
|
|
3507
3510
|
}
|
|
3508
3511
|
function o(t) {
|
|
3509
|
-
return t === 35 && r++ < 6 ? (e.consume(t), o) : t === null ||
|
|
3512
|
+
return t === 35 && r++ < 6 ? (e.consume(t), o) : t === null || I(t) ? (e.exit("atxHeadingSequence"), s(t)) : n(t);
|
|
3510
3513
|
}
|
|
3511
3514
|
function s(n) {
|
|
3512
|
-
return n === 35 ? (e.enter("atxHeadingSequence"), c(n)) : n === null ||
|
|
3515
|
+
return n === 35 ? (e.enter("atxHeadingSequence"), c(n)) : n === null || P(n) ? (e.exit("atxHeading"), t(n)) : J(n) ? F(e, s, "whitespace")(n) : (e.enter("atxHeadingText"), l(n));
|
|
3513
3516
|
}
|
|
3514
3517
|
function c(t) {
|
|
3515
3518
|
return t === 35 ? (e.consume(t), c) : (e.exit("atxHeadingSequence"), s(t));
|
|
3516
3519
|
}
|
|
3517
3520
|
function l(t) {
|
|
3518
|
-
return t === null || t === 35 ||
|
|
3521
|
+
return t === null || t === 35 || I(t) ? (e.exit("atxHeadingText"), s(t)) : (e.consume(t), l);
|
|
3519
3522
|
}
|
|
3520
3523
|
}
|
|
3521
3524
|
// node_modules/micromark-util-html-tag-name/index.js
|
|
@@ -3548,74 +3551,74 @@ function In(e, t, n) {
|
|
|
3548
3551
|
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(t), d;
|
|
3549
3552
|
}
|
|
3550
3553
|
function d(s) {
|
|
3551
|
-
return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t :
|
|
3554
|
+
return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : L) : B(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
|
|
3552
3555
|
}
|
|
3553
3556
|
function f(a) {
|
|
3554
|
-
return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) :
|
|
3557
|
+
return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : B(a) ? (e.consume(a), i = 4, r.interrupt ? t : L) : n(a);
|
|
3555
3558
|
}
|
|
3556
3559
|
function p(i) {
|
|
3557
|
-
return i === 45 ? (e.consume(i), r.interrupt ? t :
|
|
3560
|
+
return i === 45 ? (e.consume(i), r.interrupt ? t : L) : n(i);
|
|
3558
3561
|
}
|
|
3559
3562
|
function m(i) {
|
|
3560
3563
|
return i === "CDATA[".charCodeAt(s++) ? (e.consume(i), s === 6 ? r.interrupt ? t : O : m) : n(i);
|
|
3561
3564
|
}
|
|
3562
3565
|
function h(t) {
|
|
3563
|
-
return
|
|
3566
|
+
return B(t) ? (e.consume(t), o = String.fromCharCode(t), g) : n(t);
|
|
3564
3567
|
}
|
|
3565
3568
|
function g(s) {
|
|
3566
|
-
if (s === null || s === 47 || s === 62 ||
|
|
3569
|
+
if (s === null || s === 47 || s === 62 || I(s)) {
|
|
3567
3570
|
let c = s === 47, l = o.toLowerCase();
|
|
3568
3571
|
return !c && !a && Mn.includes(l) ? (i = 1, r.interrupt ? t(s) : O(s)) : jn.includes(o.toLowerCase()) ? (i = 6, c ? (e.consume(s), _) : r.interrupt ? t(s) : O(s)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(s) : a ? v(s) : y(s));
|
|
3569
3572
|
}
|
|
3570
|
-
return s === 45 ||
|
|
3573
|
+
return s === 45 || Y(s) ? (e.consume(s), o += String.fromCharCode(s), g) : n(s);
|
|
3571
3574
|
}
|
|
3572
3575
|
function _(i) {
|
|
3573
3576
|
return i === 62 ? (e.consume(i), r.interrupt ? t : O) : n(i);
|
|
3574
3577
|
}
|
|
3575
3578
|
function v(t) {
|
|
3576
|
-
return
|
|
3579
|
+
return J(t) ? (e.consume(t), v) : E(t);
|
|
3577
3580
|
}
|
|
3578
3581
|
function y(t) {
|
|
3579
|
-
return t === 47 ? (e.consume(t), E) : t === 58 || t === 95 ||
|
|
3582
|
+
return t === 47 ? (e.consume(t), E) : t === 58 || t === 95 || B(t) ? (e.consume(t), b) : J(t) ? (e.consume(t), y) : E(t);
|
|
3580
3583
|
}
|
|
3581
3584
|
function b(t) {
|
|
3582
|
-
return t === 45 || t === 46 || t === 58 || t === 95 ||
|
|
3585
|
+
return t === 45 || t === 46 || t === 58 || t === 95 || Y(t) ? (e.consume(t), b) : x(t);
|
|
3583
3586
|
}
|
|
3584
3587
|
function x(t) {
|
|
3585
|
-
return t === 61 ? (e.consume(t), S) :
|
|
3588
|
+
return t === 61 ? (e.consume(t), S) : J(t) ? (e.consume(t), x) : y(t);
|
|
3586
3589
|
}
|
|
3587
3590
|
function S(t) {
|
|
3588
|
-
return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), c = t, C) :
|
|
3591
|
+
return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), c = t, C) : J(t) ? (e.consume(t), S) : w(t);
|
|
3589
3592
|
}
|
|
3590
3593
|
function C(t) {
|
|
3591
|
-
return t === c ? (e.consume(t), c = null, T) : t === null ||
|
|
3594
|
+
return t === c ? (e.consume(t), c = null, T) : t === null || P(t) ? n(t) : (e.consume(t), C);
|
|
3592
3595
|
}
|
|
3593
3596
|
function w(t) {
|
|
3594
|
-
return t === null || t === 34 || t === 39 || t === 47 || t === 60 || t === 61 || t === 62 || t === 96 ||
|
|
3597
|
+
return t === null || t === 34 || t === 39 || t === 47 || t === 60 || t === 61 || t === 62 || t === 96 || I(t) ? x(t) : (e.consume(t), w);
|
|
3595
3598
|
}
|
|
3596
3599
|
function T(e) {
|
|
3597
|
-
return e === 47 || e === 62 ||
|
|
3600
|
+
return e === 47 || e === 62 || J(e) ? y(e) : n(e);
|
|
3598
3601
|
}
|
|
3599
3602
|
function E(t) {
|
|
3600
3603
|
return t === 62 ? (e.consume(t), D) : n(t);
|
|
3601
3604
|
}
|
|
3602
3605
|
function D(t) {
|
|
3603
|
-
return t === null ||
|
|
3606
|
+
return t === null || P(t) ? O(t) : J(t) ? (e.consume(t), D) : n(t);
|
|
3604
3607
|
}
|
|
3605
3608
|
function O(t) {
|
|
3606
|
-
return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t),
|
|
3609
|
+
return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t), R) : t === 63 && i === 3 ? (e.consume(t), L) : t === 93 && i === 5 ? (e.consume(t), F) : P(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Pn, te, k)(t)) : t === null || P(t) ? (e.exit("htmlFlowData"), k(t)) : (e.consume(t), O);
|
|
3607
3610
|
}
|
|
3608
3611
|
function k(t) {
|
|
3609
|
-
return e.check(Xt, A,
|
|
3612
|
+
return e.check(Xt, A, te)(t);
|
|
3610
3613
|
}
|
|
3611
3614
|
function A(t) {
|
|
3612
3615
|
return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), j;
|
|
3613
3616
|
}
|
|
3614
3617
|
function j(t) {
|
|
3615
|
-
return t === null ||
|
|
3618
|
+
return t === null || P(t) ? k(t) : (e.enter("htmlFlowData"), O(t));
|
|
3616
3619
|
}
|
|
3617
3620
|
function M(t) {
|
|
3618
|
-
return t === 45 ? (e.consume(t),
|
|
3621
|
+
return t === 45 ? (e.consume(t), L) : O(t);
|
|
3619
3622
|
}
|
|
3620
3623
|
function N(t) {
|
|
3621
3624
|
return t === 47 ? (e.consume(t), o = "", ee) : O(t);
|
|
@@ -3623,27 +3626,27 @@ function In(e, t, n) {
|
|
|
3623
3626
|
function ee(t) {
|
|
3624
3627
|
if (t === 62) {
|
|
3625
3628
|
let n = o.toLowerCase();
|
|
3626
|
-
return Mn.includes(n) ? (e.consume(t),
|
|
3629
|
+
return Mn.includes(n) ? (e.consume(t), R) : O(t);
|
|
3627
3630
|
}
|
|
3628
|
-
return
|
|
3629
|
-
}
|
|
3630
|
-
function te(t) {
|
|
3631
|
-
return t === 93 ? (e.consume(t), F) : O(t);
|
|
3631
|
+
return B(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), ee) : O(t);
|
|
3632
3632
|
}
|
|
3633
3633
|
function F(t) {
|
|
3634
|
-
return t ===
|
|
3634
|
+
return t === 93 ? (e.consume(t), L) : O(t);
|
|
3635
|
+
}
|
|
3636
|
+
function L(t) {
|
|
3637
|
+
return t === 62 ? (e.consume(t), R) : t === 45 && i === 2 ? (e.consume(t), L) : O(t);
|
|
3635
3638
|
}
|
|
3636
|
-
function
|
|
3637
|
-
return t === null ||
|
|
3639
|
+
function R(t) {
|
|
3640
|
+
return t === null || P(t) ? (e.exit("htmlFlowData"), te(t)) : (e.consume(t), R);
|
|
3638
3641
|
}
|
|
3639
|
-
function
|
|
3642
|
+
function te(n) {
|
|
3640
3643
|
return e.exit("htmlFlow"), t(n);
|
|
3641
3644
|
}
|
|
3642
3645
|
}
|
|
3643
3646
|
function Ln(e, t, n) {
|
|
3644
3647
|
return r;
|
|
3645
3648
|
function r(r) {
|
|
3646
|
-
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), e.attempt(
|
|
3649
|
+
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), e.attempt(R, t, n);
|
|
3647
3650
|
}
|
|
3648
3651
|
}
|
|
3649
3652
|
// node_modules/micromark-core-commonmark/lib/html-text.js
|
|
@@ -3658,16 +3661,16 @@ function zn(e, t, n) {
|
|
|
3658
3661
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(t), c;
|
|
3659
3662
|
}
|
|
3660
3663
|
function c(t) {
|
|
3661
|
-
return t === 33 ? (e.consume(t), l) : t === 47 ? (e.consume(t), x) : t === 63 ? (e.consume(t), y) :
|
|
3664
|
+
return t === 33 ? (e.consume(t), l) : t === 47 ? (e.consume(t), x) : t === 63 ? (e.consume(t), y) : B(t) ? (e.consume(t), w) : n(t);
|
|
3662
3665
|
}
|
|
3663
3666
|
function l(t) {
|
|
3664
|
-
return t === 45 ? (e.consume(t), u) : t === 91 ? (e.consume(t), a = 0, m) :
|
|
3667
|
+
return t === 45 ? (e.consume(t), u) : t === 91 ? (e.consume(t), a = 0, m) : B(t) ? (e.consume(t), v) : n(t);
|
|
3665
3668
|
}
|
|
3666
3669
|
function u(t) {
|
|
3667
3670
|
return t === 45 ? (e.consume(t), p) : n(t);
|
|
3668
3671
|
}
|
|
3669
3672
|
function d(t) {
|
|
3670
|
-
return t === null ? n(t) : t === 45 ? (e.consume(t), f) :
|
|
3673
|
+
return t === null ? n(t) : t === 45 ? (e.consume(t), f) : P(t) ? (o = d, N(t)) : (e.consume(t), d);
|
|
3671
3674
|
}
|
|
3672
3675
|
function f(t) {
|
|
3673
3676
|
return t === 45 ? (e.consume(t), p) : d(t);
|
|
@@ -3679,7 +3682,7 @@ function zn(e, t, n) {
|
|
|
3679
3682
|
return t === "CDATA[".charCodeAt(a++) ? (e.consume(t), a === 6 ? h : m) : n(t);
|
|
3680
3683
|
}
|
|
3681
3684
|
function h(t) {
|
|
3682
|
-
return t === null ? n(t) : t === 93 ? (e.consume(t), g) :
|
|
3685
|
+
return t === null ? n(t) : t === 93 ? (e.consume(t), g) : P(t) ? (o = h, N(t)) : (e.consume(t), h);
|
|
3683
3686
|
}
|
|
3684
3687
|
function g(t) {
|
|
3685
3688
|
return t === 93 ? (e.consume(t), _) : h(t);
|
|
@@ -3688,46 +3691,46 @@ function zn(e, t, n) {
|
|
|
3688
3691
|
return t === 62 ? M(t) : t === 93 ? (e.consume(t), _) : h(t);
|
|
3689
3692
|
}
|
|
3690
3693
|
function v(t) {
|
|
3691
|
-
return t === null || t === 62 ? M(t) :
|
|
3694
|
+
return t === null || t === 62 ? M(t) : P(t) ? (o = v, N(t)) : (e.consume(t), v);
|
|
3692
3695
|
}
|
|
3693
3696
|
function y(t) {
|
|
3694
|
-
return t === null ? n(t) : t === 63 ? (e.consume(t), b) :
|
|
3697
|
+
return t === null ? n(t) : t === 63 ? (e.consume(t), b) : P(t) ? (o = y, N(t)) : (e.consume(t), y);
|
|
3695
3698
|
}
|
|
3696
3699
|
function b(e) {
|
|
3697
3700
|
return e === 62 ? M(e) : y(e);
|
|
3698
3701
|
}
|
|
3699
3702
|
function x(t) {
|
|
3700
|
-
return
|
|
3703
|
+
return B(t) ? (e.consume(t), S) : n(t);
|
|
3701
3704
|
}
|
|
3702
3705
|
function S(t) {
|
|
3703
|
-
return t === 45 ||
|
|
3706
|
+
return t === 45 || Y(t) ? (e.consume(t), S) : C(t);
|
|
3704
3707
|
}
|
|
3705
3708
|
function C(t) {
|
|
3706
|
-
return
|
|
3709
|
+
return P(t) ? (o = C, N(t)) : J(t) ? (e.consume(t), C) : M(t);
|
|
3707
3710
|
}
|
|
3708
3711
|
function w(t) {
|
|
3709
|
-
return t === 45 ||
|
|
3712
|
+
return t === 45 || Y(t) ? (e.consume(t), w) : t === 47 || t === 62 || I(t) ? T(t) : n(t);
|
|
3710
3713
|
}
|
|
3711
3714
|
function T(t) {
|
|
3712
|
-
return t === 47 ? (e.consume(t), M) : t === 58 || t === 95 ||
|
|
3715
|
+
return t === 47 ? (e.consume(t), M) : t === 58 || t === 95 || B(t) ? (e.consume(t), E) : P(t) ? (o = T, N(t)) : J(t) ? (e.consume(t), T) : M(t);
|
|
3713
3716
|
}
|
|
3714
3717
|
function E(t) {
|
|
3715
|
-
return t === 45 || t === 46 || t === 58 || t === 95 ||
|
|
3718
|
+
return t === 45 || t === 46 || t === 58 || t === 95 || Y(t) ? (e.consume(t), E) : D(t);
|
|
3716
3719
|
}
|
|
3717
3720
|
function D(t) {
|
|
3718
|
-
return t === 61 ? (e.consume(t), O) :
|
|
3721
|
+
return t === 61 ? (e.consume(t), O) : P(t) ? (o = D, N(t)) : J(t) ? (e.consume(t), D) : T(t);
|
|
3719
3722
|
}
|
|
3720
3723
|
function O(t) {
|
|
3721
|
-
return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), i = t, k) :
|
|
3724
|
+
return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), i = t, k) : P(t) ? (o = O, N(t)) : J(t) ? (e.consume(t), O) : (e.consume(t), A);
|
|
3722
3725
|
}
|
|
3723
3726
|
function k(t) {
|
|
3724
|
-
return t === i ? (e.consume(t), i = void 0, j) : t === null ? n(t) :
|
|
3727
|
+
return t === i ? (e.consume(t), i = void 0, j) : t === null ? n(t) : P(t) ? (o = k, N(t)) : (e.consume(t), k);
|
|
3725
3728
|
}
|
|
3726
3729
|
function A(t) {
|
|
3727
|
-
return t === null || t === 34 || t === 39 || t === 60 || t === 61 || t === 96 ? n(t) : t === 47 || t === 62 ||
|
|
3730
|
+
return t === null || t === 34 || t === 39 || t === 60 || t === 61 || t === 96 ? n(t) : t === 47 || t === 62 || I(t) ? T(t) : (e.consume(t), A);
|
|
3728
3731
|
}
|
|
3729
3732
|
function j(e) {
|
|
3730
|
-
return e === 47 || e === 62 ||
|
|
3733
|
+
return e === 47 || e === 62 || I(e) ? T(e) : n(e);
|
|
3731
3734
|
}
|
|
3732
3735
|
function M(r) {
|
|
3733
3736
|
return r === 62 ? (e.consume(r), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(r);
|
|
@@ -3736,9 +3739,9 @@ function zn(e, t, n) {
|
|
|
3736
3739
|
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ee;
|
|
3737
3740
|
}
|
|
3738
3741
|
function ee(t) {
|
|
3739
|
-
return
|
|
3742
|
+
return J(t) ? F(e, L, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : L(t);
|
|
3740
3743
|
}
|
|
3741
|
-
function
|
|
3744
|
+
function L(t) {
|
|
3742
3745
|
return e.enter("htmlTextData"), o(t);
|
|
3743
3746
|
}
|
|
3744
3747
|
}
|
|
@@ -3758,7 +3761,7 @@ function Wn(e) {
|
|
|
3758
3761
|
r.type = "data", t += e;
|
|
3759
3762
|
}
|
|
3760
3763
|
}
|
|
3761
|
-
return e.length !== n.length &&
|
|
3764
|
+
return e.length !== n.length && O(e, 0, e.length, n), e;
|
|
3762
3765
|
}
|
|
3763
3766
|
function Gn(e, t) {
|
|
3764
3767
|
let n = e.length, r = 0, i, a, o;
|
|
@@ -3795,11 +3798,11 @@ function Gn(e, t) {
|
|
|
3795
3798
|
"enter",
|
|
3796
3799
|
c,
|
|
3797
3800
|
t
|
|
3798
|
-
]], o =
|
|
3801
|
+
]], o = z(o, e.slice(i + 1, i + r + 3)), o = z(o, [[
|
|
3799
3802
|
"enter",
|
|
3800
3803
|
l,
|
|
3801
3804
|
t
|
|
3802
|
-
]]), o =
|
|
3805
|
+
]]), o = z(o, ne(t.parser.constructs.insideSpan.null, e.slice(i + r + 4, a - 3), t)), o = z(o, [
|
|
3803
3806
|
[
|
|
3804
3807
|
"exit",
|
|
3805
3808
|
l,
|
|
@@ -3812,11 +3815,11 @@ function Gn(e, t) {
|
|
|
3812
3815
|
c,
|
|
3813
3816
|
t
|
|
3814
3817
|
]
|
|
3815
|
-
]), o =
|
|
3818
|
+
]), o = z(o, e.slice(a + 1)), o = z(o, [[
|
|
3816
3819
|
"exit",
|
|
3817
3820
|
s,
|
|
3818
3821
|
t
|
|
3819
|
-
]]),
|
|
3822
|
+
]]), O(e, i, e.length, o), e;
|
|
3820
3823
|
}
|
|
3821
3824
|
function Kn(e, t, n) {
|
|
3822
3825
|
let r = this, i = r._labelStarts, a, o;
|
|
@@ -3826,7 +3829,7 @@ function Kn(e, t, n) {
|
|
|
3826
3829
|
}
|
|
3827
3830
|
return s;
|
|
3828
3831
|
function s(t) {
|
|
3829
|
-
return a ? a._inactive ? d(t) : (o = r.parser.defined.includes(
|
|
3832
|
+
return a ? a._inactive ? d(t) : (o = r.parser.defined.includes(H(r.sliceSerialize({
|
|
3830
3833
|
start: a.end,
|
|
3831
3834
|
end: r.now()
|
|
3832
3835
|
}))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(t), e.exit("labelMarker"), e.exit("labelEnd"), c) : n(t);
|
|
@@ -3850,13 +3853,13 @@ function qn(e, t, n) {
|
|
|
3850
3853
|
return e.enter("resource"), e.enter("resourceMarker"), e.consume(t), e.exit("resourceMarker"), i;
|
|
3851
3854
|
}
|
|
3852
3855
|
function i(t) {
|
|
3853
|
-
return
|
|
3856
|
+
return I(t) ? xn(e, a)(t) : a(t);
|
|
3854
3857
|
}
|
|
3855
3858
|
function a(t) {
|
|
3856
3859
|
return t === 41 ? u(t) : vn(e, o, s, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(t);
|
|
3857
3860
|
}
|
|
3858
3861
|
function o(t) {
|
|
3859
|
-
return
|
|
3862
|
+
return I(t) ? xn(e, c)(t) : u(t);
|
|
3860
3863
|
}
|
|
3861
3864
|
function s(e) {
|
|
3862
3865
|
return n(e);
|
|
@@ -3865,7 +3868,7 @@ function qn(e, t, n) {
|
|
|
3865
3868
|
return t === 34 || t === 39 || t === 40 ? bn(e, l, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(t) : u(t);
|
|
3866
3869
|
}
|
|
3867
3870
|
function l(t) {
|
|
3868
|
-
return
|
|
3871
|
+
return I(t) ? xn(e, u)(t) : u(t);
|
|
3869
3872
|
}
|
|
3870
3873
|
function u(r) {
|
|
3871
3874
|
return r === 41 ? (e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), e.exit("resource"), t) : n(r);
|
|
@@ -3878,7 +3881,7 @@ function Jn(e, t, n) {
|
|
|
3878
3881
|
return yn.call(r, e, a, o, "reference", "referenceMarker", "referenceString")(t);
|
|
3879
3882
|
}
|
|
3880
3883
|
function a(e) {
|
|
3881
|
-
return r.parser.defined.includes(
|
|
3884
|
+
return r.parser.defined.includes(H(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? t(e) : n(e);
|
|
3882
3885
|
}
|
|
3883
3886
|
function o(e) {
|
|
3884
3887
|
return n(e);
|
|
@@ -3936,7 +3939,7 @@ var er = {
|
|
|
3936
3939
|
function tr(e, t) {
|
|
3937
3940
|
return n;
|
|
3938
3941
|
function n(n) {
|
|
3939
|
-
return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"),
|
|
3942
|
+
return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), F(e, t, "linePrefix");
|
|
3940
3943
|
}
|
|
3941
3944
|
}
|
|
3942
3945
|
// node_modules/micromark-core-commonmark/lib/thematic-break.js
|
|
@@ -3954,10 +3957,10 @@ function rr(e, t, n) {
|
|
|
3954
3957
|
return i = e, s(e);
|
|
3955
3958
|
}
|
|
3956
3959
|
function s(a) {
|
|
3957
|
-
return a === i ? (e.enter("thematicBreakSequence"), c(a)) : r >= 3 && (a === null ||
|
|
3960
|
+
return a === i ? (e.enter("thematicBreakSequence"), c(a)) : r >= 3 && (a === null || P(a)) ? (e.exit("thematicBreak"), t(a)) : n(a);
|
|
3958
3961
|
}
|
|
3959
3962
|
function c(t) {
|
|
3960
|
-
return t === i ? (e.consume(t), r++, c) : (e.exit("thematicBreakSequence"),
|
|
3963
|
+
return t === i ? (e.consume(t), r++, c) : (e.exit("thematicBreakSequence"), J(t) ? F(e, s, "whitespace")(t) : s(t));
|
|
3961
3964
|
}
|
|
3962
3965
|
}
|
|
3963
3966
|
// node_modules/micromark-core-commonmark/lib/list.js
|
|
@@ -3978,23 +3981,23 @@ function or(e, t, n) {
|
|
|
3978
3981
|
return s;
|
|
3979
3982
|
function s(t) {
|
|
3980
3983
|
let i = r.containerState.type || (t === 42 || t === 43 || t === 45 ? "listUnordered" : "listOrdered");
|
|
3981
|
-
if (i === "listUnordered" ? !r.containerState.marker || t === r.containerState.marker :
|
|
3984
|
+
if (i === "listUnordered" ? !r.containerState.marker || t === r.containerState.marker : ee(t)) {
|
|
3982
3985
|
if (r.containerState.type || (r.containerState.type = i, e.enter(i, { _container: !0 })), i === "listUnordered") return e.enter("listItemPrefix"), t === 42 || t === 45 ? e.check(nr, n, l)(t) : l(t);
|
|
3983
3986
|
if (!r.interrupt || t === 49) return e.enter("listItemPrefix"), e.enter("listItemValue"), c(t);
|
|
3984
3987
|
}
|
|
3985
3988
|
return n(t);
|
|
3986
3989
|
}
|
|
3987
3990
|
function c(t) {
|
|
3988
|
-
return
|
|
3991
|
+
return ee(t) && ++o < 10 ? (e.consume(t), c) : (!r.interrupt || o < 2) && (r.containerState.marker ? t === r.containerState.marker : t === 41 || t === 46) ? (e.exit("listItemValue"), l(t)) : n(t);
|
|
3989
3992
|
}
|
|
3990
3993
|
function l(t) {
|
|
3991
|
-
return e.enter("listItemMarker"), e.consume(t), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || t, e.check(
|
|
3994
|
+
return e.enter("listItemMarker"), e.consume(t), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || t, e.check(R, r.interrupt ? n : u, e.attempt(ir, f, d));
|
|
3992
3995
|
}
|
|
3993
3996
|
function u(e) {
|
|
3994
3997
|
return r.containerState.initialBlankLine = !0, a++, f(e);
|
|
3995
3998
|
}
|
|
3996
3999
|
function d(t) {
|
|
3997
|
-
return
|
|
4000
|
+
return J(t) ? (e.enter("listItemPrefixWhitespace"), e.consume(t), e.exit("listItemPrefixWhitespace"), f) : n(t);
|
|
3998
4001
|
}
|
|
3999
4002
|
function f(n) {
|
|
4000
4003
|
return r.containerState.size = a + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(n);
|
|
@@ -4002,20 +4005,20 @@ function or(e, t, n) {
|
|
|
4002
4005
|
}
|
|
4003
4006
|
function sr(e, t, n) {
|
|
4004
4007
|
let r = this;
|
|
4005
|
-
return r.containerState._closeFlow = void 0, e.check(
|
|
4008
|
+
return r.containerState._closeFlow = void 0, e.check(R, i, a);
|
|
4006
4009
|
function i(n) {
|
|
4007
|
-
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine,
|
|
4010
|
+
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, F(e, t, "listItemIndent", r.containerState.size + 1)(n);
|
|
4008
4011
|
}
|
|
4009
4012
|
function a(n) {
|
|
4010
|
-
return r.containerState.furtherBlankLines || !
|
|
4013
|
+
return r.containerState.furtherBlankLines || !J(n) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, o(n)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(ar, t, o)(n));
|
|
4011
4014
|
}
|
|
4012
4015
|
function o(i) {
|
|
4013
|
-
return r.containerState._closeFlow = !0, r.interrupt = void 0,
|
|
4016
|
+
return r.containerState._closeFlow = !0, r.interrupt = void 0, F(e, e.attempt($, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(i);
|
|
4014
4017
|
}
|
|
4015
4018
|
}
|
|
4016
4019
|
function cr(e, t, n) {
|
|
4017
4020
|
let r = this;
|
|
4018
|
-
return
|
|
4021
|
+
return F(e, i, "listItemIndent", r.containerState.size + 1);
|
|
4019
4022
|
function i(e) {
|
|
4020
4023
|
let i = r.events[r.events.length - 1];
|
|
4021
4024
|
return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === r.containerState.size ? t(e) : n(e);
|
|
@@ -4026,10 +4029,10 @@ function lr(e) {
|
|
|
4026
4029
|
}
|
|
4027
4030
|
function ur(e, t, n) {
|
|
4028
4031
|
let r = this;
|
|
4029
|
-
return
|
|
4032
|
+
return F(e, i, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
|
|
4030
4033
|
function i(e) {
|
|
4031
4034
|
let i = r.events[r.events.length - 1];
|
|
4032
|
-
return !
|
|
4035
|
+
return !J(e) && i && i[1].type === "listItemPrefixWhitespace" ? t(e) : n(e);
|
|
4033
4036
|
}
|
|
4034
4037
|
}
|
|
4035
4038
|
// node_modules/micromark-core-commonmark/lib/setext-underline.js
|
|
@@ -4081,16 +4084,16 @@ function pr(e, t, n) {
|
|
|
4081
4084
|
return e.enter("setextHeadingLineSequence"), s(t);
|
|
4082
4085
|
}
|
|
4083
4086
|
function s(t) {
|
|
4084
|
-
return t === i ? (e.consume(t), s) : (e.exit("setextHeadingLineSequence"),
|
|
4087
|
+
return t === i ? (e.consume(t), s) : (e.exit("setextHeadingLineSequence"), J(t) ? F(e, c, "lineSuffix")(t) : c(t));
|
|
4085
4088
|
}
|
|
4086
4089
|
function c(r) {
|
|
4087
|
-
return r === null ||
|
|
4090
|
+
return r === null || P(r) ? (e.exit("setextHeadingLine"), t(r)) : n(r);
|
|
4088
4091
|
}
|
|
4089
4092
|
}
|
|
4090
4093
|
// node_modules/micromark/lib/initialize/flow.js
|
|
4091
4094
|
var mr = { tokenize: hr };
|
|
4092
4095
|
function hr(e) {
|
|
4093
|
-
let t = this, n = e.attempt(
|
|
4096
|
+
let t = this, n = e.attempt(R, r, e.attempt(this.parser.constructs.flowInitial, i, F(e, e.attempt(this.parser.constructs.flow, i, e.attempt(pn, i)), "linePrefix")));
|
|
4094
4097
|
return n;
|
|
4095
4098
|
function r(r) {
|
|
4096
4099
|
if (r === null) e.consume(r);
|
|
@@ -4267,7 +4270,7 @@ function Mr(e, t, n) {
|
|
|
4267
4270
|
}, u = t.tokenize.call(l, c);
|
|
4268
4271
|
return t.resolveAll && a.push(t), l;
|
|
4269
4272
|
function d(e) {
|
|
4270
|
-
return o =
|
|
4273
|
+
return o = z(o, e), g(), o[o.length - 1] === null ? (w(t, 0), l.events = ne(a, l.events, l), l.events) : [];
|
|
4271
4274
|
}
|
|
4272
4275
|
function f(e, t) {
|
|
4273
4276
|
return Pr(p(e), t);
|
|
@@ -4301,7 +4304,7 @@ function Mr(e, t, n) {
|
|
|
4301
4304
|
u = u(e);
|
|
4302
4305
|
}
|
|
4303
4306
|
function v(e) {
|
|
4304
|
-
|
|
4307
|
+
P(e) ? (r.line++, r.column = 1, r.offset += e === -3 ? 2 : 1, E()) : e !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === o[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = e;
|
|
4305
4308
|
}
|
|
4306
4309
|
function y(e, t) {
|
|
4307
4310
|
let n = t || {};
|
|
@@ -4355,7 +4358,7 @@ function Mr(e, t, n) {
|
|
|
4355
4358
|
}
|
|
4356
4359
|
}
|
|
4357
4360
|
function w(e, t) {
|
|
4358
|
-
e.resolveAll && !a.includes(e) && a.push(e), e.resolve &&
|
|
4361
|
+
e.resolveAll && !a.includes(e) && a.push(e), e.resolve && O(l.events, t, l.events.length - t, e.resolve(l.events.slice(t), l)), e.resolveTo && (l.events = e.resolveTo(l.events, l));
|
|
4359
4362
|
}
|
|
4360
4363
|
function T() {
|
|
4361
4364
|
let e = m(), t = l.previous, n = l.currentConstruct, i = l.events.length, a = Array.from(s);
|
|
@@ -4414,7 +4417,7 @@ function Pr(e, t) {
|
|
|
4414
4417
|
// node_modules/micromark/lib/parse.js
|
|
4415
4418
|
function Fr(e) {
|
|
4416
4419
|
let t = {
|
|
4417
|
-
constructs:
|
|
4420
|
+
constructs: se([Sr, ...(e || {}).extensions || []]),
|
|
4418
4421
|
content: n(Ot),
|
|
4419
4422
|
defined: [],
|
|
4420
4423
|
document: n(Mt),
|
|
@@ -4502,60 +4505,60 @@ function Wr(e) {
|
|
|
4502
4505
|
"strong"
|
|
4503
4506
|
],
|
|
4504
4507
|
enter: {
|
|
4505
|
-
autolink: o(
|
|
4508
|
+
autolink: o(K),
|
|
4506
4509
|
autolinkProtocol: E,
|
|
4507
4510
|
autolinkEmail: E,
|
|
4508
|
-
atxHeading: o(
|
|
4509
|
-
blockQuote: o(
|
|
4511
|
+
atxHeading: o(ue),
|
|
4512
|
+
blockQuote: o(ae),
|
|
4510
4513
|
characterEscape: E,
|
|
4511
4514
|
characterReference: E,
|
|
4512
|
-
codeFenced: o(
|
|
4515
|
+
codeFenced: o(oe),
|
|
4513
4516
|
codeFencedFenceInfo: s,
|
|
4514
4517
|
codeFencedFenceMeta: s,
|
|
4515
|
-
codeIndented: o(
|
|
4516
|
-
codeText: o(
|
|
4518
|
+
codeIndented: o(oe, s),
|
|
4519
|
+
codeText: o(se, s),
|
|
4517
4520
|
codeTextData: E,
|
|
4518
4521
|
data: E,
|
|
4519
4522
|
codeFlowValue: E,
|
|
4520
|
-
definition: o(
|
|
4523
|
+
definition: o(ce),
|
|
4521
4524
|
definitionDestinationString: s,
|
|
4522
4525
|
definitionLabelString: s,
|
|
4523
4526
|
definitionTitleString: s,
|
|
4524
|
-
emphasis: o(
|
|
4525
|
-
hardBreakEscape: o(
|
|
4526
|
-
hardBreakTrailing: o(
|
|
4527
|
-
htmlFlow: o(
|
|
4527
|
+
emphasis: o(U),
|
|
4528
|
+
hardBreakEscape: o(W),
|
|
4529
|
+
hardBreakTrailing: o(W),
|
|
4530
|
+
htmlFlow: o(de, s),
|
|
4528
4531
|
htmlFlowData: E,
|
|
4529
|
-
htmlText: o(
|
|
4532
|
+
htmlText: o(de, s),
|
|
4530
4533
|
htmlTextData: E,
|
|
4531
|
-
image: o(
|
|
4534
|
+
image: o(G),
|
|
4532
4535
|
label: s,
|
|
4533
|
-
link: o(
|
|
4534
|
-
listItem: o(
|
|
4536
|
+
link: o(K),
|
|
4537
|
+
listItem: o(fe),
|
|
4535
4538
|
listItemValue: p,
|
|
4536
|
-
listOrdered: o(
|
|
4537
|
-
listUnordered: o(
|
|
4538
|
-
paragraph: o(
|
|
4539
|
-
reference:
|
|
4539
|
+
listOrdered: o(q, f),
|
|
4540
|
+
listUnordered: o(q),
|
|
4541
|
+
paragraph: o(J),
|
|
4542
|
+
reference: te,
|
|
4540
4543
|
referenceString: s,
|
|
4541
4544
|
resourceDestinationString: s,
|
|
4542
4545
|
resourceTitleString: s,
|
|
4543
|
-
setextHeading: o(
|
|
4544
|
-
strong: o(
|
|
4545
|
-
thematicBreak: o(
|
|
4546
|
+
setextHeading: o(ue),
|
|
4547
|
+
strong: o(pe),
|
|
4548
|
+
thematicBreak: o(he)
|
|
4546
4549
|
},
|
|
4547
4550
|
exit: {
|
|
4548
4551
|
atxHeading: l(),
|
|
4549
4552
|
atxHeadingSequence: S,
|
|
4550
4553
|
autolink: l(),
|
|
4551
|
-
autolinkEmail:
|
|
4552
|
-
autolinkProtocol:
|
|
4554
|
+
autolinkEmail: ie,
|
|
4555
|
+
autolinkProtocol: V,
|
|
4553
4556
|
blockQuote: l(),
|
|
4554
4557
|
characterEscapeValue: D,
|
|
4555
|
-
characterReferenceMarkerHexadecimal:
|
|
4556
|
-
characterReferenceMarkerNumeric:
|
|
4557
|
-
characterReferenceValue:
|
|
4558
|
-
characterReference:
|
|
4558
|
+
characterReferenceMarkerHexadecimal: z,
|
|
4559
|
+
characterReferenceMarkerNumeric: z,
|
|
4560
|
+
characterReferenceValue: B,
|
|
4561
|
+
characterReference: re,
|
|
4559
4562
|
codeFenced: l(_),
|
|
4560
4563
|
codeFencedFence: g,
|
|
4561
4564
|
codeFencedFenceInfo: m,
|
|
@@ -4577,7 +4580,7 @@ function Wr(e) {
|
|
|
4577
4580
|
htmlText: l(j),
|
|
4578
4581
|
htmlTextData: D,
|
|
4579
4582
|
image: l(P),
|
|
4580
|
-
label:
|
|
4583
|
+
label: F,
|
|
4581
4584
|
labelText: ee,
|
|
4582
4585
|
lineEnding: O,
|
|
4583
4586
|
link: l(N),
|
|
@@ -4585,10 +4588,10 @@ function Wr(e) {
|
|
|
4585
4588
|
listOrdered: l(),
|
|
4586
4589
|
listUnordered: l(),
|
|
4587
4590
|
paragraph: l(),
|
|
4588
|
-
referenceString:
|
|
4589
|
-
resourceDestinationString:
|
|
4590
|
-
resourceTitleString:
|
|
4591
|
-
resource:
|
|
4591
|
+
referenceString: ne,
|
|
4592
|
+
resourceDestinationString: I,
|
|
4593
|
+
resourceTitleString: L,
|
|
4594
|
+
resource: R,
|
|
4592
4595
|
setextHeading: l(T),
|
|
4593
4596
|
setextHeadingLineSequence: w,
|
|
4594
4597
|
setextHeadingText: C,
|
|
@@ -4747,7 +4750,7 @@ function Wr(e) {
|
|
|
4747
4750
|
r[0].type !== e.type && (t ? t.call(this, e, r[0]) : (r[1] || Jr).call(this, e, r[0])), n.position.end = Gr(e.end);
|
|
4748
4751
|
}
|
|
4749
4752
|
function d() {
|
|
4750
|
-
return
|
|
4753
|
+
return le(this.stack.pop());
|
|
4751
4754
|
}
|
|
4752
4755
|
function f() {
|
|
4753
4756
|
this.data.expectingFirstListItemValue = !0;
|
|
@@ -4779,7 +4782,7 @@ function Wr(e) {
|
|
|
4779
4782
|
}
|
|
4780
4783
|
function y(e) {
|
|
4781
4784
|
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
4782
|
-
n.label = t, n.identifier =
|
|
4785
|
+
n.label = t, n.identifier = H(this.sliceSerialize(e)).toLowerCase();
|
|
4783
4786
|
}
|
|
4784
4787
|
function b() {
|
|
4785
4788
|
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
@@ -4805,7 +4808,7 @@ function Wr(e) {
|
|
|
4805
4808
|
}
|
|
4806
4809
|
function E(e) {
|
|
4807
4810
|
let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
|
|
4808
|
-
n && n.type === "text" || (n =
|
|
4811
|
+
n && n.type === "text" || (n = me(), n.position = {
|
|
4809
4812
|
start: Gr(e.start),
|
|
4810
4813
|
end: void 0
|
|
4811
4814
|
}, t.push(n)), this.stack.push(n);
|
|
@@ -4854,61 +4857,61 @@ function Wr(e) {
|
|
|
4854
4857
|
}
|
|
4855
4858
|
function ee(e) {
|
|
4856
4859
|
let t = this.sliceSerialize(e), n = this.stack[this.stack.length - 2];
|
|
4857
|
-
n.label = Br(t), n.identifier =
|
|
4860
|
+
n.label = Br(t), n.identifier = H(t).toLowerCase();
|
|
4858
4861
|
}
|
|
4859
|
-
function
|
|
4862
|
+
function F() {
|
|
4860
4863
|
let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
4861
4864
|
this.data.inReference = !0, n.type === "link" ? n.children = e.children : n.alt = t;
|
|
4862
4865
|
}
|
|
4863
|
-
function
|
|
4866
|
+
function I() {
|
|
4864
4867
|
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
4865
4868
|
t.url = e;
|
|
4866
4869
|
}
|
|
4867
|
-
function
|
|
4870
|
+
function L() {
|
|
4868
4871
|
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
4869
4872
|
t.title = e;
|
|
4870
4873
|
}
|
|
4871
|
-
function
|
|
4874
|
+
function R() {
|
|
4872
4875
|
this.data.inReference = void 0;
|
|
4873
4876
|
}
|
|
4874
|
-
function
|
|
4877
|
+
function te() {
|
|
4875
4878
|
this.data.referenceType = "collapsed";
|
|
4876
4879
|
}
|
|
4877
|
-
function
|
|
4880
|
+
function ne(e) {
|
|
4878
4881
|
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
4879
|
-
n.label = t, n.identifier =
|
|
4882
|
+
n.label = t, n.identifier = H(this.sliceSerialize(e)).toLowerCase(), this.data.referenceType = "full";
|
|
4880
4883
|
}
|
|
4881
|
-
function
|
|
4884
|
+
function z(e) {
|
|
4882
4885
|
this.data.characterReferenceType = e.type;
|
|
4883
4886
|
}
|
|
4884
|
-
function
|
|
4887
|
+
function B(e) {
|
|
4885
4888
|
let t = this.sliceSerialize(e), n = this.data.characterReferenceType, r;
|
|
4886
4889
|
n ? (r = Dt(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = Et(t);
|
|
4887
4890
|
let i = this.stack[this.stack.length - 1];
|
|
4888
4891
|
i.value += r;
|
|
4889
4892
|
}
|
|
4890
|
-
function
|
|
4893
|
+
function re(e) {
|
|
4891
4894
|
let t = this.stack.pop();
|
|
4892
4895
|
t.position.end = Gr(e.end);
|
|
4893
4896
|
}
|
|
4894
|
-
function
|
|
4897
|
+
function V(e) {
|
|
4895
4898
|
D.call(this, e);
|
|
4896
4899
|
let t = this.stack[this.stack.length - 1];
|
|
4897
4900
|
t.url = this.sliceSerialize(e);
|
|
4898
4901
|
}
|
|
4899
|
-
function
|
|
4902
|
+
function ie(e) {
|
|
4900
4903
|
D.call(this, e);
|
|
4901
4904
|
let t = this.stack[this.stack.length - 1];
|
|
4902
4905
|
t.url = "mailto:" + this.sliceSerialize(e);
|
|
4903
4906
|
}
|
|
4904
|
-
function
|
|
4907
|
+
function ae() {
|
|
4905
4908
|
return {
|
|
4906
4909
|
type: "blockquote",
|
|
4907
4910
|
children: [],
|
|
4908
4911
|
position: void 0
|
|
4909
4912
|
};
|
|
4910
4913
|
}
|
|
4911
|
-
function
|
|
4914
|
+
function oe() {
|
|
4912
4915
|
return {
|
|
4913
4916
|
type: "code",
|
|
4914
4917
|
lang: null,
|
|
@@ -4917,14 +4920,14 @@ function Wr(e) {
|
|
|
4917
4920
|
position: void 0
|
|
4918
4921
|
};
|
|
4919
4922
|
}
|
|
4920
|
-
function
|
|
4923
|
+
function se() {
|
|
4921
4924
|
return {
|
|
4922
4925
|
type: "inlineCode",
|
|
4923
4926
|
value: "",
|
|
4924
4927
|
position: void 0
|
|
4925
4928
|
};
|
|
4926
4929
|
}
|
|
4927
|
-
function
|
|
4930
|
+
function ce() {
|
|
4928
4931
|
return {
|
|
4929
4932
|
type: "definition",
|
|
4930
4933
|
identifier: "",
|
|
@@ -4934,14 +4937,14 @@ function Wr(e) {
|
|
|
4934
4937
|
position: void 0
|
|
4935
4938
|
};
|
|
4936
4939
|
}
|
|
4937
|
-
function
|
|
4940
|
+
function U() {
|
|
4938
4941
|
return {
|
|
4939
4942
|
type: "emphasis",
|
|
4940
4943
|
children: [],
|
|
4941
4944
|
position: void 0
|
|
4942
4945
|
};
|
|
4943
4946
|
}
|
|
4944
|
-
function
|
|
4947
|
+
function ue() {
|
|
4945
4948
|
return {
|
|
4946
4949
|
type: "heading",
|
|
4947
4950
|
depth: 0,
|
|
@@ -4949,20 +4952,20 @@ function Wr(e) {
|
|
|
4949
4952
|
position: void 0
|
|
4950
4953
|
};
|
|
4951
4954
|
}
|
|
4952
|
-
function
|
|
4955
|
+
function W() {
|
|
4953
4956
|
return {
|
|
4954
4957
|
type: "break",
|
|
4955
4958
|
position: void 0
|
|
4956
4959
|
};
|
|
4957
4960
|
}
|
|
4958
|
-
function
|
|
4961
|
+
function de() {
|
|
4959
4962
|
return {
|
|
4960
4963
|
type: "html",
|
|
4961
4964
|
value: "",
|
|
4962
4965
|
position: void 0
|
|
4963
4966
|
};
|
|
4964
4967
|
}
|
|
4965
|
-
function
|
|
4968
|
+
function G() {
|
|
4966
4969
|
return {
|
|
4967
4970
|
type: "image",
|
|
4968
4971
|
title: null,
|
|
@@ -4971,7 +4974,7 @@ function Wr(e) {
|
|
|
4971
4974
|
position: void 0
|
|
4972
4975
|
};
|
|
4973
4976
|
}
|
|
4974
|
-
function
|
|
4977
|
+
function K() {
|
|
4975
4978
|
return {
|
|
4976
4979
|
type: "link",
|
|
4977
4980
|
title: null,
|
|
@@ -4980,7 +4983,7 @@ function Wr(e) {
|
|
|
4980
4983
|
position: void 0
|
|
4981
4984
|
};
|
|
4982
4985
|
}
|
|
4983
|
-
function
|
|
4986
|
+
function q(e) {
|
|
4984
4987
|
return {
|
|
4985
4988
|
type: "list",
|
|
4986
4989
|
ordered: e.type === "listOrdered",
|
|
@@ -4990,7 +4993,7 @@ function Wr(e) {
|
|
|
4990
4993
|
position: void 0
|
|
4991
4994
|
};
|
|
4992
4995
|
}
|
|
4993
|
-
function
|
|
4996
|
+
function fe(e) {
|
|
4994
4997
|
return {
|
|
4995
4998
|
type: "listItem",
|
|
4996
4999
|
spread: e._spread,
|
|
@@ -4999,28 +5002,28 @@ function Wr(e) {
|
|
|
4999
5002
|
position: void 0
|
|
5000
5003
|
};
|
|
5001
5004
|
}
|
|
5002
|
-
function
|
|
5005
|
+
function J() {
|
|
5003
5006
|
return {
|
|
5004
5007
|
type: "paragraph",
|
|
5005
5008
|
children: [],
|
|
5006
5009
|
position: void 0
|
|
5007
5010
|
};
|
|
5008
5011
|
}
|
|
5009
|
-
function
|
|
5012
|
+
function pe() {
|
|
5010
5013
|
return {
|
|
5011
5014
|
type: "strong",
|
|
5012
5015
|
children: [],
|
|
5013
5016
|
position: void 0
|
|
5014
5017
|
};
|
|
5015
5018
|
}
|
|
5016
|
-
function
|
|
5019
|
+
function me() {
|
|
5017
5020
|
return {
|
|
5018
5021
|
type: "text",
|
|
5019
5022
|
value: "",
|
|
5020
5023
|
position: void 0
|
|
5021
5024
|
};
|
|
5022
5025
|
}
|
|
5023
|
-
function
|
|
5026
|
+
function he() {
|
|
5024
5027
|
return {
|
|
5025
5028
|
type: "thematicBreak",
|
|
5026
5029
|
position: void 0
|
|
@@ -5637,7 +5640,7 @@ function Ni(e) {
|
|
|
5637
5640
|
return t;
|
|
5638
5641
|
}
|
|
5639
5642
|
// src/local/parsing/parser-internals.ts
|
|
5640
|
-
var Pi =
|
|
5643
|
+
var Pi = ge, Fi = /* @__PURE__ */ new Set([
|
|
5641
5644
|
"paragraph",
|
|
5642
5645
|
"heading",
|
|
5643
5646
|
"div",
|
|
@@ -5669,8 +5672,9 @@ var Pi = _, Fi = /* @__PURE__ */ new Set([
|
|
|
5669
5672
|
end;
|
|
5670
5673
|
key;
|
|
5671
5674
|
params;
|
|
5672
|
-
|
|
5673
|
-
|
|
5675
|
+
actual;
|
|
5676
|
+
constructor(e, t, n, r, i = e, a, o) {
|
|
5677
|
+
super(t), this.code = e, this.start = n, this.end = r, this.key = i, this.params = a, this.actual = o, this.name = "LocalBudgetError";
|
|
5674
5678
|
}
|
|
5675
5679
|
};
|
|
5676
5680
|
// src/local/parsing/plain-paragraphs.ts
|
|
@@ -5710,7 +5714,7 @@ var zi = /* @__PURE__ */ new Set([
|
|
|
5710
5714
|
"figcaption"
|
|
5711
5715
|
]);
|
|
5712
5716
|
function Bi(e, t, n, r) {
|
|
5713
|
-
if (n === "css" || n === "javascript" ||
|
|
5717
|
+
if (n === "css" || n === "javascript" || A.has(n)) {
|
|
5714
5718
|
let i = RegExp(`</${n}\\s*>`, "ig");
|
|
5715
5719
|
i.lastIndex = t;
|
|
5716
5720
|
let a = i.exec(e);
|
|
@@ -5724,7 +5728,7 @@ function Bi(e, t, n, r) {
|
|
|
5724
5728
|
let t = e.indexOf("<", o);
|
|
5725
5729
|
if (t < 0 || t >= r) return null;
|
|
5726
5730
|
if (e.startsWith("<!--", t)) {
|
|
5727
|
-
o =
|
|
5731
|
+
o = M(e, t, r);
|
|
5728
5732
|
continue;
|
|
5729
5733
|
}
|
|
5730
5734
|
i.lastIndex = t;
|
|
@@ -5733,7 +5737,7 @@ function Bi(e, t, n, r) {
|
|
|
5733
5737
|
o = t + 1;
|
|
5734
5738
|
continue;
|
|
5735
5739
|
}
|
|
5736
|
-
let c =
|
|
5740
|
+
let c = j(e, i.lastIndex, r);
|
|
5737
5741
|
if (c < 0) return null;
|
|
5738
5742
|
o = c;
|
|
5739
5743
|
let l = s[2].toLowerCase();
|
|
@@ -5743,7 +5747,7 @@ function Bi(e, t, n, r) {
|
|
|
5743
5747
|
};
|
|
5744
5748
|
if (!(s[1] || /\/\s*>$/.test(e.slice(i.lastIndex, c)))) {
|
|
5745
5749
|
if (l === n) a++;
|
|
5746
|
-
else if (
|
|
5750
|
+
else if (A.has(l)) {
|
|
5747
5751
|
let t = Bi(e, c, l, r);
|
|
5748
5752
|
if (!t) return null;
|
|
5749
5753
|
o = t.end;
|
|
@@ -5763,7 +5767,7 @@ function Vi(e, t, n, r, i) {
|
|
|
5763
5767
|
for (; t[o]?.end <= l;) o++;
|
|
5764
5768
|
for (; n[s]?.end <= l;) s++;
|
|
5765
5769
|
if (t[o]?.start <= l || n[s]?.start <= l) continue;
|
|
5766
|
-
let u = i.index + i[0].length, d =
|
|
5770
|
+
let u = i.index + i[0].length, d = j(e, u, e.length);
|
|
5767
5771
|
if (d < 0 || /\/\s*>$/.test(e.slice(u, d))) continue;
|
|
5768
5772
|
let f = Bi(e, d, c, e.length);
|
|
5769
5773
|
if (f) for (let n = o; t[n]?.start < f.start; n++) {
|
|
@@ -5899,7 +5903,7 @@ function Xi(e) {
|
|
|
5899
5903
|
message: "A theme declaration requires a quoted name attribute."
|
|
5900
5904
|
};
|
|
5901
5905
|
let r = n[1] ?? n[2] ?? "";
|
|
5902
|
-
return
|
|
5906
|
+
return b(r) ? { name: r } : {
|
|
5903
5907
|
code: "local.theme.name",
|
|
5904
5908
|
key: "local.theme.name.invalid",
|
|
5905
5909
|
params: {
|
|
@@ -5925,7 +5929,7 @@ var Zi = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, Qi = /* @__PURE__ */ new Set([
|
|
|
5925
5929
|
"ul",
|
|
5926
5930
|
"ol",
|
|
5927
5931
|
"li"
|
|
5928
|
-
]), $i = 128, ea = /* @__PURE__ */ new Set(["css", "javascript"]), ta = Math.min(5e4,
|
|
5932
|
+
]), $i = 128, ea = /* @__PURE__ */ new Set(["css", "javascript"]), ta = Math.min(5e4, u), na = 100;
|
|
5929
5933
|
function ra(e, t) {
|
|
5930
5934
|
let n = 0, r = e.length - 1;
|
|
5931
5935
|
for (; n <= r;) {
|
|
@@ -5936,12 +5940,12 @@ function ra(e, t) {
|
|
|
5936
5940
|
}
|
|
5937
5941
|
return !1;
|
|
5938
5942
|
}
|
|
5939
|
-
function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i, known: a, externalNames: o, unmountedLeafNames: s, suggestionNames: c, htmlSupport: l, nativeHtmlNames: u, sourceContext: d, work: f, ensureDepth: p, parseMarkdown: m, node: h, codeRanges: g, recoveryRanges:
|
|
5940
|
-
let { tagAt:
|
|
5941
|
-
function
|
|
5942
|
-
return
|
|
5943
|
+
function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i, known: a, externalNames: o, unmountedLeafNames: s, suggestionNames: c, htmlSupport: l, nativeHtmlNames: u, sourceContext: d, work: f, ensureDepth: p, parseMarkdown: m, node: h, codeRanges: g, recoveryRanges: v, recoveries: y, rootMathLiterals: b, rootDefinitionRanges: x, error: S, warning: C, headers: w, scanner: T, convert: E }) {
|
|
5944
|
+
let { tagAt: D, scanTag: O, htmlLiteralEnd: k, beginsLine: j, footnoteLabelAt: N, definitionLabelAt: P, htmlTagAt: ee, htmlCloseEnd: F, selectHtmlAttributes: I, buildHtmlNode: L, protectedEnd: R, unknownTagEnd: te, interpolationEnd: ne, commonIndent: z } = T, B = 0, re = !1, V = !1;
|
|
5945
|
+
function ie(e) {
|
|
5946
|
+
return V ? !1 : H(w.headerCursor, e) === e || (V = !0, !1);
|
|
5943
5947
|
}
|
|
5944
|
-
function
|
|
5948
|
+
function ae(t) {
|
|
5945
5949
|
let n = d.lineStartAt(t);
|
|
5946
5950
|
for (let r = n; r < t; r += 1) {
|
|
5947
5951
|
let t = e.charCodeAt(r);
|
|
@@ -5949,14 +5953,14 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
5949
5953
|
}
|
|
5950
5954
|
return !0;
|
|
5951
5955
|
}
|
|
5952
|
-
function
|
|
5956
|
+
function oe(t, n, r) {
|
|
5953
5957
|
let i = RegExp(`</${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*>`, "i").exec(e.slice(t, r));
|
|
5954
5958
|
return i ? {
|
|
5955
5959
|
start: t + i.index,
|
|
5956
5960
|
end: t + i.index + i[0].length
|
|
5957
5961
|
} : null;
|
|
5958
5962
|
}
|
|
5959
|
-
function
|
|
5963
|
+
function H(t, n, r = !0) {
|
|
5960
5964
|
let i = t;
|
|
5961
5965
|
for (; i < n;) {
|
|
5962
5966
|
let t = e[i];
|
|
@@ -5978,34 +5982,34 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
5978
5982
|
}
|
|
5979
5983
|
return i;
|
|
5980
5984
|
}
|
|
5981
|
-
let o =
|
|
5985
|
+
let o = se(i, n);
|
|
5982
5986
|
if (o && o.name === "css" && o.close && !a.has("css")) i = o.close.end;
|
|
5983
5987
|
else break;
|
|
5984
5988
|
}
|
|
5985
5989
|
return i;
|
|
5986
5990
|
}
|
|
5987
|
-
function
|
|
5991
|
+
function se(t, n) {
|
|
5988
5992
|
let r = /^<(css|javascript)(?=[\s/>])/.exec(e.slice(t, Math.min(n, t + 16)));
|
|
5989
5993
|
if (!r) return null;
|
|
5990
|
-
let i = r[1], a =
|
|
5994
|
+
let i = r[1], a = O(t, n);
|
|
5991
5995
|
return !a || a.closing ? null : {
|
|
5992
5996
|
name: i,
|
|
5993
5997
|
open: {
|
|
5994
5998
|
end: a.end,
|
|
5995
5999
|
self: a.self
|
|
5996
6000
|
},
|
|
5997
|
-
close: a.self ? null :
|
|
6001
|
+
close: a.self ? null : oe(a.end, i, n)
|
|
5998
6002
|
};
|
|
5999
6003
|
}
|
|
6000
|
-
function
|
|
6001
|
-
let
|
|
6002
|
-
if (
|
|
6003
|
-
let
|
|
6004
|
-
if (
|
|
6005
|
-
let e =
|
|
6006
|
-
|
|
6007
|
-
let n = new
|
|
6008
|
-
n.original(
|
|
6004
|
+
function ce(T, V, H, U = T, le = T, ue = 0, W = {}) {
|
|
6005
|
+
let G = [];
|
|
6006
|
+
if (V > T && i.charge(V - T, T, V), f.maxComponentDepth = Math.max(f.maxComponentDepth, ue), ue > na) throw new Li("local.budget", "Component nesting exceeds the 100-level limit.", U, le, "local.budget.nesting", { limit: na }, 101);
|
|
6007
|
+
let K = W.footnote === !0, q = W.container ?? H !== void 0, fe = W.indent ?? 0, J = W.definitions ?? x, pe = b, me = [];
|
|
6008
|
+
if (H) {
|
|
6009
|
+
let e = te(T, H, V, !0)?.start ?? V, t = z(T, e);
|
|
6010
|
+
fe = t;
|
|
6011
|
+
let n = new _(d);
|
|
6012
|
+
n.original(T, e, t), n.finish(e), f.mappingSegments += n.segmentCount;
|
|
6009
6013
|
let r = n.text(), a;
|
|
6010
6014
|
!/[\[:@]|www\./i.test(r) && !/^[ \t>*+\-0-9.)]*(?: {4}|\t|`{3}|~{3})/m.test(r) ? (i.charge(r.length + 1, 0, Math.max(1, r.length)), p(r), a = {
|
|
6011
6015
|
definitions: [],
|
|
@@ -6016,19 +6020,19 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6016
6020
|
start: n.at(t.start, e),
|
|
6017
6021
|
end: n.at(t.end, e)
|
|
6018
6022
|
}), s = a.definitions.map(o).filter((e) => e.end > e.start);
|
|
6019
|
-
|
|
6020
|
-
} else
|
|
6021
|
-
start: e.start +
|
|
6022
|
-
end: e.end +
|
|
6023
|
+
pe = a.mathLiterals.map(o).sort((e, t) => e.start - t.start), me = a.codeRanges.map(o).filter((t) => t.end > t.start && t.start >= T && t.end <= e).sort((e, t) => e.start - t.start), J = s.filter((t) => t.start >= T && t.end <= e).sort((e, t) => e.start - t.start || t.end - e.end);
|
|
6024
|
+
} else T > 0 && W.definitions !== void 0 && !K && (pe = _i(m(e.slice(T, V))).mathLiterals.map((e) => ({
|
|
6025
|
+
start: e.start + T,
|
|
6026
|
+
end: e.end + T
|
|
6023
6027
|
})).sort((e, t) => e.start - t.start));
|
|
6024
|
-
let
|
|
6025
|
-
for (;
|
|
6026
|
-
for (let f =
|
|
6027
|
-
for (;
|
|
6028
|
-
let p =
|
|
6028
|
+
let Y = 0, ge = 0, ve = 0;
|
|
6029
|
+
for (; ve < v.length && v[ve].end <= T;) ve += 1;
|
|
6030
|
+
for (let f = T; f < V;) {
|
|
6031
|
+
for (; ve < v.length && v[ve].end <= f;) ve += 1;
|
|
6032
|
+
let p = v[ve];
|
|
6029
6033
|
if (p && p.start <= f && f < p.end) {
|
|
6030
|
-
let t = Math.min(
|
|
6031
|
-
|
|
6034
|
+
let t = Math.min(V, p.end);
|
|
6035
|
+
G.push({
|
|
6032
6036
|
start: f,
|
|
6033
6037
|
end: t,
|
|
6034
6038
|
block: j(f),
|
|
@@ -6036,38 +6040,38 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6036
6040
|
}), f = t;
|
|
6037
6041
|
continue;
|
|
6038
6042
|
}
|
|
6039
|
-
if (!
|
|
6040
|
-
for (; g[
|
|
6041
|
-
let e = g[
|
|
6043
|
+
if (!q) {
|
|
6044
|
+
for (; g[B]?.end <= f;) B++;
|
|
6045
|
+
let e = g[B];
|
|
6042
6046
|
if (e && e.start <= f) {
|
|
6043
6047
|
f = e.end;
|
|
6044
6048
|
continue;
|
|
6045
6049
|
}
|
|
6046
|
-
} else if (
|
|
6047
|
-
for (;
|
|
6048
|
-
let e =
|
|
6050
|
+
} else if (me.length) {
|
|
6051
|
+
for (; me[ge]?.end <= f;) ge++;
|
|
6052
|
+
let e = me[ge];
|
|
6049
6053
|
if (e && e.start <= f) {
|
|
6050
6054
|
f = e.end;
|
|
6051
6055
|
continue;
|
|
6052
6056
|
}
|
|
6053
6057
|
}
|
|
6054
|
-
for (;
|
|
6055
|
-
let m =
|
|
6058
|
+
for (; J[Y]?.end <= f;) Y++;
|
|
6059
|
+
let m = J[Y];
|
|
6056
6060
|
if (m && m.start === f) {
|
|
6057
|
-
let t = f, n =
|
|
6058
|
-
for (; !n && t - f < 4 && t < m.end && (e[t] === " " || e[t] === " ");) t += 1, n =
|
|
6061
|
+
let t = f, n = P(t);
|
|
6062
|
+
for (; !n && t - f < 4 && t < m.end && (e[t] === " " || e[t] === " ");) t += 1, n = P(t);
|
|
6059
6063
|
if (n && n.bodyStart <= m.end) {
|
|
6060
|
-
let r = d.lineStartAt(t), i = e.slice(r, t), a = /^(?:[ \t]{0,3}>[ \t]?)+/.exec(i)?.[0] ?? "", o = /^[ \t]*/.exec(i.slice(a.length))[0].length, s = o + 4, c =
|
|
6064
|
+
let r = d.lineStartAt(t), i = e.slice(r, t), a = /^(?:[ \t]{0,3}>[ \t]?)+/.exec(i)?.[0] ?? "", o = /^[ \t]*/.exec(i.slice(a.length))[0].length, s = o + 4, c = ce(n.bodyStart, m.end, void 0, n.bodyStart, n.bodyStart, ue + 1, {
|
|
6061
6065
|
footnote: !0,
|
|
6062
6066
|
indent: s,
|
|
6063
|
-
container:
|
|
6067
|
+
container: q || o > 0,
|
|
6064
6068
|
definitions: [],
|
|
6065
6069
|
stripBlockquote: a.length > 0
|
|
6066
|
-
}), l =
|
|
6070
|
+
}), l = E(n.bodyStart, m.end, c.tokens, s, {
|
|
6067
6071
|
literalHtml: !0,
|
|
6068
6072
|
stripBlockquote: a.length > 0
|
|
6069
6073
|
});
|
|
6070
|
-
|
|
6074
|
+
G.push({
|
|
6071
6075
|
start: m.start,
|
|
6072
6076
|
end: m.end,
|
|
6073
6077
|
block: !0,
|
|
@@ -6076,77 +6080,77 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6076
6080
|
label: n.label,
|
|
6077
6081
|
children: l
|
|
6078
6082
|
})
|
|
6079
|
-
}), f = m.end,
|
|
6083
|
+
}), f = m.end, Y += 1;
|
|
6080
6084
|
continue;
|
|
6081
6085
|
}
|
|
6082
|
-
|
|
6086
|
+
Y += 1;
|
|
6083
6087
|
}
|
|
6084
|
-
let
|
|
6085
|
-
if (!
|
|
6086
|
-
let t =
|
|
6087
|
-
for (; i <
|
|
6088
|
-
if (
|
|
6088
|
+
let _ = e.startsWith("\\\\[", f) && /\s/.test(e[f + 3] ?? "");
|
|
6089
|
+
if (!K && H !== "plot" && e[f] === "\\" && (e[f + 1] === "(" || e[f + 1] === "[" || _) && !ra(pe, f)) {
|
|
6090
|
+
let t = _ || e[f + 1] === "[", n = _ ? 3 : 2, r = t ? "]" : ")", i = f + n;
|
|
6091
|
+
for (; i < V;) if (e[i] === "\\") {
|
|
6092
|
+
if (_ ? e.startsWith("\\\\]", i) && i + 2 < V && /\s/.test(e[i - 1] ?? "") : e[i + 1] === r && i + 1 < V) break;
|
|
6089
6093
|
i += 2;
|
|
6090
6094
|
} else i++;
|
|
6091
|
-
if (i >=
|
|
6092
|
-
S("local.math.unclosed", { key: "local.math.unclosed" }, f,
|
|
6095
|
+
if (i >= V) {
|
|
6096
|
+
S("local.math.unclosed", { key: "local.math.unclosed" }, f, V), f = V;
|
|
6093
6097
|
continue;
|
|
6094
6098
|
}
|
|
6095
6099
|
let a = i + n, o = e.slice(f + n, i);
|
|
6096
6100
|
o.length > ta && (S("local.budget.math", {
|
|
6097
6101
|
key: "local.budget.math",
|
|
6098
6102
|
params: { limit: ta }
|
|
6099
|
-
}, f, a), o = o.slice(0, ta)),
|
|
6103
|
+
}, f, a), o = o.slice(0, ta)), G.push({
|
|
6100
6104
|
start: f,
|
|
6101
6105
|
end: a,
|
|
6102
6106
|
node: h(t ? "math" : "inlineMath", f, a, { value: o })
|
|
6103
6107
|
}), f = a;
|
|
6104
6108
|
continue;
|
|
6105
6109
|
}
|
|
6106
|
-
let b =
|
|
6110
|
+
let b = R(f, V, q);
|
|
6107
6111
|
if (b !== null) f = b;
|
|
6108
6112
|
else if (e.startsWith("<!--", f)) {
|
|
6109
|
-
let t =
|
|
6110
|
-
if (!
|
|
6111
|
-
|
|
6113
|
+
let t = M(e, f, V), n = e.slice(f, t);
|
|
6114
|
+
if (!K && /^<!--\s*reactive-md(?=[\s:]|-->|$)/i.test(n)) {
|
|
6115
|
+
w.versionHeaders += 1;
|
|
6112
6116
|
let r = d.lineStartAt(f), i = e.indexOf("\n", t), a = /^\s*$/.test(e.slice(r, f)) && /^\s*$/.test(e.slice(t, i < 0 ? e.length : i)), o = /^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(n);
|
|
6113
|
-
|
|
6117
|
+
w.versionHeaders > 1 ? S("local.version.duplicate", "Only one source syntax declaration is allowed.", f, t) : !o || /[\r\n]/.test(n) ? S("local.version.malformed", `Use <!-- reactive-md: ${be} --> on one line.`, f, t) : (w.versionDeclaration = {
|
|
6114
6118
|
version: o[1],
|
|
6115
6119
|
range: {
|
|
6116
6120
|
start: f,
|
|
6117
6121
|
end: t
|
|
6118
6122
|
}
|
|
6119
|
-
},
|
|
6123
|
+
}, H !== void 0 || !a || Ji(e, 0, f) !== f ? S("local.version.placement", "The syntax declaration must be on its own line before the theme and document body.", f, t) : o[1] !== "local-draft-3" && S("local.version.unsupported", {
|
|
6120
6124
|
key: "local.version.unsupported",
|
|
6121
6125
|
params: {
|
|
6122
6126
|
declared: o[1],
|
|
6123
|
-
supported:
|
|
6127
|
+
supported: be
|
|
6124
6128
|
}
|
|
6125
6129
|
}, f, t));
|
|
6126
6130
|
}
|
|
6127
|
-
|
|
6131
|
+
G.push({
|
|
6128
6132
|
start: f,
|
|
6129
6133
|
end: t,
|
|
6130
6134
|
node: h("comment", f, t)
|
|
6131
6135
|
}), f = t;
|
|
6132
|
-
} else if (!
|
|
6133
|
-
let t =
|
|
6136
|
+
} else if (!K && e.startsWith("{{", f)) {
|
|
6137
|
+
let t = ne(f, V);
|
|
6134
6138
|
if (t < 0) {
|
|
6135
|
-
S("local.interpolation", { key: "local.interpolation.unclosed" }, f,
|
|
6139
|
+
S("local.interpolation", { key: "local.interpolation.unclosed" }, f, V), f += 2;
|
|
6136
6140
|
continue;
|
|
6137
6141
|
}
|
|
6138
|
-
|
|
6142
|
+
G.push({
|
|
6139
6143
|
start: f,
|
|
6140
6144
|
end: t,
|
|
6141
6145
|
node: h("interpolation", f, t, { value: e.slice(f + 2, t - 2).trim() })
|
|
6142
6146
|
}), f = t;
|
|
6143
|
-
} else if (!
|
|
6147
|
+
} else if (!K && e[f] === "$") {
|
|
6144
6148
|
let t = e[f + 1] === "$", n = t ? "$$" : "$";
|
|
6145
6149
|
if (t) {
|
|
6146
6150
|
let t = f + n.length;
|
|
6147
|
-
for (; t <
|
|
6151
|
+
for (; t < V; t++) if (e[t] === "\\") t++;
|
|
6148
6152
|
else if (e.startsWith(n, t)) break;
|
|
6149
|
-
if (t >=
|
|
6153
|
+
if (t >= V || !e.startsWith(n, t)) {
|
|
6150
6154
|
S("local.math.unclosed", { key: "local.math.unclosed" }, f, void 0), f += n.length;
|
|
6151
6155
|
continue;
|
|
6152
6156
|
}
|
|
@@ -6156,7 +6160,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6156
6160
|
params: { limit: ta }
|
|
6157
6161
|
}, f, t + n.length), r = r.slice(0, ta));
|
|
6158
6162
|
let i = t + n.length;
|
|
6159
|
-
|
|
6163
|
+
G.push({
|
|
6160
6164
|
start: f,
|
|
6161
6165
|
end: i,
|
|
6162
6166
|
node: h("math", f, i, { value: r })
|
|
@@ -6164,7 +6168,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6164
6168
|
continue;
|
|
6165
6169
|
}
|
|
6166
6170
|
let r = f + 1, i = -1;
|
|
6167
|
-
for (; r <
|
|
6171
|
+
for (; r < V; r++) {
|
|
6168
6172
|
let t = e[r];
|
|
6169
6173
|
if (t === "\\") {
|
|
6170
6174
|
r++;
|
|
@@ -6187,16 +6191,16 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6187
6191
|
params: { limit: ta }
|
|
6188
6192
|
}, f, i + 1), a = a.slice(0, ta));
|
|
6189
6193
|
let o = i + 1;
|
|
6190
|
-
|
|
6194
|
+
G.push({
|
|
6191
6195
|
start: f,
|
|
6192
6196
|
end: o,
|
|
6193
6197
|
node: h("inlineMath", f, o, { value: a })
|
|
6194
6198
|
}), f = o;
|
|
6195
6199
|
} else {
|
|
6196
6200
|
if (e[f] === "[") {
|
|
6197
|
-
let t =
|
|
6201
|
+
let t = N(f, V);
|
|
6198
6202
|
if (t && (e[t.closeEnd] !== ":" || !j(f))) {
|
|
6199
|
-
|
|
6203
|
+
G.push({
|
|
6200
6204
|
start: f,
|
|
6201
6205
|
end: t.closeEnd,
|
|
6202
6206
|
node: h("footnoteReference", f, t.closeEnd, {
|
|
@@ -6208,14 +6212,14 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6208
6212
|
}
|
|
6209
6213
|
}
|
|
6210
6214
|
if (e[f] === "<") {
|
|
6211
|
-
let d =
|
|
6215
|
+
let d = K ? null : se(f, V), p = d !== null && ae(f), m = null;
|
|
6212
6216
|
if (d) {
|
|
6213
|
-
let e = d.close, t =
|
|
6217
|
+
let e = d.close, t = H === void 0 ? null : oe(f, H, V);
|
|
6214
6218
|
m = e && (!t || e.end <= t.start) ? e : null;
|
|
6215
6219
|
}
|
|
6216
6220
|
if (d && !p && !a.has(d.name)) {
|
|
6217
6221
|
let t = m !== null && !/\r?\n[\t ]*\r?\n/.test(e.slice(d.open.end, m.start)) ? m.end : d.open.end;
|
|
6218
|
-
C("local.author.placement", { key: "local.author.placement" }, f, t),
|
|
6222
|
+
C("local.author.placement", { key: "local.author.placement" }, f, t), G.push({
|
|
6219
6223
|
start: f,
|
|
6220
6224
|
end: t,
|
|
6221
6225
|
block: !1,
|
|
@@ -6224,8 +6228,8 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6224
6228
|
continue;
|
|
6225
6229
|
}
|
|
6226
6230
|
if (d && p && !a.has(d.name)) {
|
|
6227
|
-
let t =
|
|
6228
|
-
|
|
6231
|
+
let t = H === void 0 && ue === 0, n = t && !re && ie(f), r = m ? m.end : d.open.self ? d.open.end : V, i = d.name === "javascript" ? t : n, a = () => {
|
|
6232
|
+
G.push({
|
|
6229
6233
|
start: f,
|
|
6230
6234
|
end: r,
|
|
6231
6235
|
block: !0,
|
|
@@ -6237,11 +6241,11 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6237
6241
|
continue;
|
|
6238
6242
|
}
|
|
6239
6243
|
if (!m) {
|
|
6240
|
-
let t =
|
|
6244
|
+
let t = k(d.open.end, V, H);
|
|
6241
6245
|
C("local.author.unclosed", {
|
|
6242
6246
|
key: "local.author.unclosed",
|
|
6243
6247
|
params: { name: d.name }
|
|
6244
|
-
}, f, t),
|
|
6248
|
+
}, f, t), G.push({
|
|
6245
6249
|
start: f,
|
|
6246
6250
|
end: t,
|
|
6247
6251
|
block: !0,
|
|
@@ -6253,36 +6257,36 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6253
6257
|
C(d.name === "css" ? "local.author.css-placement" : "local.author.script-placement", { key: d.name === "css" ? "local.author.css-placement" : "local.author.script-placement" }, f, m.end), a();
|
|
6254
6258
|
continue;
|
|
6255
6259
|
}
|
|
6256
|
-
d.name === "javascript" && t && (
|
|
6260
|
+
d.name === "javascript" && t && (re = !0);
|
|
6257
6261
|
let o = d.name === "css" ? "authorCss" : "authorJavaScript";
|
|
6258
|
-
|
|
6262
|
+
G.push({
|
|
6259
6263
|
start: f,
|
|
6260
6264
|
end: m.end,
|
|
6261
6265
|
block: !0,
|
|
6262
6266
|
node: h(o, f, m.end, { value: e.slice(d.open.end, m.start) })
|
|
6263
|
-
}), n && (
|
|
6267
|
+
}), n && (w.headerCursor = m.end), f = m.end;
|
|
6264
6268
|
continue;
|
|
6265
6269
|
}
|
|
6266
6270
|
if (l) {
|
|
6267
6271
|
let r = t.length, i = !1, o;
|
|
6268
6272
|
try {
|
|
6269
|
-
o = l.readTable(e, f,
|
|
6273
|
+
o = l.readTable(e, f, V, {
|
|
6270
6274
|
shield: (t, n) => {
|
|
6271
6275
|
if (e.startsWith("{{", t)) {
|
|
6272
|
-
let e =
|
|
6276
|
+
let e = ne(t, n);
|
|
6273
6277
|
if (e >= 0) return e;
|
|
6274
6278
|
}
|
|
6275
6279
|
if (e[t] === "<") {
|
|
6276
|
-
let e =
|
|
6277
|
-
if (e && !e.closing && !
|
|
6278
|
-
let t =
|
|
6280
|
+
let e = O(t, n);
|
|
6281
|
+
if (e && !e.closing && !de.has(e.name.toLowerCase()) && !Pi.has(e.name.toLowerCase()) && !a.has(e.name.toLowerCase())) {
|
|
6282
|
+
let t = te(e.end, e.name, n, q);
|
|
6279
6283
|
if (t) return t.end;
|
|
6280
6284
|
}
|
|
6281
6285
|
}
|
|
6282
|
-
return
|
|
6286
|
+
return R(t, n, q);
|
|
6283
6287
|
},
|
|
6284
6288
|
budget: (e, t) => {
|
|
6285
|
-
if (t > n * 2) throw new Li("local.budget", `Syntax nodes exceed the limit of ${n}.`, e, e + 1, "local.budget.nodes", { limit: n });
|
|
6289
|
+
if (t > n * 2) throw new Li("local.budget", `Syntax nodes exceed the limit of ${n}.`, e, e + 1, "local.budget.nodes", { limit: n }, t);
|
|
6286
6290
|
},
|
|
6287
6291
|
node: h,
|
|
6288
6292
|
problem: (e, t, n, r, a) => {
|
|
@@ -6295,7 +6299,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6295
6299
|
}, t, n);
|
|
6296
6300
|
},
|
|
6297
6301
|
attributes: (e, t, n) => {
|
|
6298
|
-
let r =
|
|
6302
|
+
let r = ee(t, n, !0), a = r && I(e, r);
|
|
6299
6303
|
if (!a || !a.ok) {
|
|
6300
6304
|
i = !0;
|
|
6301
6305
|
let r = a && !a.ok ? a.attr : "";
|
|
@@ -6315,19 +6319,19 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6315
6319
|
}
|
|
6316
6320
|
return a.attrs;
|
|
6317
6321
|
},
|
|
6318
|
-
content: (e, t) =>
|
|
6319
|
-
...
|
|
6322
|
+
content: (e, t) => E(e, t, ce(e, t, void 0, e, e, ue + 1, {
|
|
6323
|
+
...W,
|
|
6320
6324
|
definitions: []
|
|
6321
|
-
}).tokens,
|
|
6322
|
-
literalHtml:
|
|
6323
|
-
stripBlockquote:
|
|
6325
|
+
}).tokens, z(e, t), {
|
|
6326
|
+
literalHtml: K,
|
|
6327
|
+
stripBlockquote: W.stripBlockquote === !0
|
|
6324
6328
|
})
|
|
6325
6329
|
});
|
|
6326
6330
|
} catch (n) {
|
|
6327
6331
|
if (n instanceof Li) throw n;
|
|
6328
|
-
let a =
|
|
6332
|
+
let a = O(f, V);
|
|
6329
6333
|
if (!a || a.closing || a.name.toLowerCase() !== "table") throw n;
|
|
6330
|
-
let s =
|
|
6334
|
+
let s = te(a.end, a.name, V, q, !0)?.end ?? k(a.end, V, H), c = t.slice(r).filter((e) => e.code.startsWith("local.budget"));
|
|
6331
6335
|
t.splice(r, t.length - r, ...c), C("local.html.fallback", { key: "local.html.fallback" }, f, s), o = {
|
|
6332
6336
|
node: h("fallback", f, s, { value: e.slice(f, s) }),
|
|
6333
6337
|
end: s
|
|
@@ -6338,7 +6342,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6338
6342
|
let e = t.slice(r).filter((e) => e.code === "local.html.fallback" || e.code.startsWith("local.budget"));
|
|
6339
6343
|
t.splice(r, t.length - r, ...e);
|
|
6340
6344
|
}
|
|
6341
|
-
|
|
6345
|
+
G.push({
|
|
6342
6346
|
start: f,
|
|
6343
6347
|
end: o.end,
|
|
6344
6348
|
block: !0,
|
|
@@ -6347,10 +6351,10 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6347
6351
|
continue;
|
|
6348
6352
|
}
|
|
6349
6353
|
}
|
|
6350
|
-
let g =
|
|
6354
|
+
let g = ee(f, V);
|
|
6351
6355
|
if (g) {
|
|
6352
6356
|
if (g.closing) {
|
|
6353
|
-
C("local.html.fallback", { key: "local.html.fallback" }, f, g.end),
|
|
6357
|
+
C("local.html.fallback", { key: "local.html.fallback" }, f, g.end), G.push({
|
|
6354
6358
|
start: f,
|
|
6355
6359
|
end: g.end,
|
|
6356
6360
|
block: !1,
|
|
@@ -6358,13 +6362,13 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6358
6362
|
}), f = g.end;
|
|
6359
6363
|
continue;
|
|
6360
6364
|
}
|
|
6361
|
-
let t =
|
|
6365
|
+
let t = I(g.lower, g);
|
|
6362
6366
|
if (!t.ok) {
|
|
6363
|
-
let n = g.self ||
|
|
6367
|
+
let n = g.self || he.has(g.lower) ? g.end : F(g.end, g.lower, V, q)?.end ?? k(g.end, V, H, g.lower);
|
|
6364
6368
|
C("local.html.fallback", {
|
|
6365
6369
|
key: "local.html.fallback.attribute",
|
|
6366
6370
|
params: { name: t.attr }
|
|
6367
|
-
}, f, n),
|
|
6371
|
+
}, f, n), G.push({
|
|
6368
6372
|
start: f,
|
|
6369
6373
|
end: n,
|
|
6370
6374
|
block: !1,
|
|
@@ -6373,13 +6377,13 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6373
6377
|
continue;
|
|
6374
6378
|
}
|
|
6375
6379
|
let n = t.attrs;
|
|
6376
|
-
if (
|
|
6377
|
-
if (g.lower === "br")
|
|
6380
|
+
if (he.has(g.lower)) {
|
|
6381
|
+
if (g.lower === "br") G.push({
|
|
6378
6382
|
start: f,
|
|
6379
6383
|
end: g.end,
|
|
6380
6384
|
node: h("break", f, g.end, { attrs: n })
|
|
6381
6385
|
});
|
|
6382
|
-
else if (g.lower === "hr")
|
|
6386
|
+
else if (g.lower === "hr") G.push({
|
|
6383
6387
|
start: f,
|
|
6384
6388
|
end: g.end,
|
|
6385
6389
|
block: !0,
|
|
@@ -6387,7 +6391,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6387
6391
|
});
|
|
6388
6392
|
else {
|
|
6389
6393
|
let e = n.width === void 0 ? void 0 : Number(n.width), t = n.height === void 0 ? void 0 : Number(n.height);
|
|
6390
|
-
|
|
6394
|
+
G.push({
|
|
6391
6395
|
start: f,
|
|
6392
6396
|
end: g.end,
|
|
6393
6397
|
node: h("image", f, g.end, {
|
|
@@ -6403,21 +6407,21 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6403
6407
|
f = g.end;
|
|
6404
6408
|
continue;
|
|
6405
6409
|
}
|
|
6406
|
-
let o =
|
|
6410
|
+
let o = F(g.end, g.lower, V, q);
|
|
6407
6411
|
if (!o) {
|
|
6408
|
-
let t =
|
|
6412
|
+
let t = k(g.end, V, H, g.lower);
|
|
6409
6413
|
if (!r && l) {
|
|
6410
6414
|
i.charge(t - f, f, t);
|
|
6411
6415
|
let n = l.recoverFragment(e, f, t, h, new Set(a.keys()));
|
|
6412
6416
|
if (n) {
|
|
6413
|
-
|
|
6414
|
-
for (let e of n.nodes)
|
|
6417
|
+
y.push(n.recovery);
|
|
6418
|
+
for (let e of n.nodes) G.push({
|
|
6415
6419
|
start: e.range.start,
|
|
6416
6420
|
end: e.range.end,
|
|
6417
6421
|
block: Qi.has(g.lower) || Fi.has(e.type),
|
|
6418
6422
|
node: e
|
|
6419
6423
|
});
|
|
6420
|
-
} else
|
|
6424
|
+
} else y.push({
|
|
6421
6425
|
code: "local.html.literal",
|
|
6422
6426
|
causeRange: {
|
|
6423
6427
|
start: f,
|
|
@@ -6429,7 +6433,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6429
6433
|
},
|
|
6430
6434
|
action: "literal-fallback",
|
|
6431
6435
|
boundary: "fragment"
|
|
6432
|
-
}),
|
|
6436
|
+
}), G.push({
|
|
6433
6437
|
start: f,
|
|
6434
6438
|
end: t,
|
|
6435
6439
|
block: j(f),
|
|
@@ -6438,7 +6442,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6438
6442
|
f = t;
|
|
6439
6443
|
continue;
|
|
6440
6444
|
}
|
|
6441
|
-
C("local.html.fallback", { key: "local.html.fallback" }, f, t),
|
|
6445
|
+
C("local.html.fallback", { key: "local.html.fallback" }, f, t), G.push({
|
|
6442
6446
|
start: f,
|
|
6443
6447
|
end: t,
|
|
6444
6448
|
block: j(f),
|
|
@@ -6446,14 +6450,14 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6446
6450
|
}), f = t;
|
|
6447
6451
|
continue;
|
|
6448
6452
|
}
|
|
6449
|
-
let s = Qi.has(g.lower), c =
|
|
6450
|
-
footnote:
|
|
6451
|
-
container:
|
|
6452
|
-
indent:
|
|
6453
|
-
stripBlockquote:
|
|
6454
|
-
depth:
|
|
6453
|
+
let s = Qi.has(g.lower), c = L(g, o, n, {
|
|
6454
|
+
footnote: K,
|
|
6455
|
+
container: q,
|
|
6456
|
+
indent: fe,
|
|
6457
|
+
stripBlockquote: W.stripBlockquote === !0,
|
|
6458
|
+
depth: ue
|
|
6455
6459
|
});
|
|
6456
|
-
|
|
6460
|
+
G.push({
|
|
6457
6461
|
start: f,
|
|
6458
6462
|
end: o.end,
|
|
6459
6463
|
...s ? { block: !0 } : {},
|
|
@@ -6461,28 +6465,28 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6461
6465
|
}), f = o.end;
|
|
6462
6466
|
continue;
|
|
6463
6467
|
}
|
|
6464
|
-
if (
|
|
6468
|
+
if (K) {
|
|
6465
6469
|
f += 1;
|
|
6466
6470
|
continue;
|
|
6467
6471
|
}
|
|
6468
|
-
let _ = Ki(e, f) ? qi(e, f,
|
|
6472
|
+
let _ = Ki(e, f) ? qi(e, f, V) : null;
|
|
6469
6473
|
if (_) {
|
|
6470
|
-
if (
|
|
6471
|
-
if (
|
|
6474
|
+
if (H === void 0 && !re && ie(f)) {
|
|
6475
|
+
if (w.themeHeaders += 1, w.themeHeaders === 1 && (w.themeRange = {
|
|
6472
6476
|
start: _.start,
|
|
6473
6477
|
end: _.end
|
|
6474
6478
|
}), _.unclosed) C("local.theme.malformed", { key: "local.theme.malformed.unclosed" }, f, _.end);
|
|
6475
6479
|
else if (_.closing) C("local.theme.malformed", { key: "local.theme.malformed.closing" }, f, _.end);
|
|
6476
6480
|
else if (!Yi(e, _)) C("local.theme.malformed", { key: "local.theme.malformed.placement" }, f, _.end);
|
|
6477
|
-
else if (
|
|
6481
|
+
else if (w.themeHeaders > 1) C("local.theme.duplicate", { key: "local.theme.duplicate.declaration" }, f, _.end);
|
|
6478
6482
|
else {
|
|
6479
6483
|
let e = Xi(_.rest);
|
|
6480
6484
|
e.code ? C(e.code, e.message ?? "Invalid theme declaration.", f, _.end, {
|
|
6481
6485
|
key: e.key ?? e.code,
|
|
6482
6486
|
...e.params ? { params: e.params } : {}
|
|
6483
|
-
}) :
|
|
6487
|
+
}) : w.theme = e.name;
|
|
6484
6488
|
}
|
|
6485
|
-
|
|
6489
|
+
w.headerCursor = _.end, G.push({
|
|
6486
6490
|
start: f,
|
|
6487
6491
|
end: _.end,
|
|
6488
6492
|
block: !0,
|
|
@@ -6490,8 +6494,8 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6490
6494
|
}), f = _.end;
|
|
6491
6495
|
continue;
|
|
6492
6496
|
}
|
|
6493
|
-
let t =
|
|
6494
|
-
C(t,
|
|
6497
|
+
let t = H === void 0 ? "local.theme.late" : "local.theme.nested";
|
|
6498
|
+
C(t, H === void 0 ? "Theme declarations after document content are ignored." : "Theme declarations inside document content are ignored.", f, _.end, { key: t }), G.push({
|
|
6495
6499
|
start: f,
|
|
6496
6500
|
end: _.end,
|
|
6497
6501
|
block: !1,
|
|
@@ -6499,28 +6503,28 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6499
6503
|
}), f = _.end;
|
|
6500
6504
|
continue;
|
|
6501
6505
|
}
|
|
6502
|
-
let
|
|
6503
|
-
if (
|
|
6504
|
-
C("local.author.placement", { key: "local.author.placement" }, f,
|
|
6506
|
+
let v = O(f, V);
|
|
6507
|
+
if (v && !K && v.closing && !a.has(v.name.toLowerCase()) && ea.has(v.name.toLowerCase())) {
|
|
6508
|
+
C("local.author.placement", { key: "local.author.placement" }, f, v.end), G.push({
|
|
6505
6509
|
start: f,
|
|
6506
|
-
end:
|
|
6510
|
+
end: v.end,
|
|
6507
6511
|
block: !1,
|
|
6508
|
-
node: h("fallback", f,
|
|
6509
|
-
}), f =
|
|
6512
|
+
node: h("fallback", f, v.end, { value: e.slice(f, v.end) })
|
|
6513
|
+
}), f = v.end;
|
|
6510
6514
|
continue;
|
|
6511
6515
|
}
|
|
6512
|
-
|
|
6516
|
+
v && !K && a.has(v.name.toLowerCase()) && ea.has(v.name.toLowerCase()) && !v.closing && C("local.author.component-conflict", {
|
|
6513
6517
|
key: "local.author.component-conflict",
|
|
6514
|
-
params: { name:
|
|
6515
|
-
}, f,
|
|
6516
|
-
let b =
|
|
6517
|
-
if (!
|
|
6518
|
-
let t =
|
|
6519
|
-
start:
|
|
6520
|
-
end:
|
|
6521
|
-
} : Bi(e,
|
|
6518
|
+
params: { name: v.name }
|
|
6519
|
+
}, f, v.end);
|
|
6520
|
+
let b = v?.name.toLowerCase() ?? "";
|
|
6521
|
+
if (!K && v && !v.closing && b && zi.has(b) && !Pi.has(b) && !a.has(b) && !Ii.has(b) && (b === "iframe" || j(f))) {
|
|
6522
|
+
let t = v.self ? {
|
|
6523
|
+
start: v.end,
|
|
6524
|
+
end: v.end
|
|
6525
|
+
} : Bi(e, v.end, b, V), n = H === void 0 ? null : oe(f, H, V);
|
|
6522
6526
|
if (t && (!n || t.end <= n.start)) {
|
|
6523
|
-
|
|
6527
|
+
G.push({
|
|
6524
6528
|
start: f,
|
|
6525
6529
|
end: t.end,
|
|
6526
6530
|
block: j(f),
|
|
@@ -6529,13 +6533,13 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6529
6533
|
continue;
|
|
6530
6534
|
}
|
|
6531
6535
|
}
|
|
6532
|
-
if (
|
|
6533
|
-
let t = !
|
|
6534
|
-
n ?
|
|
6536
|
+
if (v && !a.has(v.name.toLowerCase()) && u.has(v.name.toLowerCase())) {
|
|
6537
|
+
let t = !v.closing && !v.self && !Ii.has(v.name.toLowerCase()) ? te(v.end, v.name, V, q, !0) : null, n = !r && !v.closing && !v.self && A.has(v.name.toLowerCase()) && (!t || v.name.toLowerCase() === "plaintext"), i = v.closing || v.self || Ii.has(v.name.toLowerCase()) ? v.end : n ? V : t?.end ?? k(v.end, V, H, v.name);
|
|
6538
|
+
n ? y.push({
|
|
6535
6539
|
code: "local.html.literal",
|
|
6536
6540
|
causeRange: {
|
|
6537
6541
|
start: f,
|
|
6538
|
-
end:
|
|
6542
|
+
end: v.end
|
|
6539
6543
|
},
|
|
6540
6544
|
affectedRange: {
|
|
6541
6545
|
start: f,
|
|
@@ -6543,7 +6547,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6543
6547
|
},
|
|
6544
6548
|
action: "literal-fallback",
|
|
6545
6549
|
boundary: i === e.length ? "eof" : "fragment"
|
|
6546
|
-
}) : C("local.html.fallback", { key: "local.html.fallback" }, f, i),
|
|
6550
|
+
}) : C("local.html.fallback", { key: "local.html.fallback" }, f, i), G.push({
|
|
6547
6551
|
start: f,
|
|
6548
6552
|
end: i,
|
|
6549
6553
|
block: j(f),
|
|
@@ -6551,32 +6555,32 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6551
6555
|
}), f = i;
|
|
6552
6556
|
continue;
|
|
6553
6557
|
}
|
|
6554
|
-
if (
|
|
6555
|
-
let t =
|
|
6558
|
+
if (v && !v.closing && Zi.test(v.name) && v.name.length <= $i && !a.has(v.name)) {
|
|
6559
|
+
let t = v.self || s.has(v.name) ? v.end : te(v.end, v.name, V, q)?.end ?? null;
|
|
6556
6560
|
if (t === null) {
|
|
6557
6561
|
if (!j(f)) {
|
|
6558
|
-
|
|
6562
|
+
G.push({
|
|
6559
6563
|
start: f,
|
|
6560
|
-
end:
|
|
6564
|
+
end: v.end,
|
|
6561
6565
|
block: !1,
|
|
6562
|
-
node: h("text", f,
|
|
6563
|
-
}), f =
|
|
6566
|
+
node: h("text", f, v.end, { value: e.slice(f, v.end) })
|
|
6567
|
+
}), f = v.end;
|
|
6564
6568
|
continue;
|
|
6565
6569
|
}
|
|
6566
6570
|
S("local.tag.unclosed", {
|
|
6567
6571
|
key: "local.tag.unclosed.pair",
|
|
6568
|
-
params: { name:
|
|
6569
|
-
}, f,
|
|
6572
|
+
params: { name: v.name }
|
|
6573
|
+
}, f, v.end), f = v.end;
|
|
6570
6574
|
continue;
|
|
6571
6575
|
}
|
|
6572
|
-
let n =
|
|
6576
|
+
let n = _e(v.name, c);
|
|
6573
6577
|
C("local.component.unknown", {
|
|
6574
6578
|
key: n ? "local.component.unknown.suggestion" : "local.component.unknown",
|
|
6575
6579
|
params: n ? {
|
|
6576
|
-
name:
|
|
6580
|
+
name: v.name,
|
|
6577
6581
|
suggestion: n
|
|
6578
|
-
} : { name:
|
|
6579
|
-
}, f, t),
|
|
6582
|
+
} : { name: v.name }
|
|
6583
|
+
}, f, t), G.push({
|
|
6580
6584
|
start: f,
|
|
6581
6585
|
end: t,
|
|
6582
6586
|
block: j(f),
|
|
@@ -6584,12 +6588,12 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6584
6588
|
}), f = t;
|
|
6585
6589
|
continue;
|
|
6586
6590
|
}
|
|
6587
|
-
let x =
|
|
6591
|
+
let x = D(f, V);
|
|
6588
6592
|
if (x) {
|
|
6589
6593
|
if (x.unclosed) {
|
|
6590
6594
|
if (!a.has(x.name.toLowerCase()) && u.has(x.name.toLowerCase())) {
|
|
6591
|
-
let t =
|
|
6592
|
-
!r &&
|
|
6595
|
+
let t = k(x.head, V, H, x.name);
|
|
6596
|
+
!r && A.has(x.name.toLowerCase()) ? y.push({
|
|
6593
6597
|
code: "local.html.literal",
|
|
6594
6598
|
causeRange: {
|
|
6595
6599
|
start: f,
|
|
@@ -6601,7 +6605,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6601
6605
|
},
|
|
6602
6606
|
action: "literal-fallback",
|
|
6603
6607
|
boundary: t === e.length ? "eof" : "fragment"
|
|
6604
|
-
}) : C("local.html.fallback", { key: "local.html.fallback" }, f, t),
|
|
6608
|
+
}) : C("local.html.fallback", { key: "local.html.fallback" }, f, t), G.push({
|
|
6605
6609
|
start: f,
|
|
6606
6610
|
end: t,
|
|
6607
6611
|
block: j(f),
|
|
@@ -6610,7 +6614,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6610
6614
|
continue;
|
|
6611
6615
|
}
|
|
6612
6616
|
if (!a.has(x.name.toLowerCase()) && !j(f)) {
|
|
6613
|
-
|
|
6617
|
+
G.push({
|
|
6614
6618
|
start: f,
|
|
6615
6619
|
end: x.head,
|
|
6616
6620
|
block: !1,
|
|
@@ -6621,11 +6625,11 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6621
6625
|
S("local.tag.unclosed", {
|
|
6622
6626
|
key: "local.tag.unclosed.open",
|
|
6623
6627
|
params: { name: x.name }
|
|
6624
|
-
}, f,
|
|
6628
|
+
}, f, V), f = V;
|
|
6625
6629
|
continue;
|
|
6626
6630
|
}
|
|
6627
6631
|
if (!Zi.test(x.name) && !a.has(x.name.toLowerCase())) {
|
|
6628
|
-
|
|
6632
|
+
G.push({
|
|
6629
6633
|
start: f,
|
|
6630
6634
|
end: x.end,
|
|
6631
6635
|
block: !1,
|
|
@@ -6637,11 +6641,11 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6637
6641
|
key: "local.tag.name",
|
|
6638
6642
|
params: { name: x.name }
|
|
6639
6643
|
}, f, f + 1 + x.name.length), x.closing) {
|
|
6640
|
-
if (x.name ===
|
|
6641
|
-
tokens:
|
|
6644
|
+
if (x.name === H) return {
|
|
6645
|
+
tokens: G,
|
|
6642
6646
|
end: x.end,
|
|
6643
6647
|
contentEnd: f,
|
|
6644
|
-
indent:
|
|
6648
|
+
indent: z(T, f)
|
|
6645
6649
|
};
|
|
6646
6650
|
if (o.has(x.name) && a.get(x.name)?.form === "leaf") {
|
|
6647
6651
|
S("local.host.structure", {
|
|
@@ -6651,10 +6655,10 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6651
6655
|
continue;
|
|
6652
6656
|
}
|
|
6653
6657
|
S("local.tag.mismatch", {
|
|
6654
|
-
key:
|
|
6655
|
-
params:
|
|
6658
|
+
key: H ? "local.tag.mismatch.parent" : "local.tag.mismatch.root",
|
|
6659
|
+
params: H ? {
|
|
6656
6660
|
name: x.name,
|
|
6657
|
-
parent:
|
|
6661
|
+
parent: H
|
|
6658
6662
|
} : { name: x.name }
|
|
6659
6663
|
}, f, x.end), f = x.end;
|
|
6660
6664
|
continue;
|
|
@@ -6664,7 +6668,7 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6664
6668
|
key: "local.tag.shape",
|
|
6665
6669
|
params: { name: x.name }
|
|
6666
6670
|
}, f, x.end), l) {
|
|
6667
|
-
|
|
6671
|
+
G.push({
|
|
6668
6672
|
start: f,
|
|
6669
6673
|
end: x.end,
|
|
6670
6674
|
...n ? { block: j(f) } : {},
|
|
@@ -6677,13 +6681,13 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6677
6681
|
}), f = x.end;
|
|
6678
6682
|
continue;
|
|
6679
6683
|
}
|
|
6680
|
-
let d =
|
|
6684
|
+
let d = ce(x.end, V, x.name, f, x.end, ue + 1), p = E(x.end, d.contentEnd, d.tokens, c ? 0 : d.indent), m = h(n ? "hostComponent" : "component", f, d.end, {
|
|
6681
6685
|
name: x.name,
|
|
6682
6686
|
attrs: x.attrs,
|
|
6683
6687
|
children: c && p.length === 1 && p[0].type === "paragraph" ? p[0].children ?? [] : p,
|
|
6684
6688
|
...n ? { hostForm: i } : {}
|
|
6685
6689
|
});
|
|
6686
|
-
|
|
6690
|
+
G.push({
|
|
6687
6691
|
start: f,
|
|
6688
6692
|
end: d.end,
|
|
6689
6693
|
...n ? { block: j(f) } : {},
|
|
@@ -6695,17 +6699,17 @@ function ia({ source: e, diagnostics: t, maxSyntaxNodes: n, strict: r, budget: i
|
|
|
6695
6699
|
f++;
|
|
6696
6700
|
}
|
|
6697
6701
|
}
|
|
6698
|
-
return
|
|
6702
|
+
return H && S("local.tag.unclosed", {
|
|
6699
6703
|
key: "local.tag.unclosed.pair",
|
|
6700
|
-
params: { name:
|
|
6701
|
-
}, U, Math.min(e.length, Math.max(
|
|
6702
|
-
tokens:
|
|
6703
|
-
end:
|
|
6704
|
-
contentEnd:
|
|
6705
|
-
indent:
|
|
6704
|
+
params: { name: H }
|
|
6705
|
+
}, U, Math.min(e.length, Math.max(le, U + 1))), {
|
|
6706
|
+
tokens: G,
|
|
6707
|
+
end: V,
|
|
6708
|
+
contentEnd: V,
|
|
6709
|
+
indent: H ? z(T, V) : 0
|
|
6706
6710
|
};
|
|
6707
6711
|
}
|
|
6708
|
-
return
|
|
6712
|
+
return ce;
|
|
6709
6713
|
}
|
|
6710
6714
|
// src/local/parsing/footnotes.ts
|
|
6711
6715
|
function aa(e) {
|
|
@@ -6816,20 +6820,20 @@ function pa(e, t) {
|
|
|
6816
6820
|
// src/local/parsing/parser-convert.ts
|
|
6817
6821
|
function ma({ source: e, maxSyntaxNodes: t, budget: n, markdownBreaks: r, isInlineName: i, sourceContext: a, work: o, parseMarkdown: s, readNodeCount: c, fastPlans: l, node: u, reservedMarkers: d, sourceBomOffset: f, rootMarkdown: p, maskedAuthorBody: m, error: h }) {
|
|
6818
6822
|
let g = 0;
|
|
6819
|
-
function
|
|
6820
|
-
|
|
6821
|
-
let C = "", w =
|
|
6823
|
+
function v(v, y, b, x = 0, S = {}) {
|
|
6824
|
+
y > v && n.charge(y - v, v, y);
|
|
6825
|
+
let C = "", w = v, T = !1, E = v === 0 && y === e.length && b.length === 0 && x === 0 && !S.stripBlockquote && !S.literalHtml && !m && !p?.children.some((e) => e.plan?.shieldOnly), D = new _(a), O = (e, t) => E ? e + f : D.at(e, t), k = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Set();
|
|
6822
6826
|
function j(e) {
|
|
6823
6827
|
A.add(D.length), M("", e, !1);
|
|
6824
6828
|
}
|
|
6825
6829
|
function M(e, t, n) {
|
|
6826
|
-
n ? (e.trim().length && (T = !0), D.original(t, t + e.length,
|
|
6830
|
+
n ? (e.trim().length && (T = !0), D.original(t, t + e.length, x, S.stripBlockquote, !0)) : D.generated(e, t);
|
|
6827
6831
|
}
|
|
6828
6832
|
let N;
|
|
6829
6833
|
if (E) C = e.slice(f), N = p, p = void 0;
|
|
6830
6834
|
else {
|
|
6831
|
-
|
|
6832
|
-
for (let t of
|
|
6835
|
+
v === 0 && y === e.length && (p = void 0);
|
|
6836
|
+
for (let t of b) {
|
|
6833
6837
|
M(e.slice(w, t.start), w, !0);
|
|
6834
6838
|
let n;
|
|
6835
6839
|
do
|
|
@@ -6846,7 +6850,7 @@ function ma({ source: e, maxSyntaxNodes: t, budget: n, markdownBreaks: r, isInli
|
|
|
6846
6850
|
node: t.node
|
|
6847
6851
|
}), a && /[*_]/.test(e[t.end] ?? "") && j(t.end), r && M("\n\n", t.end, !1), w = t.end;
|
|
6848
6852
|
}
|
|
6849
|
-
M(e.slice(w,
|
|
6853
|
+
M(e.slice(w, y), w, !0), D.finish(y), C = D.text(), o.mappingSegments += D.segmentCount;
|
|
6850
6854
|
let t = new Map([...k].filter(([, e]) => e.node.type === "interpolation"));
|
|
6851
6855
|
N = s(C, T, {
|
|
6852
6856
|
allowBraces: !0,
|
|
@@ -6912,20 +6916,20 @@ function ma({ source: e, maxSyntaxNodes: t, budget: n, markdownBreaks: r, isInli
|
|
|
6912
6916
|
}
|
|
6913
6917
|
return f < a.length && d.push(u("text", p, i, { value: a.slice(f) })), d;
|
|
6914
6918
|
}
|
|
6915
|
-
let
|
|
6916
|
-
function
|
|
6917
|
-
return t.indexOf("") < 0 ? t : (
|
|
6918
|
-
let r =
|
|
6919
|
+
let F;
|
|
6920
|
+
function I(t) {
|
|
6921
|
+
return t.indexOf("") < 0 ? t : (F ??= new Map([...k.values()].map((e) => [e.marker, e])), t.replace(/* @__PURE__ */ RegExp("?([0-9]+)?", "g"), (t, n) => {
|
|
6922
|
+
let r = F.get(n);
|
|
6919
6923
|
return r ? e.slice(r.node.range.start, r.node.range.end) : t;
|
|
6920
6924
|
}));
|
|
6921
6925
|
}
|
|
6922
|
-
function
|
|
6923
|
-
let r = O(e.position?.start?.offset ?? 0,
|
|
6926
|
+
function L(e, n) {
|
|
6927
|
+
let r = O(e.position?.start?.offset ?? 0, v), a = O(e.position?.end?.offset ?? C.length, y);
|
|
6924
6928
|
if (e.type === "rmdFastBlock") {
|
|
6925
6929
|
let n = e.plan, i = e.position.start.offset;
|
|
6926
6930
|
l.add(n);
|
|
6927
6931
|
let o = n.overflowAt(t - c());
|
|
6928
|
-
if (o) throw new Li("local.budget", `Syntax nodes exceed the limit of ${t}.`, O(i + o.start, r), O(i + o.end, a), "local.budget.nodes", { limit: t });
|
|
6932
|
+
if (o) throw new Li("local.budget", `Syntax nodes exceed the limit of ${t}.`, O(i + o.start, r), O(i + o.end, a), "local.budget.nodes", { limit: t }, t + 1);
|
|
6929
6933
|
let s = n.emit((e, t, n, o) => {
|
|
6930
6934
|
if (e === "rmdOpaque") {
|
|
6931
6935
|
let e = k.get(i + t);
|
|
@@ -6981,31 +6985,31 @@ function ma({ source: e, maxSyntaxNodes: t, budget: n, markdownBreaks: r, isInli
|
|
|
6981
6985
|
"lang",
|
|
6982
6986
|
"align"
|
|
6983
6987
|
]) e[t] !== void 0 && (o[t] = e[t]);
|
|
6984
|
-
return typeof o.alt == "string" && (o.alt =
|
|
6988
|
+
return typeof o.alt == "string" && (o.alt = I(o.alt)), n && (o.children = n), e.type === "table" && o.children && P(o.children), [o];
|
|
6985
6989
|
}
|
|
6986
|
-
let
|
|
6990
|
+
let R = [{
|
|
6987
6991
|
raw: N,
|
|
6988
6992
|
index: 0,
|
|
6989
6993
|
children: []
|
|
6990
6994
|
}];
|
|
6991
|
-
for (;
|
|
6992
|
-
let e =
|
|
6995
|
+
for (; R.length;) {
|
|
6996
|
+
let e = R[R.length - 1];
|
|
6993
6997
|
if (e.raw.children && e.index < e.raw.children.length) {
|
|
6994
6998
|
let t = e.raw.children[e.index++];
|
|
6995
|
-
|
|
6999
|
+
R.push({
|
|
6996
7000
|
raw: t,
|
|
6997
7001
|
index: 0,
|
|
6998
7002
|
children: t.children ? [] : void 0
|
|
6999
7003
|
});
|
|
7000
7004
|
continue;
|
|
7001
7005
|
}
|
|
7002
|
-
if (
|
|
7003
|
-
let t =
|
|
7004
|
-
for (let e of t)
|
|
7006
|
+
if (R.pop(), !R.length) return e.children ?? [];
|
|
7007
|
+
let t = L(e.raw, e.children);
|
|
7008
|
+
for (let e of t) R[R.length - 1].children.push(e);
|
|
7005
7009
|
}
|
|
7006
7010
|
return [];
|
|
7007
7011
|
}
|
|
7008
|
-
return
|
|
7012
|
+
return v;
|
|
7009
7013
|
}
|
|
7010
7014
|
// src/local/parsing/html-attributes.ts
|
|
7011
7015
|
function ha(e, t, n) {
|
|
@@ -7181,7 +7185,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7181
7185
|
let t = e.indexOf("\n", a);
|
|
7182
7186
|
t >= 0 && (o = Math.min(r, t));
|
|
7183
7187
|
}
|
|
7184
|
-
let c =
|
|
7188
|
+
let c = j(e, a, o), u = i[2];
|
|
7185
7189
|
if (c < 0) return {
|
|
7186
7190
|
name: u,
|
|
7187
7191
|
closing: !!i[1],
|
|
@@ -7229,7 +7233,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7229
7233
|
let t = e.indexOf("\n", a);
|
|
7230
7234
|
t >= 0 && (o = Math.min(r, t));
|
|
7231
7235
|
}
|
|
7232
|
-
let c =
|
|
7236
|
+
let c = j(e, a, o);
|
|
7233
7237
|
if (c < 0) return null;
|
|
7234
7238
|
let l = e.slice(a, c - 1);
|
|
7235
7239
|
return {
|
|
@@ -7240,7 +7244,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7240
7244
|
};
|
|
7241
7245
|
}
|
|
7242
7246
|
function g(n, r, i, a) {
|
|
7243
|
-
if (!t && a &&
|
|
7247
|
+
if (!t && a && A.has(a.toLowerCase())) return r;
|
|
7244
7248
|
let o = /\r?\n[\t ]*\r?\n/.exec(e.slice(n, r)), s = o ? n + o.index : r;
|
|
7245
7249
|
if (i) {
|
|
7246
7250
|
let t = RegExp(`</${i}\\s*>`, "g");
|
|
@@ -7289,8 +7293,8 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7289
7293
|
let o = /^<(\/?)([A-Za-z][A-Za-z0-9]*)(?=[\s/>])/.exec(e.slice(t, Math.min(n, t + 64)));
|
|
7290
7294
|
if (!o) return null;
|
|
7291
7295
|
let s = o[2].toLowerCase();
|
|
7292
|
-
if (!Pi.has(s) && !(i &&
|
|
7293
|
-
let c = t + o[0].length, l =
|
|
7296
|
+
if (!Pi.has(s) && !(i && de.has(s))) return null;
|
|
7297
|
+
let c = t + o[0].length, l = j(e, c, n);
|
|
7294
7298
|
if (l < 0) return null;
|
|
7295
7299
|
let u = l - 1, d = e.slice(c, u), f = !!o[1], p = f ? {
|
|
7296
7300
|
attrs: Object.create(null),
|
|
@@ -7320,9 +7324,9 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7320
7324
|
continue;
|
|
7321
7325
|
}
|
|
7322
7326
|
}
|
|
7323
|
-
let t =
|
|
7327
|
+
let t = O(o, r, i);
|
|
7324
7328
|
if (t !== null) o = t;
|
|
7325
|
-
else if (e.startsWith("<!--", o)) o =
|
|
7329
|
+
else if (e.startsWith("<!--", o)) o = M(e, o, r);
|
|
7326
7330
|
else {
|
|
7327
7331
|
if (e[o] === "<") {
|
|
7328
7332
|
let e = b(o, r);
|
|
@@ -7333,8 +7337,8 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7333
7337
|
start: o,
|
|
7334
7338
|
end: e.end
|
|
7335
7339
|
};
|
|
7336
|
-
} else !e.self && !
|
|
7337
|
-
} else if (!e.closing && (e.lower === "pre" || e.lower === "code") && !
|
|
7340
|
+
} else !e.self && !he.has(n) && (a += 1);
|
|
7341
|
+
} else if (!e.closing && (e.lower === "pre" || e.lower === "code") && !he.has(e.lower)) {
|
|
7338
7342
|
let t = x(e.end, e.lower, r, i);
|
|
7339
7343
|
if (t) {
|
|
7340
7344
|
o = t.end;
|
|
@@ -7350,7 +7354,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7350
7354
|
}
|
|
7351
7355
|
return null;
|
|
7352
7356
|
}
|
|
7353
|
-
function
|
|
7357
|
+
function S(e, t) {
|
|
7354
7358
|
if (!t) return {
|
|
7355
7359
|
ok: !1,
|
|
7356
7360
|
attr: ""
|
|
@@ -7362,20 +7366,20 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7362
7366
|
};
|
|
7363
7367
|
for (let r of t.entries) {
|
|
7364
7368
|
let t = r.name;
|
|
7365
|
-
if (!
|
|
7369
|
+
if (!te(e, t)) return {
|
|
7366
7370
|
ok: !1,
|
|
7367
7371
|
attr: t
|
|
7368
7372
|
};
|
|
7369
7373
|
let i = !Object.hasOwn(n, t);
|
|
7370
|
-
if (t === "align" &&
|
|
7371
|
-
let a =
|
|
7374
|
+
if (t === "align" && ve.has(e)) {
|
|
7375
|
+
let a = V(e, r.value);
|
|
7372
7376
|
if (!a) return {
|
|
7373
7377
|
ok: !1,
|
|
7374
7378
|
attr: t
|
|
7375
7379
|
};
|
|
7376
7380
|
i && (n.align = a);
|
|
7377
7381
|
} else {
|
|
7378
|
-
if (!
|
|
7382
|
+
if (!G(t, r.value)) return {
|
|
7379
7383
|
ok: !1,
|
|
7380
7384
|
attr: t
|
|
7381
7385
|
};
|
|
@@ -7387,13 +7391,13 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7387
7391
|
attrs: n
|
|
7388
7392
|
};
|
|
7389
7393
|
}
|
|
7390
|
-
function
|
|
7394
|
+
function C(e) {
|
|
7391
7395
|
return e.length === 1 && e[0].type === "paragraph" ? e[0].children ?? [] : e;
|
|
7392
7396
|
}
|
|
7393
|
-
function
|
|
7397
|
+
function w(e) {
|
|
7394
7398
|
return e.flatMap((e) => e.type === "paragraph" ? e.children ?? [] : [e]);
|
|
7395
7399
|
}
|
|
7396
|
-
function
|
|
7400
|
+
function T(t, n, r, a) {
|
|
7397
7401
|
let o = t.start, c = n.end, l = () => {
|
|
7398
7402
|
let e = u(t.end, n.start, void 0, o, t.end, a.depth + 1, {
|
|
7399
7403
|
footnote: a.footnote,
|
|
@@ -7406,7 +7410,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7406
7410
|
literalHtml: a.footnote,
|
|
7407
7411
|
stripBlockquote: a.stripBlockquote
|
|
7408
7412
|
});
|
|
7409
|
-
}, f = () =>
|
|
7413
|
+
}, f = () => C(l()), p = (e) => {
|
|
7410
7414
|
let t = [];
|
|
7411
7415
|
for (let n of e) if (n.type === "list") for (let e of n.children ?? []) e.type === "listItem" && t.push(e);
|
|
7412
7416
|
else n.type === "listItem" ? t.push(n) : n.type === "comment" || n.type === "text" && !(n.value ?? "").trim() || t.push(s("listItem", n.range.start, n.range.end, { children: n.type === "paragraph" ? n.children ?? [] : [n] }));
|
|
@@ -7431,7 +7435,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7431
7435
|
});
|
|
7432
7436
|
case "p": return s("paragraph", o, c, {
|
|
7433
7437
|
attrs: r,
|
|
7434
|
-
children:
|
|
7438
|
+
children: w(l())
|
|
7435
7439
|
});
|
|
7436
7440
|
case "h1":
|
|
7437
7441
|
case "h2":
|
|
@@ -7441,7 +7445,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7441
7445
|
case "h6": return s("heading", o, c, {
|
|
7442
7446
|
depth: Number(t.lower.slice(1)),
|
|
7443
7447
|
attrs: r,
|
|
7444
|
-
children:
|
|
7448
|
+
children: w(l())
|
|
7445
7449
|
});
|
|
7446
7450
|
case "div": return s("div", o, c, {
|
|
7447
7451
|
attrs: r,
|
|
@@ -7481,19 +7485,19 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7481
7485
|
attrs: r,
|
|
7482
7486
|
children: f()
|
|
7483
7487
|
});
|
|
7484
|
-
default: return s(
|
|
7488
|
+
default: return s(re[t.lower] ?? t.lower, o, c, {
|
|
7485
7489
|
attrs: r,
|
|
7486
7490
|
children: f()
|
|
7487
7491
|
});
|
|
7488
7492
|
}
|
|
7489
7493
|
}
|
|
7490
|
-
let
|
|
7491
|
-
function
|
|
7494
|
+
let E = /^ {0,3}$/, D = /^[ \t]*$/;
|
|
7495
|
+
function O(t, n, r) {
|
|
7492
7496
|
let i = e[t];
|
|
7493
7497
|
if (i === "\\") return Math.min(n, t + 2);
|
|
7494
7498
|
if (i !== "`" && i !== "~") return null;
|
|
7495
7499
|
let a = o.lineStartAt(t);
|
|
7496
|
-
if ((r ?
|
|
7500
|
+
if ((r ? D : E).test(e.slice(a, t))) {
|
|
7497
7501
|
let i = /^(?:(`{3,})[^`\n]*|(~{3,})[^\n]*)(?:\n|$)/.exec(e.slice(t, n));
|
|
7498
7502
|
if (i) {
|
|
7499
7503
|
let a = i[1] ?? i[2], o = RegExp(`^${r ? "[ \\t]*" : " {0,3}"}${a[0]}{${a.length},}[ \\t]*\\r?$`, "gm");
|
|
@@ -7512,7 +7516,7 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7512
7516
|
}
|
|
7513
7517
|
return null;
|
|
7514
7518
|
}
|
|
7515
|
-
function
|
|
7519
|
+
function k(t, n, r, i, a = !1) {
|
|
7516
7520
|
let o = 1;
|
|
7517
7521
|
for (let s = t; s < r;) {
|
|
7518
7522
|
if (!i) {
|
|
@@ -7522,9 +7526,9 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7522
7526
|
continue;
|
|
7523
7527
|
}
|
|
7524
7528
|
}
|
|
7525
|
-
let t =
|
|
7529
|
+
let t = O(s, r, i);
|
|
7526
7530
|
if (t !== null) s = t;
|
|
7527
|
-
else if (e.startsWith("<!--", s)) s =
|
|
7531
|
+
else if (e.startsWith("<!--", s)) s = M(e, s, r);
|
|
7528
7532
|
else {
|
|
7529
7533
|
if (e[s] === "<") {
|
|
7530
7534
|
let e = h(s, r);
|
|
@@ -7546,10 +7550,10 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7546
7550
|
}
|
|
7547
7551
|
return null;
|
|
7548
7552
|
}
|
|
7549
|
-
function
|
|
7553
|
+
function N(t, n) {
|
|
7550
7554
|
return Hi(e, t, n);
|
|
7551
7555
|
}
|
|
7552
|
-
function
|
|
7556
|
+
function P(t, n) {
|
|
7553
7557
|
let r = Infinity, i = "", a = 0, s = t;
|
|
7554
7558
|
for (; s < n;) {
|
|
7555
7559
|
let t = e.indexOf("\n", s), c = t < 0 || t > n ? n : t, l = e.slice(s, c);
|
|
@@ -7574,12 +7578,12 @@ function Sa({ source: e, strict: t, known: n, htmlSupport: r, decodeEntities: i,
|
|
|
7574
7578
|
definitionLabelAt: y,
|
|
7575
7579
|
htmlTagAt: b,
|
|
7576
7580
|
htmlCloseEnd: x,
|
|
7577
|
-
selectHtmlAttributes:
|
|
7578
|
-
buildHtmlNode:
|
|
7579
|
-
protectedEnd:
|
|
7580
|
-
unknownTagEnd:
|
|
7581
|
-
interpolationEnd:
|
|
7582
|
-
commonIndent:
|
|
7581
|
+
selectHtmlAttributes: S,
|
|
7582
|
+
buildHtmlNode: T,
|
|
7583
|
+
protectedEnd: O,
|
|
7584
|
+
unknownTagEnd: k,
|
|
7585
|
+
interpolationEnd: N,
|
|
7586
|
+
commonIndent: P
|
|
7583
7587
|
};
|
|
7584
7588
|
}
|
|
7585
7589
|
var Ca = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, wa = 128, Ta = 1e3, Ea = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, Da = 128, Oa = "local.recovery.unclosed", ka = "local.recovery.mismatch", Aa = "local.recovery.stray-close";
|
|
@@ -7673,7 +7677,7 @@ function Ia(e, t) {
|
|
|
7673
7677
|
continue;
|
|
7674
7678
|
}
|
|
7675
7679
|
if (e.startsWith("<!--", c)) {
|
|
7676
|
-
c =
|
|
7680
|
+
c = M(e, c, e.length);
|
|
7677
7681
|
continue;
|
|
7678
7682
|
}
|
|
7679
7683
|
if (e.startsWith("{{", c)) {
|
|
@@ -7761,7 +7765,7 @@ function Ia(e, t) {
|
|
|
7761
7765
|
c = g;
|
|
7762
7766
|
continue;
|
|
7763
7767
|
}
|
|
7764
|
-
if (
|
|
7768
|
+
if (A.has(m)) {
|
|
7765
7769
|
let n = t.rawHtmlEnd(m, p.end, u);
|
|
7766
7770
|
c = n === null ? e.length : Math.max(n, g);
|
|
7767
7771
|
continue;
|
|
@@ -7881,7 +7885,7 @@ function Ra(e, t, n, r) {
|
|
|
7881
7885
|
}
|
|
7882
7886
|
let p = r.protectedEnd(l, u);
|
|
7883
7887
|
if (p !== null && p > l) l = Math.min(p, e.length);
|
|
7884
|
-
else if (e.startsWith("<!--", l)) l =
|
|
7888
|
+
else if (e.startsWith("<!--", l)) l = M(e, l, e.length);
|
|
7885
7889
|
else if (e.startsWith("{{", l)) l = Ma(e, l);
|
|
7886
7890
|
else if (e[l] === "<") {
|
|
7887
7891
|
let e = r.readTag(l);
|
|
@@ -7891,7 +7895,7 @@ function Ra(e, t, n, r) {
|
|
|
7891
7895
|
}
|
|
7892
7896
|
if (!e.complete) return null;
|
|
7893
7897
|
let t = e.name.toLowerCase();
|
|
7894
|
-
if (!e.closing &&
|
|
7898
|
+
if (!e.closing && A.has(t) && r.isHtmlName(t) && !e.self) {
|
|
7895
7899
|
let n = r.rawHtmlEnd(t, e.end, u);
|
|
7896
7900
|
if (n === null) return null;
|
|
7897
7901
|
l = Math.max(n, l + 1);
|
|
@@ -7987,7 +7991,7 @@ function Ja(e, t) {
|
|
|
7987
7991
|
function Ya(e, t, n, r, i, a) {
|
|
7988
7992
|
let s = [];
|
|
7989
7993
|
if (typeof e != "string" || e.length > 1e6) {
|
|
7990
|
-
let t = typeof e == "string" ?
|
|
7994
|
+
let t = typeof e == "string" ? v("local.budget.document", { limit: o }) : v("local.parse.source");
|
|
7991
7995
|
return {
|
|
7992
7996
|
nodes: [],
|
|
7993
7997
|
diagnostics: [{
|
|
@@ -8001,7 +8005,15 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8001
8005
|
line: 1,
|
|
8002
8006
|
column: 1,
|
|
8003
8007
|
messageKey: t.key,
|
|
8004
|
-
...t.params ? { params: t.params } : {}
|
|
8008
|
+
...t.params ? { params: t.params } : {},
|
|
8009
|
+
phase: typeof e == "string" ? "resource" : "source",
|
|
8010
|
+
recoverable: !1,
|
|
8011
|
+
...typeof e == "string" ? { details: {
|
|
8012
|
+
budget: "maxDocumentLength",
|
|
8013
|
+
limit: o,
|
|
8014
|
+
actual: e.length,
|
|
8015
|
+
unit: "codeUnits"
|
|
8016
|
+
} } : {}
|
|
8005
8017
|
}]
|
|
8006
8018
|
};
|
|
8007
8019
|
}
|
|
@@ -8011,6 +8023,8 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8011
8023
|
code: "local.options.invalid",
|
|
8012
8024
|
message: t.message,
|
|
8013
8025
|
severity: "error",
|
|
8026
|
+
phase: "host",
|
|
8027
|
+
recoverable: !1,
|
|
8014
8028
|
range: {
|
|
8015
8029
|
start: 0,
|
|
8016
8030
|
end: 0
|
|
@@ -8021,10 +8035,10 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8021
8035
|
...t.detail === void 0 ? {} : { params: { detail: t.detail } }
|
|
8022
8036
|
}]
|
|
8023
8037
|
};
|
|
8024
|
-
let c = t.maxSyntaxNodes,
|
|
8038
|
+
let c = t.maxSyntaxNodes, l = t.strict !== !1, u = new Zr({
|
|
8025
8039
|
maxParseWork: t.maxParseWork,
|
|
8026
8040
|
maxMarkdownDepth: t.maxMarkdownDepth
|
|
8027
|
-
}), f = t.markdownBreaks, p = t.schemaByName, m = t.externalComponentNames,
|
|
8041
|
+
}), f = t.markdownBreaks, p = t.schemaByName, m = t.externalComponentNames, _ = (e) => p.get(e)?.form === "inline", b = p, S = t.unmountedLeafNames, C = [...p.keys()], w = t.capabilities, T = w?.html, E = w?.markdownStructure, D = T?.nativeTagNames ?? /* @__PURE__ */ new Set(), O = T?.decodeEntities ?? ((e) => e), k = T?.decodeAttribute ?? O, A = qa(w), j = n?.source === e ? n : new g(e), { lineStarts: M } = j, N = {
|
|
8028
8042
|
markdownCalls: 0,
|
|
8029
8043
|
fastBlocks: 0,
|
|
8030
8044
|
generalBlocks: 0,
|
|
@@ -8033,18 +8047,18 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8033
8047
|
mappingSegments: 0,
|
|
8034
8048
|
sourceLines: M.length,
|
|
8035
8049
|
maxComponentDepth: 0
|
|
8036
|
-
}, P = r?.counters(), ee = Va(),
|
|
8037
|
-
if (
|
|
8038
|
-
|
|
8039
|
-
let r = (n === e ? j : new
|
|
8050
|
+
}, P = r?.counters(), ee = Va(), F = 0, I = 0, L = 0, R = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Set(), ne = (n) => {
|
|
8051
|
+
if (te.has(n) || !Wa(n)) return;
|
|
8052
|
+
te.add(n);
|
|
8053
|
+
let r = (n === e ? j : new g(n)).facts, i = r.maxMarkdownDepth;
|
|
8040
8054
|
if (r.potentialDepth > t.maxMarkdownDepth || i > t.maxMarkdownDepth) {
|
|
8041
|
-
if (
|
|
8042
|
-
let e =
|
|
8043
|
-
|
|
8055
|
+
if (E) {
|
|
8056
|
+
let e = E(n);
|
|
8057
|
+
R.set(n, e), i = e.maxDepth;
|
|
8044
8058
|
} else {
|
|
8045
8059
|
i = 0;
|
|
8046
8060
|
let e = [{
|
|
8047
|
-
node:
|
|
8061
|
+
node: B(n),
|
|
8048
8062
|
depth: 0
|
|
8049
8063
|
}];
|
|
8050
8064
|
for (; e.length;) {
|
|
@@ -8057,37 +8071,37 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8057
8071
|
}
|
|
8058
8072
|
}
|
|
8059
8073
|
}
|
|
8060
|
-
|
|
8061
|
-
},
|
|
8062
|
-
if (N.parseWork =
|
|
8074
|
+
u.observeDepth(i, 0, Math.max(1, n.length));
|
|
8075
|
+
}, z = () => {
|
|
8076
|
+
if (N.parseWork = u.parseWork, N.maxMarkdownDepth = u.maxDepth, r) {
|
|
8063
8077
|
let e = r.counters();
|
|
8064
8078
|
N.cacheHits = e.hits - (P?.hits ?? e.hits), N.cacheMisses = e.misses - (P?.misses ?? e.misses), N.reusedBlocks = e.reusedBlocks - (P?.reusedBlocks ?? e.reusedBlocks), N.reusedRows = e.reusedRows - (P?.reusedRows ?? e.reusedRows), N.reusedItems = e.reusedItems - (P?.reusedItems ?? e.reusedItems), N.reusedAst = e.reusedAst - (P?.reusedAst ?? e.reusedAst);
|
|
8065
8079
|
}
|
|
8066
8080
|
N.timings = {
|
|
8067
|
-
shieldMs: Ha(
|
|
8068
|
-
regionMs: Ha(
|
|
8069
|
-
convertMs: Ha(
|
|
8081
|
+
shieldMs: Ha(F),
|
|
8082
|
+
regionMs: Ha(I),
|
|
8083
|
+
convertMs: Ha(L),
|
|
8070
8084
|
totalMs: Ha(Va() - ee)
|
|
8071
8085
|
};
|
|
8072
|
-
},
|
|
8086
|
+
}, B = (e) => {
|
|
8073
8087
|
let t = r?.readTree(e);
|
|
8074
8088
|
if (t?.hit) return t.value;
|
|
8075
8089
|
let n = A.parse(e);
|
|
8076
8090
|
return r?.writeTree(e, n), n;
|
|
8077
|
-
},
|
|
8078
|
-
if (
|
|
8079
|
-
let t =
|
|
8091
|
+
}, re = (e, t = !0, n = { allowBraces: !0 }) => {
|
|
8092
|
+
if (u.charge(e.length + 1, 0, Math.max(1, e.length)), ne(e), !t) {
|
|
8093
|
+
let t = B(e);
|
|
8080
8094
|
return N.markdownCalls++, N.generalBlocks += t.children.length, N.generalCharacters += e.length, t;
|
|
8081
8095
|
}
|
|
8082
|
-
let a =
|
|
8083
|
-
a === void 0 &&
|
|
8084
|
-
let { tree: o, stats: s } = pi(e,
|
|
8096
|
+
let a = R.get(e);
|
|
8097
|
+
a === void 0 && E && (a = E(e), R.set(e, a));
|
|
8098
|
+
let { tree: o, stats: s } = pi(e, B, j, r, a, i, n);
|
|
8085
8099
|
return N.markdownCalls++, N.fastBlocks += s.fastBlocks, N.generalBlocks += s.generalBlocks, N.fastCharacters += s.fastCharacters, N.generalCharacters += s.generalCharacters, o;
|
|
8086
|
-
},
|
|
8087
|
-
if (
|
|
8088
|
-
return
|
|
8100
|
+
}, V = 0, ie = 0, ae = /* @__PURE__ */ new Set(), oe = (e, t, n, r = {}) => {
|
|
8101
|
+
if (ie >= c) throw new Li("local.budget", `Syntax nodes exceed the limit of ${c}.`, t, n, "local.budget.nodes", { limit: c }, ie + 1);
|
|
8102
|
+
return ie += 1, {
|
|
8089
8103
|
type: e,
|
|
8090
|
-
id: `local-${
|
|
8104
|
+
id: `local-${V++}`,
|
|
8091
8105
|
range: {
|
|
8092
8106
|
start: t,
|
|
8093
8107
|
end: n
|
|
@@ -8096,33 +8110,30 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8096
8110
|
};
|
|
8097
8111
|
};
|
|
8098
8112
|
try {
|
|
8099
|
-
|
|
8100
|
-
let t = a && a.length > 0 ? void 0 : Ri(e, f,
|
|
8101
|
-
if (t !== void 0) return N.fastBlocks = t.length, N.fastCharacters = e.length,
|
|
8113
|
+
u.charge(e.length, 0, Math.max(1, e.length)), ne(e);
|
|
8114
|
+
let t = a && a.length > 0 ? void 0 : Ri(e, f, oe);
|
|
8115
|
+
if (t !== void 0) return N.fastBlocks = t.length, N.fastCharacters = e.length, z(), {
|
|
8102
8116
|
nodes: t,
|
|
8103
8117
|
diagnostics: s,
|
|
8104
|
-
syntaxNodes:
|
|
8118
|
+
syntaxNodes: ie,
|
|
8105
8119
|
work: N
|
|
8106
8120
|
};
|
|
8107
8121
|
} catch (e) {
|
|
8108
|
-
if (e instanceof Xr) return ge(e),
|
|
8122
|
+
if (e instanceof Xr) return ge(e), z(), {
|
|
8109
8123
|
nodes: [],
|
|
8110
8124
|
diagnostics: s,
|
|
8111
8125
|
work: N
|
|
8112
8126
|
};
|
|
8113
8127
|
if (!(e instanceof Li)) throw e;
|
|
8114
|
-
return
|
|
8115
|
-
key: e.key,
|
|
8116
|
-
params: e.params
|
|
8117
|
-
}), {
|
|
8128
|
+
return Y(e), {
|
|
8118
8129
|
nodes: [],
|
|
8119
8130
|
diagnostics: s
|
|
8120
8131
|
};
|
|
8121
8132
|
}
|
|
8122
|
-
let
|
|
8133
|
+
let H = new Set(e.match(/* @__PURE__ */ RegExp("[0-9]+", "g")) ?? []), se = [], ce = [], U = [], le = [], ue = [], W = +(e.charCodeAt(0) === 65279), de, G = !1;
|
|
8123
8134
|
try {
|
|
8124
|
-
let t = e.slice(
|
|
8125
|
-
if (
|
|
8135
|
+
let t = e.slice(W);
|
|
8136
|
+
if (de = re(t, !0, {
|
|
8126
8137
|
allowBraces: !0,
|
|
8127
8138
|
shield(t, n) {
|
|
8128
8139
|
if (!t.includes("{{")) return;
|
|
@@ -8130,67 +8141,64 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8130
8141
|
for (; a < t.length;) {
|
|
8131
8142
|
let o = t.indexOf("{{", a);
|
|
8132
8143
|
if (o < 0) break;
|
|
8133
|
-
let s = Hi(e, o + n +
|
|
8144
|
+
let s = Hi(e, o + n + W, n + W + t.length) - n - W;
|
|
8134
8145
|
if (s <= o || /[\r\n]/.test(t.slice(o, s))) return;
|
|
8135
8146
|
r.push(t.slice(i, o), "v".repeat(s - o)), i = a = s;
|
|
8136
8147
|
}
|
|
8137
8148
|
if (r.length) return r.push(t.slice(i)), r.join("");
|
|
8138
8149
|
}
|
|
8139
|
-
}), !e.includes("{{") &&
|
|
8140
|
-
let e =
|
|
8141
|
-
if (e) throw new Li("local.budget", `Syntax nodes exceed the limit of ${c}.`, e.start +
|
|
8150
|
+
}), !e.includes("{{") && de.children.length === 1 && de.children[0].type === "rmdFastBlock") {
|
|
8151
|
+
let e = de.children[0].plan.overflowAt(c);
|
|
8152
|
+
if (e) throw new Li("local.budget", `Syntax nodes exceed the limit of ${c}.`, e.start + W, e.end + W, "local.budget.nodes", { limit: c }, c + 1);
|
|
8142
8153
|
}
|
|
8143
|
-
let n = _i(
|
|
8154
|
+
let n = _i(de);
|
|
8144
8155
|
if (/<(?:css|javascript|iframe|dl|section|figure|figcaption)(?=[\s/>])/i.test(t)) {
|
|
8145
8156
|
let e = t, r = 0;
|
|
8146
8157
|
for (;;) {
|
|
8147
|
-
let t = Vi(e, n.codeRanges, n.definitions,
|
|
8158
|
+
let t = Vi(e, n.codeRanges, n.definitions, b, r);
|
|
8148
8159
|
if (!t) break;
|
|
8149
|
-
|
|
8160
|
+
G = !0, e = t.source, r = t.end, de = re(e, !1), n = _i(de);
|
|
8150
8161
|
}
|
|
8151
8162
|
}
|
|
8152
8163
|
let r = (e) => ({
|
|
8153
|
-
start: e.start +
|
|
8154
|
-
end: e.end +
|
|
8164
|
+
start: e.start + W,
|
|
8165
|
+
end: e.end + W
|
|
8155
8166
|
});
|
|
8156
|
-
for (let e of n.codeRanges)
|
|
8157
|
-
for (let e of n.definitions) e.end > e.start &&
|
|
8158
|
-
for (let e of n.mathLiterals)
|
|
8159
|
-
|
|
8167
|
+
for (let e of n.codeRanges) se.push(r(e));
|
|
8168
|
+
for (let e of n.definitions) e.end > e.start && ue.push(r(e));
|
|
8169
|
+
for (let e of n.mathLiterals) le.push(r(e));
|
|
8170
|
+
F = Va() - ee;
|
|
8160
8171
|
} catch (e) {
|
|
8161
|
-
return e instanceof Xr ? (ge(e),
|
|
8172
|
+
return e instanceof Xr ? (ge(e), z(), {
|
|
8162
8173
|
nodes: [],
|
|
8163
8174
|
diagnostics: s,
|
|
8164
8175
|
work: N
|
|
8165
|
-
}) : e instanceof Li ? (
|
|
8166
|
-
key: e.key,
|
|
8167
|
-
params: e.params
|
|
8168
|
-
}), {
|
|
8176
|
+
}) : e instanceof Li ? (Y(e), {
|
|
8169
8177
|
nodes: [],
|
|
8170
8178
|
diagnostics: s,
|
|
8171
8179
|
work: N
|
|
8172
|
-
}) : (
|
|
8180
|
+
}) : (pe("local.parse", { key: "local.parse.markdown" }, 0, void 0), {
|
|
8173
8181
|
nodes: [],
|
|
8174
8182
|
diagnostics: s
|
|
8175
8183
|
});
|
|
8176
8184
|
}
|
|
8177
|
-
|
|
8178
|
-
let
|
|
8179
|
-
for (let e of
|
|
8180
|
-
let t =
|
|
8181
|
-
t && e.start < t.end ? e.end > t.end && (t.end = e.end) :
|
|
8185
|
+
ue.sort((e, t) => e.start - t.start || t.end - e.end), le.sort((e, t) => e.start - t.start);
|
|
8186
|
+
let K = [];
|
|
8187
|
+
for (let e of ue) {
|
|
8188
|
+
let t = K[K.length - 1];
|
|
8189
|
+
t && e.start < t.end ? e.end > t.end && (t.end = e.end) : K.push({ ...e });
|
|
8182
8190
|
}
|
|
8183
|
-
let
|
|
8184
|
-
let t = 0, n =
|
|
8191
|
+
let q = (e) => {
|
|
8192
|
+
let t = 0, n = se.length - 1;
|
|
8185
8193
|
for (; t <= n;) {
|
|
8186
|
-
let r = t + n >> 1, i =
|
|
8194
|
+
let r = t + n >> 1, i = se[r];
|
|
8187
8195
|
if (e < i.start) n = r - 1;
|
|
8188
8196
|
else if (e >= i.end) t = r + 1;
|
|
8189
8197
|
else return i.end;
|
|
8190
8198
|
}
|
|
8191
8199
|
return null;
|
|
8192
8200
|
};
|
|
8193
|
-
function
|
|
8201
|
+
function fe(t, n, r, i, a = i + 1, o, c) {
|
|
8194
8202
|
if (s.length >= 100) {
|
|
8195
8203
|
if (r === "warning") return;
|
|
8196
8204
|
let e = s.length - 1;
|
|
@@ -8198,82 +8206,130 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8198
8206
|
if (e < 0) return;
|
|
8199
8207
|
s.splice(e, 1);
|
|
8200
8208
|
}
|
|
8201
|
-
let
|
|
8202
|
-
for (;
|
|
8203
|
-
let e = Math.ceil((
|
|
8204
|
-
M[e] <=
|
|
8205
|
-
}
|
|
8206
|
-
let
|
|
8209
|
+
let l = Math.max(0, Math.min(e.length, i)), u = Math.max(l, Math.min(e.length, Math.max(l, a))), f = 0, p = M.length - 1;
|
|
8210
|
+
for (; f < p;) {
|
|
8211
|
+
let e = Math.ceil((f + p) / 2);
|
|
8212
|
+
M[e] <= l ? f = e : p = e - 1;
|
|
8213
|
+
}
|
|
8214
|
+
let m = f + 1, h = n.length > 2e3 ? `${x(n, d - 1)}…` : n, g = o?.key ?? t, _ = g === "local.budget.nodes" ? {
|
|
8215
|
+
budget: "maxSyntaxNodes",
|
|
8216
|
+
unit: "nodes"
|
|
8217
|
+
} : g === "local.budget.nesting" ? {
|
|
8218
|
+
budget: "maxComponentDepth",
|
|
8219
|
+
unit: "depth"
|
|
8220
|
+
} : g === "local.budget.parse-work" ? {
|
|
8221
|
+
budget: "maxParseWork",
|
|
8222
|
+
unit: "work"
|
|
8223
|
+
} : g === "local.budget.markdown-depth" ? {
|
|
8224
|
+
budget: "maxMarkdownDepth",
|
|
8225
|
+
unit: "depth"
|
|
8226
|
+
} : void 0, y = v(g, o?.params), b = y.params?.limit;
|
|
8207
8227
|
s.push({
|
|
8208
8228
|
code: t,
|
|
8209
|
-
message:
|
|
8229
|
+
message: h,
|
|
8210
8230
|
severity: r,
|
|
8211
8231
|
range: {
|
|
8212
|
-
start:
|
|
8232
|
+
start: l,
|
|
8213
8233
|
end: u
|
|
8214
8234
|
},
|
|
8215
|
-
line:
|
|
8216
|
-
column:
|
|
8217
|
-
messageKey:
|
|
8218
|
-
|
|
8235
|
+
line: m,
|
|
8236
|
+
column: l - M[f] + 1,
|
|
8237
|
+
messageKey: y.key,
|
|
8238
|
+
phase: t.startsWith("local.budget") ? "resource" : "parse",
|
|
8239
|
+
recoverable: r === "warning",
|
|
8240
|
+
..._ && typeof b == "number" && typeof c?.actual == "number" ? { details: {
|
|
8241
|
+
..._,
|
|
8242
|
+
limit: b,
|
|
8243
|
+
actual: c.actual,
|
|
8244
|
+
...c
|
|
8245
|
+
} } : {},
|
|
8246
|
+
...y.params ? { params: y.params } : {}
|
|
8219
8247
|
});
|
|
8220
8248
|
}
|
|
8221
8249
|
function J(e) {
|
|
8222
8250
|
return typeof e == "string" ? { text: e } : {
|
|
8223
|
-
text:
|
|
8251
|
+
text: y(e),
|
|
8224
8252
|
details: e
|
|
8225
8253
|
};
|
|
8226
8254
|
}
|
|
8227
|
-
function
|
|
8228
|
-
let
|
|
8229
|
-
|
|
8255
|
+
function pe(e, t, n, r = n + 1, i, a) {
|
|
8256
|
+
let o = J(t);
|
|
8257
|
+
fe(e, o.text, "error", n, r, o.details ?? i, a);
|
|
8230
8258
|
}
|
|
8231
|
-
function
|
|
8259
|
+
function me(e, t, n, r = n + 1, i) {
|
|
8232
8260
|
let a = J(t);
|
|
8233
|
-
|
|
8261
|
+
fe(e, a.text, "warning", n, r, a.details ?? i);
|
|
8262
|
+
}
|
|
8263
|
+
function Y(e) {
|
|
8264
|
+
let t = e.key === "local.budget.nodes" ? {
|
|
8265
|
+
budget: "maxSyntaxNodes",
|
|
8266
|
+
unit: "nodes"
|
|
8267
|
+
} : e.key === "local.budget.nesting" ? {
|
|
8268
|
+
budget: "maxComponentDepth",
|
|
8269
|
+
unit: "depth"
|
|
8270
|
+
} : void 0, n = e.params?.limit;
|
|
8271
|
+
pe(e.code, e.message, e.start, e.end, {
|
|
8272
|
+
key: e.key,
|
|
8273
|
+
...e.params ? { params: e.params } : {}
|
|
8274
|
+
}, t && typeof n == "number" && e.actual !== void 0 ? {
|
|
8275
|
+
...t,
|
|
8276
|
+
limit: n,
|
|
8277
|
+
actual: e.actual
|
|
8278
|
+
} : void 0);
|
|
8234
8279
|
}
|
|
8235
8280
|
function ge(e) {
|
|
8236
|
-
|
|
8237
|
-
|
|
8281
|
+
let t = e.kind === "parse-work" ? "local.budget.parse-work" : "local.budget.markdown-depth", n = e.kind === "parse-work" ? u.parseWork : u.maxDepth, r = e.kind === "parse-work" ? {
|
|
8282
|
+
budget: "maxParseWork",
|
|
8283
|
+
unit: "work"
|
|
8284
|
+
} : {
|
|
8285
|
+
budget: "maxMarkdownDepth",
|
|
8286
|
+
unit: "depth"
|
|
8287
|
+
};
|
|
8288
|
+
pe("local.budget", {
|
|
8289
|
+
key: t,
|
|
8238
8290
|
params: { limit: e.limit }
|
|
8239
|
-
}, e.start, e.end
|
|
8291
|
+
}, e.start, e.end, void 0, {
|
|
8292
|
+
...r,
|
|
8293
|
+
limit: e.limit,
|
|
8294
|
+
actual: n
|
|
8295
|
+
});
|
|
8240
8296
|
}
|
|
8241
|
-
let
|
|
8297
|
+
let _e = {
|
|
8242
8298
|
themeHeaders: 0,
|
|
8243
8299
|
headerCursor: 0,
|
|
8244
8300
|
versionHeaders: 0
|
|
8245
|
-
},
|
|
8301
|
+
}, ve = ma({
|
|
8246
8302
|
source: e,
|
|
8247
8303
|
maxSyntaxNodes: c,
|
|
8248
|
-
budget:
|
|
8304
|
+
budget: u,
|
|
8249
8305
|
markdownBreaks: f,
|
|
8250
|
-
isInlineName:
|
|
8306
|
+
isInlineName: _,
|
|
8251
8307
|
sourceContext: j,
|
|
8252
8308
|
work: N,
|
|
8253
|
-
parseMarkdown:
|
|
8254
|
-
readNodeCount: () =>
|
|
8255
|
-
fastPlans:
|
|
8256
|
-
node:
|
|
8257
|
-
reservedMarkers:
|
|
8258
|
-
sourceBomOffset:
|
|
8259
|
-
rootMarkdown:
|
|
8260
|
-
maskedAuthorBody:
|
|
8261
|
-
error:
|
|
8262
|
-
}),
|
|
8309
|
+
parseMarkdown: re,
|
|
8310
|
+
readNodeCount: () => ie,
|
|
8311
|
+
fastPlans: ae,
|
|
8312
|
+
node: oe,
|
|
8313
|
+
reservedMarkers: H,
|
|
8314
|
+
sourceBomOffset: W,
|
|
8315
|
+
rootMarkdown: de,
|
|
8316
|
+
maskedAuthorBody: G,
|
|
8317
|
+
error: pe
|
|
8318
|
+
}), ye, be = Sa({
|
|
8263
8319
|
source: e,
|
|
8264
|
-
strict:
|
|
8265
|
-
known:
|
|
8266
|
-
htmlSupport:
|
|
8320
|
+
strict: l,
|
|
8321
|
+
known: b,
|
|
8322
|
+
htmlSupport: T,
|
|
8267
8323
|
decodeEntities: O,
|
|
8268
8324
|
decodeAttribute: k,
|
|
8269
8325
|
sourceContext: j,
|
|
8270
|
-
node:
|
|
8271
|
-
codeEndAt:
|
|
8272
|
-
error:
|
|
8273
|
-
region: (...e) =>
|
|
8274
|
-
convert:
|
|
8275
|
-
}), { htmlCloseEnd:
|
|
8276
|
-
function
|
|
8326
|
+
node: oe,
|
|
8327
|
+
codeEndAt: q,
|
|
8328
|
+
error: pe,
|
|
8329
|
+
region: (...e) => ye(...e),
|
|
8330
|
+
convert: ve
|
|
8331
|
+
}), { htmlCloseEnd: xe, protectedEnd: Se, scanTag: Ce, beginsLine: we } = be;
|
|
8332
|
+
function X(t) {
|
|
8277
8333
|
let n = /* @__PURE__ */ new Set(), r = [...t];
|
|
8278
8334
|
for (; r.length;) {
|
|
8279
8335
|
let e = r.pop();
|
|
@@ -8284,38 +8340,38 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8284
8340
|
if (t.type !== "footnoteReference" || t.identifier && n.has(t.identifier) || (t.type = "text", t.value = e.slice(t.range.start, t.range.end), delete t.identifier, delete t.label), t.children) for (let e of t.children) r.push(e);
|
|
8285
8341
|
}
|
|
8286
8342
|
}
|
|
8287
|
-
function
|
|
8288
|
-
if (
|
|
8343
|
+
function Te() {
|
|
8344
|
+
if (l || U.length === 0) return;
|
|
8289
8345
|
let e = /* @__PURE__ */ new Set(), t = !1;
|
|
8290
|
-
for (let n of
|
|
8346
|
+
for (let n of U) {
|
|
8291
8347
|
if (!Ba.has(n.code)) continue;
|
|
8292
8348
|
let { causeRange: r, affectedRange: i } = n, a = `${n.code}:${r.start}:${r.end}:${i.start}:${i.end}:${n.boundary}`;
|
|
8293
|
-
e.has(a) || (e.add(a),
|
|
8349
|
+
e.has(a) || (e.add(a), me(n.code, h(n.code, "en"), r.start, r.end, { key: n.code }), t = !0);
|
|
8294
8350
|
}
|
|
8295
8351
|
t && s.sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end);
|
|
8296
8352
|
}
|
|
8297
8353
|
try {
|
|
8298
|
-
if (!
|
|
8354
|
+
if (!l && e.includes("<")) {
|
|
8299
8355
|
let t = Ia(e, {
|
|
8300
8356
|
facts: j.facts,
|
|
8301
|
-
definitions:
|
|
8302
|
-
isKnown: (e) =>
|
|
8357
|
+
definitions: K,
|
|
8358
|
+
isKnown: (e) => b.has(e),
|
|
8303
8359
|
isPaired: (e) => {
|
|
8304
|
-
let t =
|
|
8305
|
-
return t === void 0 ? !
|
|
8360
|
+
let t = b.get(e);
|
|
8361
|
+
return t === void 0 ? !S.has(e) : t.form !== "leaf";
|
|
8306
8362
|
},
|
|
8307
|
-
isHtmlName: (e) =>
|
|
8308
|
-
isVoidHtml: (e) => Ii.has(e) ||
|
|
8363
|
+
isHtmlName: (e) => T !== void 0 && (Pi.has(e) || D.has(e)),
|
|
8364
|
+
isVoidHtml: (e) => Ii.has(e) || he.has(e),
|
|
8309
8365
|
rawHtmlEnd: (t, n, r) => {
|
|
8310
8366
|
if (t === "plaintext") return e.length;
|
|
8311
|
-
if (t === "pre" || t === "code") return
|
|
8367
|
+
if (t === "pre" || t === "code") return xe(n, t, e.length, r)?.end ?? null;
|
|
8312
8368
|
let i = RegExp(`</${t}\\s*>`, "i").exec(e.slice(n));
|
|
8313
8369
|
return i ? n + i.index + i[0].length : null;
|
|
8314
8370
|
},
|
|
8315
|
-
protectedEnd: (t, n) =>
|
|
8316
|
-
codeEndAt: (e) =>
|
|
8371
|
+
protectedEnd: (t, n) => Se(t, e.length, n),
|
|
8372
|
+
codeEndAt: (e) => q(e),
|
|
8317
8373
|
readTag: (t) => {
|
|
8318
|
-
let n =
|
|
8374
|
+
let n = Ce(t, e.length);
|
|
8319
8375
|
if (n) return {
|
|
8320
8376
|
name: n.name,
|
|
8321
8377
|
closing: n.closing,
|
|
@@ -8332,100 +8388,99 @@ function Ya(e, t, n, r, i, a) {
|
|
|
8332
8388
|
complete: !1
|
|
8333
8389
|
} : null;
|
|
8334
8390
|
},
|
|
8335
|
-
beginsLine:
|
|
8336
|
-
charge: (e, t, n) =>
|
|
8391
|
+
beginsLine: we,
|
|
8392
|
+
charge: (e, t, n) => u.charge(e, t, n)
|
|
8337
8393
|
});
|
|
8338
|
-
|
|
8394
|
+
ce = t.ranges, U = [...t.recoveries];
|
|
8339
8395
|
}
|
|
8340
|
-
a && a.length > 0 && (
|
|
8396
|
+
a && a.length > 0 && (ce = Ja([...ce, ...a], e.length)), ye = ia({
|
|
8341
8397
|
source: e,
|
|
8342
8398
|
diagnostics: s,
|
|
8343
8399
|
maxSyntaxNodes: c,
|
|
8344
|
-
strict:
|
|
8345
|
-
budget:
|
|
8346
|
-
known:
|
|
8400
|
+
strict: l,
|
|
8401
|
+
budget: u,
|
|
8402
|
+
known: b,
|
|
8347
8403
|
externalNames: m,
|
|
8348
|
-
unmountedLeafNames:
|
|
8349
|
-
suggestionNames:
|
|
8350
|
-
htmlSupport:
|
|
8404
|
+
unmountedLeafNames: S,
|
|
8405
|
+
suggestionNames: C,
|
|
8406
|
+
htmlSupport: T,
|
|
8351
8407
|
nativeHtmlNames: D,
|
|
8352
8408
|
sourceContext: j,
|
|
8353
8409
|
work: N,
|
|
8354
|
-
ensureDepth:
|
|
8355
|
-
parseMarkdown:
|
|
8356
|
-
node:
|
|
8357
|
-
codeRanges:
|
|
8358
|
-
recoveryRanges:
|
|
8359
|
-
recoveries:
|
|
8360
|
-
rootMathLiterals:
|
|
8361
|
-
rootDefinitionRanges:
|
|
8362
|
-
error:
|
|
8363
|
-
warning:
|
|
8364
|
-
headers:
|
|
8365
|
-
scanner:
|
|
8366
|
-
convert:
|
|
8410
|
+
ensureDepth: ne,
|
|
8411
|
+
parseMarkdown: re,
|
|
8412
|
+
node: oe,
|
|
8413
|
+
codeRanges: se,
|
|
8414
|
+
recoveryRanges: ce,
|
|
8415
|
+
recoveries: U,
|
|
8416
|
+
rootMathLiterals: le,
|
|
8417
|
+
rootDefinitionRanges: K,
|
|
8418
|
+
error: pe,
|
|
8419
|
+
warning: me,
|
|
8420
|
+
headers: _e,
|
|
8421
|
+
scanner: be,
|
|
8422
|
+
convert: ve
|
|
8367
8423
|
});
|
|
8368
|
-
let t = Va(), n =
|
|
8369
|
-
|
|
8370
|
-
let r = Va(), i =
|
|
8371
|
-
|
|
8372
|
-
let { theme: o, themeRange:
|
|
8424
|
+
let t = Va(), n = ye(0, e.length);
|
|
8425
|
+
I = Va() - t;
|
|
8426
|
+
let r = Va(), i = ve(0, e.length, n.tokens);
|
|
8427
|
+
L = Va() - r, X(i), U.sort((e, t) => e.causeRange.start - t.causeRange.start || e.causeRange.end - t.causeRange.end || e.affectedRange.start - t.affectedRange.start || e.affectedRange.end - t.affectedRange.end || e.code.localeCompare(t.code)), Te(), z();
|
|
8428
|
+
let { theme: o, themeRange: d, versionDeclaration: f } = _e;
|
|
8373
8429
|
return {
|
|
8374
8430
|
nodes: i,
|
|
8375
8431
|
diagnostics: s,
|
|
8376
|
-
syntaxNodes:
|
|
8432
|
+
syntaxNodes: ie,
|
|
8377
8433
|
work: N,
|
|
8378
|
-
...
|
|
8434
|
+
...ae.size ? { plans: [...ae] } : {},
|
|
8379
8435
|
...f ? { versionDeclaration: f } : {},
|
|
8380
8436
|
...o === void 0 ? {} : { theme: o },
|
|
8381
|
-
...
|
|
8382
|
-
...
|
|
8437
|
+
...d ? { themeRange: d } : {},
|
|
8438
|
+
...U.length ? { recoveries: U } : {}
|
|
8383
8439
|
};
|
|
8384
8440
|
} catch (e) {
|
|
8385
|
-
return e instanceof Xr ? (ge(e),
|
|
8441
|
+
return e instanceof Xr ? (ge(e), z(), {
|
|
8386
8442
|
nodes: [],
|
|
8387
8443
|
diagnostics: s,
|
|
8388
8444
|
work: N,
|
|
8389
|
-
...
|
|
8390
|
-
}) : e instanceof Li ? (
|
|
8391
|
-
key: e.key,
|
|
8392
|
-
params: e.params
|
|
8393
|
-
}), ae(), {
|
|
8445
|
+
...U.length ? { recoveries: U } : {}
|
|
8446
|
+
}) : e instanceof Li ? (Y(e), z(), {
|
|
8394
8447
|
nodes: [],
|
|
8395
8448
|
diagnostics: s,
|
|
8396
8449
|
work: N,
|
|
8397
|
-
...
|
|
8398
|
-
}) : (
|
|
8450
|
+
...U.length ? { recoveries: U } : {}
|
|
8451
|
+
}) : (pe("local.parse", {
|
|
8399
8452
|
key: "local.parse.document",
|
|
8400
8453
|
params: { detail: e instanceof Error ? e.message : String(e) }
|
|
8401
8454
|
}, 0, void 0), {
|
|
8402
8455
|
nodes: [],
|
|
8403
8456
|
diagnostics: s,
|
|
8404
|
-
...
|
|
8457
|
+
...U.length ? { recoveries: U } : {}
|
|
8405
8458
|
});
|
|
8406
8459
|
}
|
|
8407
8460
|
}
|
|
8408
8461
|
// src/local/compilation/compiler-services.ts
|
|
8409
8462
|
function Xa(e, t, n, r, i = r + 1, a) {
|
|
8410
|
-
let o = typeof n == "string" ? a : n, s = typeof n == "string" ? n :
|
|
8463
|
+
let o = typeof n == "string" ? a : n, s = typeof n == "string" ? n : y(n);
|
|
8411
8464
|
if (e.diagnostics.length >= 100) return;
|
|
8412
|
-
let c = Math.max(0, Math.min(e.source.length, r)),
|
|
8413
|
-
for (;
|
|
8414
|
-
let t = Math.ceil((
|
|
8415
|
-
e.lineStarts[t] <= c ?
|
|
8465
|
+
let c = Math.max(0, Math.min(e.source.length, r)), l = Math.max(c, Math.min(e.source.length, Math.max(c, i))), u = 0, f = e.lineStarts.length - 1;
|
|
8466
|
+
for (; u < f;) {
|
|
8467
|
+
let t = Math.ceil((u + f) / 2);
|
|
8468
|
+
e.lineStarts[t] <= c ? u = t : f = t - 1;
|
|
8416
8469
|
}
|
|
8417
|
-
let p =
|
|
8470
|
+
let p = v(o?.key ?? t, o?.params);
|
|
8418
8471
|
e.diagnostics.push({
|
|
8419
8472
|
code: t,
|
|
8420
|
-
message: s.length > 2e3 ? `${
|
|
8473
|
+
message: s.length > 2e3 ? `${x(s, d - 1)}…` : s,
|
|
8421
8474
|
severity: "warning",
|
|
8422
8475
|
range: {
|
|
8423
8476
|
start: c,
|
|
8424
|
-
end:
|
|
8477
|
+
end: l
|
|
8425
8478
|
},
|
|
8426
|
-
line:
|
|
8427
|
-
column: c - e.lineStarts[
|
|
8479
|
+
line: u + 1,
|
|
8480
|
+
column: c - e.lineStarts[u] + 1,
|
|
8428
8481
|
messageKey: p.key,
|
|
8482
|
+
phase: t.includes("budget") ? "resource" : "semantic",
|
|
8483
|
+
recoverable: !0,
|
|
8429
8484
|
...p.params ? { params: p.params } : {}
|
|
8430
8485
|
});
|
|
8431
8486
|
}
|
|
@@ -8562,29 +8617,29 @@ function go(e, t) {
|
|
|
8562
8617
|
}
|
|
8563
8618
|
function _o(e, t, n, r) {
|
|
8564
8619
|
if (typeof t != "string" || t === "") return;
|
|
8565
|
-
let i = e.members[0], a = X(i.entry.kernel)?.initial ?? "initial", o = r ?? i.attrs[a]?.offset ?? i.entry.node.range.start,
|
|
8620
|
+
let i = e.members[0], a = X(i.entry.kernel)?.initial ?? "initial", o = r ?? i.attrs[a]?.offset ?? i.entry.node.range.start, s = m(t);
|
|
8566
8621
|
for (let r of e.members) {
|
|
8567
8622
|
let { entry: i, attrs: a } = r;
|
|
8568
|
-
for (let r of
|
|
8569
|
-
let t = no(i, a, r.min) ?? 0,
|
|
8570
|
-
t > 0 &&
|
|
8623
|
+
for (let r of W(i.kernel)) if (r.kind === "length") {
|
|
8624
|
+
let t = no(i, a, r.min) ?? 0, c = no(i, a, r.max);
|
|
8625
|
+
t > 0 && s < t && n.report("local.initial.length", {
|
|
8571
8626
|
key: "local.initial.length.min",
|
|
8572
8627
|
params: {
|
|
8573
8628
|
key: e.key,
|
|
8574
|
-
length:
|
|
8629
|
+
length: s,
|
|
8575
8630
|
min: t,
|
|
8576
8631
|
name: i.name
|
|
8577
8632
|
}
|
|
8578
|
-
}, o, void 0),
|
|
8633
|
+
}, o, void 0), c !== void 0 && s > c && n.report("local.initial.length", {
|
|
8579
8634
|
key: "local.initial.length.max",
|
|
8580
8635
|
params: {
|
|
8581
8636
|
key: e.key,
|
|
8582
|
-
length:
|
|
8583
|
-
max:
|
|
8637
|
+
length: s,
|
|
8638
|
+
max: c,
|
|
8584
8639
|
name: i.name
|
|
8585
8640
|
}
|
|
8586
8641
|
}, o, void 0);
|
|
8587
|
-
} else if (r.kind === "email") (ro(i, a, r.type) ?? "text") === r.value && (t.length > 254 || !
|
|
8642
|
+
} else if (r.kind === "email") (ro(i, a, r.type) ?? "text") === r.value && (t.length > 254 || !l(t)) && n.report("local.initial.email", {
|
|
8588
8643
|
key: "local.initial.email",
|
|
8589
8644
|
params: { key: e.key }
|
|
8590
8645
|
}, o, void 0);
|
|
@@ -8618,7 +8673,7 @@ function vo(e, t, n, r, i, a, o) {
|
|
|
8618
8673
|
}, c, void 0);
|
|
8619
8674
|
return;
|
|
8620
8675
|
}
|
|
8621
|
-
let e =
|
|
8676
|
+
let e = w(n);
|
|
8622
8677
|
if (e) {
|
|
8623
8678
|
o.report("local.budget.array", {
|
|
8624
8679
|
key: e.key,
|
|
@@ -8929,154 +8984,154 @@ function No(e, t, n) {
|
|
|
8929
8984
|
}
|
|
8930
8985
|
}
|
|
8931
8986
|
function Po(e, t, n, r) {
|
|
8932
|
-
let
|
|
8933
|
-
if (
|
|
8934
|
-
eo(e.node.children).length && t.report("local.structure.children", { key: "local.structure.quiz.numeric-no-body" }, e.node.range.start, e.node.range.end),
|
|
8987
|
+
let i = typeof n[r.type]?.value == "string" ? String(n[r.type].value) : "choice", a = ro(e, n, r.answer) ?? "";
|
|
8988
|
+
if (a.trim() || t.report("local.quiz.answer", { key: "local.quiz.answer.required" }, n[r.answer]?.offset ?? e.node.range.start, void 0), i === "number") {
|
|
8989
|
+
eo(e.node.children).length && t.report("local.structure.children", { key: "local.structure.quiz.numeric-no-body" }, e.node.range.start, e.node.range.end), a.trim() && Qa(a) === null && t.report("local.quiz.answer", { key: "local.quiz.answer.numeric" }, n[r.answer]?.offset ?? e.node.range.start, void 0);
|
|
8935
8990
|
let i = no(e, n, r.tolerance);
|
|
8936
8991
|
i !== void 0 && (!Number.isFinite(i) || i < 0) && t.report("local.constraint", { key: "local.constraint.quiz-tolerance" }, n[r.tolerance]?.offset ?? e.node.range.start, void 0);
|
|
8937
8992
|
return;
|
|
8938
8993
|
}
|
|
8939
|
-
Ao(e, t, n, r.child, r.valueAttribute, !0, Math.min(r.max ?? 1e4,
|
|
8940
|
-
let
|
|
8941
|
-
|
|
8994
|
+
Ao(e, t, n, r.child, r.valueAttribute, !0, Math.min(r.max ?? 1e4, p), void 0);
|
|
8995
|
+
let o = t.options.get(e.node.id) ?? [];
|
|
8996
|
+
a.trim() && o.length && !o.includes(a) && t.report("local.quiz.answer", {
|
|
8942
8997
|
key: "local.quiz.answer.not-option",
|
|
8943
8998
|
params: {
|
|
8944
|
-
answer:
|
|
8945
|
-
options:
|
|
8999
|
+
answer: a,
|
|
9000
|
+
options: o.join(", ")
|
|
8946
9001
|
}
|
|
8947
9002
|
}, n[r.answer]?.offset ?? e.node.range.start, void 0);
|
|
8948
9003
|
}
|
|
8949
9004
|
function Fo(e, t) {
|
|
8950
|
-
let n = t.attrs.get(e.node.id) ?? {}, r = eo(e.node.children),
|
|
8951
|
-
|
|
9005
|
+
let n = t.attrs.get(e.node.id) ?? {}, r = eo(e.node.children), i = t.report, a = Ie(e.kernel), o = Ne(e.kernel);
|
|
9006
|
+
a.parents && (e.parent === null || !a.parents.includes(e.parent.name) && !wo(e.parent, e.name)) && i("local.structure.parent", `<${e.name}> can only appear directly inside ${a.parents.map((e) => `<${e}>`).join(" or ")}.`, e.node.range.start, e.node.range.end, {
|
|
8952
9007
|
key: "local.structure.parent",
|
|
8953
9008
|
params: {
|
|
8954
9009
|
name: e.name,
|
|
8955
|
-
parents:
|
|
9010
|
+
parents: a.parents.map((e) => `<${e}>`).join(" / ")
|
|
8956
9011
|
}
|
|
8957
9012
|
});
|
|
8958
|
-
let
|
|
8959
|
-
for (let
|
|
9013
|
+
let s = !1, c = !1;
|
|
9014
|
+
for (let l of o) switch (l.kind) {
|
|
8960
9015
|
case "inline-body":
|
|
8961
|
-
|
|
9016
|
+
s = !0, Oo(e, r, t, l.strict === !0 || a.inlineOnly === !0);
|
|
8962
9017
|
break;
|
|
8963
9018
|
case "no-components":
|
|
8964
|
-
|
|
9019
|
+
s = !0, ko(e, t);
|
|
8965
9020
|
break;
|
|
8966
9021
|
case "single-table": {
|
|
8967
|
-
|
|
9022
|
+
s = !0, c = !0;
|
|
8968
9023
|
let n = r.filter((e) => e.type === "table");
|
|
8969
|
-
(n.length !== 1 || r.length !== 1) &&
|
|
9024
|
+
(n.length !== 1 || r.length !== 1) && i("local.structure.children", `The body of <${e.name}> must be exactly one Markdown table.`, e.node.range.start, e.node.range.end, {
|
|
8970
9025
|
key: "local.structure.table.single",
|
|
8971
9026
|
params: { name: e.name }
|
|
8972
|
-
}), n.length ? t.tables.set(e.node.id, n[0]) :
|
|
9027
|
+
}), n.length ? t.tables.set(e.node.id, n[0]) : l.fallbackSingle === !0 && r.length === 1 && t.tables.set(e.node.id, r[0]);
|
|
8973
9028
|
break;
|
|
8974
9029
|
}
|
|
8975
9030
|
case "math-body":
|
|
8976
|
-
|
|
8977
|
-
for (let t of r) t.type !== "math" &&
|
|
9031
|
+
s = !0, c = !0, r.filter((e) => e.type === "math").length || i("local.structure.children", `<${e.name}> requires at least one $$...$$ formula block.`, e.node.range.start, e.node.range.end, { key: "local.structure.plot.needs-formula" });
|
|
9032
|
+
for (let t of r) t.type !== "math" && i("local.structure.children", `The body of <${e.name}> can only contain blank lines and $$...$$ formula blocks.`, t.range.start, t.range.end, { key: "local.structure.plot.only-formulas" });
|
|
8978
9033
|
break;
|
|
8979
9034
|
case "options-body":
|
|
8980
|
-
|
|
9035
|
+
s = !0, c = !0, Ao(e, t, n, l.child, l.valueAttribute, l.unique, Math.min(l.max ?? 1e4, p), l.forbidSeparator);
|
|
8981
9036
|
break;
|
|
8982
9037
|
case "value-sequence":
|
|
8983
|
-
|
|
9038
|
+
s = !0, c = !0, jo(e, t, l.child, l.valueAttribute, l.generatedPrefix, l.duplicateCode ?? `local.${l.child}.value`);
|
|
8984
9039
|
break;
|
|
8985
9040
|
case "only-children":
|
|
8986
|
-
|
|
9041
|
+
s = !0, c = !0, Mo(e, t, l.children, l.min, l.max, l.onlyCode, l.maxCode);
|
|
8987
9042
|
break;
|
|
8988
9043
|
case "diagram-body":
|
|
8989
|
-
|
|
9044
|
+
s = !0, c = !0, No(e, t, l);
|
|
8990
9045
|
break;
|
|
8991
9046
|
case "quiz-body":
|
|
8992
|
-
|
|
9047
|
+
s = !0, c = !0, Po(e, t, n, l);
|
|
8993
9048
|
break;
|
|
8994
|
-
case "checklist-body":
|
|
9049
|
+
case "checklist-body": s = !0, c = !0, Io(e, t, Math.min(l.itemLimit, p));
|
|
8995
9050
|
}
|
|
8996
|
-
if (!
|
|
9051
|
+
if (!s) switch (a.rule) {
|
|
8997
9052
|
case "none":
|
|
8998
|
-
r.length && (e.legacy ?
|
|
9053
|
+
r.length && (e.legacy ? i("local.host.structure", `Host component <${e.name}> is a leaf and cannot have body content.`, r[0].range.start, r[0].range.end, {
|
|
8999
9054
|
key: "local.host.structure.leaf",
|
|
9000
9055
|
params: { component: e.name }
|
|
9001
|
-
}) :
|
|
9056
|
+
}) : i("local.structure.children", `<${e.name}> does not accept body content.`, r[0].range.start, r[0].range.end, {
|
|
9002
9057
|
key: "local.structure.no-body",
|
|
9003
9058
|
params: { name: e.name }
|
|
9004
9059
|
}));
|
|
9005
9060
|
break;
|
|
9006
9061
|
case "inline":
|
|
9007
|
-
Oo(e, r, t,
|
|
9062
|
+
Oo(e, r, t, a.inlineOnly === !0 || a.markdown === "inline");
|
|
9008
9063
|
break;
|
|
9009
9064
|
case "content":
|
|
9010
|
-
(
|
|
9065
|
+
(a.noComponents === !0 || a.allowComponents === !1) && ko(e, t);
|
|
9011
9066
|
break;
|
|
9012
9067
|
case "components": {
|
|
9013
|
-
(
|
|
9014
|
-
let n = So(
|
|
9068
|
+
(a.noComponents === !0 || a.allowComponents === !1) && ko(e, t);
|
|
9069
|
+
let n = So(a);
|
|
9015
9070
|
if (n.length) {
|
|
9016
|
-
|
|
9071
|
+
c = !0;
|
|
9017
9072
|
let r = Z(e.kernel, "data-table");
|
|
9018
|
-
Mo(e, t, n, Co(
|
|
9073
|
+
Mo(e, t, n, Co(a), To(a), void 0, r ? "local.budget.data-table.columns" : void 0);
|
|
9019
9074
|
}
|
|
9020
9075
|
break;
|
|
9021
9076
|
}
|
|
9022
9077
|
case "options":
|
|
9023
|
-
|
|
9078
|
+
c = !0, Ao(e, t, n, So(a)[0] ?? "option", a.valueAttribute ?? "value", !0, Math.min(a.maxItems ?? 1e4, p), a.forbidSeparator);
|
|
9024
9079
|
break;
|
|
9025
9080
|
case "tabs":
|
|
9026
|
-
case "steps":
|
|
9081
|
+
case "steps": c = !0, jo(e, t, So(a)[0] ?? (a.rule === "tabs" ? "tab" : "step"), a.valueAttribute ?? "value", a.generatedPrefix ?? a.valuePrefix ?? `${a.rule === "tabs" ? "tab" : "step"}-`, `local.${a.rule === "tabs" ? "tab" : "step"}.value`);
|
|
9027
9082
|
}
|
|
9028
|
-
let
|
|
9029
|
-
!
|
|
9083
|
+
let l = Co(a);
|
|
9084
|
+
!c && l > 0 && r.length < l && i(e.legacy ? "local.host.structure" : "local.structure.children", `Component <${e.name}> requires body content.`, e.node.range.start, e.node.range.end, {
|
|
9030
9085
|
key: e.legacy ? "local.host.structure.leaf" : "local.structure.content-required",
|
|
9031
9086
|
params: { component: e.name }
|
|
9032
9087
|
});
|
|
9033
|
-
let
|
|
9034
|
-
!
|
|
9088
|
+
let u = To(a);
|
|
9089
|
+
!c && u !== void 0 && r.length > u && i("local.structure.children", `<${e.name}> accepts at most ${u} body blocks.`, e.node.range.start, e.node.range.end, {
|
|
9035
9090
|
key: "local.structure.body-max",
|
|
9036
9091
|
params: {
|
|
9037
9092
|
name: e.name,
|
|
9038
|
-
max:
|
|
9093
|
+
max: u
|
|
9039
9094
|
}
|
|
9040
9095
|
});
|
|
9041
9096
|
}
|
|
9042
|
-
function Io(e, t, n =
|
|
9097
|
+
function Io(e, t, n = p) {
|
|
9043
9098
|
let r = t.checklists.get(e.node.id);
|
|
9044
9099
|
if (r) return r;
|
|
9045
|
-
let
|
|
9046
|
-
(
|
|
9047
|
-
let
|
|
9048
|
-
if (!
|
|
9049
|
-
ids:
|
|
9050
|
-
checked:
|
|
9100
|
+
let i = eo(e.node.children), a = i.filter((e) => e.type === "list");
|
|
9101
|
+
(i.length !== 1 || a.length !== 1) && t.report("local.checklist.body", { key: "local.checklist.body.single" }, e.node.range.start, e.node.range.end);
|
|
9102
|
+
let o = a[0], s = [], c = [];
|
|
9103
|
+
if (!o) return t.checklists.set(e.node.id, {
|
|
9104
|
+
ids: s,
|
|
9105
|
+
checked: c
|
|
9051
9106
|
}), {
|
|
9052
|
-
ids:
|
|
9053
|
-
checked:
|
|
9107
|
+
ids: s,
|
|
9108
|
+
checked: c
|
|
9054
9109
|
};
|
|
9055
|
-
let
|
|
9056
|
-
|
|
9110
|
+
let l = o.children ?? [];
|
|
9111
|
+
l.length || t.report("local.checklist.body", { key: "local.checklist.body.item-required" }, o.range.start, o.range.end), l.length > n && t.report("local.budget.array", {
|
|
9057
9112
|
key: "local.checklist.body.items-limit",
|
|
9058
9113
|
params: { limit: n }
|
|
9059
|
-
},
|
|
9114
|
+
}, o.range.start, o.range.end), l.slice(0, n).forEach((e, n) => {
|
|
9060
9115
|
if (e.type !== "listItem" || e.checked === null || e.checked === void 0) {
|
|
9061
9116
|
t.report("local.checklist.body", { key: "local.checklist.body.task-only" }, e.range.start, e.range.end);
|
|
9062
9117
|
return;
|
|
9063
9118
|
}
|
|
9064
9119
|
(e.children ?? []).some((e) => e.type === "list") && t.report("local.checklist.body", { key: "local.checklist.body.no-nested" }, e.range.start, e.range.end), to(e) && t.report("local.checklist.body", { key: "local.checklist.body.no-components" }, e.range.start, e.range.end);
|
|
9065
9120
|
let r = `item-${n + 1}`;
|
|
9066
|
-
|
|
9121
|
+
s.push(r), e.checked && c.push(r);
|
|
9067
9122
|
});
|
|
9068
|
-
let
|
|
9069
|
-
ids:
|
|
9070
|
-
checked:
|
|
9123
|
+
let u = {
|
|
9124
|
+
ids: s,
|
|
9125
|
+
checked: c
|
|
9071
9126
|
};
|
|
9072
|
-
return t.checklists.set(e.node.id,
|
|
9127
|
+
return t.checklists.set(e.node.id, u), u;
|
|
9073
9128
|
}
|
|
9074
9129
|
function Lo(e, t) {
|
|
9075
|
-
if (!(e.length > 128)) return
|
|
9130
|
+
if (!(e.length > 128)) return _e(e, [...t]);
|
|
9076
9131
|
}
|
|
9077
9132
|
function Ro(e) {
|
|
9078
9133
|
let t = [];
|
|
9079
|
-
for (let n of
|
|
9134
|
+
for (let n of S(e)) n.type === "code" && (n.lang ?? "").trim().toLowerCase() === "reactive-md" && t.push(n);
|
|
9080
9135
|
return t;
|
|
9081
9136
|
}
|
|
9082
9137
|
function zo(e, t, n, r) {
|
|
@@ -9125,15 +9180,15 @@ function zo(e, t, n, r) {
|
|
|
9125
9180
|
function Bo(e, t) {
|
|
9126
9181
|
if (t.size === 0) return;
|
|
9127
9182
|
let n = /* @__PURE__ */ new Map();
|
|
9128
|
-
for (let r of
|
|
9183
|
+
for (let r of S(e)) {
|
|
9129
9184
|
if (r.type !== "hostComponent" || !r.name) continue;
|
|
9130
9185
|
let e = t.get(r.name);
|
|
9131
|
-
e !== void 0 && n.set(e.id,
|
|
9186
|
+
e !== void 0 && n.set(e.id, xe(e));
|
|
9132
9187
|
}
|
|
9133
9188
|
if (n.size === 0) return;
|
|
9134
9189
|
let r = Object.freeze([...n.values()].sort((e, t) => e.id < t.id ? -1 : +(e.id > t.id)));
|
|
9135
9190
|
return Object.freeze({
|
|
9136
|
-
protocol:
|
|
9191
|
+
protocol: s,
|
|
9137
9192
|
components: r
|
|
9138
9193
|
});
|
|
9139
9194
|
}
|
|
@@ -9163,7 +9218,7 @@ function Vo(e, t) {
|
|
|
9163
9218
|
});
|
|
9164
9219
|
}
|
|
9165
9220
|
for (let t of e.entries) {
|
|
9166
|
-
let i =
|
|
9221
|
+
let i = W(t.kernel);
|
|
9167
9222
|
i.length && (n[t.node.id] = Object.freeze([...i]));
|
|
9168
9223
|
let o = Z(t.kernel, "self-binding-read"), s = Z(t.kernel, "inline-math-reads");
|
|
9169
9224
|
(o || s) && (r[t.node.id] = {
|
|
@@ -9205,7 +9260,7 @@ function Ho(e) {
|
|
|
9205
9260
|
return n;
|
|
9206
9261
|
}
|
|
9207
9262
|
function Uo(e, t) {
|
|
9208
|
-
for (let n of
|
|
9263
|
+
for (let n of S(e)) n.type !== "hostComponent" || n.name && t.schemaByName.has(n.name) || Xa(t, "local.component.unknown", {
|
|
9209
9264
|
key: "local.component.unknown",
|
|
9210
9265
|
params: { name: n.name ?? "" }
|
|
9211
9266
|
}, n.range.start, n.range.end);
|
|
@@ -9251,7 +9306,7 @@ function qo(e, t) {
|
|
|
9251
9306
|
params: {
|
|
9252
9307
|
name: s,
|
|
9253
9308
|
component: e.name,
|
|
9254
|
-
limit:
|
|
9309
|
+
limit: u
|
|
9255
9310
|
}
|
|
9256
9311
|
}, r, r + s.length);
|
|
9257
9312
|
continue;
|
|
@@ -9262,7 +9317,7 @@ function qo(e, t) {
|
|
|
9262
9317
|
}
|
|
9263
9318
|
let l = i[s];
|
|
9264
9319
|
if (!l) {
|
|
9265
|
-
let n =
|
|
9320
|
+
let n = _e(s, Object.keys(i));
|
|
9266
9321
|
a ? t.report("local.host.attribute", {
|
|
9267
9322
|
key: "local.host.attribute.unknown",
|
|
9268
9323
|
params: {
|
|
@@ -9282,7 +9337,7 @@ function qo(e, t) {
|
|
|
9282
9337
|
}, r, r + s.length);
|
|
9283
9338
|
continue;
|
|
9284
9339
|
}
|
|
9285
|
-
let
|
|
9340
|
+
let d = {
|
|
9286
9341
|
raw: c,
|
|
9287
9342
|
offset: r,
|
|
9288
9343
|
dynamic: !1
|
|
@@ -9292,20 +9347,20 @@ function qo(e, t) {
|
|
|
9292
9347
|
params: {
|
|
9293
9348
|
name: s,
|
|
9294
9349
|
component: e.name,
|
|
9295
|
-
limit:
|
|
9350
|
+
limit: u
|
|
9296
9351
|
}
|
|
9297
|
-
}, r, r + s.length),
|
|
9298
|
-
let n = lo(
|
|
9299
|
-
n.segments.length || n.unterminated.length || Se(
|
|
9352
|
+
}, r, r + s.length), d.raw = c.slice(0, u)), Zo(s, l, d, t, a), l.color) {
|
|
9353
|
+
let n = lo(d.raw);
|
|
9354
|
+
n.segments.length || n.unterminated.length || Se(d.raw) || t.report("local.attribute.color", {
|
|
9300
9355
|
key: "local.attribute.color",
|
|
9301
9356
|
params: {
|
|
9302
9357
|
name: s,
|
|
9303
9358
|
component: e.name,
|
|
9304
|
-
value:
|
|
9359
|
+
value: d.raw
|
|
9305
9360
|
}
|
|
9306
9361
|
}, r, r + s.length);
|
|
9307
9362
|
}
|
|
9308
|
-
n[s] =
|
|
9363
|
+
n[s] = d;
|
|
9309
9364
|
}
|
|
9310
9365
|
for (let [r, s] of Object.entries(i)) o?.bind.has(r) || o?.initial.has(r) || s.required && s.default === void 0 && !Object.hasOwn(n, r) && (a ? t.report("local.host.attribute", {
|
|
9311
9366
|
key: "local.host.attribute.required",
|
|
@@ -9888,7 +9943,7 @@ function hs(e) {
|
|
|
9888
9943
|
a.length > 128 ? (e.report("local.budget.identifier", {
|
|
9889
9944
|
key: "local.budget.identifier",
|
|
9890
9945
|
params: { limit: 128 }
|
|
9891
|
-
}, t, void 0), o = `@${n.node.id}`) : so.test(a) ? (
|
|
9946
|
+
}, t, void 0), o = `@${n.node.id}`) : so.test(a) ? (E.has(a) || ps.has(a)) && (e.report("local.binding.reserved", {
|
|
9892
9947
|
key: "local.binding.reserved",
|
|
9893
9948
|
params: { name: a }
|
|
9894
9949
|
}, t, void 0), o = `@${n.node.id}`) : (e.report("local.binding.name", {
|
|
@@ -10108,7 +10163,7 @@ function Ts(e, t, n, r) {
|
|
|
10108
10163
|
params: { name: a.node.id }
|
|
10109
10164
|
}, i.offset, void 0), !1);
|
|
10110
10165
|
let s = typeof i.value == "string" ? i.value : String(i.value ?? "");
|
|
10111
|
-
return
|
|
10166
|
+
return W(a.kernel).some((e) => e.kind === "date") && !ke(s) && t.report("local.initial.date", {
|
|
10112
10167
|
key: "local.initial.date",
|
|
10113
10168
|
params: { value: s }
|
|
10114
10169
|
}, i.offset, void 0), r.length && !r.includes(s) && n.family !== "text" && n.family !== "date" && t.report("local.initial.option", {
|
|
@@ -10160,7 +10215,7 @@ function Ds(e, t) {
|
|
|
10160
10215
|
t.length > 128 ? e.report("local.budget.identifier", {
|
|
10161
10216
|
key: "local.budget.identifier",
|
|
10162
10217
|
params: { limit: 128 }
|
|
10163
|
-
}, a.offset ?? i.node.range.start, void 0) : so.test(t) ?
|
|
10218
|
+
}, a.offset ?? i.node.range.start, void 0) : so.test(t) ? E.has(t) || ps.has(t) ? e.report("local.binding.reserved", {
|
|
10164
10219
|
key: "local.binding.reserved",
|
|
10165
10220
|
params: { name: t }
|
|
10166
10221
|
}, a.offset ?? i.node.range.start, void 0) : l = t : e.report("local.binding.name", {
|
|
@@ -10267,7 +10322,7 @@ function Ms(e) {
|
|
|
10267
10322
|
e.report("local.computation.name", `Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`, c.offset);
|
|
10268
10323
|
continue;
|
|
10269
10324
|
}
|
|
10270
|
-
if (
|
|
10325
|
+
if (E.has(l) || ps.has(l)) {
|
|
10271
10326
|
e.report("local.computation.reserved", `Computation name "${l}" is reserved; choose another name.`, c.offset);
|
|
10272
10327
|
continue;
|
|
10273
10328
|
}
|
|
@@ -10358,7 +10413,7 @@ function Fs(e) {
|
|
|
10358
10413
|
}, a.offset, void 0);
|
|
10359
10414
|
continue;
|
|
10360
10415
|
}
|
|
10361
|
-
if (
|
|
10416
|
+
if (E.has(o) || ps.has(o)) {
|
|
10362
10417
|
e.report("local.external.reserved", {
|
|
10363
10418
|
key: "local.external.reserved",
|
|
10364
10419
|
params: { name: o }
|
|
@@ -10431,7 +10486,7 @@ function Ls(e, t) {
|
|
|
10431
10486
|
case "image": return e.alt ?? "";
|
|
10432
10487
|
case "break": return " ";
|
|
10433
10488
|
case "interpolation": try {
|
|
10434
|
-
let n =
|
|
10489
|
+
let n = D(e.value ?? "").evaluate(t);
|
|
10435
10490
|
return Array.isArray(n) ? "Cannot compute" : n === null ? "" : String(n);
|
|
10436
10491
|
} catch {
|
|
10437
10492
|
return "Cannot compute";
|
|
@@ -10473,10 +10528,10 @@ function Hs(e, t, n = !0, r) {
|
|
|
10473
10528
|
for (let [r, i] of Object.entries(e.computations)) {
|
|
10474
10529
|
i.kind === "const" && Object.hasOwn(i, "value") && (t[r] = i.value);
|
|
10475
10530
|
try {
|
|
10476
|
-
n.set(r,
|
|
10531
|
+
n.set(r, D(i.source));
|
|
10477
10532
|
} catch {}
|
|
10478
10533
|
}
|
|
10479
|
-
let { order: r } =
|
|
10534
|
+
let { order: r } = me(e.computations), i = K(e.computations, r, n, a, t);
|
|
10480
10535
|
a = {
|
|
10481
10536
|
...a,
|
|
10482
10537
|
...i.values
|
|
@@ -10493,7 +10548,7 @@ function Hs(e, t, n = !0, r) {
|
|
|
10493
10548
|
id: i
|
|
10494
10549
|
};
|
|
10495
10550
|
}
|
|
10496
|
-
for (let t of
|
|
10551
|
+
for (let t of S(e.nodes)) if (t.type === "heading") {
|
|
10497
10552
|
let e = Vs(t) ?? Rs(Ls(t.children, a));
|
|
10498
10553
|
o.set(t, d(e).id);
|
|
10499
10554
|
} else {
|
|
@@ -10534,7 +10589,7 @@ function Hs(e, t, n = !0, r) {
|
|
|
10534
10589
|
// src/local/compilation/compiler-expressions.ts
|
|
10535
10590
|
function Us(e) {
|
|
10536
10591
|
let t = mo(e), n = Object.keys(t), r = (t, n) => {
|
|
10537
|
-
t instanceof
|
|
10592
|
+
t instanceof C ? e.report(`local.expression.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0), void 0, {
|
|
10538
10593
|
key: "local.expression.error",
|
|
10539
10594
|
params: {
|
|
10540
10595
|
detail: t.message,
|
|
@@ -10552,7 +10607,7 @@ function Us(e) {
|
|
|
10552
10607
|
if (!i.trim()) return e.report("local.expression.empty", { key: "local.expression.empty" }, a, void 0), null;
|
|
10553
10608
|
let s = null;
|
|
10554
10609
|
try {
|
|
10555
|
-
s = e.semantic?.expression(i) ??
|
|
10610
|
+
s = e.semantic?.expression(i) ?? D(i);
|
|
10556
10611
|
} catch (e) {
|
|
10557
10612
|
return r(e, a), null;
|
|
10558
10613
|
}
|
|
@@ -10589,7 +10644,7 @@ function Us(e) {
|
|
|
10589
10644
|
params: { kind: oo(l) }
|
|
10590
10645
|
}, a, void 0) : o === "text" && (l === "array" || l === "number-array") && e.report("local.type", { key: "local.type.array" }, a, void 0), l;
|
|
10591
10646
|
};
|
|
10592
|
-
for (let t of
|
|
10647
|
+
for (let t of S(e.nodes)) if (t.type === "interpolation") {
|
|
10593
10648
|
let n = e.source.slice(t.range.start + 2, Math.max(t.range.start + 2, t.range.end - 2)), r = t.value ?? "", a = Math.max(0, n.indexOf(r)), o = t.range.start + 2 + a;
|
|
10594
10649
|
e.expressionKinds.set(t.id, i(r, o, "text"));
|
|
10595
10650
|
}
|
|
@@ -10635,7 +10690,7 @@ function Ws(e, t, n) {
|
|
|
10635
10690
|
bindings: t,
|
|
10636
10691
|
...Object.keys(e.computations).length ? { computations: e.computations } : {}
|
|
10637
10692
|
}, i = "__local_core_check__", a = Hs(r, i, !1), o = /* @__PURE__ */ new Set();
|
|
10638
|
-
for (let t of
|
|
10693
|
+
for (let t of S(e.nodes)) if (t.type === "heading") {
|
|
10639
10694
|
let e = a.ids.get(t);
|
|
10640
10695
|
e && e.startsWith(`${i}-`) && o.add(e.slice(21));
|
|
10641
10696
|
}
|
|
@@ -10646,7 +10701,7 @@ function Ws(e, t, n) {
|
|
|
10646
10701
|
let r = (e.attrs.get(t.node.id) ?? {})[n.id];
|
|
10647
10702
|
if (!r) continue;
|
|
10648
10703
|
let i = typeof r.value == "string" ? r.value : "";
|
|
10649
|
-
!i || !
|
|
10704
|
+
!i || !ue(i) ? e.report("local.anchor.id", {
|
|
10650
10705
|
key: "local.anchor.id",
|
|
10651
10706
|
params: { id: i }
|
|
10652
10707
|
}, r.offset, void 0) : (s.has(i) ? e.report("local.anchor.duplicate", {
|
|
@@ -10668,19 +10723,19 @@ function Ws(e, t, n) {
|
|
|
10668
10723
|
offset: r.offset
|
|
10669
10724
|
});
|
|
10670
10725
|
}
|
|
10671
|
-
for (let t of
|
|
10726
|
+
for (let t of q(c, s, o)) e.report(t.code, t.message, t.start, t.end, {
|
|
10672
10727
|
key: t.key,
|
|
10673
10728
|
...t.params ? { params: t.params } : {}
|
|
10674
10729
|
});
|
|
10675
10730
|
}
|
|
10676
10731
|
function Gs(e, t, n) {
|
|
10677
|
-
t instanceof
|
|
10732
|
+
t instanceof C ? e.report(`local.expression.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e.report("local.expression.invalid", `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
|
|
10678
10733
|
}
|
|
10679
10734
|
function Ks(e, t, n, r, i) {
|
|
10680
10735
|
if (!t.trim()) return e.report("local.expression.empty", "Interpolation expression cannot be empty.", n), null;
|
|
10681
10736
|
let a;
|
|
10682
10737
|
try {
|
|
10683
|
-
a = e.semantic?.expression(t) ??
|
|
10738
|
+
a = e.semantic?.expression(t) ?? D(t);
|
|
10684
10739
|
} catch (t) {
|
|
10685
10740
|
return Gs(e, t, n), null;
|
|
10686
10741
|
}
|
|
@@ -10713,7 +10768,7 @@ function qs(e, t, n, r, i) {
|
|
|
10713
10768
|
} : (i.report("local.expression.empty", "Interpolation expression cannot be empty.", e.offset + a.start), null) : (i.report(t, `<${n}> ${r} must be exactly one {{ expression }} interpolation.`, e.offset, e.offset + e.raw.length), null);
|
|
10714
10769
|
}
|
|
10715
10770
|
function Js(e, t) {
|
|
10716
|
-
let n = e[t.maxRows], r = Math.min(t.defaultMaxRows,
|
|
10771
|
+
let n = e[t.maxRows], r = Math.min(t.defaultMaxRows, i);
|
|
10717
10772
|
return n && !n.dynamic && typeof n.value == "number" && Number.isInteger(n.value) && n.value > 0 && n.value <= 1e3 ? n.value : r;
|
|
10718
10773
|
}
|
|
10719
10774
|
// src/local/compilation/compiler-validation.ts
|
|
@@ -10726,8 +10781,8 @@ function Ys(e) {
|
|
|
10726
10781
|
if (!t.length) return;
|
|
10727
10782
|
let n = mo(e), r = 0, i = 0, a = !1, o = !1;
|
|
10728
10783
|
for (let [s, l] of t) {
|
|
10729
|
-
let t = e.attrs.get(s.node.id) ?? {}, u = eo(s.node.children).filter((e) => (e.type === "component" || e.type === "hostComponent") && e.name === l.child), d = Js(t, l),
|
|
10730
|
-
r += d, i += d * g, !a && r >
|
|
10784
|
+
let t = e.attrs.get(s.node.id) ?? {}, u = eo(s.node.children).filter((e) => (e.type === "component" || e.type === "hostComponent") && e.name === l.child), d = Js(t, l), p = Math.min(l.maxColumns, 20), m = Math.min(l.documentRows, f), h = Math.min(l.documentCells, c), g = Math.min(u.length, p);
|
|
10785
|
+
r += d, i += d * g, !a && r > m && (a = !0, e.report("local.budget.data-table.rows", `The document's generated row budget exceeds ${m}; ${l.maxRows} summed over every <${s.name}> must stay within it.`, s.node.range.start, s.node.range.end)), !o && i > h && (o = !0, e.report("local.budget.data-table.cells", `The document's generated cell budget exceeds ${h}; ${l.maxRows} multiplied by columns, summed over every <${s.name}>, must stay within it.`, s.node.range.start, s.node.range.end));
|
|
10731
10786
|
let _ = qs(t[l.rows], "local.data-table.rows", s.name, l.rows, e), v = "string", y = !1;
|
|
10732
10787
|
if (_) {
|
|
10733
10788
|
let t = Ks(e, _.expression, _.base, n, !0);
|
|
@@ -10779,7 +10834,7 @@ function Xs(e) {
|
|
|
10779
10834
|
n && (f = [...n.compiled.dependencies], n.kind !== null && n.kind !== "boolean" && e.report("local.type", `Expected a boolean here, but the expression evaluates to ${oo(n.kind)}.`, p.offset + t.start));
|
|
10780
10835
|
}
|
|
10781
10836
|
}
|
|
10782
|
-
let m = u[s.fields], h = m ?
|
|
10837
|
+
let m = u[s.fields], h = m ? pe(m.raw) : [];
|
|
10783
10838
|
m && !h.length && e.report("local.validation.fields", `<${o.name}> requires at least one field name.`, m.offset, m.offset + m.raw.length);
|
|
10784
10839
|
let g = /* @__PURE__ */ new Set();
|
|
10785
10840
|
for (let t of h) if (g.has(t)) e.report("local.validation.fields", `Duplicate field "${t}" in <${o.name}> fields.`, m?.offset ?? c.range.start);
|
|
@@ -10805,34 +10860,34 @@ function Zs(e, t, n) {
|
|
|
10805
10860
|
function Qs(e) {
|
|
10806
10861
|
let t = mo(e), n = 0, r = !1;
|
|
10807
10862
|
for (let i of e.entries) {
|
|
10808
|
-
let
|
|
10809
|
-
if (!
|
|
10810
|
-
let
|
|
10811
|
-
if (!
|
|
10863
|
+
let o = Z(i.kernel, "plot-math");
|
|
10864
|
+
if (!o) continue;
|
|
10865
|
+
let s = e.plotMath;
|
|
10866
|
+
if (!s) {
|
|
10812
10867
|
e.report("local.capability.plot", { key: "local.capability.plot" }, i.node.range.start, i.node.range.end);
|
|
10813
10868
|
continue;
|
|
10814
10869
|
}
|
|
10815
|
-
let
|
|
10816
|
-
|
|
10870
|
+
let c = e.attrs.get(i.node.id) ?? {}, l = eo(i.node.children).filter((e) => e.type === "math"), u = Zs(i, c, o), d = Math.min(o.curves, 16), f = Math.min(o.points, a);
|
|
10871
|
+
l.length > d && e.report("local.budget.plot.curves", {
|
|
10817
10872
|
key: "local.budget.plot.curves",
|
|
10818
10873
|
params: {
|
|
10819
|
-
limit:
|
|
10820
|
-
count:
|
|
10874
|
+
limit: d,
|
|
10875
|
+
count: l.length
|
|
10821
10876
|
}
|
|
10822
10877
|
}, i.node.range.start, i.node.range.end);
|
|
10823
|
-
let
|
|
10824
|
-
if (!r && h >
|
|
10878
|
+
let p = l.map((e) => s.kind(e.value ?? "")), m = p.reduce((e, t) => e + (t === "implicit" ? s.gridSize(u) ** 2 : u), 0), h = n + m;
|
|
10879
|
+
if (!r && h > f && (e.report("local.budget.plot.points", {
|
|
10825
10880
|
key: "local.budget.plot.points",
|
|
10826
|
-
params: { limit:
|
|
10827
|
-
}, i.node.range.start, i.node.range.end), r = !0), n = Math.min(
|
|
10828
|
-
let r =
|
|
10829
|
-
if (
|
|
10881
|
+
params: { limit: f }
|
|
10882
|
+
}, i.node.range.start, i.node.range.end), r = !0), n = Math.min(f + 1, h), !(l.length > d || r)) for (let n = 0; n < l.length; n += 1) {
|
|
10883
|
+
let r = l[n], i = (r.value ?? "").trim();
|
|
10884
|
+
if (p[n] === null) {
|
|
10830
10885
|
e.report("local.math.formula", { key: "local.math.formula.shape" }, r.range.start, r.range.end);
|
|
10831
10886
|
continue;
|
|
10832
10887
|
}
|
|
10833
10888
|
let a = null;
|
|
10834
10889
|
try {
|
|
10835
|
-
a =
|
|
10890
|
+
a = s.compile(i);
|
|
10836
10891
|
} catch (t) {
|
|
10837
10892
|
e.report("local.math", {
|
|
10838
10893
|
key: "local.math.compute",
|
|
@@ -10862,7 +10917,7 @@ function nc(e) {
|
|
|
10862
10917
|
let t = e.snapshot().revision, n = tc.get(e);
|
|
10863
10918
|
if (n?.revision === t) return n.tokens;
|
|
10864
10919
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new WeakMap();
|
|
10865
|
-
for (let t of
|
|
10920
|
+
for (let t of S(e.document.nodes, !0)) {
|
|
10866
10921
|
let n = e.resetToken(t);
|
|
10867
10922
|
for (let e of t.children ?? []) n += i.get(e);
|
|
10868
10923
|
r.set(t.id, n), i.set(t, n);
|
|
@@ -10886,7 +10941,7 @@ function ic(e, t) {
|
|
|
10886
10941
|
index: n
|
|
10887
10942
|
}), n;
|
|
10888
10943
|
}
|
|
10889
|
-
let a = t ?? (Array.isArray(e.componentDefinitions) ? e.componentDefinitions : []), o = /* @__PURE__ */ new Map(), s =
|
|
10944
|
+
let a = t ?? (Array.isArray(e.componentDefinitions) ? e.componentDefinitions : []), o = /* @__PURE__ */ new Map(), s = fe(e), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
10890
10945
|
for (let [t, n] of Object.entries(e.bindings)) {
|
|
10891
10946
|
for (let e of n.nodeIds) l.add(e);
|
|
10892
10947
|
if (!t.startsWith("@")) for (let e of n.nodeIds) {
|
|
@@ -10894,24 +10949,24 @@ function ic(e, t) {
|
|
|
10894
10949
|
n.push(t), c.set(e, n);
|
|
10895
10950
|
}
|
|
10896
10951
|
}
|
|
10897
|
-
let u = (e) => c.get(e.id) ?? [
|
|
10952
|
+
let u = (e) => c.get(e.id) ?? [ye(e)], d = (t, n) => {
|
|
10898
10953
|
let r = e.bindingSlots?.[n.id];
|
|
10899
10954
|
if (r !== void 0) {
|
|
10900
|
-
t.add(
|
|
10955
|
+
t.add(ye(n));
|
|
10901
10956
|
for (let e of Object.values(r)) t.add(e);
|
|
10902
10957
|
}
|
|
10903
10958
|
}, f = /* @__PURE__ */ new WeakMap();
|
|
10904
|
-
for (let t of
|
|
10959
|
+
for (let t of S(e.nodes, !0)) {
|
|
10905
10960
|
let r = /* @__PURE__ */ new Set(), i = !1;
|
|
10906
10961
|
if (t.attrs !== void 0) for (let e of Object.values(t.attrs)) try {
|
|
10907
|
-
rc(r,
|
|
10962
|
+
rc(r, T(e));
|
|
10908
10963
|
} catch {
|
|
10909
10964
|
i = !0;
|
|
10910
10965
|
break;
|
|
10911
10966
|
}
|
|
10912
10967
|
if (!i) {
|
|
10913
10968
|
if (t.type === "interpolation") try {
|
|
10914
|
-
rc(r,
|
|
10969
|
+
rc(r, D(t.value ?? "").dependencies);
|
|
10915
10970
|
} catch {
|
|
10916
10971
|
i = !0;
|
|
10917
10972
|
}
|
|
@@ -10934,7 +10989,7 @@ function ic(e, t) {
|
|
|
10934
10989
|
rc(r, n(t).dependencies);
|
|
10935
10990
|
} catch {}
|
|
10936
10991
|
}
|
|
10937
|
-
i || (e.bindingSlots?.[t.id] !== void 0 && r.add(
|
|
10992
|
+
i || (e.bindingSlots?.[t.id] !== void 0 && r.add(ye(t)), l.has(t.id) && rc(r, u(t)), d(r, t));
|
|
10938
10993
|
} else {
|
|
10939
10994
|
let e = t.name ? a.find((e) => e.name === t.name) : void 0, i = e ? Ne(e) : [], o = i.find((e) => e.kind === "self-binding-read"), s = i.some((e) => e.kind === "inline-math-reads");
|
|
10940
10995
|
if (o ? (o.mode === "always" || o.attribute !== void 0 && (t.attrs?.[o.attribute] ?? "").trim() !== "") && rc(r, u(t)) : !s && l.has(t.id) && rc(r, u(t)), s) for (let e of t.children ?? []) {
|
|
@@ -11444,6 +11499,14 @@ function Wc(e, t, n) {
|
|
|
11444
11499
|
line: 1,
|
|
11445
11500
|
column: 1,
|
|
11446
11501
|
messageKey: typeof e == "string" ? "local.budget.document" : "local.parse.source",
|
|
11502
|
+
phase: typeof e == "string" ? "resource" : "source",
|
|
11503
|
+
recoverable: !1,
|
|
11504
|
+
...typeof e == "string" ? { details: {
|
|
11505
|
+
budget: "maxDocumentLength",
|
|
11506
|
+
limit: o,
|
|
11507
|
+
actual: e.length,
|
|
11508
|
+
unit: "codeUnits"
|
|
11509
|
+
} } : {},
|
|
11447
11510
|
...typeof e == "string" ? { params: { limit: o } } : {}
|
|
11448
11511
|
}]
|
|
11449
11512
|
};
|
|
@@ -11456,7 +11519,7 @@ function Wc(e, t, n) {
|
|
|
11456
11519
|
document: {
|
|
11457
11520
|
syntax: "local",
|
|
11458
11521
|
source: e,
|
|
11459
|
-
syntaxVersion:
|
|
11522
|
+
syntaxVersion: be,
|
|
11460
11523
|
html: t.html,
|
|
11461
11524
|
nodes: [{
|
|
11462
11525
|
type: "htmlDocument",
|
|
@@ -11481,38 +11544,40 @@ function Gc(e, t, n, r, i, a, o) {
|
|
|
11481
11544
|
diagnostics: t.diagnostics
|
|
11482
11545
|
}, t.recoveries);
|
|
11483
11546
|
}
|
|
11484
|
-
let s = [], c = new
|
|
11485
|
-
let o = typeof n == "string" ? a : n, c = typeof n == "string" ? n :
|
|
11547
|
+
let s = [], c = new g(e), { lineStarts: l } = c, u = (t, n, r, i = r + 1, a) => {
|
|
11548
|
+
let o = typeof n == "string" ? a : n, c = typeof n == "string" ? n : y(n);
|
|
11486
11549
|
if (s.length >= 100) {
|
|
11487
11550
|
let e = s.length - 1;
|
|
11488
11551
|
for (; e >= 0 && s[e].severity !== "warning";) --e;
|
|
11489
11552
|
if (e < 0) return;
|
|
11490
11553
|
s.splice(e, 1);
|
|
11491
11554
|
}
|
|
11492
|
-
let
|
|
11555
|
+
let u = Math.max(0, Math.min(e.length, r)), f = Math.max(u, Math.min(e.length, Math.max(u, i))), p = 0, m = l.length - 1;
|
|
11493
11556
|
for (; p < m;) {
|
|
11494
11557
|
let e = Math.ceil((p + m) / 2);
|
|
11495
|
-
|
|
11558
|
+
l[e] <= u ? p = e : m = e - 1;
|
|
11496
11559
|
}
|
|
11497
|
-
let h =
|
|
11560
|
+
let h = v(o?.key ?? t, o?.params);
|
|
11498
11561
|
s.push({
|
|
11499
11562
|
code: t,
|
|
11500
|
-
message: c.length > 2e3 ? `${
|
|
11563
|
+
message: c.length > 2e3 ? `${x(c, d - 1)}…` : c,
|
|
11501
11564
|
severity: "error",
|
|
11502
11565
|
range: {
|
|
11503
|
-
start:
|
|
11566
|
+
start: u,
|
|
11504
11567
|
end: f
|
|
11505
11568
|
},
|
|
11506
11569
|
line: p + 1,
|
|
11507
|
-
column:
|
|
11570
|
+
column: u - l[p] + 1,
|
|
11508
11571
|
messageKey: h.key,
|
|
11572
|
+
phase: t.includes("budget") ? "resource" : t === "local.parse" ? "parse" : "semantic",
|
|
11573
|
+
recoverable: !1,
|
|
11509
11574
|
...h.params ? { params: h.params } : {}
|
|
11510
11575
|
});
|
|
11511
11576
|
}, f;
|
|
11512
11577
|
try {
|
|
11513
11578
|
f = r?.parser ? r.parser.parse(e, t, c, r.rowPlans, o) : Ya(e, n, c, void 0, void 0, o), i?.(f), a?.("parseMs");
|
|
11514
11579
|
} catch (e) {
|
|
11515
|
-
return
|
|
11580
|
+
return u("local.parse", `Cannot parse document: ${e instanceof Error ? e.message : String(e)}`, 0, void 0, {
|
|
11516
11581
|
key: "local.parse.document",
|
|
11517
11582
|
params: { detail: e instanceof Error ? e.message : String(e) }
|
|
11518
11583
|
}), {
|
|
@@ -11529,19 +11594,19 @@ function Gc(e, t, n, r, i, a, o) {
|
|
|
11529
11594
|
diagnostics: s.filter((t) => t.code.startsWith("local.version.") || t.severity === "warning" && e.has(`${t.code}:${t.range.start}:${t.range.end}`))
|
|
11530
11595
|
}, p);
|
|
11531
11596
|
}
|
|
11532
|
-
for (let e of Ro(f.nodes))
|
|
11597
|
+
for (let e of Ro(f.nodes)) u("local.legacy", "Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.", e.range.start, e.range.end, { key: "local.legacy" });
|
|
11533
11598
|
let m = {
|
|
11534
11599
|
semantic: r?.semantic,
|
|
11535
11600
|
display: r?.display,
|
|
11536
11601
|
htmlFragment: r?.htmlFragment,
|
|
11537
11602
|
plotMath: r?.plotMath,
|
|
11538
11603
|
source: e,
|
|
11539
|
-
lineStarts:
|
|
11604
|
+
lineStarts: l,
|
|
11540
11605
|
nodes: f.nodes,
|
|
11541
11606
|
diagnostics: s,
|
|
11542
11607
|
schemaByName: Hc(n),
|
|
11543
11608
|
definitionsByName: Uc(n),
|
|
11544
|
-
report:
|
|
11609
|
+
report: u,
|
|
11545
11610
|
entries: [],
|
|
11546
11611
|
attrs: /* @__PURE__ */ new Map(),
|
|
11547
11612
|
options: /* @__PURE__ */ new Map(),
|
|
@@ -11566,45 +11631,45 @@ function Gc(e, t, n, r, i, a, o) {
|
|
|
11566
11631
|
a?.("attributesMs");
|
|
11567
11632
|
for (let e of m.entries) Fo(e, m);
|
|
11568
11633
|
ss(m), a?.("structureMs");
|
|
11569
|
-
let
|
|
11570
|
-
Ds(m,
|
|
11571
|
-
let
|
|
11634
|
+
let _ = hs(m);
|
|
11635
|
+
Ds(m, _), m.bindingKinds = gs(_), a?.("bindingsMs"), Fs(m), Ms(m), a?.("computationsMs"), Is(m), Us(m), a?.("expressionsMs"), Ys(m), a?.("dataTablesMs");
|
|
11636
|
+
let b = Xs(m);
|
|
11572
11637
|
a?.("validationsMs"), Qs(m), a?.("plotsMs"), is(m), a?.("tablesMs");
|
|
11573
|
-
let
|
|
11574
|
-
for (let [e, t] of Object.entries(
|
|
11575
|
-
Ws(m,
|
|
11576
|
-
let
|
|
11577
|
-
for (;
|
|
11578
|
-
let t =
|
|
11638
|
+
let S = {};
|
|
11639
|
+
for (let [e, t] of Object.entries(_)) S[e] = ho(t.initial);
|
|
11640
|
+
Ws(m, _, S), Uo(m.nodes, m), a?.("hostAndNavigationMs");
|
|
11641
|
+
let C = [...m.nodes];
|
|
11642
|
+
for (; C.length && s.length < 100;) {
|
|
11643
|
+
let t = C.pop();
|
|
11579
11644
|
if (t.type === "math" || t.type === "inlineMath") {
|
|
11580
11645
|
let n = e.startsWith("\\\\[", t.range.start) ? 3 : t.type === "math" || e.startsWith("\\(", t.range.start) ? 2 : 1, r = t.range.start + n;
|
|
11581
11646
|
if (m.display) for (let e of m.display(t.value ?? "", t.type === "math")) Xa(m, e.code, e.message, r + e.start, r + e.end, {
|
|
11582
11647
|
key: e.messageKey,
|
|
11583
11648
|
params: e.params
|
|
11584
11649
|
});
|
|
11585
|
-
} else t.children &&
|
|
11650
|
+
} else t.children && C.push(...t.children);
|
|
11586
11651
|
}
|
|
11587
11652
|
if (a?.("mathDisplayMs"), s.sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end), s.some((e) => e.severity === "error")) return Vc({
|
|
11588
11653
|
ok: !1,
|
|
11589
11654
|
diagnostics: s
|
|
11590
11655
|
}, p);
|
|
11591
|
-
let
|
|
11656
|
+
let w = ks(m), T = Object.keys(m.computations), E = Object.keys(m.externals), D = Object.keys(m.dynamicConstraints).length ? m.dynamicConstraints : void 0, O = Bo(m.nodes, n.sdkByName), k = Vo(m, _), A = Ho(m), j = {
|
|
11592
11657
|
syntax: "local",
|
|
11593
11658
|
source: e,
|
|
11594
|
-
...n.config || !t?.hostComponents ? { componentConfigKey:
|
|
11595
|
-
syntaxVersion:
|
|
11659
|
+
...n.config || !t?.hostComponents ? { componentConfigKey: ce(n) } : {},
|
|
11660
|
+
syntaxVersion: be,
|
|
11596
11661
|
...f.versionDeclaration ? { versionDeclaration: f.versionDeclaration } : {},
|
|
11597
11662
|
nodes: Ns(m.nodes),
|
|
11598
11663
|
...h ? { capabilities: h } : {},
|
|
11599
|
-
initialState:
|
|
11600
|
-
bindings:
|
|
11664
|
+
initialState: S,
|
|
11665
|
+
bindings: _,
|
|
11601
11666
|
theme: f.theme ?? "default",
|
|
11602
11667
|
...f.themeRange ? { themeRange: f.themeRange } : {},
|
|
11603
|
-
...
|
|
11604
|
-
...
|
|
11605
|
-
...
|
|
11668
|
+
...w ? { bindingSlots: w } : {},
|
|
11669
|
+
...T.length ? { computations: m.computations } : {},
|
|
11670
|
+
...E.length ? { externals: m.externals } : {},
|
|
11606
11671
|
...D ? { dynamicConstraints: D } : {},
|
|
11607
|
-
...
|
|
11672
|
+
...b.length ? { validations: b } : {},
|
|
11608
11673
|
...O ? { extensions: O } : {},
|
|
11609
11674
|
kernel: k,
|
|
11610
11675
|
...A.length ? { componentDefinitions: Object.freeze(A) } : {}
|