@sheetxl/mcp 0.8.0-beta.21 → 0.8.0-beta.23

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 (210) hide show
  1. package/assets/{BC2Y5XPkMBKS6jQX.js → 1J1R3dclFOh322Yr.js} +326 -325
  2. package/assets/{BZJvWc-5DdAyHXFk.js → 2XwVsSfo5wF5K-HA.js} +1 -1
  3. package/assets/{DO9RVxvm9vQh8A_j.js → 2xkoVdiI70Gpaxoc.js} +2 -2
  4. package/assets/{8wMcuw3b1CFk-D5A.js → 5MnsnJcajdtAujE2.js} +1 -1
  5. package/assets/{vItpZkDtFsjwsJzb.js → B2zUUqxAJ1RiM7YI.js} +64 -64
  6. package/assets/{CkGQV_x1SpyzePln.js → B3YRTBFhX61z6rJv.js} +435 -430
  7. package/assets/{RFPO1vKnkkgwx5Bs.js → BBuB6ffvyg2Cd7V5.js} +1 -1
  8. package/assets/{DO86fHS3WYzHN_Rv.js → BDSNdgf_hbhX1DhN.js} +1 -1
  9. package/assets/{H1ICg_-K5ADFNHJj.js → BEsnJS5jYwkHNcZd.js} +1 -1
  10. package/assets/{CSd5XfU4JBASIwTI.js → BGxwDpW8DkO8W0Ig.js} +1 -1
  11. package/assets/{D5mfuGSeGXSDHj9-.js → BI8kb-rd9dW85XJs.js} +1 -1
  12. package/assets/{DqxW6EBLDV_6Eegk.js → BJMeWtr7TiLNpt17.js} +1 -1
  13. package/assets/{D3RuKyCyAzvT0bGL.js → BKpicdc9H5WnZPb-.js} +1 -1
  14. package/assets/{KSE7OWDMxhbfYt82.js → BLr8y5StL65VZQxG.js} +22 -22
  15. package/assets/{CzQ2o7qoMm0K7KSb.js → BNEBXKAh-N4Tygk7.js} +4 -4
  16. package/assets/{CZ5v2vTWktJ7qAj1.js → BPorbjbkH-VoV1M0.js} +1 -1
  17. package/assets/{_oaPA65Bm2idKW7f.js → BPtf3_nlovO4r9Bm.js} +1 -1
  18. package/assets/{Dt5rA9gefJFLoaeI.js → BULbMlvQuB2WFBFE.js} +2 -2
  19. package/assets/{DpgBOcByebrqzUrC.js → BVUfaOAGhdMim8yB.js} +3 -3
  20. package/assets/{KQGPPHM486XPeClF.js → BWeaY19OpTJK5v0n.js} +2 -2
  21. package/assets/{M62BqR7TbmgOzAEW.js → BYbzf-TVwbKQPCyK.js} +3 -3
  22. package/assets/{CTLGMulzw-oFbgHy.js → BZaXHnsJ6RkCZsnz.js} +3 -3
  23. package/assets/{Bagfe_VVU6NyQNS6.js → BazhmjGvrL7pqVQP.js} +1 -1
  24. package/assets/{DX0znk3xZmL1AyX8.js → BbU6aT_c6-4tkcCw.js} +1 -1
  25. package/assets/{C0pbMKm0FzhOek9r.js → Bbmh8_bdk_HrQ5Y6.js} +1 -1
  26. package/assets/{DmJc5VoPPwBBtLIG.js → BcWSfKJ9Atkc0X_p.js} +1 -1
  27. package/assets/{fUmGsmpgGhd8eZn2.js → BdUFL3lVdwifHrf0.js} +1 -1
  28. package/assets/{CL348305B-kpRYzz.js → Bjk1Twm0RFO_3fS8.js} +1 -1
  29. package/assets/{DuCNecyIYfZL27SV.js → BlhJHu9ni2T9IaM1.js} +1 -1
  30. package/assets/{CB9TsE5n0FEyFnAz.js → BomatnedZsGMF7MW.js} +22 -21
  31. package/assets/{CLT0k5UJYPmi8ked.js → BynbAjhJnLjyP7HH.js} +1 -1
  32. package/assets/{CDYMLTHkkpRV9igv.js → Bz08KxFupjbdsoFx.js} +1 -1
  33. package/assets/{BU7t2vK3_DH_BbMd.js → C6_KHS3-ROddeSbS.js} +2 -2
  34. package/assets/{69EXDk0YRdjdM86i.js → C8G_px4dGuR2KjJh.js} +1 -1
  35. package/assets/{DRqBWzdn9KKN68o8.js → CBMMHYgUAhgiJhJE.js} +11 -11
  36. package/assets/{0ewqK5X66DZmbhVR.js → CC7EfXPwp7_nSBIz.js} +1 -1
  37. package/assets/{DOYXEbY_WslpyqXW.js → CCBQDcCHI47PZ0YQ.js} +5 -5
  38. package/assets/{BeMLPoHRWacCbpl2.js → CE-9VKh5-Xwxnxmu.js} +1 -1
  39. package/assets/{CpLUgqgBDtlfFRj3.js → CE5DhB5As59VJ-Ig.js} +1 -1
  40. package/assets/{1bSTbCnkTWvsV82p.js → CEsRqYMd5IjnAzzX.js} +4 -4
  41. package/assets/{CrLDmJU84Dbwl6DZ.js → CGLapmkNccH1g_ZJ.js} +1 -1
  42. package/assets/{C2YOx4ianxuIIeMP.js → CH8DNTUgM79xk8Tt.js} +1 -1
  43. package/assets/{rIQ1pzaGFqvCfzOk.js → CHG4ZuzhyjGRuKBg.js} +1 -1
  44. package/assets/{CBTQ8dknYY7RVQgL.js → CPZgEZ2jKoo7hS6g.js} +8 -8
  45. package/assets/{Dnn8laImZHy8LouL.js → CQCPJBQD0qv9y8qE.js} +1 -1
  46. package/assets/{vXmCJwJaPhkPVhy8.js → CSisGJ4hiDhTi19U.js} +1 -1
  47. package/assets/{BMkhJwKP7goV0vlJ.js → CeVCLRwjkH3_OXJu.js} +1 -1
  48. package/assets/{BneTvtEMcBoSiQnw.js → Cg1tSmK_AGJa2VeI.js} +3 -3
  49. package/assets/{DG3hKZ75iK2wrCcz.js → CgYef9dYxY8YyUTE.js} +1 -1
  50. package/assets/{CME1jbwnNlBD66aW.js → ChbkkN_JqbAGrUwB.js} +221 -219
  51. package/assets/{D2XmpdMAe0SAuQWo.js → Cidwv57sKqhIrpHP.js} +54 -54
  52. package/assets/{Vo34QvIefEN595xl.js → Cl04_aSpBHTwfsQR.js} +8954 -8941
  53. package/assets/{CudjOMo6X7FRW6ME.js → Cl8_HMhRgzPzqFc7.js} +1 -1
  54. package/assets/{IEmEQHg895CUpAQq.js → CnUYevzhUJYNqLad.js} +1 -1
  55. package/assets/{pg0OaBJVRnW7uSz5.js → CndRpNCcV89ncnqz.js} +1 -1
  56. package/assets/{rejXA2fTAujW3QRv.js → CpyybSV2kR6b-SIB.js} +579 -569
  57. package/assets/{DsK1Adz0vo-1zPkp.js → CqP4H_-kRRjcxO91.js} +1 -1
  58. package/assets/{CVlsdN5C8QL-Kljv.js → CrTLWpsRNBSyTLor.js} +1 -1
  59. package/assets/{C1xe-BzKWT17OO8a.js → CtlrxXVgZDIOcuc1.js} +14 -14
  60. package/assets/{D1HLIgumuUqrSyYB.js → CwrOCbcS4IHLsERQ.js} +4 -4
  61. package/assets/{BM9zwvBRXNbO_uD-.js → Cx1bc-Dsja7W3GlB.js} +2 -2
  62. package/assets/{BbsMdXiRzPW9BCEK.js → CyhngJo16o7G18lq.js} +1 -1
  63. package/assets/{BAqvmoeYqG6dwX3I.js → CzoRlNMlpFz4iax3.js} +2 -2
  64. package/assets/{DnQM29yv6KQQOVfl.js → D-PYDPXobSWiPh1D.js} +2 -2
  65. package/assets/{H89MX09YsAj7NAk3.js → D5O3m16KeyU_oXqH.js} +1 -1
  66. package/assets/{DwqgvpYiTLOQd5wm.js → D5PpcRuJYSv0i2y9.js} +2 -2
  67. package/assets/{DITcEcZJ58z5yOx7.js → D60N4r1a2YsNEwqj.js} +1 -1
  68. package/assets/{VcTnn2qw_4tmyctb.js → D7oYfHgO0kEqAnPV.js} +1 -1
  69. package/assets/{C27330XswujHKrLu.js → DACd4ZjYwzNE7Koc.js} +1 -1
  70. package/assets/{CDKZI2IIZ9boo7zG.js → DAliB9N1z6qnw4NO.js} +1 -1
  71. package/assets/{DjbBTiei0H-BIJaN.js → DIAQ_WlBCWhgHt-z.js} +1 -1
  72. package/assets/{I-GZ5PL9n_Sv5yAJ.js → DJ2jlogB1DWlGM-J.js} +1 -1
  73. package/assets/{NEzc406_2k2MuiE3.js → DKKLWACR9GsidnkS.js} +2 -2
  74. package/assets/{BrgptoFtJepXL46Z.js → DL7_uGw6KiZhlvR8.js} +1 -1
  75. package/assets/{ChpUbgXIWuQFoXyL.js → DL8wUEe2Kx7bjDYP.js} +1 -1
  76. package/assets/{C8huq6_Gvbeyf6Zy.js → DLuQ_rdu0XjYF7Jq.js} +2 -2
  77. package/assets/{D9F0224gK4j4Iuq9.js → DN1RRp4qQfCq3JAO.js} +1 -1
  78. package/assets/{BRiLNigzVwOBIxBy.js → DPjWOMoJ-elAAOmS.js} +1 -1
  79. package/assets/{I_yb1hhLA5bYPpWx.js → DSyZaCML62gSnudE.js} +1 -1
  80. package/assets/DU2Dzzu0oY_eDN6i.js +14 -0
  81. package/assets/{QMCI00ZCedkNJd8C.js → DUytcsu0MV3GnsrM.js} +1 -1
  82. package/assets/{BtiRDaBbNpPpKelt.js → DV3PnM9lo0AW-YOA.js} +3 -3
  83. package/assets/{CXb2mlCk1s1VFPHU.js → DXmebUOAhtW4V6BO.js} +531 -531
  84. package/assets/{Q2j8yQZX1kL_MbbB.js → DZt1ONN8CTTfmHGn.js} +606 -606
  85. package/assets/{AGdlSbOsXWO1oZAE.js → Dawi8y7JWn6A9gAx.js} +1 -1
  86. package/assets/{D7WSYqvuwNQjOIuO.js → DbbNJyL67KdOK7nc.js} +1 -1
  87. package/assets/{BVDaUnmVOSaDw9e3.js → DcO0gub7cRKVw4xB.js} +1 -1
  88. package/assets/{DP-m2vK0GTaYqQZM.js → DfBERTJjS9LP0RSp.js} +1 -1
  89. package/assets/{B8NDzDM0Gpwmkylq.js → Dg5QmWm0uBTEjZy4.js} +1 -1
  90. package/assets/{_l84VPWmScznS-9F.js → DgLQfXTWavoBetna.js} +5 -5
  91. package/assets/{CC2hfzradb2KOvtU.js → DiJexWBIzdGj1H0H.js} +1 -1
  92. package/assets/{D-INtJnS1lCrEs8s.js → DoP6myQHGI-X1gNy.js} +76 -76
  93. package/assets/{DRiAktGToP73uwgm.js → Dol52NFQzLCbObuC.js} +201 -201
  94. package/assets/{BWqKV3QuZX31WPsa.js → DrKr8dXQEQ3Aukmt.js} +1 -1
  95. package/assets/{B8URptQcztz4DRvS.js → DtETpSxSR8C1voac.js} +38 -38
  96. package/assets/{Cg05U6rbXUnaz0rA.js → DuQU8JjPLBIK804w.js} +34 -34
  97. package/assets/{CmUz8bVbJgWVT-OB.js → DvkBNkPyR5kuS0Uo.js} +2 -2
  98. package/assets/{ChwSFUzi5mMzUwdW.js → E-KM5RFByUxjlkId.js} +6 -6
  99. package/assets/{-NFft0E2Wj6WH3X9.js → KMTTqSwDthnXnD4F.js} +1 -1
  100. package/assets/{C1ZP9W2tiVQUwLqZ.js → KhdF512BKcJXZMvq.js} +1 -1
  101. package/assets/{CcaH1FoDC8o3dzqp.js → L9RIicOHtZd2Rx8g.js} +1 -1
  102. package/assets/{Dzxe5kLF5GOfh0_l.js → MzfM7zDcnyOFK1lK.js} +1 -1
  103. package/assets/{BtjG4s0StUieGI5b.js → NDe-uS1n_Q7u1H3m.js} +3 -3
  104. package/assets/{BABP2ffkRrOs7_Ym.js → PVGDjdR9C4stMNpM.js} +1 -1
  105. package/assets/{DBgOeiZg40MS63pB.js → PiFW6uPRJABzK3V1.js} +1174 -1176
  106. package/assets/{B_n6s7Kj4_5BWn1q.js → WH1Vl-MDWX3vSMn1.js} +2 -2
  107. package/assets/{DjCHmGw-ixoQ6ZTA.js → WuKVkvMPAOmRaCDY.js} +2 -2
  108. package/assets/{bpjLDXWxL6nDt4Mv.js → YtxPcFPURJF6CxWu.js} +1 -1
  109. package/assets/{FOKynZCiA0wU2Spf.js → a9lvcAd7rWsWSWAo.js} +1 -1
  110. package/assets/{B4Z_YneQya9mUTN5.js → aTxgpOOxLenli4af.js} +1 -1
  111. package/assets/{BJo3edG_rqch-Kw2.js → bsnhRuD-K-qhW-y5.js} +70 -70
  112. package/assets/{CPmMYI4DPQcXrZ-g.js → dep8oZGwBmUpxjHl.js} +1 -1
  113. package/assets/{raa4clZOm0L5A0zR.js → f_dBJuakO_BJ7Tvm.js} +504 -504
  114. package/assets/{CBqpH_MpBSmQRaGE.js → gver5Sz7ZO6ZyrOi.js} +1 -1
  115. package/assets/{BEOwJnsyIuMC4SaI.js → jKIDENA_QP4bEX49.js} +4 -4
  116. package/assets/{B_RppF41PrYlelc_.js → q1rCdlJA6Z7tA6om.js} +1 -1
  117. package/assets/{4-DOIpV6Hjaymwy7.js → qjyVXZeVSr_qZfX5.js} +2 -2
  118. package/assets/{Deu2acNFlgo__Mcd.js → sIWsnPhnHm_MeeM9.js} +2 -2
  119. package/assets/{B1l0k4ErELObdQKE.js → t4qTfgdlstczTs2z.js} +21 -21
  120. package/assets/{rhT64BvdSLOEwglQ.js → wKkW4LO-iUp92LVC.js} +1 -1
  121. package/index.js +160 -160
  122. package/lib.js +1 -1
  123. package/licenses/dependencies.txt +91 -91
  124. package/package.json +4 -4
  125. package/screenshot-page/assets/{CFl15-2FAF9f3V7L.js → 0UZBKpOOsp7P-DkP.js} +2 -2
  126. package/screenshot-page/assets/37LAUhU1_yKtsBlH.js +2 -0
  127. package/screenshot-page/assets/B2PWru6Ty7ODc2Ie.js +1 -0
  128. package/screenshot-page/assets/B3c6NBI22E5SZWG-.js +1 -0
  129. package/screenshot-page/assets/B3yyoGGGl8ICyeoC.js +39 -0
  130. package/screenshot-page/assets/B56KxTxcAXDom0g4.js +13 -0
  131. package/screenshot-page/assets/{BtydzT-AjL_LBr8x.js → BAxPBeFudRJ3OqIC.js} +1 -1
  132. package/screenshot-page/assets/{1s5we6Eqz8n3o0X_.js → BJct69niPZc8L_gZ.js} +1 -1
  133. package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +1 -0
  134. package/screenshot-page/assets/{Yz4ksf-M05RGdHO3.js → BT2nkqpteSR9booH.js} +1 -1
  135. package/screenshot-page/assets/{DHUomRu_S2zcBWwt.js → BTKdl-XR9TlWaFe7.js} +3 -3
  136. package/screenshot-page/assets/{BEwl-ucV9Jfr0RoC.js → Bdb0azxGoCh6NBDk.js} +1 -1
  137. package/screenshot-page/assets/{p9abCAJQdpScjZVK.js → Be1S5czBx0lxhYLW.js} +1 -1
  138. package/screenshot-page/assets/Bh2DVAOWvWfylt77.js +1 -0
  139. package/screenshot-page/assets/BjJ_nnNDZEPLpapa.js +1 -0
  140. package/screenshot-page/assets/{CxithxkenssFkfTT.js → Bml69dFBVggmVWda.js} +21 -21
  141. package/screenshot-page/assets/BoiQQ-37KQn6NcLT.js +1 -0
  142. package/screenshot-page/assets/{Z7Av7oqfaK7wy7Eb.js → C-n8BDiksNjX6Orz.js} +1 -1
  143. package/screenshot-page/assets/C5-sm7wuk62Nzm_p.js +1 -0
  144. package/screenshot-page/assets/C9a-cNha8mBw5q-l.js +1 -0
  145. package/screenshot-page/assets/CAQ7QWes7j7Fq8o5.js +2 -0
  146. package/screenshot-page/assets/{zFbb8ESzwR_bE7IQ.js → CBP4y6KFPu24xhDT.js} +1 -1
  147. package/screenshot-page/assets/{CzZu7Fd_VeHHL-4i.js → CEL5lzj2NDYwJ-HC.js} +1 -1
  148. package/screenshot-page/assets/CGx-ZSMV9cPOzbu4.js +2 -0
  149. package/screenshot-page/assets/CI3Z1f4amZ9G2rPD.js +5 -0
  150. package/screenshot-page/assets/{CXGgKVbVXjWzE0p6.js → CQ-33-es3XJ56pR4.js} +1 -1
  151. package/screenshot-page/assets/{BftXEPOuf5Uwxpud.js → CaOsWPeN_FXseSNg.js} +1 -1
  152. package/screenshot-page/assets/CaP_vH0sJFjNrSkW.js +1 -0
  153. package/screenshot-page/assets/{CBuH_YHDn7A9E_hX.js → Cbbl3H042tb0krfe.js} +2 -2
  154. package/screenshot-page/assets/{Bozva6Wr4B8Q5QZN.js → CcVllJMjVF6SvVVq.js} +2 -2
  155. package/screenshot-page/assets/{Bdt92xZzFotX0vdt.js → Ce8b0lOBuWKlfLzJ.js} +1 -1
  156. package/screenshot-page/assets/Cengqc8q8BTmNfb_.js +1 -0
  157. package/screenshot-page/assets/{nM1r2xslndIMKlI2.js → CiFaOHqsDQTE4RRi.js} +1 -1
  158. package/screenshot-page/assets/Cv0zGWEBpmC07Jps.js +1 -0
  159. package/screenshot-page/assets/CyfTQE0Z76Rp4Fbt.js +586 -0
  160. package/screenshot-page/assets/D2CxEHjkPQMAxzWl.js +1 -0
  161. package/screenshot-page/assets/D4hvW_TF7vwc-Xlq.js +2 -0
  162. package/screenshot-page/assets/{CtS8qZB4_3skg_zL.js → D7Y0npF3FMsGUjgO.js} +1 -1
  163. package/screenshot-page/assets/DACSL7FA_J91Z_H7.js +2 -0
  164. package/screenshot-page/assets/{COpZTXe_J1mSpeYD.js → DEAD_MduPNVoT_T6.js} +1 -1
  165. package/screenshot-page/assets/{D4VgxwLDPUfCxPS9.js → DMbFr7oWja7Qpsm6.js} +2 -2
  166. package/screenshot-page/assets/{CV9T0juyAiRmwTR-.js → DVQnEWIisXaOXb_G.js} +2 -2
  167. package/screenshot-page/assets/{CwutTi2EnNm_hyVj.js → DXbOBAxx4_2rt5KM.js} +1 -1
  168. package/screenshot-page/assets/DgLZb-StwCd9ftop.js +1 -0
  169. package/screenshot-page/assets/Dkf51CnZh2zPEGMd.js +1 -0
  170. package/screenshot-page/assets/DrnzLCa7NIirMxno.js +3 -0
  171. package/screenshot-page/assets/{bdWMVOcMKRI8kCDE.js → DtQFcMvZesaQ4xRf.js} +1 -1
  172. package/screenshot-page/assets/DvRXbyteeo_8sy8T.js +1 -0
  173. package/screenshot-page/assets/EOw6vVvEfYNga9b4.js +1 -0
  174. package/screenshot-page/assets/{CZq2dMHs2MHHyyBl.js → FcTM4SB17cEX1M3X.js} +1 -1
  175. package/screenshot-page/assets/{B5ujsbfF1ZBkPI4d.js → JM0_BaBZ3yF6lnHC.js} +2 -2
  176. package/screenshot-page/assets/{9WplgXo__vp3e1Su.js → ONNSfQ8RDOqBDsvw.js} +2 -2
  177. package/screenshot-page/assets/{CXUO3vYip3JPSJ7A.js → YH1wNXzhQbkuWxeS.js} +1 -1
  178. package/screenshot-page/assets/_zzVe2R8R4vwuc5q.js +48 -0
  179. package/screenshot-page/assets/{-cpi3yOZYn6GsYN4.js → gU2zeJaXoNh7QI_e.js} +2 -2
  180. package/screenshot-page/index.html +16 -16
  181. package/types/scripting-api.json +7064 -7062
  182. package/types/scripting.d.ts +34 -9
  183. package/assets/DrgkN0g7OHuD4iD6.js +0 -14
  184. package/screenshot-page/assets/B2oadmu_j6WfNbZ1.js +0 -1
  185. package/screenshot-page/assets/BEzCH6tp_dlxe7BH.js +0 -1
  186. package/screenshot-page/assets/BJvuevnsIw3DXQds.js +0 -2
  187. package/screenshot-page/assets/BLON9pILfrgdZqAM.js +0 -5
  188. package/screenshot-page/assets/BVx7CEdRItIR30Fz.js +0 -1
  189. package/screenshot-page/assets/Ble2ESZnJzZnd3cc.js +0 -1
  190. package/screenshot-page/assets/Blg5f-jAtZfGnZ71.js +0 -1
  191. package/screenshot-page/assets/Brp37MPC60tt9V3N.js +0 -1
  192. package/screenshot-page/assets/Bs65RHirk11sxOB9.js +0 -39
  193. package/screenshot-page/assets/Bu5h0ACtvNxDBmqw.js +0 -1
  194. package/screenshot-page/assets/BwFvwFIcX0dmcBt7.js +0 -1
  195. package/screenshot-page/assets/C0rOvlmOfLDpClJ_.js +0 -1
  196. package/screenshot-page/assets/CHZ1925OpIa8ssZn.js +0 -1
  197. package/screenshot-page/assets/CN3dPtUjDVvcnA4e.js +0 -1
  198. package/screenshot-page/assets/COO3CwHTbCgxybBd.js +0 -1
  199. package/screenshot-page/assets/CR8Rj_GpSbIqbaEO.js +0 -13
  200. package/screenshot-page/assets/ClC7zkHPp6egPrjL.js +0 -2
  201. package/screenshot-page/assets/CzijGQrSoteeqwmH.js +0 -2
  202. package/screenshot-page/assets/DG6q1MKITeSM4XMx.js +0 -1
  203. package/screenshot-page/assets/DHTXoT_pArB1opyI.js +0 -48
  204. package/screenshot-page/assets/DP2wwd1IM_gQtEaG.js +0 -1
  205. package/screenshot-page/assets/DQeIWKasFD3DnWL7.js +0 -586
  206. package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +0 -2
  207. package/screenshot-page/assets/Ja-xcEStEdmh2Gwb.js +0 -2
  208. package/screenshot-page/assets/ODq-dKb9mTtqEIJl.js +0 -1
  209. package/screenshot-page/assets/VF7dro9jrDEAX6kD.js +0 -3
  210. package/screenshot-page/assets/kJwY8fmEeWlAtTAc.js +0 -1
