@sheetxl/sdk 0.4.16 → 0.4.18

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 (104) hide show
  1. package/browser/cjs/{CL7ANk8Spy-FHhQd.cjs → 96I4TmbxNMXxwmus.cjs} +1 -1
  2. package/browser/cjs/{MMCzvG9Q187c5DFU.cjs → B-mV_peXT7VfxQQr.cjs} +1 -1
  3. package/browser/cjs/{LaGrtvvU4G87uqhV.cjs → B0M7GsaOu4qcC7yK.cjs} +1 -1
  4. package/browser/cjs/{DxaE6D_Cd23woMse.cjs → B16Za-BFwVSZCL2F.cjs} +2 -2
  5. package/browser/cjs/{BGTLkWkZqaI4ygrR.cjs → B1lw2muyV3mfkypu.cjs} +1 -1
  6. package/browser/cjs/{BN9pe8gudo-Nr1Wl.cjs → BIDLC_eDQmtTBSiU.cjs} +1 -1
  7. package/browser/cjs/{C-g54Q0IACibAxpZ.cjs → BKM0CTaGyY5RPizC.cjs} +2 -2
  8. package/browser/cjs/{DZo-7dicc6BNZ59Y.cjs → BR38h2HGYOahC2dp.cjs} +1 -1
  9. package/browser/cjs/{BP3e9N2j9O3m69ow.cjs → C8mgXVD7aJ0kL3cZ.cjs} +2 -2
  10. package/browser/cjs/{C7JOei_7Pj6ytRmF.cjs → CDCaZG7DWMhVyfHG.cjs} +4 -4
  11. package/browser/cjs/CSIba2XXGZO3bOXm.cjs +60 -0
  12. package/browser/cjs/{C0b9rRHGNQa087gT.cjs → CZKr-HfqerG4ae_1.cjs} +1 -1
  13. package/browser/cjs/{CJ84r9qug33ibb3O.cjs → CakZh5cWa2vFHGhw.cjs} +1 -1
  14. package/browser/cjs/{DvcmmhAnBYBN5c76.cjs → Cb2p7K5RIq2_e9yG.cjs} +1 -1
  15. package/browser/cjs/{D_1AQ1xlw0uTAlAK.cjs → CiwovCSkpgl-bQ05.cjs} +1 -1
  16. package/browser/cjs/{CjW_b4YdNELDvpVN.cjs → CrN-7tm1jDkW1nkZ.cjs} +1 -1
  17. package/browser/cjs/{LyH8hn3Kfb18TPrz.cjs → D0ndeduwAXfDM5zb.cjs} +4 -4
  18. package/browser/cjs/{Ca8jAoMM1bYYJZmt.cjs → DYY4R9783ao6XPnq.cjs} +3 -3
  19. package/browser/cjs/{BiDGLYk87OcnlHTu.cjs → Dc0ACDFHNbN2VrFS.cjs} +1 -1
  20. package/browser/cjs/{CVVDJd66b--rJfvK.cjs → DiJmlpPTUKIMehnP.cjs} +1 -1
  21. package/browser/cjs/{B5d2ch3qEpJSs4Yc.cjs → DqZ7Si9Z65K5mwHo.cjs} +1 -1
  22. package/browser/cjs/{D6ecE37JPBQU-8ZE.cjs → Dw4MzZ6XFcFXyqGM.cjs} +1 -1
  23. package/browser/cjs/{B6HwYxeSuSX9jAA3.cjs → HHCe0eJPV7Hu-Mrv.cjs} +1 -1
  24. package/browser/cjs/{wv25W0qWaKLGbeuR.cjs → MGyd1lueCpKy3gCn.cjs} +1 -1
  25. package/browser/cjs/{ysN0p4-B_HM3dmBC.cjs → MOgoHITH-ACocbbL.cjs} +1 -1
  26. package/browser/cjs/{DMrJzvcmwCLrSROc.cjs → Z80-f8z0s7CfgJ1P.cjs} +1 -1
  27. package/browser/cjs/{Diymu6Ngh9VrjEU1.cjs → ZoEJgFl5JtHAMJRA.cjs} +1 -1
  28. package/browser/cjs/{Lf7Twm0s64ih38RJ.cjs → bTX86za4lD1qKA2c.cjs} +2 -2
  29. package/browser/cjs/{D-oCuQ9e95T36WkL.cjs → c_vK2AcQRH4Z1mOf.cjs} +1 -1
  30. package/browser/cjs/{BJghWm6MkvI69oVZ.cjs → fi5RftkQIn1rYCiT.cjs} +1 -1
  31. package/browser/cjs/index.cjs +2 -2
  32. package/browser/cjs/{BzbXxBjMcC5wJT4Y.cjs → mf6tD7RMpxcTOPa7.cjs} +1 -1
  33. package/browser/cjs/{B8DSkk9KAs8TmXQU.cjs → pU4QF2C9D_-Xdu8i.cjs} +1 -1
  34. package/browser/cjs/{A5gVYhfHPDAXzNPq.cjs → vmndpln6VSihKju3.cjs} +1 -1
  35. package/browser/esm/{BquVj54OvezhPpX0.mjs → B3Rp7WjCvala1UrI.mjs} +2 -2
  36. package/{node/esm/Dl8XLjOOcSpg-QLh.mjs → browser/esm/B3csp6-HbdBEL4X8.mjs} +1 -1
  37. package/browser/esm/{CF0w9iy9cuRu-d5y.mjs → BGYEnWE6FSOJdQ4x.mjs} +1 -1
  38. package/browser/esm/{CbR241nqwBaDc7y5.mjs → BMOgQaOgpaurekew.mjs} +1 -1
  39. package/browser/esm/{DQCVm888AXQ8gMR-.mjs → BSayvvpavgmqIk43.mjs} +1 -1
  40. package/browser/esm/{DOKnTh_YTAFYVY8u.mjs → BV-oHWKicVdc02ib.mjs} +1 -1
  41. package/browser/esm/{B4gL3TxJ8Naz2-qm.mjs → BcXKG5xteM2ZAI-r.mjs} +2 -2
  42. package/browser/esm/{BTrOb0d-PacXzoHa.mjs → BwMRnRU4Wpk560An.mjs} +4 -4
  43. package/browser/esm/{BKt_Gnbuh-gnkZR0.mjs → By4pttWeS96ZhKd4.mjs} +1 -1
  44. package/browser/esm/{C13et0wGc4wUqWCV.mjs → C8n8dqMkkLOM9j1o.mjs} +1 -1
  45. package/browser/esm/{B6MRC2CmXd0q8hf1.mjs → CBkNkKjAmyWHMYQc.mjs} +1 -1
  46. package/browser/esm/{DaVl04H6ibu5Vtkc.mjs → CFp2ymnFAVc8cym1.mjs} +4 -4
  47. package/{node/esm/BZ6OzurZppy9vsm1.mjs → browser/esm/CKcGjFcPopTjr7lT.mjs} +1 -1
  48. package/{node/esm/CHFLsQ3Sn9OitZNo.mjs → browser/esm/COI00WKkmFkU2tiM.mjs} +1 -1
  49. package/browser/esm/{DSt170WQrQysfJh9.mjs → CRaEV0zlfuoEo-et.mjs} +1 -1
  50. package/{node/esm/DM9H79w2UoR0BA6y.mjs → browser/esm/CaM4A9aDY4eWavlM.mjs} +1 -1
  51. package/browser/esm/{BFErh-vquFQMDvwC.mjs → Ccxt5fhksxnt3obj.mjs} +2 -2
  52. package/browser/esm/{CwzR97cihRG1MkPO.mjs → CkMDCQIqDEiEQiNA.mjs} +1 -1
  53. package/browser/esm/{CvW3f_hJxjQBdVkp.mjs → CnD7cW89ne_E4Ptr.mjs} +1 -1
  54. package/browser/esm/{Cvrnah7EBGS039EG.mjs → CnFvwDOPMYbsziTX.mjs} +1 -1
  55. package/browser/esm/{C78AxIZED85bgMrt.mjs → D00n5KHOIv4JfYd5.mjs} +1 -1
  56. package/browser/esm/{DF_P2CsGz04sDrhP.mjs → D0i1akdvlYD31OBX.mjs} +1 -1
  57. package/{node/esm/LnvcI3ZooDt_RInd.mjs → browser/esm/DKQjWsfROqvR_0if.mjs} +1 -1
  58. package/browser/esm/{CMlfUJqqTeyQxu4G.mjs → DbCZH7lgS9omy6tP.mjs} +2 -2
  59. package/browser/esm/{H5UOFmvvwWi-kLrw.mjs → DmXgfCwpavOHgM7U.mjs} +1 -1
  60. package/browser/esm/{DemNffQHNLBwBfum.mjs → DniYiVoKuIMtovWX.mjs} +1 -1
  61. package/browser/esm/{BVEhBG9BVhR-YUY2.mjs → HJ22m0DaQ0RI0un0.mjs} +1 -1
  62. package/browser/esm/{BDsNTXQWOGTXhjnb.mjs → Y1vg4AQASwdL9KOw.mjs} +1 -1
  63. package/browser/esm/{BNe5hW4HIvhOerXv.mjs → aNjleesiDlbcqt-A.mjs} +1 -1
  64. package/browser/esm/{CLz9XzibxUBUHUhY.mjs → eTQ3bt3FTgJF4uBY.mjs} +3 -3
  65. package/browser/esm/index.mjs +2 -2
  66. package/browser/esm/{DdziHU7FYPhZsfOU.mjs → n-ON8zha7KmSHnGP.mjs} +1 -1
  67. package/{node/esm/BM7eo8wmji2k12io.mjs → browser/esm/oFnfjoAJzyR1JmLH.mjs} +1 -1
  68. package/browser/esm/{QSyOuAe9ZhUimGOW.mjs → p3NY1BIiGf0UeYJe.mjs} +5136 -5185
  69. package/licenses/dependencies.txt +3 -3
  70. package/{browser/esm/Dl8XLjOOcSpg-QLh.mjs → node/esm/B3csp6-HbdBEL4X8.mjs} +1 -1
  71. package/node/esm/{CbR241nqwBaDc7y5.mjs → BMOgQaOgpaurekew.mjs} +1 -1
  72. package/node/esm/{DQCVm888AXQ8gMR-.mjs → BSayvvpavgmqIk43.mjs} +1 -1
  73. package/node/esm/{DOKnTh_YTAFYVY8u.mjs → BV-oHWKicVdc02ib.mjs} +1 -1
  74. package/node/esm/{nXpbnjRzqoHrG_CJ.mjs → B_zasTHoHvhPdeSH.mjs} +1 -1
  75. package/node/esm/{CVKTzNwDlu6grgAY.mjs → BgNphncScMzrejwn.mjs} +1 -1
  76. package/node/esm/{BKt_Gnbuh-gnkZR0.mjs → By4pttWeS96ZhKd4.mjs} +1 -1
  77. package/node/esm/{C13et0wGc4wUqWCV.mjs → C8n8dqMkkLOM9j1o.mjs} +1 -1
  78. package/{browser/esm/BZ6OzurZppy9vsm1.mjs → node/esm/CKcGjFcPopTjr7lT.mjs} +1 -1
  79. package/{browser/esm/CHFLsQ3Sn9OitZNo.mjs → node/esm/COI00WKkmFkU2tiM.mjs} +1 -1
  80. package/node/esm/{DSt170WQrQysfJh9.mjs → CRaEV0zlfuoEo-et.mjs} +1 -1
  81. package/{browser/esm/DM9H79w2UoR0BA6y.mjs → node/esm/CaM4A9aDY4eWavlM.mjs} +1 -1
  82. package/node/esm/{KMxC9y-69sWjcYeY.mjs → CbppxT93KkjVJRQ-.mjs} +2 -2
  83. package/node/esm/{uI1PQZezkl2Vo8_8.mjs → Ce3EISvfYzbMOOii.mjs} +1 -1
  84. package/node/esm/{Bn8TKCtdXx6IyRBs.mjs → CgRxax_SEz8PgPGx.mjs} +4 -4
  85. package/node/esm/{CUer_A4NCS3-FnWw.mjs → Ck12455NivY1Mxcb.mjs} +1 -1
  86. package/node/esm/{CwzR97cihRG1MkPO.mjs → CkMDCQIqDEiEQiNA.mjs} +1 -1
  87. package/node/esm/{DMb7vFgBaUeNypTE.mjs → Cn3J66kCPWuRgghy.mjs} +1 -1
  88. package/node/esm/{Cvrnah7EBGS039EG.mjs → CnFvwDOPMYbsziTX.mjs} +1 -1
  89. package/{browser/esm/LnvcI3ZooDt_RInd.mjs → node/esm/DKQjWsfROqvR_0if.mjs} +1 -1
  90. package/node/esm/{CZ3ka6Gg-0XUAG9M.mjs → Dnx_5oPANvmxDVr0.mjs} +1 -1
  91. package/node/esm/{CdrfO6LfmbFJ9RAO.mjs → DqgV9yP7BYsuiJZo.mjs} +2 -2
  92. package/node/esm/{CzqZPzed3Kr67_-G.mjs → DwkWtlm3wKOKAC8i.mjs} +1 -1
  93. package/node/esm/{DnpahW67hmBxKgMe.mjs → Dznoem2aPvZH1oI7.mjs} +3 -3
  94. package/node/esm/{BlWbTaK_jXEfeqAI.mjs → Erh1OKURDV0ri0SY.mjs} +1 -1
  95. package/node/esm/{BdM7XhQ7fT-dBXlL.mjs → Pay7Q8xaBXR8Xmez.mjs} +1 -1
  96. package/node/esm/{BDsNTXQWOGTXhjnb.mjs → Y1vg4AQASwdL9KOw.mjs} +1 -1
  97. package/node/esm/{BNe5hW4HIvhOerXv.mjs → aNjleesiDlbcqt-A.mjs} +1 -1
  98. package/node/esm/{gtWgMIG5tnDjoIzw.mjs → bv3-9x5QfIuZgtDa.mjs} +2 -2
  99. package/node/esm/index.mjs +2070 -2112
  100. package/{browser/esm/BM7eo8wmji2k12io.mjs → node/esm/oFnfjoAJzyR1JmLH.mjs} +1 -1
  101. package/node/esm/{DiMHjUxN4YclVyYU.mjs → qvv-Pq01UNL7eRrC.mjs} +1 -1
  102. package/package.json +4 -4
  103. package/types/scripting.d.ts +38 -1
  104. package/browser/cjs/CtSrC6_RcSz99nrT.cjs +0 -60
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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("./LyH8hn3Kfb18TPrz.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("./D0ndeduwAXfDM5zb.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,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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,4 +10,4 @@ Please use Chrome or Edge if external copy and paste is required.`,k=`You do not
10
10
  All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
11
11
  Copy and paste will be limited to within the browser tab.
12
12
 
13
- 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=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+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)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("./DxaE6D_Cd23woMse.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$t=xt,exports.index=Gt;
13
+ 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=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+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)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("./B16Za-BFwVSZCL2F.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$t=xt,exports.index=Gt;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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,9 +1,9 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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
- */const yt=require("./CtSrC6_RcSz99nrT.cjs");function kt(Y,H){for(var k=0;k<H.length;k++){const P=H[k];if(typeof P!="string"&&!Array.isArray(P)){for(const N in P)if(N!=="default"&&!(N in Y)){const Q=Object.getOwnPropertyDescriptor(P,N);Q&&Object.defineProperty(Y,N,Q.get?Q:{enumerable:!0,get:()=>P[N]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=function Y(){var H,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,N=k.IS_PAPA_WORKER||!1,Q={},mt=0,o={};function B(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let c=this._config.newline;c||(r=this._config.quoteChar||'"',c=this._handle.guessLineEndings(e,r)),e=[...e.split(c).slice(n)].join(c)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,N)k.postMessage({results:r,workerId:o.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):N&&this._config.error&&k.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),B.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(c){this._chunkError(c.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),B.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,c=(this._config.chunkSize&&(c=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,c)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:c}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;B.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){B.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){B.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){B.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=J(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(c){this._streamError(c)}},this),this._streamError=J(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=J(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=J(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,c=Math.pow(2,53),R=-c,I=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,z=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,p=this,E=0,a=0,F=!1,u=!1,g=[],s={data:[],errors:[],meta:{}};function O(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function C(){if(s&&n&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(l){return!O(l)})),T()){let l=function(S,L){_(t.transformHeader)&&(S=t.transformHeader(S,L)),g.push(S)};if(s)if(Array.isArray(s.data[0])){for(var h=0;T()&&h<s.data.length;h++)s.data[h].forEach(l);s.data.splice(0,1)}else s.data.forEach(l)}function d(l,S){for(var L=t.header?{}:[],b=0;b<l.length;b++){var y=b,m=l[b];m=((U,f)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(U)?f==="true"||f==="TRUE"||f!=="false"&&f!=="FALSE"&&((v=>{if(I.test(v)&&(v=parseFloat(v),R<v&&v<c))return 1})(f)?parseFloat(f):z.test(f)?new Date(f):f===""?null:f):f)(y=t.header?b>=g.length?"__parsed_extra":g[b]:y,m=t.transform?t.transform(m,y):m),y==="__parsed_extra"?(L[y]=L[y]||[],L[y].push(m)):L[y]=m}return t.header&&(b>g.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+b,a+S):b<g.length&&M("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+b,a+S)),L}var w;s&&(t.header||t.dynamicTyping||t.transform)&&(w=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(d),w=s.data.length):s.data=d(s.data,0),t.header&&s.meta&&(s.meta.fields=g),a+=w)}function T(){return t.header&&g.length===0}function M(h,d,w,l){h={type:h,code:d,message:w},l!==void 0&&(h.row=l),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,T()?C():(C(),s.data.length!==0&&(E+=h.data.length,t.preview&&E>t.preview?i.abort():(s.data=s.data[0],r(s,p))))}),this.parse=function(h,d,w){var l=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,l)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((l=((S,L,b,y,m)=>{var U,f,v,$;m=m||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var Z=0;Z<m.length;Z++){for(var K,tt=m[Z],A=0,D=0,x=0,j=(v=void 0,new st({comments:y,delimiter:tt,newline:L,preview:10}).parse(S)),W=0;W<j.data.length;W++)b&&O(j.data[W])?x++:(D+=K=j.data[W].length,v===void 0?v=K:0<K&&(A+=Math.abs(K-v),v=K));0<j.data.length&&(D/=j.data.length-x),(f===void 0||A<=f)&&($===void 0||$<D)&&1.99<D&&(f=A,U=tt,$=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=l.bestDelimiter:(n=!0,t.delimiter=o.DefaultDelimiter),s.meta.delimiter=t.delimiter),l=at(t),t.preview&&t.header&&l.preview++,e=h,i=new st(l),s=i.parse(e,d,w),C(),F?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return F},this.pause=function(){F=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){p.streamer._halted?(F=!1,p.streamer.parseChunk(e,!0)):setTimeout(p.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,d){h=h.substring(0,1048576),d=new RegExp(V(d)+"([^]*?)"+V(d),"gm");var w=(h=h.replace(d,"")).split("\r");if(h=1<(d=h.split(`
6
+ */const yt=require("./CSIba2XXGZO3bOXm.cjs");function kt(Y,H){for(var k=0;k<H.length;k++){const P=H[k];if(typeof P!="string"&&!Array.isArray(P)){for(const N in P)if(N!=="default"&&!(N in Y)){const Q=Object.getOwnPropertyDescriptor(P,N);Q&&Object.defineProperty(Y,N,Q.get?Q:{enumerable:!0,get:()=>P[N]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=function Y(){var H,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,N=k.IS_PAPA_WORKER||!1,Q={},mt=0,o={};function B(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let c=this._config.newline;c||(r=this._config.quoteChar||'"',c=this._handle.guessLineEndings(e,r)),e=[...e.split(c).slice(n)].join(c)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,N)k.postMessage({results:r,workerId:o.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):N&&this._config.error&&k.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),B.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(c){this._chunkError(c.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(i=>(i=i.getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),B.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=J(this._chunkLoaded,this),e.onerror=J(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,c=(this._config.chunkSize&&(c=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,c)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:c}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;B.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){B.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){B.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){B.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=J(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(c){this._streamError(c)}},this),this._streamError=J(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=J(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=J(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,c=Math.pow(2,53),R=-c,I=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,z=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,p=this,E=0,a=0,F=!1,u=!1,g=[],s={data:[],errors:[],meta:{}};function O(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function C(){if(s&&n&&(M("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(l){return!O(l)})),T()){let l=function(S,L){_(t.transformHeader)&&(S=t.transformHeader(S,L)),g.push(S)};if(s)if(Array.isArray(s.data[0])){for(var h=0;T()&&h<s.data.length;h++)s.data[h].forEach(l);s.data.splice(0,1)}else s.data.forEach(l)}function d(l,S){for(var L=t.header?{}:[],b=0;b<l.length;b++){var y=b,m=l[b];m=((U,f)=>(v=>(t.dynamicTypingFunction&&t.dynamicTyping[v]===void 0&&(t.dynamicTyping[v]=t.dynamicTypingFunction(v)),(t.dynamicTyping[v]||t.dynamicTyping)===!0))(U)?f==="true"||f==="TRUE"||f!=="false"&&f!=="FALSE"&&((v=>{if(I.test(v)&&(v=parseFloat(v),R<v&&v<c))return 1})(f)?parseFloat(f):z.test(f)?new Date(f):f===""?null:f):f)(y=t.header?b>=g.length?"__parsed_extra":g[b]:y,m=t.transform?t.transform(m,y):m),y==="__parsed_extra"?(L[y]=L[y]||[],L[y].push(m)):L[y]=m}return t.header&&(b>g.length?M("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+b,a+S):b<g.length&&M("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+b,a+S)),L}var w;s&&(t.header||t.dynamicTyping||t.transform)&&(w=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(d),w=s.data.length):s.data=d(s.data,0),t.header&&s.meta&&(s.meta.fields=g),a+=w)}function T(){return t.header&&g.length===0}function M(h,d,w,l){h={type:h,code:d,message:w},l!==void 0&&(h.row=l),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,T()?C():(C(),s.data.length!==0&&(E+=h.data.length,t.preview&&E>t.preview?i.abort():(s.data=s.data[0],r(s,p))))}),this.parse=function(h,d,w){var l=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,l)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((l=((S,L,b,y,m)=>{var U,f,v,$;m=m||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var Z=0;Z<m.length;Z++){for(var K,tt=m[Z],A=0,D=0,x=0,j=(v=void 0,new st({comments:y,delimiter:tt,newline:L,preview:10}).parse(S)),W=0;W<j.data.length;W++)b&&O(j.data[W])?x++:(D+=K=j.data[W].length,v===void 0?v=K:0<K&&(A+=Math.abs(K-v),v=K));0<j.data.length&&(D/=j.data.length-x),(f===void 0||A<=f)&&($===void 0||$<D)&&1.99<D&&(f=A,U=tt,$=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=l.bestDelimiter:(n=!0,t.delimiter=o.DefaultDelimiter),s.meta.delimiter=t.delimiter),l=at(t),t.preview&&t.header&&l.preview++,e=h,i=new st(l),s=i.parse(e,d,w),C(),F?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return F},this.pause=function(){F=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){p.streamer._halted?(F=!1,p.streamer.parseChunk(e,!0)):setTimeout(p.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,d){h=h.substring(0,1048576),d=new RegExp(V(d)+"([^]*?)"+V(d),"gm");var w=(h=h.replace(d,"")).split("\r");if(h=1<(d=h.split(`
7
7
  `)).length&&d[0].length<w[0].length,w.length===1||h)return`
8
8
  `;for(var l=0,S=0;S<w.length;S++)w[S][0]===`
9
9
  `&&l++;return l>=w.length/2?`\r
@@ -1,13 +1,13 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.4.18
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("./C-g54Q0IACibAxpZ.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()=>`
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./BKM0CTaGyY5RPizC.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()=>`
7
7
  interface FirstTest {
8
8
  isTrue?: boolean;
9
9
  }
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("./B8DSkk9KAs8TmXQU.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]:`
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("./pU4QF2C9D_-Xdu8i.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]:`
11
11
  /**
12
12
  * Represents the completion of an asynchronous operation
13
13
  */
@@ -21,7 +21,7 @@ interface Promise<T> {
21
21
  finally(onfinally?: (() => void) | undefined | null): Promise<T>;
22
22
  }
23
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:()=>`
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("./BGTLkWkZqaI4ygrR.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=`
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("./B1lw2muyV3mfkypu.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=`
25
25
  export const FormulaContext = globalThis.${l}?.FormulaContext;
26
26
  export const ScalarType = globalThis.${l}?.ScalarType;
27
27
  export const Observable = globalThis.${l}?.Observable;