@sheetxl/mcp 0.8.0-beta.24 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Cf0zmfQYfJ7zM0Ya.js → 0WuReGsjIpidu0Cr.js} +1 -1
- package/assets/{B6caaQsfOpFEgYQ4.js → 13QanvzRbNib7VHR.js} +1 -1
- package/assets/{DGI_8HyNF0eAv0P5.js → 2c1OYsVAy_w-ex-F.js} +1 -1
- package/assets/{B-t1q2NS61c2B8E4.js → 8114GVvAL1oaiJLV.js} +1 -1
- package/assets/{B16G2473LTkZP6Mq.js → 8hLtXHueDl7B_SEn.js} +1417 -1356
- package/assets/{DRzZ4bEyLRGVOLzV.js → 8mWHFnE0j-CaNsxr.js} +1 -1
- package/assets/{DaF9L7No8h8a-cqb.js → B-b7HyruDF2gdj3R.js} +2 -2
- package/assets/{CmkgQ5-IG0BSCM3R.js → B3J6davzttys1e7l.js} +3 -3
- package/assets/{doqBmhonQlHp-1Ud.js → B3lrS_GHkG6Mw5pN.js} +1 -1
- package/assets/{CnI4Nli8vtWdFKvf.js → B5rrqMYFybo3oW9k.js} +21 -21
- package/assets/{D6d1DKL15m52ZCuC.js → BB39UJoWw8tjThqY.js} +1 -1
- package/assets/{DtVSjxL6N_7WyM8Z.js → BBF_CDIKB2NIXiHg.js} +1 -1
- package/assets/{DE7G34oYbvrfXbJ7.js → BBLuTiY3V4MpFphK.js} +294 -294
- package/assets/{DM-yGHahbfA_uarn.js → BBZUslaSLC0vlZEb.js} +1 -1
- package/assets/{sJVPCrgeh0U6LbAK.js → BCdXK-2-AE6FAdRs.js} +1 -1
- package/assets/{CUYQlZz5zWsUdmRy.js → BF0C-5gSMHWBXI_k.js} +1 -1
- package/assets/{Xccc6oxtlSvJUDsC.js → BKGTzaNNBlRh7ua3.js} +1 -1
- package/assets/BOa1dD_9H3g65WbP.js +14 -0
- package/assets/{C-nA4SXN5hWHaxV6.js → BPlrBhzIqyWK19E2.js} +526 -526
- package/assets/{xD41vsQY6h60lCqz.js → BR4Wpxs0eSlaoLOl.js} +8 -8
- package/assets/{CSXmTA6w6Pnbtqvb.js → BTB4fa2DU21pP7At.js} +1 -1
- package/assets/{bv3fZLUPzd14I58C.js → BTamKr78GfsihW1a.js} +485 -485
- package/assets/{BPNLZ07Bu_B8Yhf1.js → BVfjBXAMgo4u8Y72.js} +1 -1
- package/assets/{TZnuVwhVjkOBax9F.js → BaZAIwIrqn1x69WH.js} +2 -2
- package/assets/{b8yACuWy67eIj_j2.js → Ban4yk1SYcz9Cs7n.js} +1 -1
- package/assets/{Ds4TB1hn56-RK6_f.js → BfB7Vq09p5uO-L88.js} +1 -1
- package/assets/{DOSWSyKkK4eSi4PD.js → BfEmSaLbKgcjIIpn.js} +2 -2
- package/assets/{DkQ4kxEKhKYQgfjK.js → Bfpf9b1s1bWyBXIw.js} +1 -1
- package/assets/{BrYc6PLonux_gI6b.js → BgHOi7rAHLhztiz-.js} +215 -215
- package/assets/{3VycPrqi6qgLOgGY.js → BgN67gyTyx_xz2Ny.js} +6 -6
- package/assets/{yz2PTfYm_8EGJPM5.js → BhxIJ8xdUxyMPJ_m.js} +1 -1
- package/assets/{Jy-_0a72nn5Iv1NK.js → BlMUrEA8V2S2KH0D.js} +1 -1
- package/assets/{CM-q_J5aF6YXmjeu.js → BloJ-e8xad1b_H7X.js} +3 -3
- package/assets/{C6PNMev7cs5JLgwy.js → Bm-wDNSoT-3JD2bJ.js} +1 -1
- package/assets/{BaYk1vO2hP2S3_1w.js → BoE9cj92LVH2LLy0.js} +2 -2
- package/assets/{g2Nu44uuSJFMzxEV.js → BqH4txhrgR2S-2ji.js} +2 -2
- package/assets/{DPYFRLJbHGlrcrJq.js → BrHXHm2FNXsL53bo.js} +2 -2
- package/assets/{CnKX5SPVE2iuSK42.js → BuFb0lPxYlHccrD9.js} +1 -1
- package/assets/{BkekCZ17YTtd07_C.js → ByGn4tk2SE1MH_sZ.js} +2 -2
- package/assets/{Cxzowsi6ASdZtzeI.js → C1IE0F-y65XqEYRl.js} +1 -1
- package/assets/{7vPlH3_rhJxmmBvG.js → C1JeIUEWW-RL1Rnu.js} +1 -1
- package/assets/{a2e_g9YI3J-lUD7-.js → C2sDVxKGBNlTFg6y.js} +1 -1
- package/assets/{D_tdoUtUe7cApQJn.js → C30apcFVvDHn2M4R.js} +4 -4
- package/assets/{TdDTOcC1TYhk6UuR.js → C3c2PUtIo-aWbjw4.js} +1 -1
- package/assets/{suLYEZBtGUhSYeB7.js → C4C3Ot0xeo1O0wm5.js} +1 -1
- package/assets/{By1QPrSxtnRiJu0R.js → C8zzCf71C976X7SG.js} +2 -2
- package/assets/{BxwB3iTNSE1TgHkb.js → CCS6r_ru_-bq12nu.js} +1 -1
- package/assets/{DNSWaXblwhTtI3w7.js → CDDtXZTG6nNFBQZP.js} +1 -1
- package/assets/{DL8pez0eKo8arYPj.js → CEa6wNiDRZrans9S.js} +3 -3
- package/assets/{Daaro0HbHkKXkBP-.js → CF1fqmS030ry2XQ0.js} +2 -2
- package/assets/{P6V3JAiRpC3BWceC.js → CFqF3aUKvOGFOK9O.js} +1 -1
- package/assets/{BH7ctzMzOYVTGxzA.js → CI8Pu3ko8VzQYdRD.js} +1 -1
- package/assets/{9GnbVPKozgrJpeLW.js → CICMJpasl9o4FaZi.js} +1 -1
- package/assets/{CIw6ZC3K9x-ccacl.js → CJcyMzG19TOjqNHS.js} +1 -1
- package/assets/{2YT_wstXIH6UIigi.js → CJoREr6-3iOl7iU_.js} +1 -1
- package/assets/{B4uS01J0mrSJSftQ.js → CMd7aLIwOA7bxcZm.js} +88 -88
- package/assets/{CpvJUGg9ckuCIpIS.js → CNikOloX_losH8Nz.js} +1 -1
- package/assets/{C0uu0vLKQh0S508B.js → CRZMD-wS-944FnD_.js} +40 -40
- package/assets/{CJ2hV-9ipqOEkLSG.js → CRlLpD9cfhJ9Ov9L.js} +1 -1
- package/assets/{DwNcvKM47ZHfvQM6.js → CS07BBUu6ZtXk4TZ.js} +1 -1
- package/assets/{DyiH3LlinD-38bG7.js → CX-LNahzNZRc78er.js} +1 -1
- package/assets/{DuEtCJEnG_GnJzTX.js → CY3Lmr-fgs6NqXRp.js} +1 -1
- package/assets/{KMzONx2Ps841nJHj.js → CbkCnjWs7Fpj5iQY.js} +8 -8
- package/assets/{Dlqk7XqKnAZ8Pcj3.js → CdbucPAmUkkc5pcM.js} +155 -156
- package/assets/{DRq6lQLndj73WT35.js → CfBJzpZuy1o216iZ.js} +1 -1
- package/assets/{Dk9zYXO3VoBhTdex.js → CoSNTR-pg7BZAU7o.js} +1 -1
- package/assets/{CFWwwr74qRKOBrg9.js → CpoqmW4E7rFdkRpf.js} +1 -1
- package/assets/{BAVltO4Xf7lC0Xr6.js → Cs1df4D35bBjqyvX.js} +1 -1
- package/assets/{DIgPlkEabQdKNUQn.js → CsPyLus3kh4QnahD.js} +1 -1
- package/assets/{DXCTHw-ZutNIuo_2.js → Cwe_kiigxAfceEK9.js} +1 -1
- package/assets/{CzRvg04_TIbwBH5C.js → CwzSgovxnBMrgLmJ.js} +3 -3
- package/assets/{BnNB_ejvNaLu6B3o.js → D31pY9r4JAFWw3E4.js} +1 -1
- package/assets/DCWHNfq5qCxvALwe.js +199 -0
- package/assets/{DGOgx3-IyO8bjF_t.js → DF9WfdyjHuCpsEXh.js} +63 -63
- package/assets/{LM2rVDHdB0jVUFcT.js → DOIpXsEXCaI-8VwJ.js} +1 -1
- package/assets/{76dPHG5RYA7MUV_g.js → DOXj80NXiglJXsMZ.js} +3 -3
- package/assets/{CR1aLf7CWEfPTO9a.js → DQ2vEDfVfsIGSmId.js} +1 -1
- package/assets/{Dhy6iU_09lrQnOAV.js → DQtnL5nOzSzVJhit.js} +61 -61
- package/assets/{CCF6CwJ6cbeLRl23.js → DRcmbp80jMRjxelW.js} +1 -1
- package/assets/{CFNtPYPfDPH-3BXK.js → DRy0AcTiSKQY3bih.js} +1 -1
- package/assets/{tWO-mE87mAuj1qih.js → DWr6GqsnMpLwSUno.js} +2 -2
- package/assets/{ByYJTTTUuu67hDF-.js → DXrX5tIZ1J5BhpFk.js} +4 -4
- package/assets/{CmwNIrRssYuLN2fn.js → DZxHk5oKIVvu3iJR.js} +458 -458
- package/assets/{CbJWbjmv4bz4ppIZ.js → Da0CtWhc7saaOdER.js} +318 -318
- package/assets/{mZt9BTEejCJZ4YK4.js → Dbi1_JHT_4u0nhwc.js} +1 -1
- package/assets/{C9iFJ52KwQTePQ81.js → Dcw7GSCgw_dgsum7.js} +11490 -11497
- package/assets/{fEfisM0E2fUYKIyU.js → DfuY8GdoSk8LxDFW.js} +5 -5
- package/assets/{CT4czEKWIj1GeQN8.js → DlARYdaCOVKiQzMH.js} +1 -1
- package/assets/{BJwiwzwx4Bl5L4Vq.js → DngX5ZuqqFGTp44B.js} +1 -1
- package/assets/{DFVQIZ2zZyAphhCF.js → DpwdC4SN_VYB9_ho.js} +1 -1
- package/assets/{CIY_RiLu1_FmRLAA.js → Dst0tyK__q2Q_AKk.js} +1 -1
- package/assets/{BrJd9jVVv9SQzZol.js → DvHZEP1wpb6549uf.js} +423 -423
- package/assets/{DMDTS0LH9Ke9t-3z.js → DzYvbv5u7E2H7IoB.js} +12 -7
- package/assets/{BjyXkr-CzV8mVx0t.js → G489eYf-lt3D1riX.js} +1 -1
- package/assets/{CKD460cQOgwF6uSV.js → L42Y17f0HUEpfS6U.js} +1 -1
- package/assets/{flby0g5gyZ9P2Wu2.js → O3m_QwxIRXMPFTB8.js} +1 -1
- package/assets/{7IzItpr7MkdnaAwh.js → P3Or6rEY-fHmQZbH.js} +69 -69
- package/assets/{DaHD9SY75O8wDy3p.js → PAzPVx_0jajb_7cO.js} +2 -2
- package/assets/{DJfpKncnYnrr28G0.js → PvRzzufo1V8BuC-I.js} +1 -1
- package/assets/{CFT_tDogP98gTbh7.js → Sm1ouHLiXlCuQVKV.js} +79 -79
- package/assets/{D-vo2bQyAmStQmD9.js → WC-THJfezYSFdiMF.js} +1 -1
- package/assets/{DczQhB3mRSUw6GCf.js → YK80feN98r6GVZv5.js} +1 -1
- package/assets/{DPLTGglaPovTg9e5.js → cl0C9YlF3Ds-lHps.js} +1 -1
- package/assets/{BXWGS09xFG81nnIT.js → eExV3IoVMxYkv5GO.js} +1 -1
- package/assets/{qc7rA-Z3a4rkVQPx.js → g3TrQtFS0qJZeshT.js} +215 -215
- package/assets/{B8bEJ65vQRqsfBlS.js → gf6l-4XXMXtq8hpJ.js} +5 -5
- package/assets/{CEk658HeLJk2cAjM.js → hiKRbrdbpmJglbWC.js} +3 -3
- package/assets/{D8k9de_hen-KqBWe.js → j4zqu8S2Be_yum7W.js} +1 -1
- package/assets/{Ch9w7xFxVMrvGuC_.js → jNZ7exipVCGRPbzr.js} +1 -1
- package/assets/{MosMza0-rXD8uHX_.js → kThU6e6dkzEoaK6n.js} +2 -2
- package/assets/{DJGYlGr2Zj7SkYqc.js → knMcDWv3xN7yJBTT.js} +1 -1
- package/assets/{BJqo8c5bFKjnq69G.js → ov7L79VlksT4fw7T.js} +11 -11
- package/assets/{BifwlrCmEVtjh_1U.js → pLM8Pxl1CscUdvMh.js} +1 -1
- package/assets/{NAWWzA_hk4wYtsPP.js → pfa2CH5NQuzku6FP.js} +2 -2
- package/assets/{B-5mBXpY9i6-eCrZ.js → q6advQx4x6PXvl0i.js} +35 -35
- package/assets/{BWLavTnANLUerdS0.js → qVBjd-c5B8neljc0.js} +2 -2
- package/assets/{DqSBb1HmgeU7eg_i.js → rlgXnCh6A88ozBRz.js} +110 -110
- package/assets/{DUbIxDAzW1dzrtdI.js → rzi2XAwlfy8BsGEa.js} +1 -1
- package/assets/{B7lATTNffVTrDsKE.js → xGASRbzSVVKfEAh-.js} +2 -2
- package/assets/{BkHeIMSE7-LehRCs.js → ybnQoU8_KttlHjiy.js} +1 -1
- package/index.js +145 -145
- package/lib.js +1 -1
- package/licenses/dependencies.txt +45 -45
- package/package.json +2 -2
- package/screenshot-page/assets/-HdF7KAN8PKqrASL.js +1 -0
- package/screenshot-page/assets/{C_YKEkTsGB_5gFNg.js → 0P0DnZolMnjPhiea.js} +2 -2
- package/screenshot-page/assets/{FcTM4SB17cEX1M3X.js → 5Y11BWntgqmzo9dz.js} +1 -1
- package/screenshot-page/assets/{Cx9eq2x1gIXGki3Q.js → B-E9Dzx1wh9RA2yC.js} +1 -1
- package/screenshot-page/assets/{CXwbGzavyvYgDbWU.js → B0CDAMDdxSN4en9k.js} +1 -1
- package/screenshot-page/assets/B39YZkEvc1U8ZQ8H.js +2 -0
- package/screenshot-page/assets/B8Dy_WA9RlWuvMqF.js +4 -0
- package/screenshot-page/assets/BAzHRU12l2vyyXq-.js +39 -0
- package/screenshot-page/assets/{DR-og7vslxlOZd8j.js → BGIujWi3UayyIWlg.js} +1 -1
- package/screenshot-page/assets/BNjmzbnQlBmX-HPQ.js +1 -0
- package/screenshot-page/assets/{B-0-chiwq4MIUQy9.js → BOF6KOmT8mH_NQnA.js} +1 -1
- package/screenshot-page/assets/{DcrVJCyDwGKeil2U.js → BQTLEc84Eql61S2m.js} +1 -1
- package/screenshot-page/assets/{clrFU8i-0wNkmbs7.js → BfkbiKKbYlPpRZqZ.js} +1 -1
- package/screenshot-page/assets/{DGkaCFHx4PsOJkFu.js → BhHceo22V3IBfap0.js} +1 -1
- package/screenshot-page/assets/{Cx1kZ2u_8JFV2Q8D.js → BiRVjUOUI8Qv0CE1.js} +1 -1
- package/screenshot-page/assets/{D6EXAYU-ZH8hjx_7.js → Bne-AygyF1USkPAy.js} +2 -2
- package/screenshot-page/assets/{Dkf51CnZh2zPEGMd.js → BpJaTpbR_CQzXj9M.js} +1 -1
- package/screenshot-page/assets/{B7pXfEVkcbaMBMhc.js → BrEXXxB9tAI5mmZP.js} +1 -1
- package/screenshot-page/assets/{CwCu_r0BW41uLt3P.js → Bt7fKk5ZupUuo_xD.js} +2 -2
- package/screenshot-page/assets/BwYQTcPRDDYIeAA5.js +586 -0
- package/screenshot-page/assets/ByyC3p23DsLAbUpr.js +1 -0
- package/screenshot-page/assets/{D7Yt7xmUlA6-Lq0Q.js → BzI5CCx73aXausKb.js} +9 -9
- package/screenshot-page/assets/{DM6hr-bvWV50-Oex.js → C-2hBFk27roWkIrQ.js} +2 -2
- package/screenshot-page/assets/{BTJ1NNUzHotNDiDe.js → CAKBmg6tXRtjEWgb.js} +2 -2
- package/screenshot-page/assets/CALWodHqzUTIv9le.js +5 -0
- package/screenshot-page/assets/{BcZPWw18bdj_ZvA9.js → CGNsyKbDXXz9qMa2.js} +1 -1
- package/screenshot-page/assets/CGZYePkVGI5DPBBY.js +1 -0
- package/screenshot-page/assets/{Bfq6-treWd_rRiWl.js → CJAgr6wyQGYAd3ZV.js} +1 -1
- package/screenshot-page/assets/{BKwDvElKinpn1IK0.js → CL_hAngRQwm_KGdR.js} +1 -1
- package/screenshot-page/assets/COL9dj40ytErlGak.js +2 -0
- package/screenshot-page/assets/CWA4xGjOeBuxJOzW.js +3 -0
- package/screenshot-page/assets/{r2HZG9_SMzF3__ID.js → CX-ITg5RXdV2cefd.js} +6 -6
- package/screenshot-page/assets/{C7mXat-6esc1AmRD.js → CXeDqC02BZcixiHS.js} +2 -2
- package/screenshot-page/assets/{Pt9ne0xkE2icD3Ih.js → CZaKvnrRdlLj1_X8.js} +1 -1
- package/screenshot-page/assets/{a3fvt1Klg1uGE7p6.js → Cg9eIWL8fPmeZFHG.js} +7 -7
- package/screenshot-page/assets/{DyxJBLjUkeDuu96F.js → CltB1nb5HHSmYrNG.js} +1 -1
- package/screenshot-page/assets/{FqdZRM336KMEcsbU.js → Cq1EzIAt4dHBkzfP.js} +1 -1
- package/screenshot-page/assets/{D6Yv5cc1JE7DGd6j.js → CqBSIwwGzWl8mrBe.js} +1 -1
- package/screenshot-page/assets/D2TibFqUBAPLcu_2.js +1 -0
- package/screenshot-page/assets/{ChSvXfVMLxZsP9zG.js → D4RZZdlItfrgQHcE.js} +1 -1
- package/screenshot-page/assets/{J73KTOmdZGNmnq-z.js → D72Rp__0TEqJ972a.js} +1 -1
- package/screenshot-page/assets/D8EmNst-H2v0eWcf.js +1 -0
- package/screenshot-page/assets/{Tj3B5At0OAN3tDza.js → DACqwpSwlZka3b7s.js} +1 -1
- package/screenshot-page/assets/DEy3e1rY-XMdI309.js +1 -0
- package/screenshot-page/assets/{CI3Z1f4amZ9G2rPD.js → DJebrQ5mu8uxpX3b.js} +1 -1
- package/screenshot-page/assets/{DynKB5GH-vfFMJEy.js → DOsZiE9rOdS_Mm2Q.js} +1 -1
- package/screenshot-page/assets/{CSFFMEKyxEFaykqL.js → DTAKTGn53yF_B621.js} +1 -1
- package/screenshot-page/assets/{D6Ciix7JAZtdKqmj.js → DYYzsN95gWMsxOaj.js} +1 -1
- package/screenshot-page/assets/{DOVt9zHz7FQ2KUQM.js → Da_VIghRFdNrmfZT.js} +1 -1
- package/screenshot-page/assets/DaqAdr-mtpVZMOS8.js +2 -0
- package/screenshot-page/assets/{0UZBKpOOsp7P-DkP.js → DdmX3djBOA6UCZtf.js} +2 -2
- package/screenshot-page/assets/{DEpn6VGd30cHEJOS.js → DfQS5zAy3pN31xNb.js} +1 -1
- package/screenshot-page/assets/DhnaoxNYwMobAVP6.js +1 -0
- package/screenshot-page/assets/{B-8IMo2f1yGNXOyz.js → GxbRmvyoKhHl0ZYY.js} +13 -8
- package/screenshot-page/assets/{zvxBjll3jnL0-vNn.js → Np3jWxG724t5hLHZ.js} +2 -2
- package/screenshot-page/assets/{Bg9UyX4yrB2mSdJt.js → QVGvXAvlw1c8vZjy.js} +12 -12
- package/screenshot-page/assets/{BbT5KRhoeAKLzy54.js → d8BvDCByceUNvHp7.js} +2 -2
- package/screenshot-page/assets/eR9_DaySoB72PvMo.js +1 -0
- package/screenshot-page/assets/{CtiTwHzd_ZSzd3W2.js → hB5riGkPy0wXVIig.js} +1 -1
- package/screenshot-page/assets/hHvAGynpTvAb97GX.js +1 -0
- package/screenshot-page/assets/jFfcyGJ9xruiOUyS.js +1 -0
- package/screenshot-page/assets/{DmDFKv_3APEWI-IY.js → jKvAZg0Tp701aw1o.js} +2 -2
- package/screenshot-page/assets/{DACSL7FA_J91Z_H7.js → jteb4n23QwBT9m_4.js} +1 -1
- package/screenshot-page/assets/mzrDp0emvkWnkXBt.js +1 -0
- package/screenshot-page/index.html +15 -15
- package/types/scripting-api.json +1 -1
- package/types/scripting.d.ts +2 -2
- package/assets/6CBUVbF01Bedq0e2.js +0 -199
- package/assets/Dfv_T_PQVL0O3lu5.js +0 -14
- package/screenshot-page/assets/BDRMUi2BsnBqytIq.js +0 -2
- package/screenshot-page/assets/BEjJHVSbtlsNtoq7.js +0 -3
- package/screenshot-page/assets/BIuMiduMHSsTGacU.js +0 -2
- package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +0 -1
- package/screenshot-page/assets/Bxq4FCQhyPbVhhaR.js +0 -2
- package/screenshot-page/assets/CNB6WmYfGVZjlCKV.js +0 -5
- package/screenshot-page/assets/CXeJV1BW2CVemhPE.js +0 -1
- package/screenshot-page/assets/CkxmJxdtjBIxYoMq.js +0 -1
- package/screenshot-page/assets/D43IayseD2Cy8OZo.js +0 -4
- package/screenshot-page/assets/D8KyhLvfyjLZW92H.js +0 -39
- package/screenshot-page/assets/DBxAatsD6aWk7Zb6.js +0 -586
- package/screenshot-page/assets/DMhOGCTy8V0N14gY.js +0 -1
- package/screenshot-page/assets/DSTlKGmqncM7XHeW.js +0 -1
- package/screenshot-page/assets/Dh14XQinAphjZOKC.js +0 -1
- package/screenshot-page/assets/Dt8JxbBBr2TeDflQ.js +0 -1
- package/screenshot-page/assets/Dxi-bXNjS-CpC5Qr.js +0 -1
- package/screenshot-page/assets/Oay0yGsGYgJDzy8r.js +0 -1
- package/screenshot-page/assets/QZg76Jflu3Q808W3.js +0 -1
- package/screenshot-page/assets/WTrYzPnMQhYDILMR.js +0 -1
- package/screenshot-page/assets/qFyplGXRu7IepHio.js +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. -
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v1.0.0
|
|
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 { r as e } from "./
|
|
8
|
-
import { B as t, D as s, I as r, J as i, S as o, T as n, Z as a, bt as l, ct as h, ht as c, i as u, ot as d, p as g, tt as
|
|
9
|
-
import { a as p, c as w, s as y } from "./
|
|
10
|
-
import {
|
|
11
|
-
import { f as M, u as j } from "./
|
|
12
|
-
import {
|
|
7
|
+
import { r as e } from "./eExV3IoVMxYkv5GO.js";
|
|
8
|
+
import { B as t, D as s, I as r, J as i, S as o, T as n, Z as a, bt as l, ct as h, ht as c, i as u, ot as d, p as g, tt as f, u as m, xt as _ } from "./DzYvbv5u7E2H7IoB.js";
|
|
9
|
+
import { a as p, c as w, s as y } from "./BaZAIwIrqn1x69WH.js";
|
|
10
|
+
import { Bt as S, Ct as b, D as k, E as C, J as v, Kt as I, L as R, Lt as N, R as O, Ut as x, Wt as L, Xt as E, ct as V, it as A, lt as T, mt as P, r as F, rt as B, w as W } from "./8hLtXHueDl7B_SEn.js";
|
|
11
|
+
import { f as M, u as j } from "./8mWHFnE0j-CaNsxr.js";
|
|
12
|
+
import { Aa as D, D as z, G as H, Gn as $, Gr as J, Gt as U, Ir as q, Jr as K, Kn as G, Kt as X, Lt as Z, M as Q, Mt as Y, Ot as ee, R as te, Ra as se, Rn as re, Rr as ie, Si as oe, T as ne, Tn as ae, Ua as le, Va as he, Wa as ce, Wi as ue, Wn as de, X as ge, Xn as fe, Za as me, Zr as _e, b as pe, cr as we, d as ye, dr as Se, ei as be, er as ke, fa as Ce, g as ve, ga as Ie, gt as Re, hn as Ne, hr as Oe, ht as xe, ia as Le, j as Ee, ki as Ve, kr as Ae, l as Te, li as Pe, lo as Fe, ma as Be, n as We, ni as Me, o as je, oa as De, p as ze, pi as He, r as $e, ro as Je, rt as Ue, sn as qe, so as Ke, sr as Ge, t as Xe, to as Ze, ui as Qe, ur as Ye, wa as et, wt as tt, x as st, z as rt, zi as it } from "./Dcw7GSCgw_dgsum7.js";
|
|
13
13
|
var ot, nt, at = class extends r {
|
|
14
14
|
constructor(e, t = 50) {
|
|
15
15
|
super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
|
|
@@ -172,7 +172,7 @@ var ut = class e {
|
|
|
172
172
|
getName() {
|
|
173
173
|
if (null !== this._name && void 0 !== this._name) return this._name;
|
|
174
174
|
const e = this._cleanPath();
|
|
175
|
-
return e &&
|
|
175
|
+
return e && We(e) || null;
|
|
176
176
|
}
|
|
177
177
|
getPath() {
|
|
178
178
|
return this._path;
|
|
@@ -183,7 +183,7 @@ var ut = class e {
|
|
|
183
183
|
getExtension() {
|
|
184
184
|
const e = this._cleanPath();
|
|
185
185
|
if (!e) return null;
|
|
186
|
-
const t =
|
|
186
|
+
const t = G(e);
|
|
187
187
|
return t ? t.toLowerCase() : null;
|
|
188
188
|
}
|
|
189
189
|
getEncryption() {
|
|
@@ -233,7 +233,7 @@ var ut = class e {
|
|
|
233
233
|
];
|
|
234
234
|
return `${t} ${(s / Math.pow(1024, r)).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
|
|
235
235
|
}
|
|
236
|
-
}, dt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new Set(),
|
|
236
|
+
}, dt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new Set(), ft = (e) => dt.get(e) ?? null, mt = class e {
|
|
237
237
|
constructor(t) {
|
|
238
238
|
this._released = !1, e._assertFree(t), this._emitter = new y(this), this._origin = t, dt.set(t, this), gt.add(this);
|
|
239
239
|
}
|
|
@@ -272,10 +272,10 @@ var ut = class e {
|
|
|
272
272
|
}
|
|
273
273
|
switch (n) {
|
|
274
274
|
case "file": {
|
|
275
|
-
const e = s, r = e?.name, n = r ? `${
|
|
275
|
+
const e = s, r = e?.name, n = r ? `${We(r)}` : "";
|
|
276
276
|
a = await e.arrayBuffer(), l = {
|
|
277
277
|
format: o,
|
|
278
|
-
ext:
|
|
278
|
+
ext: G(r),
|
|
279
279
|
name: n,
|
|
280
280
|
absolutePath: r,
|
|
281
281
|
size: e.size,
|
|
@@ -315,7 +315,7 @@ var ut = class e {
|
|
|
315
315
|
t = e.input, r = e.init, i = e.timeout;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
const n = i || 3e4, h = new AbortController(), c = setTimeout(() => h.abort(), n), u = "string" == typeof t ? t : t.toString(), d =
|
|
318
|
+
const n = i || 3e4, h = new AbortController(), c = setTimeout(() => h.abort(), n), u = "string" == typeof t ? t : t.toString(), d = G(u);
|
|
319
319
|
try {
|
|
320
320
|
const e = await fetch(t, {
|
|
321
321
|
...r,
|
|
@@ -327,7 +327,7 @@ var ut = class e {
|
|
|
327
327
|
a = s, l = {
|
|
328
328
|
format: o,
|
|
329
329
|
ext: d,
|
|
330
|
-
name:
|
|
330
|
+
name: We(u, !0),
|
|
331
331
|
absolutePath: u
|
|
332
332
|
};
|
|
333
333
|
} catch (e) {
|
|
@@ -444,7 +444,7 @@ var ut = class e {
|
|
|
444
444
|
), r = e.origin.getPath(), i = !(!r || !e.origin.canWrite()), o = i ? r : e.origin.getName() ? e.suggestedName : null;
|
|
445
445
|
if (!o) throw new Error("No file name provided to write to.");
|
|
446
446
|
const n = s.resolve(o.replace(/\\/g, "/")), a = this.findOpenPath(n, e.workbook?.getOrigin?.());
|
|
447
|
-
if (a) throw new
|
|
447
|
+
if (a) throw new f(g("error.io.openElsewhere", { name: a.getName() ?? n }));
|
|
448
448
|
const l = i ? e.origin : new ut(n, {
|
|
449
449
|
format: e.format.key,
|
|
450
450
|
canWrite: !0
|
|
@@ -487,30 +487,30 @@ var wt, yt, St, bt, kt = {
|
|
|
487
487
|
BottomLeft: "bl",
|
|
488
488
|
Bottom: "b",
|
|
489
489
|
BottomRight: "br"
|
|
490
|
-
}, Ct =
|
|
491
|
-
[Ct.Normal]:
|
|
492
|
-
[Ct.Comma]:
|
|
493
|
-
[Ct.Currency]:
|
|
494
|
-
[Ct.Percent]:
|
|
495
|
-
[Ct.Comma0]:
|
|
496
|
-
[Ct.Currency0]:
|
|
497
|
-
[Ct.Hyperlink]:
|
|
498
|
-
[Ct.FollowedHyperlink]:
|
|
499
|
-
[Ct.Note]:
|
|
500
|
-
[Ct.WarningText]:
|
|
501
|
-
[Ct.Title]:
|
|
502
|
-
[Ct.Input]:
|
|
503
|
-
[Ct.Output]:
|
|
504
|
-
[Ct.Calculation]:
|
|
505
|
-
[Ct.CheckCell]:
|
|
506
|
-
[Ct.LinkedCell]:
|
|
507
|
-
[Ct.Total]:
|
|
508
|
-
[Ct.Good]:
|
|
509
|
-
[Ct.Bad]:
|
|
510
|
-
[Ct.Neutral]:
|
|
511
|
-
[Ct.ExplanatoryText]:
|
|
512
|
-
}, It =
|
|
513
|
-
function
|
|
490
|
+
}, Ct = R.BuiltInName, vt = {
|
|
491
|
+
[Ct.Normal]: m("style.builtin.normal"),
|
|
492
|
+
[Ct.Comma]: m("style.builtin.comma"),
|
|
493
|
+
[Ct.Currency]: m("style.builtin.currency"),
|
|
494
|
+
[Ct.Percent]: m("style.builtin.percent"),
|
|
495
|
+
[Ct.Comma0]: m("style.builtin.comma0"),
|
|
496
|
+
[Ct.Currency0]: m("style.builtin.currency0"),
|
|
497
|
+
[Ct.Hyperlink]: m("style.builtin.hyperlink"),
|
|
498
|
+
[Ct.FollowedHyperlink]: m("style.builtin.followedHyperlink"),
|
|
499
|
+
[Ct.Note]: m("style.builtin.note"),
|
|
500
|
+
[Ct.WarningText]: m("style.builtin.warningText"),
|
|
501
|
+
[Ct.Title]: m("style.builtin.title"),
|
|
502
|
+
[Ct.Input]: m("style.builtin.input"),
|
|
503
|
+
[Ct.Output]: m("style.builtin.output"),
|
|
504
|
+
[Ct.Calculation]: m("style.builtin.calculation"),
|
|
505
|
+
[Ct.CheckCell]: m("style.builtin.checkCell"),
|
|
506
|
+
[Ct.LinkedCell]: m("style.builtin.linkedCell"),
|
|
507
|
+
[Ct.Total]: m("style.builtin.total"),
|
|
508
|
+
[Ct.Good]: m("style.builtin.good"),
|
|
509
|
+
[Ct.Bad]: m("style.builtin.bad"),
|
|
510
|
+
[Ct.Neutral]: m("style.builtin.neutral"),
|
|
511
|
+
[Ct.ExplanatoryText]: m("style.builtin.explanatoryText")
|
|
512
|
+
}, It = m("style.builtin.heading"), Rt = m("style.builtin.accent"), Nt = m("style.builtin.accentTint"), Ot = /^Heading ([1-4])$/, xt = /^Accent([1-6])$/, Lt = /^(20|40|60)% - Accent([1-6])$/;
|
|
513
|
+
function Et(e) {
|
|
514
514
|
const t = vt[e];
|
|
515
515
|
if (t) return { key: t };
|
|
516
516
|
let s = Ot.exec(e);
|
|
@@ -520,7 +520,7 @@ function Lt(e) {
|
|
|
520
520
|
} : (s = xt.exec(e), s ? {
|
|
521
521
|
key: Rt,
|
|
522
522
|
params: { n: +s[1] }
|
|
523
|
-
} : (s =
|
|
523
|
+
} : (s = Lt.exec(e), s ? {
|
|
524
524
|
key: Nt,
|
|
525
525
|
params: {
|
|
526
526
|
pct: +s[1],
|
|
@@ -532,8 +532,8 @@ var Vt, At = (e, t, s, r, i) => {
|
|
|
532
532
|
const o = JSON.parse(JSON.stringify(e.definition));
|
|
533
533
|
o.adjs || (o.adjs = []);
|
|
534
534
|
let n = "", a = 0, l = 0;
|
|
535
|
-
t > 0 ? (l = t, a = 100 - t, n = g("op.lighterPercent", { percent: t })) : t < 0 && (a = 100 + t, n = g("op.darkerPercent", { percent: -t })), a && o.adjs.push({ [
|
|
536
|
-
const h = new
|
|
535
|
+
t > 0 ? (l = t, a = 100 - t, n = g("op.lighterPercent", { percent: t })) : t < 0 && (a = 100 + t, n = g("op.darkerPercent", { percent: -t })), a && o.adjs.push({ [N.AdjustmentType.LumMod]: a }), l && o.adjs.push({ [N.AdjustmentType.LumOff]: l });
|
|
536
|
+
const h = new k({
|
|
537
537
|
val: o.val,
|
|
538
538
|
adjs: o.adjs
|
|
539
539
|
}, s), c = h.toString();
|
|
@@ -552,7 +552,7 @@ var Vt, At = (e, t, s, r, i) => {
|
|
|
552
552
|
const a = (i) => {
|
|
553
553
|
for (let a = 0; a < i.length; a++) n.push(At(e[o], i[a], t, s, r));
|
|
554
554
|
};
|
|
555
|
-
let l = new
|
|
555
|
+
let l = new k({
|
|
556
556
|
val: e[o].definition.val,
|
|
557
557
|
adjs: e[o].definition.adjs
|
|
558
558
|
}, t).toHSLA().lum;
|
|
@@ -593,7 +593,7 @@ var Vt, At = (e, t, s, r, i) => {
|
|
|
593
593
|
var Tt = null;
|
|
594
594
|
function Pt() {
|
|
595
595
|
if (!Tt) {
|
|
596
|
-
const e = import("./
|
|
596
|
+
const e = import("./BR4Wpxs0eSlaoLOl.js").then(({ initializeFunctions: e }) => {
|
|
597
597
|
const t = e(() => null);
|
|
598
598
|
return Object.freeze(Array.from(t.keys()));
|
|
599
599
|
});
|
|
@@ -604,7 +604,7 @@ function Pt() {
|
|
|
604
604
|
return Tt;
|
|
605
605
|
}
|
|
606
606
|
function Ft(e) {
|
|
607
|
-
return
|
|
607
|
+
return Ke.peek()?.readFormulaLiteral(e);
|
|
608
608
|
}
|
|
609
609
|
function Bt(e, t) {
|
|
610
610
|
const s = Wt(e), r = Wt(t);
|
|
@@ -621,7 +621,7 @@ function Wt(e) {
|
|
|
621
621
|
}
|
|
622
622
|
(function(e) {
|
|
623
623
|
function t(e) {
|
|
624
|
-
return
|
|
624
|
+
return Ke.peek()?.getFunctionDeclaration(e) ?? null;
|
|
625
625
|
}
|
|
626
626
|
e.get = t, e.has = function(e) {
|
|
627
627
|
return null !== t(e);
|
|
@@ -675,7 +675,7 @@ var Mt, jt = class {
|
|
|
675
675
|
const s = t[e].getSortedNumbers().getValues();
|
|
676
676
|
s.length > 0 && r.push(s);
|
|
677
677
|
}
|
|
678
|
-
e = new
|
|
678
|
+
e = new xe(function(e) {
|
|
679
679
|
const t = e.length;
|
|
680
680
|
if (0 === t) return Dt;
|
|
681
681
|
if (1 === t) return e[0];
|
|
@@ -687,7 +687,7 @@ var Mt, jt = class {
|
|
|
687
687
|
return e;
|
|
688
688
|
}
|
|
689
689
|
getRanked(e) {
|
|
690
|
-
return
|
|
690
|
+
return U(this._children, e, Bt)[Symbol.iterator]();
|
|
691
691
|
}
|
|
692
692
|
getFrequencies(e) {
|
|
693
693
|
if (e) return this._mergeFrequencies(e);
|
|
@@ -695,7 +695,7 @@ var Mt, jt = class {
|
|
|
695
695
|
return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
|
|
696
696
|
}
|
|
697
697
|
_mergeFrequencies(e) {
|
|
698
|
-
const t = e?.keyFn ??
|
|
698
|
+
const t = e?.keyFn ?? Ne, s = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, o = i.length;
|
|
699
699
|
let n = 0, a = 0, l = !1;
|
|
700
700
|
for (let h = 0; h < o; h++) {
|
|
701
701
|
const o = i[h].getFrequencies(e);
|
|
@@ -710,7 +710,7 @@ var Mt, jt = class {
|
|
|
710
710
|
}) : l = !0, u = c.next();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
return
|
|
713
|
+
return Se.fromGroups(r, t, e, Bt, n, a, l);
|
|
714
714
|
}
|
|
715
715
|
getTypedCounts(e) {
|
|
716
716
|
let t = this._typedCounts;
|
|
@@ -760,7 +760,7 @@ var Mt, jt = class {
|
|
|
760
760
|
const o = s.numericalCount;
|
|
761
761
|
o <= 0 || (r.numericalCount += o, r.sum += s.sum, r.sumSq += s.varP * o + s.sum * s.sum / o, (void 0 === r.min || s.min < r.min) && (r.min = s.min), (void 0 === r.max || s.max > r.max) && (r.max = s.max));
|
|
762
762
|
}
|
|
763
|
-
return
|
|
763
|
+
return Ze(r);
|
|
764
764
|
}
|
|
765
765
|
}, Dt = Object.freeze([]);
|
|
766
766
|
function zt(e, t) {
|
|
@@ -778,7 +778,7 @@ var Ht, $t = class e {
|
|
|
778
778
|
static dataOf(t, s) {
|
|
779
779
|
const r = e.modelOf(t);
|
|
780
780
|
return {
|
|
781
|
-
part:
|
|
781
|
+
part: et.fromJSON(t.part, s),
|
|
782
782
|
model: r,
|
|
783
783
|
partFormats: !r && t.partFormats ? t.partFormats : null,
|
|
784
784
|
source: !r && t.source ? t.source : null
|
|
@@ -820,7 +820,7 @@ var Ht, $t = class e {
|
|
|
820
820
|
if (this._source) return;
|
|
821
821
|
const { ref: s, sheet: r, name: i } = this._sourceAsRead() ?? {};
|
|
822
822
|
let o = null, n = null;
|
|
823
|
-
if (s && r && !s.includes("#REF!") ? (o = e(r), n = `${
|
|
823
|
+
if (s && r && !s.includes("#REF!") ? (o = e(r), n = `${$(r)}!${Ge(s)}`) : !i || s || r ? i && r && !s && (o = e(r), n = `${$(r)}!${i}`) : (o = t(i), n = `${i}[#All]`), !o || !n) return;
|
|
824
824
|
const a = {
|
|
825
825
|
formula: null,
|
|
826
826
|
wired: null,
|
|
@@ -874,17 +874,17 @@ var Ht, $t = class e {
|
|
|
874
874
|
if (null === t || t === e.wired) return null;
|
|
875
875
|
const s = this._sourceAsRead();
|
|
876
876
|
if (s?.name && s.sheet) {
|
|
877
|
-
const e =
|
|
877
|
+
const e = Q(t)?.sheet;
|
|
878
878
|
return e ? { sheet: e } : null;
|
|
879
879
|
}
|
|
880
880
|
const r = /^(.+)\[#All\]$/.exec(t)?.[1];
|
|
881
881
|
if (r) return { name: r };
|
|
882
|
-
const i =
|
|
882
|
+
const i = Q(t);
|
|
883
883
|
return i ? {
|
|
884
884
|
name: null,
|
|
885
|
-
ref:
|
|
885
|
+
ref: se(i.reference),
|
|
886
886
|
sheet: i.sheet
|
|
887
|
-
} : { ref:
|
|
887
|
+
} : { ref: se(t) };
|
|
888
888
|
}
|
|
889
889
|
_getSource() {
|
|
890
890
|
const e = this._sourceAsRead();
|
|
@@ -903,7 +903,7 @@ var Ht, $t = class e {
|
|
|
903
903
|
return t;
|
|
904
904
|
}
|
|
905
905
|
toJSON(e) {
|
|
906
|
-
const t = { cacheId: this.cacheId }, s =
|
|
906
|
+
const t = { cacheId: this.cacheId }, s = et.toJSON(this.part, e);
|
|
907
907
|
if (s) {
|
|
908
908
|
t.part = s;
|
|
909
909
|
const e = this._store.get().partFormats;
|
|
@@ -914,7 +914,7 @@ var Ht, $t = class e {
|
|
|
914
914
|
const i = this._getSource();
|
|
915
915
|
return i && (t.source = i), t;
|
|
916
916
|
}
|
|
917
|
-
},
|
|
917
|
+
}, Jt = class {
|
|
918
918
|
constructor(e, t) {
|
|
919
919
|
this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
|
|
920
920
|
}
|
|
@@ -948,7 +948,7 @@ var Ht, $t = class e {
|
|
|
948
948
|
get isIPerson() {
|
|
949
949
|
return !0;
|
|
950
950
|
}
|
|
951
|
-
},
|
|
951
|
+
}, Ut = class extends Ce {
|
|
952
952
|
constructor(e) {
|
|
953
953
|
super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
|
|
954
954
|
}
|
|
@@ -969,7 +969,7 @@ var Ht, $t = class e {
|
|
|
969
969
|
const e = this._byDisplayName.get(r);
|
|
970
970
|
if (e) return e;
|
|
971
971
|
}
|
|
972
|
-
const i = new
|
|
972
|
+
const i = new Jt({
|
|
973
973
|
...t,
|
|
974
974
|
displayName: r,
|
|
975
975
|
id: s ?? c.uuidV4().toUpperCase()
|
|
@@ -1032,22 +1032,22 @@ var Ht, $t = class e {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
async createModule(e) {
|
|
1035
|
-
const t = await (await import("./
|
|
1035
|
+
const t = await (await import("./B-b7HyruDF2gdj3R.js")).ScriptCompiler.compile({
|
|
1036
1036
|
builtInNames: this._builtInNames(),
|
|
1037
1037
|
minify: !0,
|
|
1038
1038
|
...e
|
|
1039
1039
|
});
|
|
1040
|
-
return t.module ? await
|
|
1040
|
+
return t.module ? await ye(He.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
|
|
1041
1041
|
}
|
|
1042
1042
|
addModule(e, t, s) {
|
|
1043
1043
|
this._modules.add(e, t, s);
|
|
1044
1044
|
}
|
|
1045
1045
|
async addModuleFromJSON(e, t, s) {
|
|
1046
|
-
const r = await
|
|
1046
|
+
const r = await ye(e, t);
|
|
1047
1047
|
return this.addModule(e, r, s), r;
|
|
1048
1048
|
}
|
|
1049
1049
|
async executeMacro(e, t, s) {
|
|
1050
|
-
await
|
|
1050
|
+
await _e.assertUsable("scripts");
|
|
1051
1051
|
const r = this._modules.getItems({ name: t }), i = r.length;
|
|
1052
1052
|
for (let t = 0; t < i; t++) {
|
|
1053
1053
|
const i = r[t].getFunctions().getByName(e);
|
|
@@ -1060,8 +1060,8 @@ var Ht, $t = class e {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
async run(e, t) {
|
|
1062
1062
|
try {
|
|
1063
|
-
await
|
|
1064
|
-
const s = "string" == typeof e ? await this.createModule({ source: e }) : await
|
|
1063
|
+
await _e.assertUsable("scripts");
|
|
1064
|
+
const s = "string" == typeof e ? await this.createModule({ source: e }) : await ye(He.DEFAULT_MODULE, e), r = "string" == typeof e ? e : e?.source ?? "";
|
|
1065
1065
|
return await this._runModule(s, r, t);
|
|
1066
1066
|
} catch (e) {
|
|
1067
1067
|
return {
|
|
@@ -1143,7 +1143,7 @@ var Ht, $t = class e {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
if (!i || 0 === i.length) return c.EmptyArray;
|
|
1145
1145
|
const n = e?.text ? e.text.trim().toUpperCase() : null;
|
|
1146
|
-
return n ?
|
|
1146
|
+
return n ? he(i, n) : i.sort((e, t) => {
|
|
1147
1147
|
const s = e.getName().toUpperCase(), r = t.getName().toUpperCase();
|
|
1148
1148
|
return s < r ? -1 : s > r ? 1 : 0;
|
|
1149
1149
|
}), void 0 !== s && i.length > s ? i.slice(0, s) : i;
|
|
@@ -1182,13 +1182,13 @@ var Ht, $t = class e {
|
|
|
1182
1182
|
for (let o = 0; o < r.length; o++) {
|
|
1183
1183
|
const n = r[o], a = t[n];
|
|
1184
1184
|
try {
|
|
1185
|
-
s[n] = await
|
|
1185
|
+
s[n] = await ye(n, a, !1, [], "workbook" === a?.scope ? e : null);
|
|
1186
1186
|
} catch (e) {
|
|
1187
1187
|
i.error(`Could not load script '${n}'; it will be unavailable.`, e);
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
const r = this, o = new
|
|
1191
|
+
const r = this, o = new fe({
|
|
1192
1192
|
transactions: this._options?.transactions,
|
|
1193
1193
|
initial: s,
|
|
1194
1194
|
isReadOnly: () => r.isReadOnly(),
|
|
@@ -1334,14 +1334,14 @@ var Ht, $t = class e {
|
|
|
1334
1334
|
body: r
|
|
1335
1335
|
};
|
|
1336
1336
|
if (s.ok && r && r.byteLength > 0) {
|
|
1337
|
-
const t = await new
|
|
1337
|
+
const t = await new X({ source: { buffer: r } }).getType();
|
|
1338
1338
|
t?.mime.startsWith("image/") ? (o.headers = i.filter(([e]) => "content-type" !== e.toLowerCase()), o.headers.push(["content-type", t.mime])) : this._cached.set(e, o);
|
|
1339
1339
|
}
|
|
1340
1340
|
return o;
|
|
1341
1341
|
}
|
|
1342
1342
|
}, ts = class {
|
|
1343
1343
|
constructor(e, t, s, r) {
|
|
1344
|
-
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ?? d.EmptyCell, this._sheet = new
|
|
1344
|
+
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = s, this._topLeft = t ?? d.EmptyCell, this._sheet = new Re({
|
|
1345
1345
|
runtime: e,
|
|
1346
1346
|
styles: this._styles,
|
|
1347
1347
|
calcOnLoad: "none",
|
|
@@ -1363,33 +1363,33 @@ var Ht, $t = class e {
|
|
|
1363
1363
|
e.includes(r) && delete i[r];
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
const o =
|
|
1366
|
+
const o = x(i.fontFamily);
|
|
1367
1367
|
r.font = {}, o && (r.font.family = o.family, r.font.fallbacks = o.fallbacks, r.font.size = o.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
|
|
1368
|
-
const n =
|
|
1369
|
-
r.font.underline = n.underline, r.font.strike = n.strike ?
|
|
1368
|
+
const n = b(i.textDecoration);
|
|
1369
|
+
r.font.underline = n.underline, r.font.strike = n.strike ? v.StrikeStyle.Single : v.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = S(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = O(i.textAlign)), i?.textAlign && !r.alignment.horizontal && "general" !== i?.textAlign && ("center-across" === i.textAlign ? r.alignment.horizontal = V.HorizontalAlignment.CenterContinuous : "fill" === i.textAlign ? r.alignment.horizontal = V.HorizontalAlignment.Fill : "121" === i.textAlign || "010" === i.textAlign ? (r.alignment.horizontal = V.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = "121" === i.textAlign) : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && ("super" === i.verticalAlign.toLowerCase() ? r.font.baseline = C.Baseline.Superscript : "sub" === i.verticalAlign.toLowerCase() ? r.font.baseline = C.Baseline.Subscript : r.alignment.vertical = F(i.verticalAlign), r.alignment.vertical || ("121" === i.verticalAlign ? r.alignment.vertical = V.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = "no-wrap" === i.whiteSpace || "nowrap" === i.whiteSpace ? V.Overflow.Visible : V.Overflow.Wrap), "shrinktofit" === i.msoTextControl && (r.alignment.overflow = V.Overflow.Shrink);
|
|
1370
1370
|
let a = null;
|
|
1371
1371
|
if (i.background ? a = i.background : i.backgroundColor && (a = i.backgroundColor), a && (r.fill = { color: a }), i.msoPattern) {
|
|
1372
|
-
let e =
|
|
1373
|
-
e && (e.patternType ===
|
|
1372
|
+
let e = I(i.msoPattern);
|
|
1373
|
+
e && (e.patternType === W.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== W.BuiltInSheetPattern.None && (a && (e.background = a), r.fill = e));
|
|
1374
1374
|
}
|
|
1375
|
-
"vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation =
|
|
1375
|
+
"vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation = P(i.msoRotate));
|
|
1376
1376
|
const l = (e, t) => {
|
|
1377
1377
|
e && (r.borders || (r.borders = {}), r.borders[e] = t);
|
|
1378
1378
|
};
|
|
1379
1379
|
i.border && "none" !== i.border && (l("top", i.border), l("left", i.border), l("right", i.border), l("bottom", i.border)), i.borderTop && l("top", i.borderTop), i.borderLeft && l("left", i.borderLeft), i.borderRight && l("right", i.borderRight), i.borderBottom && l("bottom", i.borderBottom), i.msoDiagonalUp && l("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && l("diagonalDown", i.msoDiagonalDown);
|
|
1380
1380
|
let h = r.numberFormat;
|
|
1381
|
-
i.msoNumberFormat && (h = B(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h =
|
|
1381
|
+
i.msoNumberFormat && (h = B(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h = E.Styles.lookupStyle(r.numberFormat).formatType === E.Type.Number ? null : E.Type.Number : "Percent" === h && (h = E.Styles.lookupStyle(r.numberFormat).formatType === E.Type.Percentage ? null : E.Type.Percentage)), h && (r.numberFormat = h), e.style = this._styles.normalize(r), s && 0 === Object.keys(e.style).length && delete e.style;
|
|
1382
1382
|
}
|
|
1383
1383
|
onCell(e, t, s, r, i) {
|
|
1384
1384
|
const o = r(i);
|
|
1385
1385
|
let n = { value: void 0 !== t ? t : s ?? "" };
|
|
1386
1386
|
if ("string" == typeof n.value && 0 === n.value.length && (n.value = void 0), o && this.applyCSSStyle(n, o), "string" == typeof n.value && /^#+$/.test(n.value)) {
|
|
1387
1387
|
const e = n.style?.numberFormat;
|
|
1388
|
-
e && (
|
|
1388
|
+
e && (T(e) || A(e)) && (n.value = j.BuiltIn.Num);
|
|
1389
1389
|
}
|
|
1390
1390
|
if ("TD" === i?.tagName.toUpperCase()) {
|
|
1391
1391
|
let e = n.style, t = e?.font ?? {};
|
|
1392
|
-
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike =
|
|
1392
|
+
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = v.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = C.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = C.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = v.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = v.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, n.style = e), e.font || (e.font = t));
|
|
1393
1393
|
const s = i.querySelectorAll("a");
|
|
1394
1394
|
if (s.length > 0) {
|
|
1395
1395
|
const e = s[0].getAttribute("href");
|
|
@@ -1437,9 +1437,9 @@ var Ht, $t = class e {
|
|
|
1437
1437
|
if ("userset" !== i.msoHeightSource) return;
|
|
1438
1438
|
if (!r) return;
|
|
1439
1439
|
let o = r.getAttribute("height") ?? i.height, n = null;
|
|
1440
|
-
if (o && (n =
|
|
1440
|
+
if (o && (n = L(o, this._styles.getNormal().getFont().getSize(), "px")), null === n) for (let e = 0; e < r.cells.length; e++) {
|
|
1441
1441
|
const t = r.cells[e], i = t.getAttribute("height") ?? s(t).height;
|
|
1442
|
-
let o =
|
|
1442
|
+
let o = L(i, this._styles.getNormal().getFont().getSize(), "px");
|
|
1443
1443
|
null !== o && (n = Math.max(o, n ?? 0));
|
|
1444
1444
|
}
|
|
1445
1445
|
null !== n && this._rowsReading.push({
|
|
@@ -1447,7 +1447,7 @@ var Ht, $t = class e {
|
|
|
1447
1447
|
min: this._topLeft.rowIndex + e,
|
|
1448
1448
|
max: this._topLeft.rowIndex + e + t - 1
|
|
1449
1449
|
},
|
|
1450
|
-
update: { size: n *
|
|
1450
|
+
update: { size: n * v.getDeviceScale() }
|
|
1451
1451
|
});
|
|
1452
1452
|
}
|
|
1453
1453
|
onColumn(e, t, s, r) {
|
|
@@ -1455,12 +1455,12 @@ var Ht, $t = class e {
|
|
|
1455
1455
|
if ("userset" !== i.msoWidthSource) return;
|
|
1456
1456
|
if (!r) return;
|
|
1457
1457
|
let o = r.getAttribute("width") ?? i.width, n = null;
|
|
1458
|
-
o && (n =
|
|
1458
|
+
o && (n = L(o, this._styles.getNormal().getFont().getSize(), "px")), null !== n && this._colsReading.push({
|
|
1459
1459
|
address: {
|
|
1460
1460
|
min: this._topLeft.colIndex + e,
|
|
1461
1461
|
max: this._topLeft.colIndex + e + t - 1
|
|
1462
1462
|
},
|
|
1463
|
-
update: { size: n *
|
|
1463
|
+
update: { size: n * v.getDeviceScale() }
|
|
1464
1464
|
});
|
|
1465
1465
|
}
|
|
1466
1466
|
onDone() {
|
|
@@ -1552,15 +1552,15 @@ var Ht, $t = class e {
|
|
|
1552
1552
|
let e, t = this._native?.text, s = this._native.html;
|
|
1553
1553
|
if (null === s && t && t.includes("<table")) try {
|
|
1554
1554
|
const e = new DOMParser().parseFromString(t, n.Html), r = e.querySelector("parsererror");
|
|
1555
|
-
if (r) throw new
|
|
1555
|
+
if (r) throw new f("Unable to parse: " + r);
|
|
1556
1556
|
s = e, t = null;
|
|
1557
1557
|
} catch (e) {
|
|
1558
1558
|
console.warn("Discovered text as html table but could could not parse.");
|
|
1559
1559
|
}
|
|
1560
1560
|
try {
|
|
1561
|
-
const r = new ts(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ?
|
|
1561
|
+
const r = new ts(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ? Me(t) : [[]]);
|
|
1562
1562
|
let o;
|
|
1563
|
-
if (
|
|
1563
|
+
if (Pe(s, i, r) ? (e = r.sheet(), o = e.getUsedRange()) : s = null, o) {
|
|
1564
1564
|
const t = o.getSnapshot();
|
|
1565
1565
|
return this._parsed = {
|
|
1566
1566
|
prepare: (e, s) => t.prepare?.(e, s),
|
|
@@ -1583,7 +1583,7 @@ var Ht, $t = class e {
|
|
|
1583
1583
|
sheet: i,
|
|
1584
1584
|
options: await i.getMovables()._preparePicture({ source: { buffer: e } }, {
|
|
1585
1585
|
type: "picture",
|
|
1586
|
-
description:
|
|
1586
|
+
description: m("op.copyImageFromClipboard"),
|
|
1587
1587
|
autoSelect: !0,
|
|
1588
1588
|
...t && { bounds: t }
|
|
1589
1589
|
})
|
|
@@ -1619,11 +1619,11 @@ var Ht, $t = class e {
|
|
|
1619
1619
|
return this._assertOpen(), this._container.setName(e, t), this;
|
|
1620
1620
|
}
|
|
1621
1621
|
getVisibility() {
|
|
1622
|
-
return this._closed ?
|
|
1622
|
+
return this._closed ? q.Visibility.VeryHidden : this._container.getVisibility();
|
|
1623
1623
|
}
|
|
1624
1624
|
setVisibility(e = !0, t) {
|
|
1625
1625
|
let s;
|
|
1626
|
-
return this._assertOpen(), s = !0 === e ?
|
|
1626
|
+
return this._assertOpen(), s = !0 === e ? q.Visibility.Visible : !1 === e ? q.Visibility.Hidden : e, this._container.setVisibility(s, t), this;
|
|
1627
1627
|
}
|
|
1628
1628
|
getIndex() {
|
|
1629
1629
|
return this._container.getIndex();
|
|
@@ -1650,7 +1650,7 @@ var Ht, $t = class e {
|
|
|
1650
1650
|
try {
|
|
1651
1651
|
this._notify("onBeforeDelete");
|
|
1652
1652
|
} catch (e) {
|
|
1653
|
-
throw e instanceof Error ? e : new
|
|
1653
|
+
throw e instanceof Error ? e : new f(e?.message ?? g("error.sheet.modelDelete"));
|
|
1654
1654
|
}
|
|
1655
1655
|
this._notify("onDelete"), e.commit();
|
|
1656
1656
|
} catch (t) {
|
|
@@ -1831,7 +1831,7 @@ var os = {
|
|
|
1831
1831
|
revision: !0,
|
|
1832
1832
|
password: null,
|
|
1833
1833
|
revisionsPassword: null
|
|
1834
|
-
}), ls = class extends
|
|
1834
|
+
}), ls = class extends Y {
|
|
1835
1835
|
isWindowsAllowed() {
|
|
1836
1836
|
return this._isPropertyAllowed("windows");
|
|
1837
1837
|
}
|
|
@@ -2045,13 +2045,13 @@ function ds(e) {
|
|
|
2045
2045
|
function gs(e) {
|
|
2046
2046
|
return g("error.workbook.sheetNameNotFound", { sheetName: e });
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function fs(e, t) {
|
|
2049
2049
|
return g("chart" === t ? "error.workbook.sheetIsChart" : "macro" === t ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2051
|
+
function ms(e, t) {
|
|
2052
2052
|
return "chart" === t ? g("error.workbook.selectedIsChart", { sheetName: e }) : "macro" === t ? g("error.workbook.selectedIsMacro", { sheetName: e }) : "dialog" === t ? g("error.workbook.selectedIsDialog", { sheetName: e }) : g("error.workbook.noWorksheet");
|
|
2053
2053
|
}
|
|
2054
|
-
var _s = class extends
|
|
2054
|
+
var _s = class extends Ce {
|
|
2055
2055
|
constructor(e, t, s, r) {
|
|
2056
2056
|
super(), this._add = e, this._get = t, this._addListeners = s, this._getSelected = r;
|
|
2057
2057
|
}
|
|
@@ -2084,14 +2084,14 @@ var _s = class extends G {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
}, ps = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), ws = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
|
|
2086
2086
|
function ys(e) {
|
|
2087
|
-
const t = g(
|
|
2087
|
+
const t = g(m("workbook.defaultSheetName"), { n: e + 1 });
|
|
2088
2088
|
return "workbook.defaultSheetName" === t ? `Sheet${e + 1}` : t;
|
|
2089
2089
|
}
|
|
2090
2090
|
function Ss(e, t) {
|
|
2091
2091
|
return {
|
|
2092
|
-
...
|
|
2092
|
+
...Ee,
|
|
2093
2093
|
getWorksheet: () => null,
|
|
2094
|
-
toString: () =>
|
|
2094
|
+
toString: () => D(e, t)
|
|
2095
2095
|
};
|
|
2096
2096
|
}
|
|
2097
2097
|
function bs(e, t = !1) {
|
|
@@ -2114,7 +2114,7 @@ function bs(e, t = !1) {
|
|
|
2114
2114
|
}
|
|
2115
2115
|
return e;
|
|
2116
2116
|
}
|
|
2117
|
-
var ks, Cs = "workbook.activeSheet", vs = class e extends
|
|
2117
|
+
var ks, Cs = "workbook.activeSheet", vs = class e extends Le {
|
|
2118
2118
|
constructor(e, t, s, r) {
|
|
2119
2119
|
super(e, t, r), this._workbook = s;
|
|
2120
2120
|
}
|
|
@@ -2125,24 +2125,24 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2125
2125
|
let r = this._options;
|
|
2126
2126
|
return s && (r = {
|
|
2127
2127
|
...this._options,
|
|
2128
|
-
getOptions:
|
|
2128
|
+
getOptions: ve(this._options?.getOptions, s)
|
|
2129
2129
|
}), new e(t, this._internal, this._workbook, r);
|
|
2130
2130
|
}
|
|
2131
2131
|
_createRange(e, t) {
|
|
2132
|
-
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope,
|
|
2133
|
-
if (i && !i.sheet.isIWorksheet) throw new
|
|
2132
|
+
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope, q.Visibility.VeryHidden) : null;
|
|
2133
|
+
if (i && !i.sheet.isIWorksheet) throw new f(fs(i.name, i.sheet.getKind()));
|
|
2134
2134
|
if (!i) {
|
|
2135
2135
|
const e = r._anchorWorksheet();
|
|
2136
2136
|
return delete s?.scope, Ss(s, s ? {
|
|
2137
|
-
scope:
|
|
2137
|
+
scope: st,
|
|
2138
2138
|
...e.getEntireRange().getCoords()
|
|
2139
2139
|
} : null);
|
|
2140
2140
|
}
|
|
2141
2141
|
let o = this._options;
|
|
2142
2142
|
return t && (o = {
|
|
2143
2143
|
...this._options,
|
|
2144
|
-
getOptions:
|
|
2145
|
-
}), new Is(e,
|
|
2144
|
+
getOptions: ve(this._options.getOptions, t)
|
|
2145
|
+
}), new Is(e, te(i.sheet), this._workbook, o);
|
|
2146
2146
|
}
|
|
2147
2147
|
async select(e) {
|
|
2148
2148
|
const t = [];
|
|
@@ -2168,15 +2168,15 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
getAddress(e) {
|
|
2170
2170
|
const t = this._internal.getSheet(), s = t.getEntireRange().getCoords();
|
|
2171
|
-
return
|
|
2171
|
+
return ie(this.getCoords(), {
|
|
2172
2172
|
...s,
|
|
2173
2173
|
scope: t.getName()
|
|
2174
|
-
},
|
|
2174
|
+
}, D, oe, e);
|
|
2175
2175
|
}
|
|
2176
2176
|
toString() {
|
|
2177
2177
|
return this.getAddress();
|
|
2178
2178
|
}
|
|
2179
|
-
}, Is = class e extends
|
|
2179
|
+
}, Is = class e extends Ae {
|
|
2180
2180
|
constructor(e, t, s, r) {
|
|
2181
2181
|
super(e, t, r), this._workbook = s;
|
|
2182
2182
|
}
|
|
@@ -2184,17 +2184,17 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2184
2184
|
let s = this._options;
|
|
2185
2185
|
return t && (s = {
|
|
2186
2186
|
...this._options,
|
|
2187
|
-
getOptions:
|
|
2187
|
+
getOptions: ve(this._options?.getOptions, t)
|
|
2188
2188
|
}), new vs(e, this._internal, this._workbook, s);
|
|
2189
2189
|
}
|
|
2190
2190
|
_createRange(t, s) {
|
|
2191
2191
|
const r = this._internal;
|
|
2192
|
-
if (!t) return
|
|
2193
|
-
if (r.validateCoords(t), r.getSheet().isClosed()) return
|
|
2192
|
+
if (!t) return H(r.getSheet(), r.getSheet().getEntireCoords());
|
|
2193
|
+
if (r.validateCoords(t), r.getSheet().isClosed()) return H(null, r.getSheet().getEntireCoords(), t);
|
|
2194
2194
|
let i = this._options;
|
|
2195
2195
|
return s && (i = {
|
|
2196
2196
|
...this._options,
|
|
2197
|
-
getOptions:
|
|
2197
|
+
getOptions: ve(this._options?.getOptions, s)
|
|
2198
2198
|
}), new e(t, this._internal, this._workbook, i);
|
|
2199
2199
|
}
|
|
2200
2200
|
addListener(e, t) {
|
|
@@ -2207,7 +2207,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
getAddress(e) {
|
|
2209
2209
|
const t = this._internal.getSheet(), s = t?.getEntireRange().getCoords() ?? null;
|
|
2210
|
-
return
|
|
2210
|
+
return D(this.getCoords(), {
|
|
2211
2211
|
...s,
|
|
2212
2212
|
scope: t.getName()
|
|
2213
2213
|
});
|
|
@@ -2217,13 +2217,13 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
}, Rs = (e) => !!e && "object" == typeof e && "function" == typeof e.getOrigin, Ns = class {
|
|
2219
2219
|
constructor(t) {
|
|
2220
|
-
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new
|
|
2220
|
+
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new le(() => {
|
|
2221
2221
|
const e = [];
|
|
2222
|
-
for (const t of this.getWorksheets().getItems({ visibility:
|
|
2222
|
+
for (const t of this.getWorksheets().getItems({ visibility: q.Visibility.VeryHidden })) e.push(...t.getPivotTables());
|
|
2223
2223
|
return e;
|
|
2224
|
-
}, (e, t) => this.doBatch(e, t)), this._people = new
|
|
2224
|
+
}, (e, t) => this.doBatch(e, t)), this._people = new Ut(), this._commentCollection = new we(null, (e, t, s) => {
|
|
2225
2225
|
const r = [];
|
|
2226
|
-
for (const i of this.getWorksheets().getItems({ visibility:
|
|
2226
|
+
for (const i of this.getWorksheets().getItems({ visibility: q.Visibility.VeryHidden })) r.push(...i.getComments().getItems(e ? {
|
|
2227
2227
|
address: e,
|
|
2228
2228
|
ignoreHidden: t,
|
|
2229
2229
|
fullyContained: s
|
|
@@ -2238,21 +2238,21 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2238
2238
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2239
2239
|
}), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
|
|
2240
2240
|
const s = "string" == typeof t ? { origin: t } : { ...t }, r = s.origin;
|
|
2241
|
-
this._ownOriginProvider = !Rs(r), this._originProvider = Rs(r) ? r : new
|
|
2241
|
+
this._ownOriginProvider = !Rs(r), this._originProvider = Rs(r) ? r : new mt("string" == typeof r ? new ut(null, { name: r }) : r ?? new ut(null)), delete s.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
|
|
2242
2242
|
const i = s.json;
|
|
2243
|
-
delete s.json, this._transactions = s.transactions ?? new p(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new y(this, this._transactions), this._runtime = s.runtime ?? new
|
|
2243
|
+
delete s.json, this._transactions = s.transactions ?? new p(), this._id = this._transactions.create(), this._ownTransactions = !s.transactions, this._emitter = new y(this, this._transactions), this._runtime = s.runtime ?? new Oe("Workbook Runtime", {
|
|
2244
2244
|
isDate1904: () => this._isDate1904,
|
|
2245
2245
|
getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
|
|
2246
|
-
getLocale: () => this._locale ??
|
|
2246
|
+
getLocale: () => this._locale ?? Je() ?? it(),
|
|
2247
2247
|
getLocaleOverrides: () => this._localeOverrides
|
|
2248
2248
|
}), this._listenerLanguage = o.addChangeListener(() => {
|
|
2249
2249
|
this._closed || this._notifyAllChange();
|
|
2250
2250
|
});
|
|
2251
|
-
const n = this, a = this._beginCommit({ description:
|
|
2251
|
+
const n = this, a = this._beginCommit({ description: m(i ? "op.openWorkbook" : "op.newWorkbook") });
|
|
2252
2252
|
try {
|
|
2253
|
-
this._strings = s.strings ?? new
|
|
2253
|
+
this._strings = s.strings ?? new Be(), this._ownStrings = !s.strings, this._richValues = s.richData ?? new z(), this._resources = s.resources ?? new re(), this._ownResources = !s.resources, this._fetch = new es(this._resources, s.fetcher ?? new Zt()), this._createSheetName = s.createSheetNameCallback ?? ys;
|
|
2254
2254
|
let t = s.createWorksheetCallback;
|
|
2255
|
-
t || (t = (e) => new
|
|
2255
|
+
t || (t = (e) => new Re(e)), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (e, s, r, i, o, a, l) => {
|
|
2256
2256
|
let h = null;
|
|
2257
2257
|
const c = {
|
|
2258
2258
|
runtime: n._runtime,
|
|
@@ -2273,7 +2273,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2273
2273
|
h = t, n._addSheetRef({
|
|
2274
2274
|
name: s,
|
|
2275
2275
|
id: e,
|
|
2276
|
-
visibility: r ??
|
|
2276
|
+
visibility: r ?? q.Visibility.Visible,
|
|
2277
2277
|
sheetId: o,
|
|
2278
2278
|
sheet: t
|
|
2279
2279
|
}, i);
|
|
@@ -2290,7 +2290,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2290
2290
|
},
|
|
2291
2291
|
getVisibility: () => {
|
|
2292
2292
|
const e = n._getSheetRef(h);
|
|
2293
|
-
return e ? e.visibility :
|
|
2293
|
+
return e ? e.visibility : q.Visibility.Visible;
|
|
2294
2294
|
},
|
|
2295
2295
|
setVisibility: (e, t) => {
|
|
2296
2296
|
n._setSheetVisibility(h, e, t);
|
|
@@ -2301,10 +2301,10 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2301
2301
|
duplicate: () => n._duplicateSheet(h),
|
|
2302
2302
|
getIndex: () => {
|
|
2303
2303
|
const e = n._getSheetRef(h);
|
|
2304
|
-
return e ? n._getOffsetForId(e.id, n._getSheetRefs(
|
|
2304
|
+
return e ? n._getOffsetForId(e.id, n._getSheetRefs(q.Visibility.VeryHidden)) : i;
|
|
2305
2305
|
},
|
|
2306
2306
|
setIndex: (e, t) => {
|
|
2307
|
-
const s = n._getSheetRef(h,
|
|
2307
|
+
const s = n._getSheetRef(h, q.Visibility.VeryHidden);
|
|
2308
2308
|
return !!s && (n._moveSheet(s, e, t), !0);
|
|
2309
2309
|
},
|
|
2310
2310
|
setIndexCallback: (t) => {
|
|
@@ -2314,16 +2314,16 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
};
|
|
2316
2316
|
return a && (c.json = a), void 0 !== l && (c.uid = () => l), h = t(c, s, i, r), h;
|
|
2317
|
-
}, this._namedTableSource = new
|
|
2318
|
-
getSheets: () => n._sheets ? n.getWorksheets().getItems({ visibility:
|
|
2317
|
+
}, this._namedTableSource = new be({
|
|
2318
|
+
getSheets: () => n._sheets ? n.getWorksheets().getItems({ visibility: q.Visibility.VeryHidden }) : c.EmptyArray,
|
|
2319
2319
|
addSheetsListener: (e, t) => n.addListeners({ onSheetsChange: e }, t)
|
|
2320
|
-
}), this._names = s.names ?? new
|
|
2320
|
+
}), this._names = s.names ?? new Xe({
|
|
2321
2321
|
addressToRanges: (e) => n.getRanges(e),
|
|
2322
2322
|
getCurrentScope: () => n.getSelectedWorksheet()?.getName() ?? null,
|
|
2323
2323
|
isReadOnly: () => (n._options.readonly ?? !1) || n._isStructureProtected(),
|
|
2324
2324
|
transactions: n._transactions,
|
|
2325
2325
|
getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] : c.EmptyArray
|
|
2326
|
-
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new
|
|
2326
|
+
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new K({
|
|
2327
2327
|
runtime: n._runtime,
|
|
2328
2328
|
functions: s.functions,
|
|
2329
2329
|
json: i?.calc,
|
|
@@ -2342,9 +2342,9 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2342
2342
|
getSheetIndex: (e) => {
|
|
2343
2343
|
if (void 0 === e) {
|
|
2344
2344
|
const e = n.getSelectedSheet();
|
|
2345
|
-
return e ? this._getSheetRefs(
|
|
2345
|
+
return e ? this._getSheetRefs(q.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
|
|
2346
2346
|
}
|
|
2347
|
-
const t = this._getSheetRefs(
|
|
2347
|
+
const t = this._getSheetRefs(q.Visibility.VeryHidden);
|
|
2348
2348
|
e = e.toLowerCase();
|
|
2349
2349
|
const s = t.length;
|
|
2350
2350
|
for (let r = 0; r < s; r++) if (t[r].name.toLowerCase() === e) return r;
|
|
@@ -2354,7 +2354,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2354
2354
|
if (!t || 0 === t.length) return -1;
|
|
2355
2355
|
let s = (t[0].getRanges?.()?.getCoords()?.[0])?.scope;
|
|
2356
2356
|
if (!s) return -1;
|
|
2357
|
-
const r = this._getSheetRefs(
|
|
2357
|
+
const r = this._getSheetRefs(q.Visibility.VeryHidden);
|
|
2358
2358
|
s = s.toLowerCase();
|
|
2359
2359
|
const i = r.length;
|
|
2360
2360
|
for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === s) return e;
|
|
@@ -2363,7 +2363,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
return -1;
|
|
2365
2365
|
},
|
|
2366
|
-
getSheetCount: () => n._getSheetRefs(
|
|
2366
|
+
getSheetCount: () => n._getSheetRefs(q.Visibility.VeryHidden).length,
|
|
2367
2367
|
externalBooks: i?.externalBooks,
|
|
2368
2368
|
externalBookResolver: s.externalBookResolver,
|
|
2369
2369
|
namedCollection: n._names,
|
|
@@ -2373,7 +2373,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2373
2373
|
},
|
|
2374
2374
|
fetch: (e, t) => n._fetch.fetch(e, t),
|
|
2375
2375
|
parseText: (t, s) => (async (t, s, r) => {
|
|
2376
|
-
const i = await import("./
|
|
2376
|
+
const i = await import("./pfa2CH5NQuzku6FP.js").then((t) => e(t.default, 1)), o = (i.default ?? i).parse(s, {
|
|
2377
2377
|
delimiter: r?.delimiter ?? ",",
|
|
2378
2378
|
skipEmptyLines: !1
|
|
2379
2379
|
}).data;
|
|
@@ -2387,7 +2387,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2387
2387
|
const s = o[e], r = new Array(l);
|
|
2388
2388
|
for (let e = 0; e < l; e++) {
|
|
2389
2389
|
const i = s[e];
|
|
2390
|
-
r[e] = void 0 === i || "" === i ? null :
|
|
2390
|
+
r[e] = void 0 === i || "" === i ? null : ue(t, i).value;
|
|
2391
2391
|
}
|
|
2392
2392
|
h[e] = r;
|
|
2393
2393
|
}
|
|
@@ -2399,7 +2399,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2399
2399
|
}), this._ownCalculation = !s.calculation, this._scripts = this._createScripts(i?.modules), this._ownNames = !s.names, this._options = Object.freeze({ ...s });
|
|
2400
2400
|
const r = i?.sheets?.length ? i.sheets.map((e) => e.name) : [this._createSheetName(0)], o = r.map((e) => e + "-" + c.uuidV4()), l = (e) => {
|
|
2401
2401
|
const t = i?.sheets?.[e]?.kind;
|
|
2402
|
-
return !!t && t !==
|
|
2402
|
+
return !!t && t !== q.Kind.Worksheet;
|
|
2403
2403
|
};
|
|
2404
2404
|
this._calculation._setSheets(r.map((e, t) => l(t) ? [
|
|
2405
2405
|
o[t],
|
|
@@ -2445,7 +2445,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2445
2445
|
let e = this._getSheetRefs();
|
|
2446
2446
|
for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
|
|
2447
2447
|
const t = this._options;
|
|
2448
|
-
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new
|
|
2448
|
+
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new ae().getDefaultTheme(), this._styles = t?.styles ?? new $e(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new ns()), this._listenerProtection?.(), this._protection = new ls(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
2449
2449
|
s._emitter.notify("onProtectionChange");
|
|
2450
2450
|
} });
|
|
2451
2451
|
const s = this;
|
|
@@ -2508,7 +2508,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
setView(e) {
|
|
2510
2510
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2511
|
-
if (!e) throw new
|
|
2511
|
+
if (!e) throw new f(g("error.sheet.emptyView"));
|
|
2512
2512
|
this._listenerWorkbookView?.();
|
|
2513
2513
|
const t = this;
|
|
2514
2514
|
let s = -1;
|
|
@@ -2563,10 +2563,10 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2563
2563
|
return this._transactions;
|
|
2564
2564
|
}
|
|
2565
2565
|
getChanges(e) {
|
|
2566
|
-
const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility:
|
|
2566
|
+
const t = this._transactions, [s, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], o = this.getWorksheets().getItems({ visibility: q.Visibility.VeryHidden });
|
|
2567
2567
|
for (let e = 0; e < o.length; e++) {
|
|
2568
2568
|
const t = o[e];
|
|
2569
|
-
t instanceof
|
|
2569
|
+
t instanceof Re && i.push(...t._changeEventsOf(s, r ?? null));
|
|
2570
2570
|
}
|
|
2571
2571
|
return i;
|
|
2572
2572
|
}
|
|
@@ -2597,7 +2597,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2597
2597
|
}
|
|
2598
2598
|
setTheme(e) {
|
|
2599
2599
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2600
|
-
if (!e) throw new
|
|
2600
|
+
if (!e) throw new f(g("error.workbook.notSetValue"));
|
|
2601
2601
|
const t = this._theme;
|
|
2602
2602
|
return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
|
|
2603
2603
|
}
|
|
@@ -2619,7 +2619,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2619
2619
|
return this.getSelectedWorksheet();
|
|
2620
2620
|
}
|
|
2621
2621
|
getSheets(e) {
|
|
2622
|
-
const t = this._getSheetRefs(e?.visibility ??
|
|
2622
|
+
const t = this._getSheetRefs(e?.visibility ?? q.Visibility.Visible), s = new Array(t.length);
|
|
2623
2623
|
for (let e = 0; e < t.length; e++) s[e] = t[e].sheet;
|
|
2624
2624
|
return s;
|
|
2625
2625
|
}
|
|
@@ -2630,16 +2630,16 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2630
2630
|
if (!t) throw new a(gs(e));
|
|
2631
2631
|
return t.sheet;
|
|
2632
2632
|
}
|
|
2633
|
-
getWorksheet(e, t =
|
|
2633
|
+
getWorksheet(e, t = q.Visibility.Visible) {
|
|
2634
2634
|
if ("number" == typeof e) return this.getWorksheetAt(e, t);
|
|
2635
2635
|
if (void 0 === e) return this._requireSelectedWorksheet();
|
|
2636
2636
|
if (!e) throw new Error(g("error.workbook.sheetNameNotProvided"));
|
|
2637
2637
|
const s = this._getSheetRef(e, t);
|
|
2638
2638
|
if (!s) throw new a(gs(e));
|
|
2639
|
-
if (!xs(s)) throw new a(
|
|
2639
|
+
if (!xs(s)) throw new a(fs(s.name, s.sheet.getKind()));
|
|
2640
2640
|
return s.sheet;
|
|
2641
2641
|
}
|
|
2642
|
-
getWorksheetAt(e, t =
|
|
2642
|
+
getWorksheetAt(e, t = q.Visibility.Visible) {
|
|
2643
2643
|
const s = this._getWorksheets(t)[e];
|
|
2644
2644
|
if (!s) throw new a(function(e) {
|
|
2645
2645
|
return g("error.workbook.sheetIndexNotFound", { index: e });
|
|
@@ -2650,10 +2650,10 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2650
2650
|
const e = this.getSelectedWorksheet();
|
|
2651
2651
|
if (e) return e;
|
|
2652
2652
|
const t = this.getSelectedSheet();
|
|
2653
|
-
throw new
|
|
2653
|
+
throw new f(ms(t?.getName() ?? "", t?.getKind() ?? q.Kind.Worksheet));
|
|
2654
2654
|
}
|
|
2655
2655
|
_anchorWorksheet() {
|
|
2656
|
-
return this.getSelectedWorksheet() || (this._getWorksheets(
|
|
2656
|
+
return this.getSelectedWorksheet() || (this._getWorksheets(q.Visibility.VeryHidden)[0] ?? null);
|
|
2657
2657
|
}
|
|
2658
2658
|
getWorksheets() {
|
|
2659
2659
|
return this._sheets;
|
|
@@ -2661,7 +2661,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2661
2661
|
addWorksheet(e) {
|
|
2662
2662
|
return this.getWorksheets().add(e);
|
|
2663
2663
|
}
|
|
2664
|
-
_getWorksheets(e =
|
|
2664
|
+
_getWorksheets(e = q.Visibility.Visible) {
|
|
2665
2665
|
const t = this._getSheetRefs(e), s = [], r = t.length;
|
|
2666
2666
|
for (let e = 0; e < r; e++) {
|
|
2667
2667
|
const r = t[e];
|
|
@@ -2669,17 +2669,17 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2669
2669
|
}
|
|
2670
2670
|
return s;
|
|
2671
2671
|
}
|
|
2672
|
-
_getSheetRefs(e =
|
|
2672
|
+
_getSheetRefs(e = q.Visibility.Visible) {
|
|
2673
2673
|
const t = this._getState();
|
|
2674
|
-
return t ? e ===
|
|
2674
|
+
return t ? e === q.Visibility.Visible ? t.sheetRefsVisible : e === q.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === q.Visibility.VeryHidden ? t.sheetRefsAll : c.EmptyArray : [];
|
|
2675
2675
|
}
|
|
2676
|
-
_getSheetRef(e, t =
|
|
2676
|
+
_getSheetRef(e, t = q.Visibility.Visible) {
|
|
2677
2677
|
let s = null;
|
|
2678
2678
|
return "number" == typeof e ? this._getSheetRefs(t)[e] : ("string" == typeof e ? s = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? s = this._getState().refsByInstance.get(e) : void 0 !== e?.id && (s = this._getState().refsById.get(e.id)), s);
|
|
2679
2679
|
}
|
|
2680
2680
|
_validateNewSheetName(e, t = !0) {
|
|
2681
2681
|
if (null == e) return e;
|
|
2682
|
-
if (bs(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new
|
|
2682
|
+
if (bs(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new f(g("error.workbook.nameTaken"));
|
|
2683
2683
|
return e.substring(0, 31);
|
|
2684
2684
|
}
|
|
2685
2685
|
findValidSheetName(e) {
|
|
@@ -2715,7 +2715,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2715
2715
|
let s, r = null;
|
|
2716
2716
|
s = "string" == typeof e ? { name: e } : "number" == typeof e ? { index: e } : e, s = {
|
|
2717
2717
|
...s,
|
|
2718
|
-
description: s?.description ??
|
|
2718
|
+
description: s?.description ?? m("op.addSheet")
|
|
2719
2719
|
};
|
|
2720
2720
|
const i = this.beginCommit(s);
|
|
2721
2721
|
try {
|
|
@@ -2734,7 +2734,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2734
2734
|
_nextSheetName(e = null) {
|
|
2735
2735
|
let t = e ? e.toLowerCase() : null;
|
|
2736
2736
|
const s = this._getState(), r = s.sheetsByLowerCaseName;
|
|
2737
|
-
if (e && r.has(t)) throw new
|
|
2737
|
+
if (e && r.has(t)) throw new f(function(e) {
|
|
2738
2738
|
return g("error.workbook.nameDuplicate", { sheetName: e });
|
|
2739
2739
|
}(e));
|
|
2740
2740
|
t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
|
|
@@ -2747,8 +2747,8 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2747
2747
|
}
|
|
2748
2748
|
_addSheet(e, t = null, s = null, r) {
|
|
2749
2749
|
t = this._nextSheetName(t);
|
|
2750
|
-
const i = this._getState(), o = this._createSheet(i.lastId, t,
|
|
2751
|
-
if (!o) throw new
|
|
2750
|
+
const i = this._getState(), o = this._createSheet(i.lastId, t, q.Visibility.Visible, s, void 0, null, r);
|
|
2751
|
+
if (!o) throw new f(g("error.workbook.sheetNameBlank"));
|
|
2752
2752
|
return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), o;
|
|
2753
2753
|
}
|
|
2754
2754
|
_createOpaqueSheet(e, t, s, r, i, o, n, a, l) {
|
|
@@ -2767,25 +2767,25 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2767
2767
|
setName: (e, t) => {
|
|
2768
2768
|
h._setSheetName(u, e, t);
|
|
2769
2769
|
},
|
|
2770
|
-
getVisibility: () => h._getSheetRef(u,
|
|
2770
|
+
getVisibility: () => h._getSheetRef(u, q.Visibility.VeryHidden)?.visibility ?? q.Visibility.Visible,
|
|
2771
2771
|
setVisibility: (e, t) => {
|
|
2772
2772
|
h._setSheetVisibility(u, e, t);
|
|
2773
2773
|
},
|
|
2774
2774
|
getIndex: () => {
|
|
2775
|
-
const e = h._getSheetRef(u,
|
|
2776
|
-
return e ? h._getOffsetForId(e.id, h._getSheetRefs(
|
|
2775
|
+
const e = h._getSheetRef(u, q.Visibility.VeryHidden);
|
|
2776
|
+
return e ? h._getOffsetForId(e.id, h._getSheetRefs(q.Visibility.VeryHidden)) : -1;
|
|
2777
2777
|
},
|
|
2778
2778
|
setIndex: (e, t) => {
|
|
2779
|
-
const s = h._getSheetRef(u,
|
|
2779
|
+
const s = h._getSheetRef(u, q.Visibility.VeryHidden);
|
|
2780
2780
|
s && h._moveSheet(s, e, t);
|
|
2781
2781
|
},
|
|
2782
2782
|
requestSelect: () => h._requestSelect(u),
|
|
2783
|
-
isAttached: () => !!h._getSheetRef(u,
|
|
2783
|
+
isAttached: () => !!h._getSheetRef(u, q.Visibility.VeryHidden)
|
|
2784
2784
|
}
|
|
2785
2785
|
}), this._sheetOnNameChange.set(e, () => u._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => u._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => u._notify("onIndexChange")), this._addSheetRef({
|
|
2786
2786
|
name: t,
|
|
2787
2787
|
id: e,
|
|
2788
|
-
visibility: s ??
|
|
2788
|
+
visibility: s ?? q.Visibility.Visible,
|
|
2789
2789
|
sheetId: i,
|
|
2790
2790
|
sheet: u
|
|
2791
2791
|
}, r), u;
|
|
@@ -2802,7 +2802,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2802
2802
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2803
2803
|
if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
2804
2804
|
const s = e, r = [], i = [], o = s.length;
|
|
2805
|
-
for (let e = 0; e < o; e++) s[e].visibility ===
|
|
2805
|
+
for (let e = 0; e < o; e++) s[e].visibility === q.Visibility.Visible ? (r.push(s[e]), i.push(s[e])) : s[e].visibility === q.Visibility.Hidden && i.push(s[e]);
|
|
2806
2806
|
this._updateState({
|
|
2807
2807
|
sheetRefsAll: s,
|
|
2808
2808
|
sheetRefsVisible: r,
|
|
@@ -2836,21 +2836,21 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2836
2836
|
u.set(e.id, n);
|
|
2837
2837
|
const d = new Map(s.sheetsByLowerCaseName);
|
|
2838
2838
|
d.set(a, n);
|
|
2839
|
-
const
|
|
2840
|
-
let
|
|
2839
|
+
const f = this;
|
|
2840
|
+
let m = s.listenersSheets;
|
|
2841
2841
|
if (void 0 !== n) {
|
|
2842
2842
|
const t = n.addListeners({
|
|
2843
2843
|
onBeforeDelete: (e) => {
|
|
2844
|
-
|
|
2844
|
+
f._validateDeleteSheet(e);
|
|
2845
2845
|
},
|
|
2846
2846
|
onDelete(e) {
|
|
2847
|
-
let t =
|
|
2847
|
+
let t = f._getSheetRef(e, q.Visibility.VeryHidden);
|
|
2848
2848
|
if (!t) return;
|
|
2849
|
-
const s =
|
|
2849
|
+
const s = f._beginCommit({ description: g("op.deleteSheet", { name: t.name }) });
|
|
2850
2850
|
try {
|
|
2851
|
-
const r =
|
|
2851
|
+
const r = f._getState(), i = r.sheetRefsAll, o = f._getOffsetForId(t.id, i);
|
|
2852
2852
|
let a = [...i];
|
|
2853
|
-
a.splice(o, 1),
|
|
2853
|
+
a.splice(o, 1), f._updateSheetRefStates(a);
|
|
2854
2854
|
const l = new Map(r.refsById);
|
|
2855
2855
|
l.delete(t.id);
|
|
2856
2856
|
const h = new Map(r.sheetsById);
|
|
@@ -2861,31 +2861,31 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2861
2861
|
d.delete(c);
|
|
2862
2862
|
const g = new Map(r.refsByInstance);
|
|
2863
2863
|
g.delete(e), r.listenersSheets.get(t.id)();
|
|
2864
|
-
const
|
|
2865
|
-
|
|
2864
|
+
const m = new Map(r.listenersSheets);
|
|
2865
|
+
m.delete(t.id), f._adjustRemoveSelectionIfRequired(o, t.id), f._adjustSheetNamesIfRequired(), f._sheetOnNameChange.delete(t.id), f._sheetOnVisibilityChange.delete(t.id), f._sheetOnIndexChange.delete(t.id), f._tellSheets(), f._emitter.notify("onSheetsChange");
|
|
2866
2866
|
const _ = new Set(r.sheetsCreated);
|
|
2867
|
-
_.has(n) && _.delete(n),
|
|
2867
|
+
_.has(n) && _.delete(n), f._updateState({
|
|
2868
2868
|
refsById: l,
|
|
2869
2869
|
sheetsById: h,
|
|
2870
2870
|
refsByLowerCaseName: u,
|
|
2871
2871
|
sheetsByLowerCaseName: d,
|
|
2872
2872
|
refsByInstance: g,
|
|
2873
2873
|
sheetsCreated: _,
|
|
2874
|
-
listenersSheets:
|
|
2874
|
+
listenersSheets: m
|
|
2875
2875
|
}), s.commit();
|
|
2876
2876
|
} catch (e) {
|
|
2877
2877
|
throw s.rollback(), e;
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
2880
|
}, { transactional: !0 }), r = xs(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
|
|
2881
|
-
|
|
2882
|
-
source:
|
|
2881
|
+
f.getView().getActiveSheetId() === f._getSheetRef(e)?.id && f._emitter.notify("onSelectionChange", {
|
|
2882
|
+
source: f,
|
|
2883
2883
|
params: e
|
|
2884
2884
|
});
|
|
2885
2885
|
} }, { transactional: !1 }) : null, i = () => {
|
|
2886
2886
|
t(), r?.();
|
|
2887
2887
|
};
|
|
2888
|
-
|
|
2888
|
+
m = new Map(s.listenersSheets), m.set(e.id, i);
|
|
2889
2889
|
}
|
|
2890
2890
|
let _ = s.lastId;
|
|
2891
2891
|
-1 !== _ && (_ = Math.max(_, e.id)), this._updateState({ lastId: _ }), this._updateState({
|
|
@@ -2894,7 +2894,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2894
2894
|
refsByInstance: c,
|
|
2895
2895
|
sheetsById: u,
|
|
2896
2896
|
sheetsByLowerCaseName: d,
|
|
2897
|
-
listenersSheets:
|
|
2897
|
+
listenersSheets: m
|
|
2898
2898
|
}), this._adjustSheetNamesIfRequired();
|
|
2899
2899
|
const p = new Set(this._getState().sheetsCreated);
|
|
2900
2900
|
return p.add(e.sheet), this._updateState({ sheetsCreated: p }), this._tellSheets(), e;
|
|
@@ -2933,27 +2933,27 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2933
2933
|
let s = this._view.getActiveSheetId();
|
|
2934
2934
|
s ?? (this._view.setActiveSheetId(t), s = t);
|
|
2935
2935
|
let r = e.refsById.get(s);
|
|
2936
|
-
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility ===
|
|
2936
|
+
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility === q.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(s, e.sheetRefsVisible));
|
|
2937
2937
|
}
|
|
2938
2938
|
_validateDeleteSheet(e) {
|
|
2939
2939
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2940
2940
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
2941
2941
|
let s = this._getSheetRef(e);
|
|
2942
|
-
if (!s) throw new
|
|
2942
|
+
if (!s) throw new f(function(e) {
|
|
2943
2943
|
return g("error.workbook.deleteKey", { key: e });
|
|
2944
2944
|
}(e));
|
|
2945
2945
|
const r = this._getState().sheetRefsVisible;
|
|
2946
|
-
if (1 === r.length && r[0].id === s.id) throw new
|
|
2946
|
+
if (1 === r.length && r[0].id === s.id) throw new f(g("error.workbook.sheetOne"));
|
|
2947
2947
|
}
|
|
2948
2948
|
_getOffsetForId(e, t) {
|
|
2949
2949
|
const s = t.length;
|
|
2950
2950
|
for (let r = 0; r < s; r++) if (t[r].id === e) return r;
|
|
2951
|
-
throw new
|
|
2951
|
+
throw new f(g("error.workbook.noVisibleRefs"));
|
|
2952
2952
|
}
|
|
2953
2953
|
find(e) {
|
|
2954
2954
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2955
2955
|
const t = this._getWorksheets();
|
|
2956
|
-
if (0 === t.length) return { next: () =>
|
|
2956
|
+
if (0 === t.length) return { next: () => ge };
|
|
2957
2957
|
if (1 === t.length) return t[0].find(e);
|
|
2958
2958
|
"string" == typeof e && (e = { text: e });
|
|
2959
2959
|
const s = !e?.reverse;
|
|
@@ -2972,24 +2972,24 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2972
2972
|
rowIndex: t[0].rowStart
|
|
2973
2973
|
};
|
|
2974
2974
|
}
|
|
2975
|
-
const
|
|
2975
|
+
const f = d.createCellComparator(e?.axis, e?.reverse);
|
|
2976
2976
|
delete (e = { ...e }).from;
|
|
2977
|
-
const
|
|
2977
|
+
const m = () => {
|
|
2978
2978
|
if (!u && c.done && (a && o === i ? u = !0 : s ? (o++, o > t.length - 1 && (o = 0, a = !0)) : (o--, o < 0 && (o = t.length - 1, a = !0)), r && a && (u = !0), u || l || !a || o !== i || (u = !0), !u)) {
|
|
2979
2979
|
n = t[o], h = n.find(e);
|
|
2980
2980
|
const s = c;
|
|
2981
2981
|
return c = h.next(), s;
|
|
2982
2982
|
}
|
|
2983
|
-
if (!u && a && o === i && (c.done || !l || !c.done &&
|
|
2983
|
+
if (!u && a && o === i && (c.done || !l || !c.done && f(c.value.getCoords(), l) >= 0) && (u = !0), u) {
|
|
2984
2984
|
const e = c;
|
|
2985
|
-
return c =
|
|
2985
|
+
return c = ge, e;
|
|
2986
2986
|
}
|
|
2987
2987
|
const d = c;
|
|
2988
2988
|
return c = h.next(), d;
|
|
2989
2989
|
};
|
|
2990
2990
|
return { next: () => {
|
|
2991
|
-
let e =
|
|
2992
|
-
for (; !u && e.done;) e =
|
|
2991
|
+
let e = m();
|
|
2992
|
+
for (; !u && e.done;) e = m();
|
|
2993
2993
|
return e;
|
|
2994
2994
|
} };
|
|
2995
2995
|
}
|
|
@@ -2997,24 +2997,24 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
2997
2997
|
let r = 0, i = null;
|
|
2998
2998
|
const o = "function" == typeof t, n = s?.maxCount ?? Number.MAX_SAFE_INTEGER, a = !s?.maxCount;
|
|
2999
2999
|
let l = "";
|
|
3000
|
-
const h = "string" == typeof t ?
|
|
3001
|
-
let c = s?.description ??
|
|
3000
|
+
const h = "string" == typeof t ? J(t) : null;
|
|
3001
|
+
let c = s?.description ?? m("op.replace");
|
|
3002
3002
|
const u = this._transactions.beginCommit({ description: c });
|
|
3003
3003
|
try {
|
|
3004
|
-
let c = null, d = null,
|
|
3005
|
-
for (; !
|
|
3006
|
-
const n =
|
|
3004
|
+
let c = null, d = null, f = e.next();
|
|
3005
|
+
for (; !f.done && r < n;) {
|
|
3006
|
+
const n = f.value, a = n.getWorksheet();
|
|
3007
3007
|
a !== c && (c = a, null !== d && d.apply(), d = c.getEntireRange().createSparseBuilder({
|
|
3008
3008
|
axis: s?.axis,
|
|
3009
3009
|
allowUnorderedWrites: !0
|
|
3010
3010
|
}));
|
|
3011
3011
|
const l = o ? t(n) : t;
|
|
3012
|
-
void 0 !== l && l !== n && (d.push(n, l), r++, i = n),
|
|
3012
|
+
void 0 !== l && l !== n && (d.push(n, l), r++, i = n), f = e.next();
|
|
3013
3013
|
}
|
|
3014
|
-
d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ? g("op.replaceAllWith", { value: h }) :
|
|
3014
|
+
d?.apply(), 1 === r && 1 === n && i && (l = i.getAddress()), 0 === r ? u.rollback() : u.commit({ description: s?.description ?? (a ? null !== h ? g("op.replaceAllWith", { value: h }) : m("op.replaceAll") : l ? null !== h ? g("op.replaceAtWith", {
|
|
3015
3015
|
address: l,
|
|
3016
3016
|
value: h
|
|
3017
|
-
}) : g("op.replaceAt", { address: l }) : null !== h ? g("op.replaceWith", { value: h }) :
|
|
3017
|
+
}) : g("op.replaceAt", { address: l }) : null !== h ? g("op.replaceWith", { value: h }) : m("op.replace")) });
|
|
3018
3018
|
} catch (e) {
|
|
3019
3019
|
throw u.rollback(), e;
|
|
3020
3020
|
}
|
|
@@ -3057,92 +3057,92 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3057
3057
|
const s = this._getSheetRefs(), r = this.getSelectedSheetIndex();
|
|
3058
3058
|
let i = null;
|
|
3059
3059
|
if (e) {
|
|
3060
|
-
if (i = this._getSheetRef(e), !i) throw new
|
|
3060
|
+
if (i = this._getSheetRef(e), !i) throw new f(ds(i));
|
|
3061
3061
|
} else i = s[r];
|
|
3062
3062
|
if (!i) return null;
|
|
3063
|
-
if (!xs(i)) throw new
|
|
3063
|
+
if (!xs(i)) throw new f((o = i.name, g("error.workbook.sheetNotDuplicable", { sheetName: o })));
|
|
3064
3064
|
var o;
|
|
3065
3065
|
const n = i.sheet, a = s.indexOf(i), l = this._strings.beginPersist(), h = this.getResources().beginPersist(), c = this.getStyles().beginPersist(), u = this._richValues.beginPersist();
|
|
3066
3066
|
let d = null;
|
|
3067
|
-
const
|
|
3067
|
+
const m = this.beginCommit(g("op.duplicateNamed", { name: n.getName() }));
|
|
3068
3068
|
try {
|
|
3069
3069
|
const e = this._getState().refsByInstance.get(n), t = await n.toJSON(), r = s.length + 1, i = this.findValidSheetName(e.name), o = this._createSheet(r, i, e.visibility, a, void 0, t);
|
|
3070
|
-
this._tellSheets(), this._emitter.notify("onSheetsChange"), d = o,
|
|
3070
|
+
this._tellSheets(), this._emitter.notify("onSheetsChange"), d = o, m.commit();
|
|
3071
3071
|
} catch (e) {
|
|
3072
|
-
throw
|
|
3072
|
+
throw m.rollback(), e;
|
|
3073
3073
|
} finally {
|
|
3074
3074
|
u.endPersist(), c.endPersist(), h.endPersist(), l.endPersist();
|
|
3075
3075
|
}
|
|
3076
3076
|
return d;
|
|
3077
3077
|
}
|
|
3078
3078
|
_createRange(e, t) {
|
|
3079
|
-
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope,
|
|
3080
|
-
if (r && !xs(r)) throw new
|
|
3079
|
+
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope, q.Visibility.VeryHidden) : null;
|
|
3080
|
+
if (r && !xs(r)) throw new f(fs(r.name, r.sheet.getKind()));
|
|
3081
3081
|
if (!r) {
|
|
3082
3082
|
const e = this._anchorWorksheet();
|
|
3083
3083
|
return e ? (delete s?.scope, Ss(s, s ? {
|
|
3084
|
-
scope:
|
|
3084
|
+
scope: st,
|
|
3085
3085
|
...e.getEntireRange().getCoords()
|
|
3086
3086
|
} : null)) : void console.warn(g("error.workbook.noVisibleRefs"));
|
|
3087
3087
|
}
|
|
3088
3088
|
const i = r.sheet;
|
|
3089
3089
|
let o = null;
|
|
3090
|
-
return t && (o = { getOptions: t }), new Is(e,
|
|
3090
|
+
return t && (o = { getOptions: t }), new Is(e, te(i), this, o);
|
|
3091
3091
|
}
|
|
3092
3092
|
_createRanges(e, t) {
|
|
3093
3093
|
const s = this._anchorWorksheet();
|
|
3094
|
-
if (!s) throw new
|
|
3094
|
+
if (!s) throw new f(ms("", q.Kind.Worksheet));
|
|
3095
3095
|
let r = null;
|
|
3096
|
-
return t && (r = { getOptions: t }), new vs(e,
|
|
3096
|
+
return t && (r = { getOptions: t }), new vs(e, te(s), this, r);
|
|
3097
3097
|
}
|
|
3098
3098
|
getRange(e, t) {
|
|
3099
3099
|
if (void 0 === e) return this.getSelectedRange(t);
|
|
3100
|
-
"number" == typeof e && (e =
|
|
3100
|
+
"number" == typeof e && (e = Ue(arguments), t = void 0);
|
|
3101
3101
|
try {
|
|
3102
3102
|
const s = this._rangesAddressToCoords(e);
|
|
3103
|
-
if (1 !== s.length) throw new
|
|
3103
|
+
if (1 !== s.length) throw new f(g("error.address.singleRangeOnlyAlt"));
|
|
3104
3104
|
return this._createRange(s[0], t);
|
|
3105
3105
|
} catch (t) {
|
|
3106
3106
|
if (t instanceof a) throw new a(t.message);
|
|
3107
|
-
throw new
|
|
3107
|
+
throw new f(t.message ?? rt(e));
|
|
3108
3108
|
}
|
|
3109
3109
|
}
|
|
3110
3110
|
getCell(e) {
|
|
3111
3111
|
if (void 0 === e) return this.getSelectedCell();
|
|
3112
3112
|
const t = this.getRange(e);
|
|
3113
|
-
if (t.size > 1) throw new
|
|
3113
|
+
if (t.size > 1) throw new f(g("error.address.singleCellOnly"));
|
|
3114
3114
|
return t.getCell();
|
|
3115
3115
|
}
|
|
3116
3116
|
getRanges(e, t) {
|
|
3117
3117
|
const s = this._rangesAddressToCoords(e);
|
|
3118
|
-
if (0 === s.length) throw new
|
|
3118
|
+
if (0 === s.length) throw new f(rt(e));
|
|
3119
3119
|
return this._createRanges(s, t);
|
|
3120
3120
|
}
|
|
3121
3121
|
_createGraphRanges(e, t) {
|
|
3122
3122
|
const s = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
|
|
3123
3123
|
for (let e = 0; e < t.length; e++) {
|
|
3124
|
-
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName,
|
|
3125
|
-
n && s.push(new
|
|
3124
|
+
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName, q.Visibility.VeryHidden) : null, n = o && xs(o) ? o.sheet : this._anchorWorksheet();
|
|
3125
|
+
n && s.push(new Ve(i, r, te(n), null));
|
|
3126
3126
|
}
|
|
3127
3127
|
for (let t = 0; t < e.length; t++) s.push(e[t]);
|
|
3128
3128
|
const i = this._anchorWorksheet();
|
|
3129
|
-
return 0 !== s.length && i ? new vs(s,
|
|
3129
|
+
return 0 !== s.length && i ? new vs(s, te(i), this, null) : null;
|
|
3130
3130
|
}
|
|
3131
3131
|
getAnomalies(e) {
|
|
3132
3132
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3133
|
-
const t =
|
|
3134
|
-
const t =
|
|
3133
|
+
const t = ze(e), s = this._getWorksheets(q.Visibility.VeryHidden).map((e) => {
|
|
3134
|
+
const t = te(e);
|
|
3135
3135
|
return {
|
|
3136
3136
|
bounds: t.getSheet().getEntireCoords(),
|
|
3137
3137
|
internal: t,
|
|
3138
3138
|
qualified: !0
|
|
3139
3139
|
};
|
|
3140
3140
|
});
|
|
3141
|
-
return new
|
|
3141
|
+
return new qe(s, () => (this.getSelectedWorksheet() ?? this._getWorksheets(q.Visibility.VeryHidden)[0]).getEntireRange(), t);
|
|
3142
3142
|
}
|
|
3143
3143
|
getStats(e) {
|
|
3144
3144
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3145
|
-
const t = this._getWorksheets(
|
|
3145
|
+
const t = this._getWorksheets(q.Visibility.VeryHidden), s = t.length;
|
|
3146
3146
|
if (1 === s) return t[0].getStats(e);
|
|
3147
3147
|
const r = new Array(s);
|
|
3148
3148
|
for (let i = 0; i < s; i++) r[i] = t[i].getStats(e);
|
|
@@ -3171,8 +3171,8 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3171
3171
|
getSelectedCell() {
|
|
3172
3172
|
return this._requireSelectedWorksheet().getSelectedCell();
|
|
3173
3173
|
}
|
|
3174
|
-
_rangesAddressToCoords(e, t = !0, s =
|
|
3175
|
-
if (!e) throw new
|
|
3174
|
+
_rangesAddressToCoords(e, t = !0, s = q.Visibility.Hidden) {
|
|
3175
|
+
if (!e) throw new f(g("error.address.noAddress"));
|
|
3176
3176
|
const r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
|
|
3177
3177
|
if (o && (i.scope = o), "string" == typeof e) {
|
|
3178
3178
|
const t = e.trim().toLowerCase();
|
|
@@ -3181,11 +3181,11 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3181
3181
|
"r" === t ? r.rowStart = r.rowEnd = s.rowIndex : r.colStart = r.colEnd = s.colIndex, e = r;
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
3184
|
-
const n = this, a =
|
|
3184
|
+
const n = this, a = De(e, i, je, (e) => {
|
|
3185
3185
|
if (!t) return null;
|
|
3186
3186
|
if ("string" == typeof e) {
|
|
3187
|
-
const t =
|
|
3188
|
-
getTable: (e) =>
|
|
3187
|
+
const t = Qe(e, {
|
|
3188
|
+
getTable: (e) => ce(n.getNames().getByName(e)),
|
|
3189
3189
|
getAnchor: () => r ? {
|
|
3190
3190
|
sheet: r,
|
|
3191
3191
|
coords: r.getSelectedCell().getCoords()
|
|
@@ -3195,16 +3195,16 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3195
3195
|
const s = n.getNames().getByName(e)?.getRanges?.();
|
|
3196
3196
|
if (s) return s.getCoords();
|
|
3197
3197
|
}
|
|
3198
|
-
throw new
|
|
3198
|
+
throw new f(`Invalid sheet reference '${e}'.`);
|
|
3199
3199
|
}), l = a.length;
|
|
3200
3200
|
for (let e = 0; e < l; e++) this._validateCoords(a[e], s);
|
|
3201
3201
|
return a;
|
|
3202
3202
|
}
|
|
3203
|
-
_validateCoords(e, t =
|
|
3203
|
+
_validateCoords(e, t = q.Visibility.Visible, s = g("error.sheet.oobRange")) {
|
|
3204
3204
|
if (null === e) return;
|
|
3205
3205
|
const r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
|
|
3206
3206
|
if (!d.isRangeWithinRange(e, r)) throw new a(s);
|
|
3207
|
-
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new
|
|
3207
|
+
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new f(g("error.address.invalidRangeInverted"));
|
|
3208
3208
|
}
|
|
3209
3209
|
_updateSheetRef(e, t) {
|
|
3210
3210
|
const s = this._getState();
|
|
@@ -3229,15 +3229,15 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3229
3229
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3230
3230
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
3231
3231
|
const i = this._getSheetRef(e);
|
|
3232
|
-
if (!i) throw new
|
|
3232
|
+
if (!i) throw new f(ds(e));
|
|
3233
3233
|
if (s === i.name) return i.sheet;
|
|
3234
|
-
if (null == (s = this._validateNewSheetName(s))) throw new
|
|
3234
|
+
if (null == (s = this._validateNewSheetName(s))) throw new f(g("error.workbook.sheetNameNotProvided"));
|
|
3235
3235
|
const o = Object.freeze({
|
|
3236
3236
|
...i,
|
|
3237
3237
|
name: s
|
|
3238
3238
|
});
|
|
3239
3239
|
let n = null;
|
|
3240
|
-
const a = this.beginCommit(
|
|
3240
|
+
const a = this.beginCommit(m("op.renameSheet"));
|
|
3241
3241
|
try {
|
|
3242
3242
|
const e = this._updateSheetRef(i, o);
|
|
3243
3243
|
this._adjustSheetNamesIfRequired(), this._sheetOnNameChange.forEach((e, t) => {
|
|
@@ -3248,24 +3248,24 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3248
3248
|
}
|
|
3249
3249
|
return n;
|
|
3250
3250
|
}
|
|
3251
|
-
_setSheetVisibility(e, s =
|
|
3251
|
+
_setSheetVisibility(e, s = q.Visibility.Visible, r) {
|
|
3252
3252
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3253
3253
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
3254
|
-
const i = this._getSheetRef(e,
|
|
3254
|
+
const i = this._getSheetRef(e, q.Visibility.VeryHidden);
|
|
3255
3255
|
if (!i) return null;
|
|
3256
3256
|
if (s === i.visibility) return;
|
|
3257
3257
|
let o = null, n = "";
|
|
3258
|
-
s ===
|
|
3258
|
+
s === q.Visibility.Visible ? n = m("op.unhideSheet") : s === q.Visibility.Hidden ? n = m("op.hideSheet") : s === q.Visibility.VeryHidden && (n = m("op.veryHideSheet"));
|
|
3259
3259
|
const a = this.beginCommit(n);
|
|
3260
3260
|
try {
|
|
3261
3261
|
const e = this._getState().sheetRefsVisible;
|
|
3262
|
-
if (s !==
|
|
3262
|
+
if (s !== q.Visibility.Visible && 1 === e.length && e[0].id === i.id) throw new f(g("error.workbook.sheetOne"));
|
|
3263
3263
|
const t = {
|
|
3264
3264
|
...i,
|
|
3265
3265
|
visibility: s
|
|
3266
3266
|
};
|
|
3267
3267
|
let n = -1;
|
|
3268
|
-
s !==
|
|
3268
|
+
s !== q.Visibility.Visible && (n = this._getOffsetForId(i.id, e)), o = this._updateSheetRef(i, t).sheet, s !== q.Visibility.Visible && this._adjustRemoveSelectionIfRequired(n, i.id), this._adjustSheetNamesIfRequired(), a.commit(r);
|
|
3269
3269
|
} catch (e) {
|
|
3270
3270
|
throw a.rollback(), e;
|
|
3271
3271
|
}
|
|
@@ -3280,7 +3280,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3280
3280
|
const o = this.beginCommit(g("op.moveSheetNamed", { name: e.name }));
|
|
3281
3281
|
try {
|
|
3282
3282
|
const t = this._getState(), n = t.sheetRefsVisible;
|
|
3283
|
-
if (s < 0 || s > n.length - 1) throw new
|
|
3283
|
+
if (s < 0 || s > n.length - 1) throw new f(`Invalid to index: ${s}`);
|
|
3284
3284
|
const a = this.getView().getActiveSheetId(), l = t.sheetRefsAll, h = this._getOffsetForId(e.id, l), c = this._getOffsetForId(n[s].id, l);
|
|
3285
3285
|
if (h === c) return;
|
|
3286
3286
|
const u = l[h];
|
|
@@ -3296,9 +3296,9 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3296
3296
|
_setSelectedSheet(e) {
|
|
3297
3297
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3298
3298
|
const t = this._getSheetRef(e);
|
|
3299
|
-
if (!t) throw new
|
|
3299
|
+
if (!t) throw new f(ds(e));
|
|
3300
3300
|
let s = null;
|
|
3301
|
-
return t.visibility !==
|
|
3301
|
+
return t.visibility !== q.Visibility.Visible && this._setSheetVisibility(t, q.Visibility.Visible), this._view.setActiveSheetId(t.id), s = t.sheet, s;
|
|
3302
3302
|
}
|
|
3303
3303
|
getProtection() {
|
|
3304
3304
|
return this._protection;
|
|
@@ -3316,7 +3316,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3316
3316
|
return this._calculation;
|
|
3317
3317
|
}
|
|
3318
3318
|
getFonts() {
|
|
3319
|
-
return
|
|
3319
|
+
return de.getShared();
|
|
3320
3320
|
}
|
|
3321
3321
|
createFormula(e, t, s) {
|
|
3322
3322
|
return this.getCalculation().createFormula(e, t, s);
|
|
@@ -3387,7 +3387,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3387
3387
|
const t = this._getSheetRef(e), s = t && xs(t) ? t.sheet : null;
|
|
3388
3388
|
return s ? s._contentAddWatch(() => null) : null;
|
|
3389
3389
|
}, s = (e) => {
|
|
3390
|
-
for (const t of this._getSheetRefs(
|
|
3390
|
+
for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) {
|
|
3391
3391
|
if (!xs(t)) continue;
|
|
3392
3392
|
const s = t.sheet;
|
|
3393
3393
|
if (s.getTables().getByName(e)) return s._contentAddWatch(() => null);
|
|
@@ -3397,14 +3397,14 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3397
3397
|
const s = this._getSheetRef(e);
|
|
3398
3398
|
return s && xs(s) ? s.sheet.getRange(t) : null;
|
|
3399
3399
|
}, i = (e) => {
|
|
3400
|
-
for (const t of this._getSheetRefs(
|
|
3400
|
+
for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) {
|
|
3401
3401
|
if (!xs(t)) continue;
|
|
3402
3402
|
const s = t.sheet.getTables().getByName(e);
|
|
3403
3403
|
if (s) return s;
|
|
3404
3404
|
}
|
|
3405
3405
|
return null;
|
|
3406
3406
|
}, o = (e, t) => {
|
|
3407
|
-
const s = this._pivotSourceNamed(e, t)?.getValue(), i = "string" == typeof s ?
|
|
3407
|
+
const s = this._pivotSourceNamed(e, t)?.getValue(), i = "string" == typeof s ? Q(s) : null;
|
|
3408
3408
|
return i && /^\$?[A-Za-z]+\$?\d+(?::\$?[A-Za-z]+\$?\d+)?$/.test(i.reference) ? r(i.sheet, i.reference.replaceAll("$", "")) : null;
|
|
3409
3409
|
};
|
|
3410
3410
|
for (let n = 0; n < e.length; n++) this._getState().pivotCacheData.has(e[n].cacheId) && (e[n]._hold(t, s), e[n]._watchSource(r, i, o));
|
|
@@ -3416,7 +3416,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3416
3416
|
this._updateState((s) => ({
|
|
3417
3417
|
...s,
|
|
3418
3418
|
pivotCacheData: new Map(s.pivotCacheData).set(e, t)
|
|
3419
|
-
}),
|
|
3419
|
+
}), m("op.refreshPivotTable"));
|
|
3420
3420
|
}
|
|
3421
3421
|
};
|
|
3422
3422
|
}
|
|
@@ -3427,25 +3427,25 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3427
3427
|
if (e.isITable) return { name: e.getName() };
|
|
3428
3428
|
let s = null;
|
|
3429
3429
|
if ("string" == typeof e) {
|
|
3430
|
-
for (const t of this._getSheetRefs(
|
|
3430
|
+
for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) if (xs(t) && t.sheet.getTables().getByName(e)) return { name: e };
|
|
3431
3431
|
if (this.getNames().getByName(e)) return { name: e };
|
|
3432
3432
|
if (t.getNames().getByName(e)?.getScope()) return {
|
|
3433
3433
|
name: e,
|
|
3434
3434
|
sheet: t.getName()
|
|
3435
3435
|
};
|
|
3436
|
-
const r =
|
|
3436
|
+
const r = Q(e), i = r ? this._getSheetRef(r.sheet) : null;
|
|
3437
3437
|
if (r && (!i || !xs(i))) return null;
|
|
3438
3438
|
try {
|
|
3439
3439
|
s = r ? i.sheet.getRange(r.reference) : t.getRange(e);
|
|
3440
3440
|
} catch (e) {
|
|
3441
|
-
if (!(e instanceof
|
|
3441
|
+
if (!(e instanceof f)) throw e;
|
|
3442
3442
|
return null;
|
|
3443
3443
|
}
|
|
3444
3444
|
} else s = e.isICellRange ? e : t.getRange(e);
|
|
3445
3445
|
if (!s || s.isInvalid()) return null;
|
|
3446
3446
|
const { rowStart: r, colStart: i, rowEnd: o, colEnd: n } = s.getCoords();
|
|
3447
3447
|
return {
|
|
3448
|
-
ref:
|
|
3448
|
+
ref: Ye({
|
|
3449
3449
|
rowStart: r,
|
|
3450
3450
|
colStart: i,
|
|
3451
3451
|
rowEnd: o,
|
|
@@ -3475,15 +3475,15 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3475
3475
|
}
|
|
3476
3476
|
async _refreshPivotCaches(e, t) {
|
|
3477
3477
|
const s = [];
|
|
3478
|
-
for (const t of this._getSheetRefs(
|
|
3478
|
+
for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) if (xs(t)) for (const r of t.sheet.getPivotTables().getItems()) e.has(r.getCacheId()) && s.push(r);
|
|
3479
3479
|
for (const e of s) e._assertRefreshAllowed();
|
|
3480
3480
|
for (const r of e) {
|
|
3481
3481
|
const e = this._getPivotCache(r), i = e ? await this._pivotSourceRangeOf(e._getSource()) : null;
|
|
3482
|
-
if (!e || !i) throw new
|
|
3483
|
-
if (i.getRowCount() < 2) throw new
|
|
3482
|
+
if (!e || !i) throw new f(g("error.pivotTable.refreshSourceUnsupported"));
|
|
3483
|
+
if (i.getRowCount() < 2) throw new f(g("error.pivotTable.refreshSourceTooSmall"));
|
|
3484
3484
|
i.getWorksheet()._cellBuffer?.release();
|
|
3485
3485
|
const o = e.toJSON();
|
|
3486
|
-
if (!o.fields) throw new
|
|
3486
|
+
if (!o.fields) throw new f(g("error.pivotTable.refreshSourceUnsupported"));
|
|
3487
3487
|
const { model: n, remap: a } = t.refreshPivotCache(o, t.readPivotSource(i), e._getSource() ?? void 0, this._isDate1904);
|
|
3488
3488
|
e._replace(n);
|
|
3489
3489
|
for (const e of s) e.getCacheId() === r && e._remapCache(a, t);
|
|
@@ -3494,13 +3494,13 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3494
3494
|
async _refreshPivotCachesOnLoad() {
|
|
3495
3495
|
const e = this._pivotCaches.filter((e) => !!e._getData().model?.refreshOnLoad);
|
|
3496
3496
|
if (0 === e.length) return;
|
|
3497
|
-
const s = await
|
|
3497
|
+
const s = await pe.load();
|
|
3498
3498
|
for (const r of e) {
|
|
3499
3499
|
if (this._closed) return;
|
|
3500
3500
|
try {
|
|
3501
3501
|
await this._transactions.doBatch(() => this._refreshPivotCaches(/* @__PURE__ */ new Set([r.cacheId]), s));
|
|
3502
3502
|
} catch (e) {
|
|
3503
|
-
if (!(e instanceof
|
|
3503
|
+
if (!(e instanceof f || e instanceof t)) throw e;
|
|
3504
3504
|
}
|
|
3505
3505
|
}
|
|
3506
3506
|
}
|
|
@@ -3512,7 +3512,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3512
3512
|
return t && xs(t) ? t.sheet.getRange(e.ref) : null;
|
|
3513
3513
|
}
|
|
3514
3514
|
if (!e.name) return null;
|
|
3515
|
-
if (!e.sheet) for (const t of this._getSheetRefs(
|
|
3515
|
+
if (!e.sheet) for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) {
|
|
3516
3516
|
if (!xs(t)) continue;
|
|
3517
3517
|
const s = t.sheet.getTables().getByName(e.name);
|
|
3518
3518
|
if (!s || s.isDeleted()) continue;
|
|
@@ -3539,7 +3539,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3539
3539
|
const s = this._getSheetRef(e);
|
|
3540
3540
|
return (s && xs(s) ? s.sheet : null)?.getPivotTables().getByName(t) ?? null;
|
|
3541
3541
|
};
|
|
3542
|
-
for (const t of this._getSheetRefs(
|
|
3542
|
+
for (const t of this._getSheetRefs(q.Visibility.VeryHidden)) {
|
|
3543
3543
|
if (!xs(t)) continue;
|
|
3544
3544
|
const s = t.sheet.getMovables().getItems();
|
|
3545
3545
|
for (let t = 0; t < s.length; t++) {
|
|
@@ -3549,8 +3549,8 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3549
3549
|
}
|
|
3550
3550
|
}
|
|
3551
3551
|
_fromJSON(e, t) {
|
|
3552
|
-
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new
|
|
3553
|
-
e.theme && (this._theme = new
|
|
3552
|
+
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new f(g("error.workbook.sheetOne"));
|
|
3553
|
+
e.theme && (this._theme = new tt(e.theme), this._styles.setTheme(this._theme));
|
|
3554
3554
|
const s = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), o = this._richValues.beginPersist();
|
|
3555
3555
|
try {
|
|
3556
3556
|
s.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), o.fromJSON(e.richData, {
|
|
@@ -3572,16 +3572,16 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3572
3572
|
const h = e.sheets, c = h.length;
|
|
3573
3573
|
let u = e.view.activeSheetId ?? null;
|
|
3574
3574
|
null !== u && (u = Math.min(Math.max(0, u), c - 1));
|
|
3575
|
-
let d = null,
|
|
3575
|
+
let d = null, m = null;
|
|
3576
3576
|
this._isLoadingSheets = !0;
|
|
3577
3577
|
for (let s = 0; s < c; s++) {
|
|
3578
|
-
const i = h[s], o = i.visibility ||
|
|
3579
|
-
|
|
3578
|
+
const i = h[s], o = i.visibility || q.Visibility.Visible, n = s;
|
|
3579
|
+
m = n, o === q.Visibility.Visible ? null === d && (d = n) : null !== u && u === n && (u = null);
|
|
3580
3580
|
try {
|
|
3581
|
-
const e = i.kind ??
|
|
3582
|
-
if (e !==
|
|
3583
|
-
const a = i.sheet, l =
|
|
3584
|
-
if (!l) throw new
|
|
3581
|
+
const e = i.kind ?? q.Kind.Worksheet;
|
|
3582
|
+
if (e !== q.Kind.Worksheet) {
|
|
3583
|
+
const a = i.sheet, l = et.fromJSON(a?.part, r.fromResourceId.bind(r));
|
|
3584
|
+
if (!l) throw new f(g("error.workbook.sheetPartMissing", { sheetName: i.name }));
|
|
3585
3585
|
this._createOpaqueSheet(n, i.name, o, s, i.sheetId, e, l, a?.tabColor ?? null, t?.[s]);
|
|
3586
3586
|
} else this._createSheet(n, i.name, o, s, i.sheetId, i.sheet, t?.[s]);
|
|
3587
3587
|
} catch (e) {
|
|
@@ -3589,8 +3589,8 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3589
3589
|
}
|
|
3590
3590
|
}
|
|
3591
3591
|
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._holdPivotSlicers();
|
|
3592
|
-
for (const e of this._getSheetRefs(
|
|
3593
|
-
this._updateState({ lastId:
|
|
3592
|
+
for (const e of this._getSheetRefs(q.Visibility.VeryHidden)) xs(e) && e.sheet._tellPivots();
|
|
3593
|
+
this._updateState({ lastId: m }), e.view.activeSheetId = u ?? d, this.setView(new ns({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
|
|
3594
3594
|
const _ = this;
|
|
3595
3595
|
this._protection = new ls(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
3596
3596
|
_._emitter.notify("onProtectionChange", { source: e });
|
|
@@ -3619,7 +3619,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3619
3619
|
getBuiltInFunctions: () => t._calculation?.getFunctions(),
|
|
3620
3620
|
onAdd: (e, s) => {
|
|
3621
3621
|
const r = t._calculation;
|
|
3622
|
-
r.getStatus() !==
|
|
3622
|
+
r.getStatus() !== Te.Status.Off && r.start().then(async () => {
|
|
3623
3623
|
if (t._startModules.has(s)) return;
|
|
3624
3624
|
const e = s.getFunctions().getItems({
|
|
3625
3625
|
type: "formula",
|
|
@@ -3642,7 +3642,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3642
3642
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3643
3643
|
await Promise.resolve(this._starting);
|
|
3644
3644
|
const t = this.getCalculation();
|
|
3645
|
-
t.getStatus() !==
|
|
3645
|
+
t.getStatus() !== Te.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
|
|
3646
3646
|
const s = { sheets: [] }, r = e?.ignoreStyles ?? !1;
|
|
3647
3647
|
if (!r) {
|
|
3648
3648
|
const e = this._theme.toJSON();
|
|
@@ -3659,24 +3659,24 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3659
3659
|
try {
|
|
3660
3660
|
const t = this._getSheetRef(this.getSelectedSheetIndex()).id;
|
|
3661
3661
|
let i = t, u = null;
|
|
3662
|
-
const d = this._getState(), g = d.sheetRefsAll,
|
|
3663
|
-
for (let r = 0; r <
|
|
3662
|
+
const d = this._getState(), g = d.sheetRefsAll, f = d.sheetsById, m = g.length;
|
|
3663
|
+
for (let r = 0; r < m; r++) {
|
|
3664
3664
|
const o = g[r], n = r + 1;
|
|
3665
3665
|
let a;
|
|
3666
|
-
const h =
|
|
3666
|
+
const h = f.get(o.id);
|
|
3667
3667
|
if (xs(o)) a = {
|
|
3668
3668
|
name: o.name,
|
|
3669
3669
|
sheet: await o.sheet.toJSON(e)
|
|
3670
3670
|
};
|
|
3671
3671
|
else {
|
|
3672
|
-
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part:
|
|
3672
|
+
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part: et.toJSON(e._getPart(), t) }, r = e.getTabColor();
|
|
3673
3673
|
r && (s.tabColor = r.toString()), a = {
|
|
3674
3674
|
name: o.name,
|
|
3675
3675
|
kind: e.getKind(),
|
|
3676
3676
|
sheet: s
|
|
3677
3677
|
};
|
|
3678
3678
|
}
|
|
3679
|
-
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility ===
|
|
3679
|
+
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility === q.Visibility.Visible ? null === u && (u = n) : a.visibility = o.visibility, o.id === t && (i = n), s.sheets.push(a);
|
|
3680
3680
|
}
|
|
3681
3681
|
if (!r) {
|
|
3682
3682
|
const e = h.toJSON();
|
|
@@ -3700,7 +3700,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3700
3700
|
if (b.length > 0) {
|
|
3701
3701
|
const e = l ? l.toResourceId.bind(l) : () => null, t = /* @__PURE__ */ new Set();
|
|
3702
3702
|
for (const e of this.getPivotTables()) t.add(e.getCacheId());
|
|
3703
|
-
const r =
|
|
3703
|
+
const r = ke(this);
|
|
3704
3704
|
for (let e = 0; e < r.length; e++) {
|
|
3705
3705
|
const s = r[e].toJSON()?.pivot?.cacheId;
|
|
3706
3706
|
void 0 !== s && t.add(s);
|
|
@@ -3739,7 +3739,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3739
3739
|
} catch (e) {
|
|
3740
3740
|
console.warn("error on close", e);
|
|
3741
3741
|
}
|
|
3742
|
-
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof
|
|
3742
|
+
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof mt && this._originProvider.release(), this._closed = !0;
|
|
3743
3743
|
}
|
|
3744
3744
|
beginCommit(e) {
|
|
3745
3745
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
@@ -3748,7 +3748,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3748
3748
|
doBatch(e, t) {
|
|
3749
3749
|
const s = this;
|
|
3750
3750
|
t = "string" == typeof t ? { description: t } : {
|
|
3751
|
-
description:
|
|
3751
|
+
description: m("op.updateWorkbook"),
|
|
3752
3752
|
...t
|
|
3753
3753
|
};
|
|
3754
3754
|
const r = w.bind(this._transactions, this, e);
|
|
@@ -3768,7 +3768,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3768
3768
|
_getState() {
|
|
3769
3769
|
return this._transactions.getState(this._id);
|
|
3770
3770
|
}
|
|
3771
|
-
_updateState(e, t =
|
|
3771
|
+
_updateState(e, t = m("op.updateWorkbook"), s) {
|
|
3772
3772
|
if (!e) return;
|
|
3773
3773
|
const r = this._beginCommit(t);
|
|
3774
3774
|
try {
|
|
@@ -3789,7 +3789,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3789
3789
|
get isIWorkbook() {
|
|
3790
3790
|
return !0;
|
|
3791
3791
|
}
|
|
3792
|
-
}, Os = { address: null }, xs = (e) => e.sheet.getKind() ===
|
|
3792
|
+
}, Os = { address: null }, xs = (e) => e.sheet.getKind() === q.Kind.Worksheet, Ls = class {
|
|
3793
3793
|
constructor() {
|
|
3794
3794
|
this._readFormats = [], this._writeFormats = [], this._encryptions = [];
|
|
3795
3795
|
}
|
|
@@ -3866,9 +3866,9 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3866
3866
|
return !0;
|
|
3867
3867
|
});
|
|
3868
3868
|
}
|
|
3869
|
-
},
|
|
3869
|
+
}, Es = /* @__PURE__ */ new WeakMap(), Vs = (e) => !!e && "object" == typeof e && "function" == typeof e.getPath && "function" == typeof e.canWrite, As = class {
|
|
3870
3870
|
constructor() {
|
|
3871
|
-
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new y(this), this._registry = new
|
|
3871
|
+
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new y(this), this._registry = new Ls(), this._defaultStore = new pt(() => this.getWriteFormats(), () => this.getReadFormats());
|
|
3872
3872
|
}
|
|
3873
3873
|
getBackingStore() {
|
|
3874
3874
|
return this._backingStore ?? this._defaultStore;
|
|
@@ -3911,7 +3911,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3911
3911
|
else if (Vs(e)) {
|
|
3912
3912
|
const s = e.getPath();
|
|
3913
3913
|
if (!s) throw new Error("Cannot read from an unbound origin (no path).");
|
|
3914
|
-
|
|
3914
|
+
ft(e) ? e = {
|
|
3915
3915
|
source: s,
|
|
3916
3916
|
asCopy: !0
|
|
3917
3917
|
} : (t = e, e = { source: s });
|
|
@@ -3927,7 +3927,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
3927
3927
|
const i = t.format, o = t.ext;
|
|
3928
3928
|
if (!i && !o) throw new Error("Either format or file extension must be provided to determine read type.");
|
|
3929
3929
|
const n = (await this._registry.getReadFormats(i ? { search: i } : { ext: o }))[0];
|
|
3930
|
-
if (!n) throw new
|
|
3930
|
+
if (!n) throw new f(g("error.io.readFormatUnavailable", { format: i ?? o }));
|
|
3931
3931
|
const a = s?.typedCreateWorkbookOptions, l = a ? Object.keys(a).find((e) => e.toLowerCase() === n.key.toLowerCase()) : void 0;
|
|
3932
3932
|
let h = {
|
|
3933
3933
|
...s,
|
|
@@ -4015,7 +4015,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4015
4015
|
async writeArrayBuffer(e, t) {
|
|
4016
4016
|
if (!t?.format) throw new Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
|
|
4017
4017
|
const s = (await this._registry.getWriteFormats({ search: t.format }))[0];
|
|
4018
|
-
if (!s) throw new
|
|
4018
|
+
if (!s) throw new f(g("error.io.writeFormatUnavailable", { format: t.format }));
|
|
4019
4019
|
return this._writeArrayBuffer(e, s, t);
|
|
4020
4020
|
}
|
|
4021
4021
|
async write(e, t, s) {
|
|
@@ -4031,13 +4031,13 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4031
4031
|
let i = "string" == typeof t ? this.getOrigin(t) : t;
|
|
4032
4032
|
const o = i.getFormat();
|
|
4033
4033
|
let n;
|
|
4034
|
-
if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new
|
|
4034
|
+
if ((r?.format || o) && (n = (await this._registry.getWriteFormats({ search: r?.format ?? o ?? void 0 }))[0]), n || i.getPath() && i.canWrite() && i.getExtension() || (n = (await this._registry.getWriteFormats({ ext: "sxl" }))[0] ?? (await this._registry.getWriteFormats())[0]), !n) throw new f(g("error.io.writeFormatUnresolved"));
|
|
4035
4035
|
const a = i.getExtension();
|
|
4036
4036
|
if (r?.format && a && i.getPath() && i.canWrite() && !n.exts.includes(a)) {
|
|
4037
4037
|
const e = (await this._registry.getWriteFormats({ ext: a }))[0];
|
|
4038
4038
|
if (e && e.key !== n.key) {
|
|
4039
4039
|
const e = i.getPath().split(/[/\\]/).pop();
|
|
4040
|
-
throw new
|
|
4040
|
+
throw new f(g("error.io.writeFormatMismatch", {
|
|
4041
4041
|
format: r.format,
|
|
4042
4042
|
file: e
|
|
4043
4043
|
}));
|
|
@@ -4045,16 +4045,16 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4045
4045
|
}
|
|
4046
4046
|
if ("string" == typeof t) {
|
|
4047
4047
|
const e = i.getPath();
|
|
4048
|
-
i = new ut(
|
|
4048
|
+
i = new ut(G(e) ? e : `${e}.${n.exts[0]}`, { format: n.key });
|
|
4049
4049
|
}
|
|
4050
|
-
const h = i.getEncryption(), c = e.getOrigin?.(), u = (i instanceof ut ? i.getPassword() : null) ?? (c instanceof ut ? c.getPassword() : null), d = i.isEncrypted() || (c?.isEncrypted() ?? !1),
|
|
4050
|
+
const h = i.getEncryption(), c = e.getOrigin?.(), u = (i instanceof ut ? i.getPassword() : null) ?? (c instanceof ut ? c.getPassword() : null), d = i.isEncrypted() || (c?.isEncrypted() ?? !1), m = void 0 !== r?.password ? r.password : u ?? (d ? void 0 : null);
|
|
4051
4051
|
let _ = null;
|
|
4052
|
-
if (void 0 ===
|
|
4052
|
+
if (void 0 === m) {
|
|
4053
4053
|
if (d) {
|
|
4054
4054
|
const e = i.getName();
|
|
4055
4055
|
throw new l(e ? g("error.io.passwordRequiredSave", { name: e }) : g("error.io.passwordRequiredSaveUnnamed"));
|
|
4056
4056
|
}
|
|
4057
|
-
} else if (null !==
|
|
4057
|
+
} else if (null !== m && (_ = await this._registry.getEncryption(h), !_)) throw new f(g("error.io.encryptionUnavailable"));
|
|
4058
4058
|
const p = `${i.getName() ?? g("workbook.defaultName")}.${n.exts[0]}`, w = r?.progress, y = !i.getPath() || !i.canWrite() || !!r?.prompt;
|
|
4059
4059
|
let S = !1;
|
|
4060
4060
|
const b = this;
|
|
@@ -4085,7 +4085,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4085
4085
|
}))(w, h), u = await b._writeArrayBuffer(e, l, {
|
|
4086
4086
|
...r,
|
|
4087
4087
|
progress: c
|
|
4088
|
-
}), d =
|
|
4088
|
+
}), d = Es.get(a);
|
|
4089
4089
|
if (h.some((e) => !d?.has(e.message)) && r?.onWarnings) {
|
|
4090
4090
|
const t = await Promise.resolve(r.onWarnings({
|
|
4091
4091
|
workbook: e,
|
|
@@ -4096,7 +4096,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4096
4096
|
}));
|
|
4097
4097
|
if (!y && !1 === t) return null;
|
|
4098
4098
|
}
|
|
4099
|
-
return C = h, _ ? _.encode(u,
|
|
4099
|
+
return C = h, _ ? _.encode(u, m) : u;
|
|
4100
4100
|
}
|
|
4101
4101
|
};
|
|
4102
4102
|
let I = null;
|
|
@@ -4104,12 +4104,12 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4104
4104
|
const t = this.getBackingStore();
|
|
4105
4105
|
if (!t.write) throw new Error("The active backing store is read-only (no write implementation).");
|
|
4106
4106
|
if (I = await t.write(v), I) {
|
|
4107
|
-
if (void 0 !==
|
|
4108
|
-
const e =
|
|
4107
|
+
if (void 0 !== m && I instanceof ut && (I.setPassword(m), I.update({ encryption: _ ? _.key : null })), C.length) {
|
|
4108
|
+
const e = Es.get(I) ?? /* @__PURE__ */ new Set();
|
|
4109
4109
|
for (const t of C) e.add(t.message);
|
|
4110
|
-
|
|
4110
|
+
Es.set(I, e);
|
|
4111
4111
|
}
|
|
4112
|
-
s && I !== e.getOrigin() &&
|
|
4112
|
+
s && I !== e.getOrigin() && ft(e.getOrigin())?.setOrigin(I);
|
|
4113
4113
|
const t = k ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
|
|
4114
4114
|
this._emitter.notify("onWrite", {
|
|
4115
4115
|
params: {
|
|
@@ -4124,13 +4124,13 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4124
4124
|
w?.onComplete && await Promise.resolve(w.onComplete(I));
|
|
4125
4125
|
} catch (e) {
|
|
4126
4126
|
const t = e instanceof Error ? e : new Error(String(e));
|
|
4127
|
-
if (w?.onError && await Promise.resolve(w.onError(t)), w?.onComplete && await Promise.resolve(w.onComplete(null)), t instanceof
|
|
4127
|
+
if (w?.onError && await Promise.resolve(w.onError(t)), w?.onComplete && await Promise.resolve(w.onComplete(null)), t instanceof f) throw t;
|
|
4128
4128
|
throw new Error(g("error.io.writeFailed", { reason: t.message }), { cause: e });
|
|
4129
4129
|
}
|
|
4130
4130
|
return I;
|
|
4131
4131
|
}
|
|
4132
4132
|
_stripExtension(e) {
|
|
4133
|
-
const t =
|
|
4133
|
+
const t = G(e);
|
|
4134
4134
|
return t ? e.slice(0, e.length - t.length - 1) : e;
|
|
4135
4135
|
}
|
|
4136
4136
|
_baseName(e) {
|
|
@@ -4142,7 +4142,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4142
4142
|
if (!t) throw new Error("A write format must be provided.");
|
|
4143
4143
|
const r = t.handler;
|
|
4144
4144
|
if (!r) throw new Error(`Unable to resolve a write handler for '${t.key}'.`);
|
|
4145
|
-
return
|
|
4145
|
+
return Ie(t.key) || await _e.assertUsable("exports", 0), r(e, {
|
|
4146
4146
|
...s,
|
|
4147
4147
|
format: t.key
|
|
4148
4148
|
});
|
|
@@ -4157,13 +4157,13 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4157
4157
|
try {
|
|
4158
4158
|
i = await r(e, s);
|
|
4159
4159
|
} catch (e) {
|
|
4160
|
-
if (e instanceof
|
|
4161
|
-
throw new
|
|
4160
|
+
if (e instanceof f) throw e;
|
|
4161
|
+
throw new f(g("error.io.readFailed", {
|
|
4162
4162
|
format: t.description ?? t.key,
|
|
4163
4163
|
reason: e?.message ?? String(e)
|
|
4164
4164
|
}), { cause: e });
|
|
4165
4165
|
}
|
|
4166
|
-
return await
|
|
4166
|
+
return await ee(), i;
|
|
4167
4167
|
}
|
|
4168
4168
|
get isIWorkbookIO() {
|
|
4169
4169
|
return !0;
|
|
@@ -4250,7 +4250,7 @@ var ks, Cs = "workbook.activeSheet", vs = class e extends Pe {
|
|
|
4250
4250
|
]
|
|
4251
4251
|
}];
|
|
4252
4252
|
async function zs(e, t) {
|
|
4253
|
-
const { Chart: s } = await import("./
|
|
4253
|
+
const { Chart: s } = await import("./P3Or6rEY-fHmQZbH.js");
|
|
4254
4254
|
return new s({
|
|
4255
4255
|
json: e,
|
|
4256
4256
|
getStyles: t?.getStyles
|
|
@@ -4262,7 +4262,7 @@ var Hs = {
|
|
|
4262
4262
|
showRowStripes: !1,
|
|
4263
4263
|
showColumnStripes: !1,
|
|
4264
4264
|
showLastColumn: !0
|
|
4265
|
-
}, $s = class extends
|
|
4265
|
+
}, $s = class extends ne {
|
|
4266
4266
|
constructor(e, t, s, r) {
|
|
4267
4267
|
super(e, t?.getProperties() ?? { name: "" }, {
|
|
4268
4268
|
rowStart: 0,
|
|
@@ -4282,12 +4282,12 @@ var Hs = {
|
|
|
4282
4282
|
_bandOf(e, t, s) {
|
|
4283
4283
|
return "firstRowSubheading" === s ? `${e}` : "";
|
|
4284
4284
|
}
|
|
4285
|
-
},
|
|
4285
|
+
}, Js = (e, t, s, r = 5) => {
|
|
4286
4286
|
const i = Math.max(3, Math.floor(r)), o = new $s(e, t, s ?? Hs, i);
|
|
4287
4287
|
return {
|
|
4288
4288
|
rows: i,
|
|
4289
4289
|
columns: 5,
|
|
4290
|
-
getStyleAt: (t, s) =>
|
|
4290
|
+
getStyleAt: (t, s) => Fe(void 0, e, o, {
|
|
4291
4291
|
rowStart: t,
|
|
4292
4292
|
colStart: s,
|
|
4293
4293
|
rowEnd: t,
|
|
@@ -4296,10 +4296,10 @@ var Hs = {
|
|
|
4296
4296
|
};
|
|
4297
4297
|
};
|
|
4298
4298
|
ks || (ks = {});
|
|
4299
|
-
var
|
|
4299
|
+
var Us, qs, Ks, Gs = null;
|
|
4300
4300
|
function Xs() {
|
|
4301
4301
|
if (!Gs) {
|
|
4302
|
-
const e = import("./
|
|
4302
|
+
const e = import("./CJcyMzG19TOjqNHS.js").then((e) => e.loadScriptingDeclarations());
|
|
4303
4303
|
e.catch(() => {
|
|
4304
4304
|
Gs = null;
|
|
4305
4305
|
}), Gs = e;
|
|
@@ -4309,14 +4309,14 @@ function Xs() {
|
|
|
4309
4309
|
var Zs = null;
|
|
4310
4310
|
function Qs() {
|
|
4311
4311
|
if (!Zs) {
|
|
4312
|
-
const e = import("./
|
|
4312
|
+
const e = import("./CJcyMzG19TOjqNHS.js").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
|
|
4313
4313
|
e.catch(() => {
|
|
4314
4314
|
Zs = null;
|
|
4315
4315
|
}), Zs = e;
|
|
4316
4316
|
}
|
|
4317
4317
|
return Zs;
|
|
4318
4318
|
}
|
|
4319
|
-
|
|
4319
|
+
Us || (Us = {}), (qs || (qs = {})).Type = {
|
|
4320
4320
|
Button: "button",
|
|
4321
4321
|
CheckBox: "checkBox",
|
|
4322
4322
|
OptionButton: "optionButton",
|
|
@@ -4334,7 +4334,7 @@ Js || (Js = {}), (qs || (qs = {})).Type = {
|
|
|
4334
4334
|
ComboEdit: "comboEdit",
|
|
4335
4335
|
Simple: "simple"
|
|
4336
4336
|
};
|
|
4337
|
-
var Ys = class extends
|
|
4337
|
+
var Ys = class extends me {
|
|
4338
4338
|
constructor(e) {
|
|
4339
4339
|
super(e);
|
|
4340
4340
|
}
|
|
@@ -4347,8 +4347,8 @@ var Ys = class extends Ke {
|
|
|
4347
4347
|
colEnd: (e?.size?.width ?? 5) - 1,
|
|
4348
4348
|
rowEnd: (e?.size?.height ?? 5) - 1
|
|
4349
4349
|
},
|
|
4350
|
-
getRanges: (e) => new
|
|
4350
|
+
getRanges: (e) => new Z(null)
|
|
4351
4351
|
}, super._initializeOptions(e);
|
|
4352
4352
|
}
|
|
4353
|
-
}, er = "0.
|
|
4354
|
-
export { Ts as A, Ft as C, Pt as D, Ps as E, wt as F, Bs as I, qs as L, St as M, yt as N, bt as O, Ns as P, er as R, Fs as S, Ds as T, ut as _,
|
|
4353
|
+
}, er = "1.0.0", tr = "2026-11-12T22:16:50.393Z";
|
|
4354
|
+
export { Ts as A, Ft as C, Pt as D, Ps as E, wt as F, Bs as I, qs as L, St as M, yt as N, bt as O, Ns as P, er as R, Fs as S, Ds as T, ut as _, ot as a, As as b, Zt as c, Qs as d, Ys as f, ss as g, tr as h, Us as i, ks as j, Xs as k, Ht as l, Js as m, rs as n, ct as o, ns as p, nt as r, Ks as s, kt as t, at as u, zs as v, Et as w, Vt as x, Mt as y, Ut as z };
|