@sheetxl/sdk 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +11 -11
- package/README.md +28 -28
- package/browser/cjs/{C_Coalce8J4csiLE.cjs → 15AOcGpF9P2PgE8n.cjs} +1 -1
- package/browser/cjs/{DGqjsAiKHZF6m1Mv.cjs → 57X1Mb81YIQgsw4g.cjs} +1 -1
- package/browser/cjs/{Dmpm7Dydw8cVGAXs.cjs → B0Mgg7I6p1ceY3rN.cjs} +1 -1
- package/browser/cjs/{BhV4q0JUhtJ1pTSd.cjs → BBOV5cemxNXMsT5e.cjs} +1 -1
- package/browser/cjs/{DEo_n8v6D6Q9NhD-.cjs → BqwLZnCcokB0gJUg.cjs} +1 -1
- package/browser/cjs/{Bb7h09WCD0R8ATFM.cjs → BvI7tcol77xoHIM4.cjs} +1 -1
- package/browser/cjs/{BmPep7SOrq0MDlIH.cjs → Bxag54-yDHHST3Wd.cjs} +1 -1
- package/browser/cjs/{DsmHYqhIq2MfMv8W.cjs → CeFdVjSCXrLYCXCU.cjs} +2 -2
- package/browser/cjs/{DBy5XU87AO-Lk9KS.cjs → CeipDJjIRwQ790Ca.cjs} +1 -1
- package/browser/cjs/{Cx5p99U--ygOZzp1.cjs → CfouDIlYV1rbE7L-.cjs} +1 -1
- package/browser/cjs/{BbkKttxZlubHi85H.cjs → Ch4ZGmjKP0WTpVhB.cjs} +1 -1
- package/browser/cjs/{CW41wIAH82TPU9XF.cjs → CtaQiu1oagSXCXXK.cjs} +14 -34
- package/browser/cjs/{BeIXCEcRFT0Dd0tJ.cjs → CxaFOlRqTSy7Jlc9.cjs} +1 -1
- package/browser/cjs/D2mGoMelJkvbn0dS.cjs +6 -0
- package/browser/cjs/{CRux2v8CIGLhWMgL.cjs → D4DJUbHguXQO7MqG.cjs} +4 -14
- package/browser/cjs/{Dwca29zrUqeuyzef.cjs → D7IBYt0m3kE9Dgab.cjs} +3 -3
- package/browser/cjs/{Cb-9bKZeEXba7OaS.cjs → D7n5QHfgHMN7Ubsh.cjs} +1 -1
- package/browser/cjs/{DDVXI4QtcLw0-OUn.cjs → D_AVSJSxbexl5_Qc.cjs} +1 -1
- package/browser/cjs/{D5yunVCLLyML4GqZ.cjs → DdmOYUEsRqX0HKiE.cjs} +9 -19
- package/browser/cjs/{CSBUnZ1-0o8_KiP4.cjs → DdvRZSHU07d0SJND.cjs} +1 -1
- package/browser/cjs/{Bkb4ulG1MBGnmCDu.cjs → DhAXete205u1BUF9.cjs} +1 -1
- package/browser/cjs/{BQubidP9_YM_hBOg.cjs → Dp_0GxjE3JGmxJ__.cjs} +2 -7
- package/browser/cjs/{Dzjt1bF9qwsaLhRG.cjs → DqgIZPp7jtFutMPR.cjs} +1 -1
- package/browser/cjs/{CcEoCmZJr-dbfUUY.cjs → ImOEyTGPkbtm6yWG.cjs} +1 -1
- package/browser/cjs/{CkHBE_ZWw3rfwn64.cjs → JWZZpQcTBYdqmuUW.cjs} +3 -13
- package/browser/cjs/{DkRhvDRXky0WHc5N.cjs → KQNpeB5hbqIYjp_r.cjs} +1 -1
- package/browser/cjs/{Bb14pTwp5cJHMNC3.cjs → LRzcJjMh_2Sg2Iyq.cjs} +1 -1
- package/browser/cjs/NQji61IYyDBithp9.cjs +6 -0
- package/browser/cjs/{BDaJLiZuqPE8Dtnh.cjs → W7UjTQi6GYOYRGPH.cjs} +1 -1
- package/browser/cjs/{B4JxPW8fzjVHWAQW.cjs → WVaevsWmtJcDkHzf.cjs} +1 -1
- package/browser/cjs/{Bh_-BkXZbwHDU-be.cjs → Xss-dNJjqGh-xGja.cjs} +2 -2
- package/browser/cjs/{BV64nByDVDyQCk0v.cjs → ZvgpcQAvYAnvCwhP.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{oRdOA7RYIdJXPylN.cjs → rx448m2c_2rk-ZL2.cjs} +1 -1
- package/{node/esm/C_CDUyeiM2ZP_nX-.mjs → browser/esm/A2KtAgZ1ZZzlKqrW.mjs} +1 -1
- package/{node/esm/C_VWE2coFxoERf46.mjs → browser/esm/BMvMKpCuQ7OMhb6D.mjs} +1 -1
- package/browser/esm/{1qJFed5oZZClEvR7.mjs → BYP_vBrtrJmMosg3.mjs} +1 -1
- package/browser/esm/BfA0oeliVjmuULjo.mjs +24 -0
- package/browser/esm/{D1mftitLg7JAa9DV.mjs → BfqVWbuZPVip1p2y.mjs} +1 -1
- package/{node/esm/D0otc_DB7jVc6Vn0.mjs → browser/esm/BldbegDy2Im9Vwy_.mjs} +1 -1
- package/browser/esm/{BgR-7La4idJ3wPvg.mjs → BxKrVCe67zQZXaFe.mjs} +1 -1
- package/{node/esm/kDJ4zkCeYD4_E1VU.mjs → browser/esm/CFIAFeV-kbKIMGaW.mjs} +1 -1
- package/browser/esm/{HIMUW53E4Ts1jp-k.mjs → CP02kAnVHwlz71EV.mjs} +1 -1
- package/{node/esm/o9s0UQKSY9odzCKI.mjs → browser/esm/CR8ryNaQrZTwbWLQ.mjs} +1 -1
- package/browser/esm/{C-O9Ldr523jKWAcg.mjs → CRX2fvd3JBNH1inQ.mjs} +8 -19
- package/browser/esm/{D_-ygdD3lFdC0BUO.mjs → CeTz_0h7mzzs7S6d.mjs} +12 -4
- package/browser/esm/{CAXPGzIm8eIzlllY.mjs → CkA378qg7LQEqeV4.mjs} +3 -15
- package/browser/esm/CpERAbkVKi6v2R5z.mjs +21 -0
- package/browser/esm/{m0SaH5wIC-TYoHze.mjs → Cuc9gxubXUidHefW.mjs} +2 -8
- package/{node/esm/CWF10CFskTkEnVSU.mjs → browser/esm/D3qT4ckeVdUIf8KG.mjs} +1 -1
- package/browser/esm/{jGTorAJ66YXmQ9Ds.mjs → D57eR1LljugozA9Z.mjs} +1 -1
- package/{node/esm/DDrb3x_MBPP0niIM.mjs → browser/esm/D7W3PNn-2IoFru0l.mjs} +1 -1
- package/browser/esm/{D4GBxdi5DQwe2uzk.mjs → DRd9s4gIGWuK5-R-.mjs} +3 -10
- package/browser/esm/{Bk0dF9BepS1SnqTq.mjs → DZcFAGNYJO5qYnjh.mjs} +1 -1
- package/browser/esm/{BScNrytUNc1fgw5w.mjs → DfKwAoUuV9f4j0gn.mjs} +1 -1
- package/browser/esm/{LP_IAgFtTpWfer7J.mjs → Dm-yHuQ_8smSK8zh.mjs} +1 -1
- package/browser/esm/{NnxHFBWRP3jJ1DRo.mjs → DowOxK5s6W8Hs5qU.mjs} +4 -16
- package/browser/esm/{88Z2ercj18fTQTFf.mjs → DwXGwKlOzkVh3sXn.mjs} +2060 -2073
- package/browser/esm/{ghf3-fGK3x5ueGt1.mjs → EWLavRuO7BMH3CES.mjs} +2 -2
- package/{node/esm/Cp5SC1P2nuJ-qDdf.mjs → browser/esm/Ep2xp_qq1WnkwQ-4.mjs} +1 -1
- package/{node/esm/pq9zAyYkKum5ZX0e.mjs → browser/esm/MsUATmonUEbmdGEg.mjs} +1 -1
- package/{node/esm/CBCrBb7rBes-jtVm.mjs → browser/esm/Of5ubKFb9FmEEPGu.mjs} +1 -1
- package/browser/esm/{BMMN0vqruCIXUVrf.mjs → XXbCXuFAJplwT_i6.mjs} +1 -1
- package/browser/esm/{B7RUvU_1w-518Kei.mjs → YuK71EKhaf-WleSP.mjs} +1 -1
- package/browser/esm/{l5Ft7OrA0rrzmWoU.mjs → _eNY2dP2qQ62235I.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{o2zheFXXFXlJOkvu.mjs → m_0OUN7zT7-GCOZI.mjs} +1 -1
- package/browser/esm/{CoeJd8Phw9PvOQyl.mjs → qxyhqVpudmxAVheL.mjs} +1 -1
- package/licenses/dependencies.txt +33 -33
- package/node/esm/{Dx5bFYrr5nvTn-yS.mjs → 4p4QkPdpTSnxhcYT.mjs} +1 -1
- package/node/esm/{DiWBMHR4YdrGY5NO.mjs → A-93HEOUDI4JpIFE.mjs} +11 -3
- package/{browser/esm/C_CDUyeiM2ZP_nX-.mjs → node/esm/A2KtAgZ1ZZzlKqrW.mjs} +1 -1
- package/node/esm/{BvqfDWAnnDH6ai2K.mjs → B849dDAbNzcAWdIf.mjs} +1 -1
- package/node/esm/BH4FTFTTaalZge5L.mjs +14 -0
- package/{browser/esm/C_VWE2coFxoERf46.mjs → node/esm/BMvMKpCuQ7OMhb6D.mjs} +1 -1
- package/node/esm/{B8m8WapdyA9KbDsD.mjs → BQC0F5ietGENZKyH.mjs} +1 -1
- package/node/esm/{mViI8YV4YDQ_iM2i.mjs → BVURFQqE_KXN-Uqn.mjs} +2 -8
- package/node/esm/{1qJFed5oZZClEvR7.mjs → BYP_vBrtrJmMosg3.mjs} +1 -1
- package/node/esm/{BCqxvE4m8KKRjcrP.mjs → B_8H9Q2rpNm2_tP3.mjs} +1 -7
- package/{browser/esm/D0otc_DB7jVc6Vn0.mjs → node/esm/BldbegDy2Im9Vwy_.mjs} +1 -1
- package/{browser/esm/kDJ4zkCeYD4_E1VU.mjs → node/esm/CFIAFeV-kbKIMGaW.mjs} +1 -1
- package/node/esm/{HIMUW53E4Ts1jp-k.mjs → CP02kAnVHwlz71EV.mjs} +1 -1
- package/{browser/esm/o9s0UQKSY9odzCKI.mjs → node/esm/CR8ryNaQrZTwbWLQ.mjs} +1 -1
- package/node/esm/{wr3pc9hTlzIGLGZF.mjs → CjDTYU6purjPsTGz.mjs} +1 -1
- package/node/esm/{BDMNqpjBRxXOwET5.mjs → CjedKP1Ap009z7yH.mjs} +4 -16
- package/{browser/esm/CWF10CFskTkEnVSU.mjs → node/esm/D3qT4ckeVdUIf8KG.mjs} +1 -1
- package/node/esm/{C1hvR-aBJLd9aVY_.mjs → D4ZDjjk2WHyCqHIe.mjs} +1 -1
- package/node/esm/{XOT6SWELJysk4E3n.mjs → D767fK1WoXC3YeeO.mjs} +1 -1
- package/{browser/esm/DDrb3x_MBPP0niIM.mjs → node/esm/D7W3PNn-2IoFru0l.mjs} +1 -1
- package/node/esm/{bz_y9SyUCyY5bTph.mjs → DDAppiOAzrEy_PcS.mjs} +1 -1
- package/node/esm/{-KKVEGKJwq7085C6.mjs → DdQ4X9e7ES69T_kv.mjs} +3 -15
- package/node/esm/{BScNrytUNc1fgw5w.mjs → DfKwAoUuV9f4j0gn.mjs} +1 -1
- package/node/esm/DvW1-4E92rqMluYF.mjs +80 -0
- package/{browser/esm/Cp5SC1P2nuJ-qDdf.mjs → node/esm/Ep2xp_qq1WnkwQ-4.mjs} +1 -1
- package/node/esm/{wqkpGjIdok1ol8ml.mjs → LRiYR8hkfLZA1lud.mjs} +1 -1
- package/{browser/esm/pq9zAyYkKum5ZX0e.mjs → node/esm/MsUATmonUEbmdGEg.mjs} +1 -1
- package/{browser/esm/CBCrBb7rBes-jtVm.mjs → node/esm/Of5ubKFb9FmEEPGu.mjs} +1 -1
- package/node/esm/{BMMN0vqruCIXUVrf.mjs → XXbCXuFAJplwT_i6.mjs} +1 -1
- package/node/esm/{l5Ft7OrA0rrzmWoU.mjs → _eNY2dP2qQ62235I.mjs} +1 -1
- package/node/esm/index.mjs +2869 -2858
- package/node/esm/{o2zheFXXFXlJOkvu.mjs → m_0OUN7zT7-GCOZI.mjs} +1 -1
- package/package.json +4 -7
- package/types/index.d.ts +3 -1
- package/types/scripting.d.ts +34176 -0
- package/browser/cjs/C6mlfiSpwGoB2nv1.cjs +0 -11
- package/browser/cjs/CJcxsweXAw8BW4Ko.cjs +0 -11
- package/browser/esm/BDSXfZn_tGzDfcGH.mjs +0 -30
- package/browser/esm/OuTlu0ksD51dIVpa.mjs +0 -28
- package/node/esm/BLFshUHW9SxLJ2Ot.mjs +0 -20
- package/node/esm/DnpjpT7qnATgmY4k.mjs +0 -86
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.1
|
|
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.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.1
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=null;exports.initialize=async function(){return e||(e=new Promise(async(s,r)=>{try{const i="0.20.2",a=`https://esm.sh/esbuild-wasm@${i}`,l=`https://esm.sh/esbuild-wasm@${i}/esbuild.wasm`,t=(await import(a)).default;await t.initialize({wasmURL:l,worker:!1}),s(t)}catch(i){console.error("Error initializing esbuild:",i),r(i)}}),e)};
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.1
|
|
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("./
|
|
7
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
|
|
8
|
-
*
|
|
9
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
-
*//**
|
|
12
|
-
* @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0
|
|
13
|
-
*
|
|
14
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
16
|
-
*/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,i,S,q){super(S,q),this._label=i,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 k extends a{constructor(n,i){super(e.Code.Parse,e.Label.Parse,n,i)}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=k;class x extends a{constructor(n,i){super(e.Code.Null,e.Label.Null,n,i)}static{this.code=e.Code.Null}}e.Null=x;class j extends a{constructor(n,i){super(e.Code.Div0,e.Label.Div0,n,i)}static{this.code=e.Code.Div0}}e.Div0=j;class X extends a{constructor(n,i){super(e.Code.Value,e.Label.Value,n,i)}static{this.code=e.Code.Value}}e.Value=X;class s extends a{constructor(n,i){super(e.Code.Ref,e.Label.Ref,n,i)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,i){super(e.Code.Name,e.Label.Name,n,i)}static{this.code=e.Code.Name}}e.Name=K;class M extends a{constructor(n,i){super(e.Code.Num,e.Label.Num,n,i)}static{this.code=e.Code.Num}}e.Num=M;class U extends a{constructor(n,i){super(e.Code.NA,e.Label.NA,n,i)}static{this.code=e.Code.NA}}e.NA=U;class Y extends a{constructor(n,i){super(e.Code.GettingData,e.Label.GettingData,n,i)}static{this.code=e.Code.GettingData}}e.GettingData=Y;class z extends a{constructor(n,i){super(e.Code.Spill,e.Label.Spill,n,i)}static{this.code=e.Code.Spill}}e.Spill=z;class O extends a{constructor(n,i){super(e.Code.Connect,e.Label.Connect,n,i)}static{this.code=e.Code.Connect}}e.Connect=O;class G extends a{constructor(n,i){super(e.Code.Blocked,e.Label.Blocked,n,i)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,i){super(e.Code.Unknown,e.Label.Unknown,n,i)}static{this.code=e.Code.Unknown}}e.Unknown=_;class F extends a{constructor(n,i){super(e.Code.Field,e.Label.Field,n,i)}static{this.code=e.Code.Field}}e.Field=F;class Q extends a{constructor(n,i){super(e.Code.Calc,e.Label.Calc,n,i)}static{this.code=e.Code.Calc}}e.Calc=Q;class I extends a{constructor(n,i){super(e.Code.Busy,e.Label.Busy,n,i)}static{this.code=e.Code.Busy}}e.Busy=I;class P extends a{constructor(n,i){super(e.Code.Python,e.Label.Python,n,i)}static{this.code=e.Code.Python}}e.Python=P;class Z extends a{constructor(n,i){super(e.Code.Timeout,e.Label.Timeout,n,i)}static{this.code=e.Code.Timeout}}e.Timeout=Z})(r||(r={}));const f={};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;const ce=new Map,ie=new Map,de=new Map,ue=new Map,le=Object.keys(f);for(let e=0;e<le.length;e++){const a=le[e],k=f[a];de.set(r.Label[a],k),ue.set(r.Code[a],k);const x=new k;ce.set(x.getLabel(),x),ie.set(x.getCode(),x)}const ge=ie.get(r.Code.Unknown);var p;(p=r||(r={})).BuiltIn={Parse:new p.Parse,Null:new p.Null,Div0:new p.Div0,Value:new p.Value,Ref:new p.Ref,Name:new p.Name,Num:new p.Num,NA:new p.NA,GettingData:new p.GettingData,Spill:new p.Spill,Connect:new p.Connect,Blocked:new p.Blocked,Unknown:new p.Unknown,Field:new p.Field,Calc:new p.Calc,Busy:new p.Busy,Python:new p.Python,Timeout:new p.Timeout},p.getBuiltInByLabel=e=>ce.get(e),p.newTypedError=(e,a,k)=>{let x;return x=typeof e=="string"?de.get(e):ue.get(e),x||(x=p.Unknown),new x(a,k)},p.getBuiltInById=e=>ie.get(e)||ge;let A=null,H=null;const we={compilerOptions:{target:"esnext"}},Ce=async()=>`
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./JWZZpQcTBYdqmuUW.cjs");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,i,S,q){super(S,q),this._label=i,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 k extends a{constructor(n,i){super(e.Code.Parse,e.Label.Parse,n,i)}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=k;class x extends a{constructor(n,i){super(e.Code.Null,e.Label.Null,n,i)}static{this.code=e.Code.Null}}e.Null=x;class j extends a{constructor(n,i){super(e.Code.Div0,e.Label.Div0,n,i)}static{this.code=e.Code.Div0}}e.Div0=j;class X extends a{constructor(n,i){super(e.Code.Value,e.Label.Value,n,i)}static{this.code=e.Code.Value}}e.Value=X;class s extends a{constructor(n,i){super(e.Code.Ref,e.Label.Ref,n,i)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,i){super(e.Code.Name,e.Label.Name,n,i)}static{this.code=e.Code.Name}}e.Name=K;class M extends a{constructor(n,i){super(e.Code.Num,e.Label.Num,n,i)}static{this.code=e.Code.Num}}e.Num=M;class U extends a{constructor(n,i){super(e.Code.NA,e.Label.NA,n,i)}static{this.code=e.Code.NA}}e.NA=U;class Y extends a{constructor(n,i){super(e.Code.GettingData,e.Label.GettingData,n,i)}static{this.code=e.Code.GettingData}}e.GettingData=Y;class z extends a{constructor(n,i){super(e.Code.Spill,e.Label.Spill,n,i)}static{this.code=e.Code.Spill}}e.Spill=z;class O extends a{constructor(n,i){super(e.Code.Connect,e.Label.Connect,n,i)}static{this.code=e.Code.Connect}}e.Connect=O;class G extends a{constructor(n,i){super(e.Code.Blocked,e.Label.Blocked,n,i)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,i){super(e.Code.Unknown,e.Label.Unknown,n,i)}static{this.code=e.Code.Unknown}}e.Unknown=_;class F extends a{constructor(n,i){super(e.Code.Field,e.Label.Field,n,i)}static{this.code=e.Code.Field}}e.Field=F;class Q extends a{constructor(n,i){super(e.Code.Calc,e.Label.Calc,n,i)}static{this.code=e.Code.Calc}}e.Calc=Q;class I extends a{constructor(n,i){super(e.Code.Busy,e.Label.Busy,n,i)}static{this.code=e.Code.Busy}}e.Busy=I;class P extends a{constructor(n,i){super(e.Code.Python,e.Label.Python,n,i)}static{this.code=e.Code.Python}}e.Python=P;class Z extends a{constructor(n,i){super(e.Code.Timeout,e.Label.Timeout,n,i)}static{this.code=e.Code.Timeout}}e.Timeout=Z})(r||(r={}));const f={};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;const ce=new Map,ie=new Map,de=new Map,ue=new Map,le=Object.keys(f);for(let e=0;e<le.length;e++){const a=le[e],k=f[a];de.set(r.Label[a],k),ue.set(r.Code[a],k);const x=new k;ce.set(x.getLabel(),x),ie.set(x.getCode(),x)}const ge=ie.get(r.Code.Unknown);var p;(p=r||(r={})).BuiltIn={Parse:new p.Parse,Null:new p.Null,Div0:new p.Div0,Value:new p.Value,Ref:new p.Ref,Name:new p.Name,Num:new p.Num,NA:new p.NA,GettingData:new p.GettingData,Spill:new p.Spill,Connect:new p.Connect,Blocked:new p.Blocked,Unknown:new p.Unknown,Field:new p.Field,Calc:new p.Calc,Busy:new p.Busy,Python:new p.Python,Timeout:new p.Timeout},p.getBuiltInByLabel=e=>ce.get(e),p.newTypedError=(e,a,k)=>{let x;return x=typeof e=="string"?de.get(e):ue.get(e),x||(x=p.Unknown),new x(a,k)},p.getBuiltInById=e=>ie.get(e)||ge;let A=null,H=null;const we={compilerOptions:{target:"esnext"}},Ce=async()=>`
|
|
17
7
|
interface FirstTest {
|
|
18
8
|
isTrue?: boolean;
|
|
19
9
|
}
|
|
20
|
-
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./
|
|
10
|
+
`,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./NQji61IYyDBithp9.cjs"))).initialize()}catch(e){throw W=null,e}finally{W=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const k=(e.disableBundle||e.declarationsOnly)??!1,x=[Ce(),ke()],j=await Promise.all(x),X=j[0],s=j[1];let K="",M=null;const U=[],Y={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},z="script",O=`${z}.ts`,G="lib.d.ts",_="global.d.ts",F={[O]:a,[G]:`
|
|
21
11
|
/**
|
|
22
12
|
* Represents the completion of an asynchronous operation
|
|
23
13
|
*/
|
|
@@ -31,7 +21,7 @@ interface Promise<T> {
|
|
|
31
21
|
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
32
22
|
}
|
|
33
23
|
`,[_]:X},Q={getSourceFile:(t,d,E,l)=>s.createSourceFile(t,F[t],s.ScriptTarget.Latest,!0),fileExists:t=>F[t]!==void 0,readFile:t=>F[t],writeFile:(t,d)=>{F[t]=d},getCurrentDirectory:()=>"./",getCanonicalFileName:t=>t,useCaseSensitiveFileNames:()=>!0,getDefaultLibFileName:t=>G,getNewLine:()=>`
|
|
34
|
-
`},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$t.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./
|
|
24
|
+
`},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$t.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./D2mGoMelJkvbn0dS.cjs"));return A=await o(),g(),A}catch(o){throw console.error("Failed to import or initialize esbuild:",o),H=null,m(o),o}}(),N="@sheetxl/primitives",T=`
|
|
35
25
|
export const FormulaContext = globalThis.${l}?.FormulaContext;
|
|
36
26
|
export const ScalarType = globalThis.${l}?.ScalarType;
|
|
37
27
|
export const Observable = globalThis.${l}?.Observable;
|