@@ -1,130 +1,130 @@
1
1
  /**
2
- * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.21
2
+ * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.23
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { ht as e } from "./DjbBTiei0H-BIJaN.js";
8
- import { i as t } from "./CB9TsE5n0FEyFnAz.js";
9
- import { a as n, c as r, f as i, o as s, u as o } from "./D5mfuGSeGXSDHj9-.js";
10
- import { Ar as l, Cn as a, Cr as u, Fn as c, Gt as f, Ht as p, K as d, Nt as g, Un as v, Ur as h, Vr as m, Yn as y, Yr as I, ai as b, dn as x, do as R, eo as E, fi as T, ia as A, ir as S, ma as w, mt as C, o as N, ot as F, pa as P, po as L, sr as k, ta as $, ur as O, wr as B, xt as V } from "./Vo34QvIefEN595xl.js";
11
- var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => f(e + t, e), W = (e, t) => f(e - t, e), U = (e, t) => y(e * t), _ = (e, t) => 0 === t ? o.BuiltIn.Div0 : y(e / t), j = (e, t) => {
7
+ import { ht as e } from "./DIAQ_WlBCWhgHt-z.js";
8
+ import { i as t } from "./BomatnedZsGMF7MW.js";
9
+ import { a as n, c as r, f as i, o as s, u as l } from "./BI8kb-rd9dW85XJs.js";
10
+ import { $n as o, An as a, Di as u, F as c, Fi as f, Fr as p, Gn as d, Ia as g, Li as v, Mn as h, Ni as m, O as y, Rn as I, St as b, Ur as x, Vn as R, Ya as E, Z as T, ar as A, bt as S, da as w, dn as C, fr as N, ha as F, in as P, mr as L, on as k, po as $, rr as O, st as B, xr as V } from "./Cl04_aSpBHTwfsQR.js";
11
+ var D = (e, t) => e + t, z = (e, t) => e - t, M = (e, t) => y(e + t, e), W = (e, t) => y(e - t, e), U = (e, t) => w(e * t), _ = (e, t) => 0 === t ? l.BuiltIn.Div0 : w(e / t), j = (e, t) => {
12
12
  if (0 === e) {
13
- if (t < 0) return o.BuiltIn.Div0;
13
+ if (t < 0) return l.BuiltIn.Div0;
14
14
  if (0 === t) return NaN;
15
15
  }
16
16
  if (e < 0) {
17
- if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return y(e ** t);
17
+ if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return w(e ** t);
18
18
  const n = Number((1 / t).toPrecision(15));
19
- return Number.isInteger(n) && 1 === Math.abs(n % 2) ? y(-((-e) ** t)) : NaN;
19
+ return Number.isInteger(n) && 1 === Math.abs(n % 2) ? w(-((-e) ** t)) : NaN;
20
20
  }
21
- return y(e ** t);
21
+ return w(e ** t);
22
22
  }, G = (e = "", t = "") => {
23
23
  null === e && (e = ""), null === t && (t = "");
24
24
  const n = typeof t;
25
- "boolean" == typeof e && (e = p(e)), "boolean" === n && (t = p(t));
25
+ "boolean" == typeof e && (e = m(e)), "boolean" === n && (t = m(t));
26
26
  const r = "" + e + t;
27
27
  return r.length > s.MAX_TEXT_LENGTH ? r.slice(0, s.MAX_TEXT_LENGTH) : r;
28
- }, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n), K = (e, t = null, n = null) => e.compare(t, n) > 0, Y = (e, t = null, n = null) => e.compare(t, n) >= 0, Z = (e, t = null, n = null) => e.compare(t, n) < 0, q = (e, t = null, n = null) => e.compare(t, n) <= 0, J = {
28
+ }, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n), Z = (e, t = null, n = null) => e.compare(t, n) > 0, K = (e, t = null, n = null) => e.compare(t, n) >= 0, q = (e, t = null, n = null) => e.compare(t, n) < 0, Y = (e, t = null, n = null) => e.compare(t, n) <= 0, J = {
29
29
  type: i.Number,
30
30
  coerce: [i.Boolean, i.String],
31
31
  onError: "value",
32
- misalignValue: o.BuiltIn.NA
32
+ misalignValue: l.BuiltIn.NA
33
33
  }, Q = {
34
34
  type: i.String,
35
35
  coerce: [i.Boolean, i.Number],
36
36
  onError: "value",
37
- misalignValue: o.BuiltIn.NA
37
+ misalignValue: l.BuiltIn.NA
38
38
  }, ee = {
39
39
  onError: "value",
40
- misalignValue: o.BuiltIn.NA
40
+ misalignValue: l.BuiltIn.NA
41
41
  }, te = (e) => null !== e && "object" == typeof e && !0 === e.isIReferenceRange && 1 === e.size ? e.getValueAt(0, 0) ?? null : e, ne = (e, t, n, r) => {
42
- if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && o.isError(t)) return t;
43
- if (null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && o.isError(n)) return n;
42
+ if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && l.isError(t)) return t;
43
+ if (null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && l.isError(n)) return n;
44
44
  if (t = te(t), n = te(n), "number" == typeof t && "number" == typeof n) return r(t, n);
45
- let s, l;
46
- if (t?.isIRange ? s = t : n?.isIRange && (l = n), !s && !l) {
45
+ let s, o;
46
+ if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
47
47
  const s = e.getRuntime();
48
- return t = g(s, t, a(t, !0), i.Number, !0), n = g(s, n, a(n, !0), i.Number, !0), t && o.isError(t) ? t : n && o.isError(n) ? n : r(t, n);
48
+ return t = c(s, t, k(t, !0), i.Number, !0), n = c(s, n, k(n, !0), i.Number, !0), t && l.isError(t) ? t : n && l.isError(n) ? n : r(t, n);
49
49
  }
50
- const u = !s, c = u ? t : n;
51
- return (s ?? l).broadcast(c, (t, n) => t && o.isError(t) ? t : n && o.isError(n) ? n : w(u ? r(n, t) : r(t, n), e), J).fillEmpty(0);
50
+ const a = !s, u = a ? t : n;
51
+ return (s ?? o).broadcast(u, (t, n) => t && l.isError(t) ? t : n && l.isError(n) ? n : h(a ? r(n, t) : r(t, n), e), J).fillEmpty(0);
52
52
  }, re = (e, t, r, i) => {
53
- if (A(t) || A(r)) return o.BuiltIn.Value;
54
- if (n(t) || n(r)) return o.BuiltIn.Value;
55
- if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && o.isError(t)) return t;
56
- if (null !== r && void 0 !== r.colStart && (r = e.getValueAt(r.rowStart, r.colStart, r.scope)) && o.isError(r)) return r;
57
- let s, l;
53
+ if (N(t) || N(r)) return l.BuiltIn.Value;
54
+ if (n(t) || n(r)) return l.BuiltIn.Value;
55
+ if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && l.isError(t)) return t;
56
+ if (null !== r && void 0 !== r.colStart && (r = e.getValueAt(r.rowStart, r.colStart, r.scope)) && l.isError(r)) return r;
57
+ let s, o;
58
58
  t = te(t), r = te(r);
59
59
  let a = !1;
60
- return t?.isIRange ? (s = t, l = r) : r?.isIRange && (s = r, l = t, a = !0), s ? s.broadcast(l, (t, n) => t && o.isError(t) ? t : n && o.isError(n) ? n : (t = ie(t), n = ie(n), a ? i(e, n, t) : i(e, t, n)), ee) : o.isError(t) ? t : o.isError(r) ? r : i(e, ie(t), ie(r));
60
+ return t?.isIRange ? (s = t, o = r) : r?.isIRange && (s = r, o = t, a = !0), s ? s.broadcast(o, (t, n) => t && l.isError(t) ? t : n && l.isError(n) ? n : (t = ie(t), n = ie(n), a ? i(e, n, t) : i(e, t, n)), ee) : l.isError(t) ? t : l.isError(r) ? r : i(e, ie(t), ie(r));
61
61
  }, ie = (e) => {
62
62
  if (!0 !== e?.isIRichData) return e;
63
63
  const t = e.toPrimitive?.();
64
64
  return null == t ? e : t;
65
65
  }, se = (e, t, n) => {
66
- if (n ??= 0, null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && o.isError(n)) return n;
66
+ if (n ??= 0, null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && l.isError(n)) return n;
67
67
  n = te(n);
68
68
  let r, s = 1;
69
69
  if ("+" === t) return n;
70
- if ("-" !== t) throw new o.Value(`Unrecognized prefix: ${t}`);
70
+ if ("-" !== t) throw new l.Value(`Unrecognized prefix: ${t}`);
71
71
  if (s = -s, n?.isIRange && (r = n), !r) {
72
72
  const t = e.getRuntime();
73
- return "number" != typeof (n = g(t, n, a(n, !0), i.Number, !0)) ? o.BuiltIn.Value : n * s;
73
+ return "number" != typeof (n = c(t, n, k(n, !0), i.Number, !0)) ? l.BuiltIn.Value : n * s;
74
74
  }
75
- return r.broadcast(s, (e, t) => e && o.isError(e) ? e : t && o.isError(t) ? t : U(e, t), J);
76
- }, oe = (e) => e.getCode() <= o.Code.NA ? e : o.BuiltIn.Value, le = (e, t, n, r, i) => {
77
- if (o.isError(t)) return oe(t);
78
- if (n && o.isError(n)) return oe(n);
79
- if (!t) return o.BuiltIn.Ref;
80
- if (t.isIReferenceRange && n && !n.isIReferenceRange ? n = e.getReference(n) : n && n.isIReferenceRange && t && !t.isIReferenceRange && (t = e.getReference(t)), t.isIReferenceRange && (t = t.getCoords()), void 0 === t.colStart) return o.BuiltIn.Value;
81
- if (n.isIReferenceRange && (n = n.getCoords()), void 0 === n.colStart) return o.BuiltIn.Value;
75
+ return r.broadcast(s, (e, t) => e && l.isError(e) ? e : t && l.isError(t) ? t : U(e, t), J);
76
+ }, le = (e) => e.getCode() <= l.Code.NA ? e : l.BuiltIn.Value, oe = (e, t, n, r, i) => {
77
+ if (l.isError(t)) return le(t);
78
+ if (n && l.isError(n)) return le(n);
79
+ if (!t) return l.BuiltIn.Ref;
80
+ if (t.isIReferenceRange && n && !n.isIReferenceRange ? n = e.getReference(n) : n && n.isIReferenceRange && t && !t.isIReferenceRange && (t = e.getReference(t)), t.isIReferenceRange && (t = t.getCoords()), void 0 === t.colStart) return l.BuiltIn.Value;
81
+ if (n.isIReferenceRange && (n = n.getCoords()), void 0 === n.colStart) return l.BuiltIn.Value;
82
82
  const s = t.scope ? "either" !== i || n.scope ? null : t : n;
83
83
  if (s?.scope) {
84
84
  const t = e.getReference(s);
85
- if (o.isError(t)) return t;
86
- if (e.getSheetIndex() !== e.getSheetIndex(t)) return o.BuiltIn.Value;
85
+ if (l.isError(t)) return t;
86
+ if (e.getSheetIndex() !== e.getSheetIndex(t)) return l.BuiltIn.Value;
87
87
  }
88
- const l = r(t, n);
89
- return o.isError(l) ? l : l ? e.getReference(l) : o.BuiltIn.Null;
88
+ const o = r(t, n);
89
+ return l.isError(o) ? o : o ? e.getReference(o) : l.BuiltIn.Null;
90
90
  }, ae = {
91
- "+": (e, t, n) => ne(e, t, n, z),
92
- "-": (e, t, n) => ne(e, t, n, D),
91
+ "+": (e, t, n) => ne(e, t, n, D),
92
+ "-": (e, t, n) => ne(e, t, n, z),
93
93
  "*": (e, t, n) => ne(e, t, n, U),
94
94
  "/": (e, t, n) => ne(e, t, n, _),
95
95
  "^": (e, t, n) => ne(e, t, n, j),
96
- " ": (e, t, n, r) => le(e, t, n, O, "either"),
97
- ":": (e, t, n, r) => le(e, t, n, L, "start"),
96
+ " ": (e, t, n, r) => oe(e, t, n, B, "either"),
97
+ ":": (e, t, n, r) => oe(e, t, n, R, "start"),
98
98
  ".:.": (e, t, n, r) => {
99
- const i = le(e, t, n, L, "start");
99
+ const i = oe(e, t, n, R, "start");
100
100
  return e.getFunction("TRIMRANGE").execute(i, 3, 3);
101
101
  },
102
102
  ".:": (e, t, n, r) => {
103
- const i = le(e, t, n, L, "start");
103
+ const i = oe(e, t, n, R, "start");
104
104
  return e.getFunction("TRIMRANGE").execute(i, 1, 1);
105
105
  },
106
106
  ":.": (e, t, n, r) => {
107
- const i = le(e, t, n, L, "start");
107
+ const i = oe(e, t, n, R, "start");
108
108
  return e.getFunction("TRIMRANGE").execute(i, 2, 2);
109
109
  },
110
110
  "&": (e, t, n) => ((e, t, n, r) => {
111
- if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && o.isError(t)) return t;
112
- if (null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && o.isError(n)) return n;
111
+ if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && l.isError(t)) return t;
112
+ if (null !== n && void 0 !== n.colStart && (n = e.getValueAt(n.rowStart, n.colStart, n.scope)) && l.isError(n)) return n;
113
113
  if (t = te(t), n = te(n), "string" == typeof t && "string" == typeof n) return r(t, n);
114
- let s, l;
115
- if (t?.isIRange ? s = t : n?.isIRange && (l = n), !s && !l) {
114
+ let s, o;
115
+ if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
116
116
  const s = e.getRuntime();
117
- return t = g(s, t, a(t, !0), i.String, !1), n = g(s, n, a(n, !0), i.String, !1), o.isError(t) ? t : o.isError(n) ? n : r(t, n);
117
+ return t = c(s, t, k(t, !0), i.String, !1), n = c(s, n, k(n, !0), i.String, !1), l.isError(t) ? t : l.isError(n) ? n : r(t, n);
118
118
  }
119
- const u = !s, c = u ? t : n;
120
- return (s ?? l).broadcast(c, (e, t) => e && o.isError(e) ? e : t && o.isError(t) ? t : u ? r(t, e) : r(e, t), Q);
119
+ const a = !s, u = a ? t : n;
120
+ return (s ?? o).broadcast(u, (e, t) => e && l.isError(e) ? e : t && l.isError(t) ? t : a ? r(t, e) : r(e, t), Q);
121
121
  })(e, t, n, G),
122
122
  "=": (e, t, n) => re(e, t, n, H),
123
123
  "<>": (e, t, n) => re(e, t, n, X),
124
- ">": (e, t, n) => re(e, t, n, K),
125
- "<": (e, t, n) => re(e, t, n, Z),
126
- ">=": (e, t, n) => re(e, t, n, Y),
127
- "<=": (e, t, n) => re(e, t, n, q)
124
+ ">": (e, t, n) => re(e, t, n, Z),
125
+ "<": (e, t, n) => re(e, t, n, q),
126
+ ">=": (e, t, n) => re(e, t, n, K),
127
+ "<=": (e, t, n) => re(e, t, n, Y)
128
128
  }, ue = {
129
129
  "+": (e, t, n) => ne(e, t, n, M),
130
130
  "-": (e, t, n) => ne(e, t, n, W)
@@ -135,12 +135,12 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => f(e + t, e), W = (e,
135
135
  if (!t || !t.isIRange) return t;
136
136
  const n = t;
137
137
  if (!t.isIReferenceRange) return n.getValueAt(0, 0);
138
- const r = t.getCoords(), i = n.getRowCount(), s = n.getColumnCount(), l = e.getRow() - r.rowStart, a = e.getColumn() - r.colStart, u = l >= 0 && l < i, c = a >= 0 && a < s;
139
- return u && c ? n.getValueAt(l, a) : u && 1 === s ? n.getValueAt(l, 0) : c && 1 === i ? n.getValueAt(0, a) : 1 === i && 1 === s ? n.getValueAt(0, 0) : o.BuiltIn.Value;
138
+ const r = t.getCoords(), i = n.getRowCount(), s = n.getColumnCount(), o = e.getRow() - r.rowStart, a = e.getColumn() - r.colStart, u = o >= 0 && o < i, c = a >= 0 && a < s;
139
+ return u && c ? n.getValueAt(o, a) : u && 1 === s ? n.getValueAt(o, 0) : c && 1 === i ? n.getValueAt(0, a) : 1 === i && 1 === s ? n.getValueAt(0, 0) : l.BuiltIn.Value;
140
140
  }
141
141
  }, fe = {
142
142
  "%": (e, t) => ne(e, t, 100, _),
143
- "#": (e, t) => o.isError(t) ? oe(t) : t ? (t.isIReferenceRange && (t = t.getCoords()), void 0 === t.colStart ? o.BuiltIn.Value : t.rowStart !== t.rowEnd || t.colStart !== t.colEnd ? o.BuiltIn.Ref : e.getSpillAt(t.rowStart, t.colStart, t.scope) || o.BuiltIn.Ref) : o.BuiltIn.Ref
143
+ "#": (e, t) => l.isError(t) ? le(t) : t ? (t.isIReferenceRange && (t = t.getCoords()), void 0 === t.colStart ? l.BuiltIn.Value : t.rowStart !== t.rowEnd || t.colStart !== t.colEnd ? l.BuiltIn.Ref : e.getSpillAt(t.rowStart, t.colStart, t.scope) || l.BuiltIn.Ref) : l.BuiltIn.Ref
144
144
  };
145
145
  function pe(e, t) {
146
146
  for (let n = e.length - 1; n >= 0; n--) if (e[n].type === t) return e[n];
@@ -159,38 +159,38 @@ var de = class {
159
159
  value: null,
160
160
  inputs: null
161
161
  };
162
- if (this.references.set(e, t), n === x.Cell) {
162
+ if (this.references.set(e, t), n === E.Cell) {
163
163
  const n = e.value;
164
164
  n.$colIndex && (t.hasHorizontalAbs = !0), n.$rowIndex && (t.hasVerticalAbs = !0), t.value = this.cells.size, this.cells.set(e, this.cells.size), this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
165
165
  return;
166
166
  }
167
- if (n === x.Infix || n === x.Prefix || n === x.Postfix || n === x.List) {
167
+ if (n === E.Infix || n === E.Prefix || n === E.Postfix || n === E.List) {
168
168
  const n = e.inputs || [], r = n.length, i = e.value;
169
169
  t.op = i;
170
- const s = k(r);
170
+ const s = $(r);
171
171
  t.inputs = s;
172
172
  for (let e = 0; e < r; e++) {
173
173
  const r = n[e], i = this.references.get(r);
174
174
  i ? (i.hasHorizontalAbs && (t.hasHorizontalAbs = !0), i.hasVerticalAbs && (t.hasVerticalAbs = !0), s[e] = i.index) : s[e] = -1, i && this.rootReferences.delete(i);
175
175
  }
176
- if (this.rootReferences.add(t), Ze.includes(i)) {
177
- const r = n[0], i = !!r && r.type === x.Cell, s = n[1], o = !!s && s.type === x.Cell;
178
- i && o && void 0 !== s.referenceIndex && void 0 !== r.referenceIndex && (this.referenceIndices.splice(s.referenceIndex, 1), s.referenceIndex = r.referenceIndex, e.referenceIndex = r.referenceIndex, this.referenceIndices[r.referenceIndex] = t.index);
176
+ if (this.rootReferences.add(t), qe.includes(i)) {
177
+ const r = n[0], i = !!r && r.type === E.Cell, s = n[1], l = !!s && s.type === E.Cell;
178
+ i && l && void 0 !== s.referenceIndex && void 0 !== r.referenceIndex && (this.referenceIndices.splice(s.referenceIndex, 1), s.referenceIndex = r.referenceIndex, e.referenceIndex = r.referenceIndex, this.referenceIndices[r.referenceIndex] = t.index);
179
179
  } else "#" === i && n[0] && (e.referenceIndex = n[0].referenceIndex);
180
180
  return;
181
181
  }
182
- if (n === x.Error || n === x.Named) {
183
- const r = n === x.Named ? e.value.nameId : b(e.value);
182
+ if (n === E.Error || n === E.Named) {
183
+ const r = n === E.Named ? e.value.nameId : v(e.value);
184
184
  let i = this.names.get(r);
185
185
  t.op = n, void 0 === i && (i = this.names.size, this.names.set(r, i)), t.value = i, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
186
186
  return;
187
187
  }
188
- if (n === x.TableReference) return t.op = n, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, void this.referenceIndices.push(t.index);
188
+ if (n === E.TableReference) return t.op = n, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, void this.referenceIndices.push(t.index);
189
189
  } else if (t && t.isReference) {
190
190
  const t = {
191
191
  node: e,
192
192
  index: this.references.size,
193
- op: x.Function,
193
+ op: E.Function,
194
194
  value: e.value,
195
195
  inputs: null
196
196
  };
@@ -198,83 +198,83 @@ var de = class {
198
198
  }
199
199
  }
200
200
  };
201
- function ge(e, t = !1, n = E) {
201
+ function ge(e, t = !1, n = L) {
202
202
  const r = [], i = /* @__PURE__ */ new Set(), s = (e, n, s) => {
203
- const o = {
203
+ const l = {
204
204
  type: e.type,
205
- value: e.type === x.Error ? m(e.value) : e.value
205
+ value: e.type === E.Error ? V(e.value) : e.value
206
206
  };
207
- void 0 !== e.image && (o.text = ((e) => {
207
+ void 0 !== e.image && (l.text = ((e) => {
208
208
  const n = t ? e.value?.scopeImage : void 0;
209
209
  return "string" == typeof n ? n : "";
210
210
  })(e) + e.image);
211
- const l = e.evalIndex ?? s;
212
- return void 0 !== l && (o.evalIndex = l), n && (o.context = n), void 0 !== e.referenceIndex && (o.referenceIndex = e.referenceIndex), e.isReference && i.add(o), r.push(o), o;
213
- }, o = (e, t, n, i, s) => {
211
+ const o = e.evalIndex ?? s;
212
+ return void 0 !== o && (l.evalIndex = o), n && (l.context = n), void 0 !== e.referenceIndex && (l.referenceIndex = e.referenceIndex), e.isReference && i.add(l), r.push(l), l;
213
+ }, l = (e, t, n, i, s) => {
214
214
  if (null == t) return;
215
- if (r.length > 1 && e === x.Whitespace && r[r.length - 1].type === x.Whitespace) return;
216
- const o = {
215
+ if (r.length > 1 && e === E.Whitespace && r[r.length - 1].type === E.Whitespace) return;
216
+ const l = {
217
217
  type: e,
218
218
  value: t,
219
219
  text: s ?? t
220
220
  };
221
- void 0 !== i && (o.evalIndex = i), n && (o.context = n), r.push(o);
221
+ void 0 !== i && (l.evalIndex = i), n && (l.context = n), r.push(l);
222
222
  };
223
- (function e(l, a, u) {
224
- const f = l.evalIndex ?? u ?? 0, p = l.type, d = (t, r, i) => {
223
+ (function e(o, a, u) {
224
+ const c = o.evalIndex ?? u ?? 0, f = o.type, p = (t, r, i) => {
225
225
  if (!t) return;
226
226
  const s = t.length;
227
- for (let l = 0; l < s; l++) e(t[l], r, i), l < s - 1 && o(x.Separator, ",", r, i, n.separatorFunction);
227
+ for (let o = 0; o < s; o++) e(t[o], r, i), o < s - 1 && l(E.Separator, ",", r, i, n.separatorFunction);
228
228
  };
229
- if (l.isLiteral) {
230
- if (o(x.Whitespace, l.wsBefore, a, f), p === x.Array) {
231
- o(x.Type, "{", a, f);
232
- const t = l.value, r = t.length;
229
+ if (o.isLiteral) {
230
+ if (l(E.Whitespace, o.wsBefore, a, c), f === E.Array) {
231
+ l(E.Type, "{", a, c);
232
+ const t = o.value, r = t.length;
233
233
  for (let i = 0; i < r; i++) {
234
- const s = t[i], l = s.value, u = l.length;
234
+ const s = t[i], o = s.value, u = o.length;
235
235
  for (let t = 0; t < u; t++) {
236
- const r = l[t];
237
- o(x.Whitespace, r.wsBefore, a, f), e(r, a, f), o(x.Whitespace, r.wsAfter, a, f), t < u - 1 && o(x.Separator, ",", a, f, n.separatorColumn);
236
+ const r = o[t];
237
+ l(E.Whitespace, r.wsBefore, a, c), e(r, a, c), l(E.Whitespace, r.wsAfter, a, c), t < u - 1 && l(E.Separator, ",", a, c, n.separatorColumn);
238
238
  }
239
- i < r - 1 && (o(x.Whitespace, s.wsBefore, a, f), o(x.Separator, ";", a, f, n.separatorRow), o(x.Whitespace, s.wsAfter, a, f));
239
+ i < r - 1 && (l(E.Whitespace, s.wsBefore, a, c), l(E.Separator, ";", a, c, n.separatorRow), l(E.Whitespace, s.wsAfter, a, c));
240
240
  }
241
- l.error || o(x.Type, "}", a, f);
242
- } else p === x.String ? (l = {
243
- type: p,
244
- value: "\"" + `${l.value}`.replace(/"/g, "\"\"") + "\"",
245
- image: l.image
246
- }, s(l, a, f)) : s(l, a, f);
247
- o(x.Whitespace, l.wsAfter, a, f);
248
- } else if (p === x.Infix) e(l.inputs[0], a, f), o(x.Whitespace, l.wsBefore, a, f), s(l, a, f), o(x.Whitespace, l.wsAfter, a, f), e(l.inputs[1], a, f);
249
- else if (p === x.Prefix) o(x.Whitespace, l.wsBefore, a, f), s(l, a, f), o(x.Whitespace, l.wsAfter, a, f), l.inputs && e(l.inputs[0], a, f);
250
- else if (p === x.Postfix) {
251
- l.inputs?.[0] && e(l.inputs[0], a, f), o(x.Whitespace, l.wsBefore, a, f);
252
- const t = s(l, a, f), n = r[r.length - 2];
253
- "#" === l.value && void 0 !== t.text && !l.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), o(x.Whitespace, l.wsAfter, a, f);
241
+ o.error || l(E.Type, "}", a, c);
242
+ } else f === E.String ? (o = {
243
+ type: f,
244
+ value: "\"" + `${o.value}`.replace(/"/g, "\"\"") + "\"",
245
+ image: o.image
246
+ }, s(o, a, c)) : s(o, a, c);
247
+ l(E.Whitespace, o.wsAfter, a, c);
248
+ } else if (f === E.Infix) e(o.inputs[0], a, c), l(E.Whitespace, o.wsBefore, a, c), s(o, a, c), l(E.Whitespace, o.wsAfter, a, c), e(o.inputs[1], a, c);
249
+ else if (f === E.Prefix) l(E.Whitespace, o.wsBefore, a, c), s(o, a, c), l(E.Whitespace, o.wsAfter, a, c), o.inputs && e(o.inputs[0], a, c);
250
+ else if (f === E.Postfix) {
251
+ o.inputs?.[0] && e(o.inputs[0], a, c), l(E.Whitespace, o.wsBefore, a, c);
252
+ const t = s(o, a, c), n = r[r.length - 2];
253
+ "#" === o.value && void 0 !== t.text && !o.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), l(E.Whitespace, o.wsAfter, a, c);
254
254
  } else {
255
- o(x.Whitespace, l.wsBefore, a, f);
256
- const u = l.inputs;
257
- switch (p) {
258
- case x.Function: {
259
- const t = String(l.value), i = {
260
- type: x.Function,
255
+ l(E.Whitespace, o.wsBefore, a, c);
256
+ const u = o.inputs;
257
+ switch (f) {
258
+ case E.Function: {
259
+ const t = String(o.value), i = {
260
+ type: E.Function,
261
261
  value: t,
262
- text: l.image ?? t,
263
- evalIndex: l.evalIndex
262
+ text: o.image ?? t,
263
+ evalIndex: o.evalIndex
264
264
  };
265
265
  a && (i.context = a), r.push(i);
266
266
  const s = {
267
267
  name: t,
268
268
  argIndex: -1,
269
- type: l.binder?.kind ?? "function"
269
+ type: o.binder?.kind ?? "function"
270
270
  };
271
- if (a?.bound && (s.bound = a.bound), o(x.Paren, "(", s, l.evalIndex), u) {
272
- const t = u.length, r = l.binder?.kind, i = "lambda" === r ? 1 : "let" === r ? 2 : 0;
271
+ if (a?.bound && (s.bound = a.bound), l(E.Paren, "(", s, o.evalIndex), u) {
272
+ const t = u.length, r = o.binder?.kind, i = "lambda" === r ? 1 : "let" === r ? 2 : 0;
273
273
  let a = s.bound;
274
- for (let l = 0; l < t; l++) {
275
- const c = i && l >= i ? u[l - i] : void 0;
276
- if (c?.binding?.declaration) {
277
- const e = c.value.nameId, t = "let" === r ? Rt(u[l - 1]) : void 0;
274
+ for (let o = 0; o < t; o++) {
275
+ const f = i && o >= i ? u[o - i] : void 0;
276
+ if (f?.binding?.declaration) {
277
+ const e = f.value.nameId, t = "let" === r ? Rt(u[o - 1]) : void 0;
278
278
  a = xt(a, t ? {
279
279
  name: e,
280
280
  params: t
@@ -282,49 +282,49 @@ function ge(e, t = !1, n = E) {
282
282
  }
283
283
  const p = {
284
284
  ...s,
285
- argIndex: l
285
+ argIndex: o
286
286
  };
287
- a && (p.bound = a), e(u[l], p, f), l < t - 1 && o(x.Separator, ",", p, f, n.separatorFunction);
287
+ a && (p.bound = a), e(u[o], p, c), o < t - 1 && l(E.Separator, ",", p, c, n.separatorFunction);
288
288
  }
289
289
  }
290
- l.error || o(x.Paren, ")", s, l.evalIndex);
290
+ o.error || l(E.Paren, ")", s, o.evalIndex);
291
291
  break;
292
292
  }
293
- case x.Call: {
294
- const t = c(l), i = r.length;
295
- if (t && e(t, a, f), t?.type === x.Named) for (let e = i; e < r.length; e++) {
293
+ case E.Call: {
294
+ const t = b(o), i = r.length;
295
+ if (t && e(t, a, c), t?.type === E.Named) for (let e = i; e < r.length; e++) {
296
296
  const t = r[e];
297
- t.type !== x.Whitespace && (t.evalIndex = l.evalIndex, t.type === x.Named && (t.type = x.Function, t.value = t.value.name));
297
+ t.type !== E.Whitespace && (t.evalIndex = o.evalIndex, t.type === E.Named && (t.type = E.Function, t.value = t.value.name));
298
298
  }
299
299
  const s = {
300
- name: t?.type === x.Named ? t.value.nameId : "",
300
+ name: t?.type === E.Named ? t.value.nameId : "",
301
301
  argIndex: -1,
302
302
  type: "function"
303
303
  };
304
- a?.bound && (s.bound = a.bound), o(x.Paren, "(", s, l.evalIndex);
305
- const u = C(l), p = u.length;
306
- for (let t = 0; t < p; t++) {
304
+ a?.bound && (s.bound = a.bound), l(E.Paren, "(", s, o.evalIndex);
305
+ const u = C(o), f = u.length;
306
+ for (let t = 0; t < f; t++) {
307
307
  const r = {
308
308
  ...s,
309
309
  argIndex: t
310
310
  };
311
- e(u[t], r, f), t < p - 1 && o(x.Separator, ",", r, f, n.separatorFunction);
311
+ e(u[t], r, c), t < f - 1 && l(E.Separator, ",", r, c, n.separatorFunction);
312
312
  }
313
- l.error || o(x.Paren, ")", s, l.evalIndex);
313
+ o.error || l(E.Paren, ")", s, o.evalIndex);
314
314
  break;
315
315
  }
316
- case x.Cell:
317
- s(l, a, f);
316
+ case E.Cell:
317
+ s(o, a, c);
318
318
  break;
319
- case x.Paren:
320
- o(p, "(", a, f), d(u, a, f), l.error || o(p, ")", a, f);
319
+ case E.Paren:
320
+ l(f, "(", a, c), p(u, a, c), o.error || l(f, ")", a, c);
321
321
  break;
322
- case x.TableReference: {
323
- const n = l.value?.tableId ?? "", s = {
322
+ case E.TableReference: {
323
+ const n = o.value?.tableId ?? "", s = {
324
324
  name: n,
325
325
  argIndex: -1,
326
326
  type: "table"
327
- }, c = r.length, p = l.image;
327
+ }, f = r.length, p = o.image;
328
328
  let d, g = !1;
329
329
  if (n && p) {
330
330
  let e = 0;
@@ -339,58 +339,58 @@ function ge(e, t = !1, n = E) {
339
339
  d = t || -1 === e ? p : p.slice(e + 1);
340
340
  }
341
341
  }
342
- if (!n || g && t || o(x.TableReference, n, a, f, d), u && o(x.Paren, "[", s, f), u) {
342
+ if (!n || g && t || l(E.TableReference, n, a, c, d), u && l(E.Paren, "[", s, c), u) {
343
343
  const t = u.length;
344
344
  for (let n = 0; n < t; n++) {
345
345
  const r = {
346
346
  ...s,
347
347
  argIndex: n
348
348
  };
349
- e(u[n], r, f), n < t - 1 && o(x.Separator, ",", r, f);
349
+ e(u[n], r, c), n < t - 1 && l(E.Separator, ",", r, c);
350
350
  }
351
351
  }
352
- u && !l.error && o(x.Paren, "]", s, f);
353
- const v = l.referenceIndex;
354
- for (let e = c; e < r.length; e++) void 0 !== v && (r[e].referenceIndex = v), i.add(r[e]);
352
+ u && !o.error && l(E.Paren, "]", s, c);
353
+ const v = o.referenceIndex;
354
+ for (let e = f; e < r.length; e++) void 0 !== v && (r[e].referenceIndex = v), i.add(r[e]);
355
355
  break;
356
356
  }
357
- case x.TableSpecifier:
358
- case x.TableColumn: {
359
- const e = l.image, t = null != e && e.startsWith("[") && e.endsWith("]");
360
- t && o(x.Paren, "[", a, f);
357
+ case E.TableSpecifier:
358
+ case E.TableColumn: {
359
+ const e = o.image, t = null != e && e.startsWith("[") && e.endsWith("]");
360
+ t && l(E.Paren, "[", a, c);
361
361
  const n = {
362
362
  table: "table" === a?.type ? a.name : "",
363
- name: l.value
363
+ name: o.value
364
364
  }, i = {
365
- type: p,
365
+ type: f,
366
366
  value: n,
367
367
  text: t ? e.slice(1, -1) : e ?? n.name
368
368
  };
369
- void 0 !== f && (i.evalIndex = f), a && (i.context = a), r.push(i), t && o(x.Paren, "]", a, f);
369
+ void 0 !== c && (i.evalIndex = c), a && (i.context = a), r.push(i), t && l(E.Paren, "]", a, c);
370
370
  break;
371
371
  }
372
- case x.List:
373
- d(u, a, f);
372
+ case E.List:
373
+ p(u, a, c);
374
374
  break;
375
- case x.Named: {
376
- const e = s(l, a, f), t = l.value;
375
+ case E.Named: {
376
+ const e = s(o, a, c), t = o.value;
377
377
  e.value = t.scope ? {
378
378
  name: t.nameId,
379
379
  scope: t.scope
380
- } : { name: t.nameId }, l.binding?.declaration && l.binding.optional && (e.value.optional = !0), l.binding && (e.type = x.Parameter, l.binding.declaration && (e.value.declaration = !0)), delete e.referenceIndex;
380
+ } : { name: t.nameId }, o.binding?.declaration && o.binding.optional && (e.value.optional = !0), o.binding && (e.type = E.Parameter, o.binding.declaration && (e.value.declaration = !0)), delete e.referenceIndex;
381
381
  break;
382
382
  }
383
- default: void 0 !== l.value && s(l, a, f), u && u.forEach((t) => e(t, a, f));
383
+ default: void 0 !== o.value && s(o, a, c), u && u.forEach((t) => e(t, a, c));
384
384
  }
385
- o(x.Whitespace, l.wsAfter, a, f);
385
+ l(E.Whitespace, o.wsAfter, a, c);
386
386
  }
387
387
  })(e);
388
- const l = /* @__PURE__ */ new Map();
389
- for (const e of r) if (e.type === x.Cell && void 0 !== e.referenceIndex) {
390
- const t = l.get(e.referenceIndex);
391
- t ? t.push(e) : l.set(e.referenceIndex, [e]);
388
+ const o = /* @__PURE__ */ new Map();
389
+ for (const e of r) if (e.type === E.Cell && void 0 !== e.referenceIndex) {
390
+ const t = o.get(e.referenceIndex);
391
+ t ? t.push(e) : o.set(e.referenceIndex, [e]);
392
392
  }
393
- for (const e of l.values()) 1 === e.length ? e[0].refSide = "self" : (e[0].refSide = "left", e[e.length - 1].refSide = "right");
393
+ for (const e of o.values()) 1 === e.length ? e[0].refSide = "self" : (e[0].refSide = "left", e[e.length - 1].refSide = "right");
394
394
  const a = /* @__PURE__ */ new Map();
395
395
  for (const e of r) if (void 0 !== e.referenceIndex && void 0 !== e.evalIndex) {
396
396
  const t = a.get(e.referenceIndex);
@@ -408,64 +408,64 @@ function ve(e, t) {
408
408
  let n = "";
409
409
  for (let r = 0; r < e.length; r++) {
410
410
  const i = e[r], s = i.type;
411
- if (s === x.Cell || s === x.Named || s === x.Error) {
412
- const e = s === x.Cell ? i.value?.scope : (x.Named, i.value?.scope ?? void 0), r = s === x.Error ? void 0 !== i.text && T(i.text) : i.text?.includes("!") ?? !1;
411
+ if (s === E.Cell || s === E.Named || s === E.Error) {
412
+ const e = s === E.Cell ? i.value?.scope : (E.Named, i.value?.scope ?? void 0), r = s === E.Error ? void 0 !== i.text && p(i.text) : i.text?.includes("!") ?? !1;
413
413
  if (e && void 0 !== i.text && !r) {
414
- const r = t?.resolve(d.Sheet, e)?.toString() ?? e;
415
- n += R(r) + "!" + i.text;
414
+ const r = t?.resolve(S.Sheet, e)?.toString() ?? e;
415
+ n += I(r) + "!" + i.text;
416
416
  continue;
417
417
  }
418
- if (s === x.Named) {
418
+ if (s === E.Named) {
419
419
  n += i.text ?? i.value?.name ?? "";
420
420
  continue;
421
421
  }
422
422
  }
423
- if (s === x.Parameter) {
423
+ if (s === E.Parameter) {
424
424
  n += i.text ?? i.value?.name ?? "";
425
425
  continue;
426
426
  }
427
- const o = i.text ?? i.value;
428
- "string" == typeof o && (n += o);
427
+ const l = i.text ?? i.value;
428
+ "string" == typeof l && (n += l);
429
429
  }
430
430
  return n;
431
431
  }
432
432
  function he(e, t) {
433
433
  let n;
434
- if (F(e, (e) => {
434
+ if (x(e, (e) => {
435
435
  e.evalIndex === t && (n = e);
436
436
  }), !n) return [];
437
437
  const r = ge(n);
438
- return r.length > 1 && r[0].type === x.Whitespace && r.shift(), r.length > 1 && r[r.length - 1].type === x.Whitespace && r.pop(), r;
438
+ return r.length > 1 && r[0].type === E.Whitespace && r.shift(), r.length > 1 && r[r.length - 1].type === E.Whitespace && r.pop(), r;
439
439
  }
440
440
  function me(e) {
441
- return F(e, (e) => {
442
- if (e.type !== x.TableReference) return;
441
+ return x(e, (e) => {
442
+ if (e.type !== E.TableReference) return;
443
443
  const t = function(e) {
444
444
  if (null !== e.value && "object" == typeof e.value) return e.value;
445
445
  const t = e.value, n = e.inputs;
446
- let r = !1, i = !1, s = !1, o = !1, l = null, a = null, u = !1;
446
+ let r = !1, i = !1, s = !1, l = !1, o = null, a = null, u = !1;
447
447
  const c = (e) => {
448
- e?.type === x.TableColumn && (l = e.value, a = e.value);
448
+ e?.type === E.TableColumn && (o = e.value, a = e.value);
449
449
  };
450
450
  if (n) for (const e of n) {
451
451
  const t = e.type;
452
- if (t === x.TableSpecifier) {
452
+ if (t === E.TableSpecifier) {
453
453
  const t = e.value.toUpperCase().trim();
454
- "#ALL" === t ? i = !0 : "#HEADERS" === t ? s = !0 : "#TOTALS" === t ? o = !0 : "#DATA" === t ? r = !0 : "@" !== t && "#THIS ROW" !== t || (u = !0);
455
- } else if (t === x.TableColumn) c(e);
456
- else if (t === x.Infix && ":" === e.value) {
454
+ "#ALL" === t ? i = !0 : "#HEADERS" === t ? s = !0 : "#TOTALS" === t ? l = !0 : "#DATA" === t ? r = !0 : "@" !== t && "#THIS ROW" !== t || (u = !0);
455
+ } else if (t === E.TableColumn) c(e);
456
+ else if (t === E.Infix && ":" === e.value) {
457
457
  const t = e.inputs?.[0], n = e.inputs?.[1];
458
- t?.type === x.TableColumn && (l = t.value), n?.type === x.TableColumn && (a = n.value);
459
- } else if (t === x.Prefix && "@" === e.value) {
458
+ t?.type === E.TableColumn && (o = t.value), n?.type === E.TableColumn && (a = n.value);
459
+ } else if (t === E.Prefix && "@" === e.value) {
460
460
  u = !0;
461
461
  const t = e.inputs?.[0];
462
- t?.type === x.Infix && ":" === t.value ? (t.inputs?.[0]?.type === x.TableColumn && (l = t.inputs[0].value), t.inputs?.[1]?.type === x.TableColumn && (a = t.inputs[1].value)) : c(t);
462
+ t?.type === E.Infix && ":" === t.value ? (t.inputs?.[0]?.type === E.TableColumn && (o = t.inputs[0].value), t.inputs?.[1]?.type === E.TableColumn && (a = t.inputs[1].value)) : c(t);
463
463
  }
464
464
  }
465
465
  return {
466
466
  tableId: t,
467
- spec: V(i, s, r, o),
468
- columnFromId: l,
467
+ spec: T(i, s, r, l),
468
+ columnFromId: o,
469
469
  columnToId: a,
470
470
  isThisRow: u
471
471
  };
@@ -477,16 +477,16 @@ function me(e) {
477
477
  });
478
478
  }
479
479
  function ye(e) {
480
- return F(e, (e) => {
481
- if (e.type !== x.TableReference) return;
480
+ return x(e, (e) => {
481
+ if (e.type !== E.TableReference) return;
482
482
  const t = e.inputs;
483
483
  if (!t) return;
484
- if (-1 === t.findIndex((e) => e.type === x.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim())) return;
484
+ if (-1 === t.findIndex((e) => e.type === E.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim())) return;
485
485
  const n = [];
486
486
  let r;
487
- for (const e of t) e.type === x.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim() || (e.type !== x.TableColumn && (e.type !== x.Infix || ":" !== e.value) || r ? n.push(e) : r = e);
487
+ for (const e of t) e.type === E.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim() || (e.type !== E.TableColumn && (e.type !== E.Infix || ":" !== e.value) || r ? n.push(e) : r = e);
488
488
  if (!r) return n.push({
489
- type: x.Prefix,
489
+ type: E.Prefix,
490
490
  value: "@",
491
491
  inputs: null,
492
492
  isReference: !0
@@ -498,15 +498,15 @@ function ye(e) {
498
498
  ...r,
499
499
  image: i.slice(1, -1)
500
500
  } : r;
501
- return n.push(h("@", s, !0)), {
501
+ return n.push(d("@", s, !0)), {
502
502
  ...e,
503
503
  inputs: n
504
504
  };
505
505
  });
506
506
  }
507
507
  function Ie(e) {
508
- return F(e, (e) => {
509
- if (e.type !== x.TableReference) return;
508
+ return x(e, (e) => {
509
+ if (e.type !== E.TableReference) return;
510
510
  if (0 !== e.inputs?.length || e.error) return;
511
511
  const t = e.value;
512
512
  return ("string" == typeof t ? t : t?.tableId) ? {
@@ -516,8 +516,8 @@ function Ie(e) {
516
516
  });
517
517
  }
518
518
  function be(e) {
519
- return F(e, (e) => {
520
- if (e.type !== x.TableReference || !e.inputs) return;
519
+ return x(e, (e) => {
520
+ if (e.type !== E.TableReference || !e.inputs) return;
521
521
  const t = e.value, n = "string" == typeof t ? t : t?.tableId, r = e.image;
522
522
  if (!n || 91 !== r?.charCodeAt(0)) return;
523
523
  const i = r.indexOf("]");
@@ -527,7 +527,7 @@ function be(e) {
527
527
  });
528
528
  }
529
529
  var xe = (e) => {
530
- if (e?.type !== x.TableSpecifier) return 4;
530
+ if (e?.type !== E.TableSpecifier) return 4;
531
531
  switch (e.value.toUpperCase().trim()) {
532
532
  case "#ALL": return 0;
533
533
  case "#HEADERS": return 1;
@@ -537,8 +537,8 @@ var xe = (e) => {
537
537
  }
538
538
  };
539
539
  function Re(e) {
540
- return F(e, (e) => {
541
- if (e.type !== x.TableReference) return;
540
+ return x(e, (e) => {
541
+ if (e.type !== E.TableReference) return;
542
542
  const t = e.inputs;
543
543
  if (!t || t.length < 2) return;
544
544
  const n = t.map((e, t) => ({
@@ -555,8 +555,8 @@ function Re(e) {
555
555
  function Ee(t) {
556
556
  if (!t) return e.EmptyArray;
557
557
  let n = e.EmptyArray;
558
- return F(t, (t) => {
559
- if (t.type !== x.Named || t.binding) return;
558
+ return x(t, (t) => {
559
+ if (t.type !== E.Named || t.binding) return;
560
560
  const r = t.value.nameId;
561
561
  r && (n === e.EmptyArray && (n = []), n.includes(r) || n.push(r));
562
562
  }), n;
@@ -564,13 +564,13 @@ function Ee(t) {
564
564
  function Te(t, n) {
565
565
  if (!t) return e.EmptyArray;
566
566
  let r = e.EmptyArray;
567
- return F(t, (t, i, s) => {
567
+ return x(t, (t, i, s) => {
568
568
  if (!t.isReference) return;
569
569
  if (i?.isReference) return;
570
- const o = t.type;
571
- if (o === x.Named || o === x.Error || o === x.TableReference) return;
572
- if (pe(s, x.TableReference)) return;
573
- const l = function(e) {
570
+ const l = t.type;
571
+ if (l === E.Named || l === E.Error || l === E.TableReference) return;
572
+ if (pe(s, E.TableReference)) return;
573
+ const o = function(e) {
574
574
  let t = e;
575
575
  for (; t;) {
576
576
  if (void 0 !== t.referenceIndex) return t.referenceIndex;
@@ -578,22 +578,22 @@ function Te(t, n) {
578
578
  t = t.inputs?.[0];
579
579
  }
580
580
  }(t);
581
- void 0 !== l && function(e, t, n) {
581
+ void 0 !== o && function(e, t, n) {
582
582
  let r = e;
583
583
  for (let e = t.length - 1; e >= 0; e--) {
584
584
  const i = t[e];
585
- if (i.type === x.Paren || i.isReference) {
585
+ if (i.type === E.Paren || i.isReference) {
586
586
  r = i;
587
587
  continue;
588
588
  }
589
- if (i.type !== x.Function) return !0;
589
+ if (i.type !== E.Function) return !0;
590
590
  const s = n?.(String(i.value));
591
591
  if (!s) return !0;
592
- const o = i.inputs ? i.inputs.indexOf(r) : -1;
593
- return "p" !== (o >= 0 ? Ve(s.getDeclaration().getParameters(), o) : null)?.getRangeType();
592
+ const l = i.inputs ? i.inputs.indexOf(r) : -1;
593
+ return "p" !== (l >= 0 ? Ve(s.getDeclaration().getParameters(), l) : null)?.getRangeType();
594
594
  }
595
595
  return !0;
596
- }(t, s, n) && (r === e.EmptyArray && (r = []), r.includes(l) || r.push(l));
596
+ }(t, s, n) && (r === e.EmptyArray && (r = []), r.includes(o) || r.push(o));
597
597
  }), r.length > 1 && r.sort((e, t) => e - t), r;
598
598
  }
599
599
  var Ae = /* @__PURE__ */ new Set(["SUBTOTAL", "AGGREGATE"]), Se = /* @__PURE__ */ new Set(["GETPIVOTDATA"]);
@@ -603,8 +603,8 @@ function we(e, t) {
603
603
  function Ce(e, t, n) {
604
604
  if (!e || !t) return !1;
605
605
  let r = !1;
606
- return F(e, (e) => {
607
- if (r || e.type !== x.Function) return;
606
+ return x(e, (e) => {
607
+ if (r || e.type !== E.Function) return;
608
608
  const i = t(e.value)?.getName();
609
609
  i && n.has(i.toUpperCase()) && (r = !0);
610
610
  }), r;
@@ -612,15 +612,15 @@ function Ce(e, t, n) {
612
612
  function Ne(e, t) {
613
613
  if (!e || !t) return !1;
614
614
  let n = !1;
615
- return F(e, (e) => {
616
- n || e.type !== x.Function || "TABLE" === t(e.value)?.getName().toUpperCase() && (n = !0);
615
+ return x(e, (e) => {
616
+ n || e.type !== E.Function || "TABLE" === t(e.value)?.getName().toUpperCase() && (n = !0);
617
617
  }), n;
618
618
  }
619
619
  function Fe(e, t) {
620
620
  if (!e || !t) return !1;
621
621
  let n = !1;
622
- return F(e, (e) => {
623
- n || e.type !== x.Function || !0 === t(e.value)?.getDeclaration().getReturnType()?.isVolatile() && (n = !0);
622
+ return x(e, (e) => {
623
+ n || e.type !== E.Function || !0 === t(e.value)?.getDeclaration().getReturnType()?.isVolatile() && (n = !0);
624
624
  }), n;
625
625
  }
626
626
  var Pe = Object.freeze({
@@ -630,21 +630,21 @@ var Pe = Object.freeze({
630
630
  const n = function(e, t) {
631
631
  if (!e || !t) return Pe;
632
632
  let n = !1, r = !1;
633
- return F(e, (e) => {
633
+ return x(e, (e) => {
634
634
  if (n) return;
635
635
  const i = e.type;
636
- if (i === x.Named) return void (void 0 === e.binding && (n = !0));
637
- if (i === x.Prefix) return void ("@" === e.value && (n = !0));
638
- if (i === x.Call) return void (n = !0);
639
- if (i !== x.Function) return;
636
+ if (i === E.Named) return void (void 0 === e.binding && (n = !0));
637
+ if (i === E.Prefix) return void ("@" === e.value && (n = !0));
638
+ if (i === E.Call) return void (n = !0);
639
+ if (i !== E.Function) return;
640
640
  if (void 0 !== e.binder) return;
641
641
  const s = t(e.value);
642
642
  if (!s || !s.isBuiltIn()) return void (n = !0);
643
643
  if (r || !0 !== e.implicitIntersect) return;
644
- const o = s.getDeclaration().getParameters(), l = e.inputs;
645
- if (l) for (let e = 0; e < l.length; e++) {
646
- const n = Ve(o, e);
647
- if (null !== n && n.isValueOrRange() && Ue(l[e], t)) return void (r = !0);
644
+ const l = s.getDeclaration().getParameters(), o = e.inputs;
645
+ if (o) for (let e = 0; e < o.length; e++) {
646
+ const n = Ve(l, e);
647
+ if (null !== n && n.isValueOrRange() && Ue(o[e], t)) return void (r = !0);
648
648
  }
649
649
  }), {
650
650
  value: !n && !r,
@@ -668,20 +668,20 @@ function $e(t) {
668
668
  const r = (t) => {
669
669
  t && (n === e.EmptyArray && (n = []), n.includes(t) || n.push(t));
670
670
  }, i = (e) => {
671
- "string" == typeof e && r(N(e)?.bookId);
671
+ "string" == typeof e && r(o(e)?.bookId);
672
672
  };
673
- return F(t, (e) => {
674
- if (e.type === x.Named) {
673
+ return x(t, (e) => {
674
+ if (e.type === E.Named) {
675
675
  if (e.binding) return;
676
676
  const t = e.value;
677
677
  r(t.nameId), i(t.scope);
678
- } else if (e.type === x.TableReference) {
678
+ } else if (e.type === E.TableReference) {
679
679
  const t = e.value;
680
680
  r("string" == typeof t ? t : t?.tableId);
681
- } else if (e.type === x.Cell) {
681
+ } else if (e.type === E.Cell) {
682
682
  const t = e.value?.scope;
683
- i(t), u(t) && r(t);
684
- } else e.type === x.Error && i(e.value?.scope);
683
+ i(t), f(t) && r(t);
684
+ } else e.type === E.Error && i(e.value?.scope);
685
685
  }), n;
686
686
  }
687
687
  var Oe = (e, t) => {
@@ -704,19 +704,19 @@ var Oe = (e, t) => {
704
704
  if (!r.isRest()) return null;
705
705
  const i = r.getRepeatingTypes();
706
706
  return i && 0 !== i.length ? i[(t - (n - 1)) % i.length] : r;
707
- }, ze = (e) => null !== e.getScalarType() && null === e.getRangeType() && null === e.getLambda() && !e.isValueOrRange(), De = (e, t, n) => !(e.isRest() || !ze(e) || !Ue(t, n) || e.isNoLift() && Me(t, n)), Me = (e, t) => {
707
+ }, De = (e) => null !== e.getScalarType() && null === e.getRangeType() && null === e.getLambda() && !e.isValueOrRange(), ze = (e, t, n) => !(e.isRest() || !De(e) || !Ue(t, n) || e.isNoLift() && Me(t, n)), Me = (e, t) => {
708
708
  if (!e) return !1;
709
709
  const n = e.inputs;
710
710
  switch (e.type) {
711
- case x.Cell:
712
- case x.Named:
713
- case x.TableReference: return !0;
714
- case x.Infix:
715
- case x.Prefix:
716
- case x.Postfix: return !0 === e.isReference && "@" !== e.value;
717
- case x.Paren:
718
- case x.List: return !!n && 1 === n.length && Me(n[0], t);
719
- case x.Function: {
711
+ case E.Cell:
712
+ case E.Named:
713
+ case E.TableReference: return !0;
714
+ case E.Infix:
715
+ case E.Prefix:
716
+ case E.Postfix: return !0 === e.isReference && "@" !== e.value;
717
+ case E.Paren:
718
+ case E.List: return !!n && 1 === n.length && Me(n[0], t);
719
+ case E.Function: {
720
720
  if (void 0 !== e.binder) return !1;
721
721
  const i = String(e.value).toUpperCase();
722
722
  if (Be.has(i)) {
@@ -740,55 +740,55 @@ function Ue(e, t) {
740
740
  let n;
741
741
  const i = e.type, s = e.inputs;
742
742
  switch (i) {
743
- case x.Array:
743
+ case E.Array:
744
744
  n = !0;
745
745
  break;
746
- case x.Cell: {
746
+ case E.Cell: {
747
747
  const t = e.value;
748
748
  n = t.rowIndex === Number.MIN_SAFE_INTEGER || t.colIndex === Number.MIN_SAFE_INTEGER;
749
749
  break;
750
750
  }
751
- case x.Named:
752
- case x.Call:
753
- case x.TableReference:
751
+ case E.Named:
752
+ case E.Call:
753
+ case E.TableReference:
754
754
  n = !0;
755
755
  break;
756
- case x.Infix:
757
- case x.Prefix:
758
- case x.Postfix:
756
+ case E.Infix:
757
+ case E.Prefix:
758
+ case E.Postfix:
759
759
  n = e.isReference ? "@" !== e.value : We(s, t);
760
760
  break;
761
- case x.Paren:
762
- case x.List:
761
+ case E.Paren:
762
+ case E.List:
763
763
  n = !s || 1 !== s.length || Ue(s[0], t);
764
764
  break;
765
- case x.Function: {
765
+ case E.Function: {
766
766
  const i = e.binder;
767
767
  if (void 0 !== i) {
768
768
  n = "lambda" === i.kind || !!s && Ue(s[s.length - 1], t);
769
769
  break;
770
770
  }
771
- const o = String(e.value).toUpperCase();
772
- if (Be.has(o)) {
771
+ const l = String(e.value).toUpperCase();
772
+ if (Be.has(l)) {
773
773
  n = We(s, t);
774
774
  break;
775
775
  }
776
- if ("INDEX" === o) {
776
+ if ("INDEX" === l) {
777
777
  if (n = !1, s) for (let e = 1; e < s.length; e++) {
778
778
  const r = s[e];
779
- if (!r || r.type === x.Empty || r.isLiteral && 0 === r.value || Ue(r, t)) {
779
+ if (!r || r.type === E.Empty || r.isLiteral && 0 === r.value || Ue(r, t)) {
780
780
  n = !0;
781
781
  break;
782
782
  }
783
783
  }
784
784
  break;
785
785
  }
786
- const l = t?.(e.value);
787
- if (!l) {
786
+ const o = t?.(e.value);
787
+ if (!o) {
788
788
  n = !0;
789
789
  break;
790
790
  }
791
- const a = l.getDeclaration().getReturnType(), u = a.getKind();
791
+ const a = o.getDeclaration().getReturnType(), u = a.getKind();
792
792
  n = u === r.Array || u === r.Reference || null === u && null !== a.getRangeType();
793
793
  break;
794
794
  }
@@ -804,27 +804,27 @@ function _e(e, t) {
804
804
  const i = e.inputs;
805
805
  if (!i) return;
806
806
  const s = e.type;
807
- if (s === x.Infix || s === x.Prefix || s === x.Postfix) {
807
+ if (s === E.Infix || s === E.Prefix || s === E.Postfix) {
808
808
  const t = r && !e.isReference;
809
809
  for (let e = 0; e < i.length; e++) n(i[e], t);
810
810
  return;
811
811
  }
812
- if (s === x.Paren || s === x.List) {
812
+ if (s === E.Paren || s === E.List) {
813
813
  const e = r && 1 === i.length;
814
814
  for (let t = 0; t < i.length; t++) n(i[t], e);
815
815
  return;
816
816
  }
817
- if (s === x.Function) {
817
+ if (s === E.Function) {
818
818
  const s = e.binder;
819
819
  if (void 0 !== s) {
820
820
  const e = i.length - 1;
821
821
  for (let t = 0; t < i.length; t++) n(i[t], r && "let" === s.kind && t === e);
822
822
  return;
823
823
  }
824
- const o = r ? t?.(e.value)?.getDeclaration().getParameters() : null;
824
+ const l = r ? t?.(e.value)?.getDeclaration().getParameters() : null;
825
825
  for (let e = 0; e < i.length; e++) {
826
- const t = o ? Ve(o, e) : null;
827
- n(i[e], null !== t && (ze(t) || Xe(t)));
826
+ const t = l ? Ve(l, e) : null;
827
+ n(i[e], null !== t && (De(t) || Xe(t)));
828
828
  }
829
829
  return;
830
830
  }
@@ -844,53 +844,53 @@ function He(e, t) {
844
844
  if (!e || !t) return null;
845
845
  const n = (e) => t(e.value)?.getName().toUpperCase() ?? null;
846
846
  let r = !1;
847
- if (F(e, (e) => {
848
- (e.hasLazyArgs || e.type === x.Call || void 0 !== e.binder) && (r = !0);
847
+ if (x(e, (e) => {
848
+ (e.hasLazyArgs || e.type === E.Call || void 0 !== e.binder) && (r = !0);
849
849
  }), r) return null;
850
- const i = (e) => e.type === x.Number, s = (e) => e.type === x.Number || e.type === x.String || e.type === x.Boolean, o = (e) => {
850
+ const i = (e) => e.type === E.Number, s = (e) => e.type === E.Number || e.type === E.String || e.type === E.Boolean, l = (e) => {
851
851
  if (!e) return !1;
852
852
  const t = e.inputs;
853
853
  switch (e.type) {
854
- case x.Paren: return 1 === t?.length && o(t[0]);
855
- case x.Prefix: return ("-" === e.value || "+" === e.value) && o(t?.[0]);
856
- case x.Infix: {
854
+ case E.Paren: return 1 === t?.length && l(t[0]);
855
+ case E.Prefix: return ("-" === e.value || "+" === e.value) && l(t?.[0]);
856
+ case E.Infix: {
857
857
  if ("+" !== e.value && "-" !== e.value && "*" !== e.value) return !1;
858
858
  const [n, r] = t ?? [];
859
- return !(!n || !r) && (o(n) && (o(r) || i(r)) || i(n) && o(r));
859
+ return !(!n || !r) && (l(n) && (l(r) || i(r)) || i(n) && l(r));
860
860
  }
861
- case x.Function: {
861
+ case E.Function: {
862
862
  const r = n(e);
863
- if (null !== r && Ge.has(r)) return !t || 0 === t.length || 1 === t.length && t[0]?.type === x.Cell;
863
+ if (null !== r && Ge.has(r)) return !t || 0 === t.length || 1 === t.length && t[0]?.type === E.Cell;
864
864
  if ("MOD" === r && 2 === t?.length) {
865
865
  const e = t[1];
866
- return o(t[0]) && i(e) && 0 !== e.value;
866
+ return l(t[0]) && i(e) && 0 !== e.value;
867
867
  }
868
868
  return !1;
869
869
  }
870
870
  }
871
871
  return !1;
872
- }, l = (e) => {
872
+ }, o = (e) => {
873
873
  if (!e) return !1;
874
874
  const t = e.inputs;
875
875
  switch (e.type) {
876
- case x.Paren: return 1 === t?.length && l(t[0]);
877
- case x.Infix: {
876
+ case E.Paren: return 1 === t?.length && o(t[0]);
877
+ case E.Infix: {
878
878
  if (!je.has(e.value)) return !1;
879
879
  const [n, r] = t ?? [];
880
- return !(!n || !r) && (o(n) && (o(r) || s(r)) || s(n) && o(r));
880
+ return !(!n || !r) && (l(n) && (l(r) || s(r)) || s(n) && l(r));
881
881
  }
882
- case x.Function: {
882
+ case E.Function: {
883
883
  const r = n(e);
884
884
  if (!t || 0 === t.length) return !1;
885
- if ("ISODD" === r || "ISEVEN" === r) return 1 === t.length && o(t[0]);
886
- if ("NOT" === r) return 1 === t.length && l(t[0]);
885
+ if ("ISODD" === r || "ISEVEN" === r) return 1 === t.length && l(t[0]);
886
+ if ("NOT" === r) return 1 === t.length && o(t[0]);
887
887
  if ("AND" === r || "OR" === r || "XOR" === r) {
888
888
  let e = !1;
889
889
  for (let n = 0; n < t.length; n++) {
890
890
  const r = t[n];
891
891
  if (!r) return !1;
892
- if (r.type !== x.Boolean) {
893
- if (!l(r)) return !1;
892
+ if (r.type !== E.Boolean) {
893
+ if (!o(r)) return !1;
894
894
  e = !0;
895
895
  }
896
896
  }
@@ -902,7 +902,7 @@ function He(e, t) {
902
902
  return !1;
903
903
  }, a = [], u = (e) => {
904
904
  if (!e) return;
905
- if (l(e)) return void a.push(e);
905
+ if (o(e)) return void a.push(e);
906
906
  const t = e.inputs;
907
907
  if (t) for (let e = 0; e < t.length; e++) u(t[e]);
908
908
  };
@@ -913,7 +913,7 @@ function He(e, t) {
913
913
  for (let t = 0; t < 1 << c; t++) {
914
914
  const n = (e) => {
915
915
  const r = a.indexOf(e);
916
- if (-1 !== r) return B(t & 1 << r ? "TRUE" : "FALSE");
916
+ if (-1 !== r) return F(t & 1 << r ? "TRUE" : "FALSE");
917
917
  const i = { ...e };
918
918
  return delete i.evalIndex, delete i.firstCell, delete i.inLazy, delete i.lazyArg, delete i.hasLazyArgs, delete i.deferred, e.inputs && (i.inputs = e.inputs.map((e) => e ? n(e) : e)), i;
919
919
  };
@@ -922,9 +922,9 @@ function He(e, t) {
922
922
  return f;
923
923
  }
924
924
  var Xe = (e) => "*" === e.getRangeType() && null === e.getLambda() && e.getArrayDepth() <= (e.isRest() ? 1 : 0);
925
- function Ke(e, n, r, i = !1, s = null, o = null) {
926
- let a, u, c = r;
927
- c = me(c), i || (c = ye(c), c = Re(c), c = Ie(c), c = be(c)), [a, u] = function(e) {
925
+ function Ze(e, n, r, i = !1, s = null, l = null) {
926
+ let o, u, c = r;
927
+ c = me(c), i || (c = ye(c), c = Re(c), c = Ie(c), c = be(c)), [o, u] = function(e) {
928
928
  const t = /* @__PURE__ */ new Map();
929
929
  let n = 0;
930
930
  const r = [e];
@@ -939,66 +939,66 @@ function Ke(e, n, r, i = !1, s = null, o = null) {
939
939
  n && n.inputs && (e.inputs = n.inputs.map((e) => t.get(e) ?? e));
940
940
  }), [t.get(e), n];
941
941
  }(c);
942
- const f = k(u), p = [], d = [], g = new de();
942
+ const f = $(u), p = [], d = [], g = new de();
943
943
  let h, m = !1;
944
944
  (function(e, t) {
945
945
  if (!e || !t) return;
946
946
  const n = (e) => {
947
947
  if (!e) return;
948
- e.inLazy = !0, e.type === x.Named && (e.deferredResolve = !0);
948
+ e.inLazy = !0, e.type === E.Named && (e.deferredResolve = !0);
949
949
  const t = e.inputs;
950
950
  if (t) for (let e = 0; e < t.length; e++) n(t[e]);
951
951
  };
952
- F(e, (e) => {
953
- if (e.type !== x.Function) return;
952
+ x(e, (e) => {
953
+ if (e.type !== E.Function) return;
954
954
  if (void 0 !== e.binder) return;
955
955
  const r = e.inputs;
956
956
  if (!r || 0 === r.length) return;
957
957
  const i = t(e.value)?.getDeclaration().getParameters();
958
958
  if (i) for (let t = 0; t < r.length; t++) {
959
959
  const s = r[t];
960
- s && s.type !== x.Empty && ke(i, t)?.isLazy() && (s.lazyArg = !0, e.hasLazyArgs = !0, n(s));
960
+ s && s.type !== E.Empty && ke(i, t)?.isLazy() && (s.lazyArg = !0, e.hasLazyArgs = !0, n(s));
961
961
  }
962
962
  });
963
- })(a, o);
963
+ })(o, l);
964
964
  const y = (e) => {
965
965
  void 0 === h && (h = /* @__PURE__ */ new Map());
966
966
  let t = h.get(e);
967
967
  return void 0 === t && h.set(e, t = []), t;
968
968
  }, I = (e, t) => {
969
969
  void 0 === e ? p.push(t) : y(e).push(t);
970
- }, R = (e) => {
971
- e?.type !== x.Infix || "+" !== e.value && "-" !== e.value || (e.snapsCancellation = !0);
970
+ }, b = (e) => {
971
+ e?.type !== E.Infix || "+" !== e.value && "-" !== e.value || (e.snapsCancellation = !0);
972
972
  };
973
- a = F(a, (t, n, r) => {
973
+ o = x(o, (t, n, r) => {
974
974
  const i = t.type, s = t.evalIndex;
975
- if (f[s] = null, i === x.TableColumn || i === x.TableSpecifier || t.isReference && pe(r, x.TableReference)) return;
975
+ if (f[s] = null, i === E.TableColumn || i === E.TableSpecifier || t.isReference && pe(r, E.TableReference)) return;
976
976
  if (m = m || !tt(t), t.binding?.declaration) return d[t.binding.slot] = -1, void (f[s] = void 0);
977
- const o = ((e, t, n) => {
977
+ const l = ((e, t, n) => {
978
978
  if (Oe(e, t)) return e;
979
979
  for (let e = n.length - 1; e >= 0; e--) if (Oe(n[e], n[e - 1])) return n[e];
980
980
  })(t, n, r);
981
- o === t && y(t), void 0 !== o && i === x.Named && (t.deferredResolve = !0);
982
- const l = t.binder;
983
- if (l && "let" === l.kind) {
981
+ l === t && y(t), void 0 !== l && i === E.Named && (t.deferredResolve = !0);
982
+ const o = t.binder;
983
+ if (o && "let" === o.kind) {
984
984
  const e = t.inputs, n = e?.length ?? 0;
985
985
  let r = 0;
986
- for (let t = 0; t + 1 < n && r < l.slots.length; t += 2) e[t]?.binding?.declaration && (d[l.slots[r++]] = e[t + 1]?.evalIndex ?? -1);
986
+ for (let t = 0; t + 1 < n && r < o.slots.length; t += 2) e[t]?.binding?.declaration && (d[o.slots[r++]] = e[t + 1]?.evalIndex ?? -1);
987
987
  }
988
988
  if ((t.isReference || n && n.isReference) && (g.processNode(t, n), t.isReference)) {
989
- if (i === x.Named) return void (void 0 !== o && I(o, t));
990
- if (i === x.Cell || i === x.TableReference || i === x.Error) return;
991
- if (i === x.Infix || i === x.Prefix || i === x.Postfix || i === x.List) return void I(o, t);
989
+ if (i === E.Named) return void (void 0 !== l && I(l, t));
990
+ if (i === E.Cell || i === E.TableReference || i === E.Error) return;
991
+ if (i === E.Infix || i === E.Prefix || i === E.Postfix || i === E.List) return void I(l, t);
992
992
  }
993
- if (t.isLiteral) if (i !== x.Array) f[s] = t.value;
993
+ if (t.isLiteral) if (i !== E.Array) f[s] = t.value;
994
994
  else {
995
- const n = t.value, r = n.length, i = k(r);
995
+ const n = t.value, r = n.length, i = $(r);
996
996
  for (let e = 0; e < r; e++) {
997
- const t = n[e].value, r = t.length, s = k(r);
997
+ const t = n[e].value, r = t.length, s = $(r);
998
998
  for (let e = 0; e < r; e++) {
999
999
  const n = t[e];
1000
1000
  let r = null;
1001
- if (n && (r = n.type === x.Error ? b(n.value) : n.value, n.type === x.Prefix)) {
1001
+ if (n && (r = n.type === E.Error ? v(n.value) : n.value, n.type === E.Prefix)) {
1002
1002
  const e = n.value;
1003
1003
  r = n.inputs[0].value, "-" === e && (r = -r);
1004
1004
  }
@@ -1006,51 +1006,51 @@ function Ke(e, n, r, i = !1, s = null, o = null) {
1006
1006
  }
1007
1007
  i[e] = s;
1008
1008
  }
1009
- const o = v(i);
1010
- f[s] = new P(e, o.values, o.coords, void 0, o.isLiteral);
1009
+ const l = O(i);
1010
+ f[s] = new a(e, l.values, l.coords, void 0, l.isLiteral);
1011
1011
  }
1012
1012
  else {
1013
- if (i !== x.Empty) return "lambda" === t.binder?.kind && R(t.inputs[t.inputs.length - 1]), I(o, t), t;
1013
+ if (i !== E.Empty) return "lambda" === t.binder?.kind && b(t.inputs[t.inputs.length - 1]), I(l, t), t;
1014
1014
  f[s] = void 0;
1015
1015
  }
1016
- }), R(a), h?.forEach((e, t) => {
1016
+ }), b(o), h?.forEach((e, t) => {
1017
1017
  t.deferred = e;
1018
1018
  });
1019
- const T = k(g.cells.size);
1019
+ const R = $(g.cells.size);
1020
1020
  g.cells.forEach((e, t) => {
1021
- const n = t.value, r = n.colIndex, i = n.rowIndex, s = n.$colIndex, o = n.$rowIndex, l = {
1021
+ const n = t.value, r = n.colIndex, i = n.rowIndex, s = n.$colIndex, l = n.$rowIndex, o = {
1022
1022
  colStart: r,
1023
1023
  rowStart: i,
1024
1024
  colEnd: r,
1025
1025
  rowEnd: i,
1026
1026
  $colStart: s,
1027
- $rowStart: o,
1027
+ $rowStart: l,
1028
1028
  $colEnd: s,
1029
- $rowEnd: o
1029
+ $rowEnd: l
1030
1030
  };
1031
- r === Number.MIN_SAFE_INTEGER && (l.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (l.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (l.scope = n.scope), T[e] = l;
1031
+ r === Number.MIN_SAFE_INTEGER && (o.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (o.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (o.scope = n.scope), R[e] = o;
1032
1032
  });
1033
- const A = T.length, S = k(A);
1034
- for (let e = 0; e < A; e++) S[e] = {
1033
+ const T = R.length, A = $(T);
1034
+ for (let e = 0; e < T; e++) A[e] = {
1035
1035
  colStart: 0,
1036
1036
  rowStart: 0,
1037
1037
  colEnd: 0,
1038
1038
  rowEnd: 0,
1039
1039
  scope: null
1040
1040
  };
1041
- const w = k(g.references.size);
1041
+ const S = $(g.references.size);
1042
1042
  g.references.forEach((e) => {
1043
- w[e.index] = e;
1043
+ S[e.index] = e;
1044
1044
  });
1045
- const C = [];
1045
+ const w = [];
1046
1046
  g.rootReferences.forEach((e) => {
1047
- C.push(e.index);
1047
+ w.push(e.index);
1048
1048
  }), function(e, t, n = !1) {
1049
1049
  if (n) {
1050
1050
  const t = (e) => {
1051
1051
  if (!e) return;
1052
1052
  const n = e.type;
1053
- n !== x.Function && n !== x.Call || (e.implicitIntersect = !0);
1053
+ n !== E.Function && n !== E.Call || (e.implicitIntersect = !0);
1054
1054
  const r = e.inputs;
1055
1055
  if (r) for (let e = 0; e < r.length; e++) t(r[e]);
1056
1056
  };
@@ -1060,94 +1060,94 @@ function Ke(e, n, r, i = !1, s = null, o = null) {
1060
1060
  const r = (e) => Ue(e, t), i = (e, n) => {
1061
1061
  if (!e) return;
1062
1062
  const s = e.type;
1063
- s !== x.Function && s !== x.Call || (e.implicitIntersect = n);
1064
- const o = e.inputs;
1065
- if (o) {
1066
- if (s === x.Infix || s === x.Prefix || s === x.Postfix) {
1063
+ s !== E.Function && s !== E.Call || (e.implicitIntersect = n);
1064
+ const l = e.inputs;
1065
+ if (l) {
1066
+ if (s === E.Infix || s === E.Prefix || s === E.Postfix) {
1067
1067
  const t = !e.isReference;
1068
- for (let e = 0; e < o.length; e++) i(o[e], (!t || !r(o[e])) && n);
1068
+ for (let e = 0; e < l.length; e++) i(l[e], (!t || !r(l[e])) && n);
1069
1069
  return;
1070
1070
  }
1071
- if (s === x.Function) {
1071
+ if (s === E.Function) {
1072
1072
  const r = e.binder;
1073
1073
  if (void 0 !== r) {
1074
1074
  const e = "lambda" !== r.kind && n;
1075
- for (let t = 0; t < o.length; t++) i(o[t], e);
1075
+ for (let t = 0; t < l.length; t++) i(l[t], e);
1076
1076
  return;
1077
1077
  }
1078
1078
  const s = t?.(e.value)?.getDeclaration().getParameters();
1079
- let l = !1;
1080
- if (s) for (let e = 0; e < o.length && !l; e++) {
1081
- const n = o[e];
1079
+ let o = !1;
1080
+ if (s) for (let e = 0; e < l.length && !o; e++) {
1081
+ const n = l[e];
1082
1082
  if (!n) continue;
1083
1083
  const r = Ve(s, e);
1084
- r && De(r, n, t) && (l = !0);
1084
+ r && ze(r, n, t) && (o = !0);
1085
1085
  }
1086
- l && (e.implicitIntersect = !1);
1087
- for (let e = 0; e < o.length; e++) i(o[e], !l && n);
1086
+ o && (e.implicitIntersect = !1);
1087
+ for (let e = 0; e < l.length; e++) i(l[e], !o && n);
1088
1088
  return;
1089
1089
  }
1090
- for (let e = 0; e < o.length; e++) i(o[e], n);
1090
+ for (let e = 0; e < l.length; e++) i(l[e], n);
1091
1091
  }
1092
1092
  };
1093
1093
  i(e, !r(e));
1094
- }(a, o, !0 === r.legacyIntersect);
1095
- const N = (e) => {
1094
+ }(o, l, !0 === r.legacyIntersect);
1095
+ const C = (e) => {
1096
1096
  const t = e.length;
1097
1097
  for (let n = 0; n < t; n++) {
1098
1098
  const t = e[n], r = t.type;
1099
- if (r === x.Infix) {
1099
+ if (r === E.Infix) {
1100
1100
  if (!0 === t.snapsCancellation) {
1101
1101
  t.fn = ue[t.value];
1102
1102
  continue;
1103
1103
  }
1104
1104
  t.fn = ae[t.value];
1105
- } else r === x.Prefix ? t.fn = ce[t.value] : r === x.Postfix && (t.fn = fe[t.value]);
1105
+ } else r === E.Prefix ? t.fn = ce[t.value] : r === E.Postfix && (t.fn = fe[t.value]);
1106
1106
  }
1107
1107
  };
1108
- let L;
1109
- N(p), h?.forEach(N);
1110
- const $ = i ? l(t(e.getLocale()).decimal) : E, O = {
1108
+ let N;
1109
+ C(p), h?.forEach(C);
1110
+ const F = i ? P(t(e.getLocale()).decimal) : L, k = {
1111
1111
  runtime: e,
1112
1112
  symbols: n,
1113
- getFunction: o,
1114
- ast: a,
1113
+ getFunction: l,
1114
+ ast: o,
1115
1115
  evaluations: f,
1116
1116
  executions: p,
1117
1117
  bindings: d,
1118
- referencesAbsolute: S,
1119
- referencesExecute: w,
1120
- referencesRelative: T,
1121
- referencesRoot: C,
1118
+ referencesAbsolute: A,
1119
+ referencesExecute: S,
1120
+ referencesRelative: R,
1121
+ referencesRoot: w,
1122
1122
  referenceIndices: g.referenceIndices,
1123
- formatReferenceIndices: Te(a, o),
1124
- getTokens: () => L ??= ge(a, i, $),
1125
- namedIds: Ee(a),
1126
- symbolIds: $e(a),
1127
- hasTotals: we(a, o),
1128
- hasPivotData: Ce(a, o, Se),
1129
- hasDataTable: Ne(a, o),
1130
- hasVolatile: Fe(a, o),
1131
- ...Le(a, o),
1123
+ formatReferenceIndices: Te(o, l),
1124
+ getTokens: () => N ??= ge(o, i, F),
1125
+ namedIds: Ee(o),
1126
+ symbolIds: $e(o),
1127
+ hasTotals: we(o, l),
1128
+ hasPivotData: Ce(o, l, Se),
1129
+ hasDataTable: Ne(o, l),
1130
+ hasVolatile: Fe(o, l),
1131
+ ...Le(o, l),
1132
1132
  isReferenceOnly: !m,
1133
1133
  error: s,
1134
1134
  transform: (t) => {
1135
- let r = F(a, t);
1136
- return r === a ? O : Ke(e, n, r, i, s, o);
1135
+ let r = x(o, t);
1136
+ return r === o ? k : Ze(e, n, r, i, s, l);
1137
1137
  }
1138
1138
  };
1139
- return O;
1139
+ return k;
1140
1140
  }
1141
- function Ye(e) {
1141
+ function Ke(e) {
1142
1142
  let t = -1, n = -1;
1143
1143
  return Number.isSafeInteger(e.previousToken?.startLine) ? (t = e.previousToken.startLine, n = e.previousToken.endColumn + 1) : Number.isSafeInteger(e.token?.startLine) && (t = e.token.startLine, n = e.token.startColumn), -1 !== t ? (e.errorLocation = {
1144
1144
  line: t,
1145
1145
  column: n
1146
- }, new o.Parse(e.message, {
1146
+ }, new l.Parse(e.message, {
1147
1147
  line: t,
1148
1148
  column: n,
1149
1149
  cause: e
1150
- })) : new o.Parse(e.message, { cause: e });
1150
+ })) : new l.Parse(e.message, { cause: e });
1151
1151
  }
1152
1152
  Object.freeze([
1153
1153
  [
@@ -1169,29 +1169,29 @@ Object.freeze([
1169
1169
  ">="
1170
1170
  ]
1171
1171
  ]);
1172
- var Ze = Object.freeze([
1172
+ var qe = Object.freeze([
1173
1173
  ":",
1174
1174
  ".:.",
1175
1175
  ".:",
1176
1176
  ":."
1177
- ]), qe = Object.freeze([
1177
+ ]), Ye = Object.freeze([
1178
1178
  ":",
1179
1179
  " ",
1180
1180
  ".:.",
1181
1181
  ".:",
1182
1182
  ":."
1183
- ]), Je = Object.freeze(["@"]), Qe = Object.freeze(["#"]), et = Object.freeze(qe.concat(Qe)), tt = (Object.freeze(qe.concat(Je).concat(Qe)), (e) => {
1183
+ ]), Je = Object.freeze(["@"]), Qe = Object.freeze(["#"]), et = Object.freeze(Ye.concat(Qe)), tt = (Object.freeze(Ye.concat(Je).concat(Qe)), (e) => {
1184
1184
  if (!e) return !1;
1185
1185
  const t = e.type;
1186
- if (t === x.Cell) return !0;
1187
- if (t === x.TableReference) return !0;
1188
- if (t === x.Infix) {
1189
- if (!qe.includes(e.value)) return !1;
1186
+ if (t === E.Cell) return !0;
1187
+ if (t === E.TableReference) return !0;
1188
+ if (t === E.Infix) {
1189
+ if (!Ye.includes(e.value)) return !1;
1190
1190
  const t = e.inputs, n = t[0], r = t[1];
1191
1191
  return tt(n) && tt(r);
1192
1192
  }
1193
- return t === x.List && (e.inputs?.every(tt) ?? !1);
1194
- }), nt = (e) => !!(e && (e.type === x.Infix && et.includes(e.value) || e.type === x.Postfix && Qe.includes(e.value) || e.type === x.Array || e.type === x.TableReference)), rt = Object.freeze([
1193
+ return t === E.List && (e.inputs?.every(tt) ?? !1);
1194
+ }), nt = (e) => !!(e && (e.type === E.Infix && et.includes(e.value) || e.type === E.Postfix && Qe.includes(e.value) || e.type === E.Array || e.type === E.TableReference)), rt = Object.freeze([
1195
1195
  "+",
1196
1196
  "-",
1197
1197
  "*",
@@ -1207,15 +1207,15 @@ var Ze = Object.freeze([
1207
1207
  ]), it = Object.freeze(["-", "+"]), st = (e, t) => {
1208
1208
  if (!e) return !1;
1209
1209
  const n = e.type;
1210
- if (e.isLiteral) return n !== x.Error;
1211
- if (n === x.Paren || n === x.List) {
1210
+ if (e.isLiteral) return n !== E.Error;
1211
+ if (n === E.Paren || n === E.List) {
1212
1212
  const n = e.inputs;
1213
1213
  return !(!n || 0 === n.length) && n.every((e) => st(e, t));
1214
1214
  }
1215
- if (n === x.Infix) return rt.includes(e.value);
1216
- if (n === x.Prefix) return it.includes(e.value);
1217
- if (n === x.Postfix) return "%" === e.value;
1218
- if (n === x.Function) {
1215
+ if (n === E.Infix) return rt.includes(e.value);
1216
+ if (n === E.Prefix) return it.includes(e.value);
1217
+ if (n === E.Postfix) return "%" === e.value;
1218
+ if (n === E.Function) {
1219
1219
  if (!t) return !1;
1220
1220
  const n = t(e.value);
1221
1221
  if (!n) return !1;
@@ -1223,12 +1223,12 @@ var Ze = Object.freeze([
1223
1223
  return "p" !== i && (null !== i || null === r.getLambda() && null != r.getScalarType());
1224
1224
  }
1225
1225
  return !1;
1226
- }, ot = (e, t) => {
1226
+ }, lt = (e, t) => {
1227
1227
  if (!e) return null;
1228
1228
  let n = null;
1229
1229
  const r = (e) => {
1230
1230
  if (n || !e) return;
1231
- if (e.type === x.Infix && " " === e.value) {
1231
+ if (e.type === E.Infix && " " === e.value) {
1232
1232
  const r = e.inputs, i = r?.[0], s = r?.[1];
1233
1233
  if (st(i, t)) return void (n = i);
1234
1234
  if (st(s, t)) return void (n = s);
@@ -1237,12 +1237,12 @@ var Ze = Object.freeze([
1237
1237
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1238
1238
  };
1239
1239
  return r(e), n;
1240
- }, lt = (e, t) => {
1240
+ }, ot = (e, t) => {
1241
1241
  if (!e) return null;
1242
1242
  let n = null;
1243
1243
  const r = (e) => {
1244
1244
  if (n || !e) return;
1245
- if (e.type === x.Postfix && "#" === e.value) {
1245
+ if (e.type === E.Postfix && "#" === e.value) {
1246
1246
  const r = e.inputs?.[0];
1247
1247
  if (r && st(r, t)) return void (n = r);
1248
1248
  }
@@ -1254,11 +1254,11 @@ var Ze = Object.freeze([
1254
1254
  for (let t = 0; t < e.length; t++) if (e[t].getRepeatingTypes()) return t;
1255
1255
  return -1;
1256
1256
  }, ut = (e, t, n) => {
1257
- const r = e[t].getRepeatingTypes(), i = r.length, s = t, o = e.length - t - 1;
1258
- let l = o;
1259
- for (; l > 0 && e[t + l].isOptional();) l--;
1257
+ const r = e[t].getRepeatingTypes(), i = r.length, s = t, l = e.length - t - 1;
1258
+ let o = l;
1259
+ for (; o > 0 && e[t + o].isOptional();) o--;
1260
1260
  const a = e[t].isOptional() ? 0 : 1, u = r[i - 1].isOptional();
1261
- for (let e = l; e <= o; e++) {
1261
+ for (let e = o; e <= l; e++) {
1262
1262
  const t = n - s - e;
1263
1263
  if (t >= 0 && t % i === 0 && t / i >= a) return {
1264
1264
  n: t / i,
@@ -1283,7 +1283,7 @@ var Ze = Object.freeze([
1283
1283
  let t = null;
1284
1284
  const n = (e) => {
1285
1285
  if (t || !e) return;
1286
- if (e.type === x.Array && Array.isArray(e.value)) {
1286
+ if (e.type === E.Array && Array.isArray(e.value)) {
1287
1287
  const n = e.value, r = (n[0]?.value)?.length ?? 0;
1288
1288
  for (let e = 1; e < n.length && !t; e++) {
1289
1289
  const i = (n[e]?.value)?.length ?? 0;
@@ -1299,19 +1299,19 @@ var Ze = Object.freeze([
1299
1299
  let n = null;
1300
1300
  const r = (e) => {
1301
1301
  if (n || !e) return;
1302
- if (e.type === x.Function) {
1302
+ if (e.type === E.Function) {
1303
1303
  const r = e.value, i = t(r);
1304
1304
  if (i) {
1305
- const t = i.getDeclaration(), s = t.getParameters(), o = e.inputs?.length ?? 0, l = t.getMaxArguments();
1306
- if (o > l) return void (n = `Too many arguments for ${r}. The most it accepts is ${l}, but got ${o}.`);
1305
+ const t = i.getDeclaration(), s = t.getParameters(), l = e.inputs?.length ?? 0, o = t.getMaxArguments();
1306
+ if (l > o) return void (n = `Too many arguments for ${r}. The most it accepts is ${o}, but got ${l}.`);
1307
1307
  const a = s.length > 0 ? at(s) : -1, u = s.length > 0 && s[s.length - 1].isRest();
1308
1308
  if (a >= 0) {
1309
- if (!ut(s, a, o)) {
1309
+ if (!ut(s, a, l)) {
1310
1310
  const e = s[a].getRepeatingTypes().length, t = s.length - 1;
1311
- n = 1 === e ? `Too few arguments for ${r}. Expected at least ${t + 1}, but got ${o}.` : `Wrong number of arguments for ${r}. Expected ${t} plus a multiple of ${e}, but got ${o}.`;
1311
+ n = 1 === e ? `Too few arguments for ${r}. Expected at least ${t + 1}, but got ${l}.` : `Wrong number of arguments for ${r}. Expected ${t} plus a multiple of ${e}, but got ${l}.`;
1312
1312
  }
1313
- } else if (!u && o > s.length) n = `Too many arguments for ${r}. Expected ${s.length}, but got ${o}.`;
1314
- else for (let e = o; e < s.length && !n; e++) {
1313
+ } else if (!u && l > s.length) n = `Too many arguments for ${r}. Expected ${s.length}, but got ${l}.`;
1314
+ else for (let e = l; e < s.length && !n; e++) {
1315
1315
  const t = s[e];
1316
1316
  t.isOptional() || t.isRest() || (n = `Parameter ${t.getName()} is missing for ${r}.`);
1317
1317
  }
@@ -1326,7 +1326,7 @@ var Ze = Object.freeze([
1326
1326
  let n = null;
1327
1327
  const r = (e) => {
1328
1328
  if (n || !e) return;
1329
- if (e.type === x.Function) {
1329
+ if (e.type === E.Function) {
1330
1330
  const r = t(e.value);
1331
1331
  if (r) {
1332
1332
  const i = r.getDeclaration().getParameters(), s = e.inputs;
@@ -1335,14 +1335,14 @@ var Ze = Object.freeze([
1335
1335
  const n = new Array(t), r = e.length, i = r > 0 ? at(e) : -1;
1336
1336
  if (i < 0) {
1337
1337
  const i = r > 0 ? e[r - 1] : null, s = !!i && i.isRest();
1338
- for (let o = 0; o < t; o++) n[o] = o < r ? e[o] : s ? i : null;
1338
+ for (let l = 0; l < t; l++) n[l] = l < r ? e[l] : s ? i : null;
1339
1339
  return n;
1340
1340
  }
1341
- const s = e[i].getRepeatingTypes(), o = s.length, l = i, a = ut(e, i, t), u = a ? a.suffix : r - i - 1, c = Math.max(0, t - l - u);
1342
- for (let a = 0; a < t; a++) if (a < l) n[a] = e[a];
1343
- else if (a < l + c) n[a] = s[(a - l) % o];
1341
+ const s = e[i].getRepeatingTypes(), l = s.length, o = i, a = ut(e, i, t), u = a ? a.suffix : r - i - 1, c = Math.max(0, t - o - u);
1342
+ for (let a = 0; a < t; a++) if (a < o) n[a] = e[a];
1343
+ else if (a < o + c) n[a] = s[(a - o) % l];
1344
1344
  else {
1345
- const t = i + 1 + (a - l - c);
1345
+ const t = i + 1 + (a - o - c);
1346
1346
  n[a] = t < r ? e[t] : null;
1347
1347
  }
1348
1348
  return n;
@@ -1363,7 +1363,7 @@ var Ze = Object.freeze([
1363
1363
  let n = null;
1364
1364
  const r = (e) => {
1365
1365
  if (n || !e) return;
1366
- if (e.type === x.Call) {
1366
+ if (e.type === E.Call) {
1367
1367
  const r = e.inputs?.[0];
1368
1368
  if (r && st(r, t)) return void (n = "This expression always produces a value, so it cannot be called as a function.");
1369
1369
  }
@@ -1372,28 +1372,28 @@ var Ze = Object.freeze([
1372
1372
  };
1373
1373
  return r(e), n;
1374
1374
  }, gt = (e, t) => {
1375
- if (e.type !== x.Function) return;
1375
+ if (e.type !== E.Function) return;
1376
1376
  const n = e.value;
1377
1377
  if ("string" != typeof n) return;
1378
1378
  const r = (t?.(n)?.getName() ?? n).toUpperCase();
1379
1379
  return "LET" === r ? "let" : "LAMBDA" === r ? "lambda" : void 0;
1380
1380
  }, vt = (e) => {
1381
- if (e?.type !== x.Named) return;
1381
+ if (e?.type !== E.Named) return;
1382
1382
  const t = e.value;
1383
1383
  return t?.nameId && !t.scope && !0 !== t.optional ? t.nameId : void 0;
1384
1384
  }, ht = /^[A-Za-z_\\][A-Za-z0-9_\\]*$/, mt = /* @__PURE__ */ new Set(["TRUE", "FALSE"]), yt = (e) => {
1385
- if (e?.type === x.Named) {
1385
+ if (e?.type === E.Named) {
1386
1386
  const t = e.value;
1387
1387
  if (!0 !== t?.optional || !t.nameId || t.scope) return;
1388
1388
  return t.nameId;
1389
1389
  }
1390
- if (e?.type !== x.TableReference) return;
1390
+ if (e?.type !== E.TableReference) return;
1391
1391
  const t = e.value;
1392
1392
  let n;
1393
1393
  if (null === t || "string" == typeof t) {
1394
1394
  if (t) return;
1395
1395
  const r = e.inputs;
1396
- if (!r || 1 !== r.length || r[0]?.type !== x.TableColumn) return;
1396
+ if (!r || 1 !== r.length || r[0]?.type !== E.TableColumn) return;
1397
1397
  const i = r[0].value;
1398
1398
  if ("string" != typeof i) return;
1399
1399
  n = i;
@@ -1405,10 +1405,10 @@ var Ze = Object.freeze([
1405
1405
  }
1406
1406
  return ht.test(n) && !mt.has(n.toUpperCase()) && e.image === `[${n}]` ? n : void 0;
1407
1407
  }, It = (e) => {
1408
- const t = $(e.image ?? e.value);
1408
+ const t = A(e.image ?? e.value);
1409
1409
  t.image = e.image ?? e.value, t.wsBefore = e.wsBefore;
1410
1410
  const n = {
1411
- type: x.Call,
1411
+ type: E.Call,
1412
1412
  value: null,
1413
1413
  inputs: [t, ...e.inputs ?? []],
1414
1414
  wsAfter: e.wsAfter
@@ -1416,8 +1416,8 @@ var Ze = Object.freeze([
1416
1416
  return e.error && (n.error = e.error), n;
1417
1417
  };
1418
1418
  function bt(e, t) {
1419
- return e && t ? F(e, (e) => {
1420
- if (e.type === x.Function && "string" == typeof e.value && !t(e.value)) return It(e);
1419
+ return e && t ? x(e, (e) => {
1420
+ if (e.type === E.Function && "string" == typeof e.value && !t(e.value)) return It(e);
1421
1421
  }) : e;
1422
1422
  }
1423
1423
  function xt(e, t) {
@@ -1425,7 +1425,7 @@ function xt(e, t) {
1425
1425
  return r.push(t), r;
1426
1426
  }
1427
1427
  function Rt(e) {
1428
- if (e?.type !== x.Function || "lambda" !== e.binder?.kind) return;
1428
+ if (e?.type !== E.Function || "lambda" !== e.binder?.kind) return;
1429
1429
  const t = e.inputs ?? [], n = [];
1430
1430
  for (let e = 0; e < t.length - 1; e++) {
1431
1431
  const r = t[e];
@@ -1444,7 +1444,7 @@ var Et = /* @__PURE__ */ new Set([
1444
1444
  "IFNA"
1445
1445
  ]);
1446
1446
  function Tt(e, t) {
1447
- if (!e || e.type !== x.Function || "string" != typeof e.value) return e;
1447
+ if (!e || e.type !== E.Function || "string" != typeof e.value) return e;
1448
1448
  const n = (t?.(e.value)?.getName() ?? e.value).toUpperCase();
1449
1449
  if (!Et.has(n)) return e;
1450
1450
  const r = e.inputs;
@@ -1479,32 +1479,32 @@ function At(e, t = null) {
1479
1479
  } : e;
1480
1480
  }, s = (e) => {
1481
1481
  if (!e) return e;
1482
- const o = gt(e, t);
1483
- if (o) return ((e, o) => {
1484
- const l = e.inputs, a = l?.length ?? 0;
1485
- if (!l || a < 1) return i(e);
1486
- const u = n.length, c = [], f = [...l], p = (e, t = !1) => {
1482
+ const l = gt(e, t);
1483
+ if (l) return ((e, l) => {
1484
+ const o = e.inputs, a = o?.length ?? 0;
1485
+ if (!o || a < 1) return i(e);
1486
+ const u = n.length, c = [], f = [...o], p = (e, t = !1) => {
1487
1487
  const i = f[e];
1488
- let s = vt(i), o = !1;
1488
+ let s = vt(i), l = !1;
1489
1489
  if (void 0 === s && t) {
1490
1490
  if (s = yt(i), void 0 === s) return;
1491
- o = !0;
1491
+ l = !0;
1492
1492
  } else if (void 0 === s) return;
1493
- const l = r++;
1493
+ const o = r++;
1494
1494
  n.push({
1495
1495
  key: s.toUpperCase(),
1496
- slot: l,
1496
+ slot: o,
1497
1497
  name: s
1498
- }), c.push(l), f[e] = o ? {
1498
+ }), c.push(o), f[e] = l ? {
1499
1499
  ...i,
1500
- type: x.Named,
1500
+ type: E.Named,
1501
1501
  value: {
1502
1502
  nameId: s,
1503
1503
  scope: null
1504
1504
  },
1505
1505
  inputs: null,
1506
1506
  binding: {
1507
- slot: l,
1507
+ slot: o,
1508
1508
  declaration: !0,
1509
1509
  optional: !0
1510
1510
  },
@@ -1512,13 +1512,13 @@ function At(e, t = null) {
1512
1512
  } : {
1513
1513
  ...i,
1514
1514
  binding: {
1515
- slot: l,
1515
+ slot: o,
1516
1516
  declaration: !0
1517
1517
  },
1518
1518
  isReference: !1
1519
1519
  };
1520
1520
  };
1521
- if ("lambda" === o) {
1521
+ if ("lambda" === l) {
1522
1522
  for (let e = 0; e < a - 1; e++) p(e, !0);
1523
1523
  f[a - 1] && (f[a - 1] = s(f[a - 1]));
1524
1524
  } else {
@@ -1530,26 +1530,26 @@ function At(e, t = null) {
1530
1530
  ...e,
1531
1531
  inputs: f,
1532
1532
  binder: {
1533
- kind: o,
1533
+ kind: l,
1534
1534
  slots: c
1535
1535
  }
1536
1536
  };
1537
- })(e, o);
1538
- if (e.type === x.Function && "string" == typeof e.value) {
1537
+ })(e, l);
1538
+ if (e.type === E.Function && "string" == typeof e.value) {
1539
1539
  const r = e.value.toUpperCase();
1540
1540
  if (n.some((e) => e.key === r) && !t?.(e.value)) return i(It(e));
1541
1541
  }
1542
1542
  if (n.length > 0 && e.isReference && ":" === e.value && 2 === e.inputs?.length) {
1543
1543
  const [t, r] = e.inputs;
1544
1544
  if (St(t) && St(r)) {
1545
- const s = t.image.toUpperCase(), o = r.image.toUpperCase();
1546
- if (n.some((e) => e.key === s || e.key === o)) return i({
1545
+ const s = t.image.toUpperCase(), l = r.image.toUpperCase();
1546
+ if (n.some((e) => e.key === s || e.key === l)) return i({
1547
1547
  ...e,
1548
1548
  inputs: [wt(t), wt(r)]
1549
1549
  });
1550
1550
  }
1551
1551
  }
1552
- if (e.type === x.Named) {
1552
+ if (e.type === E.Named) {
1553
1553
  const t = vt(e);
1554
1554
  if (void 0 !== t) {
1555
1555
  const r = t.toUpperCase();
@@ -1568,9 +1568,9 @@ function At(e, t = null) {
1568
1568
  }
1569
1569
  return e;
1570
1570
  }
1571
- const l = i(e);
1572
- if (l.type === x.Function && "string" == typeof l.value && "ISOMITTED" === (t?.(l.value)?.getName() ?? l.value).toUpperCase()) {
1573
- const e = l.inputs;
1571
+ const o = i(e);
1572
+ if (o.type === E.Function && "string" == typeof o.value && "ISOMITTED" === (t?.(o.value)?.getName() ?? o.value).toUpperCase()) {
1573
+ const e = o.inputs;
1574
1574
  if (e) {
1575
1575
  let n;
1576
1576
  for (let r = 0; r < e.length; r++) {
@@ -1586,23 +1586,23 @@ function At(e, t = null) {
1586
1586
  s !== i && ((n ??= [...e])[r] = s);
1587
1587
  }
1588
1588
  if (n) return {
1589
- ...l,
1589
+ ...o,
1590
1590
  inputs: n
1591
1591
  };
1592
1592
  }
1593
1593
  }
1594
- return l;
1594
+ return o;
1595
1595
  };
1596
1596
  return s(e);
1597
1597
  }
1598
1598
  var St = (e) => {
1599
- if (e?.type !== x.Cell || void 0 === e.image) return !1;
1599
+ if (e?.type !== E.Cell || void 0 === e.image) return !1;
1600
1600
  const t = e.value;
1601
1601
  return t.rowIndex === Number.MIN_SAFE_INTEGER && !0 !== t.$colIndex && !t.scope;
1602
1602
  }, wt = (e) => {
1603
- const t = $(e.image);
1604
- return I(t, e), t;
1605
- }, Ct = (e) => e?.type === x.Cell, Nt = (e, t = null) => {
1603
+ const t = A(e.image);
1604
+ return g(t, e), t;
1605
+ }, Ct = (e) => e?.type === E.Cell, Nt = (e, t = null) => {
1606
1606
  if (!e) return e;
1607
1607
  let n = !1;
1608
1608
  const r = (e) => {
@@ -1616,13 +1616,13 @@ var St = (e) => {
1616
1616
  };
1617
1617
  if (r(e), !n) return e;
1618
1618
  let i = null;
1619
- const s = F(e, (e) => {
1620
- if (e?.type !== x.Cell) return;
1619
+ const s = x(e, (e) => {
1620
+ if (e?.type !== E.Cell) return;
1621
1621
  const t = e.value, n = e.image;
1622
1622
  if (!0 === t?.$colIndex || !0 === t?.$rowIndex) return void (i ??= `'${n ?? "a reference"}' cannot be absolute here. A LET/LAMBDA name that is a cell reference makes every reference in the formula a name, and a name cannot contain '$'.`);
1623
1623
  if (void 0 === n) return;
1624
- const r = $(n);
1625
- I(r, e);
1624
+ const r = A(n);
1625
+ g(r, e);
1626
1626
  const s = t?.scope;
1627
1627
  return s && (r.value.scope = s, r.value.scopeImage = t.scopeImage), r;
1628
1628
  });
@@ -1637,18 +1637,18 @@ var St = (e) => {
1637
1637
  const r = "let" === t ? "LET" : "LAMBDA", i = e.inputs, s = i?.length ?? 0;
1638
1638
  if (!i || s < 2) return;
1639
1639
  if ("let" === t && s % 2 == 0) return void (n = `Wrong number of arguments for LET. Expected name/value pairs followed by a calculation, but got ${s}.`);
1640
- if ("lambda" === t && i[s - 1]?.type === x.Empty) return void (n = "LAMBDA has no calculation: the last argument is empty.");
1641
- const o = /* @__PURE__ */ new Set(), l = "let" === t ? 2 : 1;
1640
+ if ("lambda" === t && i[s - 1]?.type === E.Empty) return void (n = "LAMBDA has no calculation: the last argument is empty.");
1641
+ const l = /* @__PURE__ */ new Set(), o = "let" === t ? 2 : 1;
1642
1642
  let a = !1;
1643
- for (let e = 0; e < s - 1; e += l) {
1643
+ for (let e = 0; e < s - 1; e += o) {
1644
1644
  let s = vt(i[e]);
1645
1645
  if (void 0 === s && "lambda" === t) s = yt(i[e]), void 0 !== s && (a = !0);
1646
1646
  else if (void 0 !== s && a) return void (n = `Required name '${s}' cannot follow an optional name in ${r}.`);
1647
1647
  if (void 0 === s) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot be the output of a formula.`);
1648
1648
  if (s.includes(".")) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot contain '.'.`);
1649
- const l = s.toUpperCase();
1650
- if (o.has(l)) return void (n = `Duplicate name '${s}' in ${r}.`);
1651
- o.add(l);
1649
+ const o = s.toUpperCase();
1650
+ if (l.has(o)) return void (n = `Duplicate name '${s}' in ${r}.`);
1651
+ l.add(o);
1652
1652
  }
1653
1653
  })(e, i);
1654
1654
  const s = e.inputs;
@@ -1658,107 +1658,107 @@ var St = (e) => {
1658
1658
  };
1659
1659
  function Pt(e, t, n, r, i) {
1660
1660
  const s = r;
1661
- let o;
1662
- const l = () => (void 0 === o && (o = i && n ? t.bind(d.Table, "", { at: {
1661
+ let l;
1662
+ const o = () => (void 0 === l && (l = i && n ? t.bind(S.Table, "", { at: {
1663
1663
  scope: n,
1664
1664
  rowIndex: i.rowIndex,
1665
1665
  colIndex: i.colIndex
1666
- } }) : null), o);
1667
- return F(e, (e, r, i = []) => {
1668
- let o;
1666
+ } }) : null), l);
1667
+ return x(e, (e, r, i = []) => {
1668
+ let l;
1669
1669
  const a = e.type;
1670
- if (a === x.Cell) {
1670
+ if (a === E.Cell) {
1671
1671
  const n = e.value;
1672
1672
  if (n?.scope) {
1673
- const r = t.bind(d.Sheet, n.scope, s);
1674
- null !== r && (o || (o = { ...e }), o.value = {
1673
+ const r = t.bind(S.Sheet, n.scope, s);
1674
+ null !== r && (l || (l = { ...e }), l.value = {
1675
1675
  ...n,
1676
1676
  scope: r
1677
1677
  });
1678
1678
  }
1679
- } else if (a === x.Named) {
1679
+ } else if (a === E.Named) {
1680
1680
  const r = e.value;
1681
1681
  if (r && !e.binding) {
1682
1682
  const i = function(e, t, n, r) {
1683
1683
  if (t.scope) {
1684
- const e = n.bind(d.Sheet, t.scope, r);
1685
- if (null === e || S(e)) return;
1684
+ const e = n.bind(S.Sheet, t.scope, r);
1685
+ if (null === e || u(e)) return;
1686
1686
  }
1687
- const i = n.bind(d.Table, t.nameId, { existing: !0 });
1687
+ const i = n.bind(S.Table, t.nameId, { existing: !0 });
1688
1688
  if (null === i) return;
1689
1689
  const s = {
1690
- type: x.TableReference,
1690
+ type: E.TableReference,
1691
1691
  value: i,
1692
1692
  inputs: null,
1693
1693
  isReference: !0
1694
1694
  };
1695
- I(s, e);
1696
- const o = t.scopeImage;
1697
- return "string" == typeof o && void 0 !== e.image && (s.image = o + e.image), s;
1695
+ g(s, e);
1696
+ const l = t.scopeImage;
1697
+ return "string" == typeof l && void 0 !== e.image && (s.image = l + e.image), s;
1698
1698
  }(e, r, t, s);
1699
1699
  if (i) return i;
1700
- const l = r.scope ? t.bind(d.Sheet, r.scope, s) : null, a = (null !== l ? S(l) ? l : t.resolve(d.Sheet, l)?.toString() ?? r.scope : r.scope) ?? n, u = t.bind(d.NamedFormula, r.nameId, a ? { scope: a } : void 0);
1701
- null === u && null === l || (o || (o = { ...e }), o.value = {
1700
+ const o = r.scope ? t.bind(S.Sheet, r.scope, s) : null, a = (null !== o ? u(o) ? o : t.resolve(S.Sheet, o)?.toString() ?? r.scope : r.scope) ?? n, c = t.bind(S.NamedFormula, r.nameId, a ? { scope: a } : void 0);
1701
+ null === c && null === o || (l || (l = { ...e }), l.value = {
1702
1702
  ...r,
1703
- nameId: u ?? r.nameId,
1704
- ...null !== l ? { scope: l } : void 0
1703
+ nameId: c ?? r.nameId,
1704
+ ...null !== o ? { scope: o } : void 0
1705
1705
  });
1706
1706
  }
1707
- } else if (a === x.Error) {
1707
+ } else if (a === E.Error) {
1708
1708
  const n = e.value;
1709
1709
  if (n?.scope) {
1710
- const r = t.bind(d.Sheet, n.scope, s);
1711
- null !== r && (o || (o = { ...e }), o.value = {
1710
+ const r = t.bind(S.Sheet, n.scope, s);
1711
+ null !== r && (l || (l = { ...e }), l.value = {
1712
1712
  ...n,
1713
1713
  scope: r
1714
1714
  });
1715
1715
  }
1716
- } else if (a === x.TableReference) {
1716
+ } else if (a === E.TableReference) {
1717
1717
  const n = e.value;
1718
1718
  if (n) {
1719
- const r = t.bind(d.Table, n);
1720
- o || (o = { ...e }), null !== r && (o.value = r);
1719
+ const r = t.bind(S.Table, n);
1720
+ l || (l = { ...e }), null !== r && (l.value = r);
1721
1721
  } else if ("string" == typeof n) {
1722
- const n = l();
1722
+ const n = o();
1723
1723
  if (null !== n && Lt(e, t)) return {
1724
1724
  ...e,
1725
1725
  value: n
1726
1726
  };
1727
1727
  }
1728
- } else if (a === x.TableColumn) {
1728
+ } else if (a === E.TableColumn) {
1729
1729
  const n = e.value;
1730
1730
  if (n) {
1731
- const r = pe(i, x.TableReference), s = r?.value || (r ? l() ?? void 0 : void 0), a = t.bind(d.TableColumn, n, s ? { tableName: s } : void 0);
1732
- o || (o = { ...e }), null !== a && (o.value = a);
1731
+ const r = pe(i, E.TableReference), s = r?.value || (r ? o() ?? void 0 : void 0), a = t.bind(S.TableColumn, n, s ? { tableName: s } : void 0);
1732
+ l || (l = { ...e }), null !== a && (l.value = a);
1733
1733
  }
1734
- } else if (a === x.Function) {
1734
+ } else if (a === E.Function) {
1735
1735
  const n = e.value;
1736
1736
  if (n) {
1737
- const r = t.bind(d.Function, n);
1738
- o || (o = { ...e }), null !== r && (o.value = r);
1737
+ const r = t.bind(S.Function, n);
1738
+ l || (l = { ...e }), null !== r && (l.value = r);
1739
1739
  }
1740
1740
  }
1741
- return o;
1741
+ return l;
1742
1742
  });
1743
1743
  }
1744
1744
  function Lt(e, t) {
1745
1745
  let n = !0;
1746
1746
  const r = e.inputs;
1747
1747
  if (!r) return !0;
1748
- for (let e = 0; e < r.length && n; e++) F(r[e], (e) => {
1749
- e.type === x.TableColumn && null === t.resolve(d.TableColumn, e.value) && (n = !1);
1748
+ for (let e = 0; e < r.length && n; e++) x(r[e], (e) => {
1749
+ e.type === E.TableColumn && null === t.resolve(S.TableColumn, e.value) && (n = !1);
1750
1750
  });
1751
1751
  return n;
1752
1752
  }
1753
1753
  function kt(e, t) {
1754
1754
  let n = null;
1755
- return F(e, (e) => {
1756
- if (n || e.type !== x.TableReference) return;
1755
+ return x(e, (e) => {
1756
+ if (n || e.type !== E.TableReference) return;
1757
1757
  if ("" === e.value) return void (n = "A structured reference without a table name must be in a table that has its columns.");
1758
1758
  const r = e.value;
1759
1759
  if (!t || "string" != typeof r) return;
1760
- const i = t.resolve(d.Table, r)?.toString() ?? r;
1761
- null === t.bind(d.Table, i, { existing: !0 }) ? n = `There is no table named '${i}'.` : Lt(e, t) || (n = "The table has no such column.");
1760
+ const i = t.resolve(S.Table, r)?.toString() ?? r;
1761
+ null === t.bind(S.Table, i, { existing: !0 }) ? n = `There is no table named '${i}'.` : Lt(e, t) || (n = "The table has no such column.");
1762
1762
  }), n;
1763
1763
  }
1764
- export { xt as A, nt as C, ot as D, Ze as E, ue as O, me as S, pt as T, fe as _, Ke as a, he as b, Re as c, ae as d, be as f, dt as g, ct as h, Ie as i, ye as j, ve as k, Ye as l, ce as m, Ft as n, Nt as o, bt as p, He as r, Pt as s, At as t, _e as u, ft as v, lt as w, kt as x, ge as y };
1764
+ export { xt as A, nt as C, lt as D, qe as E, ue as O, me as S, pt as T, fe as _, Ze as a, he as b, Re as c, ae as d, be as f, dt as g, ct as h, Ie as i, ye as j, ve as k, Ke as l, ce as m, Ft as n, Nt as o, bt as p, He as r, Pt as s, At as t, _e as u, ft as v, ot as w, kt as x, ge as y };