@sheetxl/mcp 0.8.0-beta.22 → 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.
- package/assets/{BRVEVVhj-8ZPrNyQ.js → 1J1R3dclFOh322Yr.js} +133 -133
- package/assets/{8csqJ8aGOdnKlrLl.js → 2XwVsSfo5wF5K-HA.js} +1 -1
- package/assets/{b-xk3WtCPBkC4E-Z.js → 2xkoVdiI70Gpaxoc.js} +2 -2
- package/assets/{Bi65BKwwiZYYZprq.js → 5MnsnJcajdtAujE2.js} +1 -1
- package/assets/{DoScYrfTJOHXe-Ko.js → B2zUUqxAJ1RiM7YI.js} +62 -62
- package/assets/{91BKH9obG4IfBzhy.js → B3YRTBFhX61z6rJv.js} +121 -121
- package/assets/{DevKDvFONeJ9euEq.js → BBuB6ffvyg2Cd7V5.js} +1 -1
- package/assets/{0jPw8-AyT6VbPuGO.js → BDSNdgf_hbhX1DhN.js} +1 -1
- package/assets/{nSzQt54CIADky_tF.js → BEsnJS5jYwkHNcZd.js} +1 -1
- package/assets/{ryaMyh_8KvmXVSJd.js → BGxwDpW8DkO8W0Ig.js} +1 -1
- package/assets/{BUGEQS5WdiLcI_0X.js → BI8kb-rd9dW85XJs.js} +1 -1
- package/assets/{CT99WREgkKGpcDTO.js → BJMeWtr7TiLNpt17.js} +1 -1
- package/assets/{ze6Q8BiEw9RClBzZ.js → BKpicdc9H5WnZPb-.js} +1 -1
- package/assets/{CSGN4rAf7CYnBDEa.js → BLr8y5StL65VZQxG.js} +18 -18
- package/assets/{BnGNMsqG5CzUzmX7.js → BNEBXKAh-N4Tygk7.js} +4 -4
- package/assets/{DAqaOCEQLmZRjcdR.js → BPorbjbkH-VoV1M0.js} +1 -1
- package/assets/{CYCqMEoWsry6_hrc.js → BPtf3_nlovO4r9Bm.js} +1 -1
- package/assets/{DdDKDqtpIkzd-mXi.js → BULbMlvQuB2WFBFE.js} +2 -2
- package/assets/{D-MsUF59BhikcNZt.js → BVUfaOAGhdMim8yB.js} +3 -3
- package/assets/{CSKjFDYwiwn5XNnH.js → BWeaY19OpTJK5v0n.js} +2 -2
- package/assets/{tIoHMgrZeRHWyxos.js → BYbzf-TVwbKQPCyK.js} +3 -3
- package/assets/{GGcMgq3ScY7Tv0PE.js → BZaXHnsJ6RkCZsnz.js} +3 -3
- package/assets/{DzGpZ2CQ1St9BF0y.js → BazhmjGvrL7pqVQP.js} +1 -1
- package/assets/{CufFcGwo5x95LSb7.js → BbU6aT_c6-4tkcCw.js} +1 -1
- package/assets/{CHpBOpoM9bCvQyn0.js → Bbmh8_bdk_HrQ5Y6.js} +1 -1
- package/assets/{tPa3RpqYRqCCCYf1.js → BcWSfKJ9Atkc0X_p.js} +1 -1
- package/assets/{DRd8gdwcr3EqtGkb.js → BdUFL3lVdwifHrf0.js} +1 -1
- package/assets/{BDq4iVyBh5lwX8pE.js → Bjk1Twm0RFO_3fS8.js} +1 -1
- package/assets/{E9mta1q4VtVUusy5.js → BlhJHu9ni2T9IaM1.js} +1 -1
- package/assets/{BSdRn3B8QeJFflY6.js → BomatnedZsGMF7MW.js} +22 -21
- package/assets/{D1tShC5iBlUoT2V2.js → BynbAjhJnLjyP7HH.js} +1 -1
- package/assets/{Cahhn5OLNqRYy-n8.js → Bz08KxFupjbdsoFx.js} +1 -1
- package/assets/{CXqqaFgNeUVRGvEb.js → C6_KHS3-ROddeSbS.js} +2 -2
- package/assets/{Bx592y6pyOwTS2x7.js → C8G_px4dGuR2KjJh.js} +1 -1
- package/assets/{HVwvDMZh0ZGR-hRT.js → CBMMHYgUAhgiJhJE.js} +3 -3
- package/assets/{BzFIkeB_lheiTR7z.js → CC7EfXPwp7_nSBIz.js} +1 -1
- package/assets/{BZxJKqVEO7B23XwE.js → CCBQDcCHI47PZ0YQ.js} +5 -5
- package/assets/{BiC09_YKQPmlUklQ.js → CE-9VKh5-Xwxnxmu.js} +1 -1
- package/assets/{CGxhgXj5qKj_Ubcp.js → CE5DhB5As59VJ-Ig.js} +1 -1
- package/assets/{OtMeAlbq6tyW5Hnc.js → CEsRqYMd5IjnAzzX.js} +4 -4
- package/assets/{C9wlvcFyjQA59G-_.js → CGLapmkNccH1g_ZJ.js} +1 -1
- package/assets/{4zyHb1mmcFfqwpjO.js → CH8DNTUgM79xk8Tt.js} +1 -1
- package/assets/{wWgI0JPoe_Wv0ceW.js → CHG4ZuzhyjGRuKBg.js} +1 -1
- package/assets/{Bzp3UtK_6fqEVlV8.js → CPZgEZ2jKoo7hS6g.js} +8 -8
- package/assets/{DEOkcuqKBFyRnY18.js → CQCPJBQD0qv9y8qE.js} +1 -1
- package/assets/{BHsqPfJZrdKTbPLP.js → CSisGJ4hiDhTi19U.js} +1 -1
- package/assets/{C7zManFR1LEJXiwb.js → CeVCLRwjkH3_OXJu.js} +1 -1
- package/assets/{CAgQJrDxGEfoa7jn.js → Cg1tSmK_AGJa2VeI.js} +3 -3
- package/assets/{3N6hsbh2WLceyO6T.js → CgYef9dYxY8YyUTE.js} +1 -1
- package/assets/{CGB4xgirbgEIN3tg.js → ChbkkN_JqbAGrUwB.js} +361 -359
- package/assets/{B6pXiayrnDoDbQt1.js → Cidwv57sKqhIrpHP.js} +41 -41
- package/assets/{C1PTfp7kVu3DqqZh.js → Cl04_aSpBHTwfsQR.js} +10144 -10137
- package/assets/{DxNK3HVEzFdUou54.js → Cl8_HMhRgzPzqFc7.js} +1 -1
- package/assets/{BUIjRIGTum7VuRFk.js → CnUYevzhUJYNqLad.js} +1 -1
- package/assets/{CV729JV1mNyYCmrq.js → CndRpNCcV89ncnqz.js} +1 -1
- package/assets/{BlxrCp7d-SeM-2DW.js → CpyybSV2kR6b-SIB.js} +467 -457
- package/assets/{DLbzfP7OOWhafkTq.js → CqP4H_-kRRjcxO91.js} +1 -1
- package/assets/{Cu4VAHfmjXWfTMPu.js → CrTLWpsRNBSyTLor.js} +1 -1
- package/assets/{DgVCjvTw9Df1DV1x.js → CtlrxXVgZDIOcuc1.js} +11 -11
- package/assets/{BaaVzb7xXROiWUhT.js → CwrOCbcS4IHLsERQ.js} +4 -4
- package/assets/{DgYcOz0M0pmZf9x_.js → Cx1bc-Dsja7W3GlB.js} +2 -2
- package/assets/{BXean6K6oDUxkzyd.js → CyhngJo16o7G18lq.js} +1 -1
- package/assets/{1U3DwsqHnOBwiGWn.js → CzoRlNMlpFz4iax3.js} +2 -2
- package/assets/{UgDy0WNXuV1sEnFW.js → D-PYDPXobSWiPh1D.js} +2 -2
- package/assets/{D89TE5n8VKre9Gmp.js → D5O3m16KeyU_oXqH.js} +1 -1
- package/assets/{do_DTptu6c_xHJoZ.js → D5PpcRuJYSv0i2y9.js} +2 -2
- package/assets/{BgwCdHyXKQYFAl1M.js → D60N4r1a2YsNEwqj.js} +1 -1
- package/assets/{BygXDW3XTdtR38aA.js → D7oYfHgO0kEqAnPV.js} +1 -1
- package/assets/{Ds5pLAwSN4lSbao6.js → DACd4ZjYwzNE7Koc.js} +1 -1
- package/assets/{CKhbbbjQ-_auMp3n.js → DAliB9N1z6qnw4NO.js} +1 -1
- package/assets/{DHHYGjNwlLvja3dS.js → DIAQ_WlBCWhgHt-z.js} +1 -1
- package/assets/{DdnALoxd3b8TLNla.js → DJ2jlogB1DWlGM-J.js} +1 -1
- package/assets/{coTH4ab6CTEzw87b.js → DKKLWACR9GsidnkS.js} +2 -2
- package/assets/{DsBXjYAgTUXAAWZZ.js → DL7_uGw6KiZhlvR8.js} +1 -1
- package/assets/{Dbh-XVDw294AVLtl.js → DL8wUEe2Kx7bjDYP.js} +1 -1
- package/assets/{CwNKcoA7na7Ess3a.js → DLuQ_rdu0XjYF7Jq.js} +2 -2
- package/assets/{DFQLoYLUO4TgDZPK.js → DN1RRp4qQfCq3JAO.js} +1 -1
- package/assets/{BvKzhnweVF6GhjXh.js → DPjWOMoJ-elAAOmS.js} +1 -1
- package/assets/{hAVtdK6u2tlLI2cB.js → DSyZaCML62gSnudE.js} +1 -1
- package/assets/DU2Dzzu0oY_eDN6i.js +14 -0
- package/assets/{Z5tQQ6IW5YBjblWX.js → DUytcsu0MV3GnsrM.js} +1 -1
- package/assets/{CHnaSM8aMnQ2_VWW.js → DV3PnM9lo0AW-YOA.js} +3 -3
- package/assets/{CXk5vwFfosghrTKo.js → DXmebUOAhtW4V6BO.js} +416 -416
- package/assets/{BkqENH8xJ3_NQnD5.js → DZt1ONN8CTTfmHGn.js} +612 -612
- package/assets/{OfjHqYH31KqC5gVM.js → Dawi8y7JWn6A9gAx.js} +1 -1
- package/assets/{CdtVv8YQ8PTmS4dz.js → DbbNJyL67KdOK7nc.js} +1 -1
- package/assets/{D9ja7F9irHf9Iovx.js → DcO0gub7cRKVw4xB.js} +1 -1
- package/assets/{BI5L_Ysr8s0TQxdg.js → DfBERTJjS9LP0RSp.js} +1 -1
- package/assets/{D8dNiNpu9_L0NjGP.js → Dg5QmWm0uBTEjZy4.js} +1 -1
- package/assets/{hhpAcu3tINDLk7Ov.js → DgLQfXTWavoBetna.js} +5 -5
- package/assets/{Bf7Irm8Ua4s1T4xH.js → DiJexWBIzdGj1H0H.js} +1 -1
- package/assets/{DrLUi6vduqDLmQjl.js → DoP6myQHGI-X1gNy.js} +112 -112
- package/assets/{BnK6HEqT4rf1RoOG.js → Dol52NFQzLCbObuC.js} +260 -260
- package/assets/{DQIQR1t3IkC9wshP.js → DrKr8dXQEQ3Aukmt.js} +1 -1
- package/assets/{C1yAmXrOu3iHV2cu.js → DtETpSxSR8C1voac.js} +27 -27
- package/assets/{VSbzBtGH0cA8VBsM.js → DuQU8JjPLBIK804w.js} +39 -39
- package/assets/{C4-0s3Udk3v4ytSn.js → DvkBNkPyR5kuS0Uo.js} +2 -2
- package/assets/{DtvJg63vbDd6B7sD.js → E-KM5RFByUxjlkId.js} +6 -6
- package/assets/{DmVQgN-N_HhYvakk.js → KMTTqSwDthnXnD4F.js} +1 -1
- package/assets/{1dUPpOVZSeeylKHv.js → KhdF512BKcJXZMvq.js} +1 -1
- package/assets/{VWEaItb0XvCoRiCT.js → L9RIicOHtZd2Rx8g.js} +1 -1
- package/assets/{D-N87jCOShDKTFDh.js → MzfM7zDcnyOFK1lK.js} +1 -1
- package/assets/{zJoBN2CJdxEV7vdh.js → NDe-uS1n_Q7u1H3m.js} +3 -3
- package/assets/{CHqnRMWNpLKcAWWn.js → PVGDjdR9C4stMNpM.js} +1 -1
- package/assets/{DdXp_iPwTOHAOvlL.js → PiFW6uPRJABzK3V1.js} +1174 -1176
- package/assets/{DawLBAaNAAmo_P3Y.js → WH1Vl-MDWX3vSMn1.js} +2 -2
- package/assets/{CpYgsvYMxV5SbRp3.js → WuKVkvMPAOmRaCDY.js} +2 -2
- package/assets/{BrfsWImwRtf54LUU.js → YtxPcFPURJF6CxWu.js} +1 -1
- package/assets/{9AosCdy_xtdhLjN1.js → a9lvcAd7rWsWSWAo.js} +1 -1
- package/assets/{BV49J63s68Mj6lgF.js → aTxgpOOxLenli4af.js} +1 -1
- package/assets/{CHG9Q0uLAZdLXYVz.js → bsnhRuD-K-qhW-y5.js} +62 -62
- package/assets/{xDx1vaNa2aCMs4_e.js → dep8oZGwBmUpxjHl.js} +1 -1
- package/assets/{BPZWfwUvFCLQInXN.js → f_dBJuakO_BJ7Tvm.js} +401 -401
- package/assets/{Dvsld01DkmiNLjfP.js → gver5Sz7ZO6ZyrOi.js} +1 -1
- package/assets/{B5VTjL9m0R-Icfaz.js → jKIDENA_QP4bEX49.js} +4 -4
- package/assets/{v5XZSqLd9ZV3kqcA.js → q1rCdlJA6Z7tA6om.js} +1 -1
- package/assets/{WSiEiaP-NUEr9UaB.js → qjyVXZeVSr_qZfX5.js} +2 -2
- package/assets/{COVhUB0EotytQDHg.js → sIWsnPhnHm_MeeM9.js} +2 -2
- package/assets/{sYakw2x8dcnpUlsX.js → t4qTfgdlstczTs2z.js} +21 -21
- package/assets/{vazKaFOkHRriv7tX.js → wKkW4LO-iUp92LVC.js} +1 -1
- package/index.js +157 -157
- package/lib.js +1 -1
- package/licenses/dependencies.txt +115 -115
- package/package.json +4 -4
- package/screenshot-page/assets/{CFl15-2FAF9f3V7L.js → 0UZBKpOOsp7P-DkP.js} +2 -2
- package/screenshot-page/assets/37LAUhU1_yKtsBlH.js +2 -0
- package/screenshot-page/assets/{CcOIj8c4N9KaWnD7.js → B2PWru6Ty7ODc2Ie.js} +1 -1
- package/screenshot-page/assets/B3c6NBI22E5SZWG-.js +1 -0
- package/screenshot-page/assets/B3yyoGGGl8ICyeoC.js +39 -0
- package/screenshot-page/assets/B56KxTxcAXDom0g4.js +13 -0
- package/screenshot-page/assets/{Dwv5Z_c2XS-hm-5y.js → BAxPBeFudRJ3OqIC.js} +1 -1
- package/screenshot-page/assets/{BRemww1df2HKLd_k.js → BJct69niPZc8L_gZ.js} +1 -1
- package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +1 -0
- package/screenshot-page/assets/{Bm9-R9keVK5Sx-8o.js → BT2nkqpteSR9booH.js} +1 -1
- package/screenshot-page/assets/{CQ9C0-FcDZxrgC3T.js → BTKdl-XR9TlWaFe7.js} +4 -4
- package/screenshot-page/assets/{BEwl-ucV9Jfr0RoC.js → Bdb0azxGoCh6NBDk.js} +1 -1
- package/screenshot-page/assets/{D8-mayyvvVE1a4JB.js → Be1S5czBx0lxhYLW.js} +1 -1
- package/screenshot-page/assets/Bh2DVAOWvWfylt77.js +1 -0
- package/screenshot-page/assets/BjJ_nnNDZEPLpapa.js +1 -0
- package/screenshot-page/assets/Bml69dFBVggmVWda.js +57 -0
- package/screenshot-page/assets/BoiQQ-37KQn6NcLT.js +1 -0
- package/screenshot-page/assets/{B668_VaGrdcWRbkC.js → C-n8BDiksNjX6Orz.js} +1 -1
- package/screenshot-page/assets/C5-sm7wuk62Nzm_p.js +1 -0
- package/screenshot-page/assets/C9a-cNha8mBw5q-l.js +1 -0
- package/screenshot-page/assets/CAQ7QWes7j7Fq8o5.js +2 -0
- package/screenshot-page/assets/{zFbb8ESzwR_bE7IQ.js → CBP4y6KFPu24xhDT.js} +1 -1
- package/screenshot-page/assets/{DdusmeEPaU7CWT6e.js → CEL5lzj2NDYwJ-HC.js} +1 -1
- package/screenshot-page/assets/CGx-ZSMV9cPOzbu4.js +2 -0
- package/screenshot-page/assets/CI3Z1f4amZ9G2rPD.js +5 -0
- package/screenshot-page/assets/{CXGgKVbVXjWzE0p6.js → CQ-33-es3XJ56pR4.js} +1 -1
- package/screenshot-page/assets/{BftXEPOuf5Uwxpud.js → CaOsWPeN_FXseSNg.js} +1 -1
- package/screenshot-page/assets/CaP_vH0sJFjNrSkW.js +1 -0
- package/screenshot-page/assets/{adhmz3N2Kgq5eW66.js → Cbbl3H042tb0krfe.js} +2 -2
- package/screenshot-page/assets/CcVllJMjVF6SvVVq.js +2 -0
- package/screenshot-page/assets/{DfT1DMR1b5kiyYiV.js → Ce8b0lOBuWKlfLzJ.js} +1 -1
- package/screenshot-page/assets/Cengqc8q8BTmNfb_.js +1 -0
- package/screenshot-page/assets/{nM1r2xslndIMKlI2.js → CiFaOHqsDQTE4RRi.js} +1 -1
- package/screenshot-page/assets/Cv0zGWEBpmC07Jps.js +1 -0
- package/screenshot-page/assets/CyfTQE0Z76Rp4Fbt.js +586 -0
- package/screenshot-page/assets/D2CxEHjkPQMAxzWl.js +1 -0
- package/screenshot-page/assets/D4hvW_TF7vwc-Xlq.js +2 -0
- package/screenshot-page/assets/D7Y0npF3FMsGUjgO.js +1 -0
- package/screenshot-page/assets/DACSL7FA_J91Z_H7.js +2 -0
- package/screenshot-page/assets/{COpZTXe_J1mSpeYD.js → DEAD_MduPNVoT_T6.js} +1 -1
- package/screenshot-page/assets/{Cmv8bpHaTWZ7Lmbt.js → DMbFr7oWja7Qpsm6.js} +2 -2
- package/screenshot-page/assets/DVQnEWIisXaOXb_G.js +4 -0
- package/screenshot-page/assets/DXbOBAxx4_2rt5KM.js +1 -0
- package/screenshot-page/assets/{CUeMb48Ucrm5dK5u.js → DgLZb-StwCd9ftop.js} +1 -1
- package/screenshot-page/assets/Dkf51CnZh2zPEGMd.js +1 -0
- package/screenshot-page/assets/DrnzLCa7NIirMxno.js +3 -0
- package/screenshot-page/assets/DtQFcMvZesaQ4xRf.js +1 -0
- package/screenshot-page/assets/DvRXbyteeo_8sy8T.js +1 -0
- package/screenshot-page/assets/EOw6vVvEfYNga9b4.js +1 -0
- package/screenshot-page/assets/{CZq2dMHs2MHHyyBl.js → FcTM4SB17cEX1M3X.js} +1 -1
- package/screenshot-page/assets/{BnZX0sxceYpvtg3I.js → JM0_BaBZ3yF6lnHC.js} +2 -2
- package/screenshot-page/assets/ONNSfQ8RDOqBDsvw.js +2 -0
- package/screenshot-page/assets/{CXUO3vYip3JPSJ7A.js → YH1wNXzhQbkuWxeS.js} +1 -1
- package/screenshot-page/assets/_zzVe2R8R4vwuc5q.js +48 -0
- package/screenshot-page/assets/{-cpi3yOZYn6GsYN4.js → gU2zeJaXoNh7QI_e.js} +2 -2
- package/screenshot-page/index.html +16 -16
- package/types/scripting-api.json +1782 -1781
- package/types/scripting.d.ts +5 -0
- package/assets/r-pk3RNq_HjMQFqr.js +0 -14
- package/screenshot-page/assets/0buGanYjZDNd9qAK.js +0 -39
- package/screenshot-page/assets/B2oadmu_j6WfNbZ1.js +0 -1
- package/screenshot-page/assets/BGWgIYge30MP6Xhz.js +0 -48
- package/screenshot-page/assets/BGh5K-hHzy8mSVDr.js +0 -57
- package/screenshot-page/assets/BIQ7KK-buzeddVA9.js +0 -1
- package/screenshot-page/assets/BPRDGSNh0kvXRFUY.js +0 -1
- package/screenshot-page/assets/Bv2MgCMkg3EIQ6iE.js +0 -13
- package/screenshot-page/assets/BvaiwYJ5zZ0d5NRP.js +0 -1
- package/screenshot-page/assets/CAlTfQ_Gh-dURmUc.js +0 -1
- package/screenshot-page/assets/CCFxspvs5VzbYCfl.js +0 -1
- package/screenshot-page/assets/CCqTTfzZokVHIzs2.js +0 -1
- package/screenshot-page/assets/CPs_ARK8JCyz-yZg.js +0 -1
- package/screenshot-page/assets/CjrHeIdacavAT_Ud.js +0 -3
- package/screenshot-page/assets/CqccUqSMYlwlf2ZU.js +0 -2
- package/screenshot-page/assets/CvmImq-Kbg9srxNr.js +0 -4
- package/screenshot-page/assets/D-3wYBqe4SWdE6bx.js +0 -2
- package/screenshot-page/assets/D-FWnGDbZ9BRDzPR.js +0 -1
- package/screenshot-page/assets/D717DArr-KKL0U6R.js +0 -1
- package/screenshot-page/assets/DM27mE98BNk1T18I.js +0 -1
- package/screenshot-page/assets/DN-T1DyRMKvxEJSK.js +0 -1
- package/screenshot-page/assets/DRdL1GN4SP7P8lSP.js +0 -2
- package/screenshot-page/assets/DcnhaY93LQd7kVdH.js +0 -2
- package/screenshot-page/assets/DigI6jhjHePzLgg1.js +0 -1
- package/screenshot-page/assets/DrDLCC0R2IV5VJd7.js +0 -1
- package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +0 -2
- package/screenshot-page/assets/Dx0pUf3G4Oa3dGOk.js +0 -1
- package/screenshot-page/assets/JcgNMFaj_uqHSFxr.js +0 -1
- package/screenshot-page/assets/U_8_wApwfA7KmIG3.js +0 -586
- package/screenshot-page/assets/WZprjN2sb7HlraOb.js +0 -2
- package/screenshot-page/assets/qjoaeEBxfKWCHmqK.js +0 -2
- package/screenshot-page/assets/zALFdtoGJBN6m2Bn.js +0 -1
- package/screenshot-page/assets/zd1Z2E1NjFp2EWC7.js +0 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.
|
|
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 { Q as t, St as e, Z as n, ht as r, ot as o, r as s, u as l } from "./
|
|
8
|
-
import { a as i, r as a } from "./
|
|
9
|
-
import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./
|
|
10
|
-
import { a as p, f as m, l as S, m as w, p as E, u as I } from "./
|
|
11
|
-
import { $ as y,
|
|
12
|
-
import { C as Oe, E as Pe, O as ze, _ as Le, a as $e, b as He, d as je, m as Ke, r as qe, u as Ue } from "./
|
|
13
|
-
import { n as We } from "./
|
|
14
|
-
import { _ as Xe, a as Je, c as Qe, d as Ye, f as Ze, g as tn, h as en, i as nn, l as rn, m as on, n as sn, o as ln, p as an, r as cn, s as dn, u as hn } from "./
|
|
15
|
-
import { c as un, i as _n, n as fn, o as gn, s as pn, t as mn } from "./
|
|
7
|
+
import { Q as t, St as e, Z as n, ht as r, ot as o, r as s, u as l } from "./DIAQ_WlBCWhgHt-z.js";
|
|
8
|
+
import { a as i, r as a } from "./CzoRlNMlpFz4iax3.js";
|
|
9
|
+
import { B as c, M as d, _ as h, f as u, ht as _, sn as f, st as g } from "./BomatnedZsGMF7MW.js";
|
|
10
|
+
import { a as p, f as m, l as S, m as w, p as E, u as I } from "./BI8kb-rd9dW85XJs.js";
|
|
11
|
+
import { $n as y, A as v, An as x, At as C, C as b, Ci as R, Cn as A, Ct as k, Da as N, Di as M, Dr as F, Dt as D, Ea as T, Ei as G, Fa as B, Fi as V, Gi as O, Gn as P, Gr as z, Gt as L, H as $, Hn as H, Hr as j, In as K, It as q, Ja as U, Jn as W, Jt as X, Ka as J, Kn as Q, L as Y, La as Z, Li as tt, Lt as et, Mi as nt, Mn as rt, Mr as ot, Na as st, Nn as lt, O as it, On as at, Or as ct, Ot as dt, Pi as ht, Pr as ut, Q as _t, Qn as ft, Qr as gt, Ra as pt, Tr as mt, U as St, Ua as wt, Ur as Et, Vn as It, Vr as yt, Wa as vt, Wr as xt, Xa as Ct, Xt as bt, Y as Rt, Ya as At, Yr as kt, Zn as Nt, Zt as Mt, _a as Ft, _n as Dt, b as Tt, br as Gt, bt as Bt, c as Vt, d as Ot, dt as Pt, ea as zt, eo as Lt, fn as $t, fo as Ht, fr as jt, g as Kt, gn as qt, gr as Ut, gt as Wt, hi as Xt, ho as Jt, ia as Qt, in as Yt, ir as Zt, it as te, ja as ee, jr as ne, kt as re, li as oe, mn as se, mo as le, n as ie, ni as ae, nn as ce, nt as de, o as he, oa as ue, oi as _e, p as fe, po as ge, pr as pe, pt as me, q as Se, ra as we, si as Ee, sn as Ie, so as ye, sr as ve, st as xe, ta as Ce, tr as be, uo as Re, wi as Ae, x as ke, xn as Ne, ya as Me, yi as Fe, yr as De, yt as Te, z as Ge, zr as Be, zt as Ve } from "./Cl04_aSpBHTwfsQR.js";
|
|
12
|
+
import { C as Oe, E as Pe, O as ze, _ as Le, a as $e, b as He, d as je, m as Ke, r as qe, u as Ue } from "./f_dBJuakO_BJ7Tvm.js";
|
|
13
|
+
import { n as We } from "./B2zUUqxAJ1RiM7YI.js";
|
|
14
|
+
import { _ as Xe, a as Je, c as Qe, d as Ye, f as Ze, g as tn, h as en, i as nn, l as rn, m as on, n as sn, o as ln, p as an, r as cn, s as dn, u as hn } from "./DuQU8JjPLBIK804w.js";
|
|
15
|
+
import { c as un, i as _n, n as fn, o as gn, s as pn, t as mn } from "./t4qTfgdlstczTs2z.js";
|
|
16
16
|
var Sn = class e {
|
|
17
17
|
constructor(e, n) {
|
|
18
18
|
this._grid = null, this._value = e, this._axis = n?.axis ?? t.Row, this._maxCoords = n?.maxCoords;
|
|
@@ -20,7 +20,7 @@ var Sn = class e {
|
|
|
20
20
|
_materialize() {
|
|
21
21
|
let t = this._grid;
|
|
22
22
|
if (!t) {
|
|
23
|
-
t = new
|
|
23
|
+
t = new Z({
|
|
24
24
|
axis: this._axis,
|
|
25
25
|
maxCoords: this._maxCoords
|
|
26
26
|
});
|
|
@@ -76,18 +76,18 @@ var Sn = class e {
|
|
|
76
76
|
if (n) return n.entries(e);
|
|
77
77
|
if (e?.processRowSkip || e?.processColumnSkip) return this._materialize().entries(e);
|
|
78
78
|
const r = this._value;
|
|
79
|
-
if (null == r) return
|
|
79
|
+
if (null == r) return Te;
|
|
80
80
|
const o = e?.bounds;
|
|
81
|
-
if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return
|
|
82
|
-
const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ?
|
|
81
|
+
if (o && ((o.colStart ?? 0) > 0 || (o.rowStart ?? 0) > 0 || (o.colEnd ?? 0) < 0 || (o.rowEnd ?? 0) < 0)) return Te;
|
|
82
|
+
const s = e?.axis ? e.axis === t.Column : this._axis === t.Column, l = e ? Nt(e.reuseResult) : void 0, i = this;
|
|
83
83
|
let a = !1, c = null;
|
|
84
84
|
return {
|
|
85
|
-
next: (t) => c ? c.next(t) : t ? (c = i._materialize().entries(e), c.next(t)) : a ?
|
|
85
|
+
next: (t) => c ? c.next(t) : t ? (c = i._materialize().entries(e), c.next(t)) : a ? qt : (a = !0, G(0, 0, r, s, l)),
|
|
86
86
|
[Symbol.iterator]() {
|
|
87
87
|
return this;
|
|
88
88
|
},
|
|
89
|
-
return: (t) =>
|
|
90
|
-
throw: (t) =>
|
|
89
|
+
return: (t) => qt,
|
|
90
|
+
throw: (t) => qt
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
keys(t) {
|
|
@@ -243,7 +243,7 @@ var Sn = class e {
|
|
|
243
243
|
_getOrCreate2D(t) {
|
|
244
244
|
if (!t) throw new Error(In);
|
|
245
245
|
let e = this._mapScopeTo2Ds.get(t);
|
|
246
|
-
return e || (e = new
|
|
246
|
+
return e || (e = new J(this._options2D), this._mapScopeTo2Ds.set(t, e), this._last2DKey = t, this._last2DMap = e), e;
|
|
247
247
|
}
|
|
248
248
|
_cleanupEmpty2D(t, e) {
|
|
249
249
|
e?.isEmpty() && (this._mapScopeTo2Ds.delete(t), this._last2DKey === t && (this._last2DKey = void 0, this._last2DMap = void 0));
|
|
@@ -263,7 +263,7 @@ var Sn = class e {
|
|
|
263
263
|
return n.isLambdaCallable = !0, n.checkArity = (n) => n >= e && n <= t.length, n.paramCount = t.length, n;
|
|
264
264
|
}
|
|
265
265
|
_function() {
|
|
266
|
-
return this._asFunction ??=
|
|
266
|
+
return this._asFunction ??= Ce(this);
|
|
267
267
|
}
|
|
268
268
|
execute(...t) {
|
|
269
269
|
return this._function().execute(...t);
|
|
@@ -301,7 +301,7 @@ var Sn = class e {
|
|
|
301
301
|
try {
|
|
302
302
|
return t.execute(...e);
|
|
303
303
|
} catch (t) {
|
|
304
|
-
if (
|
|
304
|
+
if (he(t)) throw t;
|
|
305
305
|
return I.isError(t) ? t : new I.Value(t?.message, { cause: t });
|
|
306
306
|
}
|
|
307
307
|
};
|
|
@@ -342,17 +342,17 @@ var Sn = class e {
|
|
|
342
342
|
const s = "display" === o, l = this._compiled;
|
|
343
343
|
if (l.error && !l.ast) return l.error.input;
|
|
344
344
|
let i = void 0 !== r ? He(l.ast, r) : l.getTokens();
|
|
345
|
-
i =
|
|
345
|
+
i = Ct(i, l.symbols, !s, s, s ? {
|
|
346
346
|
scope: this._gridId,
|
|
347
347
|
rowIndex: t,
|
|
348
348
|
colIndex: e
|
|
349
349
|
} : null);
|
|
350
|
-
const a = s ? this._displayLocale() :
|
|
351
|
-
return n ?
|
|
350
|
+
const a = s ? this._displayLocale() : ye;
|
|
351
|
+
return n ? Vt(i, this._getEntireCoords?.(), a) : bt(i, this._getEntireCoords?.(), t, e, a);
|
|
352
352
|
}
|
|
353
353
|
_displayLocale() {
|
|
354
354
|
const t = this._context.getRuntime().getLocaleProfile();
|
|
355
|
-
return
|
|
355
|
+
return F(Yt(t.decimal));
|
|
356
356
|
}
|
|
357
357
|
getRecord() {
|
|
358
358
|
const t = this._record;
|
|
@@ -396,7 +396,7 @@ var Sn = class e {
|
|
|
396
396
|
$rowEnd: e.$rowEnd,
|
|
397
397
|
scope: t.scope
|
|
398
398
|
};
|
|
399
|
-
} else n.node.type ===
|
|
399
|
+
} else n.node.type === At.Cell ? i = { ...o[n.value] } : n.op === At.Named ? i = { nameId: n.node.value.nameId } : n.op === At.TableReference && (i = { table: { ...n.node.value } });
|
|
400
400
|
s[t] = i;
|
|
401
401
|
}
|
|
402
402
|
return s;
|
|
@@ -408,7 +408,7 @@ var Sn = class e {
|
|
|
408
408
|
getTokensAt(t, e, n) {
|
|
409
409
|
const r = this._compiled;
|
|
410
410
|
let o = void 0 !== n ? He(r.ast, n) : r.getTokens();
|
|
411
|
-
return o =
|
|
411
|
+
return o = Ct(o, r.symbols, !1, !0), ct(o, t, e);
|
|
412
412
|
}
|
|
413
413
|
getError() {
|
|
414
414
|
return this._compiled.error ?? null;
|
|
@@ -462,12 +462,12 @@ var Sn = class e {
|
|
|
462
462
|
const n = this._compiled.getTokens(), r = e._compiled.getTokens();
|
|
463
463
|
if (n.length !== r.length) return !1;
|
|
464
464
|
const o = this._context.getEntireCoords();
|
|
465
|
-
return
|
|
465
|
+
return Vt(n, o) === Vt(r, o);
|
|
466
466
|
}
|
|
467
467
|
getReferences(t, e) {
|
|
468
468
|
const n = this._compiled, o = n.referenceIndices, s = o.length;
|
|
469
469
|
if (0 === s) return r.EmptyArray;
|
|
470
|
-
const l = n.referencesExecute, i = n.referencesRelative, a =
|
|
470
|
+
const l = n.referencesExecute, i = n.referencesRelative, a = ge(s);
|
|
471
471
|
for (let n = 0; n < s; n++) {
|
|
472
472
|
const r = l[o[n]], s = r.inputs;
|
|
473
473
|
if (s && 2 === s.length) {
|
|
@@ -483,26 +483,26 @@ var Sn = class e {
|
|
|
483
483
|
$rowEnd: e.$rowEnd,
|
|
484
484
|
scope: t.scope
|
|
485
485
|
};
|
|
486
|
-
} else if (r.node.type ===
|
|
486
|
+
} else if (r.node.type === At.Cell) {
|
|
487
487
|
const t = i[r.value];
|
|
488
488
|
a[n] = { ...t };
|
|
489
|
-
} else if (r.op ===
|
|
490
|
-
const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(
|
|
489
|
+
} else if (r.op === At.Named) {
|
|
490
|
+
const t = r.node.value.nameId, e = this._compiled.symbols?.resolve(Bt.NamedFormula, t)?.toString() ?? t;
|
|
491
491
|
a[n] = { nameId: e };
|
|
492
|
-
} else if (r.op ===
|
|
492
|
+
} else if (r.op === At.TableReference) {
|
|
493
493
|
const o = r.node.value;
|
|
494
494
|
let s = this._resolveStructuredRef(o, t, e);
|
|
495
495
|
!s || I.isError(s) ? a[n] = null : a[n] = {
|
|
496
496
|
...s,
|
|
497
497
|
tableId: o.tableId
|
|
498
498
|
};
|
|
499
|
-
} else r.op ===
|
|
499
|
+
} else r.op === At.Error && (a[n] = null);
|
|
500
500
|
}
|
|
501
501
|
return a;
|
|
502
502
|
}
|
|
503
503
|
getReferencesAt(t, e) {
|
|
504
504
|
const n = this.getReferences(t, e);
|
|
505
|
-
return 0 === n.length ? r.EmptyArray :
|
|
505
|
+
return 0 === n.length ? r.EmptyArray : b(n, t, e);
|
|
506
506
|
}
|
|
507
507
|
getFormatReferences() {
|
|
508
508
|
const t = this._formatReferences;
|
|
@@ -532,7 +532,7 @@ var Sn = class e {
|
|
|
532
532
|
e < 0 && (e = i.length + e);
|
|
533
533
|
const c = i[e];
|
|
534
534
|
if (void 0 === c) throw new Error(`Invalid reference index: ${e}`);
|
|
535
|
-
const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op ===
|
|
535
|
+
const d = a[c], h = d.node, u = h.inputs ?? r.EmptyArray, _ = d.op === At.Named, f = 2 === u.length;
|
|
536
536
|
let g, p, m = !1;
|
|
537
537
|
n && I.isError(n) && (n = null), n && "nameId" in n && !_ && (n = null);
|
|
538
538
|
const S = n && "nameId" in n ? null : n, w = !!S && void 0 !== S.colIndex;
|
|
@@ -559,44 +559,44 @@ var Sn = class e {
|
|
|
559
559
|
}, t.colEnd === Number.MAX_SAFE_INTEGER && (p.colIndex = Number.MIN_SAFE_INTEGER), t.rowEnd === Number.MAX_SAFE_INTEGER && (p.rowIndex = Number.MIN_SAFE_INTEGER));
|
|
560
560
|
}
|
|
561
561
|
const E = w && f;
|
|
562
|
-
let y = -1, v = -1, x = -1,
|
|
562
|
+
let y = -1, v = -1, x = -1, C = -1;
|
|
563
563
|
if (f) y = u[0].evalIndex, v = u[1].evalIndex;
|
|
564
564
|
else if ("cell" === h.type) y = h.evalIndex;
|
|
565
|
-
else if (d.op ===
|
|
565
|
+
else if (d.op === At.TableReference) x = h.evalIndex;
|
|
566
566
|
else {
|
|
567
567
|
if (!_) throw new Error(`Invalidate reference index: ${e}`);
|
|
568
|
-
|
|
568
|
+
C = h.evalIndex;
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const b = (...t) => {
|
|
571
571
|
if (s?.scopeDeleted) return null;
|
|
572
572
|
const e = this._compiled.symbols;
|
|
573
573
|
for (let n = 0; n < t.length; n++) {
|
|
574
574
|
const r = (t[n]?.value)?.scope;
|
|
575
|
-
if (r) return e && !e.resolve(
|
|
575
|
+
if (r) return e && !e.resolve(Bt.Sheet, r) ? null : r;
|
|
576
576
|
}
|
|
577
577
|
return null;
|
|
578
|
-
},
|
|
578
|
+
}, R = h, A = this._compiled.ast, k = Et(A, (t) => {
|
|
579
579
|
if (!t || !t.isReference) return;
|
|
580
|
-
if (E && t ===
|
|
580
|
+
if (E && t === R) return Tt(g);
|
|
581
581
|
const e = t.type;
|
|
582
|
-
if (-1 !==
|
|
583
|
-
if (!n) return
|
|
582
|
+
if (-1 !== C && t.evalIndex === C && e === At.Named) {
|
|
583
|
+
if (!n) return Xt();
|
|
584
584
|
if (n && "nameId" in n) {
|
|
585
|
-
const e = n, r = this._compiled.symbols?.bind(
|
|
585
|
+
const e = n, r = this._compiled.symbols?.bind(Bt.NamedFormula, e.nameId) ?? e.nameId, o = { ...t };
|
|
586
586
|
return o.value = {
|
|
587
587
|
...t.value,
|
|
588
588
|
...e,
|
|
589
589
|
nameId: r
|
|
590
590
|
}, o;
|
|
591
591
|
}
|
|
592
|
-
return m ?
|
|
592
|
+
return m ? Re(":", Tt(g), Tt(p), !0) : Tt(g);
|
|
593
593
|
}
|
|
594
|
-
if (-1 !== x && t.evalIndex === x && e ===
|
|
594
|
+
if (-1 !== x && t.evalIndex === x && e === At.TableReference) return n ? m ? Re(":", Tt(g), Tt(p), !0) : Tt(g) : Xt();
|
|
595
595
|
if (!n && Pe.includes(t.value)) {
|
|
596
596
|
const e = t.inputs ?? r.EmptyArray, n = e[0], o = e[1];
|
|
597
597
|
let s = n.evalIndex === y, l = o.evalIndex === v;
|
|
598
598
|
if (s || l) {
|
|
599
|
-
const e =
|
|
599
|
+
const e = Xt(void 0, void 0, b(n, o));
|
|
600
600
|
return e.evalIndex = t.evalIndex, e;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
@@ -607,19 +607,19 @@ var Sn = class e {
|
|
|
607
607
|
if (n) if (f === m) {
|
|
608
608
|
let e = l ? g : p;
|
|
609
609
|
s = { ...t }, s.value = e, s.image = null;
|
|
610
|
-
} else s =
|
|
611
|
-
else s =
|
|
610
|
+
} else s = Re(":", Tt(g), Tt(p), !0);
|
|
611
|
+
else s = Xt(void 0, void 0, b(t)), s.evalIndex = t.evalIndex;
|
|
612
612
|
return s;
|
|
613
613
|
}
|
|
614
614
|
});
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
617
|
-
return new t(
|
|
615
|
+
if (k === A) return this;
|
|
616
|
+
const N = $e(l.runtime, l.symbols, k, !1, l.error, l.getFunction);
|
|
617
|
+
return new t(N, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
|
|
618
618
|
}
|
|
619
619
|
reanchorReferences(e, n) {
|
|
620
|
-
const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(
|
|
620
|
+
const r = this._compiled, o = this._gridId, s = this._compiled.symbols.bind(Bt.Sheet, e), l = r.transform((t, e) => {
|
|
621
621
|
if (!t || !t.isReference) return;
|
|
622
|
-
if (t.type !==
|
|
622
|
+
if (t.type !== At.Cell) return;
|
|
623
623
|
if (Oe(e) && e.inputs?.[0] !== t) return;
|
|
624
624
|
let r;
|
|
625
625
|
const l = t.value.scope;
|
|
@@ -631,7 +631,7 @@ var Sn = class e {
|
|
|
631
631
|
if (e === n) return this;
|
|
632
632
|
const r = this._compiled, o = r.transform((t, r) => {
|
|
633
633
|
if (!t || !t.isReference) return;
|
|
634
|
-
if (t.type !==
|
|
634
|
+
if (t.type !== At.Cell) return;
|
|
635
635
|
if (Oe(r) && r.inputs?.[0] !== t) return;
|
|
636
636
|
if (t.value.scope !== e) return;
|
|
637
637
|
const o = { ...t };
|
|
@@ -641,7 +641,7 @@ var Sn = class e {
|
|
|
641
641
|
}
|
|
642
642
|
replaceTableReferences(e, n) {
|
|
643
643
|
const r = this._compiled, o = r.transform((t) => {
|
|
644
|
-
if (t?.type !==
|
|
644
|
+
if (t?.type !== At.TableReference) return;
|
|
645
645
|
const r = t.value;
|
|
646
646
|
if ("object" != typeof r || r?.tableId !== e) return;
|
|
647
647
|
const o = n(r);
|
|
@@ -654,7 +654,7 @@ var Sn = class e {
|
|
|
654
654
|
if (o.activeNames.has(r)) return I.BuiltIn.Ref;
|
|
655
655
|
const s = this._resolvers?.getNamedFormulaBlock?.(r);
|
|
656
656
|
if (!s) {
|
|
657
|
-
const t = this._compiled, e = t.symbols?.resolve(
|
|
657
|
+
const t = this._compiled, e = t.symbols?.resolve(Bt.NamedFormula, r), n = e ? e.toString() : r, o = t.getFunction?.(n) ?? null;
|
|
658
658
|
return o ? new vn(o) : I.BuiltIn.Name;
|
|
659
659
|
}
|
|
660
660
|
const l = o.gridId, i = o.rowIndex, a = o.colIndex;
|
|
@@ -694,15 +694,15 @@ var Sn = class e {
|
|
|
694
694
|
f[r.index] = t;
|
|
695
695
|
continue;
|
|
696
696
|
}
|
|
697
|
-
if (o ===
|
|
697
|
+
if (o === At.Named) {
|
|
698
698
|
f[r.index] = this._resolveNamedPrecedents(r.node.value, t, e);
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
701
|
-
if (o ===
|
|
702
|
-
f[r.index] =
|
|
701
|
+
if (o === At.Error) {
|
|
702
|
+
f[r.index] = tt(r.node.value);
|
|
703
703
|
continue;
|
|
704
704
|
}
|
|
705
|
-
if (o ===
|
|
705
|
+
if (o === At.TableReference) {
|
|
706
706
|
const n = r.node.value;
|
|
707
707
|
let o;
|
|
708
708
|
n && (o = this._resolveStructuredRef(n, t, e)), o || (o = I.BuiltIn.Ref), f[r.index] = o;
|
|
@@ -729,13 +729,13 @@ var Sn = class e {
|
|
|
729
729
|
else {
|
|
730
730
|
if (" " === o) {
|
|
731
731
|
const t = l.scope ? a.scope ? null : l.scope : a.scope;
|
|
732
|
-
i = t && this._gridId && t !== this._gridId ? I.BuiltIn.Value :
|
|
733
|
-
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i =
|
|
732
|
+
i = t && this._gridId && t !== this._gridId ? I.BuiltIn.Value : xe(l, a);
|
|
733
|
+
} else if (":" === o || ".:." === o || ":." === o || ".:" === o) i = It(l, a);
|
|
734
734
|
else if ("," === o) {
|
|
735
735
|
const t = s.length;
|
|
736
736
|
for (let e = 0; e < t; e++) {
|
|
737
737
|
const t = f[s[e]];
|
|
738
|
-
void 0 === t || Array.isArray(t) || I.isError(t) || (i = i ?
|
|
738
|
+
void 0 === t || Array.isArray(t) || I.isError(t) || (i = i ? It(i, t) : t);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
f[r.index] = i ?? I.BuiltIn.Null;
|
|
@@ -762,7 +762,7 @@ var Sn = class e {
|
|
|
762
762
|
const s = e.op;
|
|
763
763
|
let h, u = null;
|
|
764
764
|
if (s) {
|
|
765
|
-
if (s ===
|
|
765
|
+
if (s === At.Error) h = tt(e.node.value);
|
|
766
766
|
else if (":" === s || ".:." === s || ":." === s || ".:" === s) {
|
|
767
767
|
const t = e.inputs;
|
|
768
768
|
if (t && 2 === t.length) {
|
|
@@ -791,7 +791,7 @@ var Sn = class e {
|
|
|
791
791
|
let s = this._compiled;
|
|
792
792
|
if (void 0 !== n) {
|
|
793
793
|
let r;
|
|
794
|
-
if (
|
|
794
|
+
if (Et(s.ast, (t) => {
|
|
795
795
|
t.evalIndex === n && (r = t);
|
|
796
796
|
}), !r) throw new Error(`Invalid evalIndex: ${n}`);
|
|
797
797
|
if (s.bindings.length > 0 && !s.error) {
|
|
@@ -808,13 +808,13 @@ var Sn = class e {
|
|
|
808
808
|
const a = s.referencesExecute, c = s.referencesRelative, d = s.referencesAbsolute, h = a.length;
|
|
809
809
|
for (let n = 0; n < h; n++) {
|
|
810
810
|
const r = a[n], s = r.op, i = r.node;
|
|
811
|
-
if (s) if (s ===
|
|
811
|
+
if (s) if (s === At.Named) if (r.node.deferredResolve) l[r.node.evalIndex] = null;
|
|
812
812
|
else {
|
|
813
813
|
const n = r.node.value;
|
|
814
814
|
l[r.node.evalIndex] = this._evaluateNamed(n, t, e);
|
|
815
815
|
}
|
|
816
|
-
else if (s ===
|
|
817
|
-
else if (s ===
|
|
816
|
+
else if (s === At.Error) l[i.evalIndex] = tt(r.node.value);
|
|
817
|
+
else if (s === At.TableReference) {
|
|
818
818
|
const n = r.node.value;
|
|
819
819
|
let s;
|
|
820
820
|
s = n ? this._resolveStructuredRef(n, t, e) : I.BuiltIn.Ref, I.isError(s) || void 0 === s?.colStart ? l[i.evalIndex] = s ?? I.BuiltIn.Ref : l[i.evalIndex] = o.getReference(s);
|
|
@@ -830,41 +830,41 @@ var Sn = class e {
|
|
|
830
830
|
const o = this._compiled, s = o.ast;
|
|
831
831
|
if (!s || !s.isReference) return this;
|
|
832
832
|
if ("cell" === s.type) return this;
|
|
833
|
-
if (s.type ===
|
|
833
|
+
if (s.type === At.Error) return this;
|
|
834
834
|
if ("@" === s.value) return this;
|
|
835
835
|
if (!r) return this;
|
|
836
|
-
const l =
|
|
836
|
+
const l = ke(n) + wt(e);
|
|
837
837
|
if (r.has(l)) return this;
|
|
838
|
-
const i =
|
|
838
|
+
const i = P("@", s, !0), a = $e(o.runtime, o.symbols, i, !1, o.error, o.getFunction);
|
|
839
839
|
return new t(a, this._context, this._calcScope, this._gridId, this._getEntireCoords, this._resolvers);
|
|
840
840
|
}
|
|
841
841
|
_executeNode(t, e, n, r, o = null) {
|
|
842
842
|
const s = this._context, l = t.inputs, i = l ? l.length : 0, a = t.type;
|
|
843
843
|
let c;
|
|
844
844
|
switch (a) {
|
|
845
|
-
case
|
|
845
|
+
case At.Infix: {
|
|
846
846
|
const n = t.value;
|
|
847
847
|
let r = e[l[0].evalIndex], o = e[l[1].evalIndex];
|
|
848
848
|
if (!0 === t.firstCell && !t.isReference && this._demandsFirstCell() && (r = An(r), o = An(o)), ("+" === n || "-" === n) && (r = Rn(s, r), "number" == typeof r && (o = Rn(s, o), "number" == typeof o))) {
|
|
849
849
|
const e = "+" === n ? r + o : r - o;
|
|
850
|
-
return
|
|
850
|
+
return rt(!0 === t.snapsCancellation ? it(e, r) : e, null);
|
|
851
851
|
}
|
|
852
852
|
if (!t.isReference) {
|
|
853
853
|
if (r && I.isError(r)) return r;
|
|
854
854
|
if (o && I.isError(o)) return o;
|
|
855
855
|
}
|
|
856
856
|
const i = t.fn ?? (t.fn = !0 === t.snapsCancellation ? ze[t.value] : je[t.value]);
|
|
857
|
-
return c = i ? i(s, r, o) : I.BuiltIn.Value, c =
|
|
857
|
+
return c = i ? i(s, r, o) : I.BuiltIn.Value, c = rt(c, null), c;
|
|
858
858
|
}
|
|
859
|
-
case
|
|
859
|
+
case At.Function: {
|
|
860
860
|
const s = t.binder;
|
|
861
861
|
if (void 0 !== s) return "let" === s.kind ? e[l[i - 1].evalIndex] : this._createLambdaValue(t, e, o, n, r);
|
|
862
862
|
if (!0 === t.hasLazyArgs) {
|
|
863
|
-
const s =
|
|
863
|
+
const s = ee.enter();
|
|
864
864
|
try {
|
|
865
|
-
this._fillLazyArgs(l, i, e, o, n, r, s), !0 === t.passOmitted && Dn(l, i), c = this._callFunction(t, Fn, i), c instanceof
|
|
865
|
+
this._fillLazyArgs(l, i, e, o, n, r, s), !0 === t.passOmitted && Dn(l, i), c = this._callFunction(t, Fn, i), c instanceof ee && (c = c._force());
|
|
866
866
|
} finally {
|
|
867
|
-
|
|
867
|
+
ee.leave(s);
|
|
868
868
|
}
|
|
869
869
|
} else {
|
|
870
870
|
for (let t = 0; t < i; t++) Fn[t] = e[l[t].evalIndex];
|
|
@@ -872,22 +872,22 @@ var Sn = class e {
|
|
|
872
872
|
}
|
|
873
873
|
return c;
|
|
874
874
|
}
|
|
875
|
-
case
|
|
876
|
-
case
|
|
875
|
+
case At.Prefix:
|
|
876
|
+
case At.Postfix: {
|
|
877
877
|
let n = e[l[0].evalIndex];
|
|
878
878
|
if (!0 === t.firstCell && !t.isReference && "@" !== t.value && this._demandsFirstCell() && (n = An(n)), n && I.isError(n)) return n;
|
|
879
|
-
const r = t.fn ?? (t.fn = a ===
|
|
879
|
+
const r = t.fn ?? (t.fn = a === At.Prefix ? Ke[t.value] : Le[t.value]);
|
|
880
880
|
return c = r ? r(s, n) : I.BuiltIn.Value, c;
|
|
881
881
|
}
|
|
882
|
-
case
|
|
883
|
-
case
|
|
882
|
+
case At.List:
|
|
883
|
+
case At.Paren: {
|
|
884
884
|
if (1 === i) return e[l[0].evalIndex];
|
|
885
885
|
for (let t = 0; t < i; t++) {
|
|
886
886
|
const n = e[l[t].evalIndex];
|
|
887
|
-
if (null !== n && "object" == typeof n &&
|
|
887
|
+
if (null !== n && "object" == typeof n && ut(n.scope)) return I.BuiltIn.Name;
|
|
888
888
|
}
|
|
889
889
|
let t = !1;
|
|
890
|
-
for (let n = 0; n < i; n++) if (
|
|
890
|
+
for (let n = 0; n < i; n++) if (_t(e[l[n].evalIndex])) {
|
|
891
891
|
t = !0;
|
|
892
892
|
break;
|
|
893
893
|
}
|
|
@@ -895,17 +895,17 @@ var Sn = class e {
|
|
|
895
895
|
const t = [];
|
|
896
896
|
for (let n = 0; n < i; n++) {
|
|
897
897
|
const r = e[l[n].evalIndex];
|
|
898
|
-
|
|
898
|
+
_t(r) ? t.push(...r) : t.push(r);
|
|
899
899
|
}
|
|
900
|
-
const n =
|
|
900
|
+
const n = ge(t.length);
|
|
901
901
|
for (let e = 0; e < t.length; e++) n[e] = t[e];
|
|
902
902
|
return n;
|
|
903
903
|
}
|
|
904
|
-
const n =
|
|
904
|
+
const n = ge(i);
|
|
905
905
|
for (let t = 0; t < i; t++) n[t] = e[l[t].evalIndex];
|
|
906
906
|
return n;
|
|
907
907
|
}
|
|
908
|
-
case
|
|
908
|
+
case At.Named: {
|
|
909
909
|
const s = t.binding;
|
|
910
910
|
if (void 0 !== s) {
|
|
911
911
|
const n = this._compiled.bindings[s.slot];
|
|
@@ -921,12 +921,12 @@ var Sn = class e {
|
|
|
921
921
|
}
|
|
922
922
|
return !0 === t.deferredResolve ? this._evaluateNamed(t.value, n, r) : e[t.evalIndex] ?? null;
|
|
923
923
|
}
|
|
924
|
-
case
|
|
925
|
-
case
|
|
924
|
+
case At.TableReference: return e[t.evalIndex] ?? null;
|
|
925
|
+
case At.Call: {
|
|
926
926
|
const n = e[l[0].evalIndex];
|
|
927
927
|
return n && I.isError(n) ? n : (c = this._applyCallee(n, t, e), c);
|
|
928
928
|
}
|
|
929
|
-
case
|
|
929
|
+
case At.Empty: return;
|
|
930
930
|
}
|
|
931
931
|
var d;
|
|
932
932
|
}
|
|
@@ -936,7 +936,7 @@ var Sn = class e {
|
|
|
936
936
|
const e = t[r];
|
|
937
937
|
if (!0 === e?.lazyArg) continue;
|
|
938
938
|
const o = n[e.evalIndex];
|
|
939
|
-
!a && (!0 === o?.isIRange ? o.size > 1 :
|
|
939
|
+
!a && (!0 === o?.isIRange ? o.size > 1 : _t(o)) && (a = !0);
|
|
940
940
|
}
|
|
941
941
|
if (a) {
|
|
942
942
|
i = [];
|
|
@@ -947,7 +947,7 @@ var Sn = class e {
|
|
|
947
947
|
}
|
|
948
948
|
for (let a = 0; a < e; a++) {
|
|
949
949
|
const e = t[a];
|
|
950
|
-
Fn[a] = !0 === e?.lazyArg ? i ? i[a] :
|
|
950
|
+
Fn[a] = !0 === e?.lazyArg ? i ? i[a] : ee.deferred(l, a, this, e, n, r, o, s) : n[e.evalIndex];
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
_createLambdaValue(t, e, n, r, o) {
|
|
@@ -972,17 +972,17 @@ var Sn = class e {
|
|
|
972
972
|
if (o > e.length || o < s) return I.BuiltIn.Value;
|
|
973
973
|
const l = new Map(t.frame ?? void 0);
|
|
974
974
|
for (let t = 0; t < e.length; t++) {
|
|
975
|
-
const s = e[t], i = t >= o || r[t + 1]?.type ===
|
|
975
|
+
const s = e[t], i = t >= o || r[t + 1]?.type === At.Empty;
|
|
976
976
|
l.set(s.slot, i ? xn : n[r[t + 1].evalIndex]);
|
|
977
977
|
}
|
|
978
978
|
return t.owner._evaluateBody(t, l);
|
|
979
979
|
}
|
|
980
980
|
if (t instanceof vn) {
|
|
981
981
|
const e = [];
|
|
982
|
-
for (let t = 1; t < r.length; t++) e.push(r[t]?.type ===
|
|
982
|
+
for (let t = 1; t < r.length; t++) e.push(r[t]?.type === At.Empty ? void 0 : n[r[t].evalIndex]);
|
|
983
983
|
return this._dispatchFunction(t.fn, e, e.length);
|
|
984
984
|
}
|
|
985
|
-
return t && (t.isIRange || void 0 !== t.colStart) ? I.BuiltIn.Ref : I.BuiltIn.Value;
|
|
985
|
+
return t && (t.isIRange || void 0 !== t.colStart) || "boolean" == typeof t ? I.BuiltIn.Ref : I.BuiltIn.Value;
|
|
986
986
|
}
|
|
987
987
|
_applyValues(t, e) {
|
|
988
988
|
const n = t.params;
|
|
@@ -995,7 +995,7 @@ var Sn = class e {
|
|
|
995
995
|
o.set(n[t].slot, void 0 === r ? xn : r);
|
|
996
996
|
}
|
|
997
997
|
const s = this._evaluateBody(t, o);
|
|
998
|
-
return
|
|
998
|
+
return rt(s, this._context);
|
|
999
999
|
}
|
|
1000
1000
|
_evaluateBody(t, e) {
|
|
1001
1001
|
const n = this._calcScope;
|
|
@@ -1019,7 +1019,7 @@ var Sn = class e {
|
|
|
1019
1019
|
return this._runList(s, e, r, o, n), e[t.evalIndex];
|
|
1020
1020
|
} catch (t) {
|
|
1021
1021
|
if (I.isError(t)) return t;
|
|
1022
|
-
if (
|
|
1022
|
+
if (he(t)) throw t;
|
|
1023
1023
|
return t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t });
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
@@ -1032,7 +1032,7 @@ var Sn = class e {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
_listWithin(t) {
|
|
1034
1034
|
let e;
|
|
1035
|
-
|
|
1035
|
+
Et(this._compiled.ast, (n, r, o) => {
|
|
1036
1036
|
if (n === t) {
|
|
1037
1037
|
for (let t = o.length - 1; t >= 0; t--) if (void 0 !== o[t].deferred) {
|
|
1038
1038
|
e = o[t];
|
|
@@ -1041,7 +1041,7 @@ var Sn = class e {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
});
|
|
1043
1043
|
const n = /* @__PURE__ */ new Set();
|
|
1044
|
-
|
|
1044
|
+
Et(t, (t) => {
|
|
1045
1045
|
n.add(t);
|
|
1046
1046
|
});
|
|
1047
1047
|
const r = e?.deferred?.filter((t) => n.has(t)) ?? [];
|
|
@@ -1081,7 +1081,7 @@ var Sn = class e {
|
|
|
1081
1081
|
try {
|
|
1082
1082
|
r = t.execute();
|
|
1083
1083
|
} catch (t) {
|
|
1084
|
-
if (
|
|
1084
|
+
if (he(t)) throw t;
|
|
1085
1085
|
r = Gn(t);
|
|
1086
1086
|
}
|
|
1087
1087
|
s.argsValues = null, s.argsLength = 0;
|
|
@@ -1111,7 +1111,7 @@ var Sn = class e {
|
|
|
1111
1111
|
r = t.execute(...o);
|
|
1112
1112
|
}
|
|
1113
1113
|
} catch (t) {
|
|
1114
|
-
if (
|
|
1114
|
+
if (he(t)) throw t;
|
|
1115
1115
|
r = Gn(t);
|
|
1116
1116
|
}
|
|
1117
1117
|
const l = this._calcScope;
|
|
@@ -1123,7 +1123,7 @@ var Sn = class e {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
finalizeValue(t) {
|
|
1125
1125
|
const e = this._context;
|
|
1126
|
-
if (
|
|
1126
|
+
if (jt(t)) return I.BuiltIn.Calc;
|
|
1127
1127
|
if (p(t)) return I.BuiltIn.Calc;
|
|
1128
1128
|
if (t && void 0 !== t.colStart) try {
|
|
1129
1129
|
if (t.scope) {
|
|
@@ -1132,13 +1132,13 @@ var Sn = class e {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
t = e.getValueAt(t.rowStart, t.colStart, t.scope);
|
|
1134
1134
|
} catch (t) {
|
|
1135
|
-
if (
|
|
1135
|
+
if (he(t)) throw t;
|
|
1136
1136
|
return I.isError(t) ? t : new I.Value(t?.message, { cause: t });
|
|
1137
1137
|
}
|
|
1138
1138
|
if (Array.isArray(t) && t.isSheetSpan) return I.BuiltIn.Ref;
|
|
1139
1139
|
if (Array.isArray(t)) {
|
|
1140
|
-
if (
|
|
1141
|
-
const e =
|
|
1140
|
+
if (_t(t)) {
|
|
1141
|
+
const e = ge(t.length);
|
|
1142
1142
|
for (let n = 0; n < t.length; n++) e[n] = this.finalizeValue(t[n]);
|
|
1143
1143
|
return e;
|
|
1144
1144
|
}
|
|
@@ -1150,7 +1150,7 @@ var Sn = class e {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
var n;
|
|
1153
|
-
return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t =
|
|
1153
|
+
return t?.isIRange ? t.size <= 1 ? (t = 0 === t.size ? null : t.getValueAt(0, 0, Mn), null === (t = rt(t, e)) && (t = 0)) : (n = t, Cn.has(n) || (t = t.fillEmpty(0))) : null === (t = rt(t, e)) && (t = 0), t;
|
|
1154
1154
|
}
|
|
1155
1155
|
finalizeValueForCell(t) {
|
|
1156
1156
|
const e = this.finalizeValue(t);
|
|
@@ -1160,7 +1160,7 @@ var Sn = class e {
|
|
|
1160
1160
|
const t = this._compiled;
|
|
1161
1161
|
if (t.error) return t.error.toString();
|
|
1162
1162
|
const e = this._calcScope;
|
|
1163
|
-
return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) :
|
|
1163
|
+
return e?.node ? this.getTextAt(e.node.rowIndex, e.node.colIndex) : Vt(t.getTokens(), null);
|
|
1164
1164
|
}
|
|
1165
1165
|
get [Symbol.toStringTag]() {
|
|
1166
1166
|
return "[FormulaBlock]";
|
|
@@ -1203,15 +1203,15 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1203
1203
|
} else r[o] = c;
|
|
1204
1204
|
return s && (s[o] = d), l && (l[o] = h), o + 1;
|
|
1205
1205
|
}, Mn = Object.freeze({ type: null }), Fn = new Array(255), Dn = (t, e) => {
|
|
1206
|
-
for (let n = 0; n < e; n++) t[n]?.type ===
|
|
1206
|
+
for (let n = 0; n < e; n++) t[n]?.type === At.Empty && (Fn[n] = xn);
|
|
1207
1207
|
}, Tn = (t) => {
|
|
1208
1208
|
const e = { ...t };
|
|
1209
1209
|
return delete e.inLazy, delete e.lazyArg, delete e.hasLazyArgs, delete e.deferred, t.inputs && (e.inputs = t.inputs.map((t) => t ? Tn(t) : t)), e;
|
|
1210
|
-
}, Gn = (t) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn =
|
|
1210
|
+
}, Gn = (t) => I.isError(t) ? t : t instanceof RangeError ? I.BuiltIn.Num : new I.Value(t?.message, { cause: t }), Bn = R(4096), Vn = 0, On = () => Bn, Pn = (t, e) => {
|
|
1211
1211
|
if (0 === e) return void (t.inputsAt = -1);
|
|
1212
1212
|
const n = Vn, r = n + e;
|
|
1213
1213
|
if (r > Bn.length) {
|
|
1214
|
-
const t =
|
|
1214
|
+
const t = R(Math.max(r, 2 * Bn.length));
|
|
1215
1215
|
for (let e = 0; e < n; e++) t[e] = Bn[e];
|
|
1216
1216
|
Bn = t;
|
|
1217
1217
|
}
|
|
@@ -1375,7 +1375,7 @@ var Nn = (t, e, n, r, o, s, l) => {
|
|
|
1375
1375
|
return new ur(t, r, o, s, l);
|
|
1376
1376
|
}, pr = class t {
|
|
1377
1377
|
static create(e, n, r, o) {
|
|
1378
|
-
const s =
|
|
1378
|
+
const s = se.peek();
|
|
1379
1379
|
if (!s) throw new Error("The sdk WebAssembly is not loaded.");
|
|
1380
1380
|
const l = (e ?? n)?.getRowCount() ?? 0;
|
|
1381
1381
|
if ((e?.getColumnCount() ?? 0) > 32 || (n?.getColumnCount() ?? 0) > 32) throw I.BuiltIn.Value;
|
|
@@ -1784,7 +1784,7 @@ var Kr = {
|
|
|
1784
1784
|
return void 0 === o && (o = this._newNode(t, e, this.gridId, null), r.setValueAt(t, e, o)), o;
|
|
1785
1785
|
}
|
|
1786
1786
|
_newSparseStore() {
|
|
1787
|
-
const t = new
|
|
1787
|
+
const t = new Z({ axis: E.Axis.Column }), e = this._anchor;
|
|
1788
1788
|
return null !== e && t.setValueAt(e.rowIndex, e.colIndex, e), this._nodes = t, t;
|
|
1789
1789
|
}
|
|
1790
1790
|
_mintDense() {
|
|
@@ -1846,7 +1846,7 @@ var Kr = {
|
|
|
1846
1846
|
if (l > i || a > c) return;
|
|
1847
1847
|
const d = this.gridId;
|
|
1848
1848
|
let h = null;
|
|
1849
|
-
for (let t = a; t <= c; t++) for (let e = l; e <= i; e++) void 0 === o.getValueAt(e, t) && (null === h && (h = new
|
|
1849
|
+
for (let t = a; t <= c; t++) for (let e = l; e <= i; e++) void 0 === o.getValueAt(e, t) && (null === h && (h = new st.Builder()), h.pushAt(t, e, this._newNode(e, t, d, null)));
|
|
1850
1850
|
if (null !== h) {
|
|
1851
1851
|
const t = h.build();
|
|
1852
1852
|
t && o.setValues(t.tuples);
|
|
@@ -1889,7 +1889,7 @@ var Kr = {
|
|
|
1889
1889
|
continue;
|
|
1890
1890
|
}
|
|
1891
1891
|
kn(i, t, e, Kr), kn(c, t, e, Jr);
|
|
1892
|
-
const d =
|
|
1892
|
+
const d = It(Kr, Jr, a);
|
|
1893
1893
|
o[n] = d ?? I.BuiltIn.Null;
|
|
1894
1894
|
}
|
|
1895
1895
|
return this._scratchRow = t, this._scratchCol = e, o;
|
|
@@ -1980,8 +1980,8 @@ var Kr = {
|
|
|
1980
1980
|
densify() {
|
|
1981
1981
|
if (!this._sparse) return;
|
|
1982
1982
|
if (this._sparse = !1, null === this._nodes) return;
|
|
1983
|
-
const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s =
|
|
1984
|
-
for (let t = 0; t < r; t++) s[t] =
|
|
1983
|
+
const t = this.ref, e = t.rowStart, n = t.colStart, r = t.rowEnd - e + 1, o = t.colEnd - n + 1, s = ge(r);
|
|
1984
|
+
for (let t = 0; t < r; t++) s[t] = ge(o);
|
|
1985
1985
|
this.forEachNode((t) => {
|
|
1986
1986
|
s[t.rowIndex - e][t.colIndex - n] = t;
|
|
1987
1987
|
});
|
|
@@ -1997,9 +1997,9 @@ var Kr = {
|
|
|
1997
1997
|
if (!t) return [[this._newNode(s, o, e, r.EmptyArray)]];
|
|
1998
1998
|
const l = this._template, i = null !== l, a = i ? null : t.resolvedPrecedentsAt(s, o), c = i ? l.relative.length : a?.length ?? 0;
|
|
1999
1999
|
this.paramLength = c;
|
|
2000
|
-
const d =
|
|
2000
|
+
const d = ge(n.rowEnd - s + 1), h = n.colEnd - o + 1, u = d.length;
|
|
2001
2001
|
for (let n = 0; n < u; n++) {
|
|
2002
|
-
const l =
|
|
2002
|
+
const l = ge(h), u = l.length;
|
|
2003
2003
|
for (let d = 0; d < u; d++) {
|
|
2004
2004
|
const h = n + s, u = d + o, _ = i ? null : 0 === c ? r.EmptyArray : 0 === n && 0 === d ? a : t.resolvedPrecedentsAt(h, u);
|
|
2005
2005
|
l[d] = this._newNode(h, u, e, _);
|
|
@@ -2087,7 +2087,7 @@ var Kr = {
|
|
|
2087
2087
|
const t = e.originRow, o = e.originCol;
|
|
2088
2088
|
if (0 === o && n.colEnd - n.colStart + 1 === a) c = 0 === t && r.length === i ? r : r.slice(t, t + i);
|
|
2089
2089
|
else {
|
|
2090
|
-
c =
|
|
2090
|
+
c = ge(i);
|
|
2091
2091
|
for (let e = 0; e < i; e++) c[e] = r[e + t].slice(o, o + a);
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
@@ -2102,9 +2102,9 @@ var Kr = {
|
|
|
2102
2102
|
}
|
|
2103
2103
|
return c;
|
|
2104
2104
|
}
|
|
2105
|
-
const d = this.gridId, h =
|
|
2105
|
+
const d = this.gridId, h = ge(i);
|
|
2106
2106
|
for (let e = 0; e < i; e++) {
|
|
2107
|
-
const n =
|
|
2107
|
+
const n = ge(a);
|
|
2108
2108
|
h[e] = n;
|
|
2109
2109
|
const s = e + r;
|
|
2110
2110
|
for (let r = 0; r < a; r++) {
|
|
@@ -2121,7 +2121,7 @@ var Kr = {
|
|
|
2121
2121
|
if (null !== a && 0 === l.originRow && 0 === l.originCol && i.rowStart === n && i.colStart === r && i.rowEnd === e.rowEnd && i.colEnd === e.colEnd) return t._nodes = null, this._nodes = a, void this.forEachNode((t) => {
|
|
2122
2122
|
this._adoptNode(t, t.rowIndex, t.colIndex, null);
|
|
2123
2123
|
});
|
|
2124
|
-
const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new
|
|
2124
|
+
const c = i.rowStart + l.originRow, d = i.colStart + l.originCol, h = n - c, u = r - d, _ = new st.Builder();
|
|
2125
2125
|
t.forEachNodeIn(c, c + o - 1, d, d + s - 1, (t) => {
|
|
2126
2126
|
const e = t.rowIndex + h, n = t.colIndex + u;
|
|
2127
2127
|
this._adoptNode(t, e, n, null), _.pushAt(n, e, t);
|
|
@@ -2140,7 +2140,7 @@ var Kr = {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
if (0 === i.length) return;
|
|
2142
2142
|
i.sort(Wr);
|
|
2143
|
-
const a = new
|
|
2143
|
+
const a = new st.Builder();
|
|
2144
2144
|
for (let t = 0; t < i.length; t++) {
|
|
2145
2145
|
const e = i[t];
|
|
2146
2146
|
t > 0 && i[t - 1].rowIndex === e.rowIndex && i[t - 1].colIndex === e.colIndex || a.pushAt(e.colIndex, e.rowIndex, e);
|
|
@@ -2150,7 +2150,7 @@ var Kr = {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
toJSON(t = !1, e = this.ref) {
|
|
2152
2152
|
const n = e;
|
|
2153
|
-
return [
|
|
2153
|
+
return [lt(n), this.formula.getTextAt(n.rowStart, n.colStart, t)];
|
|
2154
2154
|
}
|
|
2155
2155
|
getCoords() {
|
|
2156
2156
|
return this.ref;
|
|
@@ -2545,12 +2545,12 @@ var Kr = {
|
|
|
2545
2545
|
const o = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), s = o && t > o.rowEnd + 1 ? {
|
|
2546
2546
|
...o,
|
|
2547
2547
|
rowEnd: t - 1
|
|
2548
|
-
} : o, l = new
|
|
2548
|
+
} : o, l = new Z({
|
|
2549
2549
|
axis: this._axis,
|
|
2550
2550
|
maxCoords: s
|
|
2551
2551
|
});
|
|
2552
2552
|
for (let t = 0; t < r; t++) l.setValueAt(e[t], 0, n[t]);
|
|
2553
|
-
return new
|
|
2553
|
+
return new x(this._runtime, l, {
|
|
2554
2554
|
colStart: 0,
|
|
2555
2555
|
rowStart: 0,
|
|
2556
2556
|
colEnd: 0,
|
|
@@ -2583,15 +2583,15 @@ var Kr = {
|
|
|
2583
2583
|
return this._calcScope.node ? this._container.evaluateWhatIf(t) : null;
|
|
2584
2584
|
}
|
|
2585
2585
|
async _initialize(t) {
|
|
2586
|
-
const e = await
|
|
2587
|
-
this._runtime = new
|
|
2586
|
+
const e = await Ee.assertUsable("calcs", 0), n = this._container, r = n.getRuntime();
|
|
2587
|
+
this._runtime = new Rt("Calculation Runtime", {
|
|
2588
2588
|
isDate1904: () => r.isDate1904(),
|
|
2589
2589
|
isR1C1: () => r.isR1C1(),
|
|
2590
2590
|
getNow: () => n.getNow(),
|
|
2591
2591
|
getRandom: () => r.getRandom(),
|
|
2592
2592
|
getLocale: () => r.getLocale()
|
|
2593
|
-
}, e), this._calcScope = n.getScope(), this._coerceToNumber =
|
|
2594
|
-
const { initializeFunctions: o } = await import("./
|
|
2593
|
+
}, e), this._calcScope = n.getScope(), this._coerceToNumber = Wt(this._runtime, m.Number, kt);
|
|
2594
|
+
const { initializeFunctions: o } = await import("./PiFW6uPRJABzK3V1.js"), s = this, l = Object.freeze(o(() => s, this._functionProviders)), a = new j({
|
|
2595
2595
|
transactions: t ?? new i({ transient: !0 }),
|
|
2596
2596
|
context: this,
|
|
2597
2597
|
readonlyFunctions: l,
|
|
@@ -2600,7 +2600,7 @@ var Kr = {
|
|
|
2600
2600
|
return this._functions = a, { functions: a };
|
|
2601
2601
|
}
|
|
2602
2602
|
_createScoped(e) {
|
|
2603
|
-
const n = this._container, r = n.getSymbols().bind(
|
|
2603
|
+
const n = this._container, r = n.getSymbols().bind(Bt.Sheet, e);
|
|
2604
2604
|
if (!r || !n.getGrid(r)) return null;
|
|
2605
2605
|
const o = new t(n, this._axis, this._functionProviders);
|
|
2606
2606
|
return o._runtime = this._runtime, o._functions = this._functions, o._coerceToNumber = this._coerceToNumber, o._instanceScope = this._instanceScope, o._calcScope = {
|
|
@@ -2642,7 +2642,7 @@ var Kr = {
|
|
|
2642
2642
|
}, t;
|
|
2643
2643
|
}
|
|
2644
2644
|
getFunction(t) {
|
|
2645
|
-
const e =
|
|
2645
|
+
const e = Qt(t);
|
|
2646
2646
|
if (void 0 !== e) {
|
|
2647
2647
|
const t = this._functions.getByName(e);
|
|
2648
2648
|
if (t && !t.isLambda()) return t;
|
|
@@ -2665,7 +2665,7 @@ var Kr = {
|
|
|
2665
2665
|
getFormulaAt(t, e, n) {
|
|
2666
2666
|
const r = this._container;
|
|
2667
2667
|
let o;
|
|
2668
|
-
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(
|
|
2668
|
+
if (this._calcScope.perCellRead = !0, o = n ? r.getSymbols().bind(Bt.Sheet, n) : this._calcScope.gridId, !o) return null;
|
|
2669
2669
|
const s = r.getFormulas();
|
|
2670
2670
|
if (!s) return null;
|
|
2671
2671
|
ho.colStart = e, ho.rowStart = t, ho.colEnd = e, ho.rowEnd = t, ho.scope = o;
|
|
@@ -2681,15 +2681,15 @@ var Kr = {
|
|
|
2681
2681
|
defer(t, e) {
|
|
2682
2682
|
if ("function" != typeof t) throw new I.Value("defer needs an executor function");
|
|
2683
2683
|
const n = this._container.getDeferred?.();
|
|
2684
|
-
if (n) return
|
|
2685
|
-
|
|
2684
|
+
if (n) return pt(n.defer(t, e, _e(), z())), n.previous;
|
|
2685
|
+
pt(null);
|
|
2686
2686
|
}
|
|
2687
2687
|
formatResults(t) {
|
|
2688
2688
|
const e = this._calcScope.node;
|
|
2689
2689
|
e && (e.numFmt = t);
|
|
2690
2690
|
}
|
|
2691
2691
|
filterHidden(t, e) {
|
|
2692
|
-
if (!(t?.isIReferenceRange && t instanceof
|
|
2692
|
+
if (!(t?.isIReferenceRange && t instanceof ue)) return t;
|
|
2693
2693
|
const n = t.getCoords(), r = this._gridIdOf(n), o = r ? this._container.getGrid(r) : null;
|
|
2694
2694
|
if (!o) return t;
|
|
2695
2695
|
if (e?.onlyWhileFiltered && !o.isFiltered()) return t;
|
|
@@ -2700,7 +2700,7 @@ var Kr = {
|
|
|
2700
2700
|
}) : t;
|
|
2701
2701
|
}
|
|
2702
2702
|
_gridIdOf(t) {
|
|
2703
|
-
return t.scope ? this._container.getSymbols().bind(
|
|
2703
|
+
return t.scope ? this._container.getSymbols().bind(Bt.Sheet, t.scope) : this._calcScope.gridId;
|
|
2704
2704
|
}
|
|
2705
2705
|
filterTotals(t) {
|
|
2706
2706
|
const e = t;
|
|
@@ -2744,7 +2744,7 @@ var Kr = {
|
|
|
2744
2744
|
const n = t?.getCoords()?.scope;
|
|
2745
2745
|
if (n) e = n;
|
|
2746
2746
|
else {
|
|
2747
|
-
const t = this._container.getSymbols().resolve(
|
|
2747
|
+
const t = this._container.getSymbols().resolve(Bt.Sheet, this._calcScope.gridId);
|
|
2748
2748
|
e = t ? t.getName ? t.getName() ?? void 0 : t.toString() : void 0;
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
@@ -2794,30 +2794,30 @@ var Kr = {
|
|
|
2794
2794
|
const r = t.gridId;
|
|
2795
2795
|
if (r !== this._gridKeyId) {
|
|
2796
2796
|
this._gridKeyId = r;
|
|
2797
|
-
const t = null === r ? null : this._container.getSymbols().resolve(
|
|
2797
|
+
const t = null === r ? null : this._container.getSymbols().resolve(Bt.Sheet, r), n = t?.getName ? t.getName() : null;
|
|
2798
2798
|
this._gridKey = n ? e(n) : 0;
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
return s(this._passSeed, this._gridKey, t.rowIndex, t.colIndex, n);
|
|
2802
2802
|
}
|
|
2803
2803
|
compare(t, e, n) {
|
|
2804
|
-
return
|
|
2804
|
+
return ht.compare(t, e, this.getRuntime().getLocaleProfile(), n);
|
|
2805
2805
|
}
|
|
2806
2806
|
_fromTuples(t, e = null, n = !1, r = !1) {
|
|
2807
2807
|
if (!t) return null;
|
|
2808
|
-
const o =
|
|
2808
|
+
const o = Jt(t.bounds, !0), s = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), l = new Z({
|
|
2809
2809
|
axis: this._axis,
|
|
2810
2810
|
maxCoords: s
|
|
2811
2811
|
});
|
|
2812
2812
|
l.setValues(t.tuples);
|
|
2813
2813
|
let i = e ? { type: e } : void 0;
|
|
2814
|
-
return new
|
|
2814
|
+
return new x(this._runtime, l, o, i, n, r);
|
|
2815
2815
|
}
|
|
2816
2816
|
getValueAt(t, e, n = null, o) {
|
|
2817
2817
|
const s = this._container, l = this._calcScope;
|
|
2818
2818
|
let i, a;
|
|
2819
2819
|
if (n) {
|
|
2820
|
-
if (i = s.getSymbols().bind(
|
|
2820
|
+
if (i = s.getSymbols().bind(Bt.Sheet, n), ut(i)) return I.BuiltIn.Ref;
|
|
2821
2821
|
} else i = l.gridId;
|
|
2822
2822
|
if (!i) return I.BuiltIn.Ref;
|
|
2823
2823
|
const c = l.node, d = c ? en(c) : r.EmptyArray, h = d.length;
|
|
@@ -2836,12 +2836,12 @@ var Kr = {
|
|
|
2836
2836
|
} else a = l;
|
|
2837
2837
|
break;
|
|
2838
2838
|
}
|
|
2839
|
-
return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a =
|
|
2839
|
+
return void 0 === a && (this._onRead?.(i, t, e, t, e), a = s.getGridValues(i)?.getValueAt(t, e) ?? null, s.getDeferred?.()?.hasHolders() && (a = fe(a))), o && o.type, a;
|
|
2840
2840
|
}
|
|
2841
2841
|
getSpillAt(t, e, n) {
|
|
2842
2842
|
const r = this._container, o = this._calcScope;
|
|
2843
2843
|
let s;
|
|
2844
|
-
s = n ? r.getSymbols().bind(
|
|
2844
|
+
s = n ? r.getSymbols().bind(Bt.Sheet, n) : o.gridId;
|
|
2845
2845
|
const l = s === o.gridId ? null : s, i = r.getIncrementalUpdates(s)?.spillSpatial ?? r.getGrid(s)?.getSpills();
|
|
2846
2846
|
if (i) {
|
|
2847
2847
|
uo.rowStart = t, uo.colStart = e, uo.rowEnd = t, uo.colEnd = e, uo.scope = s;
|
|
@@ -2871,12 +2871,12 @@ var Kr = {
|
|
|
2871
2871
|
...r,
|
|
2872
2872
|
rowEnd: Math.max(r.rowEnd, t - 1),
|
|
2873
2873
|
colEnd: Math.max(r.colEnd, e - 1)
|
|
2874
|
-
} : r, s = new
|
|
2874
|
+
} : r, s = new Z({
|
|
2875
2875
|
axis: this._axis,
|
|
2876
2876
|
maxCoords: o
|
|
2877
2877
|
});
|
|
2878
|
-
let l = new
|
|
2879
|
-
return t > 0 && e > 0 && ("function" == typeof n ? (l = l.resize(t, e), l = l.map(n, fo)) : Array.isArray(n) ? (l = l.replace(n), l = l.resize(t, e)) : l = null != n ? new
|
|
2878
|
+
let l = new x(this._runtime, s, null, void 0, !1);
|
|
2879
|
+
return t > 0 && e > 0 && ("function" == typeof n ? (l = l.resize(t, e), l = l.map(n, fo)) : Array.isArray(n) ? (l = l.replace(n), l = l.resize(t, e)) : l = null != n ? new x(this._runtime, s, {
|
|
2880
2880
|
colStart: 0,
|
|
2881
2881
|
rowStart: 0,
|
|
2882
2882
|
colEnd: e - 1,
|
|
@@ -2905,7 +2905,7 @@ var Kr = {
|
|
|
2905
2905
|
const s = Array.isArray(t);
|
|
2906
2906
|
if (n = n ?? s, !s && void 0 !== t) {
|
|
2907
2907
|
const r = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords();
|
|
2908
|
-
return new
|
|
2908
|
+
return new x(this._runtime, new Sn(t, {
|
|
2909
2909
|
axis: this._axis,
|
|
2910
2910
|
maxCoords: r
|
|
2911
2911
|
}), {
|
|
@@ -2920,13 +2920,13 @@ var Kr = {
|
|
|
2920
2920
|
if (t[0]?.isIRange) throw I.BuiltIn.Value;
|
|
2921
2921
|
r = [t];
|
|
2922
2922
|
}
|
|
2923
|
-
const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(
|
|
2923
|
+
const l = this._axis, i = l === E.Axis.Column, a = this._fromTuples(N(r, i, Zt(0, 0, void 0, void 0, i), !0), e, n, !s);
|
|
2924
2924
|
if (a) return a;
|
|
2925
|
-
const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new
|
|
2925
|
+
const c = this._container.getGrid(this._calcScope.gridId)?.getEntireCoords(), d = new Z({
|
|
2926
2926
|
axis: l,
|
|
2927
2927
|
maxCoords: c
|
|
2928
2928
|
}), h = e ? { type: e } : void 0;
|
|
2929
|
-
return new
|
|
2929
|
+
return new x(this._runtime, d, o.EmptyRange, h, n);
|
|
2930
2930
|
}
|
|
2931
2931
|
getRow() {
|
|
2932
2932
|
const t = this._calcScope;
|
|
@@ -2958,7 +2958,7 @@ var Kr = {
|
|
|
2958
2958
|
const r = i?.();
|
|
2959
2959
|
let o;
|
|
2960
2960
|
try {
|
|
2961
|
-
let n =
|
|
2961
|
+
let n = xt(t, r, zt, () => {
|
|
2962
2962
|
throw I.BuiltIn.Ref;
|
|
2963
2963
|
}, e);
|
|
2964
2964
|
if (n.length > 1) throw I.BuiltIn.Ref;
|
|
@@ -2994,7 +2994,7 @@ var Kr = {
|
|
|
2994
2994
|
if (!t) throw I.BuiltIn.Ref;
|
|
2995
2995
|
let a = t.scope;
|
|
2996
2996
|
if (a) {
|
|
2997
|
-
if (a = r.getSymbols().bind(
|
|
2997
|
+
if (a = r.getSymbols().bind(Bt.Sheet, t.scope), !a) return I.BuiltIn.Ref;
|
|
2998
2998
|
const e = r.getSheetSpanIds?.(a) ?? null;
|
|
2999
2999
|
if (e) {
|
|
3000
3000
|
if (r.isGridless?.(e[0]) || r.isGridless?.(e[e.length - 1])) return I.BuiltIn.Name;
|
|
@@ -3011,7 +3011,7 @@ var Kr = {
|
|
|
3011
3011
|
scope: a
|
|
3012
3012
|
};
|
|
3013
3013
|
if (r.isGridless?.(a)) {
|
|
3014
|
-
const t = new
|
|
3014
|
+
const t = new Z({ axis: this._axis });
|
|
3015
3015
|
return this._toReference(t, e, void 0, a, !1, null);
|
|
3016
3016
|
}
|
|
3017
3017
|
t = e;
|
|
@@ -3032,7 +3032,7 @@ var Kr = {
|
|
|
3032
3032
|
else {
|
|
3033
3033
|
let n = e;
|
|
3034
3034
|
null !== n && n.isIRange && (n = n.getValueAt(0, 0));
|
|
3035
|
-
const r = new
|
|
3035
|
+
const r = new Z({
|
|
3036
3036
|
axis: this._axis,
|
|
3037
3037
|
maxCoords: i?.()
|
|
3038
3038
|
});
|
|
@@ -3054,7 +3054,7 @@ var Kr = {
|
|
|
3054
3054
|
_expandSheetSpan(t) {
|
|
3055
3055
|
if (null === t || "object" != typeof t || !0 === t.isIRange) return null;
|
|
3056
3056
|
const e = t;
|
|
3057
|
-
if (void 0 === e.colStart || !
|
|
3057
|
+
if (void 0 === e.colStart || !ut(e.scope)) return null;
|
|
3058
3058
|
const n = this._container, r = n.getSheetSpanIds?.(e.scope) ?? null;
|
|
3059
3059
|
if (!r) return null;
|
|
3060
3060
|
if (n.isGridless?.(r[0]) || n.isGridless?.(r[r.length - 1])) return null;
|
|
@@ -3076,7 +3076,7 @@ var Kr = {
|
|
|
3076
3076
|
const i = this._onRead ?? (s ? this._dynamicRead : null);
|
|
3077
3077
|
i && (t = new oo(t, o, i));
|
|
3078
3078
|
try {
|
|
3079
|
-
const n = new
|
|
3079
|
+
const n = new ue(this._runtime, t, e, void 0, r, this._container.resolveScope);
|
|
3080
3080
|
return n._setCoordsReadHook(this._positionRead), null !== l && n._setErrorIndex(null === i ? l : { hasErrorIn: (t) => (i(o, t.rowStart, t.colStart, t.rowEnd, t.colEnd), l.hasErrorIn(t)) }), n;
|
|
3081
3081
|
} catch (t) {
|
|
3082
3082
|
if (t instanceof n) throw I.BuiltIn.Ref;
|
|
@@ -3086,7 +3086,7 @@ var Kr = {
|
|
|
3086
3086
|
getAddress(t, e = !1) {
|
|
3087
3087
|
t || (this._calcScope.positionRead = !0, _o.rowIndex = this._calcScope.rowIndex, _o.colIndex = this._calcScope.colIndex, _o.scope = null, t = _o);
|
|
3088
3088
|
const n = this.getEntireCoords().scope;
|
|
3089
|
-
return void 0 !== t.colIndex ?
|
|
3089
|
+
return void 0 !== t.colIndex ? Ae(t, n, e) : le(t, n, e);
|
|
3090
3090
|
}
|
|
3091
3091
|
parseAsSerialDate(t, e) {
|
|
3092
3092
|
if (void 0 === t) return;
|
|
@@ -3143,7 +3143,7 @@ var Kr = {
|
|
|
3143
3143
|
return pr.create(t, e, this._createSparseColumn, n);
|
|
3144
3144
|
}
|
|
3145
3145
|
getPivotAt(t) {
|
|
3146
|
-
if (!(t instanceof
|
|
3146
|
+
if (!(t instanceof ue)) return null;
|
|
3147
3147
|
const e = t.getCoords(), n = this._gridIdOf(e), r = (n ? this._container.getGrid(n) : null)?.getPivots();
|
|
3148
3148
|
if (!r) return null;
|
|
3149
3149
|
for (let t = 0; t < r.length; t++) {
|
|
@@ -3157,16 +3157,16 @@ var Kr = {
|
|
|
3157
3157
|
return null;
|
|
3158
3158
|
}
|
|
3159
3159
|
parseAsLiteral(t) {
|
|
3160
|
-
return
|
|
3160
|
+
return v(t) ?? q(t);
|
|
3161
3161
|
}
|
|
3162
3162
|
toText(t) {
|
|
3163
|
-
return
|
|
3163
|
+
return D(t, this._runtime);
|
|
3164
3164
|
}
|
|
3165
3165
|
getRuntime() {
|
|
3166
3166
|
return this._runtime;
|
|
3167
3167
|
}
|
|
3168
3168
|
createRichData(t, e) {
|
|
3169
|
-
return
|
|
3169
|
+
return Pt.fromJSON({
|
|
3170
3170
|
type: t,
|
|
3171
3171
|
data: e
|
|
3172
3172
|
}, this._container.getRichDataContext?.());
|
|
@@ -3291,7 +3291,7 @@ function So(t, e, n) {
|
|
|
3291
3291
|
colEnd: a[1]
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
|
-
var wo = class extends
|
|
3294
|
+
var wo = class extends me {
|
|
3295
3295
|
constructor(t) {
|
|
3296
3296
|
const e = (t = { ...t }).container;
|
|
3297
3297
|
super({
|
|
@@ -3299,15 +3299,15 @@ var wo = class extends lt {
|
|
|
3299
3299
|
send: (t, n, r) => e.sendRequest(t, n, r),
|
|
3300
3300
|
calculation: t.calculation
|
|
3301
3301
|
}), this._touchedOthers = null, this._iterationId = 0, this._resized = null, this._hiddenRows = null, this._hiddenColumns = null, this._filtered = !1, this._pivots = null, this._demanded = [], this._isProcessingJSON = !1, this._snapshots = null, this._options = t, this._context = t.context, this._container = t.container;
|
|
3302
|
-
const n = { ...
|
|
3302
|
+
const n = { ...O }, o = t.getEntireCoords ?? (() => n);
|
|
3303
3303
|
if (this._getEntireCoords = o, this._unanchored = !0 === t.unanchored, this._shadowOf = t.shadowOf ?? null, this._arrayFirstCell = !0 === t.arrayFirstCell, this._paged = !0 === t.paged, !this._context || !this._container) throw new Error("Invalid Options");
|
|
3304
3304
|
const s = t?.onCalculated;
|
|
3305
3305
|
this._onCalculated = s ? (t) => {
|
|
3306
|
-
s(
|
|
3307
|
-
} : () => {}, this._values = new
|
|
3306
|
+
s(k(Ve.results(t, "onCalculated"), this._container.getImager(this._gridId)));
|
|
3307
|
+
} : () => {}, this._values = new Z({
|
|
3308
3308
|
axis: E.Axis.Column,
|
|
3309
3309
|
createRun: Qe
|
|
3310
|
-
}), this._iterationId = 0, this._contentfulSpatial = new
|
|
3310
|
+
}), this._iterationId = 0, this._contentfulSpatial = new J({ updateEntryOptions: {
|
|
3311
3311
|
isSplitOnExpand: !0,
|
|
3312
3312
|
isMergeOnShift: !0
|
|
3313
3313
|
} });
|
|
@@ -3315,7 +3315,7 @@ var wo = class extends lt {
|
|
|
3315
3315
|
isSplitOnExpand: !0,
|
|
3316
3316
|
isMergeOnShift: !1
|
|
3317
3317
|
} };
|
|
3318
|
-
this._spillSpatial = new
|
|
3318
|
+
this._spillSpatial = new J(l), this._errorSpatial = new J(l), this._calcStatusSpatial = new J(l), this._circularSpatial = new J(l), this._notifyValues = new J(), this._notifyBlank = null, this._notifySpillsInsert = [], this._notifySpillsRemove = [], this._notifyFormats = new J(), this._notifyCalcStatus = new J(), this._notifyCircular = new J(), this._touchedFormulas = [], this._container.registerGrid(this), this._publishMaps();
|
|
3319
3319
|
}
|
|
3320
3320
|
_land(t, e) {
|
|
3321
3321
|
return this._container.landRequest(t, () => (void 0 !== t && this._versionMaps(t), e()));
|
|
@@ -3441,7 +3441,7 @@ var wo = class extends lt {
|
|
|
3441
3441
|
cycleId: this._container.getCycleId(),
|
|
3442
3442
|
commitId: t.commitId
|
|
3443
3443
|
};
|
|
3444
|
-
const r =
|
|
3444
|
+
const r = De(t.destination, t.coords, t.fitDestination, t.transpose);
|
|
3445
3445
|
return r.scope = this._gridId, this._land(e, () => {
|
|
3446
3446
|
t.isCut ? this._moveTo(n, t.coords, r) : this._copyTo(n, t.coords, r);
|
|
3447
3447
|
const e = this._mutationResults(t.commitId);
|
|
@@ -3567,8 +3567,8 @@ var wo = class extends lt {
|
|
|
3567
3567
|
const e = this, n = this.getId(), r = { ...t };
|
|
3568
3568
|
r.range = { ...r.range }, r.range.scope = n, delete r.onShift;
|
|
3569
3569
|
const o = e._values, s = r.range, l = r.direction, i = l === E.Direction.Left || l === E.Direction.Right, a = l === E.Direction.Down || l === E.Direction.Right, c = a ? 1 : -1, d = e._spillSpatial, h = e._contentfulSpatial;
|
|
3570
|
-
|
|
3571
|
-
const u = [], _ = this._container.getPrecedents().search(s), f =
|
|
3570
|
+
Ot(d, s, i, a);
|
|
3571
|
+
const u = [], _ = this._container.getPrecedents().search(s), f = ot(s, d, o, h, void 0, !1, !1, void 0, (t, e, r, o) => {
|
|
3572
3572
|
u.push({
|
|
3573
3573
|
colStart: t,
|
|
3574
3574
|
rowStart: e,
|
|
@@ -3586,7 +3586,7 @@ var wo = class extends lt {
|
|
|
3586
3586
|
colEnd: i && 1 === c ? S.colEnd : s.colEnd,
|
|
3587
3587
|
rowEnd: i || 1 !== c ? s.rowEnd : S.rowEnd,
|
|
3588
3588
|
scope: n
|
|
3589
|
-
}, I = a ?
|
|
3589
|
+
}, I = a ? Kt(m, w) : Se(m, s);
|
|
3590
3590
|
I && (Po(p, m, I.formulas.inserts, I.formulas.removes), e._touchFormulas(I.formulas.removes), e._touchFormulas(I.formulas.inserts));
|
|
3591
3591
|
const y = i ? s.colEnd - s.colStart + 1 : s.rowEnd - s.rowStart + 1, v = y * c, x = {
|
|
3592
3592
|
colStart: s.colStart,
|
|
@@ -3596,7 +3596,7 @@ var wo = class extends lt {
|
|
|
3596
3596
|
scope: n
|
|
3597
3597
|
};
|
|
3598
3598
|
let C;
|
|
3599
|
-
const b =
|
|
3599
|
+
const b = Lt(() => m, () => {
|
|
3600
3600
|
const t = g.getDynamics();
|
|
3601
3601
|
return C = new Map(t), C;
|
|
3602
3602
|
}, x, {
|
|
@@ -3688,9 +3688,9 @@ var wo = class extends lt {
|
|
|
3688
3688
|
let h = c;
|
|
3689
3689
|
for (let r = 0; r < d.length; r++) {
|
|
3690
3690
|
const o = d[r];
|
|
3691
|
-
if (!
|
|
3691
|
+
if (!V(o)) continue;
|
|
3692
3692
|
let s = l.get(o);
|
|
3693
|
-
void 0 === s && (s =
|
|
3693
|
+
void 0 === s && (s = Gt(o, t, e, n) ?? null, l.set(o, s)), null !== s && (h = h.replaceScopeIds(o, s));
|
|
3694
3694
|
}
|
|
3695
3695
|
h !== c && (i.push(o), a.push({
|
|
3696
3696
|
...o,
|
|
@@ -3806,7 +3806,7 @@ var wo = class extends lt {
|
|
|
3806
3806
|
l || (l = /* @__PURE__ */ new Map(), Eo.set(r, l));
|
|
3807
3807
|
let i = l.get(e);
|
|
3808
3808
|
if (!i) {
|
|
3809
|
-
const t =
|
|
3809
|
+
const t = et(r);
|
|
3810
3810
|
i = 0 === e ? t : (n, r) => t(n + e, r) - e, l.set(e, i);
|
|
3811
3811
|
}
|
|
3812
3812
|
return i;
|
|
@@ -3837,7 +3837,7 @@ var wo = class extends lt {
|
|
|
3837
3837
|
columns: e.anchor.column - n.colStart
|
|
3838
3838
|
}, i = {
|
|
3839
3839
|
...n,
|
|
3840
|
-
value: new
|
|
3840
|
+
value: new Ne(n, l, "pivot", s)
|
|
3841
3841
|
};
|
|
3842
3842
|
o.insert(i), this._notifySpillsInsert.push(i);
|
|
3843
3843
|
}
|
|
@@ -3962,7 +3962,7 @@ var wo = class extends lt {
|
|
|
3962
3962
|
}
|
|
3963
3963
|
this._pushWithSpills(h, w);
|
|
3964
3964
|
}
|
|
3965
|
-
return h =
|
|
3965
|
+
return h = A(h, 2, t.Row), h.sort(o.rowFirstRangeComparator), h;
|
|
3966
3966
|
}
|
|
3967
3967
|
_pushWithSpills(t, e) {
|
|
3968
3968
|
t.push(e);
|
|
@@ -4019,7 +4019,7 @@ var wo = class extends lt {
|
|
|
4019
4019
|
for (let t = 0; t < a.length; t++) {
|
|
4020
4020
|
const e = a[t];
|
|
4021
4021
|
if (void 0 === e?.colStart) continue;
|
|
4022
|
-
const n = e.scope, o = _(n), s =
|
|
4022
|
+
const n = e.scope, o = _(n), s = ne(e, r.rowStart + I, r.colStart + y), l = ne(e, r.rowStart + v, r.colStart + x), i = {
|
|
4023
4023
|
colStart: Math.max(Math.min(s.colStart, l.colStart), o.colStart),
|
|
4024
4024
|
rowStart: Math.max(Math.min(s.rowStart, l.rowStart), o.rowStart),
|
|
4025
4025
|
colEnd: Math.min(Math.max(s.colEnd, l.colEnd), o.colEnd),
|
|
@@ -4030,7 +4030,7 @@ var wo = class extends lt {
|
|
|
4030
4030
|
}
|
|
4031
4031
|
f.push(...C);
|
|
4032
4032
|
}
|
|
4033
|
-
return f =
|
|
4033
|
+
return f = A(f, 2, t.Row), f.sort(o.rowFirstRangeComparator), f;
|
|
4034
4034
|
}
|
|
4035
4035
|
_directAcrossGrids(t, e) {
|
|
4036
4036
|
const n = this._gridId, o = t.scope, s = o && o !== n ? this._container.getGrid(o) ?? null : this;
|
|
@@ -4051,11 +4051,11 @@ var wo = class extends lt {
|
|
|
4051
4051
|
return i;
|
|
4052
4052
|
}
|
|
4053
4053
|
getDependentsAt(t) {
|
|
4054
|
-
const e =
|
|
4054
|
+
const e = H(t, (t) => this._directAcrossGrids(t, !0));
|
|
4055
4055
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4056
4056
|
}
|
|
4057
4057
|
getPrecedentsAt(t) {
|
|
4058
|
-
const e =
|
|
4058
|
+
const e = H(t, (t) => this._directAcrossGrids(t, !1));
|
|
4059
4059
|
return e.sort(o.rowFirstRangeComparator), e;
|
|
4060
4060
|
}
|
|
4061
4061
|
_graphNeighborsNow(t, e, n) {
|
|
@@ -4166,8 +4166,8 @@ var wo = class extends lt {
|
|
|
4166
4166
|
if ("scalar" === o) {
|
|
4167
4167
|
let o = t.evaluateAt(e, n, r);
|
|
4168
4168
|
if (o && void 0 !== o.colStart) o = t.finalizeValue(o);
|
|
4169
|
-
else if (
|
|
4170
|
-
const s =
|
|
4169
|
+
else if (_t(o)) return t.finalizeValue(o);
|
|
4170
|
+
const s = rt(o, this._context);
|
|
4171
4171
|
return null === s ? 0 : s;
|
|
4172
4172
|
}
|
|
4173
4173
|
return tn(t.finalizeValue(t.evaluateAt(e, n, r)));
|
|
@@ -4175,7 +4175,7 @@ var wo = class extends lt {
|
|
|
4175
4175
|
_setReferenceNow(t, e, n, r) {
|
|
4176
4176
|
const o = this._formulaAt(t, e);
|
|
4177
4177
|
let s = r;
|
|
4178
|
-
r && void 0 !== r.colStart ? s =
|
|
4178
|
+
r && void 0 !== r.colStart ? s = ce(s, t, e) : r && void 0 !== r.colIndex && (s = vt(s, t, e));
|
|
4179
4179
|
const l = o.value.formula.setReferenceAt(n, s).getTextAt(t, e);
|
|
4180
4180
|
return this._land(void 0, () => {
|
|
4181
4181
|
l ? this._setInputsNow(null, [{
|
|
@@ -4196,7 +4196,7 @@ var wo = class extends lt {
|
|
|
4196
4196
|
_setReferenceModeNow(t, e, n, r, o) {
|
|
4197
4197
|
const s = this.getReferencesAt(t, e)[n];
|
|
4198
4198
|
if (!s || "nameId" in s) throw new Error(`Reference at index ${n} is not a cell reference and cannot have its style changed.`);
|
|
4199
|
-
return this._setReferenceNow(t, e, n,
|
|
4199
|
+
return this._setReferenceNow(t, e, n, Dt(s, r, o));
|
|
4200
4200
|
}
|
|
4201
4201
|
_isVolatileNow(t, e) {
|
|
4202
4202
|
const n = this._formulaAt(t, e);
|
|
@@ -4231,7 +4231,7 @@ var wo = class extends lt {
|
|
|
4231
4231
|
rowStart: u,
|
|
4232
4232
|
colEnd: o,
|
|
4233
4233
|
rowEnd: f,
|
|
4234
|
-
value: new
|
|
4234
|
+
value: new Ne(g, 0, e.value.getKind())
|
|
4235
4235
|
});
|
|
4236
4236
|
}
|
|
4237
4237
|
return {
|
|
@@ -4244,7 +4244,7 @@ var wo = class extends lt {
|
|
|
4244
4244
|
if (0 === o) return;
|
|
4245
4245
|
const s = this._container, l = n ?? this._gridId, i = null != n ? l : e ?? l, a = s.getScope();
|
|
4246
4246
|
a.gridId = i;
|
|
4247
|
-
const c = e ? s.getSymbols().resolve(
|
|
4247
|
+
const c = e ? s.getSymbols().resolve(Bt.Sheet, e)?.toString() : void 0, d = this._context;
|
|
4248
4248
|
for (let n = 0; n < o; n++) {
|
|
4249
4249
|
const o = t[n], h = o.value, u = h.ref, _ = h.formula.getTextAt(u.rowStart, u.colStart);
|
|
4250
4250
|
a.colIndex = u.colStart, a.rowIndex = u.rowStart;
|
|
@@ -4280,7 +4280,7 @@ var wo = class extends lt {
|
|
|
4280
4280
|
if (p === Number.MIN_SAFE_INTEGER && (I = a, v = d), m === Number.MIN_SAFE_INTEGER && (y = c, x = h), I < a || v > d || y < c || x > h) {
|
|
4281
4281
|
const o = a - I, g = c - y, p = d - v, m = h - x;
|
|
4282
4282
|
Mo.colStart = Math.max(s, s + o), Mo.rowStart = Math.max(l, l + g), Mo.colEnd = Math.min(i, i + p), Mo.rowEnd = Math.min(u, u + m);
|
|
4283
|
-
const w =
|
|
4283
|
+
const w = re(t, Mo, de);
|
|
4284
4284
|
if (w) {
|
|
4285
4285
|
const e = w.length;
|
|
4286
4286
|
t = w[e - 1], n = t.value, r = n.ref, s = r.colStart, l = r.rowStart, i = r.colEnd, u = r.rowEnd;
|
|
@@ -4304,7 +4304,7 @@ var wo = class extends lt {
|
|
|
4304
4304
|
this._removeNow(n);
|
|
4305
4305
|
const a = this._container, c = a.getPrecedents().clone(), d = a.getFormulas().clone();
|
|
4306
4306
|
a.setPrecedents(c), a.setFormulas(d);
|
|
4307
|
-
const h =
|
|
4307
|
+
const h = ae(c, e, n);
|
|
4308
4308
|
h && (Po(d, c, h.formulas.inserts, h.formulas.removes), this._touchFormulas(h.formulas.removes), this._touchFormulas(h.formulas.inserts));
|
|
4309
4309
|
const u = { cutFrom: e }, _ = i.createCopiedEntries(e, n, u).inserts, f = _.length, g = this._gridId;
|
|
4310
4310
|
if (g !== l) {
|
|
@@ -4352,7 +4352,7 @@ var wo = class extends lt {
|
|
|
4352
4352
|
}
|
|
4353
4353
|
let p;
|
|
4354
4354
|
Po(d, c, _), this._touchFormulas(_);
|
|
4355
|
-
const m =
|
|
4355
|
+
const m = Ut(c, () => {
|
|
4356
4356
|
const t = a.getDynamics();
|
|
4357
4357
|
return p = new Map(t), p;
|
|
4358
4358
|
}, e, n);
|
|
@@ -4374,7 +4374,7 @@ var wo = class extends lt {
|
|
|
4374
4374
|
t.values.copyTo(S, {
|
|
4375
4375
|
colIndex: n.colStart,
|
|
4376
4376
|
rowIndex: n.rowStart
|
|
4377
|
-
}, e),
|
|
4377
|
+
}, e), Q(this._errorSpatial, S, n);
|
|
4378
4378
|
const w = t.spillSpatial;
|
|
4379
4379
|
let y = [], v = [];
|
|
4380
4380
|
for (let t = 0; t < f; t++) {
|
|
@@ -4387,7 +4387,7 @@ var wo = class extends lt {
|
|
|
4387
4387
|
const t = (t, e) => {
|
|
4388
4388
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4389
4389
|
};
|
|
4390
|
-
|
|
4390
|
+
Ft(a.getCycleId(), v, r.EmptyArray, s._contentfulSpatial, s._spillSpatial, s._values, (t, e, n, r) => {
|
|
4391
4391
|
x.push({
|
|
4392
4392
|
colStart: t,
|
|
4393
4393
|
rowStart: e,
|
|
@@ -4433,7 +4433,7 @@ var wo = class extends lt {
|
|
|
4433
4433
|
}
|
|
4434
4434
|
}
|
|
4435
4435
|
e && (t = i.concat(e)), t.sort(o.columnFirstRangeComparator);
|
|
4436
|
-
const n = new
|
|
4436
|
+
const n = new st.Builder((t, e) => new C.ArrayList(t.slice(0, e)));
|
|
4437
4437
|
let r;
|
|
4438
4438
|
const s = !0 === this._container.getDeferred?.()?.hasHolders(), a = this._values, c = a.getAxis() === E.Axis.Column, d = t.length;
|
|
4439
4439
|
for (let e = 0; e < d; e++) {
|
|
@@ -4530,9 +4530,9 @@ var wo = class extends lt {
|
|
|
4530
4530
|
const i = e.search(o), a = i.length;
|
|
4531
4531
|
for (let e = 0; e < a; e++) {
|
|
4532
4532
|
let r = i[e];
|
|
4533
|
-
if (
|
|
4533
|
+
if (at(o.rowStart, o.colStart, r) && (s || r.value.getCycleId() === t)) {
|
|
4534
4534
|
m || (m = [], n = /* @__PURE__ */ new Set());
|
|
4535
|
-
const t =
|
|
4535
|
+
const t = ke(r.colStart) + wt(r.rowStart);
|
|
4536
4536
|
if (n.has(t)) continue;
|
|
4537
4537
|
n.add(t);
|
|
4538
4538
|
const e = r.value.getBlockedCoords() ?? o;
|
|
@@ -4567,7 +4567,7 @@ var wo = class extends lt {
|
|
|
4567
4567
|
if (t && t.tuples) {
|
|
4568
4568
|
I = t.tuples;
|
|
4569
4569
|
let e = t.bounds;
|
|
4570
|
-
if (e ? (y =
|
|
4570
|
+
if (e ? (y = Jt(e, f), y.scope = l) : y = {
|
|
4571
4571
|
colStart: Number.MIN_SAFE_INTEGER,
|
|
4572
4572
|
rowStart: Number.MIN_SAFE_INTEGER,
|
|
4573
4573
|
colEnd: Number.MAX_SAFE_INTEGER,
|
|
@@ -4590,19 +4590,19 @@ var wo = class extends lt {
|
|
|
4590
4590
|
t.minorStart = n[0];
|
|
4591
4591
|
const r = n[1];
|
|
4592
4592
|
t.minorEnd = t.minorStart + r.length - 1;
|
|
4593
|
-
const s =
|
|
4593
|
+
const s = Jt(t, f);
|
|
4594
4594
|
s.scope = l, x && c.search(s).length > 0 && x.push(s);
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
4597
|
}
|
|
4598
|
-
v =
|
|
4598
|
+
v = K(t.tuples, f, l);
|
|
4599
4599
|
}
|
|
4600
4600
|
const C = (t, e) => {
|
|
4601
4601
|
t && this._notifySpillsInsert.push(t), e && this._notifySpillsRemove.push(e);
|
|
4602
4602
|
};
|
|
4603
4603
|
if (n || I) {
|
|
4604
4604
|
let t;
|
|
4605
|
-
n && (t =
|
|
4605
|
+
n && (t = ot(n, g, _, S, C, !1, !0, this._notifyValues, (t, e, n, r) => {
|
|
4606
4606
|
w.push({
|
|
4607
4607
|
colStart: t,
|
|
4608
4608
|
rowStart: e,
|
|
@@ -4610,7 +4610,7 @@ var wo = class extends lt {
|
|
|
4610
4610
|
rowEnd: r,
|
|
4611
4611
|
scope: l
|
|
4612
4612
|
});
|
|
4613
|
-
})),
|
|
4613
|
+
})), Ft(-1, n ? [n] : r.EmptyArray, v, S, g, _, (t, e, n, r) => {
|
|
4614
4614
|
w.push({
|
|
4615
4615
|
colStart: t,
|
|
4616
4616
|
rowStart: e,
|
|
@@ -4618,7 +4618,7 @@ var wo = class extends lt {
|
|
|
4618
4618
|
rowEnd: r,
|
|
4619
4619
|
scope: l
|
|
4620
4620
|
});
|
|
4621
|
-
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n),
|
|
4621
|
+
}, this._notifyValues, C, this._notifyCalcStatus, p, f, !1, this._circularSpatial, this._calcStatusSpatial), n && (_.delete(n), ie(p, n)), t?.(), I && (_.setValues(I), be(p, I, f));
|
|
4622
4622
|
}
|
|
4623
4623
|
const b = i.getScope();
|
|
4624
4624
|
let R, A, k, N, M;
|
|
@@ -4659,32 +4659,32 @@ var wo = class extends lt {
|
|
|
4659
4659
|
}
|
|
4660
4660
|
}
|
|
4661
4661
|
});
|
|
4662
|
-
},
|
|
4663
|
-
let
|
|
4662
|
+
}, T = x ? x.length : 0;
|
|
4663
|
+
let G;
|
|
4664
4664
|
if (u > 0) {
|
|
4665
|
-
|
|
4665
|
+
G = ge(u);
|
|
4666
4666
|
for (let t = 0; t < u; t++) {
|
|
4667
4667
|
const n = e[t], r = n.value, s = o.sanitizeRange(n);
|
|
4668
|
-
|
|
4668
|
+
G[t] = s, null !== r && F(s, r);
|
|
4669
4669
|
}
|
|
4670
4670
|
}
|
|
4671
|
-
const
|
|
4672
|
-
(
|
|
4673
|
-
for (let t = 0; t <
|
|
4674
|
-
for (let t = 0; t < u; t++) D(
|
|
4675
|
-
const
|
|
4676
|
-
if (
|
|
4671
|
+
const B = s?.cloneKey ?? null;
|
|
4672
|
+
(T > 0 || u > 0) && (k = i.getFormulas().clone(B));
|
|
4673
|
+
for (let t = 0; t < T; t++) D(x[t]);
|
|
4674
|
+
for (let t = 0; t < u; t++) D(G[t]);
|
|
4675
|
+
const V = A ? A.length : 0;
|
|
4676
|
+
if (V > 0) {
|
|
4677
4677
|
const t = i.getDynamics();
|
|
4678
4678
|
let e = null;
|
|
4679
|
-
for (let n = 0; n <
|
|
4679
|
+
for (let n = 0; n < V; n++) {
|
|
4680
4680
|
const r = A[n].value, o = t.get(r);
|
|
4681
|
-
o && (N || (N = i.getPrecedents().clone(
|
|
4681
|
+
o && (N || (N = i.getPrecedents().clone(B)), N.removeAll(o, Go), e || (e = new Map(t)), e.delete(r));
|
|
4682
4682
|
}
|
|
4683
4683
|
e && i.setDynamics(e);
|
|
4684
4684
|
}
|
|
4685
|
-
let
|
|
4685
|
+
let O = [];
|
|
4686
4686
|
if (R || A) {
|
|
4687
|
-
N || (N = i.getPrecedents().clone(
|
|
4687
|
+
N || (N = i.getPrecedents().clone(B)), Po(k, N, R, A), M && Lo(N, M, null);
|
|
4688
4688
|
const t = R ? this._joinInserted(k, N, R, (t) => {
|
|
4689
4689
|
w.push({
|
|
4690
4690
|
colStart: t.colStart,
|
|
@@ -4712,8 +4712,8 @@ var wo = class extends lt {
|
|
|
4712
4712
|
}
|
|
4713
4713
|
}
|
|
4714
4714
|
return n;
|
|
4715
|
-
}(A, x,
|
|
4716
|
-
|
|
4715
|
+
}(A, x, G) : A;
|
|
4716
|
+
Ft(-1, e, R, S, g, _, (t, e, n, r) => {
|
|
4717
4717
|
w.push({
|
|
4718
4718
|
colStart: t,
|
|
4719
4719
|
rowStart: e,
|
|
@@ -4725,7 +4725,7 @@ var wo = class extends lt {
|
|
|
4725
4725
|
}
|
|
4726
4726
|
if (N && i.setPrecedents(N), k && (R || A || M) && i.setFormulas(k), R) for (let t = 0; t < R.length; t++) {
|
|
4727
4727
|
const e = R[t];
|
|
4728
|
-
|
|
4728
|
+
O.push({
|
|
4729
4729
|
colStart: e.colStart,
|
|
4730
4730
|
rowStart: e.rowStart,
|
|
4731
4731
|
colEnd: e.colEnd,
|
|
@@ -4735,7 +4735,7 @@ var wo = class extends lt {
|
|
|
4735
4735
|
}
|
|
4736
4736
|
if (A) for (let t = 0; t < A.length; t++) {
|
|
4737
4737
|
const e = A[t];
|
|
4738
|
-
|
|
4738
|
+
O.push({
|
|
4739
4739
|
colStart: e.colStart,
|
|
4740
4740
|
rowStart: e.rowStart,
|
|
4741
4741
|
colEnd: e.colEnd,
|
|
@@ -4743,7 +4743,7 @@ var wo = class extends lt {
|
|
|
4743
4743
|
scope: l
|
|
4744
4744
|
});
|
|
4745
4745
|
}
|
|
4746
|
-
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), w.length > 0 && i.markDirty(w),
|
|
4746
|
+
return this._notifyCalcStatus.size() !== m && (i.getDeferred?.()?.noteRepaint(l), i.requestCalculateGrid(l)), w.length > 0 && i.markDirty(w), O;
|
|
4747
4747
|
}
|
|
4748
4748
|
_rederivePrecedentsNow(t) {
|
|
4749
4749
|
const e = this._container, n = e.getPrecedents().clone();
|
|
@@ -4781,7 +4781,7 @@ var wo = class extends lt {
|
|
|
4781
4781
|
const s = n[o];
|
|
4782
4782
|
if (!a(s) || !d(s)) continue;
|
|
4783
4783
|
h = !1;
|
|
4784
|
-
const l =
|
|
4784
|
+
const l = St(c, s, (t, e, n, r) => {
|
|
4785
4785
|
if (!a(t) || !a(e)) return;
|
|
4786
4786
|
const o = {
|
|
4787
4787
|
colStart: n.colStart,
|
|
@@ -4832,8 +4832,8 @@ var wo = class extends lt {
|
|
|
4832
4832
|
const e = t.data;
|
|
4833
4833
|
this._values.setValues(e);
|
|
4834
4834
|
const n = this._values.getAxis() === E.Axis.Column;
|
|
4835
|
-
|
|
4836
|
-
const r =
|
|
4835
|
+
be(this._errorSpatial, e, n);
|
|
4836
|
+
const r = K(e, n, this._gridId);
|
|
4837
4837
|
this._contentfulSpatial.load(r);
|
|
4838
4838
|
}
|
|
4839
4839
|
const e = this._gridId, n = this._container, r = n.getPrecedents(), o = n.getFormulas(), s = {
|
|
@@ -4845,9 +4845,9 @@ var wo = class extends lt {
|
|
|
4845
4845
|
if (c) {
|
|
4846
4846
|
const t = c.length;
|
|
4847
4847
|
for (let e = 0; e < t; e++) {
|
|
4848
|
-
const t = c[e], n = t[0], r =
|
|
4848
|
+
const t = c[e], n = t[0], r = X(n, s).split(":")[0];
|
|
4849
4849
|
d.add(r);
|
|
4850
|
-
const o =
|
|
4850
|
+
const o = nt(t, s);
|
|
4851
4851
|
o && h.add(`${o.rowStart},${o.colStart}`);
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
@@ -4855,7 +4855,7 @@ var wo = class extends lt {
|
|
|
4855
4855
|
m.colIndex = 0, m.rowIndex = 0, m.gridId = e;
|
|
4856
4856
|
const S = n.isLegacyIntersect();
|
|
4857
4857
|
for (let t = 0; t < u; t++) {
|
|
4858
|
-
const r =
|
|
4858
|
+
const r = nt(l[t], s);
|
|
4859
4859
|
r.scope = e;
|
|
4860
4860
|
const o = r.value, i = r.rowStart, a = r.colStart;
|
|
4861
4861
|
m.colIndex = a, m.rowIndex = i;
|
|
@@ -4869,7 +4869,7 @@ var wo = class extends lt {
|
|
|
4869
4869
|
for (let t = 0; t < w; t++) {
|
|
4870
4870
|
const n = g[t];
|
|
4871
4871
|
if (I.isError(n)) continue;
|
|
4872
|
-
const o =
|
|
4872
|
+
const o = Fe(b[t], bo[t], Co[t]), s = o.$absColEnd, l = o.$absRowEnd, i = {
|
|
4873
4873
|
colStart: n.colStart,
|
|
4874
4874
|
rowStart: n.rowStart,
|
|
4875
4875
|
colEnd: n.colEnd + (s ? 0 : v),
|
|
@@ -4892,7 +4892,7 @@ var wo = class extends lt {
|
|
|
4892
4892
|
if (o.load(_), r.load(f), n.bumpCalcEpochs(!0), i.formulaInserts = this._formulaRecords(_), c) {
|
|
4893
4893
|
const t = [], l = [], a = /* @__PURE__ */ new Map(), d = this._values, h = c.length;
|
|
4894
4894
|
for (let n = 0; n < h; n++) {
|
|
4895
|
-
const r =
|
|
4895
|
+
const r = nt(c[n], s), i = r.value ?? "dynamic", h = "error" === i, u = r.colStart, _ = r.rowStart;
|
|
4896
4896
|
Ro.colStart = u, Ro.rowStart = _, Ro.colEnd = u, Ro.rowEnd = _, Ro.scope = e;
|
|
4897
4897
|
const f = o.search(Ro);
|
|
4898
4898
|
if (1 !== f.length) continue;
|
|
@@ -4902,13 +4902,13 @@ var wo = class extends lt {
|
|
|
4902
4902
|
colEnd: S,
|
|
4903
4903
|
rowEnd: w
|
|
4904
4904
|
};
|
|
4905
|
-
"fixed" === i && (Ze(m).fixedRef = E, p.densify()), m.cachedValue = h ? I.BuiltIn.Spill : new
|
|
4905
|
+
"fixed" === i && (Ze(m).fixedRef = E, p.densify()), m.cachedValue = h ? I.BuiltIn.Spill : new x(g, d, E);
|
|
4906
4906
|
const y = {
|
|
4907
4907
|
colStart: u,
|
|
4908
4908
|
rowStart: _,
|
|
4909
4909
|
colEnd: S,
|
|
4910
4910
|
rowEnd: w,
|
|
4911
|
-
value: new
|
|
4911
|
+
value: new Ne(E, 0, i)
|
|
4912
4912
|
};
|
|
4913
4913
|
l.push(y), t.push({
|
|
4914
4914
|
colStart: u,
|
|
@@ -4916,7 +4916,7 @@ var wo = class extends lt {
|
|
|
4916
4916
|
colEnd: S,
|
|
4917
4917
|
rowEnd: w,
|
|
4918
4918
|
value: i
|
|
4919
|
-
}),
|
|
4919
|
+
}), T(a, m, E, -2);
|
|
4920
4920
|
}
|
|
4921
4921
|
if (this._spillSpatial.load(l), a.size > 0) {
|
|
4922
4922
|
r.load(Array.from(a.values()).flat()), n.bumpCalcEpochs(!1);
|
|
@@ -4933,19 +4933,19 @@ var wo = class extends lt {
|
|
|
4933
4933
|
t.add(e), e.state |= Hn, e.block.calcOnLoad = !0;
|
|
4934
4934
|
}, r = new Array(y);
|
|
4935
4935
|
for (let t = 0; t < y; t++) {
|
|
4936
|
-
const n = E[t], l =
|
|
4936
|
+
const n = E[t], l = $(n, s);
|
|
4937
4937
|
r[t] = { ...l };
|
|
4938
4938
|
const i = o.search(l), a = i.length;
|
|
4939
4939
|
for (let t = 0; t < a; t++) {
|
|
4940
4940
|
const n = i[t];
|
|
4941
|
-
|
|
4941
|
+
Ie(n, l, e);
|
|
4942
4942
|
}
|
|
4943
4943
|
}
|
|
4944
4944
|
this._markDirtyRegionsNow(r), w = !0;
|
|
4945
4945
|
}
|
|
4946
|
-
const v = this._contentfulSpatial,
|
|
4947
|
-
let
|
|
4948
|
-
const
|
|
4946
|
+
const v = this._contentfulSpatial, C = !v.isEmpty();
|
|
4947
|
+
let b = null;
|
|
4948
|
+
const R = {
|
|
4949
4949
|
rowStart: 0,
|
|
4950
4950
|
colStart: 0,
|
|
4951
4951
|
rowEnd: 0,
|
|
@@ -4957,23 +4957,23 @@ var wo = class extends lt {
|
|
|
4957
4957
|
if (!e) continue;
|
|
4958
4958
|
const n = (e.rowEnd - e.rowStart + 1) * (e.colEnd - e.colStart + 1);
|
|
4959
4959
|
let r = 0;
|
|
4960
|
-
if (
|
|
4961
|
-
|
|
4962
|
-
const t = v.search(
|
|
4960
|
+
if (C) {
|
|
4961
|
+
R.rowStart = e.rowStart, R.colStart = e.colStart, R.rowEnd = e.rowEnd, R.colEnd = e.colEnd;
|
|
4962
|
+
const t = v.search(R);
|
|
4963
4963
|
for (let n = 0; n < t.length; n++) {
|
|
4964
4964
|
const o = t[n];
|
|
4965
4965
|
r += (Math.min(o.rowEnd, e.rowEnd) - Math.max(o.rowStart, e.rowStart) + 1) * (Math.min(o.colEnd, e.colEnd) - Math.max(o.colStart, e.colStart) + 1);
|
|
4966
4966
|
}
|
|
4967
4967
|
}
|
|
4968
4968
|
const o = r < n && !this._isSavedSpill(e);
|
|
4969
|
-
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (
|
|
4969
|
+
o && (e.value.uncalculated = !0), (o || e.value?.getError()) && (b ??= []).push({
|
|
4970
4970
|
rowStart: e.rowStart,
|
|
4971
4971
|
colStart: e.colStart,
|
|
4972
4972
|
rowEnd: e.rowEnd,
|
|
4973
4973
|
colEnd: e.colEnd
|
|
4974
4974
|
});
|
|
4975
4975
|
}
|
|
4976
|
-
if (
|
|
4976
|
+
if (b && (this._markDirtyRegionsNow(b), w = !0), a && u > 0) {
|
|
4977
4977
|
const t = new Array(u);
|
|
4978
4978
|
for (let e = 0; e < u; e++) {
|
|
4979
4979
|
const n = _[e];
|
|
@@ -5016,7 +5016,7 @@ var wo = class extends lt {
|
|
|
5016
5016
|
}
|
|
5017
5017
|
_toJSONNow(e) {
|
|
5018
5018
|
let n = this._container.getFormulas().getSpatialAt(this._gridId)?.all(), r = n ? n.length : 0;
|
|
5019
|
-
r > 0 && (n =
|
|
5019
|
+
r > 0 && (n = Y(n, t.Column, 2, Bo), n.sort(o.rowFirstRangeComparator)), r = n ? n.length : 0;
|
|
5020
5020
|
const s = this._hiddenRows, l = this._hiddenColumns, i = this._filtered;
|
|
5021
5021
|
if (0 === r && !s && !l && !i) return null;
|
|
5022
5022
|
const a = {};
|
|
@@ -5033,7 +5033,7 @@ var wo = class extends lt {
|
|
|
5033
5033
|
if (d > 0) {
|
|
5034
5034
|
const t = this.getEntireCoords(), e = new Array(d);
|
|
5035
5035
|
for (let n = 0; n < d; n++) {
|
|
5036
|
-
const r = c[n], o =
|
|
5036
|
+
const r = c[n], o = lt(r, t);
|
|
5037
5037
|
e[n] = [o, r.value.getKind()];
|
|
5038
5038
|
}
|
|
5039
5039
|
a.formulaArray = e;
|
|
@@ -5043,7 +5043,7 @@ var wo = class extends lt {
|
|
|
5043
5043
|
if (h.size > 0) {
|
|
5044
5044
|
const t = h.values();
|
|
5045
5045
|
let e = t.next();
|
|
5046
|
-
const n = this._values.getAxis() === E.Axis.Column, r =
|
|
5046
|
+
const n = this._values.getAxis() === E.Axis.Column, r = Be(!0);
|
|
5047
5047
|
for (; !e.done;) {
|
|
5048
5048
|
const o = e.value;
|
|
5049
5049
|
if (e = t.next(), o.gridId !== u) continue;
|
|
@@ -5067,14 +5067,14 @@ var wo = class extends lt {
|
|
|
5067
5067
|
}
|
|
5068
5068
|
};
|
|
5069
5069
|
f.isEmpty() || n(f.all());
|
|
5070
|
-
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value ===
|
|
5071
|
-
r.length > 0 && n(r), p.length > 0 && n(p), _ =
|
|
5070
|
+
const r = g.isEmpty() ? [] : g.all().filter((t) => t.value === U.CalcStatus.Working);
|
|
5071
|
+
r.length > 0 && n(r), p.length > 0 && n(p), _ = Y(e, t.Column, 2);
|
|
5072
5072
|
}
|
|
5073
5073
|
const m = _ ? _.length : 0;
|
|
5074
5074
|
if (m > 0) {
|
|
5075
5075
|
const t = new Array(m);
|
|
5076
5076
|
for (let e = 0; e < m; e++) {
|
|
5077
|
-
const n = _[e], r =
|
|
5077
|
+
const n = _[e], r = lt(n, this.getEntireCoords());
|
|
5078
5078
|
t[e] = r;
|
|
5079
5079
|
}
|
|
5080
5080
|
a.volatile = t;
|
|
@@ -5188,25 +5188,25 @@ function Lo(t, e, n) {
|
|
|
5188
5188
|
const s = [];
|
|
5189
5189
|
for (let t = 0; t < o; t++) {
|
|
5190
5190
|
const n = e[t], r = [], o = s.length;
|
|
5191
|
-
|
|
5191
|
+
mt(n, s, r), s.length > o && (n.value.registeredPrecedents = s.slice(o));
|
|
5192
5192
|
}
|
|
5193
5193
|
t.load(s);
|
|
5194
5194
|
}
|
|
5195
5195
|
To.fill(null, 0, 10);
|
|
5196
5196
|
var $o = (t) => {
|
|
5197
5197
|
let e = !1;
|
|
5198
|
-
if (
|
|
5199
|
-
if (e || t instanceof
|
|
5198
|
+
if (Ge.forEachLeaf(t, (t, n, r, o) => {
|
|
5199
|
+
if (e || t instanceof Mt) return;
|
|
5200
5200
|
let s = n + o - r;
|
|
5201
5201
|
!0 === t.isIRepeatingList && (s = Math.min(s, n + t.getPeriod() - 1));
|
|
5202
|
-
for (let r = n; !e && r <= s; r++) e =
|
|
5202
|
+
for (let r = n; !e && r <= s; r++) e = oe(t.at(r));
|
|
5203
5203
|
}), !e) return t;
|
|
5204
5204
|
const n = t.length, r = new Array(n);
|
|
5205
|
-
for (let e = 0; e < n; e++) r[e] =
|
|
5206
|
-
return new
|
|
5205
|
+
for (let e = 0; e < n; e++) r[e] = fe(t.at(e));
|
|
5206
|
+
return new C.ArrayList(r);
|
|
5207
5207
|
}, Ho = (t, e, n) => {
|
|
5208
5208
|
const r = n?.fetchedFrom;
|
|
5209
|
-
if (!t) return new
|
|
5209
|
+
if (!t) return new dt({
|
|
5210
5210
|
source: { buffer: e },
|
|
5211
5211
|
fetchedFrom: r
|
|
5212
5212
|
});
|
|
@@ -5247,13 +5247,13 @@ var $o = (t) => {
|
|
|
5247
5247
|
}
|
|
5248
5248
|
}
|
|
5249
5249
|
_moved() {
|
|
5250
|
-
|
|
5250
|
+
yt(), this._onMoved?.(this);
|
|
5251
5251
|
}
|
|
5252
5252
|
_final() {
|
|
5253
5253
|
const t = this._onFinal;
|
|
5254
5254
|
this._onFinal = null, t?.(this);
|
|
5255
5255
|
}
|
|
5256
|
-
}, Ko = (t) => t, qo = (t, e) =>
|
|
5256
|
+
}, Ko = (t) => t, qo = (t, e) => Pt.fromJSON({
|
|
5257
5257
|
type: t,
|
|
5258
5258
|
data: e
|
|
5259
5259
|
}), Uo = (t, e) => globalThis.fetch(t, e), Wo = () => {
|
|
@@ -5369,7 +5369,7 @@ var $o = (t) => {
|
|
|
5369
5369
|
}, t);
|
|
5370
5370
|
}
|
|
5371
5371
|
newHolder(t, e) {
|
|
5372
|
-
return this._holders = !0, new
|
|
5372
|
+
return this._holders = !0, new B(t, e.calls, e.direct);
|
|
5373
5373
|
}
|
|
5374
5374
|
defer(t, e, n = null, r = !1) {
|
|
5375
5375
|
const o = this._scope, s = o.deferOrdinal++;
|
|
@@ -5445,7 +5445,7 @@ var $o = (t) => {
|
|
|
5445
5445
|
const e = this._scope, n = e.node;
|
|
5446
5446
|
if (!n || !this._holders || !e.gridId) return;
|
|
5447
5447
|
let r = this._heldAt(e.gridId, e.rowIndex, e.colIndex);
|
|
5448
|
-
return null === r &&
|
|
5448
|
+
return null === r && oe(n.cachedValue) && (r = n.cachedValue), null !== r ? r.calls[t] : void 0;
|
|
5449
5449
|
}
|
|
5450
5450
|
}, Yo = (t, e) => {
|
|
5451
5451
|
for (const n of t) n.isOpen() && n.reject(e);
|
|
@@ -5539,7 +5539,7 @@ var $o = (t) => {
|
|
|
5539
5539
|
}
|
|
5540
5540
|
_grow() {
|
|
5541
5541
|
const t = this._keys, e = this._values, n = this._order, r = this.size, o = Math.max(64, 2 * (this._mask + 1));
|
|
5542
|
-
this._keys = new Float64Array(o).fill(-1), this._values =
|
|
5542
|
+
this._keys = new Float64Array(o).fill(-1), this._values = R(o), this._order = new Int32Array(o), this._mask = o - 1;
|
|
5543
5543
|
for (let o = 0; o < r; o++) {
|
|
5544
5544
|
const r = t[n[o]], s = Math.floor(r / ns), l = this._slotOf(s, r - s * ns, r);
|
|
5545
5545
|
this._keys[l] = r, this._values[l] = e[n[o]], this._order[o] = l;
|
|
@@ -5933,7 +5933,7 @@ var is = {
|
|
|
5933
5933
|
const e = this.getRuns(t ? { bounds: t } : void 0);
|
|
5934
5934
|
let n = e.next();
|
|
5935
5935
|
if (n.done) return null;
|
|
5936
|
-
const r = new
|
|
5936
|
+
const r = new st.Builder();
|
|
5937
5937
|
for (; !n.done;) r.pushMultipleAt(n.value[0], n.value[1], n.value[2]), n = e.next();
|
|
5938
5938
|
return r.build();
|
|
5939
5939
|
}
|
|
@@ -6281,7 +6281,7 @@ var Es = class {
|
|
|
6281
6281
|
};
|
|
6282
6282
|
const b = /* @__PURE__ */ new Map();
|
|
6283
6283
|
this._addDynamicPrecedent = (t, e, n) => {
|
|
6284
|
-
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn),
|
|
6284
|
+
t?.block && (u.getScope().perCellRead = !0, -1 === n && (t.state |= Hn), T(b, t, e, n));
|
|
6285
6285
|
};
|
|
6286
6286
|
const R = /* @__PURE__ */ new Map(), A = (t, e) => {
|
|
6287
6287
|
(function(t, e, n, r) {
|
|
@@ -6289,7 +6289,7 @@ var Es = class {
|
|
|
6289
6289
|
let o, s, l, i = Rs, a = [];
|
|
6290
6290
|
const c = /* @__PURE__ */ new Set(), d = () => {
|
|
6291
6291
|
const t = o.build();
|
|
6292
|
-
t && t.tuples && (l.values.setValues(t.tuples),
|
|
6292
|
+
t && t.tuples && (l.values.setValues(t.tuples), be(l.errorSpatial, t.tuples, r));
|
|
6293
6293
|
const e = s.done(!0);
|
|
6294
6294
|
for (let t = 0; t < e.length; t++) {
|
|
6295
6295
|
const n = e[t];
|
|
@@ -6315,7 +6315,7 @@ var Es = class {
|
|
|
6315
6315
|
t.length = e, t.sort(Ns);
|
|
6316
6316
|
for (let h = 0; h < e; h++) {
|
|
6317
6317
|
const e = t[h], u = e.colIndex, _ = e.rowIndex, f = e.gridId;
|
|
6318
|
-
f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new
|
|
6318
|
+
f || console.log("nodeGridId is null", e), f !== i && (i !== Rs && d(), o = new st.Builder(Is), s = Be(r), i = f, l = n(f));
|
|
6319
6319
|
const g = u, p = _, m = e.cachedValue;
|
|
6320
6320
|
m?.isIRange || (o.pushAt(g, p, m), s.append(g, p));
|
|
6321
6321
|
const S = e.block, w = e.numFmt;
|
|
@@ -6336,7 +6336,7 @@ var Es = class {
|
|
|
6336
6336
|
}
|
|
6337
6337
|
});
|
|
6338
6338
|
}
|
|
6339
|
-
} else null !== w && (l.formatsConflating || (l.formatsConflating =
|
|
6339
|
+
} else null !== w && (l.formatsConflating || (l.formatsConflating = Be(r)), l.formatsConflating.append(g, p, w));
|
|
6340
6340
|
}
|
|
6341
6341
|
d();
|
|
6342
6342
|
})(t, e, _, !0);
|
|
@@ -6406,7 +6406,7 @@ var Es = class {
|
|
|
6406
6406
|
if (r?.isIRange && r.size > 1) {
|
|
6407
6407
|
if (e.uncalculated) return;
|
|
6408
6408
|
const o = t.rowIndex, s = t.colIndex;
|
|
6409
|
-
return new
|
|
6409
|
+
return new x(this._container.getRuntime(), n.getValues().clone(), {
|
|
6410
6410
|
rowStart: o,
|
|
6411
6411
|
colStart: s,
|
|
6412
6412
|
rowEnd: o + r.getRowCount() - 1,
|
|
@@ -6605,7 +6605,7 @@ var Es = class {
|
|
|
6605
6605
|
const e = r.deferCount;
|
|
6606
6606
|
o = n.finalizeValueForCell(n.evaluateAt(t.rowIndex, t.colIndex)), r.deferCount !== e && (o = this._takeDeferred(t, o));
|
|
6607
6607
|
} catch (e) {
|
|
6608
|
-
if (!(e instanceof
|
|
6608
|
+
if (!(e instanceof ft)) throw e;
|
|
6609
6609
|
o = t.cachedValue ?? null;
|
|
6610
6610
|
}
|
|
6611
6611
|
return this._fitCell(e, o);
|
|
@@ -6645,9 +6645,9 @@ var Es = class {
|
|
|
6645
6645
|
if (null !== m && null !== m.getShadowOf()) return void vs(_, n, f);
|
|
6646
6646
|
const S = g.getAxis() === E.Axis.Column, w = S ? E.Axis.Column : E.Axis.Row, I = qs, y = Us;
|
|
6647
6647
|
for (let t = 0; t < _.length; t++) {
|
|
6648
|
-
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new
|
|
6648
|
+
const n = _[t], r = S ? n.colStart : n.rowStart, o = S ? n.colEnd : n.rowEnd, s = S ? n.rowStart : n.colStart, l = S ? n.rowEnd - n.rowStart + 1 : n.colEnd - n.colStart + 1, i = new gt([e], l), a = new Array(o - r + 1);
|
|
6649
6649
|
for (let t = r; t <= o; t++) a[t - r] = [t, [[s, i]]];
|
|
6650
|
-
g.setValues(a),
|
|
6650
|
+
g.setValues(a), ie(p, n), be(p, a, S);
|
|
6651
6651
|
const c = {
|
|
6652
6652
|
colStart: n.colStart,
|
|
6653
6653
|
rowStart: n.rowStart,
|
|
@@ -6657,7 +6657,7 @@ var Es = class {
|
|
|
6657
6657
|
};
|
|
6658
6658
|
I.push({
|
|
6659
6659
|
...c,
|
|
6660
|
-
value: new
|
|
6660
|
+
value: new te(c, w)
|
|
6661
6661
|
}), y.push(c);
|
|
6662
6662
|
}
|
|
6663
6663
|
n.contentfulSpatial.insertAllNonOverlapping(I), n.notifyValues.insertAllNonOverlapping(y), I.length = 0, y.length = 0, o.setBlankShared(_), this._dirtyBlankReaders(f, _, u === e ? h : null);
|
|
@@ -6669,7 +6669,7 @@ var Es = class {
|
|
|
6669
6669
|
for (let t = 0; t < e.length; t++) null === n ? o.push(e[t]) : Hr(e[t], n, o);
|
|
6670
6670
|
for (let e = 0; e < o.length; e++) {
|
|
6671
6671
|
const n = o[e];
|
|
6672
|
-
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6672
|
+
s.colStart = n.colStart, s.rowStart = n.rowStart, s.colEnd = n.colEnd, s.rowEnd = n.rowEnd, 0 !== r.search(s).length && (this._fallbackDirty ?? (this._fallbackDirty = new J())).insertNonOverlapping({
|
|
6673
6673
|
colStart: n.colStart,
|
|
6674
6674
|
rowStart: n.rowStart,
|
|
6675
6675
|
colEnd: n.colEnd,
|
|
@@ -6686,7 +6686,7 @@ var Es = class {
|
|
|
6686
6686
|
xs(t, n.blank, e);
|
|
6687
6687
|
const r = t.getDemandedBlank();
|
|
6688
6688
|
if (0 === r.length) return;
|
|
6689
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6689
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new J()), s = t.gridId, l = Ws;
|
|
6690
6690
|
for (let t = 0; t < r.length; t++) {
|
|
6691
6691
|
const e = r[t];
|
|
6692
6692
|
l.push({
|
|
@@ -6705,7 +6705,7 @@ var Es = class {
|
|
|
6705
6705
|
if (null === n) return;
|
|
6706
6706
|
const r = n.blank;
|
|
6707
6707
|
if (0 === r.length) return;
|
|
6708
|
-
const o = this._fallbackDirty ?? (this._fallbackDirty = new
|
|
6708
|
+
const o = this._fallbackDirty ?? (this._fallbackDirty = new J()), s = t.gridId, l = Ws;
|
|
6709
6709
|
for (let t = 0; t < r.length; t++) {
|
|
6710
6710
|
const e = r[t];
|
|
6711
6711
|
l.push({
|
|
@@ -7002,7 +7002,7 @@ var Es = class {
|
|
|
7002
7002
|
const e = this._cycleOf(i), n = l === lr;
|
|
7003
7003
|
(n ? e.members : e.downstream).add(t), a = e.getEntry(n);
|
|
7004
7004
|
}
|
|
7005
|
-
s.shownGroup = i, t.state = t.state & ~Un | l << 2, e.circularConflating || (e.circularConflating =
|
|
7005
|
+
s.shownGroup = i, t.state = t.state & ~Un | l << 2, e.circularConflating || (e.circularConflating = Be(o)), e.circularConflating.append(n, r, a);
|
|
7006
7006
|
}
|
|
7007
7007
|
_cycleOf(t) {
|
|
7008
7008
|
let e = this._cycles.get(t);
|
|
@@ -7384,42 +7384,42 @@ var Es = class {
|
|
|
7384
7384
|
this._overlays = M;
|
|
7385
7385
|
const F = (t) => this._overlayFor(t), D = (t) => {
|
|
7386
7386
|
R = i.getGrid(t), b = R.getEntireCoords.bind(R), p = e(t), m = p.gridId, k = F(t), S = p.values, A = p.errorSpatial, w = p.contentfulSpatial, y = p.spillSpatial, v = p.notifyValues, x = p.notifySpillsInsert, C = p.notifySpillsRemove, p.notifyFormats, p.notifyCalcStatus, c.gridId = m;
|
|
7387
|
-
},
|
|
7387
|
+
}, T = E.Axis.Column, G = T === E.Axis.Column, B = () => {
|
|
7388
7388
|
if (N > 0) {
|
|
7389
7389
|
n(f, N), N = 0;
|
|
7390
7390
|
for (const t of M.values()) t.reset();
|
|
7391
7391
|
void 0 !== m && (p = e(m));
|
|
7392
7392
|
}
|
|
7393
7393
|
};
|
|
7394
|
-
this._flush =
|
|
7395
|
-
const
|
|
7396
|
-
if (
|
|
7394
|
+
this._flush = B;
|
|
7395
|
+
const V = this._exceptTables;
|
|
7396
|
+
if (V) for (let t = 0; t < _; t++) {
|
|
7397
7397
|
const e = u[t];
|
|
7398
7398
|
e.block.hasDataTable() && (e.state = e.state & ~Kn | sr, this._skippedTables.add(e));
|
|
7399
7399
|
}
|
|
7400
|
-
let
|
|
7401
|
-
for (;
|
|
7402
|
-
for (;
|
|
7403
|
-
const n = u[
|
|
7400
|
+
let O = 0;
|
|
7401
|
+
for (; O < _;) try {
|
|
7402
|
+
for (; O < _; O++) {
|
|
7403
|
+
const n = u[O], s = n.colIndex, l = n.rowIndex;
|
|
7404
7404
|
if (1 & n.state && t === n.cycleId) {
|
|
7405
7405
|
n.state &= -2;
|
|
7406
7406
|
continue;
|
|
7407
7407
|
}
|
|
7408
|
-
if (
|
|
7408
|
+
if (V && n.block.hasDataTable()) continue;
|
|
7409
7409
|
const a = n.gridId;
|
|
7410
7410
|
a !== m && D(a);
|
|
7411
7411
|
const _ = n.block, E = _.representative === n && _.isBlankAware(t), M = n.cachedValue;
|
|
7412
|
-
let z,
|
|
7413
|
-
"object" == typeof M && null !== M && (M.isIRange ?
|
|
7414
|
-
const
|
|
7415
|
-
|
|
7416
|
-
const
|
|
7417
|
-
if (
|
|
7418
|
-
const t = On(), e =
|
|
7412
|
+
let P, z, L = !1;
|
|
7413
|
+
"object" == typeof M && null !== M && (M.isIRange ? P = M : I.isError(M, I.Code.Spill) && (z = M, L = !0));
|
|
7414
|
+
const $ = 0 !== (n.state & $n);
|
|
7415
|
+
$ && (n.state & Kn) !== sr && (B(), this.doDemandEvaluate(t, e, this._demandBatch, B), c.gridId = a);
|
|
7416
|
+
const H = $ ? null : en(n), j = n.inputsAt;
|
|
7417
|
+
if (H && j >= 0) {
|
|
7418
|
+
const t = On(), e = H.length;
|
|
7419
7419
|
for (let n = 0; n < e; n++) {
|
|
7420
|
-
const e =
|
|
7420
|
+
const e = H[n];
|
|
7421
7421
|
if (I.isError(e)) {
|
|
7422
|
-
t[
|
|
7422
|
+
t[j + n] = e;
|
|
7423
7423
|
continue;
|
|
7424
7424
|
}
|
|
7425
7425
|
const r = e.colStart, o = e.rowStart, s = e.colEnd, l = e.rowEnd;
|
|
@@ -7428,156 +7428,156 @@ var Es = class {
|
|
|
7428
7428
|
a && a !== m && (_ = i.getGrid(a), _ && (c = _.getValues(), u = F(a), h = _.getEntireCoords.bind(_)));
|
|
7429
7429
|
let f = _;
|
|
7430
7430
|
u.intersects(o, r, l, s) && (c = u, f = u);
|
|
7431
|
-
const g = new
|
|
7432
|
-
g._setErrorIndex(f), t[
|
|
7431
|
+
const g = new ue(d, c, { ...e }, null, h, i.resolveScope);
|
|
7432
|
+
g._setErrorIndex(f), t[j + n] = g;
|
|
7433
7433
|
}
|
|
7434
7434
|
}
|
|
7435
7435
|
}
|
|
7436
|
-
|
|
7437
|
-
const
|
|
7436
|
+
H && null !== h && 0 !== h.getOpenCount() && 0 === (n.state & Yn) && jl(H, m, i) && (n.state |= Yn);
|
|
7437
|
+
const K = G ? s : l, q = G ? l : s;
|
|
7438
7438
|
c.node = n, c.colIndex = s, c.rowIndex = l, c.drawIndex = 0;
|
|
7439
|
-
const
|
|
7440
|
-
let
|
|
7441
|
-
const Z = 4 & n.state ? 0 !== (n.state & nr) ?
|
|
7442
|
-
let
|
|
7443
|
-
const
|
|
7444
|
-
if (
|
|
7439
|
+
const W = _.formula;
|
|
7440
|
+
let X, Q = null, Y = !1;
|
|
7441
|
+
const Z = 4 & n.state ? 0 !== (n.state & nr) ? U.CalcStatus.Working : U.CalcStatus.Waiting : 0;
|
|
7442
|
+
let tt = Z;
|
|
7443
|
+
const et = r ? 0 : Z, nt = n.ext;
|
|
7444
|
+
if ($ && !this._iterate && 0 !== (n.state & qn)) null !== nt && (nt.demandValue = void 0), X = Ys(n), tt = 0;
|
|
7445
7445
|
else {
|
|
7446
|
-
if (
|
|
7447
|
-
const t = null !==
|
|
7448
|
-
null !==
|
|
7446
|
+
if ($) {
|
|
7447
|
+
const t = null !== nt ? nt.demandValue : void 0;
|
|
7448
|
+
null !== nt && (nt.demandValue = void 0), X = void 0 === t ? 0 : t;
|
|
7449
7449
|
} else {
|
|
7450
7450
|
if (n.state = n.state & ~Kn | or, c.perCellRead = !1, c.positionRead = !1, 0 !== (n.state & tr)) {
|
|
7451
7451
|
n.state &= ~tr;
|
|
7452
7452
|
const t = this._settlePass ? bs(S, y, l, s) : null;
|
|
7453
7453
|
if (null !== t && t.direct) {
|
|
7454
7454
|
Y = !0, n.state &= -2621441;
|
|
7455
|
-
const e =
|
|
7456
|
-
e?.isIRange ? (
|
|
7455
|
+
const e = fe(t);
|
|
7456
|
+
e?.isIRange ? (X = W.finalizeValueForCell(e), Q = t) : X = t;
|
|
7457
7457
|
}
|
|
7458
7458
|
}
|
|
7459
7459
|
if (!Y) {
|
|
7460
7460
|
this._planStats.evaluated++, n.state &= -2621505;
|
|
7461
7461
|
const t = c.deferCount;
|
|
7462
|
-
|
|
7462
|
+
X = W.evaluateAt(l, s), X = W.finalizeValueForCell(X), (c.perCellRead || c.positionRead) && (n.block.positionRead = !0), c.deferCount !== t && (X = this._takeDeferred(n, X), Q = this._spillHolder, this._spillHolder = null);
|
|
7463
7463
|
}
|
|
7464
7464
|
}
|
|
7465
|
-
|
|
7465
|
+
tt = 0 !== (n.state & er) ? U.CalcStatus.Working : 0 !== (n.state & (Yn | Zn)) ? U.CalcStatus.Waiting : 0, 0 !== tt && (n.state |= Zn);
|
|
7466
7466
|
}
|
|
7467
|
-
let
|
|
7468
|
-
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768),
|
|
7469
|
-
const
|
|
7470
|
-
if (
|
|
7467
|
+
let rt;
|
|
7468
|
+
(n.state & Kn) !== sr && (n.state = n.state & ~Kn | 768), tt !== et && (0 === tt ? n.state &= ~(4 | nr) : tt === U.CalcStatus.Working ? n.state |= 4 | nr : n.state = (4 | n.state) & ~nr, p.calcStatusConflating || (p.calcStatusConflating = Be(G)), p.calcStatusConflating.append(K, q, 0 !== tt && tt)), $ && k.takeDemand(l, s);
|
|
7469
|
+
const ot = n.ext, st = null !== ot ? ot.fixedRef : null;
|
|
7470
|
+
if (P || z || st) {
|
|
7471
7471
|
Zs.colStart = s, Zs.rowStart = l, Zs.colEnd = s, Zs.rowEnd = l;
|
|
7472
7472
|
const t = y.search(Zs);
|
|
7473
|
-
for (let e = 0; !
|
|
7473
|
+
for (let e = 0; !rt && e < t.length; e++) {
|
|
7474
7474
|
const n = t[e];
|
|
7475
|
-
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (
|
|
7475
|
+
n.value.isAnchor(l, s) && "pivot" !== n.value.getKind() && (rt = n);
|
|
7476
7476
|
}
|
|
7477
|
-
if (
|
|
7477
|
+
if (rt && (y.remove(rt, Go), !rt || !rt.value.getError())) {
|
|
7478
7478
|
const t = {
|
|
7479
|
-
...o.sanitizeRange(
|
|
7480
|
-
scope:
|
|
7479
|
+
...o.sanitizeRange(rt),
|
|
7480
|
+
scope: rt.scope,
|
|
7481
7481
|
value: null
|
|
7482
7482
|
};
|
|
7483
|
-
w.insertNonOverlapping(t), S.delete(t),
|
|
7483
|
+
w.insertNonOverlapping(t), S.delete(t), ie(A, t);
|
|
7484
7484
|
}
|
|
7485
7485
|
}
|
|
7486
|
-
|
|
7487
|
-
let
|
|
7488
|
-
const
|
|
7489
|
-
let
|
|
7490
|
-
if (
|
|
7491
|
-
|
|
7486
|
+
X = this._fitCell(_, X);
|
|
7487
|
+
let lt = 1, it = 1;
|
|
7488
|
+
const at = X, ct = "object" == typeof X && null !== X, dt = ct && at.isIRange;
|
|
7489
|
+
let ht, ut = ct && I.isError(X, I.Code.Spill);
|
|
7490
|
+
if (st) {
|
|
7491
|
+
lt = st.colEnd - st.colStart + 1, it = st.rowEnd - st.rowStart + 1;
|
|
7492
7492
|
const e = {
|
|
7493
|
-
colStart:
|
|
7494
|
-
rowStart:
|
|
7495
|
-
colEnd:
|
|
7496
|
-
rowEnd:
|
|
7493
|
+
colStart: st.colStart,
|
|
7494
|
+
rowStart: st.rowStart,
|
|
7495
|
+
colEnd: st.colEnd,
|
|
7496
|
+
rowEnd: st.rowEnd,
|
|
7497
7497
|
scope: a
|
|
7498
|
-
}, r = rn(
|
|
7499
|
-
S.delete(e), r && S.setValues(r),
|
|
7498
|
+
}, r = rn(X, e, G)?.tuples;
|
|
7499
|
+
S.delete(e), r && S.setValues(r), ie(A, e), be(A, r, G), ht = {
|
|
7500
7500
|
...e,
|
|
7501
|
-
value: new
|
|
7502
|
-
}, y.insert(
|
|
7501
|
+
value: new Ne(e, t, "fixed", null, Q)
|
|
7502
|
+
}, y.insert(ht), i.addDynamicPrecedent(n, e, -2), w.insertNonOverlapping({
|
|
7503
7503
|
...e,
|
|
7504
|
-
value: new
|
|
7504
|
+
value: new te(e, T)
|
|
7505
7505
|
});
|
|
7506
|
-
} else if (
|
|
7507
|
-
|
|
7506
|
+
} else if (dt && at.size > 1) {
|
|
7507
|
+
lt = at.getColumnCount(), it = at.getRowCount();
|
|
7508
7508
|
const e = vl(n), r = null !== e ? l - e.rows : l, c = null !== e ? s - e.columns : s, d = {
|
|
7509
7509
|
colStart: c,
|
|
7510
7510
|
rowStart: r,
|
|
7511
|
-
colEnd: c +
|
|
7512
|
-
rowEnd: r +
|
|
7511
|
+
colEnd: c + lt - 1,
|
|
7512
|
+
rowEnd: r + it - 1,
|
|
7513
7513
|
scope: a
|
|
7514
7514
|
}, h = b(), u = !o.isRangeWithinRange(d, h);
|
|
7515
|
-
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)),
|
|
7515
|
+
if (u && (d.colEnd = Math.min(d.colEnd, h.colEnd), d.rowEnd = Math.min(d.rowEnd, h.rowEnd)), ut = u, !ut) {
|
|
7516
7516
|
const t = w.search(d);
|
|
7517
|
-
if (
|
|
7517
|
+
if (ut = t.length > 1, !ut && 1 === t.length) {
|
|
7518
7518
|
const e = t[0], n = o.intersectRanges(d, e, Ps);
|
|
7519
|
-
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (
|
|
7519
|
+
!n || n.rowEnd === n.rowStart && n.colStart === n.colEnd && n.colStart === s && n.rowStart === l || (ut = !0);
|
|
7520
7520
|
}
|
|
7521
7521
|
}
|
|
7522
7522
|
let _, f;
|
|
7523
|
-
if (
|
|
7523
|
+
if (ut) X = I.BuiltIn.Spill, lt = 1, it = 1, _ = [[K, [[q, [X]]]]], S.setValues(_), be(A, _, G), f = {
|
|
7524
7524
|
colStart: s,
|
|
7525
7525
|
rowStart: l,
|
|
7526
7526
|
colEnd: s,
|
|
7527
7527
|
rowEnd: l
|
|
7528
7528
|
};
|
|
7529
7529
|
else {
|
|
7530
|
-
const t = on(
|
|
7531
|
-
t && (_ = t.tuples), S.delete(d), _ && S.setValues(_),
|
|
7530
|
+
const t = on(at, G ? c : r, G ? r : c);
|
|
7531
|
+
t && (_ = t.tuples), S.delete(d), _ && S.setValues(_), ie(A, d), be(A, _, G), f = d;
|
|
7532
7532
|
}
|
|
7533
|
-
const g =
|
|
7533
|
+
const g = ut ? {
|
|
7534
7534
|
colStart: s,
|
|
7535
7535
|
rowStart: l,
|
|
7536
7536
|
colEnd: s,
|
|
7537
7537
|
rowEnd: l,
|
|
7538
7538
|
scope: a
|
|
7539
7539
|
} : d;
|
|
7540
|
-
|
|
7540
|
+
ht = {
|
|
7541
7541
|
...g,
|
|
7542
|
-
value: new
|
|
7543
|
-
}, y.insert(
|
|
7542
|
+
value: new Ne(g, t, ut ? "error" : "dynamic", ut || null === e ? null : e, Q, ut ? d : null)
|
|
7543
|
+
}, y.insert(ht), i.addDynamicPrecedent(n, d, -2), w.insertNonOverlapping({
|
|
7544
7544
|
...f,
|
|
7545
|
-
value: new
|
|
7545
|
+
value: new te(f, T)
|
|
7546
7546
|
});
|
|
7547
7547
|
}
|
|
7548
|
-
!E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n,
|
|
7549
|
-
let
|
|
7550
|
-
if ((
|
|
7551
|
-
const t =
|
|
7548
|
+
!E || _.blankCycleId === t && _.blankMarkId === this._passMarkId || this._finalizeRepresentative(n, X, p, 0 !== tt || $ || !0 === dt || ut || null !== st || Y);
|
|
7549
|
+
let _t = !1;
|
|
7550
|
+
if ((rt || ht || ut || z) && (_t = o.isEqualRanges(rt, ht), rt && C.push(rt), ht && x.push(ht)), ht || rt) {
|
|
7551
|
+
const t = rt ?? ht, e = ht ?? rt, r = {
|
|
7552
7552
|
colStart: Math.min(s, t.colStart, e.colStart),
|
|
7553
7553
|
rowStart: Math.min(l, t.rowStart, e.rowStart),
|
|
7554
7554
|
colEnd: Math.max(s, t.colEnd, e.colEnd),
|
|
7555
7555
|
rowEnd: Math.max(l, t.rowEnd, e.rowEnd),
|
|
7556
7556
|
scope: a
|
|
7557
7557
|
};
|
|
7558
|
-
v.insertNonOverlapping(r),
|
|
7558
|
+
v.insertNonOverlapping(r), _t && ut === L || (this._invalidatePlans(), i.getPrecedents().search(r).length > 0 && (n.state |= 1, g || (g = new J()), g.insertNonOverlapping(r)));
|
|
7559
7559
|
}
|
|
7560
|
-
n.cachedValue =
|
|
7561
|
-
const
|
|
7562
|
-
|
|
7563
|
-
const
|
|
7564
|
-
if (
|
|
7560
|
+
n.cachedValue = X, f[N++] = n;
|
|
7561
|
+
const ft = null !== h && h.hasHolders() ? fe(X) : X;
|
|
7562
|
+
dt || st || k.push(l, s, ft), N >= (k.observed ? As : ks) && B(), (0 !== (n.state & qn) || null !== n.ext && 0 !== n.ext.shownGroup) && this._trackCircular(n, p, K, q, G);
|
|
7563
|
+
const gt = n.dependents, pt = gt.length;
|
|
7564
|
+
if (pt > 0) {
|
|
7565
7565
|
const t = !!(4 & n.state), e = !this._iterate && 0 !== (n.state & qn);
|
|
7566
7566
|
e && (this._taintGroup = n.ext.cycleGroup);
|
|
7567
|
-
for (let n = 0; n <
|
|
7568
|
-
const r =
|
|
7567
|
+
for (let n = 0; n < pt; n++) {
|
|
7568
|
+
const r = gt[n];
|
|
7569
7569
|
e && ln(r, l, s, this._taintDownstream);
|
|
7570
7570
|
const o = r.value.index;
|
|
7571
|
-
o < 0 || (cn(r) && (Ol = o, Pl =
|
|
7571
|
+
o < 0 || (cn(r) && (Ol = o, Pl = ft, ln(r, l, s, $l)), t && ln(r, l, s, Hl));
|
|
7572
7572
|
}
|
|
7573
7573
|
}
|
|
7574
7574
|
}
|
|
7575
7575
|
} catch (n) {
|
|
7576
|
-
const r = u[
|
|
7576
|
+
const r = u[O];
|
|
7577
7577
|
if (n instanceof Ye || n instanceof Je && this._iterate) {
|
|
7578
7578
|
const o = Ks;
|
|
7579
7579
|
if (o.length = 0, n instanceof Ye) for (let t = 0; t < n.count; t++) o.push(n.nodes[t]);
|
|
7580
|
-
o.push(r),
|
|
7580
|
+
o.push(r), B(), r.state &= ~Kn, this.doDemandEvaluate(t, e, o, B);
|
|
7581
7581
|
} else {
|
|
7582
7582
|
if (!(n instanceof Je || n instanceof nn)) throw n;
|
|
7583
7583
|
{
|
|
@@ -7589,17 +7589,17 @@ var Es = class {
|
|
|
7589
7589
|
}
|
|
7590
7590
|
c.gridId = r.gridId;
|
|
7591
7591
|
}
|
|
7592
|
-
c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER,
|
|
7592
|
+
c.node = null, c.colIndex = Number.MAX_SAFE_INTEGER, c.rowIndex = Number.MAX_SAFE_INTEGER, B();
|
|
7593
7593
|
for (const t of M.values()) t.commitDemand();
|
|
7594
7594
|
this._flush = null, this._overlays = null;
|
|
7595
|
-
const
|
|
7596
|
-
return null !==
|
|
7595
|
+
const P = this._fallbackDirty;
|
|
7596
|
+
return null !== P && (this._fallbackDirty = null, g ? g.insertAllNonOverlapping(P.all()) : g = P), (() => {
|
|
7597
7597
|
const t = Bn, e = Vn;
|
|
7598
7598
|
for (let n = 0; n < e; n++) t[n] = void 0;
|
|
7599
7599
|
Vn = 0;
|
|
7600
7600
|
})(), this._planStats.evaluateMs += Ds() - l, g;
|
|
7601
7601
|
}
|
|
7602
|
-
}, Is = (t, e) => new
|
|
7602
|
+
}, Is = (t, e) => new C.ArrayList(t.slice(0, e));
|
|
7603
7603
|
function ys(t, e, n, r, o, s) {
|
|
7604
7604
|
const l = e.rowStart + n, i = e.rowStart + r, a = e.colStart + o, c = e.colStart + s;
|
|
7605
7605
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -7612,7 +7612,7 @@ function vs(t, e, n) {
|
|
|
7612
7612
|
const r = e.values, o = e.errorSpatial, s = qs, l = Us;
|
|
7613
7613
|
for (let i = 0; i < t.length; i++) {
|
|
7614
7614
|
const a = t[i];
|
|
7615
|
-
r.delete(a),
|
|
7615
|
+
r.delete(a), ie(o, a);
|
|
7616
7616
|
const c = {
|
|
7617
7617
|
colStart: a.colStart,
|
|
7618
7618
|
rowStart: a.rowStart,
|
|
@@ -7641,7 +7641,7 @@ function Cs(t, e, n) {
|
|
|
7641
7641
|
}
|
|
7642
7642
|
var bs = (t, e, n, r) => {
|
|
7643
7643
|
const o = t.getValueAt(n, r);
|
|
7644
|
-
return
|
|
7644
|
+
return oe(o) ? o : L(e, n, r);
|
|
7645
7645
|
}, Rs = Symbol("unsetGridId"), As = 1024, ks = 65536;
|
|
7646
7646
|
function Ns(t, e) {
|
|
7647
7647
|
return t.scope !== e.scope ? null === t.scope ? -1 : null === e.scope ? 1 : t.scope.localeCompare(e.scope) : t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
|
|
@@ -7717,12 +7717,12 @@ var Ps = {
|
|
|
7717
7717
|
}, Qs = (t) => {
|
|
7718
7718
|
const e = t.ext;
|
|
7719
7719
|
return null === e ? 0 : 0 !== (t.state & qn) ? e.cycleGroup : e.shownGroup;
|
|
7720
|
-
}, Ys = (t) =>
|
|
7720
|
+
}, Ys = (t) => fe(t.cachedValue) ?? 0, Zs = {
|
|
7721
7721
|
rowStart: 0,
|
|
7722
7722
|
colStart: 0,
|
|
7723
7723
|
rowEnd: 0,
|
|
7724
7724
|
colEnd: 0
|
|
7725
|
-
}, tl = 1e4, el =
|
|
7725
|
+
}, tl = 1e4, el = ge(tl), nl = ge(tl), rl = ge(tl), ol = ge(tl), sl = ge(tl), ll = ge(tl), il = ge(tl), al = ge(tl), cl = ge(tl), dl = ge(tl), hl = ge(tl), ul = ge(tl), _l = ge(tl), fl = ge(tl), gl = ge(tl), pl = ge(tl), ml = [null], Sl = [], wl = -1, El = -1, Il = -1, yl = -1;
|
|
7726
7726
|
function vl(t) {
|
|
7727
7727
|
const e = t.block.formula;
|
|
7728
7728
|
return null !== e && void 0 !== e.getSpillOrigin ? e.getSpillOrigin() : null;
|
|
@@ -7735,7 +7735,7 @@ function xl(t) {
|
|
|
7735
7735
|
const o = vl(t);
|
|
7736
7736
|
return Il = null !== o ? t.rowIndex - o.rows : t.rowIndex, yl = null !== o ? t.colIndex - o.columns : t.colIndex, wl = Il + r.getRowCount() - 1, El = yl + r.getColumnCount() - 1, wl > Il || El > yl;
|
|
7737
7737
|
}
|
|
7738
|
-
var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml =
|
|
7738
|
+
var Cl = null, bl = 0, Rl = 64, Al = 4, kl = 1024, Nl = 7, Ml = ge(8), Fl = ge(8), Dl = ge(8), Tl = Array.from({ length: 8 }, () => ({
|
|
7739
7739
|
colStart: 0,
|
|
7740
7740
|
colEnd: 0,
|
|
7741
7741
|
rowStart: 0,
|
|
@@ -7767,10 +7767,10 @@ function Kl(t, e) {
|
|
|
7767
7767
|
return n === r ? 0 : 1 / 0;
|
|
7768
7768
|
}
|
|
7769
7769
|
var ql = {
|
|
7770
|
-
values:
|
|
7770
|
+
values: ge(tl),
|
|
7771
7771
|
length: 0
|
|
7772
7772
|
}, Ul = {
|
|
7773
|
-
values:
|
|
7773
|
+
values: ge(tl),
|
|
7774
7774
|
length: 0
|
|
7775
7775
|
}, Wl = class {
|
|
7776
7776
|
constructor(t) {
|
|
@@ -7781,14 +7781,14 @@ var ql = {
|
|
|
7781
7781
|
for (let e = 0; e < a.length; e++) {
|
|
7782
7782
|
const c = a[e], d = c.getId(), h = c.getSheetNames();
|
|
7783
7783
|
for (let t = 0; t < h.length; t++) {
|
|
7784
|
-
const e =
|
|
7784
|
+
const e = pe(d, t);
|
|
7785
7785
|
s.add(e), o && (n(e) ? this._loadedData.get(e) !== (c.getSheetData(t)?.data ?? null) && (r(e), this._registerSheet(c, t, e), i.add(d)) : (this._registerSheet(c, t, e), i.add(d)));
|
|
7786
7786
|
}
|
|
7787
7787
|
const u = c.getDefinedNames();
|
|
7788
7788
|
for (let e = 0; e < u.length; e++) {
|
|
7789
7789
|
const n = u[e];
|
|
7790
7790
|
if (!n.name) continue;
|
|
7791
|
-
const r = n.sheetIndex, o =
|
|
7791
|
+
const r = n.sheetIndex, o = pe(d, void 0 !== r && r >= 0 && r < h.length ? r : -1), s = Xl(o, n.name);
|
|
7792
7792
|
l.add(s);
|
|
7793
7793
|
const a = this._namesByKey.get(s);
|
|
7794
7794
|
if (a) {
|
|
@@ -7800,12 +7800,12 @@ var ql = {
|
|
|
7800
7800
|
} else this._registerName(c, o, n, t), i.add(d);
|
|
7801
7801
|
}
|
|
7802
7802
|
}
|
|
7803
|
-
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(
|
|
7803
|
+
for (const t of this._registeredSheetGrids()) s.has(t) || (r(t), this._loadedData.delete(t), i.add(y(t).bookId));
|
|
7804
7804
|
for (const [t, e] of this._namesByKey) {
|
|
7805
7805
|
if (l.has(t)) continue;
|
|
7806
7806
|
this._namesByKey.delete(t), this._namesById.delete(e.getId());
|
|
7807
7807
|
const n = this._hostsById.get(e.getId());
|
|
7808
|
-
this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(
|
|
7808
|
+
this._hostsById.delete(e.getId()), n?.setPlaceholder(I.BuiltIn.Name.toString()), i.add(y(e.getScope()).bookId);
|
|
7809
7809
|
}
|
|
7810
7810
|
return i;
|
|
7811
7811
|
}
|
|
@@ -7818,7 +7818,7 @@ var ql = {
|
|
|
7818
7818
|
_registeredSheetGrids() {
|
|
7819
7819
|
const t = [];
|
|
7820
7820
|
for (const e of this._options.gridIds()) {
|
|
7821
|
-
const n =
|
|
7821
|
+
const n = y(e);
|
|
7822
7822
|
n && n.sheetIndex >= 0 && t.push(e);
|
|
7823
7823
|
}
|
|
7824
7824
|
return t;
|
|
@@ -7834,7 +7834,7 @@ var ql = {
|
|
|
7834
7834
|
for (let t = 0; t < o.length; t++) {
|
|
7835
7835
|
const [n, s] = o[t], l = s.length;
|
|
7836
7836
|
for (let t = 0; t < l; t++) {
|
|
7837
|
-
const o =
|
|
7837
|
+
const o = Ht.fromJSONValue(s.at(t));
|
|
7838
7838
|
null != o && e.push({
|
|
7839
7839
|
col: n + t,
|
|
7840
7840
|
row: r,
|
|
@@ -7845,7 +7845,7 @@ var ql = {
|
|
|
7845
7845
|
}
|
|
7846
7846
|
if (0 === e.length) return null;
|
|
7847
7847
|
e.sort((t, e) => t.col - e.col || t.row - e.row);
|
|
7848
|
-
const n = new
|
|
7848
|
+
const n = new st.Builder();
|
|
7849
7849
|
for (let t = 0; t < e.length; t++) n.pushAt(e[t].col, e[t].row, e[t].value);
|
|
7850
7850
|
return n.build()?.tuples ?? null;
|
|
7851
7851
|
}(o);
|
|
@@ -7866,7 +7866,7 @@ var ql = {
|
|
|
7866
7866
|
const { queue: l, recompileNamed: i } = this._options;
|
|
7867
7867
|
let a = o.trim();
|
|
7868
7868
|
a.startsWith("=") && (a = a.substring(1)), a || (a = I.BuiltIn.Ref.toString());
|
|
7869
|
-
const c =
|
|
7869
|
+
const c = y(r), d = c.sheetIndex >= 0 ? c.sheetIndex : n.getSheetNames().length > 0 ? 0 : -1, h = pe(c.bookId, d);
|
|
7870
7870
|
l(async () => {
|
|
7871
7871
|
this._hostsById.get(t) === e && e.setBody({
|
|
7872
7872
|
coords: Jl,
|
|
@@ -7902,7 +7902,7 @@ var ql = {
|
|
|
7902
7902
|
deferOrdinal: 0,
|
|
7903
7903
|
deferRoot: !1,
|
|
7904
7904
|
deferServed: null
|
|
7905
|
-
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(
|
|
7905
|
+
}, this._cycleId = 0, this._staticEpoch = 1, this._precedentEpoch = 1, this._epochSeenFormulas = null, this._epochSeenPrecedents = null, this._epochSeenDynamics = null, this._volatiles = /* @__PURE__ */ new Set(), this._calculatedCommitId = null, this._calculatedEngineId = null, this._holdsGrids = !1, this._engineIds = /* @__PURE__ */ new Map(), this._landingOf = /* @__PURE__ */ new Map(), this._mirroredId = null, this._lastRevert = null, this._symbolIndex = null, this._symbolIndexOf = null, this._sheetsDerived = null, this._tablesDerived = null, this._namesDerived = null, this._collecting = null, this._recompileNamedPending = null, this._recompileLoadedPending = null, this._invalidateNamedPending = null, this.resolveScope = (t) => this._symbols.resolve(Bt.Sheet, t)?.toString(), this._heldCloneKey = null, this._callbacks = t.callbacks, this._runtime = t.runtime, this._richData = t.richData ?? Me.DetachedContext, this._symbols = t.symbols, this._resolvers = t.resolvers, this._getSheetIndex = t.getSheetIndex ?? null, this._legacyIntersect = !0 === t.legacyIntersect, this._gridOptions = t.gridOptions ?? {}, this._calculation = t.calculation;
|
|
7906
7906
|
const e = t.replica;
|
|
7907
7907
|
this._updateState({
|
|
7908
7908
|
gridsAll: /* @__PURE__ */ new Map(),
|
|
@@ -7922,7 +7922,7 @@ var ql = {
|
|
|
7922
7922
|
dynamicByBlock: /* @__PURE__ */ new Map(),
|
|
7923
7923
|
dirtySpatial: new wn()
|
|
7924
7924
|
}), t.modelCommitId && this.mirror(t.modelCommitId), this._context = new io(this, E.Axis.Column, t.functions), this._deferred = new Qo(this._calcScope, (t, e, n) => this._holderAt(t, e, n), () => this._runtime.getRandom(), () => this._settle(), void 0, (t, e) => this._normalizeResult(t, e), {
|
|
7925
|
-
createRichData: (t, e) =>
|
|
7925
|
+
createRichData: (t, e) => Pt.fromJSON({
|
|
7926
7926
|
type: t,
|
|
7927
7927
|
data: e
|
|
7928
7928
|
}, this._richData),
|
|
@@ -8010,7 +8010,7 @@ var ql = {
|
|
|
8010
8010
|
const r = this.getGrid(t);
|
|
8011
8011
|
if (!r) return null;
|
|
8012
8012
|
const o = r.getValues().getValueAt(e, n);
|
|
8013
|
-
return
|
|
8013
|
+
return oe(o) ? o : L(r.getSpills(), e, n);
|
|
8014
8014
|
}
|
|
8015
8015
|
_settleNow() {
|
|
8016
8016
|
const t = this._deferred, e = t.takeMoved();
|
|
@@ -8030,7 +8030,7 @@ var ql = {
|
|
|
8030
8030
|
if (null === _ || !o.isLiveNode(_)) continue;
|
|
8031
8031
|
const f = _.gridId, g = n.gridsAll.get(f);
|
|
8032
8032
|
if (!g) continue;
|
|
8033
|
-
const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w =
|
|
8033
|
+
const p = _.rowIndex, m = _.colIndex, S = g.getValues().getValueAt(p, m), w = oe(S), E = w ? S : L(g.getSpills(), p, m);
|
|
8034
8034
|
if (null === E || E.calls.indexOf(u) < 0) continue;
|
|
8035
8035
|
if (!E.direct) {
|
|
8036
8036
|
c.add(_), i(s, f).add(p, m);
|
|
@@ -8083,7 +8083,7 @@ var ql = {
|
|
|
8083
8083
|
}), s[t] = {
|
|
8084
8084
|
...e,
|
|
8085
8085
|
value: !1
|
|
8086
|
-
},
|
|
8086
|
+
}, ie(r.errorSpatial, e);
|
|
8087
8087
|
}
|
|
8088
8088
|
r.notifyCalcStatus.load(s);
|
|
8089
8089
|
for (const [t, e] of n.errors) r.errorSpatial.load(ni(e).map((e) => ({
|
|
@@ -8109,8 +8109,8 @@ var ql = {
|
|
|
8109
8109
|
createFormulaBlock(t, e, n, r, o, s, l) {
|
|
8110
8110
|
const i = this._callbacks.getCompiler(s);
|
|
8111
8111
|
if (!i) throw new Error("The calculation engine has not started; nothing can compile yet.");
|
|
8112
|
-
const a =
|
|
8113
|
-
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ?
|
|
8112
|
+
const a = y(t)?.bookId ?? null, c = a ? null : y(this._externalBindings.getNameById(t)?.getScope() ?? "")?.bookId ?? null;
|
|
8113
|
+
return new bn(i.compile(e.getRuntime(), r, o, n, this._symbols, (t) => e.getFunction(t), a ?? c ? pe(a ?? c, -1) : this.getSheetName(t), l, a ? { book: a } : void 0), e, this._calcScope, t, () => this.getGrid(t)?.getEntireCoords() ?? null, this._resolvers);
|
|
8114
8114
|
}
|
|
8115
8115
|
getSymbols() {
|
|
8116
8116
|
return this._symbols;
|
|
@@ -8127,15 +8127,15 @@ var ql = {
|
|
|
8127
8127
|
return this._sheetsCache().ids;
|
|
8128
8128
|
}
|
|
8129
8129
|
getSheetSpanIds(t) {
|
|
8130
|
-
const e =
|
|
8130
|
+
const e = V(t);
|
|
8131
8131
|
if (e) {
|
|
8132
8132
|
const t = this.getSheetIds(), n = t.indexOf(e[0]), r = t.indexOf(e[1]);
|
|
8133
8133
|
return -1 === n || -1 === r ? null : t.slice(Math.min(n, r), Math.max(n, r) + 1);
|
|
8134
8134
|
}
|
|
8135
|
-
const n =
|
|
8135
|
+
const n = y(t);
|
|
8136
8136
|
if (!n || n.sheetEnd === n.sheetIndex) return null;
|
|
8137
8137
|
const r = [];
|
|
8138
|
-
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(
|
|
8138
|
+
for (let t = n.sheetIndex; t <= n.sheetEnd; t++) r.push(pe(n.bookId, t));
|
|
8139
8139
|
return r;
|
|
8140
8140
|
}
|
|
8141
8141
|
getFormulas() {
|
|
@@ -8244,7 +8244,7 @@ var ql = {
|
|
|
8244
8244
|
}
|
|
8245
8245
|
markDirty(t) {
|
|
8246
8246
|
const e = this._getState(), n = e.dirtySpatial.clone(this._heldCloneKey), r = e.precedentSpatial, o = e.formulaSpatial;
|
|
8247
|
-
let s = !1, l =
|
|
8247
|
+
let s = !1, l = Y(t, E.Axis.Column, 2);
|
|
8248
8248
|
for (let t = 0; t < l.length; t++) {
|
|
8249
8249
|
const e = l[t];
|
|
8250
8250
|
(r?.has(e) || o?.has(e)) && (s = !0, n.insertNonOverlapping(e));
|
|
@@ -8446,7 +8446,7 @@ var ql = {
|
|
|
8446
8446
|
}), e;
|
|
8447
8447
|
}
|
|
8448
8448
|
createEngineGrid(t) {
|
|
8449
|
-
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ??
|
|
8449
|
+
const e = t.id, n = t.sizeOf, r = t.entireCoords, o = void 0 !== n ? () => this.getGrid(n)?.getEntireCoords() ?? O : r ? () => r : void 0, s = this._callbacks;
|
|
8450
8450
|
return this.createBackendGrid({
|
|
8451
8451
|
uuid: e,
|
|
8452
8452
|
shadowOf: t.shadowOf,
|
|
@@ -8494,15 +8494,15 @@ var ql = {
|
|
|
8494
8494
|
switch (n.type) {
|
|
8495
8495
|
case "sheets": return this.applySheets(n.sheets), {
|
|
8496
8496
|
cycleId: this._cycleId,
|
|
8497
|
-
commitId:
|
|
8497
|
+
commitId: $t(n)
|
|
8498
8498
|
};
|
|
8499
8499
|
case "tables": return this.applyTables(n.changes), {
|
|
8500
8500
|
cycleId: this._cycleId,
|
|
8501
|
-
commitId:
|
|
8501
|
+
commitId: $t(n)
|
|
8502
8502
|
};
|
|
8503
8503
|
case "names": return this.applyNames(n.changes), {
|
|
8504
8504
|
cycleId: this._cycleId,
|
|
8505
|
-
commitId:
|
|
8505
|
+
commitId: $t(n)
|
|
8506
8506
|
};
|
|
8507
8507
|
case "nameGraph": return {
|
|
8508
8508
|
cycleId: this._cycleId,
|
|
@@ -8515,7 +8515,7 @@ var ql = {
|
|
|
8515
8515
|
const o = this.getGrid(t);
|
|
8516
8516
|
return o ? r ? o._apply(n, this.getCurrentCommitId(), !0) : o._apply(n, e) : {
|
|
8517
8517
|
cycleId: this._cycleId,
|
|
8518
|
-
commitId:
|
|
8518
|
+
commitId: $t(n)
|
|
8519
8519
|
};
|
|
8520
8520
|
}
|
|
8521
8521
|
applyHeld(t, e) {
|
|
@@ -8580,7 +8580,7 @@ var ql = {
|
|
|
8580
8580
|
return l;
|
|
8581
8581
|
}
|
|
8582
8582
|
followRestore(t, e) {
|
|
8583
|
-
return e ===
|
|
8583
|
+
return e === we.Status.Off || e === we.Status.Error ? (this.retarget(t), !1) : e !== we.Status.Running ? (null !== this.restoreTo(t) || this.holdsModelCommit(t) || this.retarget(t), !1) : this.holdsModelCommit(t) ? (this.restoreTo(t), !1) : (this.retarget(t), !0);
|
|
8584
8584
|
}
|
|
8585
8585
|
rebuild(t) {
|
|
8586
8586
|
this.drop(), this.setReplica(t), this.open();
|
|
@@ -8612,13 +8612,13 @@ var ql = {
|
|
|
8612
8612
|
if (u.deferCount !== l) {
|
|
8613
8613
|
const t = this._deferred, e = t.endEvaluation();
|
|
8614
8614
|
o.cachedValue = e.calls.length > 0 ? t.newHolder(a, e) : void 0, t.flush();
|
|
8615
|
-
} else
|
|
8615
|
+
} else oe(o.cachedValue) && (o.cachedValue = void 0);
|
|
8616
8616
|
let c = tn(t.finalizeValue(a));
|
|
8617
8617
|
return null === c && (c = 0), !r || c?.isIRange || Array.isArray(c) ? c : i.createRange(1, 1, c);
|
|
8618
8618
|
},
|
|
8619
8619
|
getCalls: () => {
|
|
8620
8620
|
const t = f.getAnchorNode().cachedValue;
|
|
8621
|
-
return
|
|
8621
|
+
return oe(t) ? t.calls : r.EmptyArray;
|
|
8622
8622
|
}
|
|
8623
8623
|
};
|
|
8624
8624
|
}
|
|
@@ -8635,7 +8635,7 @@ var ql = {
|
|
|
8635
8635
|
for (let t = 0; t < n.length; t++) {
|
|
8636
8636
|
const r = n[t].value;
|
|
8637
8637
|
if (null == r.gridId) continue;
|
|
8638
|
-
if (
|
|
8638
|
+
if (M(r.gridId) || this._externalBindings.getNameById(r.gridId)) continue;
|
|
8639
8639
|
const o = r.getReferencedSymbolIds();
|
|
8640
8640
|
if (0 === o.length) continue;
|
|
8641
8641
|
const s = r.ref, l = {
|
|
@@ -8698,10 +8698,10 @@ var ql = {
|
|
|
8698
8698
|
e ? e.push(l[t]) : s.set(u, [l[t]]);
|
|
8699
8699
|
continue;
|
|
8700
8700
|
}
|
|
8701
|
-
const _ = null != u && !n.isDefinedName(u) && !
|
|
8701
|
+
const _ = null != u && !n.isDefinedName(u) && !M(u) && !this._externalBindings.getNameById(u);
|
|
8702
8702
|
if (h && _) for (let t = 0; t < o.length; t++) {
|
|
8703
8703
|
const [e, n] = o[t];
|
|
8704
|
-
a.includes(e) && (h = h.replaceTableReferences(e, (t) =>
|
|
8704
|
+
a.includes(e) && (h = h.replaceTableReferences(e, (t) => W(t, n) ? Xt() : null));
|
|
8705
8705
|
}
|
|
8706
8706
|
const f = h && h !== i.formula ? h.getTextAt(d.rowStart, d.colStart) : i.getTextAt(d.rowStart, d.colStart);
|
|
8707
8707
|
this._writeBlockText(i, f);
|
|
@@ -8709,7 +8709,7 @@ var ql = {
|
|
|
8709
8709
|
if (s) for (const [t, e] of s) this.getGrid(t)?._rederivePrecedentsNow(e);
|
|
8710
8710
|
}
|
|
8711
8711
|
refitTableRows(t, e, n, r, s) {
|
|
8712
|
-
const l = this._symbols.bind(
|
|
8712
|
+
const l = this._symbols.bind(Bt.Sheet, t);
|
|
8713
8713
|
if (!l) return;
|
|
8714
8714
|
const i = this._getState().precedentSpatial.search({
|
|
8715
8715
|
colStart: e.colStart,
|
|
@@ -8723,7 +8723,7 @@ var ql = {
|
|
|
8723
8723
|
const e = i[t].value;
|
|
8724
8724
|
if (e.index < 0) continue;
|
|
8725
8725
|
const n = e.formulaEntry.value, r = n.gridId;
|
|
8726
|
-
if (null == r ||
|
|
8726
|
+
if (null == r || M(r) || this._externalBindings.getNameById(r)) continue;
|
|
8727
8727
|
const o = (a ??= /* @__PURE__ */ new Map()).get(n);
|
|
8728
8728
|
o ? o.includes(e.index) || o.push(e.index) : a.set(n, [e.index]);
|
|
8729
8729
|
}
|
|
@@ -8789,11 +8789,11 @@ var ql = {
|
|
|
8789
8789
|
}
|
|
8790
8790
|
}
|
|
8791
8791
|
rewriteTableReferences(t, e) {
|
|
8792
|
-
const n = (t) => e ?
|
|
8792
|
+
const n = (t) => e ? ve(t, e) : Xt(), r = this._callbacks, o = this._getState().formulaSpatial.all3D();
|
|
8793
8793
|
for (let e = 0; e < o.length; e++) {
|
|
8794
8794
|
const s = o[e].value, l = s.gridId;
|
|
8795
8795
|
if (null == l || !s.getReferencedSymbolIds().includes(t)) continue;
|
|
8796
|
-
if (r.isDefinedName(l) ||
|
|
8796
|
+
if (r.isDefinedName(l) || M(l) || this._externalBindings.getNameById(l)) continue;
|
|
8797
8797
|
const i = s.formula, a = i?.replaceTableReferences(t, n);
|
|
8798
8798
|
if (!a || a === i) continue;
|
|
8799
8799
|
const c = s.ref;
|
|
@@ -9174,7 +9174,7 @@ var ql = {
|
|
|
9174
9174
|
scope: void 0
|
|
9175
9175
|
}, ti = class {
|
|
9176
9176
|
constructor(t) {
|
|
9177
|
-
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating =
|
|
9177
|
+
this._unordered = null, this._lastMajor = -1, this._lastMinor = -1, this._isColumn = t, this._conflating = Be(t);
|
|
9178
9178
|
}
|
|
9179
9179
|
add(t, e) {
|
|
9180
9180
|
const n = this._unordered;
|
|
@@ -9203,7 +9203,7 @@ var ql = {
|
|
|
9203
9203
|
colEnd: t.colEnd,
|
|
9204
9204
|
rowEnd: t.rowEnd
|
|
9205
9205
|
}), ni = (t) => {
|
|
9206
|
-
const e =
|
|
9206
|
+
const e = Y(t, E.Axis.Column, 2), n = new Array(e.length);
|
|
9207
9207
|
for (let t = 0; t < e.length; t++) {
|
|
9208
9208
|
const r = e[t];
|
|
9209
9209
|
n[t] = {
|