@sheetxl/mcp 0.8.0-beta.15 → 0.8.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +8 -7
- package/assets/{OVRdpPUzR0-ueTxE.js → -PtBguqpLi7Nr4Df.js} +2 -2
- package/assets/{BOPsJmq7v7HOKUkO.js → 2GLqCzpAJP6jbaRx.js} +12 -12
- package/assets/{BPwmBu_aouERJjiW.js → 3_NofB4A4Qhl-4YY.js} +2 -2
- package/assets/{CGBGyaCGdlZFQYK0.js → 3t-I20nDzFHBd5UJ.js} +2 -2
- package/assets/{hulrR0PldUxMJm_F.js → 4vS8pASPZSU7QcRZ.js} +4 -4
- package/assets/{Bh0PNKlrR4VAqnP8.js → 5B_tapYOcjOv1wGO.js} +35528 -30074
- package/assets/{FS9NbEKgQvz5wqvZ.js → 8NrxfSWBHDaEJvhz.js} +2 -2
- package/assets/{oxjm7Yr7u7MeaO5P.js → 9MXt8KXdWlbEJNc2.js} +2 -2
- package/assets/{CduNzsdbTigxH-ZK.js → AjWB-QdIkr07kToW.js} +189 -189
- package/assets/{DvUUArnZwoYOKOuk.js → B16N6VSLY5HPgVkD.js} +2 -2
- package/assets/{C0CiMKC3lWK1z9p5.js → B2YEEPHIkNcezk9T.js} +3 -3
- package/assets/{CNz3LdmvsOEJoLO9.js → B3MqN3t5naY3moOk.js} +2 -2
- package/assets/BBPjYcS8XKQREith.js +199 -0
- package/assets/{B4VnJacrzr1x4PHR.js → BCSRsSAEPlwR59H5.js} +5 -5
- package/assets/{CMK6tIDVqYYvK4GZ.js → BIUUGUhypimIDg2a.js} +2 -2
- package/assets/{iujMYIEPx_v3sdPf.js → BNrpvJZtIL0Ex_wE.js} +996 -995
- package/assets/{DA_ar3QKLKtJ9fJD.js → BR66nPIzyzlOcP10.js} +2 -2
- package/assets/{CvngwB17_ve4W49b.js → BRLA4pJWiYdpW-69.js} +73 -73
- package/assets/{Crt2kLdGIlBHANgg.js → BUAq-ENCmL0XGLIu.js} +2 -2
- package/assets/{Bn8D2bebQ2tFfwQt.js → BYqyNLuwXl7GKuzh.js} +43 -41
- package/assets/{ZuYfVKlp41IJnrOS.js → BZbxPclVVopktv3l.js} +2 -2
- package/assets/{Cf9LpgZz-W5blzy_.js → B_nQLUWaxp-Q1IfV.js} +3 -3
- package/assets/{BbcUxIZe3YXywsQR.js → BbDKWV_FQAICqZjP.js} +2 -2
- package/assets/{B2udpZ-uIaql3AUh.js → BbXlmp8W_cbr75FN.js} +6 -6
- package/assets/{CxjchwpiqxPM1XKd.js → BdMebk9YSA0oxQ_d.js} +70 -70
- package/assets/{JO3zH9hupFSV6vj2.js → Bdt9nQs8gDIzu_IG.js} +2 -2
- package/assets/{Cf2dcwmmmf13Rywg.js → BiE9M6RctwQ339_7.js} +2 -2
- package/assets/{BJxfinOazQqqByc-.js → BiGm1tKvxUh8oWbD.js} +2 -2
- package/assets/{DH7sGHzxUqIQkDnd.js → BjDsx_FHl0mShqHX.js} +2 -2
- package/assets/{DB-tkqI6wFXDKEfB.js → BlIrJwQGEASCgJdZ.js} +2 -2
- package/assets/{DD8HNAUFroTCuD-b.js → BlWfQ5HPEehB_lPz.js} +3288 -2130
- package/assets/BpgPKKZwxXklRyo7.js +7 -0
- package/assets/{D7oUtYjetuykGhQ5.js → BrtLeTsrulaU6osB.js} +2 -2
- package/assets/{LyLlBk--VJD2V-f8.js → BsFWmVYPrLyh5Dre.js} +34 -34
- package/assets/{DJiLWtmPR2OQNjzi.js → BtNRIFE92ka4hATo.js} +2 -2
- package/assets/{DKLm4nWzynGw1Kr9.js → BuhHuKVWppW4L8AV.js} +2 -2
- package/assets/{C4z2IilWTuu2TWXw.js → C-AIgWmHugqMcl9J.js} +3 -3
- package/assets/{U1XXGEPuuqIAzYl1.js → C-gN7uBg-MWHRo4g.js} +2 -2
- package/assets/{vZZi_iKYHm05gAye.js → C0JSC9gVwR1QxopD.js} +2 -2
- package/assets/{Cfhv_Yw_LT8VzAMt.js → C2dG4GHThf9O-IJy.js} +2 -2
- package/assets/{Cg51xaLRUkVOMdCZ.js → C3Wibs7QGFZ1FI7W.js} +2 -2
- package/assets/{BuUEsifnQALe49uk.js → C75i_5ip7OhGkuiF.js} +2 -2
- package/assets/{DDnwKPJSznyfYDZS.js → C95HXhZkkhnUx_aE.js} +3 -3
- package/assets/{CWl6oHiJxkNKRixk.js → CAEhAL7-0FG7jdzN.js} +2 -2
- package/assets/{D-ffk16w8c5w0mxI.js → CAMrW5ypKhgn105y.js} +2 -2
- package/assets/{B-MqXm_7luDLwazY.js → CBPkPTmeaEokFPSI.js} +2 -2
- package/assets/{xnhBSX6lAcmBM65y.js → CDqG64rXHp9-2tXr.js} +2 -2
- package/assets/{ClNQN3vEg5b5qUDp.js → CFdJvXLSbUrvNera.js} +2435 -2447
- package/assets/{PpFbmF0DFeUdpb9I.js → CG8zvnxueimOY7wm.js} +2 -2
- package/assets/{BsQZI1vXTRE63Zy-.js → CIqJdIUKSLZkNwHy.js} +345 -235
- package/assets/{_fUXIv6nKvgZkhxn.js → CJa8JVvKGVBz8Q7q.js} +3 -3
- package/assets/{CwPBmcY6xSP8dNlh.js → CK9h6iDOreaI8GEt.js} +12 -12
- package/assets/CL1-ziDI0aAaVbhJ.js +7 -0
- package/assets/{C7ONfuYIWRmDu_vs.js → CVRc6jQcH155Z89u.js} +2 -2
- package/assets/{B9US2ZrF93KOjmAx.js → CVbRpT7QPHOMgwTx.js} +2 -2
- package/assets/CW-ivE6pl3V7vKuT.js +2563 -0
- package/assets/{F_f0jJqM5MrXGbwC.js → CX-6eYkcr5y0VmQm.js} +4 -4
- package/assets/{BlPubAFi7DY7VrAo.js → CZepo1lDTQp1myg6.js} +2 -2
- package/assets/{D8J14MLlN2HRXdXB.js → C_0RM0w6Pw70Bx_Y.js} +2 -2
- package/assets/{C2OrZ8LZ-TI6eYG0.js → Ci7-PIIhZwb2mVv5.js} +2 -2
- package/assets/{BleMG0hAQgjE8fTa.js → Cl98sBOj9GM2XnFe.js} +3 -3
- package/assets/{DwWngYJTgC0KLbih.js → CoIjAX2gECGb3Wxl.js} +2 -2
- package/assets/{DcWTBOi_iBFc6U4J.js → Co_y6GfwJTYtOmlt.js} +8 -8
- package/assets/{BQMDOjNBMjAx9WiW.js → CrwtgrD7BbXyCkx0.js} +2 -2
- package/assets/{CJ5WQnaoCsdr5gf4.js → CsjjeeOHE2624pGt.js} +2 -2
- package/assets/Ct5VTtdW77k-WcP_.js +529 -0
- package/assets/{DwLZpYUp85UHBE3H.js → CvJkwRgwm80S2bcd.js} +2 -2
- package/assets/{fDMpDhXp36CatF-G.js → D-irgQZ2WmkP9dnK.js} +2 -2
- package/assets/{BFdeov2e_xUQPEY_.js → D1g6IOzdvInVLV-x.js} +7 -7
- package/assets/{Btys7KwtvV3hz2F6.js → D2YdqNWXwSHJMPbA.js} +109 -109
- package/assets/{BQbF1RkUH8WyXqSD.js → D3bxrF1Ys2GSVfQH.js} +25 -19
- package/assets/{wfVh0olISLRWdv9Q.js → D7iU4kaxzl_PojNt.js} +2 -2
- package/assets/{DTfl-4Iboi6TQU5m.js → D7ibkNIu_Pn4TeBD.js} +4 -4
- package/assets/DBANZf_eAzaCFdIj.js +4676 -0
- package/assets/{DoILAmhKUOlKWRVw.js → DBMZF6PRHCko9K9R.js} +2 -2
- package/assets/{BFXeoFUbuc4IKTz9.js → DEIkGoOZ_WeuY0Lj.js} +2 -2
- package/assets/{xmTQJJVyCrcq77WR.js → DFAqI-o57Kd_Azlt.js} +2 -2
- package/assets/{BtjqpAKczftx91BQ.js → DFn_thWGK0_EZI5k.js} +2 -2
- package/assets/{DlBdhv6NHgrNp5Yo.js → DFvs1LVzXKm1N5M2.js} +3 -3
- package/assets/{DVchxwp6w6lu2Ihu.js → DJdRl2yX9DP_D8kh.js} +3 -3
- package/assets/{BG5kgbDRXMc0re6W.js → DKRa_Oc4XqB3DABB.js} +9 -9
- package/assets/{BZPTaa0WjpoUAbgZ.js → DLhlBqwsDnmscAuL.js} +2 -2
- package/assets/{BRzp6DEIYUgM3NkN.js → DMhtIFfkX-DZT_e3.js} +4 -4
- package/assets/{DpdHDTFOeuzDVNEe.js → DNhfziNrJGdL8BYs.js} +78 -77
- package/assets/{jadLBUNBVR9mbZ35.js → DOZ40EyxD3m0gCos.js} +809 -494
- package/assets/{SHZe9VOU1prGs1F9.js → DQcus4X_kTKIIyX6.js} +2 -2
- package/assets/{C7Z1li2XjWi6bkrp.js → DR9xHYH6v5G0lOqf.js} +4 -4
- package/assets/{DsCI_ZYm_jDjXF3J.js → DTLbKr_XIJMwQJmk.js} +52 -52
- package/assets/{_d5XJ7dn1CKKYrep.js → DaILIYfy-jPVTXjz.js} +3 -3
- package/assets/{S16s2h9qoYVBlVEa.js → Dd8CHUZz7xuYTfp-.js} +1444 -1356
- package/assets/{B5lHOOQ_rkP4Mi2r.js → DdrsYdX3bLixdb_9.js} +2 -2
- package/assets/DfWWAHOjmhqvN3m_.js +7166 -0
- package/assets/{9U9XCqqdn-q3i2fj.js → DfzLOnWTNL_2J90y.js} +2 -2
- package/assets/{BTQhJQ3e0hsiousD.js → Dg4JXbd1yPGNZOtL.js} +2 -2
- package/assets/Di4ehJD7muvtcrN3.js +169 -0
- package/assets/{BbAmA46MhQSu3ZF_.js → DmLbqbAez7Dzwyl7.js} +2 -2
- package/assets/{CudNpUD78SrtJIiy.js → Dp-dLoOaBndV2N5i.js} +3 -3
- package/assets/DsTi7zHk_Xl37bAD.js +14 -0
- package/assets/{Diee6f_qAmcZBd2_.js → DvFwVzuc5YfagNnH.js} +2 -2
- package/assets/{D0CHDsemn0S31ltt.js → Dy67BUF2yd8VRPwL.js} +2 -2
- package/assets/{LEJp05fjmflKgyqF.js → DzkccbbE6iXMqQDO.js} +451 -447
- package/assets/{B7gUyrfLln3TiyKM.js → Gqh12ggLm5KlvN3v.js} +2 -2
- package/assets/{BjqQjxBuoXza8oqg.js → JC8UUcu6m23qqrr3.js} +3 -4
- package/assets/{ChWpsFGl-BYOnX_A.js → LwFDS0HxPZKiiEnN.js} +2 -2
- package/assets/{BeLr36oL3jmeXFFi.js → POdlv6cpSx6ftJxx.js} +2 -2
- package/assets/{CMWAsUQ66V8fYrME.js → QVWayvB03YMyTKt3.js} +3 -3
- package/assets/{Dz8UUJ7Xc2oN5PBG.js → SB2aKOIVln0EkgXR.js} +2 -2
- package/assets/SaCo3me4_hw2b1L4.js +2039 -0
- package/assets/{CecTe22WURiXbVdY.js → TNQaiw20sEAEUiK5.js} +386 -372
- package/assets/{jPUOH4FHF4b-rapv.js → W2FU69Pfo4chpqtk.js} +2 -2
- package/assets/{CXHslDxkWCuEcCSQ.js → YXC__Myl-BuIFW6s.js} +2 -2
- package/assets/{DPCKMM7sgWbrtB8z.js → Z01wJImjl6lBMpf4.js} +2 -2
- package/assets/{C97xDe_wBbLZh_uW.js → h6EQSu5n2vTsu2yd.js} +2 -2
- package/assets/{FzNG48GE_wso6RII.js → iULnLPcNKVpz00r7.js} +2 -2
- package/assets/{DEW2GxfGYqVFvrfg.js → iqQWGoJaPha0_8lU.js} +2 -2
- package/assets/{BrcQmHcE7Hcr1erJ.js → nDmE2I07HvkpRdR0.js} +2 -2
- package/assets/{Bg95xYj5siqhHVEz.js → nmB0nnkFQf5NWo0i.js} +3 -3
- package/assets/{BCy1zP97fsiIcvj6.js → pQUJKbHGetb7dcOr.js} +2 -2
- package/assets/{B2Ek-DWpZMGJ0V1Z.js → rfwqMukKbJBeJBuC.js} +3 -3
- package/assets/{By-7OWXShMlFFejV.js → soSlr334Fv1j5t2m.js} +2 -2
- package/index.js +2010 -1944
- package/lib.js +2 -2
- package/licenses/dependencies.txt +259 -194
- package/package.json +4 -9
- package/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/screenshot-page/assets/{CSUd8n1H0VBfREnk.js → -N4OYIMgf6f5vgNy.js} +1 -1
- package/screenshot-page/assets/{B4PbXdzBe9BsoZ0e.js → B7eQ3rE-7Vayb_4O.js} +1 -1
- package/screenshot-page/assets/B8i4Sr2kMQAXp0rb.js +4 -0
- package/screenshot-page/assets/{DQWHkaQeNXft9j8b.js → B8qybUclSjEYP5FJ.js} +2 -2
- package/screenshot-page/assets/BIHbD4jMsk3NetOd.js +1 -0
- package/screenshot-page/assets/BIrVK5hdDCUYmxGO.js +1 -0
- package/screenshot-page/assets/{l32n8O_A78Qqduv3.js → BJ2r2WfEL3SgkBAX.js} +1 -1
- package/screenshot-page/assets/BJviQwDXR5L6l1DA.js +1 -0
- package/screenshot-page/assets/BM78thqEW6HwXFAK.js +13 -0
- package/screenshot-page/assets/{BcOdl17EeFSxnAiq.js → BMf827t1Ul65MHd5.js} +1 -1
- package/screenshot-page/assets/BMwQInar0xVS5FRu.js +1 -0
- package/screenshot-page/assets/{BUjI304IvdJnFXH3.js → BU5S8KEzPmIA_Flm.js} +1 -1
- package/screenshot-page/assets/{D6Jpaz2YkhOfzxDB.js → BYQZ8o8k3-MDoNat.js} +1 -1
- package/screenshot-page/assets/{CZf9s6otzzoaBlSs.js → BftXEPOuf5Uwxpud.js} +1 -1
- package/screenshot-page/assets/Bir0SSOHX0w2yo8h.js +1 -0
- package/screenshot-page/assets/{CykecBozGGFl26KA.js → Btgo0VFTT0JxuaP3.js} +74 -68
- package/screenshot-page/assets/C2H2lX8eyKpxpP6M.js +2 -0
- package/screenshot-page/assets/{B-KIwD5F_5S-NsPg.js → C71ZZMVLfHdPl441.js} +1 -1
- package/screenshot-page/assets/CFfgJlXaIS8QMx5O.js +1 -0
- package/screenshot-page/assets/{DGXDfjkGZjMRAXPg.js → CN8u05DjKwNHbUHN.js} +1 -1
- package/screenshot-page/assets/CQFj5AGXfIA9z9zI.js +1 -0
- package/screenshot-page/assets/{gG0AFZ45VxS_moMw.js → CRsTnamLrPN5-Dsi.js} +1 -1
- package/screenshot-page/assets/CYfkL98Zu43S8-50.js +42 -0
- package/screenshot-page/assets/{DXQLzGmxoyN3kfQi.js → CZa1rha3RnQUWyOk.js} +7 -7
- package/screenshot-page/assets/{CpbohdgEaEsVDi9J.js → C_vPl50T1L5HWnhv.js} +1 -1
- package/screenshot-page/assets/{CbUDukmvDZmVfhJH.js → CfkssmHURDicfYvR.js} +1 -1
- package/screenshot-page/assets/{Bj-vfAT28PK-tWWa.js → CguXw0IcKNPbmAbj.js} +2 -2
- package/screenshot-page/assets/{DmbuCapSSCYIa3yk.js → ClzJdxlUDDtBYjH8.js} +1 -1
- package/screenshot-page/assets/{BTboCICZ-951XWsi.js → CqyMYduWKFvmMs_Z.js} +1 -1
- package/screenshot-page/assets/CzsoLbEIUVK5ia1C.js +1 -0
- package/screenshot-page/assets/D2IHCJ1QWDKwmhge.js +1 -0
- package/screenshot-page/assets/D6CzedWHXTesD55R.js +1 -0
- package/screenshot-page/assets/D7biuwkvm3zAwsBa.js +39 -0
- package/screenshot-page/assets/D8s3sJnhFxbI3Dqn.js +1 -0
- package/screenshot-page/assets/{hp_-JA1DMK4Yoztn.js → DDkL9PZPXAggW2Yr.js} +19 -19
- package/screenshot-page/assets/DEpn6VGd30cHEJOS.js +1 -0
- package/screenshot-page/assets/{CIged53b3hHKxa-o.js → DLFFFQjTi5Ji1940.js} +1 -1
- package/screenshot-page/assets/DMxrNtfw275en7pm.js +1 -0
- package/screenshot-page/assets/{CqR3hGrC956TkCMj.js → DRncpwDkZZX8rL9S.js} +1 -1
- package/screenshot-page/assets/DTrnAtpccj55fGg5.js +1 -0
- package/screenshot-page/assets/D_kJ3WunvjIINcHC.js +1 -0
- package/screenshot-page/assets/{BFaiQZKle44Rhyou.js → D_rtIYQ7FDC2CoEn.js} +1 -1
- package/screenshot-page/assets/{Bf7xq8PyF4ohjMzP.js → Db6bZVJ-184DJIoe.js} +2 -2
- package/screenshot-page/assets/{DyLWQxXXTw5uwPVy.js → DeyRZ5rprDbRbuf4.js} +1 -1
- package/screenshot-page/assets/{D47ePD4x1lVazNdl.js → DgtqX4DiBgkepVZZ.js} +1 -1
- package/screenshot-page/assets/DhB6GjSJIeTmIODk.js +1 -0
- package/screenshot-page/assets/Dn5PwRw7rrTKNnql.js +586 -0
- package/screenshot-page/assets/{TfhknTx8vxQkw4zV.js → Dq7wGcTrNIshovlT.js} +2 -2
- package/screenshot-page/assets/{BUGXf2DEBog16Slb.js → DqXO_Zw1Cp7rAQ04.js} +2 -2
- package/screenshot-page/assets/{21oAESJyBGXeHegm.js → DtihumgXQ7ETaN0A.js} +2 -2
- package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +2 -0
- package/screenshot-page/assets/DyiVrm8mEnEaoZHa.js +3 -0
- package/screenshot-page/assets/{BHqg55S-4_OoAu3P.js → LYyM_ig973jLdOU0.js} +2 -2
- package/screenshot-page/assets/TilS2JSBGVkd1za3.js +3 -0
- package/screenshot-page/assets/Tph2vYqw17-NBCtd.js +1 -0
- package/screenshot-page/assets/UKFgEuwI1UMhPqKF.js +2 -0
- package/screenshot-page/assets/XgsioU5Px1T5gKAY.js +1 -0
- package/screenshot-page/assets/cTMKPkmZF8FWQaMn.js +1 -0
- package/screenshot-page/assets/hlxJ87-H830aSZBQ.js +1 -0
- package/screenshot-page/assets/{DDQWM8rNYCYzKa9R.js → lgeNUp9cU20IAotv.js} +1 -1
- package/screenshot-page/assets/nM1r2xslndIMKlI2.js +2 -0
- package/screenshot-page/assets/{BSdFVGZNhU6YHbMI.js → rOzyaU7hqchMbhRL.js} +1 -1
- package/screenshot-page/index.html +12 -12
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/types/scripting-api.json +9967 -9497
- package/types/scripting-enums.json +27 -0
- package/types/scripting.d.ts +2282 -166
- package/assets/BBb_3gEGzmEzbTIk.js +0 -359
- package/assets/BSxTn2BhkEEeF9x_.js +0 -2346
- package/assets/CWVWdbY1B1-WLl9k.js +0 -199
- package/assets/CZTSZL3T_f-vSXqM.js +0 -7
- package/assets/DaoSWy3EFlqpZaLr.js +0 -4437
- package/assets/Dht2mcOSyYlPY32b.js +0 -14
- package/assets/DkibD_CEVePaoj_y.js +0 -7
- package/assets/jiEe5eKV3BFPBWfi.js +0 -6294
- package/screenshot-page/assets/0MTaPYjKud2Q9QG9.js +0 -1
- package/screenshot-page/assets/B2MJPcMcsuv6FekC.js +0 -1
- package/screenshot-page/assets/BQfe-XTIOGeUnD9B.js +0 -1
- package/screenshot-page/assets/BTMW3ukmc44U2fy7.js +0 -1
- package/screenshot-page/assets/B_W2QroTKADz3ABp.js +0 -2
- package/screenshot-page/assets/BksaQEoZr5OWq-_d.js +0 -3
- package/screenshot-page/assets/BnoVwUBEor8NgQNs.js +0 -4
- package/screenshot-page/assets/BzQ5GyiXq8gTz-H-.js +0 -1
- package/screenshot-page/assets/C2Wh2h27c7FUb8Yk.js +0 -1
- package/screenshot-page/assets/C81mK8aZKZAAS-AB.js +0 -1
- package/screenshot-page/assets/Ca6nxdhEuLLty3d7.js +0 -2
- package/screenshot-page/assets/CwqNb7JYzC03lCj0.js +0 -1
- package/screenshot-page/assets/CzhH7lTYQrYGHct6.js +0 -1
- package/screenshot-page/assets/D66vSE1ConAuENmB.js +0 -586
- package/screenshot-page/assets/DCVUZ_ayOXFwV2d_.js +0 -3
- package/screenshot-page/assets/DFE-fKq5NV7_O8V6.js +0 -1
- package/screenshot-page/assets/DK_QSosKV62NDcuT.js +0 -42
- package/screenshot-page/assets/DTFRGj188QuLKEXw.js +0 -1
- package/screenshot-page/assets/DXWWyJlMSWgDFxs1.js +0 -10
- package/screenshot-page/assets/DZDRRw-62D6Zw7qs.js +0 -1
- package/screenshot-page/assets/DeAKjatTVaZ0u_FY.js +0 -1
- package/screenshot-page/assets/Dsx0NUmGIxS7SvZ8.js +0 -1
- package/screenshot-page/assets/IRtoU5oVgBWu9rnK.js +0 -2
- package/screenshot-page/assets/Q5EKmzoJZCE81Om-.js +0 -2
- package/screenshot-page/assets/VvqAh6BWzaD5OUPF.js +0 -1
- package/screenshot-page/assets/fGlPAximvsxzPzGA.js +0 -1
- package/screenshot-page/assets/rPOkVKdPbFpTG6AY.js +0 -1
- package/screenshot-page/assets/sHBomL5R4-_px8rD.js +0 -1
- package/screenshot-page/assets/skRJ2qjA7kcmnOsh.js +0 -39
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.16
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
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 { d as j, p as M } from "./
|
|
12
|
-
import {
|
|
13
|
-
var
|
|
7
|
+
import { r as e } from "./pQUJKbHGetb7dcOr.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 _, xt as m } from "./CrwtgrD7BbXyCkx0.js";
|
|
9
|
+
import { a as p, c as w, s as y } from "./DaILIYfy-jPVTXjz.js";
|
|
10
|
+
import { At as S, C as b, E as k, F as C, G as v, I, Jt as R, L as N, U as O, Ut as x, Vt as L, Xt as V, Y as E, bt as A, ht as T, lt as P, qt as F, ut as B, v as W } from "./BNrpvJZtIL0Ex_wE.js";
|
|
11
|
+
import { d as j, p as M } from "./D3bxrF1Ys2GSVfQH.js";
|
|
12
|
+
import { $n as D, Bn as H, Br as z, Di as $, Dn as U, Fa as J, Fi as q, Fn as K, Ga as G, Gn as Z, I as X, Jn as Q, Kn as Y, Kr as ee, L as te, Mi as se, Ni as re, Nt as ie, O as oe, Pi as ne, Qi as ae, Qr as le, Sa as he, Sr as ce, Tn as ue, Ui as de, Un as ge, Ur as fe, Vt as _e, Zi as me, Zn as pe, Zr as we, _r as ye, ai as Se, an as be, b as ke, ba as Ce, br as ve, co as Ie, da as Re, do as Ne, dr as Oe, er as xe, f as Le, fi as Ve, fn as Ee, fo as Ae, gi as Te, ii as Pe, ji as Fe, jn as Be, ka as We, kn as je, li as Me, m as De, mn as He, na as ze, no as $e, nr as Ue, oa as Je, qa as qe, qt as Ke, si as Ge, so as Ze, st as Xe, tr as Qe, tt as Ye, uo as et, v as tt, vi as st, w as rt, wn as it } from "./5B_tapYOcjOv1wGO.js";
|
|
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() });
|
|
16
16
|
}
|
|
@@ -97,14 +97,14 @@ var et, tt, st = class extends r {
|
|
|
97
97
|
return 0 === e.length && null !== this._repeatOperation && e.push(this._repeatOperation.description), Object.freeze(e);
|
|
98
98
|
}
|
|
99
99
|
getUndoEntries() {
|
|
100
|
-
return this._undoCommits().map(
|
|
100
|
+
return this._undoCommits().map(ht);
|
|
101
101
|
}
|
|
102
102
|
getRedoEntries() {
|
|
103
|
-
const e = this._redoCommits().map(
|
|
103
|
+
const e = this._redoCommits().map(ht);
|
|
104
104
|
return 0 === e.length && null !== this._repeatOperation && e.push({
|
|
105
105
|
description: this._repeatOperation.description,
|
|
106
106
|
author: null,
|
|
107
|
-
meta:
|
|
107
|
+
meta: lt
|
|
108
108
|
}), Object.freeze(e);
|
|
109
109
|
}
|
|
110
110
|
addUndoOperation() {
|
|
@@ -116,11 +116,11 @@ var et, tt, st = class extends r {
|
|
|
116
116
|
close() {
|
|
117
117
|
this._removeListener?.();
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, lt = Object.freeze({}), ht = (e) => ({
|
|
120
120
|
description: e.getDescription(),
|
|
121
121
|
author: e.getAuthor(),
|
|
122
|
-
meta: e.getMeta() ??
|
|
123
|
-
}),
|
|
122
|
+
meta: e.getMeta() ?? lt
|
|
123
|
+
}), ct = class {
|
|
124
124
|
constructor(e, t) {
|
|
125
125
|
this._dirty = !1, this._store = e, this._savedCommitId = e.getCurrentCommit()?.getId() ?? null, this._emitter = new y(this);
|
|
126
126
|
const s = this;
|
|
@@ -158,8 +158,8 @@ var et, tt, st = class extends r {
|
|
|
158
158
|
this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
var
|
|
161
|
+
ot || (ot = {});
|
|
162
|
+
var ut = class e {
|
|
163
163
|
constructor(t, s = {}) {
|
|
164
164
|
this._password = null, this._emitter = new y(this), this._path = t ?? null, this._name = s.name ?? null, this._format = s.format ?? null, this._size = s.size ?? null, this._lastModified = s.lastModified ?? null, this._canWrite = s.canWrite ?? e._defaultCanWrite(this._path), this._encryption = s.encryption ?? null;
|
|
165
165
|
}
|
|
@@ -172,7 +172,7 @@ var nt = 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 && H(e) || null;
|
|
176
176
|
}
|
|
177
177
|
getPath() {
|
|
178
178
|
return this._path;
|
|
@@ -183,7 +183,7 @@ var nt = class e {
|
|
|
183
183
|
getExtension() {
|
|
184
184
|
const e = this._cleanPath();
|
|
185
185
|
if (!e) return null;
|
|
186
|
-
const t =
|
|
186
|
+
const t = st(e);
|
|
187
187
|
return t ? t.toLowerCase() : null;
|
|
188
188
|
}
|
|
189
189
|
getEncryption() {
|
|
@@ -233,26 +233,26 @@ var nt = 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
|
-
},
|
|
236
|
+
}, dt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new Set(), ft = (e) => dt.get(e) ?? null, _t = class e {
|
|
237
237
|
constructor(t) {
|
|
238
|
-
this._released = !1, e._assertFree(t), this._emitter = new y(this), this._origin = t,
|
|
238
|
+
this._released = !1, e._assertFree(t), this._emitter = new y(this), this._origin = t, dt.set(t, this), gt.add(this);
|
|
239
239
|
}
|
|
240
240
|
getOrigin() {
|
|
241
241
|
return this._origin;
|
|
242
242
|
}
|
|
243
243
|
setOrigin(t) {
|
|
244
|
-
t !== this._origin && (e._assertFree(t), this._released || (
|
|
244
|
+
t !== this._origin && (e._assertFree(t), this._released || (dt.delete(this._origin), dt.set(t, this)), this._origin = t, this._emitter.notify("onOriginChange"));
|
|
245
245
|
}
|
|
246
246
|
release() {
|
|
247
|
-
this._released || (this._released = !0,
|
|
247
|
+
this._released || (this._released = !0, dt.get(this._origin) === this && dt.delete(this._origin), gt.delete(this));
|
|
248
248
|
}
|
|
249
249
|
addListeners(e, t) {
|
|
250
250
|
return this._emitter.addListeners(e, t);
|
|
251
251
|
}
|
|
252
252
|
static _assertFree(e) {
|
|
253
|
-
if (
|
|
253
|
+
if (dt.has(e)) throw new Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
|
|
254
254
|
}
|
|
255
|
-
},
|
|
255
|
+
}, mt = class {
|
|
256
256
|
constructor() {
|
|
257
257
|
this._defaultStringSourceType = "filepath";
|
|
258
258
|
}
|
|
@@ -272,10 +272,10 @@ var nt = 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 ? `${H(r)}` : "";
|
|
276
276
|
a = await e.arrayBuffer(), l = {
|
|
277
277
|
format: o,
|
|
278
|
-
ext:
|
|
278
|
+
ext: st(r),
|
|
279
279
|
name: n,
|
|
280
280
|
absolutePath: r,
|
|
281
281
|
size: e.size,
|
|
@@ -299,7 +299,7 @@ var nt = class e {
|
|
|
299
299
|
const [, t] = s.split(",");
|
|
300
300
|
e = t;
|
|
301
301
|
} else e = s;
|
|
302
|
-
a =
|
|
302
|
+
a = m.base64ToArrayBuffer(e), l = {
|
|
303
303
|
format: o,
|
|
304
304
|
size: e.length
|
|
305
305
|
};
|
|
@@ -315,7 +315,7 @@ var nt = 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 = st(u);
|
|
319
319
|
try {
|
|
320
320
|
const e = await fetch(t, {
|
|
321
321
|
...r,
|
|
@@ -327,7 +327,7 @@ var nt = class e {
|
|
|
327
327
|
a = s, l = {
|
|
328
328
|
format: o,
|
|
329
329
|
ext: d,
|
|
330
|
-
name:
|
|
330
|
+
name: H(u, !0),
|
|
331
331
|
absolutePath: u
|
|
332
332
|
};
|
|
333
333
|
} catch (e) {
|
|
@@ -370,7 +370,7 @@ var nt = class e {
|
|
|
370
370
|
return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
|
|
371
371
|
}
|
|
372
372
|
findOpenPath(e, t) {
|
|
373
|
-
return Array.from(
|
|
373
|
+
return Array.from(gt, (e) => e.getOrigin()).find((s) => {
|
|
374
374
|
if (s === t || !s.canWrite()) return !1;
|
|
375
375
|
const r = s.getPath();
|
|
376
376
|
return !!r && this.isSamePath(r, e);
|
|
@@ -401,10 +401,10 @@ var nt = class e {
|
|
|
401
401
|
}
|
|
402
402
|
if ("undefined" != typeof File && e instanceof File) return "file";
|
|
403
403
|
if ("undefined" != typeof Blob && e instanceof Blob) return "blob";
|
|
404
|
-
const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r =
|
|
404
|
+
const t = e instanceof ArrayBuffer || "[object ArrayBuffer]" === Object.prototype.toString.call(e), s = ArrayBuffer.isView(e), r = m.isNodeBuffer(e);
|
|
405
405
|
return t || s || r ? "buffer" : "undefined" != typeof ReadableStream && e instanceof ReadableStream || "[object ReadableStream]" === Object.prototype.toString.call(e) || e && "function" == typeof e.getReader && void 0 !== e.locked ? "stream" : null;
|
|
406
406
|
}
|
|
407
|
-
},
|
|
407
|
+
}, pt = class extends mt {
|
|
408
408
|
constructor(e, t) {
|
|
409
409
|
super();
|
|
410
410
|
}
|
|
@@ -444,8 +444,8 @@ var nt = 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
|
|
448
|
-
const l = i ? e.origin : new
|
|
447
|
+
if (a) throw new f(g("error.io.openElsewhere", { name: a.getName() ?? n }));
|
|
448
|
+
const l = i ? e.origin : new ut(n, {
|
|
449
449
|
format: e.format.key,
|
|
450
450
|
canWrite: !0
|
|
451
451
|
}), h = await e.encode(e.format.key, l);
|
|
@@ -461,7 +461,7 @@ var nt = class e {
|
|
|
461
461
|
} catch (e) {
|
|
462
462
|
throw new Error(`Failed to write file '${n}': ${e.message}`);
|
|
463
463
|
}
|
|
464
|
-
if (l instanceof
|
|
464
|
+
if (l instanceof ut) {
|
|
465
465
|
const e = await t.stat(n).catch(() => null);
|
|
466
466
|
l.update({
|
|
467
467
|
size: c.byteLength,
|
|
@@ -471,13 +471,13 @@ var nt = class e {
|
|
|
471
471
|
return l;
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
(
|
|
474
|
+
(nt || (nt = {})).SortOn = {
|
|
475
475
|
Value: "value",
|
|
476
476
|
FillColor: "fillColor",
|
|
477
477
|
FontColor: "fontColor",
|
|
478
478
|
Icon: "icon"
|
|
479
479
|
};
|
|
480
|
-
var
|
|
480
|
+
var wt, yt, St, bt, kt = {
|
|
481
481
|
TopLeft: "tl",
|
|
482
482
|
Top: "t",
|
|
483
483
|
TopRight: "tr",
|
|
@@ -487,53 +487,53 @@ var gt, mt, _t, ft, pt = {
|
|
|
487
487
|
BottomLeft: "bl",
|
|
488
488
|
Bottom: "b",
|
|
489
489
|
BottomRight: "br"
|
|
490
|
-
},
|
|
491
|
-
[
|
|
492
|
-
[
|
|
493
|
-
[
|
|
494
|
-
[
|
|
495
|
-
[
|
|
496
|
-
[
|
|
497
|
-
[
|
|
498
|
-
[
|
|
499
|
-
[
|
|
500
|
-
[
|
|
501
|
-
[
|
|
502
|
-
[
|
|
503
|
-
[
|
|
504
|
-
[
|
|
505
|
-
[
|
|
506
|
-
[
|
|
507
|
-
[
|
|
508
|
-
[
|
|
509
|
-
[
|
|
510
|
-
[
|
|
511
|
-
[
|
|
512
|
-
},
|
|
513
|
-
function
|
|
514
|
-
const t =
|
|
490
|
+
}, Ct = W.BuiltInName, vt = {
|
|
491
|
+
[Ct.Normal]: _("style.builtin.normal"),
|
|
492
|
+
[Ct.Comma]: _("style.builtin.comma"),
|
|
493
|
+
[Ct.Currency]: _("style.builtin.currency"),
|
|
494
|
+
[Ct.Percent]: _("style.builtin.percent"),
|
|
495
|
+
[Ct.Comma0]: _("style.builtin.comma0"),
|
|
496
|
+
[Ct.Currency0]: _("style.builtin.currency0"),
|
|
497
|
+
[Ct.Hyperlink]: _("style.builtin.hyperlink"),
|
|
498
|
+
[Ct.FollowedHyperlink]: _("style.builtin.followedHyperlink"),
|
|
499
|
+
[Ct.Note]: _("style.builtin.note"),
|
|
500
|
+
[Ct.WarningText]: _("style.builtin.warningText"),
|
|
501
|
+
[Ct.Title]: _("style.builtin.title"),
|
|
502
|
+
[Ct.Input]: _("style.builtin.input"),
|
|
503
|
+
[Ct.Output]: _("style.builtin.output"),
|
|
504
|
+
[Ct.Calculation]: _("style.builtin.calculation"),
|
|
505
|
+
[Ct.CheckCell]: _("style.builtin.checkCell"),
|
|
506
|
+
[Ct.LinkedCell]: _("style.builtin.linkedCell"),
|
|
507
|
+
[Ct.Total]: _("style.builtin.total"),
|
|
508
|
+
[Ct.Good]: _("style.builtin.good"),
|
|
509
|
+
[Ct.Bad]: _("style.builtin.bad"),
|
|
510
|
+
[Ct.Neutral]: _("style.builtin.neutral"),
|
|
511
|
+
[Ct.ExplanatoryText]: _("style.builtin.explanatoryText")
|
|
512
|
+
}, It = _("style.builtin.heading"), Rt = _("style.builtin.accent"), Nt = _("style.builtin.accentTint"), Ot = /^Heading ([1-4])$/, xt = /^Accent([1-6])$/, Lt = /^(20|40|60)% - Accent([1-6])$/;
|
|
513
|
+
function Vt(e) {
|
|
514
|
+
const t = vt[e];
|
|
515
515
|
if (t) return { key: t };
|
|
516
|
-
let s =
|
|
516
|
+
let s = Ot.exec(e);
|
|
517
517
|
return s ? {
|
|
518
|
-
key:
|
|
518
|
+
key: It,
|
|
519
519
|
params: { n: +s[1] }
|
|
520
|
-
} : (s =
|
|
521
|
-
key:
|
|
520
|
+
} : (s = xt.exec(e), s ? {
|
|
521
|
+
key: Rt,
|
|
522
522
|
params: { n: +s[1] }
|
|
523
|
-
} : (s =
|
|
524
|
-
key:
|
|
523
|
+
} : (s = Lt.exec(e), s ? {
|
|
524
|
+
key: Nt,
|
|
525
525
|
params: {
|
|
526
526
|
pct: +s[1],
|
|
527
527
|
n: +s[2]
|
|
528
528
|
}
|
|
529
529
|
} : null));
|
|
530
530
|
}
|
|
531
|
-
var
|
|
531
|
+
var Et, 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({ [L.AdjustmentType.LumMod]: a }), l && o.adjs.push({ [L.AdjustmentType.LumOff]: l });
|
|
536
|
+
const h = new O({
|
|
537
537
|
val: o.val,
|
|
538
538
|
adjs: o.adjs
|
|
539
539
|
}, s), c = h.toString();
|
|
@@ -544,15 +544,15 @@ var Ot, Rt = (e, t, s, r, i) => {
|
|
|
544
544
|
definition: o
|
|
545
545
|
};
|
|
546
546
|
};
|
|
547
|
-
(
|
|
547
|
+
(wt || (wt = {})).buildPalette = function(e, t, s, r) {
|
|
548
548
|
let i = [];
|
|
549
549
|
for (let o = 0; o < e.length; o++) {
|
|
550
550
|
let n = [];
|
|
551
551
|
i.push(n);
|
|
552
552
|
const a = (i) => {
|
|
553
|
-
for (let a = 0; a < i.length; a++) n.push(
|
|
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 O({
|
|
556
556
|
val: e[o].definition.val,
|
|
557
557
|
adjs: e[o].definition.adjs
|
|
558
558
|
}, t).toHSLA().lum;
|
|
@@ -589,28 +589,28 @@ var Ot, Rt = (e, t, s, r, i) => {
|
|
|
589
589
|
]);
|
|
590
590
|
}
|
|
591
591
|
return i;
|
|
592
|
-
},
|
|
593
|
-
var
|
|
594
|
-
function
|
|
595
|
-
if (!
|
|
596
|
-
const e = import("./
|
|
592
|
+
}, yt || (yt = {}), St || (St = {}), bt || (bt = {});
|
|
593
|
+
var Tt = null;
|
|
594
|
+
function Pt() {
|
|
595
|
+
if (!Tt) {
|
|
596
|
+
const e = import("./CFdJvXLSbUrvNera.js").then(({ initializeFunctions: e }) => {
|
|
597
597
|
const t = e(() => null);
|
|
598
598
|
return Object.freeze(Array.from(t.keys()));
|
|
599
599
|
});
|
|
600
600
|
e.catch(() => {
|
|
601
|
-
|
|
602
|
-
}),
|
|
601
|
+
Tt = null;
|
|
602
|
+
}), Tt = e;
|
|
603
603
|
}
|
|
604
|
-
return
|
|
604
|
+
return Tt;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
606
|
+
function Ft(e) {
|
|
607
|
+
return G.peek()?.readFormulaLiteral(e);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
const s =
|
|
609
|
+
function Bt(e, t) {
|
|
610
|
+
const s = Wt(e), r = Wt(t);
|
|
611
611
|
return s !== r ? s - r : e === t ? 0 : "number" == typeof e && "number" == typeof t ? e < t ? -1 : 1 : "string" == typeof e && "string" == typeof t ? e < t ? -1 : e > t ? 1 : 0 : "boolean" == typeof e ? e ? 1 : -1 : j.isError(e) && j.isError(t) ? e.getCode() - t.getCode() : 0;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Wt(e) {
|
|
614
614
|
if (null === e) return 0;
|
|
615
615
|
switch (typeof e) {
|
|
616
616
|
case "number": return 1;
|
|
@@ -621,13 +621,13 @@ function Vt(e) {
|
|
|
621
621
|
}
|
|
622
622
|
(function(e) {
|
|
623
623
|
function t(e) {
|
|
624
|
-
return
|
|
624
|
+
return G.peek()?.getFunctionDeclaration(e) ?? null;
|
|
625
625
|
}
|
|
626
626
|
e.get = t, e.has = function(e) {
|
|
627
627
|
return null !== t(e);
|
|
628
628
|
};
|
|
629
|
-
})(
|
|
630
|
-
var
|
|
629
|
+
})(Et || (Et = {}));
|
|
630
|
+
var jt, Mt = class {
|
|
631
631
|
constructor(e) {
|
|
632
632
|
this._children = e;
|
|
633
633
|
}
|
|
@@ -675,19 +675,19 @@ var Tt, Pt = 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 Oe(function(e) {
|
|
679
679
|
const t = e.length;
|
|
680
|
-
if (0 === t) return
|
|
680
|
+
if (0 === t) return Dt;
|
|
681
681
|
if (1 === t) return e[0];
|
|
682
682
|
let s = e[0];
|
|
683
|
-
for (let r = 1; r < t; r++) s =
|
|
683
|
+
for (let r = 1; r < t; r++) s = Ht(s, e[r]);
|
|
684
684
|
return Object.freeze(s);
|
|
685
685
|
}(r)), this._sortedNumbers = e;
|
|
686
686
|
}
|
|
687
687
|
return e;
|
|
688
688
|
}
|
|
689
689
|
getRanked(e) {
|
|
690
|
-
return
|
|
690
|
+
return ne(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 Tt, Pt = 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 ?? me, 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 Tt, Pt = class {
|
|
|
710
710
|
}) : l = !0, u = c.next();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
return
|
|
713
|
+
return ee.fromGroups(r, t, e, Bt, n, a, l);
|
|
714
714
|
}
|
|
715
715
|
getTypedCounts(e) {
|
|
716
716
|
let t = this._typedCounts;
|
|
@@ -760,10 +760,10 @@ var Tt, Pt = 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 xe(r);
|
|
764
764
|
}
|
|
765
|
-
},
|
|
766
|
-
function
|
|
765
|
+
}, Dt = Object.freeze([]);
|
|
766
|
+
function Ht(e, t) {
|
|
767
767
|
const s = e.length, r = t.length, i = new Array(s + r);
|
|
768
768
|
let o = 0, n = 0, a = 0;
|
|
769
769
|
for (; o < s && n < r;) i[a++] = e[o] <= t[n] ? e[o++] : t[n++];
|
|
@@ -771,45 +771,150 @@ function Wt(e, t) {
|
|
|
771
771
|
for (; n < r;) i[a++] = t[n++];
|
|
772
772
|
return i;
|
|
773
773
|
}
|
|
774
|
-
var
|
|
774
|
+
var zt, $t = class e {
|
|
775
775
|
constructor(e, t) {
|
|
776
|
-
this._source = null, this.cacheId = e, this.
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
776
|
+
this._source = null, this._fresh = /* @__PURE__ */ new WeakSet(), this._unwatch = null, this.cacheId = e, this._store = t, this._fresh.add(t.get());
|
|
777
|
+
}
|
|
778
|
+
static dataOf(t, s) {
|
|
779
|
+
const r = e.modelOf(t);
|
|
780
|
+
return {
|
|
781
|
+
part: D.fromJSON(t.part, s),
|
|
782
|
+
model: r,
|
|
783
|
+
partFormats: !r && t.partFormats ? t.partFormats : null,
|
|
784
|
+
source: !r && t.source ? t.source : null
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
static modelOf(e) {
|
|
788
|
+
if (!e.fields) return null;
|
|
789
|
+
const { cacheId: t, part: s, partFormats: r, ...i } = e;
|
|
790
|
+
return i;
|
|
791
|
+
}
|
|
792
|
+
get part() {
|
|
793
|
+
return this._store.get().part;
|
|
794
|
+
}
|
|
795
|
+
get _model() {
|
|
796
|
+
return this._store.get().model;
|
|
797
|
+
}
|
|
798
|
+
_getData() {
|
|
799
|
+
return this._store.get();
|
|
800
|
+
}
|
|
801
|
+
_replace(e) {
|
|
802
|
+
const t = {
|
|
803
|
+
part: null,
|
|
804
|
+
model: e,
|
|
805
|
+
partFormats: null,
|
|
806
|
+
source: null
|
|
807
|
+
};
|
|
808
|
+
this._store.set(t), this._fresh.add(t);
|
|
809
|
+
}
|
|
810
|
+
_restate(e) {
|
|
811
|
+
const t = this._fresh.has(this._store.get()), s = {
|
|
812
|
+
part: null,
|
|
813
|
+
model: e,
|
|
814
|
+
partFormats: null,
|
|
815
|
+
source: null
|
|
816
|
+
};
|
|
817
|
+
this._store.set(s), t && this._fresh.add(s);
|
|
818
|
+
}
|
|
819
|
+
_hold(e, t) {
|
|
820
|
+
if (this._source) return;
|
|
821
|
+
const { ref: s, sheet: r, name: i } = this._sourceAsRead() ?? {};
|
|
822
|
+
let o = null, n = null;
|
|
823
|
+
if (s && r && !s.includes("#REF!") ? (o = e(r), n = `${U(r)}!${Z(s)}`) : !i || s || r ? i && r && !s && (o = e(r), n = `${U(r)}!${i}`) : (o = t(i), n = `${i}[#All]`), !o || !n) return;
|
|
824
|
+
const a = {
|
|
786
825
|
formula: null,
|
|
787
826
|
wired: null,
|
|
788
827
|
last: null
|
|
789
828
|
};
|
|
790
|
-
this._source =
|
|
791
|
-
|
|
829
|
+
this._source = a, o(n, (e) => {
|
|
830
|
+
a.formula = e.formula;
|
|
792
831
|
const t = e.formula.getExpression();
|
|
793
|
-
|
|
832
|
+
a.wired ??= t, e.formula.hasRefError() || (a.last = t);
|
|
794
833
|
});
|
|
795
834
|
}
|
|
796
|
-
|
|
797
|
-
const e = this.
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
835
|
+
_sourceAsRead() {
|
|
836
|
+
const e = this._model?.source ?? this._store.get().source;
|
|
837
|
+
return e ? {
|
|
838
|
+
ref: e.ref ?? null,
|
|
839
|
+
sheet: e.sheet ?? null,
|
|
840
|
+
name: e.name ?? null
|
|
841
|
+
} : null;
|
|
842
|
+
}
|
|
843
|
+
_watchSource(e, t, s) {
|
|
844
|
+
if (this._unwatch) return;
|
|
845
|
+
const { ref: r, sheet: i, name: o } = this._sourceAsRead() ?? {};
|
|
846
|
+
let n = null, a = null;
|
|
847
|
+
if (r && i && !r.includes("#REF!") ? a = e(i, r) : o && !r && (n = i ? null : t(o), a = n?.getRange() ?? s(o, i ?? null)), !a || a.isInvalid()) return;
|
|
848
|
+
const l = (e) => `${e.getRowCount()}x${e.getColumnCount()}`;
|
|
849
|
+
let h = l(a);
|
|
850
|
+
const c = [], u = () => {
|
|
851
|
+
this._fresh = /* @__PURE__ */ new WeakSet();
|
|
852
|
+
}, d = (e) => {
|
|
853
|
+
const t = h;
|
|
854
|
+
return h = l(e), h !== t;
|
|
855
|
+
};
|
|
856
|
+
c.push(a.addListener((e) => {
|
|
857
|
+
if ("data" === e.getTrigger()) return void (null !== e.getCommit() && u());
|
|
858
|
+
const t = e.getSource();
|
|
859
|
+
(t.isInvalid() || d(t)) && u();
|
|
860
|
+
}, { transactional: !1 })), n && c.push(a.getWorksheet().addListeners({ onTablesChange: () => {
|
|
861
|
+
!n.isDeleted() && d(n.getRange()) && u();
|
|
862
|
+
} })), this._unwatch = () => {
|
|
863
|
+
this._unwatch = null;
|
|
864
|
+
for (const e of c) e();
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
_isStale() {
|
|
868
|
+
return !this._fresh.has(this._store.get());
|
|
869
|
+
}
|
|
870
|
+
_moved() {
|
|
871
|
+
const e = this._source;
|
|
872
|
+
if (!e?.formula) return null;
|
|
873
|
+
const t = e.formula.hasRefError() ? e.last : e.formula.getExpression();
|
|
874
|
+
if (null === t || t === e.wired) return null;
|
|
875
|
+
const s = this._sourceAsRead();
|
|
876
|
+
if (s?.name && s.sheet) {
|
|
877
|
+
const e = ke(t)?.sheet;
|
|
878
|
+
return e ? { sheet: e } : null;
|
|
879
|
+
}
|
|
880
|
+
const r = /^(.+)\[#All\]$/.exec(t)?.[1];
|
|
881
|
+
if (r) return { name: r };
|
|
882
|
+
const i = ke(t);
|
|
883
|
+
return i ? {
|
|
884
|
+
name: null,
|
|
885
|
+
ref: et(i.reference),
|
|
886
|
+
sheet: i.sheet
|
|
887
|
+
} : { ref: et(t) };
|
|
888
|
+
}
|
|
889
|
+
_getSource() {
|
|
890
|
+
const e = this._sourceAsRead();
|
|
891
|
+
if (!e) return null;
|
|
892
|
+
const t = {};
|
|
893
|
+
e.ref && (t.ref = e.ref), e.sheet && (t.sheet = e.sheet), e.name && (t.name = e.name);
|
|
894
|
+
const s = this._moved();
|
|
895
|
+
if (s) for (const e of [
|
|
896
|
+
"ref",
|
|
897
|
+
"sheet",
|
|
898
|
+
"name"
|
|
899
|
+
]) {
|
|
900
|
+
const r = s[e];
|
|
901
|
+
null === r ? delete t[e] : void 0 !== r && (t[e] = r);
|
|
902
|
+
}
|
|
903
|
+
return t;
|
|
803
904
|
}
|
|
804
905
|
toJSON(e) {
|
|
805
|
-
const t = { cacheId: this.cacheId }, s =
|
|
906
|
+
const t = { cacheId: this.cacheId }, s = D.toJSON(this.part, e);
|
|
806
907
|
if (s) {
|
|
807
|
-
|
|
808
|
-
|
|
908
|
+
t.part = s;
|
|
909
|
+
const e = this._store.get().partFormats;
|
|
910
|
+
e && (t.partFormats = e);
|
|
809
911
|
}
|
|
810
|
-
|
|
912
|
+
const r = this._model;
|
|
913
|
+
r && Object.assign(t, r);
|
|
914
|
+
const i = this._getSource();
|
|
915
|
+
return i && (t.source = i), t;
|
|
811
916
|
}
|
|
812
|
-
},
|
|
917
|
+
}, Ut = class {
|
|
813
918
|
constructor(e, t) {
|
|
814
919
|
this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
|
|
815
920
|
}
|
|
@@ -843,7 +948,7 @@ var Bt, jt = class {
|
|
|
843
948
|
get isIPerson() {
|
|
844
949
|
return !0;
|
|
845
950
|
}
|
|
846
|
-
},
|
|
951
|
+
}, Jt = class extends Be {
|
|
847
952
|
constructor(e) {
|
|
848
953
|
super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
|
|
849
954
|
}
|
|
@@ -864,7 +969,7 @@ var Bt, jt = class {
|
|
|
864
969
|
const e = this._byDisplayName.get(r);
|
|
865
970
|
if (e) return e;
|
|
866
971
|
}
|
|
867
|
-
const i = new
|
|
972
|
+
const i = new Ut({
|
|
868
973
|
...t,
|
|
869
974
|
displayName: r,
|
|
870
975
|
id: s ?? c.uuidV4().toUpperCase()
|
|
@@ -907,7 +1012,7 @@ var Bt, jt = class {
|
|
|
907
1012
|
get isIPersonCollection() {
|
|
908
1013
|
return !0;
|
|
909
1014
|
}
|
|
910
|
-
},
|
|
1015
|
+
}, qt = class {
|
|
911
1016
|
constructor(e) {
|
|
912
1017
|
this._options = e, this._emitter = new y(this), this._initState();
|
|
913
1018
|
}
|
|
@@ -927,21 +1032,22 @@ var Bt, jt = class {
|
|
|
927
1032
|
}
|
|
928
1033
|
}
|
|
929
1034
|
async createModule(e) {
|
|
930
|
-
const t = await (await import("./
|
|
1035
|
+
const t = await (await import("./DFvs1LVzXKm1N5M2.js")).ScriptCompiler.compile({
|
|
931
1036
|
builtInNames: this._builtInNames(),
|
|
932
1037
|
minify: !0,
|
|
933
1038
|
...e
|
|
934
1039
|
});
|
|
935
|
-
return t.module ? await
|
|
1040
|
+
return t.module ? await se(z.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
|
|
936
1041
|
}
|
|
937
1042
|
addModule(e, t, s) {
|
|
938
1043
|
this._modules.add(e, t, s);
|
|
939
1044
|
}
|
|
940
1045
|
async addModuleFromJSON(e, t, s) {
|
|
941
|
-
const r = await
|
|
1046
|
+
const r = await se(e, t);
|
|
942
1047
|
return this.addModule(e, r, s), r;
|
|
943
1048
|
}
|
|
944
|
-
executeMacro(e, t, s) {
|
|
1049
|
+
async executeMacro(e, t, s) {
|
|
1050
|
+
await Ge.assertUsable("scripts");
|
|
945
1051
|
const r = this._modules.getItems({ name: t }), i = r.length;
|
|
946
1052
|
for (let t = 0; t < i; t++) {
|
|
947
1053
|
const i = r[t].getFunctions().getByName(e);
|
|
@@ -954,7 +1060,8 @@ var Bt, jt = class {
|
|
|
954
1060
|
}
|
|
955
1061
|
async run(e, t) {
|
|
956
1062
|
try {
|
|
957
|
-
|
|
1063
|
+
await Ge.assertUsable("scripts");
|
|
1064
|
+
const s = "string" == typeof e ? await this.createModule({ source: e }) : await se(z.DEFAULT_MODULE, e), r = "string" == typeof e ? e : e?.source ?? "";
|
|
958
1065
|
return await this._runModule(s, r, t);
|
|
959
1066
|
} catch (e) {
|
|
960
1067
|
return {
|
|
@@ -1036,7 +1143,7 @@ var Bt, jt = class {
|
|
|
1036
1143
|
}
|
|
1037
1144
|
if (!i || 0 === i.length) return c.EmptyArray;
|
|
1038
1145
|
const n = e?.text ? e.text.trim().toUpperCase() : null;
|
|
1039
|
-
return n ?
|
|
1146
|
+
return n ? ye(i, n) : i.sort((e, t) => {
|
|
1040
1147
|
const s = e.getName().toUpperCase(), r = t.getName().toUpperCase();
|
|
1041
1148
|
return s < r ? -1 : s > r ? 1 : 0;
|
|
1042
1149
|
}), void 0 !== s && i.length > s ? i.slice(0, s) : i;
|
|
@@ -1075,7 +1182,7 @@ var Bt, jt = class {
|
|
|
1075
1182
|
for (let o = 0; o < r.length; o++) {
|
|
1076
1183
|
const n = r[o], a = t[n];
|
|
1077
1184
|
try {
|
|
1078
|
-
s[n] = await
|
|
1185
|
+
s[n] = await se(n, a, !1, [], "workbook" === a?.scope ? e : null);
|
|
1079
1186
|
} catch (e) {
|
|
1080
1187
|
i.error(`Could not load script '${n}'; it will be unavailable.`, e);
|
|
1081
1188
|
}
|
|
@@ -1109,10 +1216,10 @@ var Bt, jt = class {
|
|
|
1109
1216
|
get isIScript() {
|
|
1110
1217
|
return !0;
|
|
1111
1218
|
}
|
|
1112
|
-
},
|
|
1219
|
+
}, Kt = /^([a-z][a-z0-9+.-]*):/i, Gt = (e) => {
|
|
1113
1220
|
const t = e.toLowerCase();
|
|
1114
1221
|
return t.endsWith(":") ? t : t + ":";
|
|
1115
|
-
},
|
|
1222
|
+
}, Zt = async (e, t) => {
|
|
1116
1223
|
try {
|
|
1117
1224
|
return await globalThis.fetch(e, t);
|
|
1118
1225
|
} catch (s) {
|
|
@@ -1134,12 +1241,12 @@ var Bt, jt = class {
|
|
|
1134
1241
|
})(e, t)) throw new j.Blocked("This site is restricted: it doesn't allow web apps to read its data, so the browser blocked the request for security.", { cause: s });
|
|
1135
1242
|
throw s;
|
|
1136
1243
|
}
|
|
1137
|
-
},
|
|
1244
|
+
}, Xt = class {
|
|
1138
1245
|
constructor() {
|
|
1139
|
-
this._handlers = /* @__PURE__ */ new Map([["http:",
|
|
1246
|
+
this._handlers = /* @__PURE__ */ new Map([["http:", Zt], ["https:", Zt]]);
|
|
1140
1247
|
}
|
|
1141
1248
|
fetch(e, t) {
|
|
1142
|
-
const s =
|
|
1249
|
+
const s = Kt.exec(e)?.[1], r = this._handlers.get(s ? Gt(s) : "https:");
|
|
1143
1250
|
if (!r) return Promise.reject(/* @__PURE__ */ new TypeError(`No fetcher serves '${s}:'.`));
|
|
1144
1251
|
try {
|
|
1145
1252
|
return r(e, t);
|
|
@@ -1148,7 +1255,7 @@ var Bt, jt = class {
|
|
|
1148
1255
|
}
|
|
1149
1256
|
}
|
|
1150
1257
|
register(e, t) {
|
|
1151
|
-
const s =
|
|
1258
|
+
const s = Gt(e), r = this._handlers.get(s);
|
|
1152
1259
|
return this._handlers.set(s, t), () => {
|
|
1153
1260
|
this._handlers.get(s) === t && (r ? this._handlers.set(s, r) : this._handlers.delete(s));
|
|
1154
1261
|
};
|
|
@@ -1156,17 +1263,17 @@ var Bt, jt = class {
|
|
|
1156
1263
|
get isIFetcher() {
|
|
1157
1264
|
return !0;
|
|
1158
1265
|
}
|
|
1159
|
-
},
|
|
1266
|
+
}, Qt = /* @__PURE__ */ new Set([
|
|
1160
1267
|
101,
|
|
1161
1268
|
103,
|
|
1162
1269
|
204,
|
|
1163
1270
|
205,
|
|
1164
1271
|
304
|
|
1165
|
-
]),
|
|
1272
|
+
]), Yt = (e) => new Response(Qt.has(e.status) ? null : e.body, {
|
|
1166
1273
|
status: e.status,
|
|
1167
1274
|
statusText: e.statusText,
|
|
1168
1275
|
headers: e.headers
|
|
1169
|
-
}),
|
|
1276
|
+
}), es = class {
|
|
1170
1277
|
constructor(e, t) {
|
|
1171
1278
|
this._kept = /* @__PURE__ */ new Map(), this._cached = /* @__PURE__ */ new Map(), this._inFlight = /* @__PURE__ */ new Map(), this._resources = e, this._fetcher = t;
|
|
1172
1279
|
}
|
|
@@ -1178,19 +1285,19 @@ var Bt, jt = class {
|
|
|
1178
1285
|
const s = this._kept.get(e) ?? this._findHeld(e);
|
|
1179
1286
|
if (s && !s.isClosed()) return this._fromKept(s);
|
|
1180
1287
|
const r = this._cached.get(e);
|
|
1181
|
-
if (r) return
|
|
1288
|
+
if (r) return Yt(r);
|
|
1182
1289
|
let i = this._inFlight.get(e);
|
|
1183
1290
|
return i || (i = this._request(e, {
|
|
1184
1291
|
...t,
|
|
1185
1292
|
signal: void 0
|
|
1186
1293
|
}).finally(() => {
|
|
1187
1294
|
this._inFlight.delete(e);
|
|
1188
|
-
}), this._inFlight.set(e, i)),
|
|
1295
|
+
}), this._inFlight.set(e, i)), Yt(await ((e, t) => t ? t.aborted ? Promise.reject(t.reason) : new Promise((s, r) => {
|
|
1189
1296
|
const i = () => r(t.reason);
|
|
1190
1297
|
t.addEventListener("abort", i, { once: !0 }), e.then(s, r).finally(() => t.removeEventListener("abort", i));
|
|
1191
1298
|
}) : e)(i, t?.signal));
|
|
1192
1299
|
}
|
|
1193
|
-
return
|
|
1300
|
+
return Yt(await this._request(e, t));
|
|
1194
1301
|
}
|
|
1195
1302
|
adopt(e) {
|
|
1196
1303
|
for (const t of e) {
|
|
@@ -1208,7 +1315,7 @@ var Bt, jt = class {
|
|
|
1208
1315
|
}
|
|
1209
1316
|
async _fromKept(e) {
|
|
1210
1317
|
const [t, s] = await Promise.all([e.toBuffer(), e.getType()]);
|
|
1211
|
-
return
|
|
1318
|
+
return Yt({
|
|
1212
1319
|
status: 200,
|
|
1213
1320
|
statusText: "OK",
|
|
1214
1321
|
headers: s ? [["content-type", s.mime]] : [],
|
|
@@ -1216,7 +1323,7 @@ var Bt, jt = class {
|
|
|
1216
1323
|
});
|
|
1217
1324
|
}
|
|
1218
1325
|
async _request(e, t) {
|
|
1219
|
-
const s = await this._fetcher.fetch(e, t), r =
|
|
1326
|
+
const s = await this._fetcher.fetch(e, t), r = Qt.has(s.status) ? null : await s.arrayBuffer(), i = [];
|
|
1220
1327
|
s.headers.forEach((e, t) => {
|
|
1221
1328
|
i.push([t, e]);
|
|
1222
1329
|
});
|
|
@@ -1227,14 +1334,14 @@ var Bt, jt = class {
|
|
|
1227
1334
|
body: r
|
|
1228
1335
|
};
|
|
1229
1336
|
if (s.ok && r && r.byteLength > 0) {
|
|
1230
|
-
const t = await new
|
|
1337
|
+
const t = await new He({ source: { buffer: r } }).getType();
|
|
1231
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);
|
|
1232
1339
|
}
|
|
1233
1340
|
return o;
|
|
1234
1341
|
}
|
|
1235
|
-
},
|
|
1342
|
+
}, ts = class {
|
|
1236
1343
|
constructor(e, t, s, r) {
|
|
1237
|
-
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 Ze({
|
|
1238
1345
|
runtime: e,
|
|
1239
1346
|
styles: this._styles,
|
|
1240
1347
|
calcOnLoad: "none",
|
|
@@ -1256,13 +1363,13 @@ var Bt, jt = class {
|
|
|
1256
1363
|
e.includes(r) && delete i[r];
|
|
1257
1364
|
}
|
|
1258
1365
|
}
|
|
1259
|
-
const o =
|
|
1366
|
+
const o = F(i.fontFamily);
|
|
1260
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;
|
|
1261
|
-
const n =
|
|
1262
|
-
r.font.underline = n.underline, r.font.strike = n.strike ?
|
|
1368
|
+
const n = x(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 = k(i.textAlign)), i?.textAlign && !r.alignment.horizontal && "general" !== i?.textAlign && ("center-across" === i.textAlign ? r.alignment.horizontal = P.HorizontalAlignment.CenterContinuous : "fill" === i.textAlign ? r.alignment.horizontal = P.HorizontalAlignment.Fill : "121" === i.textAlign || "010" === i.textAlign ? (r.alignment.horizontal = P.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = "121" === i.textAlign) : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && ("super" === i.verticalAlign.toLowerCase() ? r.font.baseline = b.Baseline.Superscript : "sub" === i.verticalAlign.toLowerCase() ? r.font.baseline = b.Baseline.Subscript : r.alignment.vertical = I(i.verticalAlign), r.alignment.vertical || ("121" === i.verticalAlign ? r.alignment.vertical = P.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 ? P.Overflow.Visible : P.Overflow.Wrap), "shrinktofit" === i.msoTextControl && (r.alignment.overflow = P.Overflow.Shrink);
|
|
1263
1370
|
let a = null;
|
|
1264
1371
|
if (i.background ? a = i.background : i.backgroundColor && (a = i.backgroundColor), a && (r.fill = { color: a }), i.msoPattern) {
|
|
1265
|
-
let e =
|
|
1372
|
+
let e = R(i.msoPattern);
|
|
1266
1373
|
e && (e.patternType === C.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== C.BuiltInSheetPattern.None && (a && (e.background = a), r.fill = e));
|
|
1267
1374
|
}
|
|
1268
1375
|
"vertical" === i.layoutFlow || "vertical-ideographic" === i.layoutFlow ? r.alignment.stacked = !0 : void 0 !== i.msoRotate && (r.alignment.rotation = N(i.msoRotate));
|
|
@@ -1271,18 +1378,18 @@ var Bt, jt = class {
|
|
|
1271
1378
|
};
|
|
1272
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);
|
|
1273
1380
|
let h = r.numberFormat;
|
|
1274
|
-
i.msoNumberFormat && (h =
|
|
1381
|
+
i.msoNumberFormat && (h = A(i.msoNumberFormat), h.includes("\\") ? h = null : "Fixed" === h ? h = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Number ? null : T.Type.Number : "Percent" === h && (h = T.Styles.lookupStyle(r.numberFormat).formatType === T.Type.Percentage ? null : T.Type.Percentage)), h && (r.numberFormat = h), e.style = this._styles.normalize(r), s && 0 === Object.keys(e.style).length && delete e.style;
|
|
1275
1382
|
}
|
|
1276
1383
|
onCell(e, t, s, r, i) {
|
|
1277
1384
|
const o = r(i);
|
|
1278
1385
|
let n = { value: void 0 !== t ? t : s ?? "" };
|
|
1279
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)) {
|
|
1280
1387
|
const e = n.style?.numberFormat;
|
|
1281
|
-
e && (
|
|
1388
|
+
e && (V(e) || B(e)) && (n.value = j.BuiltIn.Num);
|
|
1282
1389
|
}
|
|
1283
1390
|
if ("TD" === i?.tagName.toUpperCase()) {
|
|
1284
1391
|
let e = n.style, t = e?.font ?? {};
|
|
1285
|
-
(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 = b.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = b.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));
|
|
1286
1393
|
const s = i.querySelectorAll("a");
|
|
1287
1394
|
if (s.length > 0) {
|
|
1288
1395
|
const e = s[0].getAttribute("href");
|
|
@@ -1330,9 +1437,9 @@ var Bt, jt = class {
|
|
|
1330
1437
|
if ("userset" !== i.msoHeightSource) return;
|
|
1331
1438
|
if (!r) return;
|
|
1332
1439
|
let o = r.getAttribute("height") ?? i.height, n = null;
|
|
1333
|
-
if (o && (n =
|
|
1440
|
+
if (o && (n = E(o, this._styles.getNormal().getFont().getSize(), "px")), null === n) for (let e = 0; e < r.cells.length; e++) {
|
|
1334
1441
|
const t = r.cells[e], i = t.getAttribute("height") ?? s(t).height;
|
|
1335
|
-
let o =
|
|
1442
|
+
let o = E(i, this._styles.getNormal().getFont().getSize(), "px");
|
|
1336
1443
|
null !== o && (n = Math.max(o, n ?? 0));
|
|
1337
1444
|
}
|
|
1338
1445
|
null !== n && this._rowsReading.push({
|
|
@@ -1340,7 +1447,7 @@ var Bt, jt = class {
|
|
|
1340
1447
|
min: this._topLeft.rowIndex + e,
|
|
1341
1448
|
max: this._topLeft.rowIndex + e + t - 1
|
|
1342
1449
|
},
|
|
1343
|
-
update: { size: n *
|
|
1450
|
+
update: { size: n * v.getDeviceScale() }
|
|
1344
1451
|
});
|
|
1345
1452
|
}
|
|
1346
1453
|
onColumn(e, t, s, r) {
|
|
@@ -1348,12 +1455,12 @@ var Bt, jt = class {
|
|
|
1348
1455
|
if ("userset" !== i.msoWidthSource) return;
|
|
1349
1456
|
if (!r) return;
|
|
1350
1457
|
let o = r.getAttribute("width") ?? i.width, n = null;
|
|
1351
|
-
o && (n =
|
|
1458
|
+
o && (n = E(o, this._styles.getNormal().getFont().getSize(), "px")), null !== n && this._colsReading.push({
|
|
1352
1459
|
address: {
|
|
1353
1460
|
min: this._topLeft.colIndex + e,
|
|
1354
1461
|
max: this._topLeft.colIndex + e + t - 1
|
|
1355
1462
|
},
|
|
1356
|
-
update: { size: n *
|
|
1463
|
+
update: { size: n * v.getDeviceScale() }
|
|
1357
1464
|
});
|
|
1358
1465
|
}
|
|
1359
1466
|
onDone() {
|
|
@@ -1364,7 +1471,7 @@ var Bt, jt = class {
|
|
|
1364
1471
|
sheet() {
|
|
1365
1472
|
return this._sheet;
|
|
1366
1473
|
}
|
|
1367
|
-
},
|
|
1474
|
+
}, ss = class {
|
|
1368
1475
|
constructor(e) {
|
|
1369
1476
|
if (!e) throw new u("snapshot is required.");
|
|
1370
1477
|
this._snapshot = e;
|
|
@@ -1396,7 +1503,7 @@ var Bt, jt = class {
|
|
|
1396
1503
|
get isClipboardItem() {
|
|
1397
1504
|
return !0;
|
|
1398
1505
|
}
|
|
1399
|
-
},
|
|
1506
|
+
}, rs = class {
|
|
1400
1507
|
constructor(e, t, s, r, i) {
|
|
1401
1508
|
if (this._parsed = void 0, this._runtime = e, !t) throw new u("nativeItems are required.");
|
|
1402
1509
|
this._topLeft = s ?? d.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
|
|
@@ -1445,15 +1552,15 @@ var Bt, jt = class {
|
|
|
1445
1552
|
let e, t = this._native?.text, s = this._native.html;
|
|
1446
1553
|
if (null === s && t && t.includes("<table")) try {
|
|
1447
1554
|
const e = new DOMParser().parseFromString(t, n.Html), r = e.querySelector("parsererror");
|
|
1448
|
-
if (r) throw new
|
|
1555
|
+
if (r) throw new f("Unable to parse: " + r);
|
|
1449
1556
|
s = e, t = null;
|
|
1450
1557
|
} catch (e) {
|
|
1451
1558
|
console.warn("Discovered text as html table but could could not parse.");
|
|
1452
1559
|
}
|
|
1453
1560
|
try {
|
|
1454
|
-
const r = new
|
|
1561
|
+
const r = new ts(this._runtime, this._topLeft, this._styles, s ? "HTML" : "Text"), i = await Promise.resolve(t ? pe(t) : [[]]);
|
|
1455
1562
|
let o;
|
|
1456
|
-
if (
|
|
1563
|
+
if (ge(s, i, r) ? (e = r.sheet(), o = e.getUsedRange()) : s = null, o) {
|
|
1457
1564
|
const t = o.getSnapshot();
|
|
1458
1565
|
return this._parsed = {
|
|
1459
1566
|
prepare: (e, s) => t.prepare?.(e, s),
|
|
@@ -1495,7 +1602,7 @@ var Bt, jt = class {
|
|
|
1495
1602
|
get isClipboardItem() {
|
|
1496
1603
|
return !0;
|
|
1497
1604
|
}
|
|
1498
|
-
},
|
|
1605
|
+
}, is = class {
|
|
1499
1606
|
constructor(e) {
|
|
1500
1607
|
this._closed = !1, this._kind = e.kind, this._id = e.id, this._part = e.part, this._styles = e.styles, this._tabColor = e.tabColor ? this._styles.parseColor(e.tabColor) : null, this._transactions = e.transactions, this._workbook = e.workbook ?? null, this._container = e.container, this._emitter = new y(this, this._transactions);
|
|
1501
1608
|
}
|
|
@@ -1512,11 +1619,11 @@ var Bt, jt = class {
|
|
|
1512
1619
|
return this._assertOpen(), this._container.setName(e, t), this;
|
|
1513
1620
|
}
|
|
1514
1621
|
getVisibility() {
|
|
1515
|
-
return this._closed ?
|
|
1622
|
+
return this._closed ? ve.Visibility.VeryHidden : this._container.getVisibility();
|
|
1516
1623
|
}
|
|
1517
1624
|
setVisibility(e = !0, t) {
|
|
1518
1625
|
let s;
|
|
1519
|
-
return this._assertOpen(), s = !0 === e ?
|
|
1626
|
+
return this._assertOpen(), s = !0 === e ? ve.Visibility.Visible : !1 === e ? ve.Visibility.Hidden : e, this._container.setVisibility(s, t), this;
|
|
1520
1627
|
}
|
|
1521
1628
|
getIndex() {
|
|
1522
1629
|
return this._container.getIndex();
|
|
@@ -1543,7 +1650,7 @@ var Bt, jt = class {
|
|
|
1543
1650
|
try {
|
|
1544
1651
|
this._notify("onBeforeDelete");
|
|
1545
1652
|
} catch (e) {
|
|
1546
|
-
throw e instanceof Error ? e : new
|
|
1653
|
+
throw e instanceof Error ? e : new f(e?.message ?? g("error.sheet.modelDelete"));
|
|
1547
1654
|
}
|
|
1548
1655
|
this._notify("onDelete"), e.commit();
|
|
1549
1656
|
} catch (t) {
|
|
@@ -1584,12 +1691,12 @@ var Bt, jt = class {
|
|
|
1584
1691
|
return !0;
|
|
1585
1692
|
}
|
|
1586
1693
|
};
|
|
1587
|
-
(
|
|
1694
|
+
(jt || (jt = {})).Visibility = {
|
|
1588
1695
|
Visible: "visible",
|
|
1589
1696
|
Hidden: "hidden",
|
|
1590
1697
|
VeryHidden: "veryHidden"
|
|
1591
1698
|
};
|
|
1592
|
-
var
|
|
1699
|
+
var os = {
|
|
1593
1700
|
showFormulaBar: !0,
|
|
1594
1701
|
showTabs: !0,
|
|
1595
1702
|
tabRatio: 600,
|
|
@@ -1600,11 +1707,11 @@ var es = {
|
|
|
1600
1707
|
firstTab: 0,
|
|
1601
1708
|
windowBounds: null,
|
|
1602
1709
|
minimized: !1,
|
|
1603
|
-
visibility:
|
|
1710
|
+
visibility: jt.Visibility.Visible,
|
|
1604
1711
|
autoFilterDateGrouping: !0
|
|
1605
|
-
},
|
|
1712
|
+
}, ns = class {
|
|
1606
1713
|
constructor(e) {
|
|
1607
|
-
this._id = c.uuidV4(), this._emitter = new y(this), this._state = { ...
|
|
1714
|
+
this._id = c.uuidV4(), this._emitter = new y(this), this._state = { ...os }, e?.json && this._fromJSON(e?.json);
|
|
1608
1715
|
}
|
|
1609
1716
|
getId() {
|
|
1610
1717
|
return this._id;
|
|
@@ -1693,7 +1800,7 @@ var es = {
|
|
|
1693
1800
|
const t = Object.keys(this._state), s = t.length;
|
|
1694
1801
|
for (let r = 0; r < s; r++) {
|
|
1695
1802
|
const s = t[r], i = this._state[s];
|
|
1696
|
-
null != i && i !==
|
|
1803
|
+
null != i && i !== os[s] && (e[s] = i);
|
|
1697
1804
|
}
|
|
1698
1805
|
return 0 === Object.keys(e).length && (e = null), e;
|
|
1699
1806
|
}
|
|
@@ -1703,7 +1810,7 @@ var es = {
|
|
|
1703
1810
|
}
|
|
1704
1811
|
update(e, t = !0) {
|
|
1705
1812
|
this._state = {
|
|
1706
|
-
...
|
|
1813
|
+
...os,
|
|
1707
1814
|
...this._state,
|
|
1708
1815
|
...e
|
|
1709
1816
|
}, t && this._emitter.notify("onViewChange");
|
|
@@ -1718,13 +1825,13 @@ var es = {
|
|
|
1718
1825
|
get isIWorkbookView() {
|
|
1719
1826
|
return !0;
|
|
1720
1827
|
}
|
|
1721
|
-
},
|
|
1828
|
+
}, as = Object.freeze({
|
|
1722
1829
|
structure: !1,
|
|
1723
1830
|
windows: !1,
|
|
1724
1831
|
revision: !0,
|
|
1725
1832
|
password: null,
|
|
1726
1833
|
revisionsPassword: null
|
|
1727
|
-
}),
|
|
1834
|
+
}), ls = class extends oe {
|
|
1728
1835
|
isWindowsAllowed() {
|
|
1729
1836
|
return this._isPropertyAllowed("windows");
|
|
1730
1837
|
}
|
|
@@ -1746,7 +1853,7 @@ var es = {
|
|
|
1746
1853
|
const s = Object.keys(t), r = s.length;
|
|
1747
1854
|
for (let i = 0; i < r; i++) {
|
|
1748
1855
|
const r = s[i], o = t[r];
|
|
1749
|
-
null != o && o !==
|
|
1856
|
+
null != o && o !== as[r] && (e[r] = o);
|
|
1750
1857
|
}
|
|
1751
1858
|
}
|
|
1752
1859
|
return super._toJSON(e);
|
|
@@ -1758,38 +1865,38 @@ var es = {
|
|
|
1758
1865
|
return !0;
|
|
1759
1866
|
}
|
|
1760
1867
|
};
|
|
1761
|
-
(
|
|
1868
|
+
(zt || (zt = {})).Type = {
|
|
1762
1869
|
Number: "number",
|
|
1763
1870
|
Boolean: "boolean",
|
|
1764
1871
|
Date: "date",
|
|
1765
1872
|
String: "string",
|
|
1766
1873
|
Float: "float"
|
|
1767
1874
|
};
|
|
1768
|
-
var
|
|
1875
|
+
var hs = (e) => {
|
|
1769
1876
|
if ("string" == typeof e) return {
|
|
1770
|
-
type:
|
|
1877
|
+
type: zt.Type.String,
|
|
1771
1878
|
value: e
|
|
1772
1879
|
};
|
|
1773
1880
|
if ("boolean" == typeof e) return {
|
|
1774
|
-
type:
|
|
1881
|
+
type: zt.Type.Boolean,
|
|
1775
1882
|
value: e
|
|
1776
1883
|
};
|
|
1777
1884
|
if ("number" == typeof e) {
|
|
1778
1885
|
if (!Number.isFinite(e)) throw new Error("A custom property value must be a finite number.");
|
|
1779
1886
|
return {
|
|
1780
|
-
type: Number.isInteger(e) && e >= -2147483648 && e <= 2147483647 ?
|
|
1887
|
+
type: Number.isInteger(e) && e >= -2147483648 && e <= 2147483647 ? zt.Type.Number : zt.Type.Float,
|
|
1781
1888
|
value: e
|
|
1782
1889
|
};
|
|
1783
1890
|
}
|
|
1784
1891
|
if (e instanceof Date) {
|
|
1785
1892
|
if (isNaN(e.getTime())) throw new Error("A custom property value must be a valid date.");
|
|
1786
1893
|
return {
|
|
1787
|
-
type:
|
|
1894
|
+
type: zt.Type.Date,
|
|
1788
1895
|
value: e.toISOString()
|
|
1789
1896
|
};
|
|
1790
1897
|
}
|
|
1791
1898
|
throw new Error("A custom property value must be a string, number, boolean or Date.");
|
|
1792
|
-
},
|
|
1899
|
+
}, cs = class {
|
|
1793
1900
|
constructor(e, t) {
|
|
1794
1901
|
this._json = e, this._owner = t;
|
|
1795
1902
|
}
|
|
@@ -1804,12 +1911,12 @@ var is = (e) => {
|
|
|
1804
1911
|
}
|
|
1805
1912
|
getValue() {
|
|
1806
1913
|
const { type: e, value: t } = this._json;
|
|
1807
|
-
return e ===
|
|
1914
|
+
return e === zt.Type.Date ? new Date(t) : t;
|
|
1808
1915
|
}
|
|
1809
1916
|
setValue(e) {
|
|
1810
1917
|
this._owner._assertCustomEditable(this), this._json = {
|
|
1811
1918
|
...this._json,
|
|
1812
|
-
...
|
|
1919
|
+
...hs(e)
|
|
1813
1920
|
};
|
|
1814
1921
|
}
|
|
1815
1922
|
delete() {
|
|
@@ -1818,7 +1925,7 @@ var is = (e) => {
|
|
|
1818
1925
|
toJSON() {
|
|
1819
1926
|
return { ...this._json };
|
|
1820
1927
|
}
|
|
1821
|
-
},
|
|
1928
|
+
}, us = class {
|
|
1822
1929
|
constructor(e) {
|
|
1823
1930
|
this._json = {}, this._custom = [], this._assertOpen = e;
|
|
1824
1931
|
}
|
|
@@ -1908,9 +2015,9 @@ var is = (e) => {
|
|
|
1908
2015
|
if (this._assertOpen(), "string" != typeof e || "" === e) throw new Error("A custom property needs a name.");
|
|
1909
2016
|
const s = this.getCustomProperty(e);
|
|
1910
2017
|
if (s) return s.setValue(t), s;
|
|
1911
|
-
const r = new
|
|
2018
|
+
const r = new cs({
|
|
1912
2019
|
key: e,
|
|
1913
|
-
...
|
|
2020
|
+
...hs(t)
|
|
1914
2021
|
}, this);
|
|
1915
2022
|
return this._custom.push(r), r;
|
|
1916
2023
|
}
|
|
@@ -1925,26 +2032,26 @@ var is = (e) => {
|
|
|
1925
2032
|
}
|
|
1926
2033
|
fromJSON(e) {
|
|
1927
2034
|
const { custom: t, ...s } = e ?? {};
|
|
1928
|
-
this._json = s, this._custom = (t ?? []).map((e) => new
|
|
2035
|
+
this._json = s, this._custom = (t ?? []).map((e) => new cs({ ...e }, this));
|
|
1929
2036
|
}
|
|
1930
2037
|
toJSON() {
|
|
1931
2038
|
const e = { ...this._json };
|
|
1932
2039
|
return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
|
|
1933
2040
|
}
|
|
1934
2041
|
};
|
|
1935
|
-
function
|
|
2042
|
+
function ds(e) {
|
|
1936
2043
|
return g("error.workbook.invalidSheetKey", { key: e });
|
|
1937
2044
|
}
|
|
1938
|
-
function
|
|
2045
|
+
function gs(e) {
|
|
1939
2046
|
return g("error.workbook.sheetNameNotFound", { sheetName: e });
|
|
1940
2047
|
}
|
|
1941
|
-
function
|
|
2048
|
+
function fs(e, t) {
|
|
1942
2049
|
return g("chart" === t ? "error.workbook.sheetIsChart" : "macro" === t ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
|
|
1943
2050
|
}
|
|
1944
|
-
function
|
|
2051
|
+
function _s(e, t) {
|
|
1945
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");
|
|
1946
2053
|
}
|
|
1947
|
-
var
|
|
2054
|
+
var ms = class extends Be {
|
|
1948
2055
|
constructor(e, t, s, r) {
|
|
1949
2056
|
super(), this._add = e, this._get = t, this._addListeners = s, this._getSelected = r;
|
|
1950
2057
|
}
|
|
@@ -1975,25 +2082,25 @@ var us, ds = class extends pe {
|
|
|
1975
2082
|
get isIWorksheetCollection() {
|
|
1976
2083
|
return !0;
|
|
1977
2084
|
}
|
|
1978
|
-
},
|
|
1979
|
-
function
|
|
2085
|
+
}, ps = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), ws = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
|
|
2086
|
+
function ys(e) {
|
|
1980
2087
|
const t = g(_("workbook.defaultSheetName"), { n: e + 1 });
|
|
1981
2088
|
return "workbook.defaultSheetName" === t ? `Sheet${e + 1}` : t;
|
|
1982
2089
|
}
|
|
1983
|
-
function
|
|
2090
|
+
function Ss(e, t) {
|
|
1984
2091
|
return {
|
|
1985
|
-
...
|
|
2092
|
+
...Pe,
|
|
1986
2093
|
getWorksheet: () => null,
|
|
1987
|
-
toString: () =>
|
|
2094
|
+
toString: () => fe(e, t)
|
|
1988
2095
|
};
|
|
1989
2096
|
}
|
|
1990
|
-
function
|
|
2097
|
+
function bs(e, t = !1) {
|
|
1991
2098
|
if (!e) throw new Error(g("error.workbook.sheetNameBlank"));
|
|
1992
|
-
if (
|
|
2099
|
+
if (ps.test(e)) {
|
|
1993
2100
|
if (!t) throw new Error(function(e) {
|
|
1994
2101
|
return e ? g("error.workbook.sheetNameInvalidCharsNamed", { sheetName: e }) : g("error.workbook.sheetNameInvalidChars");
|
|
1995
2102
|
}(e));
|
|
1996
|
-
e = e.replace(
|
|
2103
|
+
e = e.replace(ps, "");
|
|
1997
2104
|
}
|
|
1998
2105
|
if (0 === e.length) throw new Error(g("error.workbook.sheetNameBlank"));
|
|
1999
2106
|
const s = e.length;
|
|
@@ -2007,7 +2114,7 @@ function ps(e, t = !1) {
|
|
|
2007
2114
|
}
|
|
2008
2115
|
return e;
|
|
2009
2116
|
}
|
|
2010
|
-
var
|
|
2117
|
+
var ks, Cs = "workbook.activeSheet", vs = class e extends Ue {
|
|
2011
2118
|
constructor(e, t, s, r) {
|
|
2012
2119
|
super(e, t, r), this._workbook = s;
|
|
2013
2120
|
}
|
|
@@ -2018,24 +2125,24 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2018
2125
|
let r = this._options;
|
|
2019
2126
|
return s && (r = {
|
|
2020
2127
|
...this._options,
|
|
2021
|
-
getOptions:
|
|
2128
|
+
getOptions: Y(this._options?.getOptions, s)
|
|
2022
2129
|
}), new e(t, this._internal, this._workbook, r);
|
|
2023
2130
|
}
|
|
2024
2131
|
_createRange(e, t) {
|
|
2025
|
-
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope,
|
|
2026
|
-
if (i && !i.sheet.isIWorksheet) throw new
|
|
2132
|
+
const s = e ? { ...e } : null, r = this._workbook, i = s ? r._getSheetRef(s.scope, ve.Visibility.VeryHidden) : null;
|
|
2133
|
+
if (i && !i.sheet.isIWorksheet) throw new f(fs(i.name, i.sheet.getKind()));
|
|
2027
2134
|
if (!i) {
|
|
2028
2135
|
const e = r._anchorWorksheet();
|
|
2029
|
-
return delete s?.scope,
|
|
2030
|
-
scope:
|
|
2136
|
+
return delete s?.scope, Ss(s, s ? {
|
|
2137
|
+
scope: Ie,
|
|
2031
2138
|
...e.getEntireRange().getCoords()
|
|
2032
2139
|
} : null);
|
|
2033
2140
|
}
|
|
2034
2141
|
let o = this._options;
|
|
2035
2142
|
return t && (o = {
|
|
2036
2143
|
...this._options,
|
|
2037
|
-
getOptions:
|
|
2038
|
-
}), new
|
|
2144
|
+
getOptions: Y(this._options.getOptions, t)
|
|
2145
|
+
}), new Is(e, re(i.sheet), this._workbook, o);
|
|
2039
2146
|
}
|
|
2040
2147
|
async select(e) {
|
|
2041
2148
|
const t = [];
|
|
@@ -2061,15 +2168,15 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2061
2168
|
}
|
|
2062
2169
|
getAddress(e) {
|
|
2063
2170
|
const t = this._internal.getSheet(), s = t.getEntireRange().getCoords();
|
|
2064
|
-
return
|
|
2171
|
+
return ce(this.getCoords(), {
|
|
2065
2172
|
...s,
|
|
2066
2173
|
scope: t.getName()
|
|
2067
|
-
},
|
|
2174
|
+
}, fe, ze, e);
|
|
2068
2175
|
}
|
|
2069
2176
|
toString() {
|
|
2070
2177
|
return this.getAddress();
|
|
2071
2178
|
}
|
|
2072
|
-
},
|
|
2179
|
+
}, Is = class e extends $ {
|
|
2073
2180
|
constructor(e, t, s, r) {
|
|
2074
2181
|
super(e, t, r), this._workbook = s;
|
|
2075
2182
|
}
|
|
@@ -2077,17 +2184,17 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2077
2184
|
let s = this._options;
|
|
2078
2185
|
return t && (s = {
|
|
2079
2186
|
...this._options,
|
|
2080
|
-
getOptions:
|
|
2081
|
-
}), new
|
|
2187
|
+
getOptions: Y(this._options?.getOptions, t)
|
|
2188
|
+
}), new vs(e, this._internal, this._workbook, s);
|
|
2082
2189
|
}
|
|
2083
2190
|
_createRange(t, s) {
|
|
2084
2191
|
const r = this._internal;
|
|
2085
|
-
if (!t) return
|
|
2086
|
-
if (r.validateCoords(t), r.getSheet().isClosed()) return
|
|
2192
|
+
if (!t) return be(r.getSheet(), r.getSheet().getEntireCoords());
|
|
2193
|
+
if (r.validateCoords(t), r.getSheet().isClosed()) return be(null, r.getSheet().getEntireCoords(), t);
|
|
2087
2194
|
let i = this._options;
|
|
2088
2195
|
return s && (i = {
|
|
2089
2196
|
...this._options,
|
|
2090
|
-
getOptions:
|
|
2197
|
+
getOptions: Y(this._options?.getOptions, s)
|
|
2091
2198
|
}), new e(t, this._internal, this._workbook, i);
|
|
2092
2199
|
}
|
|
2093
2200
|
addListener(e, t) {
|
|
@@ -2100,7 +2207,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2100
2207
|
}
|
|
2101
2208
|
getAddress(e) {
|
|
2102
2209
|
const t = this._internal.getSheet(), s = t?.getEntireRange().getCoords() ?? null;
|
|
2103
|
-
return
|
|
2210
|
+
return fe(this.getCoords(), {
|
|
2104
2211
|
...s,
|
|
2105
2212
|
scope: t.getName()
|
|
2106
2213
|
});
|
|
@@ -2108,15 +2215,15 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2108
2215
|
toString() {
|
|
2109
2216
|
return this.getAddress();
|
|
2110
2217
|
}
|
|
2111
|
-
},
|
|
2218
|
+
}, Rs = (e) => !!e && "object" == typeof e && "function" == typeof e.getOrigin, Ns = class {
|
|
2112
2219
|
constructor(t) {
|
|
2113
|
-
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 Ve(() => {
|
|
2114
2221
|
const e = [];
|
|
2115
|
-
for (const t of this.getWorksheets()) e.push(...t.getPivotTables());
|
|
2222
|
+
for (const t of this.getWorksheets().getItems({ visibility: ve.Visibility.VeryHidden })) e.push(...t.getPivotTables());
|
|
2116
2223
|
return e;
|
|
2117
|
-
}), this._people = new
|
|
2224
|
+
}, (e, t) => this.doBatch(e, t)), this._people = new Jt(), this._commentCollection = new X(null, (e, t, s) => {
|
|
2118
2225
|
const r = [];
|
|
2119
|
-
for (const i of this.getWorksheets()) r.push(...i.getComments().getItems(e ? {
|
|
2226
|
+
for (const i of this.getWorksheets().getItems({ visibility: ve.Visibility.VeryHidden })) r.push(...i.getComments().getItems(e ? {
|
|
2120
2227
|
address: e,
|
|
2121
2228
|
ignoreHidden: t,
|
|
2122
2229
|
fullyContained: s
|
|
@@ -2127,25 +2234,25 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2127
2234
|
return r;
|
|
2128
2235
|
}, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
|
|
2129
2236
|
e.onCollectionChange(this._commentCollection);
|
|
2130
|
-
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new
|
|
2237
|
+
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._hiddenPivotFieldList = !1, this._documentProperties = new us(() => {
|
|
2131
2238
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2132
2239
|
}), this._locale = null, this._localeOverrides = null, this._startModules = /* @__PURE__ */ new WeakSet();
|
|
2133
2240
|
const s = "string" == typeof t ? { origin: t } : { ...t }, r = s.origin;
|
|
2134
|
-
this._ownOriginProvider = !
|
|
2241
|
+
this._ownOriginProvider = !Rs(r), this._originProvider = Rs(r) ? r : new _t("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() });
|
|
2135
2242
|
const i = s.json;
|
|
2136
|
-
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 q("Workbook Runtime", {
|
|
2137
2244
|
isDate1904: () => this._isDate1904,
|
|
2138
2245
|
getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
|
|
2139
|
-
getLocale: () => this._locale ??
|
|
2246
|
+
getLocale: () => this._locale ?? ae() ?? Ye(),
|
|
2140
2247
|
getLocaleOverrides: () => this._localeOverrides
|
|
2141
2248
|
}), this._listenerLanguage = o.addChangeListener(() => {
|
|
2142
2249
|
this._closed || this._notifyAllChange();
|
|
2143
2250
|
});
|
|
2144
2251
|
const n = this, a = this._beginCommit({ description: _(i ? "op.openWorkbook" : "op.newWorkbook") });
|
|
2145
2252
|
try {
|
|
2146
|
-
this._strings = s.strings ?? new
|
|
2253
|
+
this._strings = s.strings ?? new _e(), this._ownStrings = !s.strings, this._richValues = s.richData ?? new de(), this._resources = s.resources ?? new Xe(), this._ownResources = !s.resources, this._fetch = new es(this._resources, s.fetcher ?? new Xt()), this._createSheetName = s.createSheetNameCallback ?? ys;
|
|
2147
2254
|
let t = s.createWorksheetCallback;
|
|
2148
|
-
t || (t = (e) => new
|
|
2255
|
+
t || (t = (e) => new Ze(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) => {
|
|
2149
2256
|
let h = null;
|
|
2150
2257
|
const c = {
|
|
2151
2258
|
runtime: n._runtime,
|
|
@@ -2166,7 +2273,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2166
2273
|
h = t, n._addSheetRef({
|
|
2167
2274
|
name: s,
|
|
2168
2275
|
id: e,
|
|
2169
|
-
visibility: r ??
|
|
2276
|
+
visibility: r ?? ve.Visibility.Visible,
|
|
2170
2277
|
sheetId: o,
|
|
2171
2278
|
sheet: t
|
|
2172
2279
|
}, i);
|
|
@@ -2183,7 +2290,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2183
2290
|
},
|
|
2184
2291
|
getVisibility: () => {
|
|
2185
2292
|
const e = n._getSheetRef(h);
|
|
2186
|
-
return e ? e.visibility :
|
|
2293
|
+
return e ? e.visibility : ve.Visibility.Visible;
|
|
2187
2294
|
},
|
|
2188
2295
|
setVisibility: (e, t) => {
|
|
2189
2296
|
n._setSheetVisibility(h, e, t);
|
|
@@ -2194,10 +2301,10 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2194
2301
|
duplicate: () => n._duplicateSheet(h),
|
|
2195
2302
|
getIndex: () => {
|
|
2196
2303
|
const e = n._getSheetRef(h);
|
|
2197
|
-
return e ? n._getOffsetForId(e.id, n._getSheetRefs(
|
|
2304
|
+
return e ? n._getOffsetForId(e.id, n._getSheetRefs(ve.Visibility.VeryHidden)) : i;
|
|
2198
2305
|
},
|
|
2199
2306
|
setIndex: (e, t) => {
|
|
2200
|
-
const s = n._getSheetRef(h,
|
|
2307
|
+
const s = n._getSheetRef(h, ve.Visibility.VeryHidden);
|
|
2201
2308
|
return !!s && (n._moveSheet(s, e, t), !0);
|
|
2202
2309
|
},
|
|
2203
2310
|
setIndexCallback: (t) => {
|
|
@@ -2207,16 +2314,16 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2207
2314
|
}
|
|
2208
2315
|
};
|
|
2209
2316
|
return a && (c.json = a), void 0 !== l && (c.uid = () => l), h = t(c, s, i, r), h;
|
|
2210
|
-
}, this._namedTableSource = new
|
|
2211
|
-
getSheets: () => n._sheets ? n.getWorksheets().getItems() : c.EmptyArray,
|
|
2317
|
+
}, this._namedTableSource = new Me({
|
|
2318
|
+
getSheets: () => n._sheets ? n.getWorksheets().getItems({ visibility: ve.Visibility.VeryHidden }) : c.EmptyArray,
|
|
2212
2319
|
addSheetsListener: (e, t) => n.addListeners({ onSheetsChange: e }, t)
|
|
2213
|
-
}), this._names = s.names ?? new
|
|
2320
|
+
}), this._names = s.names ?? new ue({
|
|
2214
2321
|
addressToRanges: (e) => n.getRanges(e),
|
|
2215
2322
|
getCurrentScope: () => n.getSelectedWorksheet()?.getName() ?? null,
|
|
2216
2323
|
isReadOnly: () => (n._options.readonly ?? !1) || n._isStructureProtected(),
|
|
2217
2324
|
transactions: n._transactions,
|
|
2218
2325
|
getSources: () => n._calculation ? [n._calculation.getNamedFormulas(), n._namedTableSource] : c.EmptyArray
|
|
2219
|
-
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new
|
|
2326
|
+
}), this._ownNames = !s.names, this._calculation = s.calculation ?? new Qe({
|
|
2220
2327
|
runtime: n._runtime,
|
|
2221
2328
|
functions: s.functions,
|
|
2222
2329
|
json: i?.calc,
|
|
@@ -2235,19 +2342,19 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2235
2342
|
getSheetIndex: (e) => {
|
|
2236
2343
|
if (void 0 === e) {
|
|
2237
2344
|
const e = n.getSelectedSheet();
|
|
2238
|
-
return e ? this._getSheetRefs(
|
|
2345
|
+
return e ? this._getSheetRefs(ve.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
|
|
2239
2346
|
}
|
|
2240
|
-
const t = this._getSheetRefs(
|
|
2347
|
+
const t = this._getSheetRefs(ve.Visibility.VeryHidden);
|
|
2241
2348
|
e = e.toLowerCase();
|
|
2242
2349
|
const s = t.length;
|
|
2243
2350
|
for (let r = 0; r < s; r++) if (t[r].name.toLowerCase() === e) return r;
|
|
2244
2351
|
try {
|
|
2245
|
-
|
|
2246
|
-
const t = this._names.getItems(
|
|
2352
|
+
Os.address = e;
|
|
2353
|
+
const t = this._names.getItems(Os);
|
|
2247
2354
|
if (!t || 0 === t.length) return -1;
|
|
2248
2355
|
let s = (t[0].getRanges?.()?.getCoords()?.[0])?.scope;
|
|
2249
2356
|
if (!s) return -1;
|
|
2250
|
-
const r = this._getSheetRefs(
|
|
2357
|
+
const r = this._getSheetRefs(ve.Visibility.VeryHidden);
|
|
2251
2358
|
s = s.toLowerCase();
|
|
2252
2359
|
const i = r.length;
|
|
2253
2360
|
for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === s) return e;
|
|
@@ -2256,7 +2363,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2256
2363
|
}
|
|
2257
2364
|
return -1;
|
|
2258
2365
|
},
|
|
2259
|
-
getSheetCount: () => n._getSheetRefs(
|
|
2366
|
+
getSheetCount: () => n._getSheetRefs(ve.Visibility.VeryHidden).length,
|
|
2260
2367
|
externalBooks: i?.externalBooks,
|
|
2261
2368
|
externalBookResolver: s.externalBookResolver,
|
|
2262
2369
|
namedCollection: n._names,
|
|
@@ -2266,7 +2373,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2266
2373
|
},
|
|
2267
2374
|
fetch: (e, t) => n._fetch.fetch(e, t),
|
|
2268
2375
|
parseText: (t, s) => (async (t, s, r) => {
|
|
2269
|
-
const i = await import("./
|
|
2376
|
+
const i = await import("./nmB0nnkFQf5NWo0i.js").then((t) => e(t.default, 1)), o = (i.default ?? i).parse(s, {
|
|
2270
2377
|
delimiter: r?.delimiter ?? ",",
|
|
2271
2378
|
skipEmptyLines: !1
|
|
2272
2379
|
}).data;
|
|
@@ -2280,7 +2387,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2280
2387
|
const s = o[e], r = new Array(l);
|
|
2281
2388
|
for (let e = 0; e < l; e++) {
|
|
2282
2389
|
const i = s[e];
|
|
2283
|
-
r[e] = void 0 === i || "" === i ? null :
|
|
2390
|
+
r[e] = void 0 === i || "" === i ? null : Ee(t, i).value;
|
|
2284
2391
|
}
|
|
2285
2392
|
h[e] = r;
|
|
2286
2393
|
}
|
|
@@ -2292,7 +2399,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2292
2399
|
}), this._ownCalculation = !s.calculation, this._scripts = this._createScripts(i?.modules), this._ownNames = !s.names, this._options = Object.freeze({ ...s });
|
|
2293
2400
|
const r = i?.sheets?.length ? i.sheets.map((e) => e.name) : [this._createSheetName(0)], o = r.map((e) => e + "-" + c.uuidV4()), l = (e) => {
|
|
2294
2401
|
const t = i?.sheets?.[e]?.kind;
|
|
2295
|
-
return !!t && t !==
|
|
2402
|
+
return !!t && t !== ve.Kind.Worksheet;
|
|
2296
2403
|
};
|
|
2297
2404
|
this._calculation._setSheets(r.map((e, t) => l(t) ? [
|
|
2298
2405
|
o[t],
|
|
@@ -2303,16 +2410,19 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2303
2410
|
let u = !1;
|
|
2304
2411
|
const d = (async () => {
|
|
2305
2412
|
try {
|
|
2306
|
-
if (this._ownCalculation && "none" !== h
|
|
2413
|
+
if (this._ownCalculation && "none" !== h) {
|
|
2414
|
+
if ("full" === h || "auto" === h && !0 === i?.calc?.fullCalcOnLoad ? await this._calculation._calculateForLoad() : await this._calculation.start(), this._closed) return;
|
|
2415
|
+
if (await this._refreshPivotCachesOnLoad(), this._closed) return;
|
|
2416
|
+
}
|
|
2307
2417
|
await this._scripts.start();
|
|
2308
2418
|
} finally {
|
|
2309
2419
|
u = !0, this._starting = null;
|
|
2310
2420
|
}
|
|
2311
2421
|
})();
|
|
2312
|
-
u || (this._starting = d), this._starting?.catch(() => {}), i ? this._fromJSON(i, o) : (this._initState(), this._addSheet(!1, r[0], null, o[0])), this._sheets = new
|
|
2422
|
+
u || (this._starting = d), this._starting?.catch(() => {}), i ? this._fromJSON(i, o) : (this._initState(), this._addSheet(!1, r[0], null, o[0])), this._sheets = new ms((e) => n._addSheetOptions(e), (e, t) => {
|
|
2313
2423
|
if (e) {
|
|
2314
2424
|
const s = this._getSheetRef(e, t);
|
|
2315
|
-
return s &&
|
|
2425
|
+
return s && xs(s) ? [s.sheet] : c.EmptyArray;
|
|
2316
2426
|
}
|
|
2317
2427
|
return this._getWorksheets(t);
|
|
2318
2428
|
}, (e, t) => {
|
|
@@ -2325,7 +2435,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2325
2435
|
r(n._sheets);
|
|
2326
2436
|
} : void 0
|
|
2327
2437
|
}, t);
|
|
2328
|
-
}, () => n.getSelectedWorksheet()), this._ownCalculation && "none" !== (s.calcOnLoad ?? "auto") && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? a.amend() : a.commit();
|
|
2438
|
+
}, () => n.getSelectedWorksheet()), this._ownCalculation && "none" !== (s.calcOnLoad ?? "auto") && (this._calculation.hydrateNames(), this._holdPivotCaches()), this._emitter.notify("onLoad"), this._ownTransactions ? a.amend() : a.commit();
|
|
2329
2439
|
} catch (e) {
|
|
2330
2440
|
throw a.rollback(), e;
|
|
2331
2441
|
}
|
|
@@ -2335,13 +2445,13 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2335
2445
|
let e = this._getSheetRefs();
|
|
2336
2446
|
for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
|
|
2337
2447
|
const t = this._options;
|
|
2338
|
-
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 ie().getDefaultTheme(), this._styles = t?.styles ?? new je(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) => {
|
|
2339
2449
|
s._emitter.notify("onProtectionChange");
|
|
2340
2450
|
} });
|
|
2341
2451
|
const s = this;
|
|
2342
2452
|
this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
|
|
2343
2453
|
async onAfterStateChange(e, t, r, i, o) {
|
|
2344
|
-
const n = s._view, a = o?.[
|
|
2454
|
+
const n = s._view, a = o?.[Cs], l = r ? a?.before : a?.after, h = a?.viewId === n.getId() && null != l, c = h ? l : n.getActiveSheetId(), u = h && t.getId() === s._lastTransactionUUID ? s._getSheetRef({ id: c }) : null;
|
|
2345
2455
|
u ? await u.sheet.select() : s._resyncActiveSheet(c, e), s._lastTransactionUUID = t.getId(), (r || i) && s._emitter.notify("onSheetsChange"), s._emitter.notify("onSelectedSheetChange"), s._emitter.notify("onViewChange");
|
|
2346
2456
|
},
|
|
2347
2457
|
onRestoreOrRevert() {
|
|
@@ -2362,7 +2472,8 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2362
2472
|
refsByInstance: /* @__PURE__ */ new Map(),
|
|
2363
2473
|
lastId: -1,
|
|
2364
2474
|
sheetsCreated: /* @__PURE__ */ new Set(),
|
|
2365
|
-
listenersSheets: /* @__PURE__ */ new Map()
|
|
2475
|
+
listenersSheets: /* @__PURE__ */ new Map(),
|
|
2476
|
+
pivotCacheData: /* @__PURE__ */ new Map()
|
|
2366
2477
|
});
|
|
2367
2478
|
}
|
|
2368
2479
|
getId() {
|
|
@@ -2397,7 +2508,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2397
2508
|
}
|
|
2398
2509
|
setView(e) {
|
|
2399
2510
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2400
|
-
if (!e) throw new
|
|
2511
|
+
if (!e) throw new f(g("error.sheet.emptyView"));
|
|
2401
2512
|
this._listenerWorkbookView?.();
|
|
2402
2513
|
const t = this;
|
|
2403
2514
|
let s = -1;
|
|
@@ -2452,10 +2563,10 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2452
2563
|
return this._transactions;
|
|
2453
2564
|
}
|
|
2454
2565
|
getChanges(e) {
|
|
2455
|
-
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: ve.Visibility.VeryHidden });
|
|
2456
2567
|
for (let e = 0; e < o.length; e++) {
|
|
2457
2568
|
const t = o[e];
|
|
2458
|
-
t instanceof
|
|
2569
|
+
t instanceof Ze && i.push(...t._changeEventsOf(s, r ?? null));
|
|
2459
2570
|
}
|
|
2460
2571
|
return i;
|
|
2461
2572
|
}
|
|
@@ -2486,7 +2597,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2486
2597
|
}
|
|
2487
2598
|
setTheme(e) {
|
|
2488
2599
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2489
|
-
if (!e) throw new
|
|
2600
|
+
if (!e) throw new f(g("error.workbook.notSetValue"));
|
|
2490
2601
|
const t = this._theme;
|
|
2491
2602
|
return this._theme = e, this.getStyles().setTheme(e), this._emitter.notify("onThemeChange"), t;
|
|
2492
2603
|
}
|
|
@@ -2499,7 +2610,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2499
2610
|
}
|
|
2500
2611
|
getSelectedWorksheet() {
|
|
2501
2612
|
const e = this._getSheetRef(this.getSelectedSheetIndex());
|
|
2502
|
-
return e &&
|
|
2613
|
+
return e && xs(e) ? e.sheet : null;
|
|
2503
2614
|
}
|
|
2504
2615
|
getActiveSheet() {
|
|
2505
2616
|
return this.getSelectedWorksheet();
|
|
@@ -2508,7 +2619,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2508
2619
|
return this.getSelectedWorksheet();
|
|
2509
2620
|
}
|
|
2510
2621
|
getSheets(e) {
|
|
2511
|
-
const t = this._getSheetRefs(e?.visibility ??
|
|
2622
|
+
const t = this._getSheetRefs(e?.visibility ?? ve.Visibility.Visible), s = new Array(t.length);
|
|
2512
2623
|
for (let e = 0; e < t.length; e++) s[e] = t[e].sheet;
|
|
2513
2624
|
return s;
|
|
2514
2625
|
}
|
|
@@ -2516,19 +2627,19 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2516
2627
|
if (void 0 === e) return this.getSelectedSheet();
|
|
2517
2628
|
if (!e) throw new Error(g("error.workbook.sheetNameNotProvided"));
|
|
2518
2629
|
const t = this._getSheetRef(e);
|
|
2519
|
-
if (!t) throw new a(
|
|
2630
|
+
if (!t) throw new a(gs(e));
|
|
2520
2631
|
return t.sheet;
|
|
2521
2632
|
}
|
|
2522
|
-
getWorksheet(e, t =
|
|
2633
|
+
getWorksheet(e, t = ve.Visibility.Visible) {
|
|
2523
2634
|
if ("number" == typeof e) return this.getWorksheetAt(e, t);
|
|
2524
2635
|
if (void 0 === e) return this._requireSelectedWorksheet();
|
|
2525
2636
|
if (!e) throw new Error(g("error.workbook.sheetNameNotProvided"));
|
|
2526
2637
|
const s = this._getSheetRef(e, t);
|
|
2527
|
-
if (!s) throw new a(
|
|
2528
|
-
if (!
|
|
2638
|
+
if (!s) throw new a(gs(e));
|
|
2639
|
+
if (!xs(s)) throw new a(fs(s.name, s.sheet.getKind()));
|
|
2529
2640
|
return s.sheet;
|
|
2530
2641
|
}
|
|
2531
|
-
getWorksheetAt(e, t =
|
|
2642
|
+
getWorksheetAt(e, t = ve.Visibility.Visible) {
|
|
2532
2643
|
const s = this._getWorksheets(t)[e];
|
|
2533
2644
|
if (!s) throw new a(function(e) {
|
|
2534
2645
|
return g("error.workbook.sheetIndexNotFound", { index: e });
|
|
@@ -2539,10 +2650,10 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2539
2650
|
const e = this.getSelectedWorksheet();
|
|
2540
2651
|
if (e) return e;
|
|
2541
2652
|
const t = this.getSelectedSheet();
|
|
2542
|
-
throw new
|
|
2653
|
+
throw new f(_s(t?.getName() ?? "", t?.getKind() ?? ve.Kind.Worksheet));
|
|
2543
2654
|
}
|
|
2544
2655
|
_anchorWorksheet() {
|
|
2545
|
-
return this.getSelectedWorksheet() || (this._getWorksheets(
|
|
2656
|
+
return this.getSelectedWorksheet() || (this._getWorksheets(ve.Visibility.VeryHidden)[0] ?? null);
|
|
2546
2657
|
}
|
|
2547
2658
|
getWorksheets() {
|
|
2548
2659
|
return this._sheets;
|
|
@@ -2550,35 +2661,35 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2550
2661
|
addWorksheet(e) {
|
|
2551
2662
|
return this.getWorksheets().add(e);
|
|
2552
2663
|
}
|
|
2553
|
-
_getWorksheets(e =
|
|
2664
|
+
_getWorksheets(e = ve.Visibility.Visible) {
|
|
2554
2665
|
const t = this._getSheetRefs(e), s = [], r = t.length;
|
|
2555
2666
|
for (let e = 0; e < r; e++) {
|
|
2556
2667
|
const r = t[e];
|
|
2557
|
-
|
|
2668
|
+
xs(r) && s.push(r.sheet);
|
|
2558
2669
|
}
|
|
2559
2670
|
return s;
|
|
2560
2671
|
}
|
|
2561
|
-
_getSheetRefs(e =
|
|
2672
|
+
_getSheetRefs(e = ve.Visibility.Visible) {
|
|
2562
2673
|
const t = this._getState();
|
|
2563
|
-
return t ? e ===
|
|
2674
|
+
return t ? e === ve.Visibility.Visible ? t.sheetRefsVisible : e === ve.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === ve.Visibility.VeryHidden ? t.sheetRefsAll : c.EmptyArray : [];
|
|
2564
2675
|
}
|
|
2565
|
-
_getSheetRef(e, t =
|
|
2676
|
+
_getSheetRef(e, t = ve.Visibility.Visible) {
|
|
2566
2677
|
let s = null;
|
|
2567
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);
|
|
2568
2679
|
}
|
|
2569
2680
|
_validateNewSheetName(e, t = !0) {
|
|
2570
2681
|
if (null == e) return e;
|
|
2571
|
-
if (
|
|
2682
|
+
if (bs(e), t && this._getState().sheetsByLowerCaseName.has(e.toLowerCase())) throw new f(g("error.workbook.nameTaken"));
|
|
2572
2683
|
return e.substring(0, 31);
|
|
2573
2684
|
}
|
|
2574
2685
|
findValidSheetName(e) {
|
|
2575
|
-
e && (e =
|
|
2686
|
+
e && (e = bs(e, !0));
|
|
2576
2687
|
try {
|
|
2577
2688
|
return function(e, t) {
|
|
2578
2689
|
try {
|
|
2579
2690
|
if (t(e)) return e;
|
|
2580
2691
|
} catch (e) {}
|
|
2581
|
-
let s, r, i =
|
|
2692
|
+
let s, r, i = ws.exec(e);
|
|
2582
2693
|
for (null !== i ? (s = e.substring(0, i.index), r = parseFloat(i[1])) : (s = e + " ", r = 1); r < 256;) {
|
|
2583
2694
|
r++;
|
|
2584
2695
|
const i = "(" + r + ")", o = s.substring(0, 31 - i.length) + i;
|
|
@@ -2593,7 +2704,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2593
2704
|
}
|
|
2594
2705
|
}
|
|
2595
2706
|
isValidSheetNameCharacter(e) {
|
|
2596
|
-
return !
|
|
2707
|
+
return !ps.test(e);
|
|
2597
2708
|
}
|
|
2598
2709
|
_isStructureProtected() {
|
|
2599
2710
|
return !this._initializing && !this.getProtection().isStructureAllowed();
|
|
@@ -2623,7 +2734,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2623
2734
|
_nextSheetName(e = null) {
|
|
2624
2735
|
let t = e ? e.toLowerCase() : null;
|
|
2625
2736
|
const s = this._getState(), r = s.sheetsByLowerCaseName;
|
|
2626
|
-
if (e && r.has(t)) throw new
|
|
2737
|
+
if (e && r.has(t)) throw new f(function(e) {
|
|
2627
2738
|
return g("error.workbook.nameDuplicate", { sheetName: e });
|
|
2628
2739
|
}(e));
|
|
2629
2740
|
t = (e = this._validateNewSheetName(e)) ? e.toLowerCase() : null;
|
|
@@ -2636,14 +2747,14 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2636
2747
|
}
|
|
2637
2748
|
_addSheet(e, t = null, s = null, r) {
|
|
2638
2749
|
t = this._nextSheetName(t);
|
|
2639
|
-
const i = this._getState(), o = this._createSheet(i.lastId, t,
|
|
2640
|
-
if (!o) throw new
|
|
2750
|
+
const i = this._getState(), o = this._createSheet(i.lastId, t, ve.Visibility.Visible, s, void 0, null, r);
|
|
2751
|
+
if (!o) throw new f(g("error.workbook.sheetNameBlank"));
|
|
2641
2752
|
return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), o;
|
|
2642
2753
|
}
|
|
2643
2754
|
_createOpaqueSheet(e, t, s, r, i, o, n, a, l) {
|
|
2644
2755
|
const h = this;
|
|
2645
2756
|
let u = null;
|
|
2646
|
-
return u = new
|
|
2757
|
+
return u = new is({
|
|
2647
2758
|
kind: o,
|
|
2648
2759
|
id: l ?? t + "-" + c.uuidV4(),
|
|
2649
2760
|
part: n,
|
|
@@ -2656,25 +2767,25 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2656
2767
|
setName: (e, t) => {
|
|
2657
2768
|
h._setSheetName(u, e, t);
|
|
2658
2769
|
},
|
|
2659
|
-
getVisibility: () => h._getSheetRef(u,
|
|
2770
|
+
getVisibility: () => h._getSheetRef(u, ve.Visibility.VeryHidden)?.visibility ?? ve.Visibility.Visible,
|
|
2660
2771
|
setVisibility: (e, t) => {
|
|
2661
2772
|
h._setSheetVisibility(u, e, t);
|
|
2662
2773
|
},
|
|
2663
2774
|
getIndex: () => {
|
|
2664
|
-
const e = h._getSheetRef(u,
|
|
2665
|
-
return e ? h._getOffsetForId(e.id, h._getSheetRefs(
|
|
2775
|
+
const e = h._getSheetRef(u, ve.Visibility.VeryHidden);
|
|
2776
|
+
return e ? h._getOffsetForId(e.id, h._getSheetRefs(ve.Visibility.VeryHidden)) : -1;
|
|
2666
2777
|
},
|
|
2667
2778
|
setIndex: (e, t) => {
|
|
2668
|
-
const s = h._getSheetRef(u,
|
|
2779
|
+
const s = h._getSheetRef(u, ve.Visibility.VeryHidden);
|
|
2669
2780
|
s && h._moveSheet(s, e, t);
|
|
2670
2781
|
},
|
|
2671
2782
|
requestSelect: () => h._requestSelect(u),
|
|
2672
|
-
isAttached: () => !!h._getSheetRef(u,
|
|
2783
|
+
isAttached: () => !!h._getSheetRef(u, ve.Visibility.VeryHidden)
|
|
2673
2784
|
}
|
|
2674
2785
|
}), this._sheetOnNameChange.set(e, () => u._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => u._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => u._notify("onIndexChange")), this._addSheetRef({
|
|
2675
2786
|
name: t,
|
|
2676
2787
|
id: e,
|
|
2677
|
-
visibility: s ??
|
|
2788
|
+
visibility: s ?? ve.Visibility.Visible,
|
|
2678
2789
|
sheetId: i,
|
|
2679
2790
|
sheet: u
|
|
2680
2791
|
}, r), u;
|
|
@@ -2690,7 +2801,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2690
2801
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2691
2802
|
if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
2692
2803
|
const s = e, r = [], i = [], o = s.length;
|
|
2693
|
-
for (let e = 0; e < o; e++) s[e].visibility ===
|
|
2804
|
+
for (let e = 0; e < o; e++) s[e].visibility === ve.Visibility.Visible ? (r.push(s[e]), i.push(s[e])) : s[e].visibility === ve.Visibility.Hidden && i.push(s[e]);
|
|
2694
2805
|
this._updateState({
|
|
2695
2806
|
sheetRefsAll: s,
|
|
2696
2807
|
sheetRefsVisible: r,
|
|
@@ -2700,7 +2811,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2700
2811
|
_tellSheets() {
|
|
2701
2812
|
if (this._isLoadingSheets) return;
|
|
2702
2813
|
const e = this._getState().sheetRefsAll;
|
|
2703
|
-
this._calculation._setSheets(e.map((e) =>
|
|
2814
|
+
this._calculation._setSheets(e.map((e) => xs(e) ? [e.sheet.getId(), e.name] : [
|
|
2704
2815
|
e.sheet.getId(),
|
|
2705
2816
|
e.name,
|
|
2706
2817
|
!0
|
|
@@ -2724,21 +2835,21 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2724
2835
|
u.set(e.id, n);
|
|
2725
2836
|
const d = new Map(s.sheetsByLowerCaseName);
|
|
2726
2837
|
d.set(a, n);
|
|
2727
|
-
const
|
|
2838
|
+
const f = this;
|
|
2728
2839
|
let _ = s.listenersSheets;
|
|
2729
2840
|
if (void 0 !== n) {
|
|
2730
2841
|
const t = n.addListeners({
|
|
2731
2842
|
onBeforeDelete: (e) => {
|
|
2732
|
-
|
|
2843
|
+
f._validateDeleteSheet(e);
|
|
2733
2844
|
},
|
|
2734
2845
|
onDelete(e) {
|
|
2735
|
-
let t =
|
|
2846
|
+
let t = f._getSheetRef(e, ve.Visibility.VeryHidden);
|
|
2736
2847
|
if (!t) return;
|
|
2737
|
-
const s =
|
|
2848
|
+
const s = f._beginCommit({ description: g("op.deleteSheet", { name: t.name }) });
|
|
2738
2849
|
try {
|
|
2739
|
-
const r =
|
|
2850
|
+
const r = f._getState(), i = r.sheetRefsAll, o = f._getOffsetForId(t.id, i);
|
|
2740
2851
|
let a = [...i];
|
|
2741
|
-
a.splice(o, 1),
|
|
2852
|
+
a.splice(o, 1), f._updateSheetRefStates(a);
|
|
2742
2853
|
const l = new Map(r.refsById);
|
|
2743
2854
|
l.delete(t.id);
|
|
2744
2855
|
const h = new Map(r.sheetsById);
|
|
@@ -2750,24 +2861,24 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2750
2861
|
const g = new Map(r.refsByInstance);
|
|
2751
2862
|
g.delete(e), r.listenersSheets.get(t.id)();
|
|
2752
2863
|
const _ = new Map(r.listenersSheets);
|
|
2753
|
-
_.delete(t.id),
|
|
2754
|
-
const
|
|
2755
|
-
|
|
2864
|
+
_.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");
|
|
2865
|
+
const m = new Set(r.sheetsCreated);
|
|
2866
|
+
m.has(n) && m.delete(n), f._updateState({
|
|
2756
2867
|
refsById: l,
|
|
2757
2868
|
sheetsById: h,
|
|
2758
2869
|
refsByLowerCaseName: u,
|
|
2759
2870
|
sheetsByLowerCaseName: d,
|
|
2760
2871
|
refsByInstance: g,
|
|
2761
|
-
sheetsCreated:
|
|
2872
|
+
sheetsCreated: m,
|
|
2762
2873
|
listenersSheets: _
|
|
2763
2874
|
}), s.commit();
|
|
2764
2875
|
} catch (e) {
|
|
2765
2876
|
throw s.rollback(), e;
|
|
2766
2877
|
}
|
|
2767
2878
|
}
|
|
2768
|
-
}, { transactional: !0 }), r =
|
|
2769
|
-
|
|
2770
|
-
source:
|
|
2879
|
+
}, { transactional: !0 }), r = xs(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
|
|
2880
|
+
f.getView().getActiveSheetId() === f._getSheetRef(e)?.id && f._emitter.notify("onSelectionChange", {
|
|
2881
|
+
source: f,
|
|
2771
2882
|
params: e
|
|
2772
2883
|
});
|
|
2773
2884
|
} }, { transactional: !1 }) : null, i = () => {
|
|
@@ -2775,8 +2886,8 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2775
2886
|
};
|
|
2776
2887
|
_ = new Map(s.listenersSheets), _.set(e.id, i);
|
|
2777
2888
|
}
|
|
2778
|
-
let
|
|
2779
|
-
-1 !==
|
|
2889
|
+
let m = s.lastId;
|
|
2890
|
+
-1 !== m && (m = Math.max(m, e.id)), this._updateState({ lastId: m }), this._updateState({
|
|
2780
2891
|
refsById: l,
|
|
2781
2892
|
refsByLowerCaseName: h,
|
|
2782
2893
|
refsByInstance: c,
|
|
@@ -2789,7 +2900,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2789
2900
|
}
|
|
2790
2901
|
_recordActiveSheet(e, t, s) {
|
|
2791
2902
|
const r = this.getView().getId();
|
|
2792
|
-
e.setIntent(
|
|
2903
|
+
e.setIntent(Cs, (e) => ({
|
|
2793
2904
|
viewId: r,
|
|
2794
2905
|
before: e?.before ?? t,
|
|
2795
2906
|
after: s
|
|
@@ -2821,27 +2932,27 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2821
2932
|
let s = this._view.getActiveSheetId();
|
|
2822
2933
|
s ?? (this._view.setActiveSheetId(t), s = t);
|
|
2823
2934
|
let r = e.refsById.get(s);
|
|
2824
|
-
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility ===
|
|
2935
|
+
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), s = t), r.visibility === ve.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(s, e.sheetRefsVisible));
|
|
2825
2936
|
}
|
|
2826
2937
|
_validateDeleteSheet(e) {
|
|
2827
2938
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2828
2939
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
2829
2940
|
let s = this._getSheetRef(e);
|
|
2830
|
-
if (!s) throw new
|
|
2941
|
+
if (!s) throw new f(function(e) {
|
|
2831
2942
|
return g("error.workbook.deleteKey", { key: e });
|
|
2832
2943
|
}(e));
|
|
2833
2944
|
const r = this._getState().sheetRefsVisible;
|
|
2834
|
-
if (1 === r.length && r[0].id === s.id) throw new
|
|
2945
|
+
if (1 === r.length && r[0].id === s.id) throw new f(g("error.workbook.sheetOne"));
|
|
2835
2946
|
}
|
|
2836
2947
|
_getOffsetForId(e, t) {
|
|
2837
2948
|
const s = t.length;
|
|
2838
2949
|
for (let r = 0; r < s; r++) if (t[r].id === e) return r;
|
|
2839
|
-
throw new
|
|
2950
|
+
throw new f(g("error.workbook.noVisibleRefs"));
|
|
2840
2951
|
}
|
|
2841
2952
|
find(e) {
|
|
2842
2953
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
2843
2954
|
const t = this._getWorksheets();
|
|
2844
|
-
if (0 === t.length) return { next: () =>
|
|
2955
|
+
if (0 === t.length) return { next: () => it };
|
|
2845
2956
|
if (1 === t.length) return t[0].find(e);
|
|
2846
2957
|
"string" == typeof e && (e = { text: e });
|
|
2847
2958
|
const s = !e?.reverse;
|
|
@@ -2860,7 +2971,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2860
2971
|
rowIndex: t[0].rowStart
|
|
2861
2972
|
};
|
|
2862
2973
|
}
|
|
2863
|
-
const
|
|
2974
|
+
const f = d.createCellComparator(e?.axis, e?.reverse);
|
|
2864
2975
|
delete (e = { ...e }).from;
|
|
2865
2976
|
const _ = () => {
|
|
2866
2977
|
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)) {
|
|
@@ -2868,9 +2979,9 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2868
2979
|
const s = c;
|
|
2869
2980
|
return c = h.next(), s;
|
|
2870
2981
|
}
|
|
2871
|
-
if (!u && a && o === i && (c.done || !l || !c.done &&
|
|
2982
|
+
if (!u && a && o === i && (c.done || !l || !c.done && f(c.value.getCoords(), l) >= 0) && (u = !0), u) {
|
|
2872
2983
|
const e = c;
|
|
2873
|
-
return c =
|
|
2984
|
+
return c = it, e;
|
|
2874
2985
|
}
|
|
2875
2986
|
const d = c;
|
|
2876
2987
|
return c = h.next(), d;
|
|
@@ -2885,19 +2996,19 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2885
2996
|
let r = 0, i = null;
|
|
2886
2997
|
const o = "function" == typeof t, n = s?.maxCount ?? Number.MAX_SAFE_INTEGER, a = !s?.maxCount;
|
|
2887
2998
|
let l = "";
|
|
2888
|
-
const h = "string" == typeof t ?
|
|
2999
|
+
const h = "string" == typeof t ? We(t) : null;
|
|
2889
3000
|
let c = s?.description ?? _("op.replace");
|
|
2890
3001
|
const u = this._transactions.beginCommit({ description: c });
|
|
2891
3002
|
try {
|
|
2892
|
-
let c = null, d = null,
|
|
2893
|
-
for (; !
|
|
2894
|
-
const n =
|
|
3003
|
+
let c = null, d = null, f = e.next();
|
|
3004
|
+
for (; !f.done && r < n;) {
|
|
3005
|
+
const n = f.value, a = n.getWorksheet();
|
|
2895
3006
|
a !== c && (c = a, null !== d && d.apply(), d = c.getEntireRange().createSparseBuilder({
|
|
2896
3007
|
axis: s?.axis,
|
|
2897
3008
|
allowUnorderedWrites: !0
|
|
2898
3009
|
}));
|
|
2899
3010
|
const l = o ? t(n) : t;
|
|
2900
|
-
void 0 !== l && l !== n && (d.push(n, l), r++, i = n),
|
|
3011
|
+
void 0 !== l && l !== n && (d.push(n, l), r++, i = n), f = e.next();
|
|
2901
3012
|
}
|
|
2902
3013
|
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 }) : _("op.replaceAll") : l ? null !== h ? g("op.replaceAtWith", {
|
|
2903
3014
|
address: l,
|
|
@@ -2923,7 +3034,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2923
3034
|
const s = this._getSheetRefs(), r = s.length;
|
|
2924
3035
|
for (let i = 0; i < r; i++) {
|
|
2925
3036
|
const o = s[(e + i) % r];
|
|
2926
|
-
if (!
|
|
3037
|
+
if (!xs(o)) continue;
|
|
2927
3038
|
const n = t.indexOf(o.sheet);
|
|
2928
3039
|
if (-1 !== n) return n;
|
|
2929
3040
|
}
|
|
@@ -2945,96 +3056,96 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
2945
3056
|
const s = this._getSheetRefs(), r = this.getSelectedSheetIndex();
|
|
2946
3057
|
let i = null;
|
|
2947
3058
|
if (e) {
|
|
2948
|
-
if (i = this._getSheetRef(e), !i) throw new
|
|
3059
|
+
if (i = this._getSheetRef(e), !i) throw new f(ds(i));
|
|
2949
3060
|
} else i = s[r];
|
|
2950
3061
|
if (!i) return null;
|
|
2951
|
-
if (!
|
|
3062
|
+
if (!xs(i)) throw new f((o = i.name, g("error.workbook.sheetNotDuplicable", { sheetName: o })));
|
|
2952
3063
|
var o;
|
|
2953
|
-
const n = i.sheet, a = this._strings.beginPersist(),
|
|
2954
|
-
let
|
|
2955
|
-
const
|
|
3064
|
+
const n = i.sheet, a = s.indexOf(i), l = this._strings.beginPersist(), h = this.getResources().beginPersist(), c = this.getStyles().beginPersist(), u = this._richValues.beginPersist();
|
|
3065
|
+
let d = null;
|
|
3066
|
+
const _ = this.beginCommit(g("op.duplicateNamed", { name: n.getName() }));
|
|
2956
3067
|
try {
|
|
2957
|
-
const e = this._getState().refsByInstance.get(n), t = await n.toJSON(),
|
|
2958
|
-
this._tellSheets(), this._emitter.notify("onSheetsChange"),
|
|
3068
|
+
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);
|
|
3069
|
+
this._tellSheets(), this._emitter.notify("onSheetsChange"), d = o, _.commit();
|
|
2959
3070
|
} catch (e) {
|
|
2960
|
-
throw
|
|
3071
|
+
throw _.rollback(), e;
|
|
2961
3072
|
} finally {
|
|
2962
|
-
|
|
3073
|
+
u.endPersist(), c.endPersist(), h.endPersist(), l.endPersist();
|
|
2963
3074
|
}
|
|
2964
|
-
return
|
|
3075
|
+
return d;
|
|
2965
3076
|
}
|
|
2966
3077
|
_createRange(e, t) {
|
|
2967
|
-
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope,
|
|
2968
|
-
if (r && !
|
|
3078
|
+
const s = e ? { ...e } : null, r = s ? this._getSheetRef(s.scope, ve.Visibility.VeryHidden) : null;
|
|
3079
|
+
if (r && !xs(r)) throw new f(fs(r.name, r.sheet.getKind()));
|
|
2969
3080
|
if (!r) {
|
|
2970
3081
|
const e = this._anchorWorksheet();
|
|
2971
|
-
return e ? (delete s?.scope,
|
|
2972
|
-
scope:
|
|
3082
|
+
return e ? (delete s?.scope, Ss(s, s ? {
|
|
3083
|
+
scope: Ie,
|
|
2973
3084
|
...e.getEntireRange().getCoords()
|
|
2974
3085
|
} : null)) : void console.warn(g("error.workbook.noVisibleRefs"));
|
|
2975
3086
|
}
|
|
2976
3087
|
const i = r.sheet;
|
|
2977
3088
|
let o = null;
|
|
2978
|
-
return t && (o = { getOptions: t }), new
|
|
3089
|
+
return t && (o = { getOptions: t }), new Is(e, re(i), this, o);
|
|
2979
3090
|
}
|
|
2980
3091
|
_createRanges(e, t) {
|
|
2981
3092
|
const s = this._anchorWorksheet();
|
|
2982
|
-
if (!s) throw new
|
|
3093
|
+
if (!s) throw new f(_s("", ve.Kind.Worksheet));
|
|
2983
3094
|
let r = null;
|
|
2984
|
-
return t && (r = { getOptions: t }), new
|
|
3095
|
+
return t && (r = { getOptions: t }), new vs(e, re(s), this, r);
|
|
2985
3096
|
}
|
|
2986
3097
|
getRange(e, t) {
|
|
2987
3098
|
if (void 0 === e) return this.getSelectedRange(t);
|
|
2988
|
-
"number" == typeof e && (e =
|
|
3099
|
+
"number" == typeof e && (e = le(arguments), t = void 0);
|
|
2989
3100
|
try {
|
|
2990
3101
|
const s = this._rangesAddressToCoords(e);
|
|
2991
|
-
if (1 !== s.length) throw new
|
|
3102
|
+
if (1 !== s.length) throw new f(g("error.address.singleRangeOnlyAlt"));
|
|
2992
3103
|
return this._createRange(s[0], t);
|
|
2993
3104
|
} catch (t) {
|
|
2994
3105
|
if (t instanceof a) throw new a(t.message);
|
|
2995
|
-
throw new
|
|
3106
|
+
throw new f(t.message ?? te(e));
|
|
2996
3107
|
}
|
|
2997
3108
|
}
|
|
2998
3109
|
getCell(e) {
|
|
2999
3110
|
if (void 0 === e) return this.getSelectedCell();
|
|
3000
3111
|
const t = this.getRange(e);
|
|
3001
|
-
if (t.size > 1) throw new
|
|
3112
|
+
if (t.size > 1) throw new f(g("error.address.singleCellOnly"));
|
|
3002
3113
|
return t.getCell();
|
|
3003
3114
|
}
|
|
3004
3115
|
getRanges(e, t) {
|
|
3005
3116
|
const s = this._rangesAddressToCoords(e);
|
|
3006
|
-
if (0 === s.length) throw new
|
|
3117
|
+
if (0 === s.length) throw new f(te(e));
|
|
3007
3118
|
return this._createRanges(s, t);
|
|
3008
3119
|
}
|
|
3009
3120
|
_createGraphRanges(e, t) {
|
|
3010
3121
|
const s = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
|
|
3011
3122
|
for (let e = 0; e < t.length; e++) {
|
|
3012
|
-
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName,
|
|
3013
|
-
n && s.push(new
|
|
3123
|
+
const i = t[e], o = i.sheetName ? this._getSheetRef(i.sheetName, ve.Visibility.VeryHidden) : null, n = o && xs(o) ? o.sheet : this._anchorWorksheet();
|
|
3124
|
+
n && s.push(new we(i, r, re(n), null));
|
|
3014
3125
|
}
|
|
3015
3126
|
for (let t = 0; t < e.length; t++) s.push(e[t]);
|
|
3016
3127
|
const i = this._anchorWorksheet();
|
|
3017
|
-
return 0 !== s.length && i ? new
|
|
3128
|
+
return 0 !== s.length && i ? new vs(s, re(i), this, null) : null;
|
|
3018
3129
|
}
|
|
3019
3130
|
getAnomalies(e) {
|
|
3020
3131
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3021
|
-
const t =
|
|
3022
|
-
const t =
|
|
3132
|
+
const t = Re(e), s = this._getWorksheets(ve.Visibility.VeryHidden).map((e) => {
|
|
3133
|
+
const t = re(e);
|
|
3023
3134
|
return {
|
|
3024
3135
|
bounds: t.getSheet().getEntireCoords(),
|
|
3025
3136
|
internal: t,
|
|
3026
3137
|
qualified: !0
|
|
3027
3138
|
};
|
|
3028
3139
|
});
|
|
3029
|
-
return new
|
|
3140
|
+
return new Ce(s, () => (this.getSelectedWorksheet() ?? this._getWorksheets(ve.Visibility.VeryHidden)[0]).getEntireRange(), t);
|
|
3030
3141
|
}
|
|
3031
3142
|
getStats(e) {
|
|
3032
3143
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3033
|
-
const t = this._getWorksheets(
|
|
3144
|
+
const t = this._getWorksheets(ve.Visibility.VeryHidden), s = t.length;
|
|
3034
3145
|
if (1 === s) return t[0].getStats(e);
|
|
3035
3146
|
const r = new Array(s);
|
|
3036
3147
|
for (let i = 0; i < s; i++) r[i] = t[i].getStats(e);
|
|
3037
|
-
return new
|
|
3148
|
+
return new Mt(r);
|
|
3038
3149
|
}
|
|
3039
3150
|
_activeRangeCoords() {
|
|
3040
3151
|
const e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), s = e.getName(), r = t.length, i = new Array(r);
|
|
@@ -3059,8 +3170,8 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3059
3170
|
getSelectedCell() {
|
|
3060
3171
|
return this._requireSelectedWorksheet().getSelectedCell();
|
|
3061
3172
|
}
|
|
3062
|
-
_rangesAddressToCoords(e, t = !0, s =
|
|
3063
|
-
if (!e) throw new
|
|
3173
|
+
_rangesAddressToCoords(e, t = !0, s = ve.Visibility.Hidden) {
|
|
3174
|
+
if (!e) throw new f(g("error.address.noAddress"));
|
|
3064
3175
|
const r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
|
|
3065
3176
|
if (o && (i.scope = o), "string" == typeof e) {
|
|
3066
3177
|
const t = e.trim().toLowerCase();
|
|
@@ -3069,11 +3180,11 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3069
3180
|
"r" === t ? r.rowStart = r.rowEnd = s.rowIndex : r.colStart = r.colEnd = s.colIndex, e = r;
|
|
3070
3181
|
}
|
|
3071
3182
|
}
|
|
3072
|
-
const n = this, a =
|
|
3183
|
+
const n = this, a = J(e, i, he, (e) => {
|
|
3073
3184
|
if (!t) return null;
|
|
3074
3185
|
if ("string" == typeof e) {
|
|
3075
|
-
const t =
|
|
3076
|
-
getTable: (e) =>
|
|
3186
|
+
const t = Te(e, {
|
|
3187
|
+
getTable: (e) => Ne(n.getNames().getByName(e)),
|
|
3077
3188
|
getAnchor: () => r ? {
|
|
3078
3189
|
sheet: r,
|
|
3079
3190
|
coords: r.getSelectedCell().getCoords()
|
|
@@ -3083,16 +3194,16 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3083
3194
|
const s = n.getNames().getByName(e)?.getRanges?.();
|
|
3084
3195
|
if (s) return s.getCoords();
|
|
3085
3196
|
}
|
|
3086
|
-
throw new
|
|
3197
|
+
throw new f(`Invalid sheet reference '${e}'.`);
|
|
3087
3198
|
}), l = a.length;
|
|
3088
3199
|
for (let e = 0; e < l; e++) this._validateCoords(a[e], s);
|
|
3089
3200
|
return a;
|
|
3090
3201
|
}
|
|
3091
|
-
_validateCoords(e, t =
|
|
3202
|
+
_validateCoords(e, t = ve.Visibility.Visible, s = g("error.sheet.oobRange")) {
|
|
3092
3203
|
if (null === e) return;
|
|
3093
3204
|
const r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
|
|
3094
3205
|
if (!d.isRangeWithinRange(e, r)) throw new a(s);
|
|
3095
|
-
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new
|
|
3206
|
+
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new f(g("error.address.invalidRangeInverted"));
|
|
3096
3207
|
}
|
|
3097
3208
|
_updateSheetRef(e, t) {
|
|
3098
3209
|
const s = this._getState();
|
|
@@ -3117,9 +3228,9 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3117
3228
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3118
3229
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
3119
3230
|
const i = this._getSheetRef(e);
|
|
3120
|
-
if (!i) throw new
|
|
3231
|
+
if (!i) throw new f(ds(e));
|
|
3121
3232
|
if (s === i.name) return i.sheet;
|
|
3122
|
-
if (null == (s = this._validateNewSheetName(s))) throw new
|
|
3233
|
+
if (null == (s = this._validateNewSheetName(s))) throw new f(g("error.workbook.sheetNameNotProvided"));
|
|
3123
3234
|
const o = Object.freeze({
|
|
3124
3235
|
...i,
|
|
3125
3236
|
name: s
|
|
@@ -3136,24 +3247,24 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3136
3247
|
}
|
|
3137
3248
|
return n;
|
|
3138
3249
|
}
|
|
3139
|
-
_setSheetVisibility(e, s =
|
|
3250
|
+
_setSheetVisibility(e, s = ve.Visibility.Visible, r) {
|
|
3140
3251
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3141
3252
|
if (!this.getProtection().isStructureAllowed()) throw new t(g("error.workbook.protection"));
|
|
3142
|
-
const i = this._getSheetRef(e,
|
|
3253
|
+
const i = this._getSheetRef(e, ve.Visibility.VeryHidden);
|
|
3143
3254
|
if (!i) return null;
|
|
3144
3255
|
if (s === i.visibility) return;
|
|
3145
3256
|
let o = null, n = "";
|
|
3146
|
-
s ===
|
|
3257
|
+
s === ve.Visibility.Visible ? n = _("op.unhideSheet") : s === ve.Visibility.Hidden ? n = _("op.hideSheet") : s === ve.Visibility.VeryHidden && (n = _("op.veryHideSheet"));
|
|
3147
3258
|
const a = this.beginCommit(n);
|
|
3148
3259
|
try {
|
|
3149
3260
|
const e = this._getState().sheetRefsVisible;
|
|
3150
|
-
if (s !==
|
|
3261
|
+
if (s !== ve.Visibility.Visible && 1 === e.length && e[0].id === i.id) throw new f(g("error.workbook.sheetOne"));
|
|
3151
3262
|
const t = {
|
|
3152
3263
|
...i,
|
|
3153
3264
|
visibility: s
|
|
3154
3265
|
};
|
|
3155
3266
|
let n = -1;
|
|
3156
|
-
s !==
|
|
3267
|
+
s !== ve.Visibility.Visible && (n = this._getOffsetForId(i.id, e)), o = this._updateSheetRef(i, t).sheet, s !== ve.Visibility.Visible && this._adjustRemoveSelectionIfRequired(n, i.id), this._adjustSheetNamesIfRequired(), a.commit(r);
|
|
3157
3268
|
} catch (e) {
|
|
3158
3269
|
throw a.rollback(), e;
|
|
3159
3270
|
}
|
|
@@ -3168,7 +3279,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3168
3279
|
const o = this.beginCommit(g("op.moveSheetNamed", { name: e.name }));
|
|
3169
3280
|
try {
|
|
3170
3281
|
const t = this._getState(), n = t.sheetRefsVisible;
|
|
3171
|
-
if (s < 0 || s > n.length - 1) throw new
|
|
3282
|
+
if (s < 0 || s > n.length - 1) throw new f(`Invalid to index: ${s}`);
|
|
3172
3283
|
const a = this.getView().getActiveSheetId(), l = t.sheetRefsAll, h = this._getOffsetForId(e.id, l), c = this._getOffsetForId(n[s].id, l);
|
|
3173
3284
|
if (h === c) return;
|
|
3174
3285
|
const u = l[h];
|
|
@@ -3184,9 +3295,9 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3184
3295
|
_setSelectedSheet(e) {
|
|
3185
3296
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3186
3297
|
const t = this._getSheetRef(e);
|
|
3187
|
-
if (!t) throw new
|
|
3298
|
+
if (!t) throw new f(ds(e));
|
|
3188
3299
|
let s = null;
|
|
3189
|
-
return t.visibility !==
|
|
3300
|
+
return t.visibility !== ve.Visibility.Visible && this._setSheetVisibility(t, ve.Visibility.Visible), this._view.setActiveSheetId(t.id), s = t.sheet, s;
|
|
3190
3301
|
}
|
|
3191
3302
|
getProtection() {
|
|
3192
3303
|
return this._protection;
|
|
@@ -3204,7 +3315,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3204
3315
|
return this._calculation;
|
|
3205
3316
|
}
|
|
3206
3317
|
getFonts() {
|
|
3207
|
-
return
|
|
3318
|
+
return Q.getShared();
|
|
3208
3319
|
}
|
|
3209
3320
|
createFormula(e, t, s) {
|
|
3210
3321
|
return this.getCalculation().createFormula(e, t, s);
|
|
@@ -3271,53 +3382,216 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3271
3382
|
const e = this._pivotCaches;
|
|
3272
3383
|
if (0 === e.length) return;
|
|
3273
3384
|
const t = (e) => {
|
|
3274
|
-
const t = this._getSheetRef(e), s = t &&
|
|
3385
|
+
const t = this._getSheetRef(e), s = t && xs(t) ? t.sheet : null;
|
|
3275
3386
|
return s ? s._contentAddWatch(() => null) : null;
|
|
3387
|
+
}, s = (e) => {
|
|
3388
|
+
for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) {
|
|
3389
|
+
if (!xs(t)) continue;
|
|
3390
|
+
const s = t.sheet;
|
|
3391
|
+
if (s.getTables().getByName(e)) return s._contentAddWatch(() => null);
|
|
3392
|
+
}
|
|
3393
|
+
return null;
|
|
3394
|
+
}, r = (e, t) => {
|
|
3395
|
+
const s = this._getSheetRef(e);
|
|
3396
|
+
return s && xs(s) ? s.sheet.getRange(t) : null;
|
|
3397
|
+
}, i = (e) => {
|
|
3398
|
+
for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) {
|
|
3399
|
+
if (!xs(t)) continue;
|
|
3400
|
+
const s = t.sheet.getTables().getByName(e);
|
|
3401
|
+
if (s) return s;
|
|
3402
|
+
}
|
|
3403
|
+
return null;
|
|
3404
|
+
}, o = (e, t) => {
|
|
3405
|
+
const s = this._pivotSourceNamed(e, t)?.getValue(), i = "string" == typeof s ? ke(s) : null;
|
|
3406
|
+
return i && /^\$?[A-Za-z]+\$?\d+(?::\$?[A-Za-z]+\$?\d+)?$/.test(i.reference) ? r(i.sheet, i.reference.replaceAll("$", "")) : null;
|
|
3407
|
+
};
|
|
3408
|
+
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));
|
|
3409
|
+
}
|
|
3410
|
+
_pivotCacheStore(e) {
|
|
3411
|
+
return {
|
|
3412
|
+
get: () => this._getState().pivotCacheData.get(e),
|
|
3413
|
+
set: (t) => {
|
|
3414
|
+
this._updateState((s) => ({
|
|
3415
|
+
...s,
|
|
3416
|
+
pivotCacheData: new Map(s.pivotCacheData).set(e, t)
|
|
3417
|
+
}), _("op.refreshPivotTable"));
|
|
3418
|
+
}
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
_getPivotCache(e) {
|
|
3422
|
+
return this._getState().pivotCacheData.has(e) ? this._pivotCaches.find((t) => t.cacheId === e) ?? null : null;
|
|
3423
|
+
}
|
|
3424
|
+
_pivotSourceOf(e, t) {
|
|
3425
|
+
if (e.isITable) return { name: e.getName() };
|
|
3426
|
+
let s = null;
|
|
3427
|
+
if ("string" == typeof e) {
|
|
3428
|
+
for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) if (xs(t) && t.sheet.getTables().getByName(e)) return { name: e };
|
|
3429
|
+
if (this.getNames().getByName(e)) return { name: e };
|
|
3430
|
+
if (t.getNames().getByName(e)?.getScope()) return {
|
|
3431
|
+
name: e,
|
|
3432
|
+
sheet: t.getName()
|
|
3433
|
+
};
|
|
3434
|
+
const r = ke(e), i = r ? this._getSheetRef(r.sheet) : null;
|
|
3435
|
+
if (r && (!i || !xs(i))) return null;
|
|
3436
|
+
try {
|
|
3437
|
+
s = r ? i.sheet.getRange(r.reference) : t.getRange(e);
|
|
3438
|
+
} catch (e) {
|
|
3439
|
+
if (!(e instanceof f)) throw e;
|
|
3440
|
+
return null;
|
|
3441
|
+
}
|
|
3442
|
+
} else s = e.isICellRange ? e : t.getRange(e);
|
|
3443
|
+
if (!s || s.isInvalid()) return null;
|
|
3444
|
+
const { rowStart: r, colStart: i, rowEnd: o, colEnd: n } = s.getCoords();
|
|
3445
|
+
return {
|
|
3446
|
+
ref: Ae({
|
|
3447
|
+
rowStart: r,
|
|
3448
|
+
colStart: i,
|
|
3449
|
+
rowEnd: o,
|
|
3450
|
+
colEnd: n
|
|
3451
|
+
}),
|
|
3452
|
+
sheet: s.getWorksheet().getName()
|
|
3453
|
+
};
|
|
3454
|
+
}
|
|
3455
|
+
_findPivotCache(e) {
|
|
3456
|
+
const t = (e, t) => (e ?? "").toLocaleLowerCase() === (t ?? "").toLocaleLowerCase();
|
|
3457
|
+
return this._pivotCaches.find((s) => {
|
|
3458
|
+
if (!this._getPivotCache(s.cacheId) || !s._getData().model || s._isStale()) return !1;
|
|
3459
|
+
const r = s._getSource();
|
|
3460
|
+
return !!r && t(r.ref, e.ref) && t(r.sheet, e.sheet) && t(r.name, e.name);
|
|
3461
|
+
}) ?? null;
|
|
3462
|
+
}
|
|
3463
|
+
_addPivotCache(e) {
|
|
3464
|
+
const t = this._pivotCaches.reduce((e, t) => Math.max(e, t.cacheId), -1) + 1, s = this._pivotCacheStore(t);
|
|
3465
|
+
s.set({
|
|
3466
|
+
part: null,
|
|
3467
|
+
model: e,
|
|
3468
|
+
partFormats: null,
|
|
3469
|
+
source: null
|
|
3470
|
+
});
|
|
3471
|
+
const r = new $t(t, s);
|
|
3472
|
+
return this._pivotCaches.push(r), this._holdPivotCaches(), r;
|
|
3473
|
+
}
|
|
3474
|
+
async _refreshPivotCaches(e, t) {
|
|
3475
|
+
const s = [];
|
|
3476
|
+
for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) if (xs(t)) for (const r of t.sheet.getPivotTables().getItems()) e.has(r.getCacheId()) && s.push(r);
|
|
3477
|
+
for (const e of s) e._assertRefreshAllowed();
|
|
3478
|
+
for (const r of e) {
|
|
3479
|
+
const e = this._getPivotCache(r), i = e ? await this._pivotSourceRangeOf(e._getSource()) : null;
|
|
3480
|
+
if (!e || !i) throw new f(g("error.pivotTable.refreshSourceUnsupported"));
|
|
3481
|
+
if (i.getRowCount() < 2) throw new f(g("error.pivotTable.refreshSourceTooSmall"));
|
|
3482
|
+
i.getWorksheet()._cellBuffer?.release();
|
|
3483
|
+
const o = e.toJSON();
|
|
3484
|
+
if (!o.fields) throw new f(g("error.pivotTable.refreshSourceUnsupported"));
|
|
3485
|
+
const { model: n, remap: a } = t.refreshPivotCache(o, t.readPivotSource(i), e._getSource() ?? void 0, this._isDate1904);
|
|
3486
|
+
e._replace(n);
|
|
3487
|
+
for (const e of s) e.getCacheId() === r && e._remapCache(a, t);
|
|
3488
|
+
}
|
|
3489
|
+
for (const e of s) await e._prepareRelayout(t);
|
|
3490
|
+
for (const e of s) e._refresh(t);
|
|
3491
|
+
}
|
|
3492
|
+
async _refreshPivotCachesOnLoad() {
|
|
3493
|
+
const e = this._pivotCaches.filter((e) => !!e._getData().model?.refreshOnLoad);
|
|
3494
|
+
if (0 === e.length) return;
|
|
3495
|
+
const s = await Le.load();
|
|
3496
|
+
for (const r of e) {
|
|
3497
|
+
if (this._closed) return;
|
|
3498
|
+
try {
|
|
3499
|
+
await this._transactions.doBatch(() => this._refreshPivotCaches(/* @__PURE__ */ new Set([r.cacheId]), s));
|
|
3500
|
+
} catch (e) {
|
|
3501
|
+
if (!(e instanceof f || e instanceof t)) throw e;
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
async _pivotSourceRangeOf(e) {
|
|
3506
|
+
if (!e) return null;
|
|
3507
|
+
if (e.ref) {
|
|
3508
|
+
if (!e.sheet || e.ref.includes("#REF!")) return null;
|
|
3509
|
+
const t = this._getSheetRef(e.sheet);
|
|
3510
|
+
return t && xs(t) ? t.sheet.getRange(e.ref) : null;
|
|
3511
|
+
}
|
|
3512
|
+
if (!e.name) return null;
|
|
3513
|
+
if (!e.sheet) for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) {
|
|
3514
|
+
if (!xs(t)) continue;
|
|
3515
|
+
const s = t.sheet.getTables().getByName(e.name);
|
|
3516
|
+
if (!s || s.isDeleted()) continue;
|
|
3517
|
+
const { rowEnd: r } = s.getDataRange().getCoords();
|
|
3518
|
+
return t.sheet.getRange({
|
|
3519
|
+
...s.getRange().getCoords(),
|
|
3520
|
+
rowEnd: r
|
|
3521
|
+
});
|
|
3522
|
+
}
|
|
3523
|
+
const t = await this._pivotSourceNamed(e.name, e.sheet ?? null)?.evaluate(), s = t?.isIReferenceRange ? t.getCoords() : null;
|
|
3524
|
+
if (!s?.scope) return null;
|
|
3525
|
+
const r = this._getSheetRef(s.scope);
|
|
3526
|
+
return r && xs(r) ? r.sheet.getRange(s) : null;
|
|
3527
|
+
}
|
|
3528
|
+
_pivotSourceNamed(e, t) {
|
|
3529
|
+
if (!t) return this.getNames().getByName(e);
|
|
3530
|
+
const s = this._getSheetRef(t);
|
|
3531
|
+
if (!s || !xs(s)) return null;
|
|
3532
|
+
const r = s.sheet.getNames().getByName(e);
|
|
3533
|
+
return r?.getScope() ? r : null;
|
|
3534
|
+
}
|
|
3535
|
+
_holdPivotSlicers() {
|
|
3536
|
+
const e = (e, t) => {
|
|
3537
|
+
const s = this._getSheetRef(e);
|
|
3538
|
+
return (s && xs(s) ? s.sheet : null)?.getPivotTables().getByName(t) ?? null;
|
|
3276
3539
|
};
|
|
3277
|
-
for (
|
|
3540
|
+
for (const t of this._getSheetRefs(ve.Visibility.VeryHidden)) {
|
|
3541
|
+
if (!xs(t)) continue;
|
|
3542
|
+
const s = t.sheet.getMovables().getItems();
|
|
3543
|
+
for (let t = 0; t < s.length; t++) {
|
|
3544
|
+
const r = s[t].getContent();
|
|
3545
|
+
r.isISlicer && r._holdPivotTables(e);
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3278
3548
|
}
|
|
3279
3549
|
_fromJSON(e, t) {
|
|
3280
|
-
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new
|
|
3281
|
-
e.theme && (this._theme = new
|
|
3550
|
+
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || 0 === e.sheets.length) throw new f(g("error.workbook.sheetOne"));
|
|
3551
|
+
e.theme && (this._theme = new $e(e.theme), this._styles.setTheme(this._theme));
|
|
3282
3552
|
const s = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist(), o = this._richValues.beginPersist();
|
|
3283
3553
|
try {
|
|
3284
3554
|
s.fromJSON(e.strings), r.fromJSON(e.resources), this._fetch.adopt(this._resources.getItems()), i.fromJSON(e.styles), o.fromJSON(e.richData, {
|
|
3285
3555
|
resources: this._resources,
|
|
3286
3556
|
strings: this._strings,
|
|
3287
3557
|
fromResourceId: (e) => r.fromResourceId(e) ?? null
|
|
3288
|
-
}, e.richTypes), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, this._documentProperties.fromJSON(e.properties), e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view || (e.view = {});
|
|
3289
|
-
const n = [], a = e.pivotCaches;
|
|
3290
|
-
if (
|
|
3558
|
+
}, e.richTypes), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, this._hiddenPivotFieldList = !0 === e.hiddenPivotFieldList, this._documentProperties.fromJSON(e.properties), e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view || (e.view = {});
|
|
3559
|
+
const n = [], a = /* @__PURE__ */ new Map(), l = e.pivotCaches;
|
|
3560
|
+
if (l) {
|
|
3291
3561
|
const e = r.fromResourceId.bind(r);
|
|
3292
|
-
for (let t = 0; t <
|
|
3293
|
-
const s =
|
|
3294
|
-
s && "number" == typeof s.cacheId &&
|
|
3562
|
+
for (let t = 0; t < l.length; t++) {
|
|
3563
|
+
const s = l[t];
|
|
3564
|
+
s && "number" == typeof s.cacheId && !a.has(s.cacheId) && a.set(s.cacheId, $t.dataOf(s, e));
|
|
3295
3565
|
}
|
|
3296
3566
|
}
|
|
3567
|
+
this._updateState({ pivotCacheData: a });
|
|
3568
|
+
for (const e of a.keys()) n.push(new $t(e, this._pivotCacheStore(e)));
|
|
3297
3569
|
this._pivotCaches = n, this._people.fromJSON(e.people);
|
|
3298
|
-
const
|
|
3299
|
-
let
|
|
3300
|
-
null !==
|
|
3301
|
-
let
|
|
3570
|
+
const h = e.sheets, c = h.length;
|
|
3571
|
+
let u = e.view.activeSheetId ?? null;
|
|
3572
|
+
null !== u && (u = Math.min(Math.max(0, u), c - 1));
|
|
3573
|
+
let d = null, _ = null;
|
|
3302
3574
|
this._isLoadingSheets = !0;
|
|
3303
|
-
for (let s = 0; s <
|
|
3304
|
-
const i =
|
|
3305
|
-
|
|
3575
|
+
for (let s = 0; s < c; s++) {
|
|
3576
|
+
const i = h[s], o = i.visibility || ve.Visibility.Visible, n = s;
|
|
3577
|
+
_ = n, o === ve.Visibility.Visible ? null === d && (d = n) : null !== u && u === n && (u = null);
|
|
3306
3578
|
try {
|
|
3307
|
-
const e = i.kind ??
|
|
3308
|
-
if (e !==
|
|
3309
|
-
const a = i.sheet, l =
|
|
3310
|
-
if (!l) throw new
|
|
3579
|
+
const e = i.kind ?? ve.Kind.Worksheet;
|
|
3580
|
+
if (e !== ve.Kind.Worksheet) {
|
|
3581
|
+
const a = i.sheet, l = D.fromJSON(a?.part, r.fromResourceId.bind(r));
|
|
3582
|
+
if (!l) throw new f(g("error.workbook.sheetPartMissing", { sheetName: i.name }));
|
|
3311
3583
|
this._createOpaqueSheet(n, i.name, o, s, i.sheetId, e, l, a?.tabColor ?? null, t?.[s]);
|
|
3312
3584
|
} else this._createSheet(n, i.name, o, s, i.sheetId, i.sheet, t?.[s]);
|
|
3313
3585
|
} catch (e) {
|
|
3314
3586
|
throw this._isLoadingSheets = !1, e;
|
|
3315
3587
|
}
|
|
3316
3588
|
}
|
|
3317
|
-
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this.
|
|
3318
|
-
const
|
|
3319
|
-
this.
|
|
3320
|
-
|
|
3589
|
+
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._holdPivotSlicers();
|
|
3590
|
+
for (const e of this._getSheetRefs(ve.Visibility.VeryHidden)) xs(e) && e.sheet._tellPivots();
|
|
3591
|
+
this._updateState({ lastId: _ }), e.view.activeSheetId = u ?? d, this.setView(new ns({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
|
|
3592
|
+
const m = this;
|
|
3593
|
+
this._protection = new ls(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
3594
|
+
m._emitter.notify("onProtectionChange", { source: e });
|
|
3321
3595
|
} }), this._emitter.notify("onLoad");
|
|
3322
3596
|
} finally {
|
|
3323
3597
|
o.endPersist(), i.endPersist(), r.endPersist(), s.endPersist();
|
|
@@ -3336,14 +3610,14 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3336
3610
|
}
|
|
3337
3611
|
_createScripts(e) {
|
|
3338
3612
|
const t = this;
|
|
3339
|
-
return new
|
|
3613
|
+
return new qt({
|
|
3340
3614
|
transactions: this._transactions,
|
|
3341
3615
|
json: e,
|
|
3342
3616
|
workbook: t,
|
|
3343
3617
|
getBuiltInFunctions: () => t._calculation?.getFunctions(),
|
|
3344
3618
|
onAdd: (e, s) => {
|
|
3345
3619
|
const r = t._calculation;
|
|
3346
|
-
r.getStatus() !==
|
|
3620
|
+
r.getStatus() !== Fe.Status.Off && r.start().then(async () => {
|
|
3347
3621
|
if (t._startModules.has(s)) return;
|
|
3348
3622
|
const e = s.getFunctions().getItems({
|
|
3349
3623
|
type: "formula",
|
|
@@ -3366,7 +3640,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3366
3640
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
3367
3641
|
await Promise.resolve(this._starting);
|
|
3368
3642
|
const t = this.getCalculation();
|
|
3369
|
-
t.getStatus() !==
|
|
3643
|
+
t.getStatus() !== Fe.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
|
|
3370
3644
|
const s = { sheets: [] }, r = e?.ignoreStyles ?? !1;
|
|
3371
3645
|
if (!r) {
|
|
3372
3646
|
const e = this._theme.toJSON();
|
|
@@ -3376,38 +3650,38 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3376
3650
|
const e = this._scripts.toJSON();
|
|
3377
3651
|
e && Object.keys(e).length > 0 && (s.modules = e);
|
|
3378
3652
|
}
|
|
3379
|
-
this._isDate1904 && (s.date1904 = !0), this._codeName && (s.codeName = this._codeName), this._updateLinks && (s.updateLinks = this._updateLinks);
|
|
3653
|
+
this._isDate1904 && (s.date1904 = !0), this._codeName && (s.codeName = this._codeName), this._updateLinks && (s.updateLinks = this._updateLinks), this._hiddenPivotFieldList && (s.hiddenPivotFieldList = !0);
|
|
3380
3654
|
const i = this._documentProperties.toJSON();
|
|
3381
3655
|
Object.keys(i).length > 0 && (s.properties = i), this._locale && (s.locale = this._locale), this._localeOverrides && (s.localeOverrides = this._localeOverrides);
|
|
3382
3656
|
const o = e?.resources ?? "embed", n = "ignore" === o, a = this._strings.beginPersist(), l = n ? null : this._resources.beginPersist(), h = this._styles.beginPersist(), c = this._richValues.beginPersist();
|
|
3383
3657
|
try {
|
|
3384
3658
|
const t = this._getSheetRef(this.getSelectedSheetIndex()).id;
|
|
3385
3659
|
let i = t, u = null;
|
|
3386
|
-
const d = this._getState(), g = d.sheetRefsAll,
|
|
3660
|
+
const d = this._getState(), g = d.sheetRefsAll, f = d.sheetsById, _ = g.length;
|
|
3387
3661
|
for (let r = 0; r < _; r++) {
|
|
3388
3662
|
const o = g[r], n = r + 1;
|
|
3389
3663
|
let a;
|
|
3390
|
-
const h =
|
|
3391
|
-
if (
|
|
3664
|
+
const h = f.get(o.id);
|
|
3665
|
+
if (xs(o)) a = {
|
|
3392
3666
|
name: o.name,
|
|
3393
3667
|
sheet: await o.sheet.toJSON(e)
|
|
3394
3668
|
};
|
|
3395
3669
|
else {
|
|
3396
|
-
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part:
|
|
3670
|
+
const e = h, t = l ? l.toResourceId.bind(l) : () => null, s = { part: D.toJSON(e._getPart(), t) }, r = e.getTabColor();
|
|
3397
3671
|
r && (s.tabColor = r.toString()), a = {
|
|
3398
3672
|
name: o.name,
|
|
3399
3673
|
kind: e.getKind(),
|
|
3400
3674
|
sheet: s
|
|
3401
3675
|
};
|
|
3402
3676
|
}
|
|
3403
|
-
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility ===
|
|
3677
|
+
void 0 !== o.sheetId && (a.sheetId = o.sheetId), o.visibility === ve.Visibility.Visible ? null === u && (u = n) : a.visibility = o.visibility, o.id === t && (i = n), s.sheets.push(a);
|
|
3404
3678
|
}
|
|
3405
3679
|
if (!r) {
|
|
3406
3680
|
const e = h.toJSON();
|
|
3407
3681
|
e && Object.keys(e).length > 0 && (s.styles = e);
|
|
3408
3682
|
}
|
|
3409
|
-
const
|
|
3410
|
-
|
|
3683
|
+
const m = this.getProtection().toJSON();
|
|
3684
|
+
m && (s.protection = m);
|
|
3411
3685
|
const p = this._calculation.toJSON();
|
|
3412
3686
|
Object.keys(p).length > 0 && (s.calc = p);
|
|
3413
3687
|
const w = await a.toJSONAsync();
|
|
@@ -3418,15 +3692,20 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3418
3692
|
const e = c.toKindsJSON();
|
|
3419
3693
|
e.length > 0 && (s.richTypes = e);
|
|
3420
3694
|
}
|
|
3421
|
-
const
|
|
3422
|
-
|
|
3423
|
-
const
|
|
3424
|
-
if (
|
|
3695
|
+
const S = this._calculation.getExternalBooks().toJSON();
|
|
3696
|
+
S && (s.externalBooks = S);
|
|
3697
|
+
const b = this._pivotCaches;
|
|
3698
|
+
if (b.length > 0) {
|
|
3425
3699
|
const e = l ? l.toResourceId.bind(l) : () => null, t = /* @__PURE__ */ new Set();
|
|
3426
3700
|
for (const e of this.getPivotTables()) t.add(e.getCacheId());
|
|
3427
|
-
const r =
|
|
3428
|
-
for (let
|
|
3429
|
-
|
|
3701
|
+
const r = Ke(this);
|
|
3702
|
+
for (let e = 0; e < r.length; e++) {
|
|
3703
|
+
const s = r[e].toJSON()?.pivot?.cacheId;
|
|
3704
|
+
void 0 !== s && t.add(s);
|
|
3705
|
+
}
|
|
3706
|
+
const i = [];
|
|
3707
|
+
for (let s = 0; s < b.length; s++) t.has(b[s].cacheId) && i.push(b[s].toJSON(e));
|
|
3708
|
+
i.length > 0 && (s.pivotCaches = i);
|
|
3430
3709
|
}
|
|
3431
3710
|
const k = this._people.toJSON();
|
|
3432
3711
|
if (k && (s.people = k), !n) {
|
|
@@ -3458,7 +3737,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3458
3737
|
} catch (e) {
|
|
3459
3738
|
console.warn("error on close", e);
|
|
3460
3739
|
}
|
|
3461
|
-
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
|
|
3740
|
+
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 _t && this._originProvider.release(), this._closed = !0;
|
|
3462
3741
|
}
|
|
3463
3742
|
beginCommit(e) {
|
|
3464
3743
|
if (this._closed) throw new Error(g("error.workbook.modelClosed"));
|
|
@@ -3508,7 +3787,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3508
3787
|
get isIWorkbook() {
|
|
3509
3788
|
return !0;
|
|
3510
3789
|
}
|
|
3511
|
-
},
|
|
3790
|
+
}, Os = { address: null }, xs = (e) => e.sheet.getKind() === ve.Kind.Worksheet, Ls = class {
|
|
3512
3791
|
constructor() {
|
|
3513
3792
|
this._readFormats = [], this._writeFormats = [], this._encryptions = [];
|
|
3514
3793
|
}
|
|
@@ -3585,9 +3864,9 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3585
3864
|
return !0;
|
|
3586
3865
|
});
|
|
3587
3866
|
}
|
|
3588
|
-
},
|
|
3867
|
+
}, Vs = /* @__PURE__ */ new WeakMap(), Es = (e) => !!e && "object" == typeof e && "function" == typeof e.getPath && "function" == typeof e.canWrite, As = class {
|
|
3589
3868
|
constructor() {
|
|
3590
|
-
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new y(this), this._registry = new
|
|
3869
|
+
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());
|
|
3591
3870
|
}
|
|
3592
3871
|
getBackingStore() {
|
|
3593
3872
|
return this._backingStore ?? this._defaultStore;
|
|
@@ -3622,15 +3901,15 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3622
3901
|
return this._registry.getWriteFormats(e);
|
|
3623
3902
|
}
|
|
3624
3903
|
getOrigin(e) {
|
|
3625
|
-
return new
|
|
3904
|
+
return new ut(e);
|
|
3626
3905
|
}
|
|
3627
3906
|
async read(e) {
|
|
3628
3907
|
let t = null;
|
|
3629
3908
|
if ("string" == typeof e) e = { source: e };
|
|
3630
|
-
else if (
|
|
3909
|
+
else if (Es(e)) {
|
|
3631
3910
|
const s = e.getPath();
|
|
3632
3911
|
if (!s) throw new Error("Cannot read from an unbound origin (no path).");
|
|
3633
|
-
|
|
3912
|
+
ft(e) ? e = {
|
|
3634
3913
|
source: s,
|
|
3635
3914
|
asCopy: !0
|
|
3636
3915
|
} : (t = e, e = { source: s });
|
|
@@ -3645,25 +3924,22 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3645
3924
|
async _decodeBuffer(e, t = {}, s, r = null) {
|
|
3646
3925
|
const i = t.format, o = t.ext;
|
|
3647
3926
|
if (!i && !o) throw new Error("Either format or file extension must be provided to determine read type.");
|
|
3648
|
-
const n = (await this._registry.getReadFormats({
|
|
3649
|
-
|
|
3650
|
-
ext: o
|
|
3651
|
-
}))[0];
|
|
3652
|
-
if (!n) throw new m(g("error.io.readFormatUnavailable", { format: i ?? o }));
|
|
3927
|
+
const n = (await this._registry.getReadFormats(i ? { search: i } : { ext: o }))[0];
|
|
3928
|
+
if (!n) throw new f(g("error.io.readFormatUnavailable", { format: i ?? o }));
|
|
3653
3929
|
const a = s?.typedCreateWorkbookOptions, l = a ? Object.keys(a).find((e) => e.toLowerCase() === n.key.toLowerCase()) : void 0;
|
|
3654
3930
|
let h = {
|
|
3655
3931
|
...s,
|
|
3656
3932
|
...void 0 !== l ? a[l] : void 0
|
|
3657
3933
|
};
|
|
3658
3934
|
delete h.typedCreateWorkbookOptions, delete h.source, delete h.asCopy;
|
|
3659
|
-
const c = r ?? new
|
|
3935
|
+
const c = r ?? new ut(t.absolutePath ?? null, {
|
|
3660
3936
|
name: t.name ?? null,
|
|
3661
3937
|
format: n.key,
|
|
3662
3938
|
size: t.size ?? null,
|
|
3663
3939
|
lastModified: t.lastModified ?? null,
|
|
3664
3940
|
canWrite: t.canWrite ?? !1
|
|
3665
3941
|
});
|
|
3666
|
-
r instanceof
|
|
3942
|
+
r instanceof ut && r.update({
|
|
3667
3943
|
format: n.key,
|
|
3668
3944
|
size: t.size ?? null,
|
|
3669
3945
|
lastModified: t.lastModified ?? null
|
|
@@ -3697,7 +3973,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3697
3973
|
}
|
|
3698
3974
|
async _decrypt(e, t, r) {
|
|
3699
3975
|
const i = await this._registry.detectEncryption(e);
|
|
3700
|
-
if (t instanceof
|
|
3976
|
+
if (t instanceof ut && t.update({ encryption: i ? i.key : null }), !i) return {
|
|
3701
3977
|
bytes: e,
|
|
3702
3978
|
password: null
|
|
3703
3979
|
};
|
|
@@ -3737,11 +4013,11 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3737
4013
|
async writeArrayBuffer(e, t) {
|
|
3738
4014
|
if (!t?.format) throw new Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
|
|
3739
4015
|
const s = (await this._registry.getWriteFormats({ search: t.format }))[0];
|
|
3740
|
-
if (!s) throw new
|
|
4016
|
+
if (!s) throw new f(g("error.io.writeFormatUnavailable", { format: t.format }));
|
|
3741
4017
|
return this._writeArrayBuffer(e, s, t);
|
|
3742
4018
|
}
|
|
3743
4019
|
async write(e, t, s) {
|
|
3744
|
-
return "string" == typeof t ||
|
|
4020
|
+
return "string" == typeof t || Es(t) ? this._write(e, t, !1, s) : this._write(e, e?.getOrigin?.(), !0, t ?? s);
|
|
3745
4021
|
}
|
|
3746
4022
|
async writeAs(e, t, s) {
|
|
3747
4023
|
if (!t) throw new Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
|
|
@@ -3753,13 +4029,13 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3753
4029
|
let i = "string" == typeof t ? this.getOrigin(t) : t;
|
|
3754
4030
|
const o = i.getFormat();
|
|
3755
4031
|
let n;
|
|
3756
|
-
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
|
|
4032
|
+
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"));
|
|
3757
4033
|
const a = i.getExtension();
|
|
3758
4034
|
if (r?.format && a && i.getPath() && i.canWrite() && !n.exts.includes(a)) {
|
|
3759
4035
|
const e = (await this._registry.getWriteFormats({ ext: a }))[0];
|
|
3760
4036
|
if (e && e.key !== n.key) {
|
|
3761
4037
|
const e = i.getPath().split(/[/\\]/).pop();
|
|
3762
|
-
throw new
|
|
4038
|
+
throw new f(g("error.io.writeFormatMismatch", {
|
|
3763
4039
|
format: r.format,
|
|
3764
4040
|
file: e
|
|
3765
4041
|
}));
|
|
@@ -3767,19 +4043,19 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3767
4043
|
}
|
|
3768
4044
|
if ("string" == typeof t) {
|
|
3769
4045
|
const e = i.getPath();
|
|
3770
|
-
i = new
|
|
4046
|
+
i = new ut(st(e) ? e : `${e}.${n.exts[0]}`, { format: n.key });
|
|
3771
4047
|
}
|
|
3772
|
-
const h = i.getEncryption(), c = e.getOrigin?.(), u = (i instanceof
|
|
3773
|
-
let
|
|
4048
|
+
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), _ = void 0 !== r?.password ? r.password : u ?? (d ? void 0 : null);
|
|
4049
|
+
let m = null;
|
|
3774
4050
|
if (void 0 === _) {
|
|
3775
4051
|
if (d) {
|
|
3776
4052
|
const e = i.getName();
|
|
3777
4053
|
throw new l(e ? g("error.io.passwordRequiredSave", { name: e }) : g("error.io.passwordRequiredSaveUnnamed"));
|
|
3778
4054
|
}
|
|
3779
|
-
} else if (null !== _ && (
|
|
4055
|
+
} else if (null !== _ && (m = await this._registry.getEncryption(h), !m)) throw new f(g("error.io.encryptionUnavailable"));
|
|
3780
4056
|
const p = `${i.getName() ?? g("workbook.defaultName")}.${n.exts[0]}`, w = r?.progress, y = !i.getPath() || !i.canWrite() || !!r?.prompt;
|
|
3781
|
-
let
|
|
3782
|
-
const
|
|
4057
|
+
let S = !1;
|
|
4058
|
+
const b = this;
|
|
3783
4059
|
let k = null, C = [];
|
|
3784
4060
|
const v = {
|
|
3785
4061
|
workbook: e,
|
|
@@ -3790,9 +4066,9 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3790
4066
|
async encode(t, o) {
|
|
3791
4067
|
const a = o ?? i;
|
|
3792
4068
|
await (async (e) => {
|
|
3793
|
-
|
|
4069
|
+
S || (S = !0, w?.onStart && await Promise.resolve(w.onStart(e)));
|
|
3794
4070
|
})(a), k = e.getTransactions?.()?.getCurrentCommit() ?? k;
|
|
3795
|
-
const l = t ? (await
|
|
4071
|
+
const l = t ? (await b._registry.getWriteFormats({ search: t }))[0] ?? n : n, h = [], c = ((e, t) => ({
|
|
3796
4072
|
onStart: e?.onStart ? (t, s) => e.onStart(t, s) : void 0,
|
|
3797
4073
|
onProgress: e?.onProgress ? (t, s) => e.onProgress(t, s) : void 0,
|
|
3798
4074
|
onError: e?.onError ? (t) => e.onError(t) : void 0,
|
|
@@ -3803,10 +4079,10 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3803
4079
|
context: r
|
|
3804
4080
|
}), e?.onWarning?.(s, r);
|
|
3805
4081
|
}
|
|
3806
|
-
}))(w, h), u = await
|
|
4082
|
+
}))(w, h), u = await b._writeArrayBuffer(e, l, {
|
|
3807
4083
|
...r,
|
|
3808
4084
|
progress: c
|
|
3809
|
-
}), d =
|
|
4085
|
+
}), d = Vs.get(a);
|
|
3810
4086
|
if (h.some((e) => !d?.has(e.message)) && r?.onWarnings) {
|
|
3811
4087
|
const t = await Promise.resolve(r.onWarnings({
|
|
3812
4088
|
workbook: e,
|
|
@@ -3817,7 +4093,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3817
4093
|
}));
|
|
3818
4094
|
if (!y && !1 === t) return null;
|
|
3819
4095
|
}
|
|
3820
|
-
return C = h,
|
|
4096
|
+
return C = h, m ? m.encode(u, _) : u;
|
|
3821
4097
|
}
|
|
3822
4098
|
};
|
|
3823
4099
|
let I = null;
|
|
@@ -3825,12 +4101,12 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3825
4101
|
const t = this.getBackingStore();
|
|
3826
4102
|
if (!t.write) throw new Error("The active backing store is read-only (no write implementation).");
|
|
3827
4103
|
if (I = await t.write(v), I) {
|
|
3828
|
-
if (void 0 !== _ && I instanceof
|
|
3829
|
-
const e =
|
|
4104
|
+
if (void 0 !== _ && I instanceof ut && (I.setPassword(_), I.update({ encryption: m ? m.key : null })), C.length) {
|
|
4105
|
+
const e = Vs.get(I) ?? /* @__PURE__ */ new Set();
|
|
3830
4106
|
for (const t of C) e.add(t.message);
|
|
3831
|
-
|
|
4107
|
+
Vs.set(I, e);
|
|
3832
4108
|
}
|
|
3833
|
-
s && I !== e.getOrigin() &&
|
|
4109
|
+
s && I !== e.getOrigin() && ft(e.getOrigin())?.setOrigin(I);
|
|
3834
4110
|
const t = k ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
|
|
3835
4111
|
this._emitter.notify("onWrite", {
|
|
3836
4112
|
params: {
|
|
@@ -3845,13 +4121,13 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3845
4121
|
w?.onComplete && await Promise.resolve(w.onComplete(I));
|
|
3846
4122
|
} catch (e) {
|
|
3847
4123
|
const t = e instanceof Error ? e : new Error(String(e));
|
|
3848
|
-
if (w?.onError && await Promise.resolve(w.onError(t)), w?.onComplete && await Promise.resolve(w.onComplete(null)), t instanceof
|
|
4124
|
+
if (w?.onError && await Promise.resolve(w.onError(t)), w?.onComplete && await Promise.resolve(w.onComplete(null)), t instanceof f) throw t;
|
|
3849
4125
|
throw new Error(g("error.io.writeFailed", { reason: t.message }), { cause: e });
|
|
3850
4126
|
}
|
|
3851
4127
|
return I;
|
|
3852
4128
|
}
|
|
3853
4129
|
_stripExtension(e) {
|
|
3854
|
-
const t =
|
|
4130
|
+
const t = st(e);
|
|
3855
4131
|
return t ? e.slice(0, e.length - t.length - 1) : e;
|
|
3856
4132
|
}
|
|
3857
4133
|
_baseName(e) {
|
|
@@ -3863,7 +4139,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3863
4139
|
if (!t) throw new Error("A write format must be provided.");
|
|
3864
4140
|
const r = t.handler;
|
|
3865
4141
|
if (!r) throw new Error(`Unable to resolve a write handler for '${t.key}'.`);
|
|
3866
|
-
return r(e, {
|
|
4142
|
+
return K(t.key) || await Ge.assertUsable("exports", 0), r(e, {
|
|
3867
4143
|
...s,
|
|
3868
4144
|
format: t.key
|
|
3869
4145
|
});
|
|
@@ -3871,25 +4147,25 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3871
4147
|
async _readArrayBuffer(e, t, s) {
|
|
3872
4148
|
if (!e) throw new Error("ArrayBuffer must be specified.");
|
|
3873
4149
|
if (!t) throw new Error("format must be specified.");
|
|
3874
|
-
if (0 === e.byteLength) return new
|
|
4150
|
+
if (0 === e.byteLength) return new Ns(s?.createWorkbookOptions);
|
|
3875
4151
|
const r = t.handler;
|
|
3876
4152
|
if (!r) throw new Error(`Unable to resolve a read handler for '${t.key}'.`);
|
|
3877
4153
|
let i;
|
|
3878
4154
|
try {
|
|
3879
4155
|
i = await r(e, s);
|
|
3880
4156
|
} catch (e) {
|
|
3881
|
-
if (e instanceof
|
|
3882
|
-
throw new
|
|
4157
|
+
if (e instanceof f) throw e;
|
|
4158
|
+
throw new f(g("error.io.readFailed", {
|
|
3883
4159
|
format: t.description ?? t.key,
|
|
3884
4160
|
reason: e?.message ?? String(e)
|
|
3885
4161
|
}), { cause: e });
|
|
3886
4162
|
}
|
|
3887
|
-
return await
|
|
4163
|
+
return await rt(), i;
|
|
3888
4164
|
}
|
|
3889
4165
|
get isIWorkbookIO() {
|
|
3890
4166
|
return !0;
|
|
3891
4167
|
}
|
|
3892
|
-
},
|
|
4168
|
+
}, Ts = new As(), Ps = class {
|
|
3893
4169
|
constructor() {
|
|
3894
4170
|
this._buffer = null, this._formatKey = null;
|
|
3895
4171
|
}
|
|
@@ -3903,7 +4179,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3903
4179
|
async read(e) {
|
|
3904
4180
|
return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
|
|
3905
4181
|
}
|
|
3906
|
-
},
|
|
4182
|
+
}, Fs = "locales", Bs = "fonts", Ws = {
|
|
3907
4183
|
suffix: ".msg.json",
|
|
3908
4184
|
async extract(e) {
|
|
3909
4185
|
const t = e.relPath.split("/");
|
|
@@ -3913,7 +4189,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3913
4189
|
} : null;
|
|
3914
4190
|
},
|
|
3915
4191
|
place: (e, t) => t ? `${t}/${e}` : null
|
|
3916
|
-
},
|
|
4192
|
+
}, js = [
|
|
3917
4193
|
".woff2",
|
|
3918
4194
|
".woff",
|
|
3919
4195
|
".ttf",
|
|
@@ -3923,7 +4199,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3923
4199
|
].map((e) => ({
|
|
3924
4200
|
suffix: e,
|
|
3925
4201
|
place: (e, t) => t ? `${t}/${e}` : e
|
|
3926
|
-
})),
|
|
4202
|
+
})), Ms = {
|
|
3927
4203
|
suffix: ".metrics.json",
|
|
3928
4204
|
async extract(e) {
|
|
3929
4205
|
const t = await e.readJson();
|
|
@@ -3934,13 +4210,13 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3934
4210
|
} : null;
|
|
3935
4211
|
},
|
|
3936
4212
|
place: (e, t) => t ? `${t}/${e}` : e
|
|
3937
|
-
},
|
|
3938
|
-
kind:
|
|
3939
|
-
files: [
|
|
4213
|
+
}, Ds = [{
|
|
4214
|
+
kind: Fs,
|
|
4215
|
+
files: [Ws]
|
|
3940
4216
|
}, {
|
|
3941
|
-
kind:
|
|
4217
|
+
kind: Bs,
|
|
3942
4218
|
files: [
|
|
3943
|
-
|
|
4219
|
+
Ms,
|
|
3944
4220
|
{
|
|
3945
4221
|
suffix: ".hinted.json",
|
|
3946
4222
|
async extract(e) {
|
|
@@ -3952,7 +4228,7 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3952
4228
|
hinted: !0
|
|
3953
4229
|
} : null;
|
|
3954
4230
|
},
|
|
3955
|
-
place:
|
|
4231
|
+
place: Ms.place
|
|
3956
4232
|
},
|
|
3957
4233
|
{
|
|
3958
4234
|
suffix: ".rows.json",
|
|
@@ -3965,40 +4241,79 @@ var ws = "workbook.activeSheet", ys = class e extends Ie {
|
|
|
3965
4241
|
rows: !0
|
|
3966
4242
|
} : null;
|
|
3967
4243
|
},
|
|
3968
|
-
place:
|
|
4244
|
+
place: Ms.place
|
|
3969
4245
|
},
|
|
3970
|
-
...
|
|
4246
|
+
...js
|
|
3971
4247
|
]
|
|
3972
4248
|
}];
|
|
3973
|
-
async function
|
|
3974
|
-
const { Chart: s } = await import("./
|
|
4249
|
+
async function Hs(e, t) {
|
|
4250
|
+
const { Chart: s } = await import("./DTLbKr_XIJMwQJmk.js");
|
|
3975
4251
|
return new s({
|
|
3976
4252
|
json: e,
|
|
3977
4253
|
getStyles: t?.getStyles
|
|
3978
4254
|
});
|
|
3979
4255
|
}
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
4256
|
+
var zs = {
|
|
4257
|
+
showRowHeaders: !0,
|
|
4258
|
+
showColumnHeaders: !0,
|
|
4259
|
+
showRowStripes: !1,
|
|
4260
|
+
showColumnStripes: !1,
|
|
4261
|
+
showLastColumn: !0
|
|
4262
|
+
}, $s = class extends Se {
|
|
4263
|
+
constructor(e, t, s, r) {
|
|
4264
|
+
super(e, t?.getProperties() ?? { name: "" }, {
|
|
4265
|
+
rowStart: 0,
|
|
4266
|
+
colStart: 0,
|
|
4267
|
+
rowEnd: r - 1,
|
|
4268
|
+
colEnd: 4
|
|
4269
|
+
}), this._options = s, this._rows = r;
|
|
4270
|
+
}
|
|
4271
|
+
_isSubheading(e) {
|
|
4272
|
+
return e > 0 && e < this._rows - 1 && (e - 1) % 3 == 0;
|
|
4273
|
+
}
|
|
4274
|
+
_coveringAt(e, t) {
|
|
4275
|
+
if (e < 0 || e >= this._rows || t < 0 || t >= 5) return [];
|
|
4276
|
+
const { showRowHeaders: s, showColumnHeaders: r, showRowStripes: i, showColumnStripes: o, showLastColumn: n } = this._options, a = ["wholeTable"];
|
|
4277
|
+
return o && a.push(t % 2 == 0 ? "firstColumnStripe" : "secondColumnStripe"), i && a.push(e % 2 == 0 ? "firstRowStripe" : "secondRowStripe"), 0 === e ? (0 === t && s && a.push("firstColumn"), r && a.push("headerRow"), 0 === t && s && r && a.push("firstHeaderCell")) : (0 === t && s && a.push("firstColumn"), this._isSubheading(e) && s && a.push("firstRowSubheading")), 4 === t && n && a.push("lastColumn"), e === this._rows - 1 && a.push("totalRow"), a;
|
|
4278
|
+
}
|
|
4279
|
+
_bandOf(e, t, s) {
|
|
4280
|
+
return "firstRowSubheading" === s ? `${e}` : "";
|
|
4281
|
+
}
|
|
4282
|
+
}, Us = (e, t, s, r = 5) => {
|
|
4283
|
+
const i = Math.max(3, Math.floor(r)), o = new $s(e, t, s ?? zs, i);
|
|
4284
|
+
return {
|
|
4285
|
+
rows: i,
|
|
4286
|
+
columns: 5,
|
|
4287
|
+
getStyleAt: (t, s) => qe(void 0, e, o, {
|
|
4288
|
+
rowStart: t,
|
|
4289
|
+
colStart: s,
|
|
4290
|
+
rowEnd: t,
|
|
4291
|
+
colEnd: s
|
|
4292
|
+
})
|
|
4293
|
+
};
|
|
4294
|
+
};
|
|
4295
|
+
ks || (ks = {});
|
|
4296
|
+
var Js, qs, Ks, Gs = null;
|
|
4297
|
+
function Zs() {
|
|
4298
|
+
if (!Gs) {
|
|
4299
|
+
const e = import("./BbDKWV_FQAICqZjP.js").then((e) => e.loadScriptingDeclarations());
|
|
3985
4300
|
e.catch(() => {
|
|
3986
|
-
|
|
3987
|
-
}),
|
|
4301
|
+
Gs = null;
|
|
4302
|
+
}), Gs = e;
|
|
3988
4303
|
}
|
|
3989
|
-
return
|
|
4304
|
+
return Gs;
|
|
3990
4305
|
}
|
|
3991
|
-
var
|
|
3992
|
-
function
|
|
3993
|
-
if (!
|
|
3994
|
-
const e = import("./
|
|
4306
|
+
var Xs = null;
|
|
4307
|
+
function Qs() {
|
|
4308
|
+
if (!Xs) {
|
|
4309
|
+
const e = import("./BbDKWV_FQAICqZjP.js").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
|
|
3995
4310
|
e.catch(() => {
|
|
3996
|
-
|
|
3997
|
-
}),
|
|
4311
|
+
Xs = null;
|
|
4312
|
+
}), Xs = e;
|
|
3998
4313
|
}
|
|
3999
|
-
return
|
|
4314
|
+
return Xs;
|
|
4000
4315
|
}
|
|
4001
|
-
|
|
4316
|
+
Js || (Js = {}), (qs || (qs = {})).Type = {
|
|
4002
4317
|
Button: "button",
|
|
4003
4318
|
CheckBox: "checkBox",
|
|
4004
4319
|
OptionButton: "optionButton",
|
|
@@ -4011,12 +4326,12 @@ Bs || (Bs = {}), (js || (js = {})).Type = {
|
|
|
4011
4326
|
EditBox: "editBox",
|
|
4012
4327
|
Dialog: "dialog",
|
|
4013
4328
|
Unknown: "formControl"
|
|
4014
|
-
}, (
|
|
4329
|
+
}, (Ks || (Ks = {})).DropStyle = {
|
|
4015
4330
|
Combo: "combo",
|
|
4016
4331
|
ComboEdit: "comboEdit",
|
|
4017
4332
|
Simple: "simple"
|
|
4018
4333
|
};
|
|
4019
|
-
var
|
|
4334
|
+
var Ys = class extends De {
|
|
4020
4335
|
constructor(e) {
|
|
4021
4336
|
super(e);
|
|
4022
4337
|
}
|
|
@@ -4029,8 +4344,8 @@ var Us = class extends Re {
|
|
|
4029
4344
|
colEnd: (e?.size?.width ?? 5) - 1,
|
|
4030
4345
|
rowEnd: (e?.size?.height ?? 5) - 1
|
|
4031
4346
|
},
|
|
4032
|
-
getRanges: (e) => new
|
|
4347
|
+
getRanges: (e) => new tt(null)
|
|
4033
4348
|
}, super._initializeOptions(e);
|
|
4034
4349
|
}
|
|
4035
|
-
},
|
|
4036
|
-
export {
|
|
4350
|
+
}, er = "0.8.0-beta.16", tr = "2026-11-05T02:02:09.588Z";
|
|
4351
|
+
export { jt as A, ks as C, Fs as D, qs as E, bt as F, St as I, Us as L, As as M, Et as N, Ft as O, Jt as P, rs as R, yt as S, Bs as T, at as _, ut as a, Pt as b, tr as c, Ns as d, wt as f, zt as g, ct as h, ot as i, Ts as j, Hs as k, ss as l, Zs as m, Ks as n, Qs as o, Ys as p, Xt as r, er as s, ns as t, nt as u, Vt as v, Ds as w, Js as x, Ps as y, kt as z };
|