@sheetxl/scripting 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./D1aa_3qrIHDuhsO-.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./CT0S-WHf7X39cTea.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
@@ -1,10 +1,10 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
7
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
8
8
  *
9
9
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
10
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -15,4 +15,4 @@ Please use Chrome or Edge if external copy and paste is required.`,k=`You do not
15
15
  All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
16
16
  Copy and paste will be limited to within the browser tab.
17
17
 
18
- Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{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})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=Ot(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${_t+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!(e?.source??null))return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./8NufiPMBFCkb6YWH.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}});exports.ScriptingUtils=Vt,exports.Yt=xt;
18
+ Please use Chrome or Edge if external copy and paste is required.`,Perms:k,PermsWrite:T()===y.Safari?ut:k,PermsRead:T()===y.Safari?ut:k},N=async()=>new Promise(e=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{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})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=Ot(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${_t+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!(e?.source??null))return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./4EW9W7anuBC4Ixuz.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}});exports.ScriptingUtils=Vt,exports.Yt=xt;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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,10 +1,10 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let c=class{constructor(e){this._worker=null,this._nextId=1,this._pendingRequests=new Map,this._workerFactory=e}start(){if(typeof Worker>"u")throw new Error("Web Workers are not supported in this environment.");return this._worker||(this._worker=this._workerFactory(),this._worker.onmessage=e=>{const{id:n,result:t,error:r}=e.data,o=this._pendingRequests.get(n);if(o)if(this._pendingRequests.delete(n),r){const i=new Error(r.message);i.stack=r.stack,r.cause&&(i.cause=r.cause),o.reject(i)}else o.resolve(t)},this._worker.onerror=e=>{console.error("Worker error:",e),this._pendingRequests.forEach(n=>{n.reject(new Error(`Worker failed: ${e.message}`))}),this._pendingRequests.clear(),this._worker=null}),Promise.resolve()}execute(e){if(!this._worker)throw new Error("Worker is not initialized. Call start() first.");const n=this._nextId++;return new Promise((t,r)=>{this._pendingRequests.set(n,{resolve:t,reject:r}),this._worker.postMessage({id:n,params:e})})}terminate(){this._worker&&(this._worker.terminate(),this._worker=null)}};class u{constructor(n){this._onExecute=n}execute(n){return this._onExecute(n)}start(){return Promise.resolve()}terminate(){}}const s=`/**
7
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
7
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
8
8
  *
9
9
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
10
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -223,7 +223,7 @@ var v;
223
223
  return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
224
224
  }, v.getBuiltInById = (e) => Te.get(e) || Et;
225
225
  /**
226
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
226
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
227
227
  *
228
228
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
229
229
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1503,4 +1503,4 @@ var or = /* @__PURE__ */ Object.freeze({
1503
1503
  __proto__: null,
1504
1504
  initialize: nr
1505
1505
  });
1506
- `,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./C5d09QS4pzaigeXu.cjs")),n=new u(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(typeof process<"u"&&process.versions?.node&&typeof Worker>"u")return await l();if(typeof Worker<"u"){const e=new c(()=>new d);try{return await e.start(),e}catch(n){console.error("Failed to start TypescriptCompiler worker reverting to fallback:",n)}}return await l()};
1506
+ `,a=typeof self<"u"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",s],{type:"text/javascript;charset=utf-8"});function d(e){let n;try{if(n=a&&(self.URL||self.webkitURL).createObjectURL(a),!n)throw"";const t=new Worker(n,{type:"module",name:e?.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(n)}),t}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(s),{type:"module",name:e?.name})}}const l=async()=>{const{compileModule:e}=await Promise.resolve().then(()=>require("./DkIsuPZMPkfoK3Jp.cjs")),n=new u(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(typeof process<"u"&&process.versions?.node&&typeof Worker>"u")return await l();if(typeof Worker<"u"){const e=new c(()=>new d);try{return await e.start(),e}catch(n){console.error("Failed to start TypescriptCompiler worker reverting to fallback:",n)}}return await l()};
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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,14 +1,14 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./D8oj5VpJF45l_w7z.cjs"),ie="n",ge="s",we="b",Ce="e",ae="z";/**
7
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./B3nadCTI8zdSk-gc.cjs"),ie="n",ge="s",we="b",Ce="e",ae="z";/**
7
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
8
8
  *
