@sheetxl/scripting 0.4.10 → 0.4.11

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 (23) hide show
  1. package/browser/cjs/{CuRwP5MTc0sKqfRf.cjs → 0e_ieEwRgvHNzBct.cjs} +387 -385
  2. package/browser/cjs/{CJbQzW9SauWj1FBs.cjs → Bpcm__gmXmCT_9GX.cjs} +1 -1
  3. package/browser/cjs/{Bsq5VlJY-Td38K9C.cjs → BuB0aUcbgtZttT_w.cjs} +5 -5
  4. package/browser/cjs/CiJlgV1IXEmXJpsD.cjs +13 -0
  5. package/browser/cjs/{BPtWwADfTFtbtFp1.cjs → DHftuK8qPwcJe7Zj.cjs} +2 -2
  6. package/browser/cjs/index.cjs +2 -2
  7. package/browser/cjs/{D7hfNYOs7_pkIGbS.cjs → svT_bjMJTvfjJKLz.cjs} +1 -1
  8. package/browser/esm/{CScJG5QypXGnPkR2.mjs → B1ySwHm9YBwNYmJx.mjs} +387 -385
  9. package/browser/esm/{DK5PDu18K4_x66tQ.mjs → BCebrtm_TvBRuVB_.mjs} +58 -52
  10. package/browser/esm/{kareFFeW32O_ajMm.mjs → CKXcZ5awOabLTBIS.mjs} +1 -1
  11. package/browser/esm/{GsUk_uxd64EIkKwU.mjs → CoWXpBDGlVMCdmL6.mjs} +20 -20
  12. package/browser/esm/{fKEbHLCqu8DVTdFS.mjs → DVU8CuXcV7gxTc_P.mjs} +1 -1
  13. package/{node/esm/BwmZ8LkckrBAukJF.mjs → browser/esm/T3-nyuSCbau9JYmi.mjs} +2 -2
  14. package/browser/esm/index.mjs +2 -2
  15. package/licenses/dependencies.txt +2 -2
  16. package/node/esm/{B4O_Vb46djSB-6pt.mjs → BIvKOd32LAmxQo9T.mjs} +1 -1
  17. package/node/esm/{DHRL2LI8r6S4fCwI.mjs → DJicGDnUI-FD-BZk.mjs} +1 -1
  18. package/node/esm/{CiTOh9mK8ZyCe6vy.mjs → KKXOq6IO5VJGFx3U.mjs} +3 -3
  19. package/{browser/esm/BU7b75vTym2nREBl.mjs → node/esm/bYDfL7gXUKKr8g9_.mjs} +2 -2
  20. package/node/esm/{Ankf3x5Wv3jyLLnO.mjs → dFmhuJa_KcpGexrv.mjs} +387 -385
  21. package/node/esm/index.mjs +2 -2
  22. package/package.json +3 -3
  23. package/browser/cjs/DOgVGbF-vm0eId3R.cjs +0 -13
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
7
  const h = "text/html", b = "text/plain", L = "image/png", Tt = Object.freeze({ left: 0, top: 0 }), Ct = Object.freeze({ left: 0, top: 0, bottom: 0, right: 0 }), Mt = Object.freeze({ x: 0, y: 0, width: 0, height: 0 });
8
8
  Object.freeze(Object.defineProperty({ __proto__: null, EmptyBounds: Mt, EmptyRect: Ct, EmptyTopLeft: Tt }, Symbol.toStringTag, { value: "Module" }));
