@sheetxl/scripting 0.7.22 → 0.7.23-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +208 -229
  2. package/browser/cjs/1_xhnTjP6m5oj6za.cjs +21 -0
  3. package/browser/cjs/BsZkw6_kfPB5b80k.cjs +1 -0
  4. package/browser/cjs/Bu4cZ8iSZ3rij-oV.cjs +1 -0
  5. package/browser/cjs/BvG8N7G_8CXIAlT-.cjs +1 -0
  6. package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +1 -0
  7. package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +1 -0
  8. package/browser/cjs/CctaCN_w3o34V9AR.cjs +1 -0
  9. package/browser/cjs/D9Oz5YU4OTd5nNFg.cjs +1 -0
  10. package/browser/cjs/DSEShe7kGtxvljOr.cjs +1 -0
  11. package/browser/cjs/index.cjs +1 -6
  12. package/browser/cjs/qWYyYsBboXc9p0Lw.cjs +7 -0
  13. package/browser/esm/B609eaWQPO1XuznE.mjs +421 -0
  14. package/browser/esm/BbWhc8uJ8fNhVS5l.mjs +105 -0
  15. package/browser/esm/BvBLYHivUCrzyetH.mjs +87 -0
  16. package/browser/esm/CB6ULc6IX1XDHZi_.mjs +152 -0
  17. package/browser/esm/C_dDiKP0qhT8BhBm.mjs +27 -0
  18. package/browser/esm/CibjE6zDpZbn9Tch.mjs +12 -0
  19. package/browser/esm/DRa-YITYJZzB6CN0.mjs +8 -0
  20. package/browser/esm/DYVVBj4MfOVWrWWg.mjs +25 -0
  21. package/browser/esm/ESZQAKxwcZjX497y.mjs +15 -0
  22. package/browser/esm/UxKnYr9eSfIMndHc.mjs +23 -0
  23. package/browser/esm/index.mjs +40 -20
  24. package/node/esm/07eMkALj6l3ic2-e.mjs +23 -0
  25. package/node/esm/BpJRg8aS8svFd1fz.mjs +14 -0
  26. package/node/esm/DRa-YITYJZzB6CN0.mjs +8 -0
  27. package/node/esm/DX7jQUpPgudcUIMl.mjs +17 -0
  28. package/node/esm/H2OlmRdD_MaeXWfw.mjs +152 -0
  29. package/node/esm/LMRQvZ1FTfeeBOAm.mjs +27 -0
  30. package/node/esm/MHtkzgv6-lmftCf4.mjs +12 -0
  31. package/node/esm/index.mjs +144 -20
  32. package/node/esm/t_oN97enVU1dxwlA.mjs +421 -0
  33. package/package.json +11 -8
  34. package/types/index.d.ts +2 -165
  35. package/types/src/ScriptCompiler.d.ts +40 -0
  36. package/types/src/ScriptCompiler.d.ts.map +1 -0
  37. package/types/src/compiler/Bundler.d.ts +7 -0
  38. package/types/src/compiler/Bundler.d.ts.map +1 -0
  39. package/types/src/compiler/TypescriptCompiler.d.ts +27 -0
  40. package/types/src/compiler/TypescriptCompiler.d.ts.map +1 -0
  41. package/types/src/compiler/TypescriptCompiler.impl.d.ts +17 -0
  42. package/types/src/compiler/TypescriptCompiler.impl.d.ts.map +1 -0
  43. package/types/src/compiler/TypescriptCompiler.worker.d.ts +2 -0
  44. package/types/src/compiler/TypescriptCompiler.worker.d.ts.map +1 -0
  45. package/types/src/compiler/compiler.browser.d.ts +8 -0
  46. package/types/src/compiler/compiler.browser.d.ts.map +1 -0
  47. package/types/src/compiler/compiler.node.d.ts +14 -0
  48. package/types/src/compiler/compiler.node.d.ts.map +1 -0
  49. package/types/src/compiler/constants.d.ts +10 -0
  50. package/types/src/compiler/constants.d.ts.map +1 -0
  51. package/types/src/compiler/insertYieldBetweenStatements.d.ts +5 -0
  52. package/types/src/compiler/insertYieldBetweenStatements.d.ts.map +1 -0
  53. package/types/src/compiler/transformAwaitToYield.d.ts +6 -0
  54. package/types/src/compiler/transformAwaitToYield.d.ts.map +1 -0
  55. package/types/src/index.d.ts +7 -0
  56. package/types/src/index.d.ts.map +1 -0
  57. package/types/src/lib/esbuild/esbuild.browser.d.ts +4 -0
  58. package/types/src/lib/esbuild/esbuild.browser.d.ts.map +1 -0
  59. package/types/src/lib/esbuild/esbuild.node.d.ts +11 -0
  60. package/types/src/lib/esbuild/esbuild.node.d.ts.map +1 -0
  61. package/types/src/lib/typescript/typescript.browser.d.ts +4 -0
  62. package/types/src/lib/typescript/typescript.browser.d.ts.map +1 -0
  63. package/types/src/lib/typescript/typescript.node.d.ts +4 -0
  64. package/types/src/lib/typescript/typescript.node.d.ts.map +1 -0
  65. package/types/src/linter/Linter.d.ts +63 -0
  66. package/types/src/linter/Linter.d.ts.map +1 -0
  67. package/types/src/linter/index.d.ts +2 -0
  68. package/types/src/linter/index.d.ts.map +1 -0
  69. package/types/src/loader/index.d.ts +2 -0
  70. package/types/src/loader/index.d.ts.map +1 -0
  71. package/types/src/loader/loadCompiledModule.d.ts +19 -0
  72. package/types/src/loader/loadCompiledModule.d.ts.map +1 -0
  73. package/types/src/loader/moduleLoader.browser.d.ts +11 -0
  74. package/types/src/loader/moduleLoader.browser.d.ts.map +1 -0
  75. package/types/src/loader/moduleLoader.node.d.ts +15 -0
  76. package/types/src/loader/moduleLoader.node.d.ts.map +1 -0
  77. package/types/src/plugin/generate.d.ts +17 -0
  78. package/types/src/plugin/generate.d.ts.map +1 -0
  79. package/types/src/plugin/vite.d.ts +24 -0
  80. package/types/src/plugin/vite.d.ts.map +1 -0
  81. package/types/src/runtime/Constants.d.ts +9 -0
  82. package/types/src/runtime/Constants.d.ts.map +1 -0
  83. package/types/src/runtime/index.d.ts +2 -0
  84. package/types/src/runtime/index.d.ts.map +1 -0
  85. package/types/src/tags/DocTags.d.ts +46 -0
  86. package/types/src/tags/DocTags.d.ts.map +1 -0
  87. package/types/src/tags/index.d.ts +2 -0
  88. package/types/src/tags/index.d.ts.map +1 -0
  89. package/types/src/type/CompileOptions.d.ts +58 -0
  90. package/types/src/type/CompileOptions.d.ts.map +1 -0
  91. package/types/src/type/CompiledModule.d.ts +70 -0
  92. package/types/src/type/CompiledModule.d.ts.map +1 -0
  93. package/types/src/type/Diagnostic.d.ts +120 -0
  94. package/types/src/type/Diagnostic.d.ts.map +1 -0
  95. package/types/src/type/Types.d.ts +72 -0
  96. package/types/src/type/Types.d.ts.map +1 -0
  97. package/types/src/type/index.d.ts +6 -0
  98. package/types/src/type/index.d.ts.map +1 -0
  99. package/types/src/worker/WorkerWrapper.d.ts +44 -0
  100. package/types/src/worker/WorkerWrapper.d.ts.map +1 -0
  101. package/types/src/worker/index.d.ts +2 -0
  102. package/types/src/worker/index.d.ts.map +1 -0
  103. package/browser/cjs/BSbIAsHhYU7A5end.cjs +0 -6
  104. package/browser/cjs/CBX--k0ZF7N3ca9G.cjs +0 -6
  105. package/browser/cjs/CK5E20Dn71XrTL6f.cjs +0 -1513
  106. package/browser/cjs/CqvlpYJcTXwLSCeF.cjs +0 -6
  107. package/browser/cjs/X_4PpRMAyEugNQVF.cjs +0 -32
  108. package/browser/esm/BLVMvYOWPFJLAiVU.mjs +0 -1588
  109. package/browser/esm/BrgkkarCKAJwXqVq.mjs +0 -24
  110. package/browser/esm/CESLtyXDfsydQVVg.mjs +0 -29
  111. package/browser/esm/D3or5W11kF3AtQDv.mjs +0 -266
  112. package/browser/esm/abRLINET0a_kxRah.mjs +0 -21
  113. package/node/esm/-NP1i_GBpal8QBm3.mjs +0 -1588
  114. package/node/esm/CkU2dBuZtTuNqHcn.mjs +0 -266
  115. package/node/esm/D3lnhtV6t_HipNni.mjs +0 -16
  116. package/node/esm/DI8Xz2qZF4qNjBVV.mjs +0 -29
  117. package/node/esm/DlKzpSFnzfag8ZYJ.mjs +0 -14
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./DRa-YITYJZzB6CN0.mjs";
8
+ async function t(t, n) {
9
+ let { writeFile: r, mkdtemp: i } = await import("node:fs/promises"), { tmpdir: a } = await import("node:os"), { join: o } = await import("node:path"), { pathToFileURL: s } = await import("node:url"), c = t;
10
+ n?.sourceMap && (c += `\n${e}=${n.sourceMap}`);
11
+ let l = o(await i(o(a(), "sheetxl-script-")), "module.mjs");
12
+ return await r(l, c, "utf8"), import(
13
+ /* @vite-ignore */
14
+ s(l).href
15
+ );
16
+ }
17
+ export { t as loadCompiledModule };
@@ -0,0 +1,152 @@
1
+ /**
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./index.mjs";
8
+ import { analyzeModule as t } from "./t_oN97enVU1dxwlA.mjs";
9
+ import { t as n } from "./DRa-YITYJZzB6CN0.mjs";
10
+ import { CommonUtils as r } from "@sheetxl/utils";
11
+ var i = null, a = null, o = { compilerOptions: { target: "esnext" } };
12
+ async function s(t, n, r = "/script.js", s = e) {
13
+ try {
14
+ let e = await async function() {
15
+ if (i) return i;
16
+ if (a) {
17
+ if (await a, !i) throw Error("ESBuild initialization promise resolved, but instance is not available.");
18
+ return i;
19
+ }
20
+ let e, t;
21
+ a = new Promise((n, r) => {
22
+ e = n, t = r;
23
+ });
24
+ try {
25
+ let { initialize: t } = await import("./MHtkzgv6-lmftCf4.mjs");
26
+ return i = await t(), e(), i;
27
+ } catch (e) {
28
+ throw console.error("Failed to import or initialize esbuild:", e), a = null, t(e), e;
29
+ }
30
+ }(), t = "@sheetxl/primitives", c = `\n export const FormulaContext = globalThis.${s}?.FormulaContext;\n export const ScalarType = globalThis.${s}?.ScalarType;\n export const Observable = globalThis.${s}?.Observable;\n export const IRange = globalThis.${s}?.IRange;\n export const FormulaError = globalThis.${s}?.FormulaError;\n // Add more exports as needed\n `, l = await e.build({
31
+ entryPoints: [r],
32
+ bundle: !0,
33
+ write: !1,
34
+ format: "esm",
35
+ plugins: [{
36
+ name: "sheetxl-esbuild-in-memory",
37
+ setup(e) {
38
+ let i = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();
39
+ e.onResolve({ filter: RegExp(`^(${r.replace("/", "\\/")}|${t})$`) }, (e) => ({
40
+ path: e.path,
41
+ namespace: i
42
+ })), e.onResolve({ filter: /.*/ }, (e) => {
43
+ if (e.namespace !== i) return console.warn(`esbuild: Treating import "${e.path}" as external.`), {
44
+ path: e.path,
45
+ external: !0
46
+ };
47
+ }), e.onLoad({
48
+ filter: /.*/,
49
+ namespace: i
50
+ }, (e) => {
51
+ let a;
52
+ if (e.path === r) a = n;
53
+ else {
54
+ if (e.path !== t) return { errors: [{ text: `Cannot load unknown path in ${i}: ${e.path}` }] };
55
+ a = c;
56
+ }
57
+ return {
58
+ contents: a,
59
+ loader: "ts"
60
+ };
61
+ });
62
+ }
63
+ }],
64
+ sourcemap: "inline",
65
+ tsconfigRaw: o,
66
+ minify: !0,
67
+ platform: "neutral"
68
+ });
69
+ if (l.outputFiles && l.outputFiles.length > 0) return l.outputFiles[0].text;
70
+ throw l.errors && l.errors.length > 0 ? Error(`esbuild bundling failed: ${l.errors.map((e) => e.text).join("\n")}`) : Error("esbuild did not produce an output file.");
71
+ } catch (e) {
72
+ throw console.error("esbuild bundling process failed:", e), e;
73
+ }
74
+ }
75
+ var c = async () => "\n interface FirstTest {\n isTrue?: boolean;\n }\n", l = null;
76
+ async function u() {
77
+ if (l) return l;
78
+ try {
79
+ return await (await import("./BpJRg8aS8svFd1fz.mjs")).initialize();
80
+ } catch (e) {
81
+ throw l = null, e;
82
+ } finally {
83
+ l = null;
84
+ }
85
+ }
86
+ async function d(i) {
87
+ let a = i?.source ?? null;
88
+ if (!a) return {
89
+ module: null,
90
+ diagnostics: []
91
+ };
92
+ let o = (i.disableBundle || i.declarationsOnly) ?? !1, [l, d] = await Promise.all([c(), u()]), f = "", p = {
93
+ allowJs: !0,
94
+ declaration: !1,
95
+ sourceMap: !1,
96
+ inlineSourceMap: !1,
97
+ inlineSources: !1,
98
+ isolatedModules: !0,
99
+ preserveConstEnums: !1,
100
+ module: 99,
101
+ noResolve: !0,
102
+ emitDeclarationOnly: !1,
103
+ target: d.ScriptTarget.ES2020
104
+ }, m = "script", h = `${m}.ts`, g = "lib.d.ts", _ = "global.d.ts", v = {
105
+ [h]: a,
106
+ [g]: "\n/**\n * Represents the completion of an asynchronous operation\n */\ninterface Promise<T> {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise<T>;\n}\n",
107
+ [_]: l
108
+ }, y = d.createProgram([h, _], p, {
109
+ getSourceFile: (e, t, n, r) => d.createSourceFile(e, v[e], d.ScriptTarget.Latest, !0),
110
+ fileExists: (e) => v[e] !== void 0,
111
+ readFile: (e) => v[e],
112
+ writeFile: (e, t) => {
113
+ v[e] = t;
114
+ },
115
+ getCurrentDirectory: () => "./",
116
+ getCanonicalFileName: (e) => e,
117
+ useCaseSensitiveFileNames: () => !0,
118
+ getDefaultLibFileName: (e) => g,
119
+ getNewLine: () => "\n"
120
+ }), b = y.getTypeChecker(), x = y.getSourceFile(h);
121
+ y.emit(), f = v[`${m}.js`] ?? "";
122
+ let S = y.getSyntacticDiagnostics(x).map((e) => ({
123
+ start: e.start ?? 0,
124
+ length: e.length ?? 0,
125
+ severity: "error",
126
+ code: `TS${e.code}`,
127
+ message: d.flattenDiagnosticMessageText(e.messageText, "\n")
128
+ })), C = t(d, x, b, { builtInNames: i.builtInNames }), w = [...S, ...C.diagnostics], T = C.functions, E = C.autoRun, D = w.some((e) => e.severity === "error"), O = `${r.uuidV4()}-script`, k = null;
129
+ if (D) f = "";
130
+ else {
131
+ try {
132
+ o || (f = await s(0, f, m));
133
+ } catch {
134
+ console.warn("Error bundling script");
135
+ }
136
+ let t = f.indexOf(n);
137
+ t > -1 && (k = f.substring(t + n.length + 1, f.length), f = f.substring(0, t), f = f.replaceAll("globalThis." + e, e));
138
+ }
139
+ let A = {
140
+ functions: T,
141
+ commitId: O,
142
+ source: a,
143
+ name: "Script",
144
+ language: "typescript",
145
+ compiled: f
146
+ };
147
+ return k && (A.sourceMap = k), E && (A.autoRun = E), {
148
+ module: A,
149
+ diagnostics: w
150
+ };
151
+ }
152
+ export { d as compileModule };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ var e = class {
8
+ constructor(e = {}) {
9
+ this.workerWrapper = null;
10
+ }
11
+ async getWorkerWrapper() {
12
+ if (this.workerWrapper) return this.workerWrapper;
13
+ let { createCompilerWorker: e } = await import("./07eMkALj6l3ic2-e.mjs");
14
+ return this.workerWrapper = await e(), this.workerWrapper;
15
+ }
16
+ async compileModule(e) {
17
+ try {
18
+ return (await this.getWorkerWrapper()).execute(e);
19
+ } catch (e) {
20
+ throw console.error("Failed to compile using worker:", e), e;
21
+ }
22
+ }
23
+ terminate() {
24
+ this.workerWrapper?.terminate(), this.workerWrapper = null;
25
+ }
26
+ };
27
+ export { e as TypeScriptCompiler };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import * as e from "esbuild-wasm";
8
+ var t = null;
9
+ function n() {
10
+ return t ||= e.initialize({}).then(() => e), t;
11
+ }
12
+ export { n as initialize };
@@ -1,21 +1,145 @@
1
- import { CommonUtils as u } from "@sheetxl/utils";
2
1
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.22
4
- *
5
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
- * License: The license can be found at https://www.sheetxl.com/license.
7
- */
8
- let i = null, n = null, e = null;
9
- const p = Object.freeze({ compileTypescript: async function(t) {
10
- if (!(t?.source ?? null)) return null;
11
- if (n && u.deepEqual(n, t)) return i;
12
- const l = await (async function() {
13
- if (e) return e;
14
- const { TypeScriptCompiler: o } = await import("./DI8Xz2qZF4qNjBVV.mjs");
15
- return e = new o(), e;
16
- })(), r = await l.compileModule(t);
17
- return i = r, n = t, r;
18
- } });
19
- export {
20
- p as ScriptingUtils
21
- };
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { CommonUtils as e } from "@sheetxl/utils";
8
+ var t = Object.defineProperty, n = (e, n) => {
9
+ let r = {};
10
+ for (var i in e) t(r, i, {
11
+ get: e[i],
12
+ enumerable: !0
13
+ });
14
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
15
+ }, r = Object.freeze({
16
+ NoBody: "SXL1001",
17
+ Anonymous: "SXL1002",
18
+ ParseError: "SXL1003",
19
+ InvalidParamType: "SXL2001",
20
+ InvalidReturnType: "SXL2002",
21
+ UndefinedInput: "SXL2003",
22
+ MissingType: "SXL2004",
23
+ UntypedArray: "SXL2005",
24
+ GenericArity: "SXL2006",
25
+ MultipleModifiers: "SXL2007",
26
+ ContextNotFirst: "SXL2010",
27
+ MultipleLambda: "SXL2020",
28
+ LambdaNotLast: "SXL2021",
29
+ LambdaScalarMismatch: "SXL2022",
30
+ LambdaReturn: "SXL2023",
31
+ FunctionReturn: "SXL2024",
32
+ LambdaArity: "SXL2025",
33
+ ArrayDepth: "SXL2030",
34
+ RepeatingPosition: "SXL2040",
35
+ MultipleRepeating: "SXL2041",
36
+ RepeatingSlots: "SXL2042",
37
+ RepeatingOptional: "SXL2043",
38
+ NoExports: "SXL3001",
39
+ UnknownParam: "SXL3002",
40
+ BuiltInName: "SXL3003",
41
+ MissingSummary: "SXL9001",
42
+ MissingParamDescription: "SXL9002",
43
+ MissingReturns: "SXL9003"
44
+ }), i = [
45
+ {
46
+ name: "summary",
47
+ group: "sheetxl",
48
+ description: "Short description shown in function tooltips and autocomplete."
49
+ },
50
+ {
51
+ name: "param",
52
+ group: "jsdoc",
53
+ description: "Document a parameter. A string union type becomes a dropdown of allowed options.",
54
+ snippet: "param ${1:name} ${2:description}"
55
+ },
56
+ {
57
+ name: "returns",
58
+ aliases: ["return"],
59
+ group: "jsdoc",
60
+ description: "Describe the return value."
61
+ },
62
+ {
63
+ name: "category",
64
+ group: "sheetxl",
65
+ description: "Group the function under a category in the function list.",
66
+ snippet: "category ${1:name}"
67
+ },
68
+ {
69
+ name: "name",
70
+ group: "sheetxl",
71
+ description: "Override the displayed function name.",
72
+ snippet: "name ${1:NAME}"
73
+ },
74
+ {
75
+ name: "description",
76
+ group: "sheetxl",
77
+ description: "A longer description of the function."
78
+ },
79
+ {
80
+ name: "deprecated",
81
+ group: "sheetxl",
82
+ standalone: !0,
83
+ description: "Mark the function as deprecated (optionally with a reason)."
84
+ },
85
+ {
86
+ name: "hidden",
87
+ group: "sheetxl",
88
+ standalone: !0,
89
+ description: "Hide the function from the function list."
90
+ },
91
+ {
92
+ name: "example",
93
+ group: "jsdoc",
94
+ description: "Provide a usage example."
95
+ },
96
+ {
97
+ name: "see",
98
+ group: "jsdoc",
99
+ description: "Reference a related function or link."
100
+ }
101
+ ], a = (() => {
102
+ let e = /* @__PURE__ */ new Map();
103
+ for (let t of i) if (e.set(t.name, t), t.aliases) for (let n of t.aliases) e.set(n, t);
104
+ return e;
105
+ })();
106
+ function o(e) {
107
+ return !0 === function(e) {
108
+ if (!e) return;
109
+ let t = (e.startsWith("@") ? e.slice(1) : e).toLowerCase();
110
+ return a.get(t);
111
+ }(e)?.standalone;
112
+ }
113
+ var s = n({ GLOBAL_CONTEXT_VARIABLE: () => c }), c = "__SHEETXL";
114
+ async function l(e, t) {
115
+ let { loadCompiledModule: n } = await import("./DX7jQUpPgudcUIMl.mjs");
116
+ return n(e, t);
117
+ }
118
+ var u = null, d = null, f = null, p = null;
119
+ async function m() {
120
+ return p ||= (async () => (await import("./BpJRg8aS8svFd1fz.mjs")).initialize())(), p;
121
+ }
122
+ var h = Object.freeze({
123
+ compile: async function(t) {
124
+ if (!t?.source) return {
125
+ module: null,
126
+ diagnostics: []
127
+ };
128
+ if (d && e.deepEqual(d, t)) return u;
129
+ let n = await (await async function() {
130
+ if (f) return f;
131
+ let { TypeScriptCompiler: e } = await import("./LMRQvZ1FTfeeBOAm.mjs");
132
+ return f = new e();
133
+ }()).compileModule(t);
134
+ return u = n, d = t, n;
135
+ },
136
+ lint: async function(e, t) {
137
+ if (!e) return [];
138
+ let [n, { lintScript: r }] = await Promise.all([m(), import("./t_oN97enVU1dxwlA.mjs")]);
139
+ return r(n, e, t);
140
+ },
141
+ cleanup: function() {
142
+ f && (f.terminate(), f = null, u = null);
143
+ }
144
+ });
145
+ export { s as Constants, r as DiagnosticCode, i as DocTags, h as ScriptCompiler, l as loadCompiledModule, o as n, c as t };