9
9
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
10
  * License: The license can be found at https://www.sheetxl.com/license.
11
- */var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,o,L,q){super(L,q),this._label=o,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class C extends a{constructor(n,o){super(e.Code.Parse,e.Label.Parse,n,o)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=C;class p extends a{constructor(n,o){super(e.Code.Null,e.Label.Null,n,o)}static{this.code=e.Code.Null}}e.Null=p;class F extends a{constructor(n,o){super(e.Code.Div0,e.Label.Div0,n,o)}static{this.code=e.Code.Div0}}e.Div0=F;class R extends a{constructor(n,o){super(e.Code.Value,e.Label.Value,n,o)}static{this.code=e.Code.Value}}e.Value=R;class s extends a{constructor(n,o){super(e.Code.Ref,e.Label.Ref,n,o)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,o){super(e.Code.Name,e.Label.Name,n,o)}static{this.code=e.Code.Name}}e.Name=K;class k extends a{constructor(n,o){super(e.Code.Num,e.Label.Num,n,o)}static{this.code=e.Code.Num}}e.Num=k;class b extends a{constructor(n,o){super(e.Code.NA,e.Label.NA,n,o)}static{this.code=e.Code.NA}}e.NA=b;class N extends a{constructor(n,o){super(e.Code.GettingData,e.Label.GettingData,n,o)}static{this.code=e.Code.GettingData}}e.GettingData=N;class d extends a{constructor(n,o){super(e.Code.Spill,e.Label.Spill,n,o)}static{this.code=e.Code.Spill}}e.Spill=d;class S extends a{constructor(n,o){super(e.Code.Connect,e.Label.Connect,n,o)}static{this.code=e.Code.Connect}}e.Connect=S;class G extends a{constructor(n,o){super(e.Code.Blocked,e.Label.Blocked,n,o)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,o){super(e.Code.Unknown,e.Label.Unknown,n,o)}static{this.code=e.Code.Unknown}}e.Unknown=_;class B extends a{constructor(n,o){super(e.Code.Field,e.Label.Field,n,o)}static{this.code=e.Code.Field}}e.Field=B;class W extends a{constructor(n,o){super(e.Code.Calc,e.Label.Calc,n,o)}static{this.code=e.Code.Calc}}e.Calc=W;class I extends a{constructor(n,o){super(e.Code.Busy,e.Label.Busy,n,o)}static{this.code=e.Code.Busy}}e.Busy=I;class A extends a{constructor(n,o){super(e.Code.Python,e.Label.Python,n,o)}static{this.code=e.Code.Python}}e.Python=A;class X extends a{constructor(n,o){super(e.Code.Timeout,e.Label.Timeout,n,o)}static{this.code=e.Code.Timeout}}e.Timeout=X})(r||(r={}));const y={};y[r.Code.Parse]=r.Parse,y[r.Code.Null]=r.Null,y[r.Code.Div0]=r.Div0,y[r.Code.Value]=r.Value,y[r.Code.Ref]=r.Ref,y[r.Code.Name]=r.Name,y[r.Code.Num]=r.Num,y[r.Code.NA]=r.NA,y[r.Code.GettingData]=r.GettingData,y[r.Code.Spill]=r.Spill,y[r.Code.Connect]=r.Connect,y[r.Code.Blocked]=r.Blocked,y[r.Code.Unknown]=r.Unknown,y[r.Code.Field]=r.Field,y[r.Code.Calc]=r.Calc,y[r.Code.Busy]=r.Busy,y[r.Code.Python]=r.Python,y[r.Code.Timeout]=r.Timeout;const ce=new Map,ne=new Map,de=new Map,ue=new Map,le=Object.keys(y);for(let e=0;e<le.length;e++){const a=le[e],C=y[a];de.set(r.Label[a],C),ue.set(r.Code[a],C);const p=new C;ce.set(p.getLabel(),p),ne.set(p.getCode(),p)}const xe=ne.get(r.Code.Unknown);var u;(u=r||(r={})).BuiltIn={Parse:new u.Parse,Null:new u.Null,Div0:new u.Div0,Value:new u.Value,Ref:new u.Ref,Name:new u.Name,Num:new u.Num,NA:new u.NA,GettingData:new u.GettingData,Spill:new u.Spill,Connect:new u.Connect,Blocked:new u.Blocked,Unknown:new u.Unknown,Field:new u.Field,Calc:new u.Calc,Busy:new u.Busy,Python:new u.Python,Timeout:new u.Timeout},u.getBuiltInByLabel=e=>ce.get(e),u.newTypedError=(e,a,C)=>{let p;return p=typeof e=="string"?de.get(e):ue.get(e),p||(p=u.Unknown),new p(a,C)},u.getBuiltInById=e=>ne.get(e)||xe;let z=null,Y=null;const be={compilerOptions:{target:"esnext"}};async function Te(e,a,C="/script.js",p="__SHEETXL"){try{const F=await async function(){if(z)return z;if(Y){if(await Y,!z)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return z}let b,N;Y=new Promise((d,S)=>{b=d,N=S});try{const{initialize:d}=await Promise.resolve().then(()=>require("./DpQsba6KbxKxdAU8.cjs"));return z=await d(),b(),z}catch(d){throw console.error("Failed to import or initialize esbuild:",d),Y=null,N(d),d}}(),R="@sheetxl/primitives",s=`
11
+ */var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,o,L,q){super(L,q),this._label=o,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class C extends a{constructor(n,o){super(e.Code.Parse,e.Label.Parse,n,o)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=C;class p extends a{constructor(n,o){super(e.Code.Null,e.Label.Null,n,o)}static{this.code=e.Code.Null}}e.Null=p;class F extends a{constructor(n,o){super(e.Code.Div0,e.Label.Div0,n,o)}static{this.code=e.Code.Div0}}e.Div0=F;class R extends a{constructor(n,o){super(e.Code.Value,e.Label.Value,n,o)}static{this.code=e.Code.Value}}e.Value=R;class s extends a{constructor(n,o){super(e.Code.Ref,e.Label.Ref,n,o)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,o){super(e.Code.Name,e.Label.Name,n,o)}static{this.code=e.Code.Name}}e.Name=K;class k extends a{constructor(n,o){super(e.Code.Num,e.Label.Num,n,o)}static{this.code=e.Code.Num}}e.Num=k;class b extends a{constructor(n,o){super(e.Code.NA,e.Label.NA,n,o)}static{this.code=e.Code.NA}}e.NA=b;class N extends a{constructor(n,o){super(e.Code.GettingData,e.Label.GettingData,n,o)}static{this.code=e.Code.GettingData}}e.GettingData=N;class d extends a{constructor(n,o){super(e.Code.Spill,e.Label.Spill,n,o)}static{this.code=e.Code.Spill}}e.Spill=d;class S extends a{constructor(n,o){super(e.Code.Connect,e.Label.Connect,n,o)}static{this.code=e.Code.Connect}}e.Connect=S;class G extends a{constructor(n,o){super(e.Code.Blocked,e.Label.Blocked,n,o)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,o){super(e.Code.Unknown,e.Label.Unknown,n,o)}static{this.code=e.Code.Unknown}}e.Unknown=_;class B extends a{constructor(n,o){super(e.Code.Field,e.Label.Field,n,o)}static{this.code=e.Code.Field}}e.Field=B;class W extends a{constructor(n,o){super(e.Code.Calc,e.Label.Calc,n,o)}static{this.code=e.Code.Calc}}e.Calc=W;class I extends a{constructor(n,o){super(e.Code.Busy,e.Label.Busy,n,o)}static{this.code=e.Code.Busy}}e.Busy=I;class A extends a{constructor(n,o){super(e.Code.Python,e.Label.Python,n,o)}static{this.code=e.Code.Python}}e.Python=A;class X extends a{constructor(n,o){super(e.Code.Timeout,e.Label.Timeout,n,o)}static{this.code=e.Code.Timeout}}e.Timeout=X})(r||(r={}));const y={};y[r.Code.Parse]=r.Parse,y[r.Code.Null]=r.Null,y[r.Code.Div0]=r.Div0,y[r.Code.Value]=r.Value,y[r.Code.Ref]=r.Ref,y[r.Code.Name]=r.Name,y[r.Code.Num]=r.Num,y[r.Code.NA]=r.NA,y[r.Code.GettingData]=r.GettingData,y[r.Code.Spill]=r.Spill,y[r.Code.Connect]=r.Connect,y[r.Code.Blocked]=r.Blocked,y[r.Code.Unknown]=r.Unknown,y[r.Code.Field]=r.Field,y[r.Code.Calc]=r.Calc,y[r.Code.Busy]=r.Busy,y[r.Code.Python]=r.Python,y[r.Code.Timeout]=r.Timeout;const ce=new Map,ne=new Map,de=new Map,ue=new Map,le=Object.keys(y);for(let e=0;e<le.length;e++){const a=le[e],C=y[a];de.set(r.Label[a],C),ue.set(r.Code[a],C);const p=new C;ce.set(p.getLabel(),p),ne.set(p.getCode(),p)}const xe=ne.get(r.Code.Unknown);var u;(u=r||(r={})).BuiltIn={Parse:new u.Parse,Null:new u.Null,Div0:new u.Div0,Value:new u.Value,Ref:new u.Ref,Name:new u.Name,Num:new u.Num,NA:new u.NA,GettingData:new u.GettingData,Spill:new u.Spill,Connect:new u.Connect,Blocked:new u.Blocked,Unknown:new u.Unknown,Field:new u.Field,Calc:new u.Calc,Busy:new u.Busy,Python:new u.Python,Timeout:new u.Timeout},u.getBuiltInByLabel=e=>ce.get(e),u.newTypedError=(e,a,C)=>{let p;return p=typeof e=="string"?de.get(e):ue.get(e),p||(p=u.Unknown),new p(a,C)},u.getBuiltInById=e=>ne.get(e)||xe;let z=null,Y=null;const be={compilerOptions:{target:"esnext"}};async function Te(e,a,C="/script.js",p="__SHEETXL"){try{const F=await async function(){if(z)return z;if(Y){if(await Y,!z)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return z}let b,N;Y=new Promise((d,S)=>{b=d,N=S});try{const{initialize:d}=await Promise.resolve().then(()=>require("./DELLeANCkwzuN1P-.cjs"));return z=await d(),b(),z}catch(d){throw console.error("Failed to import or initialize esbuild:",d),Y=null,N(d),d}}(),R="@sheetxl/primitives",s=`
12
12
  export const FormulaContext = globalThis.${p}?.FormulaContext;
13
13
  export const ScalarType = globalThis.${p}?.ScalarType;
14
14
  export const Observable = globalThis.${p}?.Observable;
@@ -20,7 +20,7 @@
20
20
  interface FirstTest {
21
21
  isTrue?: boolean;
22
22
  }
23
- `,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ee=(e,a)=>{Array.from(a.keys()).forEach(C=>{const p=a.get(C);a.set(`${e}.${C}`,p)})},Ne=new Map([["Scalar","*"],["FormulaError.Known",Ce],["Date","Date"],["JSON","JSON"]]),Se=new Map([]),te="SheetXL";ee(te,pe),ee(te,me),ee(te,Se);const Ee=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let H=null;async function Le(){if(H)return H;try{return await(await Promise.resolve().then(()=>require("./DdFHhPCAiHLY6t2D.cjs"))).initialize()}catch(e){throw H=null,e}finally{H=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const C=(e.disableBundle||e.declarationsOnly)??!1,p=[ke(),Le()],F=await Promise.all(p),R=F[0],s=F[1];let K="",k=null;const b=[],N={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},d="script",S=`${d}.ts`,G="lib.d.ts",_="global.d.ts",B={[S]:a,[G]:`
23
+ `,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ee=(e,a)=>{Array.from(a.keys()).forEach(C=>{const p=a.get(C);a.set(`${e}.${C}`,p)})},Ne=new Map([["Scalar","*"],["FormulaError.Known",Ce],["Date","Date"],["JSON","JSON"]]),Se=new Map([]),te="SheetXL";ee(te,pe),ee(te,me),ee(te,Se);const Ee=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let H=null;async function Le(){if(H)return H;try{return await(await Promise.resolve().then(()=>require("./C3lcIYRZjt7EC-RA.cjs"))).initialize()}catch(e){throw H=null,e}finally{H=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const C=(e.disableBundle||e.declarationsOnly)??!1,p=[ke(),Le()],F=await Promise.all(p),R=F[0],s=F[1];let K="",k=null;const b=[],N={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},d="script",S=`${d}.ts`,G="lib.d.ts",_="global.d.ts",B={[S]:a,[G]:`
24
24
  /**
25
25
  * Represents the completion of an asynchronous operation
26
26
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./D8oj5VpJF45l_w7z.cjs");exports.ScriptingUtils=t.ScriptingUtils;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./B3nadCTI8zdSk-gc.cjs");exports.ScriptingUtils=t.ScriptingUtils;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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("./Bt4S3Cfc0Zmo6N3a.mjs");
13
+ const { createCompilerWorker: r } = await import("./CbLsYpc8AjvzOnX5.mjs");
14
14
  return this.workerWrapper = await r(), this.workerWrapper;
15
15
  }
16
16
  async compileModule(r) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.
@@ -47,7 +47,7 @@ class u {
47
47
  }
48
48
  }
49
49
  const s = `/**
50
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
50
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
51
51
  *
52
52
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
53
53
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -266,7 +266,7 @@ var v;
266
266
  return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
267
267
  }, v.getBuiltInById = (e) => Te.get(e) || Et;
268
268
  /**
269
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
269
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
270
270
  *
271
271
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
272
272
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1573,7 +1573,7 @@ async function p() {
1573
1573
  return await l();
1574
1574
  }
1575
1575
  const l = async () => {
1576
- const { compileModule: e } = await import("./ClNRYWPIjqW79eAg.mjs"), n = new u((t) => e(t));
1576
+ const { compileModule: e } = await import("./DBbM59Yn4kFX4SQm.mjs"), n = new u((t) => e(t));
1577
1577
  return await n.start(), n;
1578
1578
  };
1579
1579
  export {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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,12 +1,12 @@
1
- import { Y as he } from "./Czu79pWOoTpUsauL.mjs";
1
+ import { Y as he } from "./pgx_xxlbzJi1h-Ry.mjs";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.
7
7
  */
8
8
  /**
9
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
9
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
10
10
  *
11
11
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
12
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -239,7 +239,7 @@ async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
239
239
  b = d, N = S;
240
240
  });
241
241
  try {
242
- const { initialize: d } = await import("./G7Fw_NiFzOPzYfew.mjs");
242
+ const { initialize: d } = await import("./CcktEIRGkk5IsJ6u.mjs");
243
243
  return I = await d(), b(), I;
244
244
  } catch (d) {
245
245
  throw console.error("Failed to import or initialize esbuild:", d), Y = null, N(d), d;
@@ -288,7 +288,7 @@ let H = null;
288
288
  async function Le() {
289
289
  if (H) return H;
290
290
  try {
291
- return await (await import("./CJiNzJ0uRMvfDXLk.mjs")).initialize();
291
+ return await (await import("./CrJw0g8KXPNom-Ky.mjs")).initialize();
292
292
  } catch (e) {
293
293
  throw H = null, e;
294
294
  } finally {
@@ -1,6 +1,6 @@
1
- import { S as t } from "./Czu79pWOoTpUsauL.mjs";
1
+ import { S as t } from "./pgx_xxlbzJi1h-Ry.mjs";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
  /**
8
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
8
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -815,7 +815,7 @@ const Vt = Object.freeze({ compileTypescript: async function(e) {
815
815
  if (q && $t.deepEqual(q, e)) return ht;
816
816
  const t = await async function() {
817
817
  if (M) return M;
818
- const { TypeScriptCompiler: n } = await import("./X0bY7IzcvTfq3goV.mjs");
818
+ const { TypeScriptCompiler: n } = await import("./BlO3_ovphho937XG.mjs");
819
819
  return M = new n(), M;
820
820
  }(), r = await t.compileModule(e);
821
821
  return ht = r, q = e, r;
@@ -1,5 +1,5 @@
1
1
  Name: @sheetxl/primitives
2
- Version: 0.2.5
2
+ Version: 0.3.0
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.2.5
24
+ Version: 0.3.0
25
25
  License: SEE LICENSE IN <LICENSE>
26
26
  Private: false
27
27
  Description: Utils - Utilities used by most SheetXL components.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.
@@ -47,7 +47,7 @@ class u {
47
47
  }
48
48
  }
49
49
  const s = `/**
50
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
50
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
51
51
  *
52
52
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
53
53
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -266,7 +266,7 @@ var v;
266
266
  return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);
267
267
  }, v.getBuiltInById = (e) => Te.get(e) || Et;
268
268
  /**
269
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
269
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
270
270
  *
271
271
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
272
272
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1573,7 +1573,7 @@ async function p() {
1573
1573
  return await l();
1574
1574
  }
1575
1575
  const l = async () => {
1576
- const { compileModule: e } = await import("./1gc0wVTZ9ddVse5m.mjs"), n = new u((t) => e(t));
1576
+ const { compileModule: e } = await import("./CyqoOZg4zm3hMd1x.mjs"), n = new u((t) => e(t));
1577
1577
  return await n.start(), n;
1578
1578
  };
1579
1579
  export {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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("./B8x5q5R4BUZe9vaw.mjs");
13
+ const { createCompilerWorker: r } = await import("./BSKRgKTYzXYZhJeu.mjs");
14
14
  return this.workerWrapper = await r(), this.workerWrapper;
15
15
  }
16
16
  async compileModule(r) {
@@ -1,12 +1,12 @@
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.2.5
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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.
7
7
  */
8
8
  /**
9
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.2.5
9
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
10
10
  *
11
11
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
12
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -239,7 +239,7 @@ async function Te(e, a, C = "/script.js", p = "__SHEETXL") {
239
239
  b = d, N = S;
240
240
  });
241
241
  try {
242
- const { initialize: d } = await import("./CfdFRA_SvB3sr8KV.mjs");
242
+ const { initialize: d } = await import("./DLL8RPg_Fg_1u71G.mjs");
243
243
  return I = await d(), b(), I;
244
244
  } catch (d) {
245
245
  throw console.error("Failed to import or initialize esbuild:", d), H = null, N(d), d;
@@ -288,7 +288,7 @@ let W = null;
288
288
  async function Le() {
289
289
  if (W) return W;
290
290
  try {
291
- return await (await import("./CNWfGG568WnCmcSQ.mjs")).initialize();
291
+ return await (await import("./B7hOAXX2NY8LWfPG.mjs")).initialize();
292
292
  } catch (e) {
293
293
  throw W = null, e;
294
294
  } finally {
@@ -1,6 +1,6 @@
1
1
  import * as Q from "esbuild-wasm";
2
2
  /**
3
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
3
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.2.5
2
+ * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
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
  /**
8
- * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.2.5
8
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -817,7 +817,7 @@ const Vt = Object.freeze({ compileTypescript: async function(e) {
817
817
  if (q && $t.deepEqual(q, e)) return ht;
818
818
  const t = await async function() {
819
819
  if (M) return M;
820
- const { TypeScriptCompiler: r } = await import("./BMreSII5nv1raoMe.mjs");
820
+ const { TypeScriptCompiler: r } = await import("./BdBONnJjxA0vmb5w.mjs");
821
821
  return M = new r(), M;
822
822
  }(), n = await t.compileModule(e);
823
823
  return ht = n, q = e, n;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/scripting",
3
3
  "description": "Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild.",
4
- "version": "0.2.5",
4
+ "version": "0.3.0",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -28,8 +28,8 @@
28
28
  "typescript"
29
29
  ],
30
30
  "dependencies": {
31
- "@sheetxl/primitives": "^0.2.5",
32
- "@sheetxl/utils": "^0.2.5",
31
+ "@sheetxl/primitives": "^0.3.0",
32
+ "@sheetxl/utils": "^0.3.0",
33
33
  "path-browserify": "^1.0.1"
34
34
  },
35
35
  "peerDependencies": {