9
- const m = "column", j = "row", Rt = Object.freeze({ colIndex: 0, rowIndex: 0 }), At = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), yt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, gt = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, Ft = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Lt = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, J = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, H = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, bt = (e = j, t = !1) => t ? e !== m ? Ft : Lt : e !== m ? gt : yt, Y = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, D = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, $ = (e, t) => !(!e || !t || e.colStart > t.colEnd || t.colStart > e.colEnd || e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), K = (e, t) => {
9
+ const m = "column", j = "row", Rt = Object.freeze({ colIndex: 0, rowIndex: 0 }), At = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), yt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, gt = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, Ft = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Lt = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, J = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, H = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, bt = (e = j, t = !1) => t ? e !== m ? Ft : Lt : e !== m ? gt : yt, K = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, D = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, $ = (e, t) => !(!e || !t || e.colStart > t.colEnd || t.colStart > e.colEnd || e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), Y = (e, t) => {
10
10
  if (e === t) return !0;
11
11
  if (!e || !t || e.length !== t.length) return !1;
12
12
  for (let n = 0; n < e.length; n++) if (!D(e[n], t[n])) return !1;
@@ -36,23 +36,23 @@ function X(e, t = 2, n, r = j, o) {
36
36
  do {
37
37
  const c = a.sort(bt(i ? j : m));
38
38
  a = [], a.push(c[0]);
39
- const d = c.length;
40
- let w = 0, u = c[0], f = u.colStart, p = u.rowStart, x = u.colEnd, O = u.rowEnd;
41
- for (let A = 1; A < d; A++) {
39
+ const u = c.length;
40
+ let w = 0, d = c[0], f = d.colStart, p = d.rowStart, x = d.colEnd, O = d.rowEnd;
41
+ for (let A = 1; A < u; A++) {
42
42
  const g = c[A];
43
43
  let G = !1;
44
- if (G = i ? u && p === g.rowStart && O === g.rowEnd && x + 1 === g.colStart : u && f === g.colStart && x === g.colEnd && O + 1 === g.rowStart, G) {
44
+ if (G = i ? d && p === g.rowStart && O === g.rowEnd && x + 1 === g.colStart : d && f === g.colStart && x === g.colEnd && O + 1 === g.rowStart, G) {
45
45
  let S = { colStart: f, rowStart: p, colEnd: i ? g.colEnd : x, rowEnd: i ? O : g.rowEnd };
46
- if (u.value !== void 0 && (S.value = u.value), n) {
46
+ if (d.value !== void 0 && (S.value = d.value), n) {
47
47
  const F = o ?? [null, null];
48
- F[0] = u, F[1] = g, S = n(F, S, r);
48
+ F[0] = d, F[1] = g, S = n(F, S, r);
49
49
  }
50
50
  if (S) {
51
- a[w] = S, s = !0, u = S, f = u.colStart, p = u.rowStart, x = u.colEnd, O = u.rowEnd;
51
+ a[w] = S, s = !0, d = S, f = d.colStart, p = d.rowStart, x = d.colEnd, O = d.rowEnd;
52
52
  continue;
53
53
  }
54
54
  }
55
- a[++w] = g, u = g, f = u.colStart, p = u.rowStart, x = u.colEnd, O = u.rowEnd;
55
+ a[++w] = g, d = g, f = d.colStart, p = d.rowStart, x = d.colEnd, O = d.rowEnd;
56
56
  }
57
57
  l++, i = !i, l === 1 && (s = !0);
58
58
  } while (l < t && s && a.length > 1);
@@ -66,16 +66,16 @@ Object.freeze(Object.defineProperty({ __proto__: null, EmptyCell: Rt, EmptyRange
66
66
  const n = [];
67
67
  let r, o, a = Number.MIN_SAFE_INTEGER, i = Number.MIN_SAFE_INTEGER;
68
68
  return { append: (l, s, c) => {
69
- let d = !0;
69
+ let u = !0;
70
70
  const w = c !== void 0;
71
71
  if (w) {
72
72
  const p = e ? e(o, c, t) : o === c ? c : void 0;
73
- p === void 0 ? d = !1 : c = p;
73
+ p === void 0 ? u = !1 : c = p;
74
74
  }
75
- if (d && s === i + 1 && l === a) return t ? r.rowEnd = s : r.colEnd = s, i = s, void (o = c);
75
+ if (u && s === i + 1 && l === a) return t ? r.rowEnd = s : r.colEnd = s, i = s, void (o = c);
76
76
  r && n.push(r);
77
- const u = t ? l : s, f = t ? s : l;
78
- r = { colStart: u, rowStart: f, colEnd: u, rowEnd: f }, w && (r.value = c), a = l, i = s, o = c;
77
+ const d = t ? l : s, f = t ? s : l;
78
+ r = { colStart: d, rowStart: f, colEnd: d, rowEnd: f }, w && (r.value = c), a = l, i = s, o = c;
79
79
  }, done: (l) => (r && (n.push(r), r = null), l ? X(n, 3, l === !0 ? Pt : l, t ? m : j, Ut) : n) };
80
80
  }, createRangeComparator: bt, defaultRange: (e, t, n) => e ? n ? (n.colStart = e.colStart ?? t.colStart, n.rowStart = e.rowStart ?? t.rowStart, n.colEnd = e.colEnd ?? t.colEnd, n.rowEnd = e.rowEnd ?? t.rowEnd, n) : { colStart: e.colStart ?? t.colStart, rowStart: e.rowStart ?? t.rowStart, colEnd: e.colEnd ?? t.colEnd, rowEnd: e.rowEnd ?? t.rowEnd } : t, extendRangeToIntersectingRanges: Z, extendRangeToUnionRanges: (e, t) => {
81
81
  if (!t || t.length === 0) return e;
@@ -93,7 +93,7 @@ Object.freeze(Object.defineProperty({ __proto__: null, EmptyCell: Rt, EmptyRange
93
93
  const r = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), a = Math.min(e.colEnd, t.colEnd), i = Math.min(e.rowEnd, t.rowEnd);
94
94
  let l = n;
95
95
  return l ? (l.colStart = r, l.rowStart = o, l.colEnd = a, l.rowEnd = i) : l = { colStart: r, rowStart: o, colEnd: a, rowEnd: i }, l;
96
- }, isCellWithinRange: (e, t) => !(!e || !t || e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd || e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: Y, isEqualRanges: D, isEqualRangesArrays: K, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!Y(e.cell, t.cell) && K(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd || e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: $, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !(!e || typeof e.colStart != "number" || e.colStart < 0 || typeof e.colEnd != "number" || e.colEnd < e.colStart || typeof e.rowStart != "number" || e.rowStart < 0 || typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: X, rowFirstCellComparator: H, rowFirstRangeComparator: gt, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, n = -e.colStart, r) => r ? (r.colStart = e.colStart + n, r.rowStart = e.rowStart + t, r.colEnd = e.colEnd + n, r.rowEnd = e.rowEnd + t, r) : { colStart: e.colStart + n, rowStart: e.rowStart + t, colEnd: e.colEnd + n, rowEnd: e.rowEnd + t }, unionRanges: U, unionRangesArrays: (e, t, n) => {
96
+ }, isCellWithinRange: (e, t) => !(!e || !t || e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd || e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: K, isEqualRanges: D, isEqualRangesArrays: Y, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!K(e.cell, t.cell) && Y(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd || e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: $, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !(!e || typeof e.colStart != "number" || e.colStart < 0 || typeof e.colEnd != "number" || e.colEnd < e.colStart || typeof e.rowStart != "number" || e.rowStart < 0 || typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: X, rowFirstCellComparator: H, rowFirstRangeComparator: gt, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, n = -e.colStart, r) => r ? (r.colStart = e.colStart + n, r.rowStart = e.rowStart + t, r.colEnd = e.colEnd + n, r.rowEnd = e.rowEnd + t, r) : { colStart: e.colStart + n, rowStart: e.rowStart + t, colEnd: e.colEnd + n, rowEnd: e.rowEnd + t }, unionRanges: U, unionRangesArrays: (e, t, n) => {
97
97
  if (!e || e.length === 0) return null;
98
98
  if (e.length === 1 && !t) return e[0];
99
99
  let r = e[0];
@@ -106,7 +106,9 @@ function Nt(e) {
106
106
  return !!t && typeof t == "object";
107
107
  }(e) && !function(t) {
108
108
  const n = Object.prototype.toString.call(t);
109
- return n === "[object RegExp]" || n === "[object Date]" || t.$$typeof === kt;
109
+ return n === "[object RegExp]" || n === "[object Date]" || function(r) {
110
+ return r.$$typeof === kt;
111
+ }(t);
110
112
  }(e);
111
113
  }
112
114
  function I(e, t) {
@@ -119,10 +121,11 @@ function Bt(e, t, n) {
119
121
  });
120
122
  }
121
123
  function Q(e) {
122
- return Object.keys(e).concat((t = e, Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
123
- return Object.propertyIsEnumerable.call(t, n);
124
- }) : []));
125
- var t;
124
+ return Object.keys(e).concat(function(t) {
125
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(n) {
126
+ return Object.propertyIsEnumerable.call(t, n);
127
+ }) : [];
128
+ }(e));
126
129
  }
127
130
  function tt(e, t) {
128
131
  try {
@@ -139,11 +142,12 @@ function E(e, t, n) {
139
142
  return i.isMergeableObject(o) && Q(o).forEach(function(s) {
140
143
  l[s] = I(o[s], i);
141
144
  }), Q(a).forEach(function(s) {
142
- var c, d;
143
- tt(c = o, d = s) && (!Object.hasOwnProperty.call(c, d) || !Object.propertyIsEnumerable.call(c, d)) || (tt(o, s) && i.isMergeableObject(a[s]) ? l[s] = function(w, u) {
145
+ (function(c, u) {
146
+ return tt(c, u) && !(Object.hasOwnProperty.call(c, u) && Object.propertyIsEnumerable.call(c, u));
147
+ })(o, s) || (tt(o, s) && i.isMergeableObject(a[s]) ? l[s] = function(c, u) {
144
148
  if (!u.customMerge) return E;
145
- const f = u.customMerge(w);
146
- return typeof f == "function" ? f : E;
149
+ const w = u.customMerge(c);
150
+ return typeof w == "function" ? w : E;
147
151
  }(s, i)(o[s], a[s], i) : l[s] = I(a[s], i));
148
152
  }), l;
149
153
  }(e, t, n) : I(t, n);
@@ -195,14 +199,14 @@ const it = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeEl
195
199
  }), debounce: function(e, t = 300, n = !1) {
196
200
  let r, o, a, i, l = 0;
197
201
  function s() {
198
- let d = Date.now() - l;
199
- d < t && d >= 0 ? r = setTimeout(s, t - d) : (r = null, n || (i = e.apply(a, o), a = o = null));
202
+ let u = Date.now() - l;
203
+ u < t && u >= 0 ? r = setTimeout(s, t - u) : (r = null, n || (i = e.apply(a, o), a = o = null));
200
204
  }
201
205
  t == null && (t = 100);
202
206
  const c = function() {
203
207
  a = globalThis, o = arguments, l = Date.now();
204
- var d = n && !r;
205
- return r || (r = setTimeout(s, t)), d && (i = e.apply(a, o), a = o = null), i;
208
+ var u = n && !r;
209
+ return r || (r = setTimeout(s, t)), u && (i = e.apply(a, o), a = o = null), i;
206
210
  };
207
211
  return c.clear = function() {
208
212
  r && (clearTimeout(r), r = null);
@@ -504,17 +508,19 @@ Object.freeze(Object.defineProperty({ __proto__: null, DATA_URL_PNG_PREFIX: Ot,
504
508
  const a = t?.properties, i = t?.arrayType ?? !1;
505
509
  let l = o;
506
510
  if (t && t.merge && l && r) l = t.merge(l, r, n);
507
- else if (!i && a) {
508
- const s = Object.keys({ ...o, ...r });
509
- l = null;
510
- for (let c = 0; c < s.length; c++) {
511
- const d = s[c];
512
- let w, u = o[d];
513
- if (u !== void 0) {
514
- const f = a[d];
515
- w = f ? (0, ct.resolveTypedUpdates)(u, f, n, r?.[d]) : u;
516
- } else w = r?.[d];
517
- w != null && (l = l ?? {}, l[d] = w);
511
+ else if (!i) {
512
+ if (a) {
513
+ const s = Object.keys({ ...o, ...r });
514
+ l = null;
515
+ for (let c = 0; c < s.length; c++) {
516
+ const u = s[c];
517
+ let w, d = o[u];
518
+ if (d !== void 0) {
519
+ const f = a[u];
520
+ w = f ? (0, ct.resolveTypedUpdates)(d, f, n, r?.[u]) : d;
521
+ } else w = r?.[u];
522
+ w != null && (l = l ?? {}, l[u] = w);
523
+ }
518
524
  }
519
525
  }
520
526
  return l;
@@ -688,29 +694,29 @@ class wt {
688
694
  await N(), o && a.length === 0 && (a.push(new ClipboardItem({ [v]: new Blob([o], { type: v }) })), a.push(new ClipboardItem({ [h]: new Blob([ft(o)], { type: h }) })));
689
695
  for (let l = 0; l < Math.min(1, a.length); l++) {
690
696
  const s = a[l];
691
- let c = s.types.indexOf(h), d = null;
697
+ let c = s.types.indexOf(h), u = null;
692
698
  if (c !== -1) {
693
699
  const f = await s.getType(h);
694
- d = await W(f), d && (d = Wt(o, d));
700
+ u = await W(f), u && (u = Wt(o, u));
695
701
  }
696
- if (!d && s.types.includes(b)) {
702
+ if (!u && s.types.includes(b)) {
697
703
  const f = await s.getType(b);
698
704
  if (f) {
699
705
  let p = null;
700
- typeof f == "string" ? (console.warn("text as string", f), p = f) : p = await W(f), p && (d = `<div ${C}="${o}">${p}</div>`);
706
+ typeof f == "string" ? (console.warn("text as string", f), p = f) : p = await W(f), p && (u = `<div ${C}="${o}">${p}</div>`);
701
707
  }
702
708
  }
703
- if (!d && s.types.includes(L)) {
709
+ if (!u && s.types.includes(L)) {
704
710
  const f = await s.getType(L), p = xt(await f.arrayBuffer());
705
- d = `<div ${C}="${o}"><img src="${Ot + p}"/></div>`;
711
+ u = `<div ${C}="${o}"><img src="${Ot + p}"/></div>`;
706
712
  }
707
- !d && o && (d = ft(o));
708
- const w = new Blob([d ?? ""], { type: h }), u = {};
713
+ !u && o && (u = ft(o));
714
+ const w = new Blob([u ?? ""], { type: h }), d = {};
709
715
  for (let f = 0; f < s.types.length; f++) {
710
716
  const p = s.types[f];
711
- u[p] = f === c ? w : s.getType(p);
717
+ d[p] = f === c ? w : s.getType(p);
712
718
  }
713
- d && c === -1 && (u[h] = w), o && (u[v] = new Blob([o], { type: v })), r.push(new ClipboardItem(u));
719
+ u && c === -1 && (d[h] = w), o && (d[v] = new Blob([o], { type: v })), r.push(new ClipboardItem(d));
714
720
  }
715
721
  try {
716
722
  r && r.length !== 0 ? await this._nativeClipboard.write(r) : await (async (l) => {
@@ -809,12 +815,12 @@ const Vt = Object.freeze({ compileTypescript: async function(e) {
809
815
  if (q && $t.deepEqual(q, e)) return ht;
810
816
  const t = await async function() {
811
817
  if (M) return M;
812
- const { TypeScriptCompiler: r } = await import("./BU7b75vTym2nREBl.mjs");
818
+ const { TypeScriptCompiler: r } = await import("./T3-nyuSCbau9JYmi.mjs");
813
819
  return M = new r(), M;
814
820
  }(), n = await t.compileModule(e);
815
821
  return ht = n, q = e, n;
816
822
  } });
817
823
  export {
818
824
  Vt as S,
819
- $t as Y
825
+ $t as e
820
826
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,6 +1,6 @@
1
- import { Y as he } from "./DK5PDu18K4_x66tQ.mjs";
1
+ import { e as he } from "./BCebrtm_TvBRuVB_.mjs";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -166,7 +166,7 @@ var se, q, r;
166
166
  }
167
167
  }
168
168
  e.Field = B;
169
- class W extends a {
169
+ class X extends a {
170
170
  constructor(n, o) {
171
171
  super(e.Code.Calc, e.Label.Calc, n, o);
172
172
  }
@@ -174,7 +174,7 @@ var se, q, r;
174
174
  this.code = e.Code.Calc;
175
175
  }
176
176
  }
177
- e.Calc = W;
177
+ e.Calc = X;
178
178
  class O extends a {
179
179
  constructor(n, o) {
180
180
  super(e.Code.Busy, e.Label.Busy, n, o);
@@ -193,7 +193,7 @@ var se, q, r;
193
193
  }
194
194
  }
195
195
  e.Python = A;
196
- class X extends a {
196
+ class Y extends a {
197
197
  constructor(n, o) {
198
198
  super(e.Code.Timeout, e.Label.Timeout, n, o);
199
199
  }
@@ -201,7 +201,7 @@ var se, q, r;
201
201
  this.code = e.Code.Timeout;
202
202
  }
203
203
  }
204
- e.Timeout = X;
204
+ e.Timeout = Y;
205
205
  })(r || (r = {}));
206
206
  const f = {};
207
207
  f[r.Code.Parse] = r.Parse, f[r.Code.Null] = r.Null, f[r.Code.Div0] = r.Div0, f[r.Code.Value] = r.Value, f[r.Code.Ref] = r.Ref, f[r.Code.Name] = r.Name, f[r.Code.Num] = r.Num, f[r.Code.NA] = r.NA, f[r.Code.GettingData] = r.GettingData, f[r.Code.Spill] = r.Spill, f[r.Code.Connect] = r.Connect, f[r.Code.Blocked] = r.Blocked, f[r.Code.Unknown] = r.Unknown, f[r.Code.Field] = r.Field, f[r.Code.Calc] = r.Calc, f[r.Code.Busy] = r.Busy, f[r.Code.Python] = r.Python, f[r.Code.Timeout] = r.Timeout;
@@ -218,25 +218,25 @@ var u;
218
218
  let p;
219
219
  return p = typeof e == "string" ? de.get(e) : ue.get(e), p || (p = u.Unknown), new p(a, C);
220
220
  }, u.getBuiltInById = (e) => ne.get(e) || xe;
221
- let I = null, Y = null;
221
+ let I = null, H = null;
222
222
  const be = { compilerOptions: { target: "esnext" } };
223
223
  async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
224
224
  try {
225
225
  const F = await async function() {
226
226
  if (I) return I;
227
- if (Y) {
228
- if (await Y, !I) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
227
+ if (H) {
228
+ if (await H, !I) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
229
229
  return I;
230
230
  }
231
231
  let b, N;
232
- Y = new Promise((d, S) => {
232
+ H = new Promise((d, S) => {
233
233
  b = d, N = S;
234
234
  });
235
235
  try {
236
- const { initialize: d } = await import("./kareFFeW32O_ajMm.mjs");
236
+ const { initialize: d } = await import("./CKXcZ5awOabLTBIS.mjs");
237
237
  return I = await d(), b(), I;
238
238
  } catch (d) {
239
- throw console.error("Failed to import or initialize esbuild:", d), Y = null, N(d), d;
239
+ throw console.error("Failed to import or initialize esbuild:", d), H = null, N(d), d;
240
240
  }
241
241
  }(), R = "@sheetxl/primitives", s = `
242
242
  export const FormulaContext = globalThis.${p}?.FormulaContext;
@@ -278,15 +278,15 @@ const ke = async () => `
278
278
  }, Ne = /* @__PURE__ */ new Map([["Scalar", "*"], ["FormulaError.Known", Ce], ["Date", "Date"], ["JSON", "JSON"]]), Se = /* @__PURE__ */ new Map([]), te = "SheetXL";
279
279
  ee(te, pe), ee(te, me), ee(te, Se);
280
280
  const Ee = /* @__PURE__ */ new Map([["Promise", () => ({ async: !0 })], ["Observable", () => ({ stream: !0 })]]);
281
- let H = null;
281
+ let W = null;
282
282
  async function Le() {
283
- if (H) return H;
283
+ if (W) return W;
284
284
  try {
285
- return await (await import("./fKEbHLCqu8DVTdFS.mjs")).initialize();
285
+ return await (await import("./DVU8CuXcV7gxTc_P.mjs")).initialize();
286
286
  } catch (e) {
287
- throw H = null, e;
287
+ throw W = null, e;
288
288
  } finally {
289
- H = null;
289
+ W = null;
290
290
  }
291
291
  }
292
292
  async function ve(e) {
@@ -307,10 +307,10 @@ interface Promise<T> {
307
307
  */
308
308
  finally(onfinally?: (() => void) | undefined | null): Promise<T>;
309
309
  }
310
- `, [_]: R }, W = { getSourceFile: (t, i, T, E) => s.createSourceFile(t, B[t], s.ScriptTarget.Latest, !0), fileExists: (t) => B[t] !== void 0, readFile: (t) => B[t], writeFile: (t, i) => {
310
+ `, [_]: R }, X = { getSourceFile: (t, i, T, E) => s.createSourceFile(t, B[t], s.ScriptTarget.Latest, !0), fileExists: (t) => B[t] !== void 0, readFile: (t) => B[t], writeFile: (t, i) => {
311
311
  B[t] = i;
312
312
  }, getCurrentDirectory: () => "./", getCanonicalFileName: (t) => t, useCaseSensitiveFileNames: () => !0, getDefaultLibFileName: (t) => G, getNewLine: () => `
313
- ` }, O = s.createProgram([S, _], N, W), A = O.getTypeChecker(), X = O.getSourceFile(S), m = O.emit();
313
+ ` }, O = s.createProgram([S, _], N, X), A = O.getTypeChecker(), Y = O.getSourceFile(S), m = O.emit();
314
314
  m.diagnostics.length > 0 && console.warn(m.diagnostics), K = B[`${d}.js`];
315
315
  const n = (t, i, T, E) => {
316
316
  if (t) {
@@ -356,7 +356,7 @@ interface Promise<T> {
356
356
  }, o = [], L = (t, i) => {
357
357
  o.push(i);
358
358
  };
359
- if (s.forEachChild(X, (t) => {
359
+ if (s.forEachChild(Y, (t) => {
360
360
  if (((i) => (s.getCombinedModifierFlags(i) & s.ModifierFlags.Export) !== 0)(t) && s.isFunctionDeclaration(t)) {
361
361
  const i = {}, T = { parameters: {} }, E = t?.name?.getText();
362
362
  try {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -10,7 +10,7 @@ class o {
10
10
  }
11
11
  async getWorkerWrapper() {
12
12
  if (this.workerWrapper) return this.workerWrapper;
13
- const { createCompilerWorker: r } = await import("./Ankf3x5Wv3jyLLnO.mjs");
13
+ const { createCompilerWorker: r } = await import("./B1ySwHm9YBwNYmJx.mjs");
14
14
  return this.workerWrapper = await r(), this.workerWrapper;
15
15
  }
16
16
  async compileModule(r) {
@@ -1,6 +1,6 @@
1
- import { S as t } from "./DK5PDu18K4_x66tQ.mjs";
1
+ import { S as t } from "./BCebrtm_TvBRuVB_.mjs";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  Name: @sheetxl/primitives
2
- Version: 0.4.10
2
+ Version: 0.4.11
3
3
  License: SEE LICENSE IN <LICENSE>
4
4
  Private: false
5
5
  Description: Primitives - Base types for SheetXL functions.
@@ -21,7 +21,7 @@ https://www.sheetxl.com/licensing-pricing
21
21
  ---
22
22
 
23
23
  Name: @sheetxl/utils
24
- Version: 0.4.10
24
+ Version: 0.4.11
25
25
  License: SEE LICENSE IN <LICENSE>
26
26
  Private: false
27
27
  Description: Utils - Utilities used by most SheetXL components.
@@ -1,6 +1,6 @@
1
1
  import * as s from "esbuild-wasm";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,6 +1,6 @@
1
1
  import { e as he } from "./index.mjs";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -233,7 +233,7 @@ async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
233
233
  b = d, N = S;
234
234
  });
235
235
  try {
236
- const { initialize: d } = await import("./B4O_Vb46djSB-6pt.mjs");
236
+ const { initialize: d } = await import("./BIvKOd32LAmxQo9T.mjs");
237
237
  return I = await d(), b(), I;
238
238
  } catch (d) {
239
239
  throw console.error("Failed to import or initialize esbuild:", d), H = null, N(d), d;
@@ -282,7 +282,7 @@ let W = null;
282
282
  async function Le() {
283
283
  if (W) return W;
284
284
  try {
285
- return await (await import("./DHRL2LI8r6S4fCwI.mjs")).initialize();
285
+ return await (await import("./DJicGDnUI-FD-BZk.mjs")).initialize();
286
286
  } catch (e) {
287
287
  throw W = null, e;
288
288
  } finally {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.10
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.4.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -10,7 +10,7 @@ class o {
10
10
  }
11
11
  async getWorkerWrapper() {
12
12
  if (this.workerWrapper) return this.workerWrapper;
13
- const { createCompilerWorker: r } = await import("./CScJG5QypXGnPkR2.mjs");
13
+ const { createCompilerWorker: r } = await import("./dFmhuJa_KcpGexrv.mjs");
14
14
  return this.workerWrapper = await r(), this.workerWrapper;
15
15
  }
16
16
  async compileModule(r) {