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,21 +1,24 @@
|
|
|
1
1
|
import { a as e, i as t, r as n, s as r } from "./latex-1w7aQgD5.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { d as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { i as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
2
|
+
import { _ as i, a, c as o, d as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v } from "./document-theme-C8J6UyNO.js";
|
|
3
|
+
import { a as y, t as b } from "./compile-Dx6Uw3D9.js";
|
|
4
|
+
import { d as x } from "./compiler-core-DDDdvuLy.js";
|
|
5
|
+
import { g as S } from "./validation-B3RI0xOk.js";
|
|
6
|
+
import { t as C } from "./types-daDo2c_w.js";
|
|
7
|
+
import { c as ee } from "./config-DXLvctiZ.js";
|
|
8
|
+
import { t as te } from "./options-BBp9IcHm.js";
|
|
9
|
+
import { n as w, r as T, t as ne } from "./observability-core-Bcu7vpnl.js";
|
|
10
|
+
import { t as re } from "./compiler-dxLPB9Ym.js";
|
|
11
|
+
import { i as ie, n as ae, r as oe, t as se } from "./authoring-Ci_KzJ0q.js";
|
|
12
|
+
import { c as E } from "./schema-BryM_VRW.js";
|
|
13
|
+
import { n as D, t as ce } from "./incremental-9nx92u9c.js";
|
|
14
|
+
import { a as le, i as ue, n as de, o as fe, r as pe } from "./runtime-BpQdZmFI.js";
|
|
15
|
+
import { i as me } from "./identity-BUx0Q_-d.js";
|
|
16
|
+
import { i as he, n as ge, r as _e, t as ve } from "./sample-bP4zHB3L.js";
|
|
17
|
+
import { _ as ye, a as be, f as xe, g as Se, h as Ce, i as we, m as Te, n as Ee, p as De, r as Oe, t as ke, v as Ae, y as je } from "./shareable-B8xMoGEa.js";
|
|
18
|
+
import { n as O, t as Me } from "./observability-4KqXhIEU.js";
|
|
19
|
+
import { t as Ne } from "./component-state-BRwvTV0d.js";
|
|
17
20
|
// src/local/source/source-migration.ts
|
|
18
|
-
var
|
|
21
|
+
var Pe = /* @__PURE__ */ new Set([
|
|
19
22
|
"sum",
|
|
20
23
|
"average",
|
|
21
24
|
"minOf",
|
|
@@ -33,7 +36,7 @@ var E = /* @__PURE__ */ new Set([
|
|
|
33
36
|
"slice",
|
|
34
37
|
"dateCompare",
|
|
35
38
|
"dateDiff"
|
|
36
|
-
]),
|
|
39
|
+
]), Fe = /* @__PURE__ */ new Set([
|
|
37
40
|
"jump",
|
|
38
41
|
"anchor",
|
|
39
42
|
"text",
|
|
@@ -50,12 +53,12 @@ var E = /* @__PURE__ */ new Set([
|
|
|
50
53
|
"data-table",
|
|
51
54
|
"column",
|
|
52
55
|
"external"
|
|
53
|
-
]),
|
|
56
|
+
]), Ie = /* @__PURE__ */ new Set(["external"]), Le = /* @__PURE__ */ new Set([
|
|
54
57
|
"local-draft-1",
|
|
55
58
|
"local-draft-2",
|
|
56
|
-
|
|
57
|
-
]),
|
|
58
|
-
function
|
|
59
|
+
C
|
|
60
|
+
]), Re = `<!-- reactive-md: ${C} -->`;
|
|
61
|
+
function ze(e) {
|
|
59
62
|
let t = e.diagnostics.filter((t) => t.code.startsWith("local.version.") || t.code === "local.budget" || t.code === "local.parse" && !e.nodes.length), n = e.versionDeclaration?.version ?? null;
|
|
60
63
|
return {
|
|
61
64
|
declaredVersion: n,
|
|
@@ -65,27 +68,27 @@ function Ne(e) {
|
|
|
65
68
|
diagnostics: t
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
71
|
+
function Be(e) {
|
|
72
|
+
return ze(E(e));
|
|
70
73
|
}
|
|
71
|
-
function
|
|
72
|
-
let a =
|
|
74
|
+
function Ve(e, t, n, r, i = "error") {
|
|
75
|
+
let a = l(t, r), o = e.slice(0, n.start), s = o.lastIndexOf("\n");
|
|
73
76
|
return {
|
|
74
77
|
code: t,
|
|
75
78
|
severity: i,
|
|
76
79
|
range: { ...n },
|
|
77
|
-
message:
|
|
80
|
+
message: f(a),
|
|
78
81
|
line: o.split("\n").length,
|
|
79
82
|
column: n.start - s,
|
|
80
83
|
messageKey: a.key,
|
|
81
84
|
...a.params ? { params: a.params } : {}
|
|
82
85
|
};
|
|
83
86
|
}
|
|
84
|
-
function
|
|
85
|
-
let n =
|
|
87
|
+
function He(e, t = {}) {
|
|
88
|
+
let n = E(e), r = ze(n), i = typeof t == "object" && !!t && !Array.isArray(t), a = i ? t.fromVersion ?? r.effectiveVersion : r.effectiveVersion, o = typeof a == "string" ? a : "", s = {
|
|
86
89
|
ok: !1,
|
|
87
90
|
fromVersion: o,
|
|
88
|
-
toVersion:
|
|
91
|
+
toVersion: C,
|
|
89
92
|
needsMigration: !n.versionDeclaration || o !== "local-draft-3",
|
|
90
93
|
diagnostics: r.diagnostics.filter((e) => e.code !== "local.version.unsupported")
|
|
91
94
|
}, c = {
|
|
@@ -106,15 +109,15 @@ function Ie(e, t = {}) {
|
|
|
106
109
|
}
|
|
107
110
|
s.diagnostics.push(e);
|
|
108
111
|
}, d = (t, n, r, i) => {
|
|
109
|
-
u(
|
|
112
|
+
u(Ve(e, t, n, r, i));
|
|
110
113
|
};
|
|
111
|
-
if (!i || typeof a != "string" || !
|
|
114
|
+
if (!i || typeof a != "string" || !Le.has(o) || t.allowSemanticChanges !== void 0 && typeof t.allowSemanticChanges != "boolean" || t.fromVersion !== void 0 && r.declaredVersion !== null && o !== r.declaredVersion) return d("local.upgrade.from-version", l, {
|
|
112
115
|
from: o,
|
|
113
116
|
detail: "use local-draft-1, local-draft-2 or local-draft-3 and match the source declaration"
|
|
114
117
|
}), c;
|
|
115
|
-
let f = n.versionDeclaration ? e.slice(0, l.start) + e.slice(l.start, l.end).replace(/[^\r\n]/g, " ") + e.slice(l.end) : e, p = n.versionDeclaration ?
|
|
118
|
+
let f = n.versionDeclaration ? e.slice(0, l.start) + e.slice(l.start, l.end).replace(/[^\r\n]/g, " ") + e.slice(l.end) : e, p = n.versionDeclaration ? E(f) : n;
|
|
116
119
|
if (o === "local-draft-1" || o === "local-draft-2") {
|
|
117
|
-
let e = o === "local-draft-1" ?
|
|
120
|
+
let e = o === "local-draft-1" ? Fe : Ie, n = (r) => {
|
|
118
121
|
for (let i of r) if (i.name && e.has(i.name)) d("local.upgrade.tag", i.range, { name: i.name });
|
|
119
122
|
else {
|
|
120
123
|
if (o === "local-draft-1") {
|
|
@@ -126,13 +129,13 @@ function Ie(e, t = {}) {
|
|
|
126
129
|
"bind-y"
|
|
127
130
|
]) {
|
|
128
131
|
let t = i.attrs?.[e];
|
|
129
|
-
t &&
|
|
132
|
+
t && Pe.has(t) && d("local.upgrade.reserved-binding", i.range, { name: t });
|
|
130
133
|
}
|
|
131
134
|
(i.name === "input" || i.name === "textarea") && (i.attrs?.["max-length"] !== void 0 || Number(i.attrs?.["min-length"] ?? 0) > 0) && d("local.upgrade.text-length", i.range, void 0, t.allowSemanticChanges ? "warning" : "error");
|
|
132
135
|
let e = [...i.type === "interpolation" ? [i.value ?? ""] : [], ...Object.values(i.attrs ?? {}).flatMap((e) => [...e.matchAll(/\{\{([\s\S]*?)\}\}/g)].map((e) => e[1]))];
|
|
133
136
|
for (let t of e) {
|
|
134
137
|
let e = t.replace(/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g, "");
|
|
135
|
-
(e.includes("[") || [...
|
|
138
|
+
(e.includes("[") || [...Pe].some((t) => RegExp(`\\b${t}\\s*\\(`).test(e))) && d("local.upgrade.expression", i.range);
|
|
136
139
|
}
|
|
137
140
|
}
|
|
138
141
|
i.type !== "fallback" && i.children && n(i.children);
|
|
@@ -141,18 +144,18 @@ function Ie(e, t = {}) {
|
|
|
141
144
|
n(p.nodes);
|
|
142
145
|
}
|
|
143
146
|
if (s.diagnostics.some((e) => e.severity === "error")) return c;
|
|
144
|
-
let m =
|
|
147
|
+
let m = re(f);
|
|
145
148
|
for (let e of m.diagnostics) u(e);
|
|
146
149
|
return m.ok && (!n.versionDeclaration && s.diagnostics.length < 100 && d("local.upgrade.version-missing", {
|
|
147
150
|
start: +(e.charCodeAt(0) === 65279),
|
|
148
151
|
end: +(e.charCodeAt(0) === 65279)
|
|
149
|
-
}, { version:
|
|
152
|
+
}, { version: C }, "warning"), s.ok = !0), c;
|
|
150
153
|
}
|
|
151
|
-
function
|
|
152
|
-
return
|
|
154
|
+
function Ue(e, t) {
|
|
155
|
+
return He(e, t).report;
|
|
153
156
|
}
|
|
154
|
-
function
|
|
155
|
-
let { report: n, declaration: r } =
|
|
157
|
+
function We(e, t) {
|
|
158
|
+
let { report: n, declaration: r } = He(e, t), i = {
|
|
156
159
|
...n,
|
|
157
160
|
source: e,
|
|
158
161
|
changed: !1,
|
|
@@ -162,7 +165,7 @@ function Re(e, t) {
|
|
|
162
165
|
let a = +(e.charCodeAt(0) === 65279), o = r?.range ?? {
|
|
163
166
|
start: a,
|
|
164
167
|
end: a
|
|
165
|
-
}, s = e.includes("\r\n") ? "\r\n" : "\n", c = r ?
|
|
168
|
+
}, s = e.includes("\r\n") ? "\r\n" : "\n", c = r ? Re : `${Re}${s}${s}`, l = e.slice(0, o.start) + c + e.slice(o.end);
|
|
166
169
|
return {
|
|
167
170
|
...n,
|
|
168
171
|
source: l,
|
|
@@ -174,7 +177,7 @@ function Re(e, t) {
|
|
|
174
177
|
};
|
|
175
178
|
}
|
|
176
179
|
// src/local/transport/compile-patch.ts
|
|
177
|
-
var
|
|
180
|
+
var k = "patch-v1", Ge = 1, Ke = 4096, A = [
|
|
178
181
|
"initialState",
|
|
179
182
|
"bindings",
|
|
180
183
|
"bindingSlots",
|
|
@@ -182,16 +185,16 @@ var D = "patch-v1", O = 1, ze = 4096, k = [
|
|
|
182
185
|
"dependencies",
|
|
183
186
|
"tableShapes"
|
|
184
187
|
];
|
|
185
|
-
function
|
|
188
|
+
function j(e) {
|
|
186
189
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
187
190
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
191
|
+
function M(e) {
|
|
192
|
+
return j(e) && typeof e.start == "number" && Number.isFinite(e.start) && typeof e.end == "number" && Number.isFinite(e.end);
|
|
190
193
|
}
|
|
191
|
-
function
|
|
194
|
+
function N() {
|
|
192
195
|
throw TypeError("Invalid local compile result patch");
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function P(e, t) {
|
|
195
198
|
if (e === t) return !0;
|
|
196
199
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
197
200
|
let n = Array.isArray(e);
|
|
@@ -199,18 +202,18 @@ function N(e, t) {
|
|
|
199
202
|
if (n) {
|
|
200
203
|
let n = e, r = t;
|
|
201
204
|
if (n.length !== r.length) return !1;
|
|
202
|
-
for (let e = 0; e < n.length; e += 1) if (!
|
|
205
|
+
for (let e = 0; e < n.length; e += 1) if (!P(n[e], r[e])) return !1;
|
|
203
206
|
return !0;
|
|
204
207
|
}
|
|
205
208
|
let r = e, i = t, a = Object.keys(r);
|
|
206
209
|
if (a.length !== Object.keys(i).length) return !1;
|
|
207
|
-
for (let e of a) if (!Object.hasOwn(i, e) || !
|
|
210
|
+
for (let e of a) if (!Object.hasOwn(i, e) || !P(r[e], i[e])) return !1;
|
|
208
211
|
return !0;
|
|
209
212
|
}
|
|
210
|
-
function
|
|
211
|
-
return
|
|
213
|
+
function F(e) {
|
|
214
|
+
return x(e, !1);
|
|
212
215
|
}
|
|
213
|
-
function
|
|
216
|
+
function I(e, t) {
|
|
214
217
|
if (typeof e != "string" || typeof t != "string" || e === t) return null;
|
|
215
218
|
let n = Math.min(e.length, t.length), r = 0;
|
|
216
219
|
for (; r < n && e.charCodeAt(r) === t.charCodeAt(r);) r += 1;
|
|
@@ -222,8 +225,8 @@ function F(e, t) {
|
|
|
222
225
|
insert: t.slice(r, a)
|
|
223
226
|
};
|
|
224
227
|
}
|
|
225
|
-
function
|
|
226
|
-
if (!
|
|
228
|
+
function L(e) {
|
|
229
|
+
if (!j(e)) return null;
|
|
227
230
|
let { from: t, to: n, insert: r } = e;
|
|
228
231
|
return typeof t != "number" || !Number.isSafeInteger(t) || typeof n != "number" || !Number.isSafeInteger(n) || typeof r != "string" || t < 0 || n < t ? null : {
|
|
229
232
|
from: t,
|
|
@@ -231,62 +234,62 @@ function Be(e) {
|
|
|
231
234
|
insert: r
|
|
232
235
|
};
|
|
233
236
|
}
|
|
234
|
-
function
|
|
235
|
-
let n =
|
|
237
|
+
function qe(e, t) {
|
|
238
|
+
let n = L(t);
|
|
236
239
|
return n === null || typeof e != "string" || n.to > e.length ? null : e.slice(0, n.from) + n.insert + e.slice(n.to);
|
|
237
240
|
}
|
|
238
|
-
function
|
|
241
|
+
function R(e) {
|
|
239
242
|
let t = {};
|
|
240
243
|
for (let [n, r] of Object.entries(e)) n !== "children" && (t[n] = r);
|
|
241
244
|
return t;
|
|
242
245
|
}
|
|
243
|
-
function
|
|
246
|
+
function Je(e, t) {
|
|
244
247
|
let n = Object.keys(e).filter((e) => e !== "children"), r = Object.keys(t).filter((e) => e !== "children");
|
|
245
248
|
if (n.length !== r.length) return !1;
|
|
246
|
-
for (let r of n) if (!Object.hasOwn(t, r) || !
|
|
249
|
+
for (let r of n) if (!Object.hasOwn(t, r) || !P(e[r], t[r])) return !1;
|
|
247
250
|
return !0;
|
|
248
251
|
}
|
|
249
|
-
function
|
|
252
|
+
function z(e) {
|
|
250
253
|
return e.children === void 0 ? void 0 : e.children.map((e) => e.id);
|
|
251
254
|
}
|
|
252
|
-
function
|
|
253
|
-
let n =
|
|
255
|
+
function Ye(e, t) {
|
|
256
|
+
let n = z(e), r = z(t);
|
|
254
257
|
if (n === void 0 || r === void 0) return n === r;
|
|
255
258
|
if (n.length !== r.length) return !1;
|
|
256
259
|
for (let e = 0; e < n.length; e += 1) if (n[e] !== r[e]) return !1;
|
|
257
260
|
return !0;
|
|
258
261
|
}
|
|
259
|
-
function
|
|
260
|
-
if (!
|
|
262
|
+
function Xe(e, t) {
|
|
263
|
+
if (!Je(e, t) || !Ye(e, t)) return !1;
|
|
261
264
|
if (!e.children || !t.children) return !0;
|
|
262
|
-
for (let n = 0; n < e.children.length; n += 1) if (!
|
|
265
|
+
for (let n = 0; n < e.children.length; n += 1) if (!Xe(e.children[n], t.children[n])) return !1;
|
|
263
266
|
return !0;
|
|
264
267
|
}
|
|
265
|
-
function
|
|
268
|
+
function Ze(e, t) {
|
|
266
269
|
let n = Object.keys(e).filter((e) => e !== "children" && e !== "range"), r = Object.keys(t).filter((e) => e !== "children" && e !== "range");
|
|
267
270
|
if (n.length !== r.length) return null;
|
|
268
|
-
for (let r of n) if (!Object.hasOwn(t, r) || !
|
|
269
|
-
if (!
|
|
271
|
+
for (let r of n) if (!Object.hasOwn(t, r) || !P(e[r], t[r])) return null;
|
|
272
|
+
if (!M(e.range) || !M(t.range)) return null;
|
|
270
273
|
let i = e.range.start - t.range.start;
|
|
271
274
|
if (e.range.end !== t.range.end + i) return null;
|
|
272
|
-
let a =
|
|
275
|
+
let a = z(e), o = z(t);
|
|
273
276
|
if (a === void 0 || o === void 0) {
|
|
274
277
|
if (a !== o) return null;
|
|
275
278
|
} else {
|
|
276
279
|
if (a.length !== o.length) return null;
|
|
277
|
-
for (let n = 0; n < a.length; n += 1) if (a[n] !== o[n] ||
|
|
280
|
+
for (let n = 0; n < a.length; n += 1) if (a[n] !== o[n] || Ze(e.children[n], t.children[n]) !== i) return null;
|
|
278
281
|
}
|
|
279
282
|
return i;
|
|
280
283
|
}
|
|
281
|
-
function
|
|
284
|
+
function Qe(e, t) {
|
|
282
285
|
let n = Object.keys(e).filter((e) => e !== "children" && e !== "range"), r = Object.keys(t).filter((e) => e !== "children" && e !== "range");
|
|
283
286
|
if (n.length !== r.length) return null;
|
|
284
|
-
for (let r of n) if (!Object.hasOwn(t, r) || !
|
|
285
|
-
if (!
|
|
287
|
+
for (let r of n) if (!Object.hasOwn(t, r) || !P(e[r], t[r])) return null;
|
|
288
|
+
if (!M(e.range) || !M(t.range)) return null;
|
|
286
289
|
let i = e.range.start - t.range.start;
|
|
287
290
|
return e.range.end === t.range.end + i ? i : null;
|
|
288
291
|
}
|
|
289
|
-
function
|
|
292
|
+
function B(e) {
|
|
290
293
|
let t = /* @__PURE__ */ new Map(), n = [...e].reverse();
|
|
291
294
|
for (; n.length > 0;) {
|
|
292
295
|
let e = n.pop();
|
|
@@ -294,8 +297,8 @@ function Ge(e) {
|
|
|
294
297
|
}
|
|
295
298
|
return t;
|
|
296
299
|
}
|
|
297
|
-
function
|
|
298
|
-
if (t !== void 0 &&
|
|
300
|
+
function $e(e, t, n, r) {
|
|
301
|
+
if (t !== void 0 && Xe(e, t)) return;
|
|
299
302
|
if (t === void 0) {
|
|
300
303
|
r.push({
|
|
301
304
|
id: e.id,
|
|
@@ -303,7 +306,7 @@ function Ke(e, t, n, r) {
|
|
|
303
306
|
});
|
|
304
307
|
return;
|
|
305
308
|
}
|
|
306
|
-
let i =
|
|
309
|
+
let i = Ze(e, t);
|
|
307
310
|
if (i !== null) {
|
|
308
311
|
i !== 0 && r.push({
|
|
309
312
|
id: e.id,
|
|
@@ -313,27 +316,27 @@ function Ke(e, t, n, r) {
|
|
|
313
316
|
return;
|
|
314
317
|
}
|
|
315
318
|
let a = { id: e.id };
|
|
316
|
-
if (!
|
|
317
|
-
let n =
|
|
318
|
-
n !== null && n !== 0 ? a.shift = n : a.data =
|
|
319
|
+
if (!Je(e, t)) {
|
|
320
|
+
let n = Qe(e, t);
|
|
321
|
+
n !== null && n !== 0 ? a.shift = n : a.data = R(e);
|
|
319
322
|
}
|
|
320
|
-
|
|
323
|
+
Ye(e, t) || (a.children = e.children === void 0 ? null : e.children.map((e) => e.id));
|
|
321
324
|
let o = r.length;
|
|
322
|
-
if (e.children) for (let t of e.children)
|
|
325
|
+
if (e.children) for (let t of e.children) $e(t, n.get(t.id), n, r);
|
|
323
326
|
Object.keys(a).length > 1 ? r.splice(o, 0, a) : r.length > o && r.splice(o, 0, { id: e.id });
|
|
324
327
|
}
|
|
325
|
-
function
|
|
326
|
-
if (!
|
|
328
|
+
function et(e, t) {
|
|
329
|
+
if (!j(e)) return { set: t };
|
|
327
330
|
let n = {}, r = [];
|
|
328
|
-
for (let [r, i] of Object.entries(t)) Object.hasOwn(e, r) &&
|
|
331
|
+
for (let [r, i] of Object.entries(t)) Object.hasOwn(e, r) && P(e[r], i) || (n[r] = i);
|
|
329
332
|
for (let n of Object.keys(e)) Object.hasOwn(t, n) || r.push(n);
|
|
330
333
|
return Object.keys(n).length === 0 && r.length === 0 ? null : {
|
|
331
334
|
...Object.keys(n).length === 0 ? {} : { set: n },
|
|
332
335
|
...r.length === 0 ? {} : { remove: r }
|
|
333
336
|
};
|
|
334
337
|
}
|
|
335
|
-
var
|
|
336
|
-
function
|
|
338
|
+
var tt = /* @__PURE__ */ new WeakMap();
|
|
339
|
+
function nt(e) {
|
|
337
340
|
let t = 2;
|
|
338
341
|
for (let n = 0; n < e.length; n++) {
|
|
339
342
|
let r = e.charCodeAt(n);
|
|
@@ -348,14 +351,14 @@ function Ye(e) {
|
|
|
348
351
|
}
|
|
349
352
|
return t;
|
|
350
353
|
}
|
|
351
|
-
function
|
|
354
|
+
function V(e, t) {
|
|
352
355
|
if (e === null) return {
|
|
353
356
|
bytes: 4,
|
|
354
357
|
nodes: 0
|
|
355
358
|
};
|
|
356
359
|
let n = typeof e;
|
|
357
360
|
if (n === "string") return {
|
|
358
|
-
bytes:
|
|
361
|
+
bytes: nt(e),
|
|
359
362
|
nodes: 0
|
|
360
363
|
};
|
|
361
364
|
if (n === "number") return {
|
|
@@ -370,19 +373,19 @@ function B(e, t) {
|
|
|
370
373
|
bytes: 0,
|
|
371
374
|
nodes: 0
|
|
372
375
|
};
|
|
373
|
-
let r = e, i =
|
|
376
|
+
let r = e, i = tt.get(r);
|
|
374
377
|
if (i !== void 0) return i;
|
|
375
378
|
if (t.has(r)) return {
|
|
376
379
|
bytes: 0,
|
|
377
380
|
nodes: 0
|
|
378
381
|
};
|
|
379
382
|
t.add(r);
|
|
380
|
-
let a, o = +!!
|
|
383
|
+
let a, o = +!!lt(e);
|
|
381
384
|
if (Array.isArray(e)) {
|
|
382
385
|
a = 2;
|
|
383
386
|
for (let n = 0; n < e.length; n += 1) {
|
|
384
387
|
n > 0 && (a += 1);
|
|
385
|
-
let r =
|
|
388
|
+
let r = V(e[n], t);
|
|
386
389
|
a += r.bytes || 4, o += r.nodes;
|
|
387
390
|
}
|
|
388
391
|
} else {
|
|
@@ -392,8 +395,8 @@ function B(e, t) {
|
|
|
392
395
|
if (!Object.hasOwn(r, n)) continue;
|
|
393
396
|
let i = r[n];
|
|
394
397
|
if (i === void 0) continue;
|
|
395
|
-
e > 0 && (a += 1), e += 1, a +=
|
|
396
|
-
let s =
|
|
398
|
+
e > 0 && (a += 1), e += 1, a += nt(n) + 1;
|
|
399
|
+
let s = V(i, t);
|
|
397
400
|
a += s.bytes, o += s.nodes;
|
|
398
401
|
}
|
|
399
402
|
}
|
|
@@ -402,20 +405,20 @@ function B(e, t) {
|
|
|
402
405
|
bytes: a,
|
|
403
406
|
nodes: o
|
|
404
407
|
};
|
|
405
|
-
return
|
|
408
|
+
return tt.set(r, s), s;
|
|
406
409
|
}
|
|
407
|
-
function
|
|
410
|
+
function rt(e, t) {
|
|
408
411
|
let n = e.document.nodes ?? [];
|
|
409
412
|
try {
|
|
410
|
-
let r =
|
|
411
|
-
if (r.bytes <= Math.max(i,
|
|
413
|
+
let r = V(e, /* @__PURE__ */ new Set()), i = t.ok && typeof t.document.source == "string" ? t.document.source.length : 0;
|
|
414
|
+
if (r.bytes <= Math.max(i, Ke)) return {
|
|
412
415
|
patchBytes: r.bytes,
|
|
413
416
|
patchNodes: n.length,
|
|
414
417
|
preferFull: !1
|
|
415
418
|
};
|
|
416
|
-
let a =
|
|
417
|
-
for (let e of n) e.node === void 0 ? e.data !== void 0 && (o += 1) : o +=
|
|
418
|
-
let s = r.bytes *
|
|
419
|
+
let a = V(t, /* @__PURE__ */ new Set()), o = 0;
|
|
420
|
+
for (let e of n) e.node === void 0 ? e.data !== void 0 && (o += 1) : o += V(e.node, /* @__PURE__ */ new Set()).nodes;
|
|
421
|
+
let s = r.bytes * Ge >= a.bytes, c = a.nodes > 0 && o * Ge >= a.nodes;
|
|
419
422
|
return {
|
|
420
423
|
patchBytes: r.bytes,
|
|
421
424
|
fullBytes: a.bytes,
|
|
@@ -432,55 +435,55 @@ function Xe(e, t) {
|
|
|
432
435
|
};
|
|
433
436
|
}
|
|
434
437
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
438
|
+
function it(e, t) {
|
|
439
|
+
return st(e, t);
|
|
437
440
|
}
|
|
438
|
-
function
|
|
439
|
-
let n =
|
|
441
|
+
function at(e, t) {
|
|
442
|
+
let n = st(e, t);
|
|
440
443
|
return n ? {
|
|
441
444
|
patch: n,
|
|
442
|
-
cost:
|
|
445
|
+
cost: rt(n, t)
|
|
443
446
|
} : null;
|
|
444
447
|
}
|
|
445
|
-
function
|
|
448
|
+
function ot(e, t) {
|
|
446
449
|
let n = e.recoveries, r = t.recoveries;
|
|
447
|
-
return n === void 0 ? r === void 0 ? {} : { recoveries: r } : r !== void 0 &&
|
|
450
|
+
return n === void 0 ? r === void 0 ? {} : { recoveries: r } : r !== void 0 && P(n, r) ? {} : { recoveries: r === void 0 ? null : r };
|
|
448
451
|
}
|
|
449
|
-
function
|
|
452
|
+
function st(e, t) {
|
|
450
453
|
try {
|
|
451
454
|
if (!e.ok || !t.ok) return null;
|
|
452
455
|
let n = e.document, r = t.document;
|
|
453
|
-
if (!
|
|
456
|
+
if (!j(n) || !j(r)) return null;
|
|
454
457
|
let i = {};
|
|
455
458
|
if (typeof n.source == "string" && typeof r.source == "string") {
|
|
456
|
-
let e =
|
|
459
|
+
let e = I(n.source, r.source);
|
|
457
460
|
e !== null && (i.source = e);
|
|
458
461
|
} else if (n.source !== r.source) return null;
|
|
459
|
-
let a = [], o = {}, s = {}, c = new Set(
|
|
462
|
+
let a = [], o = {}, s = {}, c = new Set(A), l = /* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)]);
|
|
460
463
|
for (let e of l) {
|
|
461
464
|
if (e === "source" || e === "nodes" || c.has(e)) continue;
|
|
462
465
|
let t = Object.hasOwn(r, e) && r[e] !== void 0, i = Object.hasOwn(n, e) && n[e] !== void 0;
|
|
463
|
-
t ? i &&
|
|
466
|
+
t ? i && P(n[e], r[e]) || (o[e] = r[e]) : i && a.push(e);
|
|
464
467
|
}
|
|
465
|
-
for (let e of
|
|
468
|
+
for (let e of A) {
|
|
466
469
|
let t = Object.hasOwn(r, e) && r[e] !== void 0, i = Object.hasOwn(n, e) && n[e] !== void 0, c = i ? n[e] : void 0, l = t ? r[e] : void 0;
|
|
467
470
|
if (!t) {
|
|
468
471
|
i && a.push(e);
|
|
469
472
|
continue;
|
|
470
473
|
}
|
|
471
|
-
if (!
|
|
472
|
-
i &&
|
|
474
|
+
if (!j(l)) {
|
|
475
|
+
i && P(c, l) || (o[e] = l);
|
|
473
476
|
continue;
|
|
474
477
|
}
|
|
475
478
|
if (!i) {
|
|
476
479
|
s[e] = { set: l };
|
|
477
480
|
continue;
|
|
478
481
|
}
|
|
479
|
-
if (!
|
|
482
|
+
if (!j(c)) {
|
|
480
483
|
o[e] = l;
|
|
481
484
|
continue;
|
|
482
485
|
}
|
|
483
|
-
let u =
|
|
486
|
+
let u = et(c, l);
|
|
484
487
|
u !== null && (s[e] = u);
|
|
485
488
|
}
|
|
486
489
|
let u = Array.isArray(n.nodes) ? n.nodes : [], d = Array.isArray(r.nodes) ? r.nodes : [], f = u.map((e) => e.id), p = d.map((e) => e.id), m = f.length !== p.length;
|
|
@@ -490,55 +493,55 @@ function et(e, t) {
|
|
|
490
493
|
break;
|
|
491
494
|
}
|
|
492
495
|
}
|
|
493
|
-
let h = [], g =
|
|
494
|
-
for (let e of d)
|
|
496
|
+
let h = [], g = B(u);
|
|
497
|
+
for (let e of d) $e(e, g.get(e.id), g, h);
|
|
495
498
|
return m && (i.roots = p), h.length > 0 && (i.nodes = h), a.length > 0 && (i.removed = a), Object.keys(o).length > 0 && (i.values = o), Object.keys(s).length > 0 && (i.records = s), {
|
|
496
499
|
kind: "result-patch",
|
|
497
|
-
protocol:
|
|
500
|
+
protocol: k,
|
|
498
501
|
document: i,
|
|
499
|
-
...
|
|
500
|
-
|
|
502
|
+
...P(e.diagnostics, t.diagnostics) ? {} : { diagnostics: t.diagnostics },
|
|
503
|
+
...ot(e, t)
|
|
501
504
|
};
|
|
502
505
|
} catch {
|
|
503
506
|
return null;
|
|
504
507
|
}
|
|
505
508
|
}
|
|
506
|
-
function
|
|
507
|
-
let n =
|
|
508
|
-
return
|
|
509
|
+
function ct(e, t) {
|
|
510
|
+
let n = R(e);
|
|
511
|
+
return M(n.range) || N(), n.range = {
|
|
509
512
|
start: n.range.start + t,
|
|
510
513
|
end: n.range.end + t
|
|
511
|
-
}, e.children && (n.children = e.children.map((e) =>
|
|
514
|
+
}, e.children && (n.children = e.children.map((e) => ct(e, t))), n;
|
|
512
515
|
}
|
|
513
|
-
function
|
|
514
|
-
return
|
|
516
|
+
function lt(e) {
|
|
517
|
+
return j(e) && typeof e.id == "string" && typeof e.type == "string" && M(e.range);
|
|
515
518
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
519
|
+
function ut(e, t) {
|
|
520
|
+
j(t) || N(), t.set !== void 0 && !j(t.set) && N(), t.remove !== void 0 && !Array.isArray(t.remove) && N();
|
|
518
521
|
let n = {};
|
|
519
|
-
if (
|
|
522
|
+
if (j(e)) for (let [t, r] of Object.entries(e)) Object.defineProperty(n, t, {
|
|
520
523
|
value: r,
|
|
521
524
|
enumerable: !0,
|
|
522
525
|
configurable: !0,
|
|
523
526
|
writable: !0
|
|
524
527
|
});
|
|
525
|
-
else e !== void 0 &&
|
|
528
|
+
else e !== void 0 && N();
|
|
526
529
|
if (t.set) for (let [e, r] of Object.entries(t.set)) Object.defineProperty(n, e, {
|
|
527
|
-
value:
|
|
530
|
+
value: F(r),
|
|
528
531
|
enumerable: !0,
|
|
529
532
|
configurable: !0,
|
|
530
533
|
writable: !0
|
|
531
534
|
});
|
|
532
|
-
if (t.remove) for (let e of t.remove) typeof e != "string" &&
|
|
535
|
+
if (t.remove) for (let e of t.remove) typeof e != "string" && N(), delete n[e];
|
|
533
536
|
return n;
|
|
534
537
|
}
|
|
535
|
-
function
|
|
538
|
+
function dt(e, t) {
|
|
536
539
|
try {
|
|
537
|
-
if (!e.ok || !
|
|
540
|
+
if (!e.ok || !j(t) || t.kind !== "result-patch" || t.protocol !== "patch-v1") return null;
|
|
538
541
|
let n = t.document;
|
|
539
|
-
if (!
|
|
542
|
+
if (!j(n)) return null;
|
|
540
543
|
let r = e.document;
|
|
541
|
-
if (!
|
|
544
|
+
if (!j(r)) return null;
|
|
542
545
|
let i = {};
|
|
543
546
|
for (let [e, t] of Object.entries(r)) Object.defineProperty(i, e, {
|
|
544
547
|
value: t,
|
|
@@ -554,11 +557,11 @@ function it(e, t) {
|
|
|
554
557
|
}
|
|
555
558
|
}
|
|
556
559
|
if (n.values !== void 0) {
|
|
557
|
-
if (!
|
|
560
|
+
if (!j(n.values)) return null;
|
|
558
561
|
for (let [e, t] of Object.entries(n.values)) {
|
|
559
562
|
if (e === "nodes" || e === "source") return null;
|
|
560
563
|
Object.defineProperty(i, e, {
|
|
561
|
-
value:
|
|
564
|
+
value: F(t),
|
|
562
565
|
enumerable: !0,
|
|
563
566
|
configurable: !0,
|
|
564
567
|
writable: !0
|
|
@@ -566,28 +569,28 @@ function it(e, t) {
|
|
|
566
569
|
}
|
|
567
570
|
}
|
|
568
571
|
if (n.records !== void 0) {
|
|
569
|
-
if (!
|
|
572
|
+
if (!j(n.records)) return null;
|
|
570
573
|
for (let e of Object.keys(n.records)) {
|
|
571
|
-
if (!
|
|
574
|
+
if (!A.includes(e)) return null;
|
|
572
575
|
let t = n.records[e];
|
|
573
|
-
t !== void 0 && (i[e] =
|
|
576
|
+
t !== void 0 && (i[e] = ut(r[e], t));
|
|
574
577
|
}
|
|
575
578
|
}
|
|
576
579
|
let a = typeof r.source == "string" ? r.source : null;
|
|
577
580
|
if (a === null) return null;
|
|
578
581
|
if (n.source !== void 0) {
|
|
579
|
-
let e =
|
|
582
|
+
let e = L(n.source);
|
|
580
583
|
if (e === null) return null;
|
|
581
|
-
let t =
|
|
584
|
+
let t = qe(a, e);
|
|
582
585
|
if (t === null) return null;
|
|
583
586
|
a = t;
|
|
584
587
|
}
|
|
585
588
|
i.source = a;
|
|
586
|
-
let o = Array.isArray(r.nodes) ? r.nodes : [], s =
|
|
589
|
+
let o = Array.isArray(r.nodes) ? r.nodes : [], s = B(o), c = /* @__PURE__ */ new Map();
|
|
587
590
|
if (n.nodes !== void 0) {
|
|
588
591
|
if (!Array.isArray(n.nodes)) return null;
|
|
589
592
|
for (let e of n.nodes) {
|
|
590
|
-
if (!
|
|
593
|
+
if (!j(e) || typeof e.id != "string" || c.has(e.id)) return null;
|
|
591
594
|
c.set(e.id, e);
|
|
592
595
|
}
|
|
593
596
|
}
|
|
@@ -603,23 +606,23 @@ function it(e, t) {
|
|
|
603
606
|
let u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set(), f = (e) => {
|
|
604
607
|
let t = u.get(e);
|
|
605
608
|
if (t !== void 0) return t;
|
|
606
|
-
d.has(e) &&
|
|
609
|
+
d.has(e) && N();
|
|
607
610
|
let n = c.get(e), r = s.get(e);
|
|
608
|
-
if (n === void 0) return r === void 0 &&
|
|
609
|
-
if (
|
|
610
|
-
(n.data !== void 0 || n.children !== void 0 || n.shift !== void 0 || n.subtree) &&
|
|
611
|
-
let t =
|
|
611
|
+
if (n === void 0) return r === void 0 && N(), u.set(e, r), r;
|
|
612
|
+
if (j(n) || N(), n.node !== void 0) {
|
|
613
|
+
(n.data !== void 0 || n.children !== void 0 || n.shift !== void 0 || n.subtree) && N(), lt(n.node) && n.node.id === e || N();
|
|
614
|
+
let t = F(n.node);
|
|
612
615
|
return u.set(e, t), t;
|
|
613
616
|
}
|
|
614
|
-
r === void 0 && n.data === void 0 &&
|
|
617
|
+
r === void 0 && n.data === void 0 && N(), n.subtree !== void 0 && n.subtree !== !0 && N(), n.shift !== void 0 && !Number.isSafeInteger(n.shift) && N(), n.data !== void 0 && n.shift !== void 0 && N(), n.children !== void 0 && n.children !== null && (!Array.isArray(n.children) || n.children.some((e) => typeof e != "string")) && N(), d.add(e);
|
|
615
618
|
let i;
|
|
616
|
-
if (n.subtree === !0) (r === void 0 || n.shift === void 0 || n.data !== void 0 || n.children !== void 0) &&
|
|
619
|
+
if (n.subtree === !0) (r === void 0 || n.shift === void 0 || n.data !== void 0 || n.children !== void 0) && N(), i = ct(r, n.shift);
|
|
617
620
|
else {
|
|
618
621
|
let t;
|
|
619
|
-
n.data === void 0 ? (r === void 0 &&
|
|
622
|
+
n.data === void 0 ? (r === void 0 && N(), t = R(r), n.shift !== void 0 && (M(t.range) || N(), t.range = {
|
|
620
623
|
start: t.range.start + n.shift,
|
|
621
624
|
end: t.range.end + n.shift
|
|
622
|
-
})) : (
|
|
625
|
+
})) : (j(n.data) || N(), t = F(n.data), delete t.children, t.id !== e && N());
|
|
623
626
|
let a;
|
|
624
627
|
if (n.children !== void 0) a = n.children === null ? null : [...n.children];
|
|
625
628
|
else {
|
|
@@ -631,7 +634,7 @@ function it(e, t) {
|
|
|
631
634
|
return d.delete(e), u.set(e, i), i;
|
|
632
635
|
}, p = l.map(f);
|
|
633
636
|
i.nodes = n.roots === void 0 && n.nodes === void 0 ? r.nodes : p;
|
|
634
|
-
let m = t.diagnostics === void 0 ? e.diagnostics : Array.isArray(t.diagnostics) ?
|
|
637
|
+
let m = t.diagnostics === void 0 ? e.diagnostics : Array.isArray(t.diagnostics) ? F(t.diagnostics) : N();
|
|
635
638
|
if (t.recoveries !== void 0 && t.recoveries !== null && !Array.isArray(t.recoveries)) return null;
|
|
636
639
|
let h = e.status === void 0 ? {} : { status: e.status };
|
|
637
640
|
if (t.recoveries === null) return {
|
|
@@ -640,7 +643,7 @@ function it(e, t) {
|
|
|
640
643
|
diagnostics: m,
|
|
641
644
|
...h
|
|
642
645
|
};
|
|
643
|
-
let g = t.recoveries === void 0 ? e.recoveries :
|
|
646
|
+
let g = t.recoveries === void 0 ? e.recoveries : F([...t.recoveries]);
|
|
644
647
|
return {
|
|
645
648
|
ok: !0,
|
|
646
649
|
document: i,
|
|
@@ -653,8 +656,8 @@ function it(e, t) {
|
|
|
653
656
|
}
|
|
654
657
|
}
|
|
655
658
|
// src/local/transport/flat-compiled-data.ts
|
|
656
|
-
var
|
|
657
|
-
function
|
|
659
|
+
var H = "flat-v1";
|
|
660
|
+
function ft(e) {
|
|
658
661
|
if (!e.ok) return !1;
|
|
659
662
|
let t = e.document.nodes.map((e) => ({
|
|
660
663
|
node: e,
|
|
@@ -670,7 +673,7 @@ function at(e) {
|
|
|
670
673
|
}
|
|
671
674
|
return !1;
|
|
672
675
|
}
|
|
673
|
-
function
|
|
676
|
+
function pt(e) {
|
|
674
677
|
let t = [], n = /* @__PURE__ */ new Map(), r = [], i = (e) => {
|
|
675
678
|
if (typeof e == "object" && e) {
|
|
676
679
|
let i = n.get(e);
|
|
@@ -699,11 +702,11 @@ function ot(e) {
|
|
|
699
702
|
for (let t of Object.keys(e)) n.push([t, i(e[t])]);
|
|
700
703
|
}
|
|
701
704
|
return {
|
|
702
|
-
version:
|
|
705
|
+
version: H,
|
|
703
706
|
records: t
|
|
704
707
|
};
|
|
705
708
|
}
|
|
706
|
-
function
|
|
709
|
+
function mt(e) {
|
|
707
710
|
if (!e || typeof e != "object") return null;
|
|
708
711
|
let t = e;
|
|
709
712
|
if (t.version !== "flat-v1" || !Array.isArray(t.records) || t.records.length === 0 || t.records.length > 2e6) return null;
|
|
@@ -763,21 +766,21 @@ function st(e) {
|
|
|
763
766
|
return r[0];
|
|
764
767
|
}
|
|
765
768
|
// src/local/transport/worker-job.ts
|
|
766
|
-
var
|
|
769
|
+
var ht = 150, gt = 200, _t = [
|
|
767
770
|
"maxSyntaxNodes",
|
|
768
771
|
"maxParseWork",
|
|
769
772
|
"maxMarkdownDepth"
|
|
770
773
|
];
|
|
771
|
-
function
|
|
774
|
+
function U(e) {
|
|
772
775
|
return e instanceof Error ? e.message : String(e);
|
|
773
776
|
}
|
|
774
|
-
function
|
|
777
|
+
function W() {
|
|
775
778
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
776
779
|
}
|
|
777
|
-
function
|
|
780
|
+
function G(e) {
|
|
778
781
|
return Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0;
|
|
779
782
|
}
|
|
780
|
-
function
|
|
783
|
+
function K(e, t, n) {
|
|
781
784
|
let r = {
|
|
782
785
|
tokens: [],
|
|
783
786
|
bindings: [],
|
|
@@ -785,7 +788,7 @@ function G(e, t, n) {
|
|
|
785
788
|
};
|
|
786
789
|
if (n.ok && n.document.source !== e || !n.ok && n.diagnostics.some((e) => e.code.startsWith("local.budget") || e.code.startsWith("local.options."))) return r;
|
|
787
790
|
try {
|
|
788
|
-
return
|
|
791
|
+
return se(e, t, {
|
|
789
792
|
...n.ok ? { document: n.document } : {},
|
|
790
793
|
diagnostics: !1
|
|
791
794
|
});
|
|
@@ -797,7 +800,7 @@ function G(e, t, n) {
|
|
|
797
800
|
};
|
|
798
801
|
}
|
|
799
802
|
}
|
|
800
|
-
function
|
|
803
|
+
function vt(e) {
|
|
801
804
|
return Array.isArray(e) ? e.length > 32 ? Array(33) : e.map((e) => {
|
|
802
805
|
if (!e || typeof e != "object" || Array.isArray(e)) return e;
|
|
803
806
|
let t = e, n = { ...t }, r = t.props;
|
|
@@ -814,25 +817,25 @@ function dt(e) {
|
|
|
814
817
|
return n.props = i, n;
|
|
815
818
|
}) : e;
|
|
816
819
|
}
|
|
817
|
-
function
|
|
820
|
+
function yt(e) {
|
|
818
821
|
if (e !== void 0) try {
|
|
819
822
|
if (typeof e != "object" || !e || Array.isArray(e)) return e;
|
|
820
823
|
let t = e, n = {};
|
|
821
|
-
for (let e of
|
|
824
|
+
for (let e of S) Object.hasOwn(t, e) && (n[e] = t[e]);
|
|
822
825
|
if (Object.hasOwn(t, "markdownBreaks") && (n.markdownBreaks = t.markdownBreaks), Object.hasOwn(t, "sourcePhase") && (n.sourcePhase = t.sourcePhase), Object.hasOwn(t, "strict") && (n.strict = t.strict), Object.hasOwn(t, "limits")) {
|
|
823
826
|
let e = t.limits;
|
|
824
827
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
825
828
|
let t = {};
|
|
826
|
-
for (let n of
|
|
829
|
+
for (let n of _t) Object.hasOwn(e, n) && (t[n] = e[n]);
|
|
827
830
|
n.limits = t;
|
|
828
831
|
} else n.limits = e;
|
|
829
832
|
}
|
|
830
|
-
return Object.hasOwn(t, "hostComponents") && (n.hostComponents =
|
|
833
|
+
return Object.hasOwn(t, "hostComponents") && (n.hostComponents = vt(t.hostComponents)), Object.hasOwn(t, "config") && (n.config = ee(t.config)), n;
|
|
831
834
|
} catch {
|
|
832
835
|
return e;
|
|
833
836
|
}
|
|
834
837
|
}
|
|
835
|
-
function
|
|
838
|
+
function bt(e) {
|
|
836
839
|
try {
|
|
837
840
|
if (!e || typeof e != "object" || Array.isArray(e)) return "";
|
|
838
841
|
let t = e.limits;
|
|
@@ -848,8 +851,8 @@ function pt(e) {
|
|
|
848
851
|
return ":unreadable";
|
|
849
852
|
}
|
|
850
853
|
}
|
|
851
|
-
function
|
|
852
|
-
let t =
|
|
854
|
+
function xt(e) {
|
|
855
|
+
let t = te(e);
|
|
853
856
|
if (t !== "invalid") return t;
|
|
854
857
|
try {
|
|
855
858
|
return `invalid:${JSON.stringify(e)}`;
|
|
@@ -857,33 +860,43 @@ function mt(e) {
|
|
|
857
860
|
return "invalid";
|
|
858
861
|
}
|
|
859
862
|
}
|
|
860
|
-
function
|
|
861
|
-
return `${
|
|
863
|
+
function q(e) {
|
|
864
|
+
return `${xt(e)}${bt(e)}`;
|
|
862
865
|
}
|
|
863
866
|
// src/local/transport/worker-handler.ts
|
|
864
|
-
function
|
|
867
|
+
function St(e, t, n, r) {
|
|
865
868
|
let i = e;
|
|
866
869
|
return typeof i.compileShared == "function" ? i.compileShared(t, n, r) : e.compile(t, n, r);
|
|
867
870
|
}
|
|
868
|
-
function
|
|
871
|
+
function Ct(e) {
|
|
869
872
|
return e === "streaming" || e === "final";
|
|
870
873
|
}
|
|
871
|
-
function
|
|
874
|
+
function J(e) {
|
|
872
875
|
return e.stats;
|
|
873
876
|
}
|
|
874
|
-
function
|
|
877
|
+
function Y(e, t, n, r) {
|
|
875
878
|
try {
|
|
876
879
|
e.postMessage({
|
|
877
880
|
id: t,
|
|
881
|
+
...r?.traceId === void 0 ? {} : {
|
|
882
|
+
traceId: r.traceId,
|
|
883
|
+
requestId: r.requestId,
|
|
884
|
+
sourceRevision: r.sourceRevision
|
|
885
|
+
},
|
|
878
886
|
ok: !1,
|
|
879
887
|
message: n
|
|
880
888
|
});
|
|
881
889
|
} catch {}
|
|
882
890
|
}
|
|
883
|
-
function
|
|
891
|
+
function wt(e, t, n, r, i) {
|
|
884
892
|
try {
|
|
885
893
|
e.postMessage({
|
|
886
|
-
id: t,
|
|
894
|
+
id: t.id,
|
|
895
|
+
...t.traceId === void 0 ? {} : {
|
|
896
|
+
traceId: t.traceId,
|
|
897
|
+
requestId: t.requestId,
|
|
898
|
+
sourceRevision: t.sourceRevision
|
|
899
|
+
},
|
|
887
900
|
ok: !1,
|
|
888
901
|
message: n,
|
|
889
902
|
retryFull: !0,
|
|
@@ -892,18 +905,18 @@ function _t(e, t, n, r, i) {
|
|
|
892
905
|
});
|
|
893
906
|
} catch {}
|
|
894
907
|
}
|
|
895
|
-
function
|
|
908
|
+
function Tt(e) {
|
|
896
909
|
return !!e && typeof e == "object" && (e.control === "dispose" || e.control === "cancel-preparation");
|
|
897
910
|
}
|
|
898
|
-
function
|
|
911
|
+
function Et(e) {
|
|
899
912
|
if (!e || typeof e != "object") return !1;
|
|
900
913
|
let t = e;
|
|
901
914
|
return typeof t.from == "number" && Number.isSafeInteger(t.from) && typeof t.to == "number" && Number.isSafeInteger(t.to) && t.from >= 0 && t.to >= t.from && typeof t.insert == "string";
|
|
902
915
|
}
|
|
903
|
-
function
|
|
916
|
+
function Dt(e, t = {}) {
|
|
904
917
|
let n = e === void 0 ? globalThis : e;
|
|
905
918
|
if (!n || typeof n.postMessage != "function") throw TypeError("startLocalCompileWorker requires a worker scope with postMessage");
|
|
906
|
-
let r = t.createSession ? t.createSession() :
|
|
919
|
+
let r = t.createSession ? t.createSession() : D(), i = r, a = t.preparationDelay, o = typeof a == "number" && Number.isFinite(a) ? Math.max(0, a) : 200, s = typeof i.prepareAsync == "function", c = null, l = 0, u = !1, d = null, f = null, p = 0, m, h = () => {
|
|
907
920
|
p += 1, f !== null && (f.aborted = !0, f = null), d !== null && (clearTimeout(d), d = null);
|
|
908
921
|
}, g = () => new Promise((e) => {
|
|
909
922
|
typeof setTimeout == "function" ? setTimeout(e, 0) : e();
|
|
@@ -913,11 +926,11 @@ function bt(e, t = {}) {
|
|
|
913
926
|
if (typeof t != "function") return;
|
|
914
927
|
let n = { aborted: !1 };
|
|
915
928
|
f = n;
|
|
916
|
-
let r =
|
|
929
|
+
let r = W(), a = !1;
|
|
917
930
|
try {
|
|
918
931
|
a = await t.call(i, n, g);
|
|
919
932
|
} catch {} finally {
|
|
920
|
-
f === n && (f = null), a && !n.aborted && !u && e === p && (m = W(
|
|
933
|
+
f === n && (f = null), a && !n.aborted && !u && e === p && (m = G(W() - r));
|
|
921
934
|
}
|
|
922
935
|
}, v = () => {
|
|
923
936
|
if (u || !s) return;
|
|
@@ -941,90 +954,104 @@ function bt(e, t = {}) {
|
|
|
941
954
|
let t = typeof e == "number" && Number.isSafeInteger(e) && e > 0 ? e : null;
|
|
942
955
|
return t === null ? l + 1 : t > l ? t : l + 1;
|
|
943
956
|
}, S = (e, t, i, a, o = !1, s) => {
|
|
944
|
-
let l = c;
|
|
945
|
-
if (
|
|
946
|
-
let
|
|
947
|
-
...b(
|
|
957
|
+
let { id: l, traceId: u, requestId: d, sourceRevision: f } = e, p = c;
|
|
958
|
+
if (p === null) return !1;
|
|
959
|
+
let m = G(i), h = s === void 0 ? b(m) : {
|
|
960
|
+
...b(m),
|
|
948
961
|
...s
|
|
949
962
|
};
|
|
950
963
|
try {
|
|
951
|
-
let
|
|
952
|
-
id:
|
|
964
|
+
let e = a ? {
|
|
965
|
+
id: l,
|
|
966
|
+
...u === void 0 ? {} : {
|
|
967
|
+
traceId: u,
|
|
968
|
+
requestId: d,
|
|
969
|
+
sourceRevision: f
|
|
970
|
+
},
|
|
953
971
|
ok: !0,
|
|
954
|
-
result:
|
|
955
|
-
duration:
|
|
956
|
-
incremental:
|
|
957
|
-
...
|
|
958
|
-
protocol:
|
|
972
|
+
result: p.result,
|
|
973
|
+
duration: m,
|
|
974
|
+
incremental: J(r),
|
|
975
|
+
...p.sourcePhase === void 0 ? {} : { sourcePhase: p.sourcePhase },
|
|
976
|
+
protocol: k,
|
|
959
977
|
revision: t,
|
|
960
|
-
metrics:
|
|
978
|
+
metrics: h
|
|
961
979
|
} : {
|
|
962
|
-
id:
|
|
980
|
+
id: l,
|
|
981
|
+
...u === void 0 ? {} : {
|
|
982
|
+
traceId: u,
|
|
983
|
+
requestId: d,
|
|
984
|
+
sourceRevision: f
|
|
985
|
+
},
|
|
963
986
|
ok: !0,
|
|
964
|
-
result:
|
|
965
|
-
duration:
|
|
966
|
-
incremental:
|
|
967
|
-
...
|
|
987
|
+
result: p.result,
|
|
988
|
+
duration: m,
|
|
989
|
+
incremental: J(r),
|
|
990
|
+
...p.sourcePhase === void 0 ? {} : { sourcePhase: p.sourcePhase }
|
|
968
991
|
};
|
|
969
|
-
if (o &&
|
|
970
|
-
let
|
|
971
|
-
|
|
972
|
-
...
|
|
973
|
-
analysisMs: W(
|
|
992
|
+
if (o && e.ok) {
|
|
993
|
+
let t = W();
|
|
994
|
+
e.analysis = K(p.source, p.options, p.result), e.metrics = {
|
|
995
|
+
...e.metrics,
|
|
996
|
+
analysisMs: G(W() - t)
|
|
974
997
|
};
|
|
975
998
|
}
|
|
976
|
-
if (
|
|
977
|
-
let { result:
|
|
978
|
-
...
|
|
979
|
-
flatResult:
|
|
999
|
+
if (p.deep && p.flatResults && e.ok) {
|
|
1000
|
+
let { result: t, ...r } = e, i = {
|
|
1001
|
+
...r,
|
|
1002
|
+
flatResult: pt(t)
|
|
980
1003
|
};
|
|
981
|
-
n.postMessage(
|
|
982
|
-
} else n.postMessage(
|
|
1004
|
+
n.postMessage(i);
|
|
1005
|
+
} else n.postMessage(e);
|
|
983
1006
|
return !0;
|
|
984
|
-
} catch (
|
|
985
|
-
return
|
|
1007
|
+
} catch (e) {
|
|
1008
|
+
return Y(n, l, `Could not return the compile result: ${U(e)}`, {
|
|
1009
|
+
traceId: u,
|
|
1010
|
+
requestId: d,
|
|
1011
|
+
sourceRevision: f
|
|
1012
|
+
}), !1;
|
|
986
1013
|
}
|
|
987
1014
|
};
|
|
988
1015
|
return n.onmessage = (e) => {
|
|
989
1016
|
let t = e?.data;
|
|
990
|
-
if (
|
|
1017
|
+
if (Tt(t)) {
|
|
991
1018
|
t.control === "dispose" ? y() : h();
|
|
992
1019
|
return;
|
|
993
1020
|
}
|
|
994
1021
|
if (!t || typeof t.id != "number") return;
|
|
995
1022
|
if (typeof t.source == "string") {
|
|
996
|
-
let e = t, i =
|
|
997
|
-
if (a !== void 0 && !
|
|
998
|
-
|
|
1023
|
+
let e = t, i = yt(e.options), a = e.sourcePhase === void 0 ? i?.sourcePhase : e.sourcePhase;
|
|
1024
|
+
if (a !== void 0 && !Ct(a)) {
|
|
1025
|
+
Y(n, e.id, "The requested source phase is not supported: expected \"streaming\" or \"final\"", e);
|
|
999
1026
|
return;
|
|
1000
1027
|
}
|
|
1001
1028
|
let o = a;
|
|
1002
1029
|
h();
|
|
1003
|
-
let s =
|
|
1030
|
+
let s = q(i), u = e.protocol === k, d = x(e.revision), f = W();
|
|
1004
1031
|
try {
|
|
1005
1032
|
if (c !== null && c.optionsKey !== s) try {
|
|
1006
1033
|
r.clear();
|
|
1007
1034
|
} catch {}
|
|
1008
|
-
let t =
|
|
1035
|
+
let t = St(r, e.source, i, o), n = G(W() - f);
|
|
1009
1036
|
l = d, c = {
|
|
1010
1037
|
source: e.source,
|
|
1011
1038
|
revision: d,
|
|
1012
1039
|
options: i,
|
|
1013
1040
|
optionsKey: s,
|
|
1014
1041
|
result: t,
|
|
1015
|
-
deep:
|
|
1016
|
-
flatResults: e.flatResults ===
|
|
1042
|
+
deep: ft(t),
|
|
1043
|
+
flatResults: e.flatResults === H,
|
|
1017
1044
|
...o === void 0 ? {} : { sourcePhase: o }
|
|
1018
|
-
}, S(e
|
|
1045
|
+
}, S(e, d, n, u, e.includeAuthorAnalysis === !0) && v();
|
|
1019
1046
|
} catch (t) {
|
|
1020
|
-
|
|
1047
|
+
Y(n, e.id, U(t), e);
|
|
1021
1048
|
}
|
|
1022
1049
|
return;
|
|
1023
1050
|
}
|
|
1024
1051
|
if (t.protocol !== "patch-v1") return;
|
|
1025
1052
|
h();
|
|
1026
1053
|
let i = t, a = c, o = (e, t) => {
|
|
1027
|
-
|
|
1054
|
+
wt(n, i, e, t, a?.revision);
|
|
1028
1055
|
};
|
|
1029
1056
|
if (a === null) {
|
|
1030
1057
|
o("No complete compile is available to patch", "stale-base");
|
|
@@ -1042,7 +1069,7 @@ function bt(e, t = {}) {
|
|
|
1042
1069
|
o("The options signature changed since the baseline", "options-mismatch");
|
|
1043
1070
|
return;
|
|
1044
1071
|
}
|
|
1045
|
-
if (!
|
|
1072
|
+
if (!Et(i.edit)) {
|
|
1046
1073
|
o("The source edit is invalid", "invalid-edit");
|
|
1047
1074
|
return;
|
|
1048
1075
|
}
|
|
@@ -1056,27 +1083,27 @@ function bt(e, t = {}) {
|
|
|
1056
1083
|
o("The source edit produced an unexpected length", "invalid-edit");
|
|
1057
1084
|
return;
|
|
1058
1085
|
}
|
|
1059
|
-
let d = x(i.revision), f =
|
|
1086
|
+
let d = x(i.revision), f = W();
|
|
1060
1087
|
try {
|
|
1061
|
-
let e =
|
|
1088
|
+
let e = St(r, u, a.options, a.sourcePhase), t = G(W() - f), o = a.revision, s = a.result;
|
|
1062
1089
|
l = d, c = {
|
|
1063
1090
|
source: u,
|
|
1064
1091
|
revision: d,
|
|
1065
1092
|
options: a.options,
|
|
1066
1093
|
optionsKey: a.optionsKey,
|
|
1067
1094
|
result: e,
|
|
1068
|
-
deep:
|
|
1095
|
+
deep: ft(e),
|
|
1069
1096
|
flatResults: a.flatResults,
|
|
1070
1097
|
...a.sourcePhase === void 0 ? {} : { sourcePhase: a.sourcePhase }
|
|
1071
1098
|
};
|
|
1072
1099
|
let p = null, h = 0;
|
|
1073
1100
|
if (e.ok && s.ok && !c.deep && !a.deep) {
|
|
1074
|
-
let t =
|
|
1075
|
-
p =
|
|
1101
|
+
let t = W();
|
|
1102
|
+
p = at(s, e), h = G(W() - t);
|
|
1076
1103
|
}
|
|
1077
1104
|
let g = p?.patch ?? null;
|
|
1078
1105
|
if (g === null) {
|
|
1079
|
-
S(i
|
|
1106
|
+
S(i, d, t, !0, i.includeAuthorAnalysis === !0) && v();
|
|
1080
1107
|
return;
|
|
1081
1108
|
}
|
|
1082
1109
|
if (p !== null && p.cost.preferFull) {
|
|
@@ -1086,7 +1113,7 @@ function bt(e, t = {}) {
|
|
|
1086
1113
|
patchBytes: e.patchBytes,
|
|
1087
1114
|
...e.fullBytes === void 0 ? {} : { fullBytes: e.fullBytes }
|
|
1088
1115
|
};
|
|
1089
|
-
S(i
|
|
1116
|
+
S(i, d, t, !0, i.includeAuthorAnalysis === !0, n) && v();
|
|
1090
1117
|
return;
|
|
1091
1118
|
}
|
|
1092
1119
|
let _ = {
|
|
@@ -1098,26 +1125,31 @@ function bt(e, t = {}) {
|
|
|
1098
1125
|
try {
|
|
1099
1126
|
let s = {
|
|
1100
1127
|
id: i.id,
|
|
1128
|
+
...i.traceId === void 0 ? {} : {
|
|
1129
|
+
traceId: i.traceId,
|
|
1130
|
+
requestId: i.requestId,
|
|
1131
|
+
sourceRevision: i.sourceRevision
|
|
1132
|
+
},
|
|
1101
1133
|
ok: !0,
|
|
1102
|
-
protocol:
|
|
1134
|
+
protocol: k,
|
|
1103
1135
|
baseRevision: o,
|
|
1104
1136
|
revision: d,
|
|
1105
1137
|
patch: g,
|
|
1106
1138
|
duration: t,
|
|
1107
|
-
incremental:
|
|
1139
|
+
incremental: J(r),
|
|
1108
1140
|
...a.sourcePhase === void 0 ? {} : { sourcePhase: a.sourcePhase },
|
|
1109
1141
|
metrics: _
|
|
1110
1142
|
};
|
|
1111
1143
|
if (i.includeAuthorAnalysis === !0) {
|
|
1112
|
-
let t =
|
|
1113
|
-
s.analysis =
|
|
1144
|
+
let t = W();
|
|
1145
|
+
s.analysis = K(u, a.options, e), _.analysisMs = G(W() - t);
|
|
1114
1146
|
}
|
|
1115
1147
|
n.postMessage(s), v();
|
|
1116
1148
|
} catch (e) {
|
|
1117
|
-
|
|
1149
|
+
Y(n, i.id, `Could not return the compile result: ${U(e)}`, i);
|
|
1118
1150
|
}
|
|
1119
1151
|
} catch (e) {
|
|
1120
|
-
|
|
1152
|
+
Y(n, i.id, U(e), i);
|
|
1121
1153
|
}
|
|
1122
1154
|
}, {
|
|
1123
1155
|
dispose: y,
|
|
@@ -1128,7 +1160,7 @@ function bt(e, t = {}) {
|
|
|
1128
1160
|
};
|
|
1129
1161
|
}
|
|
1130
1162
|
// src/local/transport/worker.ts
|
|
1131
|
-
function
|
|
1163
|
+
function Ot(e, t) {
|
|
1132
1164
|
if (!e || typeof e != "object") return !1;
|
|
1133
1165
|
let n = e, r = (e) => e && Number.isSafeInteger(e.start) && Number.isSafeInteger(e.end) && e.start >= 0 && e.end >= e.start && e.end <= t;
|
|
1134
1166
|
if (!Array.isArray(n.tokens) || n.tokens.length > t + 1 || !Array.isArray(n.bindings) || n.bindings.length > t + 1 || !Array.isArray(n.diagnostics)) return !1;
|
|
@@ -1140,32 +1172,32 @@ function xt(e, t) {
|
|
|
1140
1172
|
for (let e of n.bindings) if (!e || typeof e.name != "string" || !Array.isArray(e.declarations) || !Array.isArray(e.references) || (a += e.declarations.length + e.references.length, a > t + 1 || !e.declarations.every(r) || !e.references.every(r))) return !1;
|
|
1141
1173
|
return !0;
|
|
1142
1174
|
}
|
|
1143
|
-
function
|
|
1144
|
-
let r =
|
|
1175
|
+
function kt(e, t, n) {
|
|
1176
|
+
let r = yt(t), i = n === void 0 ? At(t) : n, a = i === "streaming" || i === "final" ? i : void 0, o = i !== void 0 && a === void 0 ? i : void 0;
|
|
1145
1177
|
return {
|
|
1146
1178
|
source: e,
|
|
1147
1179
|
options: r,
|
|
1148
|
-
optionsKey:
|
|
1149
|
-
scheduledAt:
|
|
1180
|
+
optionsKey: q(r),
|
|
1181
|
+
scheduledAt: W(),
|
|
1150
1182
|
sourcePhase: a === "streaming" ? "streaming" : "final",
|
|
1151
1183
|
explicitPhase: i !== void 0,
|
|
1152
1184
|
...o === void 0 ? {} : { invalidPhase: o }
|
|
1153
1185
|
};
|
|
1154
1186
|
}
|
|
1155
|
-
function
|
|
1187
|
+
function At(e) {
|
|
1156
1188
|
try {
|
|
1157
1189
|
return !e || typeof e != "object" || Array.isArray(e) ? void 0 : e.sourcePhase;
|
|
1158
1190
|
} catch {
|
|
1159
1191
|
return;
|
|
1160
1192
|
}
|
|
1161
1193
|
}
|
|
1162
|
-
function
|
|
1194
|
+
function X(e, t) {
|
|
1163
1195
|
return e.source === t.source && e.optionsKey === t.optionsKey && e.sourcePhase === t.sourcePhase && e.explicitPhase === t.explicitPhase && e.invalidPhase === t.invalidPhase;
|
|
1164
1196
|
}
|
|
1165
|
-
function
|
|
1197
|
+
function Z(e) {
|
|
1166
1198
|
return e.sourcePhase === "streaming" || e.explicitPhase ? { sourcePhase: e.sourcePhase } : {};
|
|
1167
1199
|
}
|
|
1168
|
-
function
|
|
1200
|
+
function Q(e, t) {
|
|
1169
1201
|
return e.explicitPhase ? {
|
|
1170
1202
|
ok: !1,
|
|
1171
1203
|
diagnostics: [t],
|
|
@@ -1175,7 +1207,7 @@ function Z(e, t) {
|
|
|
1175
1207
|
diagnostics: [t]
|
|
1176
1208
|
};
|
|
1177
1209
|
}
|
|
1178
|
-
function
|
|
1210
|
+
function jt() {
|
|
1179
1211
|
return {
|
|
1180
1212
|
ok: !1,
|
|
1181
1213
|
status: "failed",
|
|
@@ -1189,22 +1221,34 @@ function wt() {
|
|
|
1189
1221
|
},
|
|
1190
1222
|
line: 1,
|
|
1191
1223
|
column: 1,
|
|
1192
|
-
messageKey: "local.options.invalid.source-phase"
|
|
1224
|
+
messageKey: "local.options.invalid.source-phase",
|
|
1225
|
+
phase: "host",
|
|
1226
|
+
recoverable: !1
|
|
1193
1227
|
}]
|
|
1194
1228
|
};
|
|
1195
1229
|
}
|
|
1196
|
-
function
|
|
1230
|
+
function Mt(e) {
|
|
1197
1231
|
if (!e || typeof e != "object") return !1;
|
|
1198
1232
|
let t = e;
|
|
1199
1233
|
return !(typeof t.ok != "boolean" || !Array.isArray(t.diagnostics) || t.ok && (!t.document || typeof t.document != "object"));
|
|
1200
1234
|
}
|
|
1201
|
-
function
|
|
1235
|
+
function Nt(e) {
|
|
1202
1236
|
return e.ok && "patch" in e && e.patch !== void 0;
|
|
1203
1237
|
}
|
|
1238
|
+
var Pt = 160;
|
|
1239
|
+
function Ft(e) {
|
|
1240
|
+
let t = U(e).trim();
|
|
1241
|
+
return t.length === 0 ? "" : t.length > Pt ? `${v(t, 159)}…` : t;
|
|
1242
|
+
}
|
|
1204
1243
|
function $(e) {
|
|
1244
|
+
let t = Ft(e);
|
|
1205
1245
|
return {
|
|
1206
1246
|
code: "local.worker.compile",
|
|
1207
|
-
|
|
1247
|
+
messageKey: t ? "local.worker.compile.detail" : "local.worker.compile",
|
|
1248
|
+
...t ? { params: { detail: t } } : {},
|
|
1249
|
+
phase: "worker",
|
|
1250
|
+
recoverable: !1,
|
|
1251
|
+
message: t ? `Compilation failed: ${t}` : "Compilation failed",
|
|
1208
1252
|
severity: "error",
|
|
1209
1253
|
range: {
|
|
1210
1254
|
start: 0,
|
|
@@ -1214,7 +1258,7 @@ function $(e) {
|
|
|
1214
1258
|
column: 1
|
|
1215
1259
|
};
|
|
1216
1260
|
}
|
|
1217
|
-
var
|
|
1261
|
+
var It = class {
|
|
1218
1262
|
options;
|
|
1219
1263
|
delay;
|
|
1220
1264
|
worker = null;
|
|
@@ -1223,11 +1267,18 @@ var Et = class {
|
|
|
1223
1267
|
inFlight = null;
|
|
1224
1268
|
nextId = 1;
|
|
1225
1269
|
nextRevision = 1;
|
|
1270
|
+
nextSourceRevision = 1;
|
|
1271
|
+
currentSourceRevision = 0;
|
|
1226
1272
|
pending = !1;
|
|
1227
1273
|
fallbackSession = null;
|
|
1228
1274
|
disposed = !1;
|
|
1275
|
+
timeout = null;
|
|
1276
|
+
requestContexts = /* @__PURE__ */ new Map();
|
|
1277
|
+
obsoleteRequestIds = /* @__PURE__ */ new Set();
|
|
1278
|
+
reportedStaleRequestIds = /* @__PURE__ */ new Set();
|
|
1229
1279
|
baseline = null;
|
|
1230
1280
|
patchState = "unknown";
|
|
1281
|
+
startupFailure = null;
|
|
1231
1282
|
constructor(e) {
|
|
1232
1283
|
this.options = e;
|
|
1233
1284
|
let t = e.delay;
|
|
@@ -1239,13 +1290,17 @@ var Et = class {
|
|
|
1239
1290
|
this.handleWorkerFailure(t || "The compile worker encountered an error");
|
|
1240
1291
|
}, t.onmessageerror = () => this.handleWorkerFailure("The compile worker could not deliver the compile result"), this.worker = t;
|
|
1241
1292
|
} catch (t) {
|
|
1242
|
-
this.worker = null, e.onModeChange?.("fallback", `Could not start the compile worker: ${
|
|
1293
|
+
this.worker = null, this.startupFailure = Ft(t), e.onModeChange?.("fallback", `Could not start the compile worker: ${U(t)}`);
|
|
1243
1294
|
}
|
|
1244
1295
|
}
|
|
1245
1296
|
schedule(e, t, n, r) {
|
|
1246
1297
|
if (this.disposed) return;
|
|
1247
|
-
let i =
|
|
1248
|
-
|
|
1298
|
+
let i = {
|
|
1299
|
+
...kt(e, t, r),
|
|
1300
|
+
sourceRevision: this.nextSourceRevision++,
|
|
1301
|
+
traceId: ne()
|
|
1302
|
+
};
|
|
1303
|
+
this.currentSourceRevision = i.sourceRevision, this.inFlight && !X(this.inFlight.job, i) && this.obsoleteRequestIds.add(this.inFlight.id), this.queued = i, n && typeof n.baseSource == "string" && Et(n.edit) && n.edit.to <= n.baseSource.length && n.baseSource.slice(0, n.edit.from) + n.edit.insert + n.baseSource.slice(n.edit.to) === e && (this.queued.editHint = {
|
|
1249
1304
|
baseSource: n.baseSource,
|
|
1250
1305
|
edit: { ...n.edit }
|
|
1251
1306
|
}), this.clearTimer(), i.sourcePhase === "streaming" && (this.baseline = null), this.setPending(!0), i.sourcePhase === "streaming" || !i.explicitPhase ? this.timer = setTimeout(() => {
|
|
@@ -1254,7 +1309,7 @@ var Et = class {
|
|
|
1254
1309
|
}
|
|
1255
1310
|
dispose() {
|
|
1256
1311
|
if (this.disposed) return;
|
|
1257
|
-
this.disposed = !0, this.clearTimer(), this.queued = null, this.inFlight = null, this.resetProtocol();
|
|
1312
|
+
this.disposed = !0, this.inFlight && (this.traceWorker(this.inFlight, "worker-cancel", { status: "disposed" }), this.obsoleteRequestIds.add(this.inFlight.id)), this.timeout !== null && clearTimeout(this.timeout), this.timeout = null, this.clearTimer(), this.queued = null, this.inFlight = null, this.resetProtocol();
|
|
1258
1313
|
let e = this.worker;
|
|
1259
1314
|
if (this.worker = null, e) {
|
|
1260
1315
|
e.onmessage = null, e.onerror = null, e.onmessageerror = null;
|
|
@@ -1271,13 +1326,13 @@ var Et = class {
|
|
|
1271
1326
|
}
|
|
1272
1327
|
compile(e) {
|
|
1273
1328
|
if (e.invalidPhase !== void 0) {
|
|
1274
|
-
this.deliver({
|
|
1329
|
+
this.deliver(e, {
|
|
1275
1330
|
source: e.source,
|
|
1276
|
-
result:
|
|
1331
|
+
result: jt(),
|
|
1277
1332
|
duration: 0,
|
|
1278
1333
|
mode: this.worker === null ? "fallback" : "worker",
|
|
1279
1334
|
...e.options === void 0 ? {} : { options: e.options },
|
|
1280
|
-
metrics: { queueMs: W(
|
|
1335
|
+
metrics: { queueMs: G(W() - e.scheduledAt) }
|
|
1281
1336
|
}), this.finishRun();
|
|
1282
1337
|
return;
|
|
1283
1338
|
}
|
|
@@ -1287,12 +1342,15 @@ var Et = class {
|
|
|
1287
1342
|
return;
|
|
1288
1343
|
}
|
|
1289
1344
|
e.sourcePhase === "streaming" && (this.baseline = null);
|
|
1290
|
-
let n = this.nextId++, r = this.nextRevision++, i =
|
|
1345
|
+
let n = this.nextId++, r = this.nextRevision++, { traceId: i, sourceRevision: a } = e, o = W(), s = this.baseline, c = e.sourcePhase === "final" && this.patchState === "enabled" && s !== null && s.optionsKey === e.optionsKey ? {
|
|
1346
|
+
traceId: i,
|
|
1347
|
+
requestId: n,
|
|
1348
|
+
sourceRevision: a,
|
|
1291
1349
|
id: n,
|
|
1292
|
-
protocol:
|
|
1293
|
-
baseRevision:
|
|
1350
|
+
protocol: k,
|
|
1351
|
+
baseRevision: s.revision,
|
|
1294
1352
|
revision: r,
|
|
1295
|
-
edit: e.editHint?.baseSource ===
|
|
1353
|
+
edit: e.editHint?.baseSource === s.source ? e.editHint.edit : I(s.source, e.source) ?? {
|
|
1296
1354
|
from: 0,
|
|
1297
1355
|
to: 0,
|
|
1298
1356
|
insert: ""
|
|
@@ -1300,61 +1358,135 @@ var Et = class {
|
|
|
1300
1358
|
targetLength: e.source.length,
|
|
1301
1359
|
optionsKey: e.optionsKey
|
|
1302
1360
|
} : {
|
|
1361
|
+
traceId: i,
|
|
1362
|
+
requestId: n,
|
|
1363
|
+
sourceRevision: a,
|
|
1303
1364
|
id: n,
|
|
1304
1365
|
source: e.source,
|
|
1305
1366
|
...e.options === void 0 ? {} : { options: e.options },
|
|
1306
|
-
protocol:
|
|
1367
|
+
protocol: k,
|
|
1307
1368
|
revision: r,
|
|
1308
|
-
flatResults:
|
|
1369
|
+
flatResults: H,
|
|
1309
1370
|
...e.sourcePhase === "streaming" || e.explicitPhase ? { sourcePhase: e.sourcePhase } : {}
|
|
1310
|
-
}
|
|
1311
|
-
this.inFlight = {
|
|
1371
|
+
}, l = {
|
|
1312
1372
|
id: n,
|
|
1313
1373
|
job: e,
|
|
1314
|
-
startedAt:
|
|
1315
|
-
revision: r
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1374
|
+
startedAt: o,
|
|
1375
|
+
revision: r,
|
|
1376
|
+
traceId: i,
|
|
1377
|
+
sourceRevision: a
|
|
1378
|
+
};
|
|
1379
|
+
this.inFlight = l;
|
|
1380
|
+
let u = this.options.timeoutMs, d = typeof u == "number" && Number.isFinite(u) && u > 0 ? Math.min(2147483647, Math.ceil(u)) : 3e4;
|
|
1381
|
+
for (this.requestContexts.set(n, {
|
|
1382
|
+
traceId: i,
|
|
1383
|
+
sourceRevision: a
|
|
1384
|
+
}); this.requestContexts.size > 128;) {
|
|
1385
|
+
let e = this.requestContexts.keys().next().value;
|
|
1386
|
+
if (e === void 0) break;
|
|
1387
|
+
this.requestContexts.delete(e), this.obsoleteRequestIds.delete(e), this.reportedStaleRequestIds.delete(e);
|
|
1388
|
+
}
|
|
1389
|
+
if (this.timeout = setTimeout(() => {
|
|
1390
|
+
if (this.inFlight?.id !== n) return;
|
|
1391
|
+
let e = {
|
|
1392
|
+
...O("local.worker.timeout", {
|
|
1393
|
+
timeoutMs: d,
|
|
1394
|
+
requestId: n,
|
|
1395
|
+
sourceRevision: a
|
|
1396
|
+
}),
|
|
1397
|
+
phase: "worker"
|
|
1398
|
+
};
|
|
1399
|
+
this.obsoleteRequestIds.add(n), this.handleWorkerFailure(e.message, e);
|
|
1400
|
+
}, d), this.traceWorker(l, "worker-request"), !(this.disposed || this.inFlight !== l)) {
|
|
1401
|
+
this.options.includeAuthorAnalysis && (c.includeAuthorAnalysis = !0);
|
|
1402
|
+
try {
|
|
1403
|
+
t.postMessage(c);
|
|
1404
|
+
} catch (e) {
|
|
1405
|
+
this.obsoleteRequestIds.add(n), this.handleWorkerFailure(`Could not send the source to the compile worker: ${U(e)}`);
|
|
1325
1406
|
}
|
|
1326
|
-
r !== null && (this.queued = null, this.clearTimer()), this.resetProtocol(), this.degrade(n), this.compileFallback(e);
|
|
1327
1407
|
}
|
|
1328
1408
|
}
|
|
1329
1409
|
compileFallback(e) {
|
|
1330
1410
|
if (this.disposed) return;
|
|
1331
1411
|
e.sourcePhase === "streaming" && (this.baseline = null);
|
|
1332
|
-
let t =
|
|
1412
|
+
let t = W(), { traceId: n, sourceRevision: r } = e;
|
|
1413
|
+
if (!this.isCurrentJob(e) || (T(this.options.observer, {
|
|
1414
|
+
type: "compile-start",
|
|
1415
|
+
traceId: n,
|
|
1416
|
+
sourceRevision: r,
|
|
1417
|
+
timestamp: Date.now(),
|
|
1418
|
+
status: "fallback"
|
|
1419
|
+
}), !this.isCurrentJob(e))) {
|
|
1420
|
+
this.finishRun();
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1423
|
+
let i;
|
|
1333
1424
|
try {
|
|
1334
|
-
let t = this.options.fallbackCompile ?? ((e, t, n) => (this.fallbackSession ??=
|
|
1335
|
-
|
|
1425
|
+
let t = this.options.fallbackCompile ?? ((e, t, n) => (this.fallbackSession ??= D(), this.fallbackSession.compile(e, t, n)));
|
|
1426
|
+
i = e.explicitPhase ? t(e.source, e.options, e.sourcePhase) : e.options === void 0 ? t(e.source) : t(e.source, e.options);
|
|
1336
1427
|
} catch (t) {
|
|
1337
|
-
|
|
1428
|
+
i = Q(e, $(t));
|
|
1338
1429
|
}
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1430
|
+
let a = G(W() - t);
|
|
1431
|
+
if (!this.isCurrentJob(e)) this.finishRun();
|
|
1432
|
+
else {
|
|
1433
|
+
if (this.startupFailure !== null) {
|
|
1434
|
+
let t = this.startupFailure;
|
|
1435
|
+
if (this.startupFailure = null, T(this.options.observer, {
|
|
1436
|
+
type: "worker-error",
|
|
1437
|
+
traceId: n,
|
|
1438
|
+
sourceRevision: r,
|
|
1439
|
+
timestamp: Date.now(),
|
|
1440
|
+
status: "failed",
|
|
1441
|
+
code: "local.worker.startup",
|
|
1442
|
+
...t ? { detail: t } : {}
|
|
1443
|
+
}), !this.isCurrentJob(e)) {
|
|
1444
|
+
this.finishRun();
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
T(this.options.observer, {
|
|
1449
|
+
type: "compile-end",
|
|
1450
|
+
traceId: n,
|
|
1451
|
+
sourceRevision: r,
|
|
1452
|
+
timestamp: Date.now(),
|
|
1453
|
+
durationMs: a,
|
|
1454
|
+
status: i.ok ? "ok" : "failed"
|
|
1455
|
+
}), this.isCurrentJob(e) && this.deliver(e, {
|
|
1456
|
+
source: e.source,
|
|
1457
|
+
result: i,
|
|
1458
|
+
duration: a,
|
|
1459
|
+
mode: "fallback",
|
|
1460
|
+
...this.options.includeAuthorAnalysis ? { analysis: K(e.source, e.options, i) } : {},
|
|
1461
|
+
...e.options === void 0 ? {} : { options: e.options },
|
|
1462
|
+
...Z(e),
|
|
1463
|
+
metrics: { queueMs: G(t - e.scheduledAt) }
|
|
1464
|
+
}), this.finishRun();
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
isCurrentJob(e) {
|
|
1468
|
+
return !this.disposed && e.sourceRevision === this.currentSourceRevision;
|
|
1349
1469
|
}
|
|
1350
1470
|
receive(e) {
|
|
1351
1471
|
if (this.disposed) return;
|
|
1352
1472
|
let t = this.inFlight;
|
|
1353
|
-
if (!
|
|
1473
|
+
if (!e) return;
|
|
1474
|
+
if (t && e.id === t.id && (e.requestId !== void 0 && e.requestId !== t.id || e.traceId !== void 0 && e.traceId !== t.traceId || e.sourceRevision !== void 0 && e.sourceRevision !== t.sourceRevision)) {
|
|
1475
|
+
this.reportStale(t.id, t.traceId, t.sourceRevision, this.queued?.sourceRevision), this.handleWorkerFailure("The compile worker returned a response with a mismatched request context.");
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
if (!t || e.id !== t.id) {
|
|
1479
|
+
if (Number.isSafeInteger(e.id) && e.id > 0 && this.obsoleteRequestIds.has(e.id)) {
|
|
1480
|
+
let t = this.requestContexts.get(e.id);
|
|
1481
|
+
t && this.reportStale(e.id, t.traceId, t.sourceRevision, this.queued?.sourceRevision);
|
|
1482
|
+
}
|
|
1483
|
+
return;
|
|
1484
|
+
}
|
|
1485
|
+
this.timeout !== null && clearTimeout(this.timeout), this.timeout = null;
|
|
1354
1486
|
let n, r = 0;
|
|
1355
1487
|
if (e.ok && "flatResult" in e) {
|
|
1356
|
-
let t =
|
|
1357
|
-
r = W(
|
|
1488
|
+
let t = W(), i = mt(e.flatResult);
|
|
1489
|
+
r = G(W() - t), n = Mt(i) ? {
|
|
1358
1490
|
...e,
|
|
1359
1491
|
result: i
|
|
1360
1492
|
} : {
|
|
@@ -1365,14 +1497,14 @@ var Et = class {
|
|
|
1365
1497
|
};
|
|
1366
1498
|
} else n = e;
|
|
1367
1499
|
this.inFlight = null;
|
|
1368
|
-
let i = t.job, a = W(
|
|
1500
|
+
let i = t.job, a = G(W() - t.startedAt), o = G(t.startedAt - i.scheduledAt), s = null, c = r, l = null, u = "worker", d;
|
|
1369
1501
|
if (n.ok) {
|
|
1370
|
-
if (
|
|
1371
|
-
let e =
|
|
1372
|
-
c = W(
|
|
1502
|
+
if (Nt(n)) {
|
|
1503
|
+
let e = W(), t = this.applyResponsePatch(i, n);
|
|
1504
|
+
c = G(W() - e), t !== null && (s = t, d = n.revision);
|
|
1373
1505
|
} else {
|
|
1374
1506
|
let e = n;
|
|
1375
|
-
|
|
1507
|
+
Mt(e.result) ? (s = e.result, d = typeof e.revision == "number" ? e.revision : void 0, i.sourcePhase === "streaming" || e.sourcePhase === "streaming" ? this.baseline = null : e.protocol === "patch-v1" && typeof e.revision == "number" && Number.isSafeInteger(e.revision) ? (this.patchState = "enabled", this.baseline = e.result.ok ? {
|
|
1376
1508
|
source: i.source,
|
|
1377
1509
|
optionsKey: i.optionsKey,
|
|
1378
1510
|
revision: e.revision,
|
|
@@ -1380,52 +1512,71 @@ var Et = class {
|
|
|
1380
1512
|
} : null) : (this.patchState = "legacy", this.baseline = null)) : l = "The compile worker returned an invalid result";
|
|
1381
1513
|
}
|
|
1382
1514
|
} else n.retryFull !== !0 && (l = n.message);
|
|
1383
|
-
let f = this.queued, p = f !== null && !
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1515
|
+
let f = this.queued, p = f !== null && !X(f, i);
|
|
1516
|
+
if (l === null ? this.traceWorker(t, "worker-response", {
|
|
1517
|
+
durationMs: a,
|
|
1518
|
+
status: s ? s.ok ? "ok" : "failed" : l ? "failed" : "retry"
|
|
1519
|
+
}) : this.traceWorker(t, "worker-error", {
|
|
1520
|
+
durationMs: a,
|
|
1521
|
+
status: "failed",
|
|
1522
|
+
code: "local.worker.compile"
|
|
1523
|
+
}), !this.disposed) {
|
|
1524
|
+
if (p && (this.obsoleteRequestIds.add(t.id), this.reportStale(t.id, t.traceId, t.sourceRevision, f.sourceRevision)), f !== null && !p && this.queued === f && (this.queued = null, this.clearTimer(), this.currentSourceRevision = i.sourceRevision), s !== null) p || this.deliver(i, {
|
|
1525
|
+
source: i.source,
|
|
1526
|
+
result: s,
|
|
1527
|
+
duration: G(n.ok ? n.duration : 0),
|
|
1528
|
+
mode: u,
|
|
1529
|
+
...n.ok && this.options.includeAuthorAnalysis && Ot(n.analysis, i.source.length) ? { analysis: n.analysis } : {},
|
|
1530
|
+
...i.options === void 0 ? {} : { options: i.options },
|
|
1531
|
+
...Z(i),
|
|
1532
|
+
metrics: {
|
|
1533
|
+
queueMs: o,
|
|
1534
|
+
roundTripMs: a,
|
|
1535
|
+
...c > 0 ? { applyMs: c } : {},
|
|
1536
|
+
...n.ok && n.metrics ? { worker: n.metrics } : {}
|
|
1537
|
+
},
|
|
1538
|
+
...d === void 0 ? {} : { revision: d }
|
|
1539
|
+
}), this.finishRun();
|
|
1540
|
+
else if (l !== null) p || this.deliver(i, {
|
|
1541
|
+
source: i.source,
|
|
1542
|
+
result: Q(i, $(l)),
|
|
1543
|
+
duration: 0,
|
|
1544
|
+
mode: u,
|
|
1545
|
+
...i.options === void 0 ? {} : { options: i.options },
|
|
1546
|
+
...Z(i),
|
|
1547
|
+
metrics: {
|
|
1548
|
+
queueMs: o,
|
|
1549
|
+
roundTripMs: a
|
|
1550
|
+
}
|
|
1551
|
+
}), this.finishRun();
|
|
1552
|
+
else {
|
|
1553
|
+
if (p) this.inFlight === null && this.resetProtocol();
|
|
1554
|
+
else {
|
|
1555
|
+
let e = this.recoverWithFullResult(i);
|
|
1556
|
+
if (e === "dispatched") return;
|
|
1557
|
+
e !== "abandoned" && (this.patchState = "disabled", this.baseline = null, this.deliver(i, {
|
|
1558
|
+
source: i.source,
|
|
1559
|
+
result: Q(i, $("The compile worker could not apply an incremental result patch")),
|
|
1560
|
+
duration: 0,
|
|
1561
|
+
mode: u,
|
|
1562
|
+
...i.options === void 0 ? {} : { options: i.options },
|
|
1563
|
+
...Z(i),
|
|
1564
|
+
metrics: {
|
|
1565
|
+
queueMs: o,
|
|
1566
|
+
roundTripMs: a,
|
|
1567
|
+
...c > 0 ? { applyMs: c } : {}
|
|
1568
|
+
}
|
|
1569
|
+
}));
|
|
1570
|
+
}
|
|
1571
|
+
this.finishRun();
|
|
1406
1572
|
}
|
|
1407
|
-
}
|
|
1408
|
-
source: i.source,
|
|
1409
|
-
result: s,
|
|
1410
|
-
duration: W(n.ok ? n.duration : 0),
|
|
1411
|
-
mode: u,
|
|
1412
|
-
...n.ok && this.options.includeAuthorAnalysis && xt(n.analysis, i.source.length) ? { analysis: n.analysis } : {},
|
|
1413
|
-
...i.options === void 0 ? {} : { options: i.options },
|
|
1414
|
-
...X(i),
|
|
1415
|
-
metrics: {
|
|
1416
|
-
queueMs: o,
|
|
1417
|
-
roundTripMs: a,
|
|
1418
|
-
...c > 0 ? { applyMs: c } : {},
|
|
1419
|
-
...n.ok && n.metrics ? { worker: n.metrics } : {}
|
|
1420
|
-
},
|
|
1421
|
-
...d === void 0 ? {} : { revision: d }
|
|
1422
|
-
}), this.finishRun());
|
|
1573
|
+
}
|
|
1423
1574
|
}
|
|
1424
1575
|
applyResponsePatch(e, t) {
|
|
1425
1576
|
if (e.sourcePhase !== "final") return null;
|
|
1426
1577
|
let n = this.baseline;
|
|
1427
1578
|
if (n === null || n.optionsKey !== e.optionsKey || !Number.isSafeInteger(t.revision) || t.revision <= n.revision || t.baseRevision !== n.revision || t.protocol !== "patch-v1") return null;
|
|
1428
|
-
let r =
|
|
1579
|
+
let r = dt(n.result, t.patch);
|
|
1429
1580
|
if (r === null || !r.ok || r.document.source !== e.source) return null;
|
|
1430
1581
|
let i;
|
|
1431
1582
|
if (e.sourcePhase === "final" && e.explicitPhase) i = r.recoveries === void 0 ? {
|
|
@@ -1447,18 +1598,22 @@ var Et = class {
|
|
|
1447
1598
|
}, i;
|
|
1448
1599
|
}
|
|
1449
1600
|
recoverWithFullResult(e) {
|
|
1450
|
-
|
|
1451
|
-
let t = this.queued;
|
|
1452
|
-
return t !== null && !Y(t, e) ? !1 : (t !== null && (this.queued = null, this.clearTimer()), this.resetProtocol(), this.compile({
|
|
1601
|
+
return this.worker === null || (e.recovery ?? 0) >= 1 ? "spent" : this.disposed || this.inFlight !== null || !this.isCurrentJob(e) ? "abandoned" : (this.resetProtocol(), this.compile({
|
|
1453
1602
|
...e,
|
|
1454
1603
|
recovery: (e.recovery ?? 0) + 1
|
|
1455
|
-
}),
|
|
1604
|
+
}), "dispatched");
|
|
1456
1605
|
}
|
|
1457
|
-
handleWorkerFailure(e
|
|
1606
|
+
handleWorkerFailure(e, t = {
|
|
1607
|
+
...O("local.worker.error"),
|
|
1608
|
+
recoverable: !0
|
|
1609
|
+
}) {
|
|
1458
1610
|
if (this.disposed) return;
|
|
1459
|
-
this.
|
|
1460
|
-
let
|
|
1461
|
-
this.inFlight = null,
|
|
1611
|
+
this.timeout !== null && clearTimeout(this.timeout), this.timeout = null, this.resetProtocol();
|
|
1612
|
+
let n = this.inFlight;
|
|
1613
|
+
this.inFlight = null, n && this.obsoleteRequestIds.add(n.id), this.degrade(e), !this.disposed && (n && this.traceWorker(n, t.code === "local.worker.timeout" ? "worker-timeout" : "worker-error", {
|
|
1614
|
+
code: t.code,
|
|
1615
|
+
durationMs: G(W() - n.startedAt)
|
|
1616
|
+
}), !this.disposed && (w(this.options.observer, t), !this.disposed && (n && (this.queued === null || X(this.queued, n.job)) && (this.queued !== null && (this.queued = null, this.clearTimer(), this.currentSourceRevision = n.job.sourceRevision), this.compileFallback(n.job)), this.finishRun())));
|
|
1462
1617
|
}
|
|
1463
1618
|
degrade(e) {
|
|
1464
1619
|
let t = this.worker;
|
|
@@ -1476,14 +1631,48 @@ var Et = class {
|
|
|
1476
1631
|
finishRun() {
|
|
1477
1632
|
this.disposed || (this.drain(), !this.disposed && this.setPending(this.timer !== null || this.inFlight !== null || this.queued !== null));
|
|
1478
1633
|
}
|
|
1479
|
-
deliver(e) {
|
|
1480
|
-
if (this.
|
|
1481
|
-
let
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1634
|
+
deliver(e, t) {
|
|
1635
|
+
if (!this.isCurrentJob(e)) return;
|
|
1636
|
+
let n = this.baseline !== null && this.baseline.result === t.result, r = this.options.shareResults === !0 || !n ? t.result : F(t.result);
|
|
1637
|
+
for (let t of [...r.diagnostics, ...r.transientDiagnostics ?? []]) {
|
|
1638
|
+
if (!this.isCurrentJob(e)) return;
|
|
1639
|
+
w(this.options.observer, t);
|
|
1640
|
+
}
|
|
1641
|
+
this.isCurrentJob(e) && this.options.onResult({
|
|
1642
|
+
...t,
|
|
1643
|
+
result: r
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
traceWorker(e, t, n = {}) {
|
|
1647
|
+
T(this.options.observer, {
|
|
1648
|
+
type: t,
|
|
1649
|
+
traceId: e.traceId,
|
|
1650
|
+
requestId: e.id,
|
|
1651
|
+
sourceRevision: e.sourceRevision,
|
|
1652
|
+
timestamp: Date.now(),
|
|
1653
|
+
...n
|
|
1485
1654
|
});
|
|
1486
1655
|
}
|
|
1656
|
+
reportStale(e, t, n, r) {
|
|
1657
|
+
if (this.disposed || this.reportedStaleRequestIds.has(e)) return;
|
|
1658
|
+
this.reportedStaleRequestIds.add(e);
|
|
1659
|
+
let i = "local.worker.stale-response", a = {
|
|
1660
|
+
...O(i, {
|
|
1661
|
+
requestId: e,
|
|
1662
|
+
sourceRevision: n,
|
|
1663
|
+
...r === void 0 ? {} : { currentRevision: r }
|
|
1664
|
+
}),
|
|
1665
|
+
phase: "worker"
|
|
1666
|
+
};
|
|
1667
|
+
T(this.options.observer, {
|
|
1668
|
+
type: "worker-stale-response",
|
|
1669
|
+
traceId: t,
|
|
1670
|
+
requestId: e,
|
|
1671
|
+
sourceRevision: n,
|
|
1672
|
+
timestamp: Date.now(),
|
|
1673
|
+
code: i
|
|
1674
|
+
}), !this.disposed && w(this.options.observer, a);
|
|
1675
|
+
}
|
|
1487
1676
|
setPending(e) {
|
|
1488
1677
|
this.pending !== e && (this.pending = e, this.options.onPendingChange?.(e));
|
|
1489
1678
|
}
|
|
@@ -1491,4 +1680,4 @@ var Et = class {
|
|
|
1491
1680
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
1492
1681
|
}
|
|
1493
1682
|
};
|
|
1494
|
-
export {
|
|
1683
|
+
export { g as DEFAULT_LOCAL_THEME, ht as LOCAL_COMPILE_DELAY_MS, gt as LOCAL_COMPILE_PREPARATION_DELAY_MS, a as LOCAL_DIAGNOSTIC_CODES, p as LOCAL_OBSERVABILITY_MESSAGES, k as LOCAL_RESULT_PATCH_PROTOCOL, xe as LOCAL_STATE_FORMAT, C as LOCAL_SYNTAX_VERSION, d as LOCAL_THEME_PROTOCOL, It as LocalCompileScheduler, ce as LocalCompileSession, y as LocalExpressionError, ke as SHAREABLE_HTML_FORMAT, Ee as SHAREABLE_HTML_FORMAT_V2, se as analyzeLocalSource, dt as applyLocalResultPatch, De as applyLocalState, le as applyLocalStateRetention, qe as applySourceEdit, Ue as checkLocalUpgrade, b as compileExpression, $ as compileFailureDiagnostic, n as compileLatex, re as compileLocal, t as compilePlotFormula, ae as completeLocalSource, i as countLocalCodePoints, Me as createDiagnosticReport, D as createLocalCompileSession, O as createLocalObservabilityDiagnostic, de as createLocalRuntime, Te as createLocalStateFile, ne as createLocalTraceId, Oe as createShareableHtml, I as diffSourceEdit, w as emitLocalDiagnostic, T as emitLocalTrace, it as encodeLocalResultPatch, Ce as exportLocalState, h as formatLocalDiagnostic, oe as formatLocalSource, u as formatObservabilityMessage, e as implicitGridSize, Se as importLocalState, Be as inspectLocalSourceVersion, o as isLocalDiagnosticCode, m as isLocalThemeName, te as localCompileOptionsKey, _ as localDiagnosticTemplate, s as localDiagnosticTemplateKeys, me as localSourceDigest, q as localWorkerOptionsKey, We as migrateLocalSource, pe as notifyLocalRuntime, ye as parseLocalState, fe as planLocalStateRetention, r as plotFormulaKind, ie as renameLocalBinding, Ne as resolveLocalComponentStateExport, Ae as resolveLocalState, we as resolveLocalStateBaseline, c as resolveLocalTheme, ve as sampleImplicit, ge as sampleParametric, _e as samplePlot, he as samplePolar, be as serializeForScript, je as serializeLocalState, Dt as startLocalCompileWorker, ue as updateLocalRuntime };
|