@sheetxl/mcp 0.0.0-stage → 0.8.0-beta.15
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 +11 -0
- package/README.md +72 -2
- package/agent/instructions.md +66 -0
- package/assets/9U9XCqqdn-q3i2fj.js +123 -0
- package/assets/B-MqXm_7luDLwazY.js +596 -0
- package/assets/B2Ek-DWpZMGJ0V1Z.js +18 -0
- package/assets/B2udpZ-uIaql3AUh.js +104 -0
- package/assets/B4VnJacrzr1x4PHR.js +402 -0
- package/assets/B5lHOOQ_rkP4Mi2r.js +638 -0
- package/assets/B7gUyrfLln3TiyKM.js +14 -0
- package/assets/B9US2ZrF93KOjmAx.js +22 -0
- package/assets/BBb_3gEGzmEzbTIk.js +359 -0
- package/assets/BCy1zP97fsiIcvj6.js +18 -0
- package/assets/BFXeoFUbuc4IKTz9.js +28 -0
- package/assets/BFdeov2e_xUQPEY_.js +202 -0
- package/assets/BG5kgbDRXMc0re6W.js +242 -0
- package/assets/BJxfinOazQqqByc-.js +105 -0
- package/assets/BOPsJmq7v7HOKUkO.js +32 -0
- package/assets/BPwmBu_aouERJjiW.js +45 -0
- package/assets/BQMDOjNBMjAx9WiW.js +3011 -0
- package/assets/BQbF1RkUH8WyXqSD.js +780 -0
- package/assets/BRzp6DEIYUgM3NkN.js +369 -0
- package/assets/BSxTn2BhkEEeF9x_.js +2346 -0
- package/assets/BTQhJQ3e0hsiousD.js +28 -0
- package/assets/BZPTaa0WjpoUAbgZ.js +35 -0
- package/assets/BbAmA46MhQSu3ZF_.js +119 -0
- package/assets/BbcUxIZe3YXywsQR.js +28 -0
- package/assets/BeLr36oL3jmeXFFi.js +58 -0
- package/assets/Bg95xYj5siqhHVEz.js +594 -0
- package/assets/Bh0PNKlrR4VAqnP8.js +60500 -0
- package/assets/BjqQjxBuoXza8oqg.js +362 -0
- package/assets/BlPubAFi7DY7VrAo.js +33 -0
- package/assets/BleMG0hAQgjE8fTa.js +7 -0
- package/assets/Bn8D2bebQ2tFfwQt.js +310 -0
- package/assets/BrcQmHcE7Hcr1erJ.js +24 -0
- package/assets/BsQZI1vXTRE63Zy-.js +2368 -0
- package/assets/BtjqpAKczftx91BQ.js +96 -0
- package/assets/Btys7KwtvV3hz2F6.js +656 -0
- package/assets/BuUEsifnQALe49uk.js +857 -0
- package/assets/By-7OWXShMlFFejV.js +119 -0
- package/assets/C0CiMKC3lWK1z9p5.js +449 -0
- package/assets/C2OrZ8LZ-TI6eYG0.js +22 -0
- package/assets/C4z2IilWTuu2TWXw.js +3917 -0
- package/assets/C7ONfuYIWRmDu_vs.js +319 -0
- package/assets/C7Z1li2XjWi6bkrp.js +1556 -0
- package/assets/C97xDe_wBbLZh_uW.js +35 -0
- package/assets/CGBGyaCGdlZFQYK0.js +447 -0
- package/assets/CJ5WQnaoCsdr5gf4.js +1783 -0
- package/assets/CMK6tIDVqYYvK4GZ.js +55 -0
- package/assets/CMWAsUQ66V8fYrME.js +223 -0
- package/assets/CNz3LdmvsOEJoLO9.js +12 -0
- package/assets/CWVWdbY1B1-WLl9k.js +199 -0
- package/assets/CWl6oHiJxkNKRixk.js +17 -0
- package/assets/CXHslDxkWCuEcCSQ.js +13 -0
- package/assets/CZTSZL3T_f-vSXqM.js +7 -0
- package/assets/CduNzsdbTigxH-ZK.js +5220 -0
- package/assets/CecTe22WURiXbVdY.js +2260 -0
- package/assets/Cf2dcwmmmf13Rywg.js +146 -0
- package/assets/Cf9LpgZz-W5blzy_.js +27 -0
- package/assets/Cfhv_Yw_LT8VzAMt.js +255 -0
- package/assets/Cg51xaLRUkVOMdCZ.js +144 -0
- package/assets/ChWpsFGl-BYOnX_A.js +142 -0
- package/assets/ClNQN3vEg5b5qUDp.js +10289 -0
- package/assets/Crt2kLdGIlBHANgg.js +28 -0
- package/assets/CudNpUD78SrtJIiy.js +610 -0
- package/assets/CvngwB17_ve4W49b.js +639 -0
- package/assets/CwPBmcY6xSP8dNlh.js +51 -0
- package/assets/CxjchwpiqxPM1XKd.js +304 -0
- package/assets/D-ffk16w8c5w0mxI.js +71 -0
- package/assets/D0CHDsemn0S31ltt.js +32 -0
- package/assets/D7oUtYjetuykGhQ5.js +18 -0
- package/assets/D8J14MLlN2HRXdXB.js +20 -0
- package/assets/DA_ar3QKLKtJ9fJD.js +37 -0
- package/assets/DB-tkqI6wFXDKEfB.js +118 -0
- package/assets/DD8HNAUFroTCuD-b.js +7514 -0
- package/assets/DDnwKPJSznyfYDZS.js +49 -0
- package/assets/DEW2GxfGYqVFvrfg.js +23 -0
- package/assets/DH7sGHzxUqIQkDnd.js +16 -0
- package/assets/DJiLWtmPR2OQNjzi.js +19 -0
- package/assets/DKLm4nWzynGw1Kr9.js +15 -0
- package/assets/DPCKMM7sgWbrtB8z.js +81 -0
- package/assets/DTfl-4Iboi6TQU5m.js +37 -0
- package/assets/DVchxwp6w6lu2Ihu.js +7 -0
- package/assets/DaoSWy3EFlqpZaLr.js +4437 -0
- package/assets/DcWTBOi_iBFc6U4J.js +8338 -0
- package/assets/Dht2mcOSyYlPY32b.js +14 -0
- package/assets/Diee6f_qAmcZBd2_.js +52 -0
- package/assets/DkibD_CEVePaoj_y.js +7 -0
- package/assets/DlBdhv6NHgrNp5Yo.js +7 -0
- package/assets/DoILAmhKUOlKWRVw.js +12 -0
- package/assets/DpdHDTFOeuzDVNEe.js +405 -0
- package/assets/DsCI_ZYm_jDjXF3J.js +12996 -0
- package/assets/DvUUArnZwoYOKOuk.js +12 -0
- package/assets/DwLZpYUp85UHBE3H.js +63 -0
- package/assets/DwWngYJTgC0KLbih.js +184 -0
- package/assets/Dz8UUJ7Xc2oN5PBG.js +45 -0
- package/assets/FS9NbEKgQvz5wqvZ.js +1135 -0
- package/assets/F_f0jJqM5MrXGbwC.js +86 -0
- package/assets/FzNG48GE_wso6RII.js +173 -0
- package/assets/JO3zH9hupFSV6vj2.js +15 -0
- package/assets/LEJp05fjmflKgyqF.js +1760 -0
- package/assets/LyLlBk--VJD2V-f8.js +351 -0
- package/assets/OVRdpPUzR0-ueTxE.js +1860 -0
- package/assets/PpFbmF0DFeUdpb9I.js +145 -0
- package/assets/S16s2h9qoYVBlVEa.js +9137 -0
- package/assets/SHZe9VOU1prGs1F9.js +19 -0
- package/assets/U1XXGEPuuqIAzYl1.js +8 -0
- package/assets/ZuYfVKlp41IJnrOS.js +540 -0
- package/assets/_d5XJ7dn1CKKYrep.js +1131 -0
- package/assets/_fUXIv6nKvgZkhxn.js +23 -0
- package/assets/fDMpDhXp36CatF-G.js +23 -0
- package/assets/hulrR0PldUxMJm_F.js +504 -0
- package/assets/iujMYIEPx_v3sdPf.js +9109 -0
- package/assets/jPUOH4FHF4b-rapv.js +171 -0
- package/assets/jadLBUNBVR9mbZ35.js +4036 -0
- package/assets/jiEe5eKV3BFPBWfi.js +6294 -0
- package/assets/oxjm7Yr7u7MeaO5P.js +37 -0
- package/assets/vZZi_iKYHm05gAye.js +30 -0
- package/assets/wfVh0olISLRWdv9Q.js +47 -0
- package/assets/xmTQJJVyCrcq77WR.js +63 -0
- package/assets/xnhBSX6lAcmBM65y.js +32 -0
- package/index.js +8070 -0
- package/lib.js +7 -0
- package/licenses/dependencies.txt +1552 -0
- package/package.json +44 -3
- package/resources/contents.json +333 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-italic.hinted.json +124 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-regular.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-regular.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-display-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/aptos-regular.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/aptos-regular.metrics.json +221 -0
- package/resources/fonts/@sheetxl/sdk/aptos-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold-italic.metrics.json +139 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold.metrics.json +139 -0
- package/resources/fonts/@sheetxl/sdk/arial-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/arial-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/arial-italic.metrics.json +139 -0
- package/resources/fonts/@sheetxl/sdk/arial-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/arial-regular.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/arial-regular.metrics.json +139 -0
- package/resources/fonts/@sheetxl/sdk/arial-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold-italic.hinted.json +122 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold-italic.metrics.json +137 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold.hinted.json +122 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold.metrics.json +137 -0
- package/resources/fonts/@sheetxl/sdk/calibri-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/calibri-italic.hinted.json +121 -0
- package/resources/fonts/@sheetxl/sdk/calibri-italic.metrics.json +137 -0
- package/resources/fonts/@sheetxl/sdk/calibri-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/calibri-regular.hinted.json +121 -0
- package/resources/fonts/@sheetxl/sdk/calibri-regular.metrics.json +137 -0
- package/resources/fonts/@sheetxl/sdk/calibri-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold-italic.hinted.json +105 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold-italic.metrics.json +66 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold.hinted.json +108 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold.metrics.json +66 -0
- package/resources/fonts/@sheetxl/sdk/cambria-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/cambria-italic.hinted.json +102 -0
- package/resources/fonts/@sheetxl/sdk/cambria-italic.metrics.json +66 -0
- package/resources/fonts/@sheetxl/sdk/cambria-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/cambria-regular.hinted.json +110 -0
- package/resources/fonts/@sheetxl/sdk/cambria-regular.metrics.json +66 -0
- package/resources/fonts/@sheetxl/sdk/cambria-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/contents.json +646 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.hinted.json +11 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.metrics.json +143 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold.hinted.json +11 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold.metrics.json +143 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-italic.hinted.json +11 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-italic.metrics.json +143 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-regular.hinted.json +11 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-regular.metrics.json +143 -0
- package/resources/fonts/@sheetxl/sdk/courier-new-regular.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.metrics.json +141 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold.metrics.json +141 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-bold.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-italic.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-italic.metrics.json +143 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-italic.rows.json +8 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-regular.hinted.json +125 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-regular.metrics.json +141 -0
- package/resources/fonts/@sheetxl/sdk/times-new-roman-regular.rows.json +8 -0
- package/resources/locales/@sheetxl/formulas/contents.json +9 -0
- package/resources/locales/@sheetxl/formulas/de/functions.json +298 -0
- package/resources/locales/@sheetxl/formulas-extended/contents.json +9 -0
- package/resources/locales/@sheetxl/formulas-extended/de/functions.json +59 -0
- package/resources/locales/@sheetxl/sdk/contents.json +19 -0
- package/resources/locales/@sheetxl/sdk/de/grammar.json +16 -0
- package/resources/locales/@sheetxl/sdk/de/model.msg.json +710 -0
- package/resources/locales/@sheetxl/sdk/en/model.msg.json +732 -0
- package/screenshot-page/assets/-cpi3yOZYn6GsYN4.js +9 -0
- package/screenshot-page/assets/-i_fTASJeu9NdNH_.js +7 -0
- package/screenshot-page/assets/0MTaPYjKud2Q9QG9.js +1 -0
- package/screenshot-page/assets/21oAESJyBGXeHegm.js +2 -0
- package/screenshot-page/assets/3Ls_kOvlQseMV8Q0.js +1 -0
- package/screenshot-page/assets/4qZpl2QCzneWdmJO.js +1 -0
- package/screenshot-page/assets/6IEV7KeOEbBdrthj.js +1 -0
- package/screenshot-page/assets/8QrkTrKHDnMBb7q4.js +1 -0
- package/screenshot-page/assets/9w0ECZmzGUyk3F_O.js +1 -0
- package/screenshot-page/assets/AjS2PipZDIH3BXB2.js +1 -0
- package/screenshot-page/assets/B-KIwD5F_5S-NsPg.js +1 -0
- package/screenshot-page/assets/B-sAzW5ROrhvMGM4.js +1 -0
- package/screenshot-page/assets/B0FQypGas6gbGT_U.js +1 -0
- package/screenshot-page/assets/B2IQMVqTZT1rUnib.js +1 -0
- package/screenshot-page/assets/B2MJPcMcsuv6FekC.js +1 -0
- package/screenshot-page/assets/B2g3jiFIQ4Qjh5gG.js +1 -0
- package/screenshot-page/assets/B4PbXdzBe9BsoZ0e.js +2 -0
- package/screenshot-page/assets/B5GO9v4p9L70Xb9i.js +1 -0
- package/screenshot-page/assets/B8y_eLNCGnXLEIaE.js +1 -0
- package/screenshot-page/assets/BEuMvXYIa9A1JacY.js +1 -0
- package/screenshot-page/assets/BEwl-ucV9Jfr0RoC.js +1 -0
- package/screenshot-page/assets/BFaiQZKle44Rhyou.js +1 -0
- package/screenshot-page/assets/BHqg55S-4_OoAu3P.js +2 -0
- package/screenshot-page/assets/BNgLvS2bLOYKRguv.js +1 -0
- package/screenshot-page/assets/BQAN82ftWBiLJT3r.js +1 -0
- package/screenshot-page/assets/BQfe-XTIOGeUnD9B.js +1 -0
- package/screenshot-page/assets/BQnELVV0uR4T4ItQ.js +1 -0
- package/screenshot-page/assets/BRVZJ0OGJg9XJro6.js +1 -0
- package/screenshot-page/assets/BSdFVGZNhU6YHbMI.js +2 -0
- package/screenshot-page/assets/BTMW3ukmc44U2fy7.js +1 -0
- package/screenshot-page/assets/BTOQaSn9DDyJPUlX.js +1 -0
- package/screenshot-page/assets/BTboCICZ-951XWsi.js +1 -0
- package/screenshot-page/assets/BUGXf2DEBog16Slb.js +2 -0
- package/screenshot-page/assets/BUjI304IvdJnFXH3.js +1 -0
- package/screenshot-page/assets/B_W2QroTKADz3ABp.js +2 -0
- package/screenshot-page/assets/Baz0SC2AgGyxMX72.js +1 -0
- package/screenshot-page/assets/BbP9KThfrodyosvn.js +1 -0
- package/screenshot-page/assets/BcOdl17EeFSxnAiq.js +1 -0
- package/screenshot-page/assets/BclKeOKIOBjijhsu.js +1 -0
- package/screenshot-page/assets/Bf7xq8PyF4ohjMzP.js +2 -0
- package/screenshot-page/assets/BimyzECCZl-NESff.js +1 -0
- package/screenshot-page/assets/Bj-vfAT28PK-tWWa.js +2 -0
- package/screenshot-page/assets/BkLH7JH3A93TXFJi.js +1 -0
- package/screenshot-page/assets/BksaQEoZr5OWq-_d.js +3 -0
- package/screenshot-page/assets/BnoVwUBEor8NgQNs.js +4 -0
- package/screenshot-page/assets/BowRIybLgENunTOT.js +1 -0
- package/screenshot-page/assets/Bp7se0JaDGrzfSA_.js +1 -0
- package/screenshot-page/assets/Bx61vmiWY0Xvx9qs.js +1 -0
- package/screenshot-page/assets/ByY3fmwyDPAyOLdo.js +1 -0
- package/screenshot-page/assets/Bz5V1tmiy5gbT9ys.js +1 -0
- package/screenshot-page/assets/Bz9v1lgjvbu4QnOs.js +2 -0
- package/screenshot-page/assets/BzQ5GyiXq8gTz-H-.js +1 -0
- package/screenshot-page/assets/C1k_VrZqlpiUigCP.js +1 -0
- package/screenshot-page/assets/C2Wh2h27c7FUb8Yk.js +1 -0
- package/screenshot-page/assets/C6oLDVnuCS9LGkkH.js +1 -0
- package/screenshot-page/assets/C81mK8aZKZAAS-AB.js +1 -0
- package/screenshot-page/assets/C9SC-cEIt6gdhZRw.js +1 -0
- package/screenshot-page/assets/CE8MCCIiwjOVwBBW.js +1 -0
- package/screenshot-page/assets/CG3ynup87FmG-kkX.js +1 -0
- package/screenshot-page/assets/CHlWgOAlcRCjVuhg.js +1 -0
- package/screenshot-page/assets/CIged53b3hHKxa-o.js +1 -0
- package/screenshot-page/assets/CNQczIR5xcE5u5fT.js +1 -0
- package/screenshot-page/assets/CSUd8n1H0VBfREnk.js +2 -0
- package/screenshot-page/assets/CSlBTkRDITCC8JRB.js +1 -0
- package/screenshot-page/assets/CV2jr9hpQOG2OG0C.js +1 -0
- package/screenshot-page/assets/CXGgKVbVXjWzE0p6.js +1 -0
- package/screenshot-page/assets/CXKCmZ_TRyGaB9Ob.js +1 -0
- package/screenshot-page/assets/CXUO3vYip3JPSJ7A.js +1 -0
- package/screenshot-page/assets/CXwbGzavyvYgDbWU.js +1 -0
- package/screenshot-page/assets/CZf9s6otzzoaBlSs.js +1 -0
- package/screenshot-page/assets/CZvwQEeVhBilgKLG.js +1 -0
- package/screenshot-page/assets/Ca6nxdhEuLLty3d7.js +2 -0
- package/screenshot-page/assets/CbUDukmvDZmVfhJH.js +1 -0
- package/screenshot-page/assets/CbXtAM7H-Jg_J0dk.js +1 -0
- package/screenshot-page/assets/CctIRGMFmARVi2KT.js +1 -0
- package/screenshot-page/assets/Cenh1POxiGMxIQlv.js +1 -0
- package/screenshot-page/assets/ChSvXfVMLxZsP9zG.js +8 -0
- package/screenshot-page/assets/Ci5NtzhJLll1kxGf.js +10 -0
- package/screenshot-page/assets/CjngjJNheGaVRvZp.js +1 -0
- package/screenshot-page/assets/ClzdIJrFdInttVJA.js +1 -0
- package/screenshot-page/assets/CnPgk3HcIziOcskY.js +10 -0
- package/screenshot-page/assets/CnXLpFE_vFrJ5Jbf.js +1 -0
- package/screenshot-page/assets/CpbohdgEaEsVDi9J.js +1 -0
- package/screenshot-page/assets/CqR3hGrC956TkCMj.js +20 -0
- package/screenshot-page/assets/Cr1tQKUBVKOQl3QC.js +1 -0
- package/screenshot-page/assets/CwqNb7JYzC03lCj0.js +1 -0
- package/screenshot-page/assets/CykecBozGGFl26KA.js +3940 -0
- package/screenshot-page/assets/CzTizxHhb-CI_ajE.js +1 -0
- package/screenshot-page/assets/CzhH7lTYQrYGHct6.js +1 -0
- package/screenshot-page/assets/CzzEl3lAkZopkwhC.js +1 -0
- package/screenshot-page/assets/D-LgRj0s-PAVqY-L.js +1 -0
- package/screenshot-page/assets/D-XR1MGhwn7Jqj60.js +1 -0
- package/screenshot-page/assets/D47ePD4x1lVazNdl.js +7 -0
- package/screenshot-page/assets/D66vSE1ConAuENmB.js +586 -0
- package/screenshot-page/assets/D6Jpaz2YkhOfzxDB.js +1 -0
- package/screenshot-page/assets/D9zCVZpnJBfNSNO2.js +1 -0
- package/screenshot-page/assets/DCVUZ_ayOXFwV2d_.js +3 -0
- package/screenshot-page/assets/DDQWM8rNYCYzKa9R.js +1 -0
- package/screenshot-page/assets/DFE-fKq5NV7_O8V6.js +1 -0
- package/screenshot-page/assets/DGXDfjkGZjMRAXPg.js +5 -0
- package/screenshot-page/assets/DHa5_U58lSwCnpmG.js +1 -0
- package/screenshot-page/assets/DKVB6ddRfDJatYid.js +1 -0
- package/screenshot-page/assets/DK_QSosKV62NDcuT.js +42 -0
- package/screenshot-page/assets/DM9U7u7FQK0jcwh4.js +1 -0
- package/screenshot-page/assets/DNDaHmkQrQTaCHhV.js +1 -0
- package/screenshot-page/assets/DQ0kGd99-fXxuNYk.js +1 -0
- package/screenshot-page/assets/DQWHkaQeNXft9j8b.js +2 -0
- package/screenshot-page/assets/DRVfGdmVBvktrZ1t.js +1 -0
- package/screenshot-page/assets/DRrM-dY9nM7nDRpV.js +1 -0
- package/screenshot-page/assets/DT2x1gO3f2G5NfeB.js +1 -0
- package/screenshot-page/assets/DTFRGj188QuLKEXw.js +1 -0
- package/screenshot-page/assets/DU3FmyUH0RjPIBd-.js +1 -0
- package/screenshot-page/assets/DVueE--eOrZPrqrm.js +1 -0
- package/screenshot-page/assets/DXQLzGmxoyN3kfQi.js +27 -0
- package/screenshot-page/assets/DXWWyJlMSWgDFxs1.js +10 -0
- package/screenshot-page/assets/DYJSIlNxrNw8qk-w.js +1 -0
- package/screenshot-page/assets/DYRbCudWTaiE_Sjc.js +1 -0
- package/screenshot-page/assets/DZDRRw-62D6Zw7qs.js +1 -0
- package/screenshot-page/assets/DaKZ4-Li_ULIIwnK.js +1 -0
- package/screenshot-page/assets/DadZXeaVK5UXSHIi.js +1 -0
- package/screenshot-page/assets/Db_VGqQo2G2JgXWW.js +1 -0
- package/screenshot-page/assets/DceNHPrRLok2At-X.js +1 -0
- package/screenshot-page/assets/DcrVJCyDwGKeil2U.js +1 -0
- package/screenshot-page/assets/DeAKjatTVaZ0u_FY.js +1 -0
- package/screenshot-page/assets/DmMZ4pd492HPw_3_.js +1 -0
- package/screenshot-page/assets/DmbuCapSSCYIa3yk.js +1 -0
- package/screenshot-page/assets/Dpepompn_NhpSncR.js +1 -0
- package/screenshot-page/assets/DqYhS4mcQfOe96hU.js +1 -0
- package/screenshot-page/assets/Dsx0NUmGIxS7SvZ8.js +1 -0
- package/screenshot-page/assets/DyGpT6t96jrvgJes.js +1 -0
- package/screenshot-page/assets/DyLWQxXXTw5uwPVy.js +30 -0
- package/screenshot-page/assets/DyYVf8O1rhg3YmjW.js +1 -0
- package/screenshot-page/assets/DyxJBLjUkeDuu96F.js +1 -0
- package/screenshot-page/assets/HclGiUj8dZXDFmoM.js +1 -0
- package/screenshot-page/assets/IRtoU5oVgBWu9rnK.js +2 -0
- package/screenshot-page/assets/J73KTOmdZGNmnq-z.js +1 -0
- package/screenshot-page/assets/J_xJVgE7YlmeU-ZO.js +6 -0
- package/screenshot-page/assets/KoxRo2J_cwB_yOd5.js +2 -0
- package/screenshot-page/assets/LVtV_IPhPQroHRui.js +1 -0
- package/screenshot-page/assets/MNoPOsydrUv1UGU8.js +2 -0
- package/screenshot-page/assets/Q5EKmzoJZCE81Om-.js +2 -0
- package/screenshot-page/assets/TfhknTx8vxQkw4zV.js +2 -0
- package/screenshot-page/assets/VvqAh6BWzaD5OUPF.js +1 -0
- package/screenshot-page/assets/fGlPAximvsxzPzGA.js +1 -0
- package/screenshot-page/assets/gG0AFZ45VxS_moMw.js +2 -0
- package/screenshot-page/assets/hp_-JA1DMK4Yoztn.js +57 -0
- package/screenshot-page/assets/l32n8O_A78Qqduv3.js +1 -0
- package/screenshot-page/assets/nHThFXCAZFOM_npq.js +1 -0
- package/screenshot-page/assets/pRykm05ElquZBk_a.js +1 -0
- package/screenshot-page/assets/rPOkVKdPbFpTG6AY.js +1 -0
- package/screenshot-page/assets/sHBomL5R4-_px8rD.js +1 -0
- package/screenshot-page/assets/skRJ2qjA7kcmnOsh.js +39 -0
- package/screenshot-page/assets/w3bV7wggRayUYTd-.js +1 -0
- package/screenshot-page/assets/zFbb8ESzwR_bE7IQ.js +1 -0
- package/screenshot-page/index.html +44 -0
- package/screenshot-page/resources/contents.json +333 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-italic.hinted.json +124 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-regular.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-regular.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-display-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-narrow-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-regular.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-regular.metrics.json +221 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/aptos-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold-italic.metrics.json +139 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold.metrics.json +139 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-italic.metrics.json +139 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-regular.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-regular.metrics.json +139 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/arial-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold-italic.hinted.json +122 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold-italic.metrics.json +137 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold.hinted.json +122 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold.metrics.json +137 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-italic.hinted.json +121 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-italic.metrics.json +137 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-regular.hinted.json +121 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-regular.metrics.json +137 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/calibri-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold-italic.hinted.json +105 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold-italic.metrics.json +66 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold.hinted.json +108 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold.metrics.json +66 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-italic.hinted.json +102 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-italic.metrics.json +66 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-regular.hinted.json +110 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-regular.metrics.json +66 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/cambria-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/contents.json +646 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.hinted.json +11 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.metrics.json +143 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold.hinted.json +11 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold.metrics.json +143 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-italic.hinted.json +11 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-italic.metrics.json +143 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-regular.hinted.json +11 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-regular.metrics.json +143 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/courier-new-regular.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.metrics.json +141 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold.metrics.json +141 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-bold.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-italic.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-italic.metrics.json +143 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-italic.rows.json +8 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-regular.hinted.json +125 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-regular.metrics.json +141 -0
- package/screenshot-page/resources/fonts/@sheetxl/sdk/times-new-roman-regular.rows.json +8 -0
- package/screenshot-page/resources/locales/@sheetxl/formulas/contents.json +9 -0
- package/screenshot-page/resources/locales/@sheetxl/formulas/de/functions.json +298 -0
- package/screenshot-page/resources/locales/@sheetxl/formulas-extended/contents.json +9 -0
- package/screenshot-page/resources/locales/@sheetxl/formulas-extended/de/functions.json +59 -0
- package/screenshot-page/resources/locales/@sheetxl/sdk/contents.json +19 -0
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/grammar.json +16 -0
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +710 -0
- package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +732 -0
- package/types/index.d.ts +1 -0
- package/types/lib.d.ts +2 -0
- package/types/scripting-api.json +10855 -0
- package/types/scripting-enums.json +1339 -0
- package/types/scripting.d.ts +49295 -0
- package/types/src/SessionRegistry.d.ts +630 -0
- package/types/src/index.d.ts +3 -0
- package/types/src/instances.d.ts +104 -0
- package/types/src/lib/Types.d.ts +17 -0
- package/types/src/lib/index.d.ts +2 -0
- package/types/src/lib/runReport.d.ts +158 -0
- package/types/src/lib.d.ts +2 -0
- package/types/src/prepareRun.d.ts +56 -0
- package/types/src/relay.d.ts +102 -0
- package/types/src/screenshot.d.ts +23 -0
- package/types/src/server.d.ts +37 -0
- package/types/src/taskStore.d.ts +28 -0
|
@@ -0,0 +1,3011 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.15
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
var t = Object.defineProperty, e = (e, n) => {
|
|
8
|
+
let r = {};
|
|
9
|
+
for (var o in e) t(r, o, {
|
|
10
|
+
get: e[o],
|
|
11
|
+
enumerable: !0
|
|
12
|
+
});
|
|
13
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
14
|
+
}, n = {
|
|
15
|
+
Column: "column",
|
|
16
|
+
Row: "row"
|
|
17
|
+
}, r = {
|
|
18
|
+
...n,
|
|
19
|
+
Both: "both"
|
|
20
|
+
};
|
|
21
|
+
function o(t, e) {
|
|
22
|
+
if (t === e) return !0;
|
|
23
|
+
if (t && e && "object" == typeof t && "object" == typeof e) {
|
|
24
|
+
if (t.constructor !== e.constructor) return !1;
|
|
25
|
+
let n, r, i;
|
|
26
|
+
if (Array.isArray(t)) {
|
|
27
|
+
if (n = t.length, n != e.length) return !1;
|
|
28
|
+
for (r = n; 0 !== r--;) if (!o(t[r], e[r])) return !1;
|
|
29
|
+
return !0;
|
|
30
|
+
}
|
|
31
|
+
if (t instanceof Map && e instanceof Map) {
|
|
32
|
+
if (t.size !== e.size) return !1;
|
|
33
|
+
for (r of t.entries()) if (!e.has(r[0])) return !1;
|
|
34
|
+
for (r of t.entries()) if (!o(r[1], e.get(r[0]))) return !1;
|
|
35
|
+
return !0;
|
|
36
|
+
}
|
|
37
|
+
if (t instanceof Set && e instanceof Set) {
|
|
38
|
+
if (t.size !== e.size) return !1;
|
|
39
|
+
for (r of t.entries()) if (!e.has(r[0])) return !1;
|
|
40
|
+
return !0;
|
|
41
|
+
}
|
|
42
|
+
if (ArrayBuffer.isView(t) && ArrayBuffer.isView(e)) {
|
|
43
|
+
if (n = t.length, n != e.length) return !1;
|
|
44
|
+
for (r = n; 0 !== r--;) if (t[r] !== e[r]) return !1;
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
if (t.constructor === RegExp) return t.source === e.source && t.flags === e.flags;
|
|
48
|
+
if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === e.valueOf();
|
|
49
|
+
if (t.toString !== Object.prototype.toString) return t.toString() === e.toString();
|
|
50
|
+
if (i = Object.keys(t), n = i.length, n !== Object.keys(e).length) return !1;
|
|
51
|
+
for (r = n; 0 !== r--;) if (!Object.prototype.hasOwnProperty.call(e, i[r])) return !1;
|
|
52
|
+
for (r = n; 0 !== r--;) {
|
|
53
|
+
let n = i[r];
|
|
54
|
+
if (!("_owner" === n && t.$$typeof || o(t[n], e[n]))) return !1;
|
|
55
|
+
}
|
|
56
|
+
return !0;
|
|
57
|
+
}
|
|
58
|
+
return t != t && e != e;
|
|
59
|
+
}
|
|
60
|
+
var i = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103;
|
|
61
|
+
function s(t) {
|
|
62
|
+
return function(t) {
|
|
63
|
+
return !!t && "object" == typeof t;
|
|
64
|
+
}(t) && !function(t) {
|
|
65
|
+
const e = Object.prototype.toString.call(t);
|
|
66
|
+
return "[object RegExp]" === e || "[object Date]" === e || function(t) {
|
|
67
|
+
return t.$$typeof === i;
|
|
68
|
+
}(t);
|
|
69
|
+
}(t);
|
|
70
|
+
}
|
|
71
|
+
function a(t, e) {
|
|
72
|
+
return !1 !== e.clone && e.isMergeableObject(t) ? d((n = t, Array.isArray(n) ? [] : {}), t, e) : t;
|
|
73
|
+
var n;
|
|
74
|
+
}
|
|
75
|
+
function l(t, e, n) {
|
|
76
|
+
return t.concat(e).map(function(t) {
|
|
77
|
+
return a(t, n);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function c(t) {
|
|
81
|
+
return Object.keys(t).concat(function(t) {
|
|
82
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) {
|
|
83
|
+
return Object.propertyIsEnumerable.call(t, e);
|
|
84
|
+
}) : [];
|
|
85
|
+
}(t));
|
|
86
|
+
}
|
|
87
|
+
function u(t, e) {
|
|
88
|
+
try {
|
|
89
|
+
return e in t;
|
|
90
|
+
} catch (t) {
|
|
91
|
+
return !1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function d(t, e, n) {
|
|
95
|
+
(n = n || {}).arrayMerge = n.arrayMerge || l, n.isMergeableObject = n.isMergeableObject || s, n.cloneUnlessOtherwiseSpecified = a;
|
|
96
|
+
const r = Array.isArray(e);
|
|
97
|
+
return r !== Array.isArray(t) ? a(e, n) : r ? n.arrayMerge(t, e, n) : function(t, e, n) {
|
|
98
|
+
const r = {};
|
|
99
|
+
return n.isMergeableObject(t) && c(t).forEach(function(e) {
|
|
100
|
+
r[e] = a(t[e], n);
|
|
101
|
+
}), c(e).forEach(function(o) {
|
|
102
|
+
(function(t, e) {
|
|
103
|
+
return u(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e));
|
|
104
|
+
})(t, o) || (u(t, o) && n.isMergeableObject(e[o]) ? r[o] = function(t, e) {
|
|
105
|
+
if (!e.customMerge) return d;
|
|
106
|
+
const n = e.customMerge(t);
|
|
107
|
+
return "function" == typeof n ? n : d;
|
|
108
|
+
}(o, n)(t[o], e[o], n) : r[o] = a(e[o], n));
|
|
109
|
+
}), r;
|
|
110
|
+
}(t, e, n);
|
|
111
|
+
}
|
|
112
|
+
d.all = function(t, e) {
|
|
113
|
+
if (!Array.isArray(t)) throw new Error("first argument should be an array");
|
|
114
|
+
return t.reduce(function(t, n) {
|
|
115
|
+
return d(t, n, e);
|
|
116
|
+
}, {});
|
|
117
|
+
};
|
|
118
|
+
var h = e({
|
|
119
|
+
DonePromise: () => p,
|
|
120
|
+
EmptyArray: () => f,
|
|
121
|
+
EmptyObject: () => w,
|
|
122
|
+
OSType: () => tt,
|
|
123
|
+
arrayMove: () => z,
|
|
124
|
+
asNumber: () => b,
|
|
125
|
+
camelToPrettyCase: () => y,
|
|
126
|
+
castToString: () => H,
|
|
127
|
+
cloneObject: () => O,
|
|
128
|
+
consoleWithNoSource: () => Q,
|
|
129
|
+
deepEqual: () => o,
|
|
130
|
+
deepFreeze: () => nt,
|
|
131
|
+
deepMerge: () => d,
|
|
132
|
+
diffValues: () => $,
|
|
133
|
+
findEqualOrGreater: () => F,
|
|
134
|
+
findEqualOrLesser: () => D,
|
|
135
|
+
getFromPath: () => Z,
|
|
136
|
+
getPlatform: () => et,
|
|
137
|
+
isDefined: () => J,
|
|
138
|
+
isEmpty: () => G,
|
|
139
|
+
isEqualArrays: () => R,
|
|
140
|
+
isEqualBounds: () => A,
|
|
141
|
+
isNullOrUndefined: () => q,
|
|
142
|
+
isNumeric: () => v,
|
|
143
|
+
isObject: () => j,
|
|
144
|
+
isPromiseLike: () => W,
|
|
145
|
+
isRectInsideRect: () => X,
|
|
146
|
+
isRectIntersect: () => V,
|
|
147
|
+
mergeContentful: () => B,
|
|
148
|
+
removeEmptyProperties: () => M,
|
|
149
|
+
removeEqualValues: () => U,
|
|
150
|
+
removeEqualValuesLayered: () => N,
|
|
151
|
+
removeListenerAll: () => T,
|
|
152
|
+
roundAccurately: () => C,
|
|
153
|
+
setToPath: () => Y,
|
|
154
|
+
splitNumber: () => I,
|
|
155
|
+
subtractRect: () => K,
|
|
156
|
+
textToKey: () => _,
|
|
157
|
+
toSafeJSON: () => rt,
|
|
158
|
+
transpose: () => P,
|
|
159
|
+
uuidV4: () => E,
|
|
160
|
+
validEnumValue: () => m
|
|
161
|
+
}), f = Object.freeze([]), w = Object.freeze({}), p = Promise.resolve(), g = (t) => t;
|
|
162
|
+
function m(t, e) {
|
|
163
|
+
if (!Object.values(t).includes(e)) throw new Error(`Invalid type: ${e ?? "null"}. Must be one of: ${Object.values(t).join(", ")}.`);
|
|
164
|
+
}
|
|
165
|
+
function y(t) {
|
|
166
|
+
return t ? t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/^./, (t) => t.toUpperCase()) : "";
|
|
167
|
+
}
|
|
168
|
+
function _(t) {
|
|
169
|
+
return t.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
170
|
+
}
|
|
171
|
+
var S = Array.from({ length: 256 }, (t, e) => (e + 256).toString(16).slice(1));
|
|
172
|
+
function E() {
|
|
173
|
+
const t = globalThis.crypto;
|
|
174
|
+
if (t?.randomUUID) return t.randomUUID();
|
|
175
|
+
if (t?.getRandomValues) {
|
|
176
|
+
const e = t.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
177
|
+
return e[6] = 15 & e[6] | 64, e[8] = 63 & e[8] | 128, S[e[0]] + S[e[1]] + S[e[2]] + S[e[3]] + "-" + S[e[4]] + S[e[5]] + "-" + S[e[6]] + S[e[7]] + "-" + S[e[8]] + S[e[9]] + "-" + S[e[10]] + S[e[11]] + S[e[12]] + S[e[13]] + S[e[14]] + S[e[15]];
|
|
178
|
+
}
|
|
179
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
180
|
+
let e = 16 * Math.random() | 0;
|
|
181
|
+
return ("x" === t ? e : 3 & e | 8).toString(16);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function b(t) {
|
|
185
|
+
const e = function(t) {
|
|
186
|
+
return 1 * t;
|
|
187
|
+
}(t);
|
|
188
|
+
return Number.isFinite(e) ? e : 0;
|
|
189
|
+
}
|
|
190
|
+
function v(t) {
|
|
191
|
+
const e = 1 * t;
|
|
192
|
+
return Number.isFinite(e) && "number" == typeof e;
|
|
193
|
+
}
|
|
194
|
+
var x = [
|
|
195
|
+
1,
|
|
196
|
+
10,
|
|
197
|
+
100,
|
|
198
|
+
1e3,
|
|
199
|
+
1e4,
|
|
200
|
+
1e5,
|
|
201
|
+
1e6,
|
|
202
|
+
1e7,
|
|
203
|
+
1e8,
|
|
204
|
+
1e9,
|
|
205
|
+
1e10,
|
|
206
|
+
1e11,
|
|
207
|
+
0xe8d4a51000,
|
|
208
|
+
0x9184e72a000,
|
|
209
|
+
0x5af3107a4000,
|
|
210
|
+
0x38d7ea4c68000,
|
|
211
|
+
0x2386f26fc10000
|
|
212
|
+
];
|
|
213
|
+
function I(t) {
|
|
214
|
+
const e = Math.abs(t);
|
|
215
|
+
if (!Number.isFinite(e)) return null;
|
|
216
|
+
let n = Math.trunc(e);
|
|
217
|
+
const r = e - n;
|
|
218
|
+
let o;
|
|
219
|
+
n > Number.MAX_SAFE_INTEGER ? o = Number(n.toExponential().split("e")[1]) + 1 : (o = Math.ceil(Math.log10(n + 1)), x[o] <= n && o++);
|
|
220
|
+
let i = 0, s = 0;
|
|
221
|
+
const a = 15 - o;
|
|
222
|
+
if (r > 0 && a > 0) {
|
|
223
|
+
const t = x[a];
|
|
224
|
+
if (i = Math.round(r * t), i === t) n++, i = 0, n >= x[o] && o++;
|
|
225
|
+
else if (i > 0) for (s = a; i % 10 == 0;) i /= 10, s--;
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
ip: t < 0 ? -n : n,
|
|
229
|
+
fp: i,
|
|
230
|
+
ipLength: o,
|
|
231
|
+
fpLength: s
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function C(t, e = 0) {
|
|
235
|
+
if (null == t || !isFinite(t)) return null;
|
|
236
|
+
const n = 10 ** e;
|
|
237
|
+
return Number(Math.round(t * n) / n);
|
|
238
|
+
}
|
|
239
|
+
function O(t) {
|
|
240
|
+
return q(t) ? t : JSON.parse(JSON.stringify(t));
|
|
241
|
+
}
|
|
242
|
+
var k = (t, e) => t === e;
|
|
243
|
+
function R(t, e, n) {
|
|
244
|
+
if (t === e) return !0;
|
|
245
|
+
if (!Array.isArray(t) || !Array.isArray(e) || t.length !== e.length) return !1;
|
|
246
|
+
n || (n = k);
|
|
247
|
+
const r = t.length;
|
|
248
|
+
for (let o = 0; o < r; o++) if (!n(t[o], e[o])) return !1;
|
|
249
|
+
return !0;
|
|
250
|
+
}
|
|
251
|
+
function A(t, e) {
|
|
252
|
+
return t === e || !(!t || !e) && t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
253
|
+
}
|
|
254
|
+
function j(t) {
|
|
255
|
+
return "object" == typeof t && !Array.isArray(t) && null !== t;
|
|
256
|
+
}
|
|
257
|
+
function M(t) {
|
|
258
|
+
if ("object" != typeof t || Array.isArray(t) || null === t) return t;
|
|
259
|
+
const e = t;
|
|
260
|
+
return Object.keys(e).forEach(function(t) {
|
|
261
|
+
e[t] && "object" == typeof e[t] ? M(e[t]) : null !== e[t] && void 0 !== e[t] || delete e[t], "object" == typeof e[t] && 0 === Object.keys(e[t]).length && delete e[t];
|
|
262
|
+
}), 0 === Object.keys(t).length ? null : t;
|
|
263
|
+
}
|
|
264
|
+
function T(t, e) {
|
|
265
|
+
if (!t) return f;
|
|
266
|
+
const n = t.length;
|
|
267
|
+
for (let r = 0; r < n; r++) {
|
|
268
|
+
const n = t[r];
|
|
269
|
+
n && n(e);
|
|
270
|
+
}
|
|
271
|
+
return f;
|
|
272
|
+
}
|
|
273
|
+
function P(t) {
|
|
274
|
+
if (!t) return t;
|
|
275
|
+
const e = t.length, n = t[0].length, r = [];
|
|
276
|
+
for (let t = 0; t < n; t++) r[t] = Array(e);
|
|
277
|
+
for (let o = 0; o < e; o++) {
|
|
278
|
+
const e = t[o];
|
|
279
|
+
for (let t = 0; t < n; t++) r[t][o] = e[t];
|
|
280
|
+
}
|
|
281
|
+
return r;
|
|
282
|
+
}
|
|
283
|
+
var L = (t, e) => !(t !== e && !R(t, e) && !t.isEqual?.(e));
|
|
284
|
+
function U(t, e, n = L) {
|
|
285
|
+
if (null == t || t === e) return null;
|
|
286
|
+
if (!t || "object" != typeof t || Array.isArray(t) || t.isImmutable?.()) return n(t, e) ? null : t;
|
|
287
|
+
const r = Object.keys(t), o = r.length;
|
|
288
|
+
if (0 === o) return null;
|
|
289
|
+
let i = !1;
|
|
290
|
+
for (let s = 0; s < o; s++) {
|
|
291
|
+
const o = r[s];
|
|
292
|
+
null === U(t[o], e?.[o], n) && (i = !0, delete t[o]);
|
|
293
|
+
}
|
|
294
|
+
return i && 0 === Object.keys(t).length ? null : void 0;
|
|
295
|
+
}
|
|
296
|
+
function N(t, e, n = L) {
|
|
297
|
+
if (null == t) return !0;
|
|
298
|
+
if (!t || "object" != typeof t || Array.isArray(t) || t.isImmutable?.()) {
|
|
299
|
+
let r, o = !1;
|
|
300
|
+
for (let t = 0; !o && t < e.length; t++) void 0 !== e[t] && (o = !0, r = e[t]);
|
|
301
|
+
return o && (t === r || n(t, r));
|
|
302
|
+
}
|
|
303
|
+
const r = Object.keys(t), o = r.length;
|
|
304
|
+
if (0 === o) return !0;
|
|
305
|
+
const i = e.length;
|
|
306
|
+
let s = !1;
|
|
307
|
+
for (let a = 0; a < o; a++) {
|
|
308
|
+
const o = r[a], l = [];
|
|
309
|
+
for (let t = 0; t < i; t++) {
|
|
310
|
+
const n = e[t], r = null != n ? n[o] : void 0;
|
|
311
|
+
void 0 !== r && l.push(r);
|
|
312
|
+
}
|
|
313
|
+
N(t[o], l, n) && (s = !0, delete t[o]);
|
|
314
|
+
}
|
|
315
|
+
return s && 0 === Object.keys(t).length;
|
|
316
|
+
}
|
|
317
|
+
function B(...t) {
|
|
318
|
+
const e = t.length;
|
|
319
|
+
if (e > 0 && void 0 !== t[e - 1] && !j(t[e - 1])) return t[e - 1];
|
|
320
|
+
let n = t[0] || {};
|
|
321
|
+
for (let r = 1; r < e; r++) n = d(n, t[r] || {}, { arrayMerge: (t, e) => [...e] });
|
|
322
|
+
return n;
|
|
323
|
+
}
|
|
324
|
+
function $(t, e) {
|
|
325
|
+
const n = {}, r = Object.keys(e), o = r.length;
|
|
326
|
+
for (let i = 0; i < o; i++) {
|
|
327
|
+
const o = r[i], s = t[o], a = e[o];
|
|
328
|
+
s !== a && (n[o] = void 0 === s ? a : s);
|
|
329
|
+
}
|
|
330
|
+
return 0 === Object.keys(n).length ? null : n;
|
|
331
|
+
}
|
|
332
|
+
function F(t, e, n = g) {
|
|
333
|
+
let r = 0, o = t.length - 1;
|
|
334
|
+
for (; r <= o;) {
|
|
335
|
+
const i = Math.floor((r + o) / 2), s = n(t[i]);
|
|
336
|
+
if (s === e) return i;
|
|
337
|
+
s < e ? r = i + 1 : o = i - 1;
|
|
338
|
+
}
|
|
339
|
+
return r;
|
|
340
|
+
}
|
|
341
|
+
function D(t, e, n = g) {
|
|
342
|
+
let r = t.length - 1, o = 0;
|
|
343
|
+
for (; r >= o;) {
|
|
344
|
+
const i = Math.floor((r + o) / 2), s = n(t[i]);
|
|
345
|
+
if (s === e) return i;
|
|
346
|
+
s > e ? r = i - 1 : o = i + 1;
|
|
347
|
+
}
|
|
348
|
+
return r;
|
|
349
|
+
}
|
|
350
|
+
function z(t, e, n) {
|
|
351
|
+
const r = t.slice();
|
|
352
|
+
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(e, 1)[0]), r;
|
|
353
|
+
}
|
|
354
|
+
function H(t) {
|
|
355
|
+
return null == t || void 0 === t ? "" : "string" != typeof t ? "" + t : t;
|
|
356
|
+
}
|
|
357
|
+
function q(t) {
|
|
358
|
+
return null == t;
|
|
359
|
+
}
|
|
360
|
+
function J(t) {
|
|
361
|
+
return !(null == t);
|
|
362
|
+
}
|
|
363
|
+
function G(t) {
|
|
364
|
+
return null == t || "" === t;
|
|
365
|
+
}
|
|
366
|
+
function W(t) {
|
|
367
|
+
return !!t && "function" == typeof t.then;
|
|
368
|
+
}
|
|
369
|
+
function V(t, e) {
|
|
370
|
+
return !(e.left > t.right || e.right < t.left || e.top > t.bottom || e.bottom < t.top);
|
|
371
|
+
}
|
|
372
|
+
function X(t, e) {
|
|
373
|
+
return t.top >= e.top && t.bottom <= e.bottom && t.left >= e.left && t.right <= e.right;
|
|
374
|
+
}
|
|
375
|
+
function K(t, e, n = !1) {
|
|
376
|
+
if (!e) return [t];
|
|
377
|
+
if (!V(t, e)) return [];
|
|
378
|
+
const r = [];
|
|
379
|
+
let o = t;
|
|
380
|
+
const i = () => {
|
|
381
|
+
e.top > o.top && e.top < o.bottom && (r.push({
|
|
382
|
+
...o,
|
|
383
|
+
bottom: e.top
|
|
384
|
+
}), o = {
|
|
385
|
+
...o,
|
|
386
|
+
top: e.top
|
|
387
|
+
});
|
|
388
|
+
}, s = () => {
|
|
389
|
+
e.bottom > o.top && e.bottom < o.bottom && (r.push({
|
|
390
|
+
...o,
|
|
391
|
+
top: e.bottom
|
|
392
|
+
}), o = {
|
|
393
|
+
...o,
|
|
394
|
+
bottom: e.bottom
|
|
395
|
+
});
|
|
396
|
+
}, a = () => {
|
|
397
|
+
e.right > o.left && e.right < o.right && (r.push({
|
|
398
|
+
...o,
|
|
399
|
+
left: e.right
|
|
400
|
+
}), o = {
|
|
401
|
+
...o,
|
|
402
|
+
right: e.right
|
|
403
|
+
});
|
|
404
|
+
}, l = () => {
|
|
405
|
+
e.left > o.left && e.left < o.right && (r.push({
|
|
406
|
+
...o,
|
|
407
|
+
right: e.left
|
|
408
|
+
}), o = {
|
|
409
|
+
...o,
|
|
410
|
+
left: e.left
|
|
411
|
+
});
|
|
412
|
+
};
|
|
413
|
+
return n ? (l(), a(), i(), s()) : (i(), s(), a(), l()), r;
|
|
414
|
+
}
|
|
415
|
+
function Z(t, e) {
|
|
416
|
+
const n = e.split(".");
|
|
417
|
+
let r = t;
|
|
418
|
+
const o = n.length;
|
|
419
|
+
for (let t = 0; t < o; t++) {
|
|
420
|
+
const e = n[t];
|
|
421
|
+
if (!r) return null;
|
|
422
|
+
let o = r[e];
|
|
423
|
+
if ("function" == typeof o && (o = o.bind(r)()), !o || !j(o)) return o;
|
|
424
|
+
r = o;
|
|
425
|
+
}
|
|
426
|
+
return r ?? null;
|
|
427
|
+
}
|
|
428
|
+
function Y(t, e, n) {
|
|
429
|
+
const r = e.split(".");
|
|
430
|
+
let o = t;
|
|
431
|
+
if (!o) throw new Error("Can not set path to a null path.");
|
|
432
|
+
const i = r.length;
|
|
433
|
+
for (let t = 0; o && t < i - 1; t++) {
|
|
434
|
+
const e = r[t];
|
|
435
|
+
let n = o[e];
|
|
436
|
+
if (n ?? (n = {}, o[e] = n), !j(n)) throw new Error("Can not set path to a non object path.");
|
|
437
|
+
o = n;
|
|
438
|
+
}
|
|
439
|
+
if ("number" != typeof n && "boolean" != typeof n && "string" != typeof n && !j(n)) throw new Error(`Can not set path to ${n} that is not a a supported primitive.`);
|
|
440
|
+
return o[r[i - 1]] = n, t;
|
|
441
|
+
}
|
|
442
|
+
function Q(...t) {
|
|
443
|
+
return new Promise((e) => {
|
|
444
|
+
setTimeout(() => {
|
|
445
|
+
Function("console.log.apply(console, arguments)").apply(null, t), e();
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
var tt = {
|
|
450
|
+
Windows: "windows",
|
|
451
|
+
MacOS: "macos",
|
|
452
|
+
IOS: "ios",
|
|
453
|
+
Linux: "linux",
|
|
454
|
+
Android: "android",
|
|
455
|
+
Safari: "safari",
|
|
456
|
+
Firefox: "firefox",
|
|
457
|
+
Unknown: "unknown"
|
|
458
|
+
};
|
|
459
|
+
function et() {
|
|
460
|
+
const t = void 0 !== globalThis.navigator && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";
|
|
461
|
+
return t ? /(win32|win64|windows|wince)/i.test(t) ? tt.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(t) ? tt.MacOS : /(iphone|ipad|ipod)/i.test(t) ? tt.IOS : /android/.test(t) ? tt.Android : /linux/.test(t) ? tt.Linux : /^((?!chrome|android|).)*safari/i.test(t) ? tt.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(t) ? tt.Firefox : tt.Unknown : tt.Unknown;
|
|
462
|
+
}
|
|
463
|
+
function nt(t) {
|
|
464
|
+
Object.freeze(t);
|
|
465
|
+
const e = t;
|
|
466
|
+
return Object.keys(e).forEach((t) => {
|
|
467
|
+
"object" != typeof e[t] || null === e[t] || Object.isFrozen(e[t]) || nt(e[t]);
|
|
468
|
+
}), t;
|
|
469
|
+
}
|
|
470
|
+
function rt(t) {
|
|
471
|
+
if (null === t || "object" != typeof t) return t;
|
|
472
|
+
if ("function" == typeof t.toJSON) return t.toJSON();
|
|
473
|
+
if (Array.isArray(t)) return t.map((t) => rt(t));
|
|
474
|
+
if ("function" == typeof t.toString && t.toString !== Object.prototype.toString) return t.toString();
|
|
475
|
+
const e = {};
|
|
476
|
+
for (const n in t) t.hasOwnProperty(n) && (e[n] = rt(t[n]));
|
|
477
|
+
return e;
|
|
478
|
+
}
|
|
479
|
+
var ot = e({
|
|
480
|
+
EmptyCell: () => it,
|
|
481
|
+
EmptyRange: () => st,
|
|
482
|
+
EmptyRanges: () => at,
|
|
483
|
+
EmptySelection: () => lt,
|
|
484
|
+
InsertCutShift: () => zt,
|
|
485
|
+
cellToRange: () => Ct,
|
|
486
|
+
classifyInsertCut: () => Ht,
|
|
487
|
+
columnFirstCellComparator: () => ft,
|
|
488
|
+
columnFirstRangeComparator: () => ct,
|
|
489
|
+
createCellComparator: () => yt,
|
|
490
|
+
createConflatingRanges: () => Dt,
|
|
491
|
+
createRangeComparator: () => mt,
|
|
492
|
+
defaultRange: () => Nt,
|
|
493
|
+
extendRangeToIntersectingRanges: () => Tt,
|
|
494
|
+
extendRangeToUnionRanges: () => Mt,
|
|
495
|
+
intersectRanges: () => Ot,
|
|
496
|
+
isCellWithinRange: () => Et,
|
|
497
|
+
isEqualCells: () => _t,
|
|
498
|
+
isEqualRanges: () => St,
|
|
499
|
+
isEqualRangesArrays: () => xt,
|
|
500
|
+
isEqualSelectionCoords: () => Rt,
|
|
501
|
+
isRangeWithinRange: () => bt,
|
|
502
|
+
isRangesIntersect: () => vt,
|
|
503
|
+
isRefusedInsertCut: () => qt,
|
|
504
|
+
isSingleCell: () => It,
|
|
505
|
+
isValidRange: () => jt,
|
|
506
|
+
mergeRangeCoordValues: () => Ft,
|
|
507
|
+
reverseColumnFirstCellComparator: () => gt,
|
|
508
|
+
reverseColumnFirstRangeComparator: () => ht,
|
|
509
|
+
reverseRowFirstCellComparator: () => pt,
|
|
510
|
+
reverseRowFirstRangeComparator: () => dt,
|
|
511
|
+
rowFirstCellComparator: () => wt,
|
|
512
|
+
rowFirstRangeComparator: () => ut,
|
|
513
|
+
sanitizeRange: () => Lt,
|
|
514
|
+
sanitizeRangeArray: () => Ut,
|
|
515
|
+
translateRange: () => Pt,
|
|
516
|
+
unionRanges: () => kt,
|
|
517
|
+
unionRangesArrays: () => At
|
|
518
|
+
}), it = Object.freeze({
|
|
519
|
+
colIndex: 0,
|
|
520
|
+
rowIndex: 0
|
|
521
|
+
}), st = Object.freeze({
|
|
522
|
+
colStart: 0,
|
|
523
|
+
rowStart: 0,
|
|
524
|
+
colEnd: 0,
|
|
525
|
+
rowEnd: 0
|
|
526
|
+
}), at = f, lt = Object.freeze({
|
|
527
|
+
cell: it,
|
|
528
|
+
ranges: f,
|
|
529
|
+
rangeIndex: -1
|
|
530
|
+
});
|
|
531
|
+
function ct(t, e) {
|
|
532
|
+
return t.colStart === e.colStart ? t.rowStart - e.rowStart : t.colStart - e.colStart;
|
|
533
|
+
}
|
|
534
|
+
function ut(t, e) {
|
|
535
|
+
return t.rowStart === e.rowStart ? t.colStart - e.colStart : t.rowStart - e.rowStart;
|
|
536
|
+
}
|
|
537
|
+
function dt(t, e) {
|
|
538
|
+
return t.rowEnd === e.rowEnd ? e.colEnd - t.colEnd : e.rowEnd - t.rowEnd;
|
|
539
|
+
}
|
|
540
|
+
function ht(t, e) {
|
|
541
|
+
return t.colEnd === e.colEnd ? e.rowEnd - t.rowEnd : e.colEnd - t.colEnd;
|
|
542
|
+
}
|
|
543
|
+
function ft(t, e) {
|
|
544
|
+
return t.colIndex === e.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
|
|
545
|
+
}
|
|
546
|
+
function wt(t, e) {
|
|
547
|
+
return t.rowIndex === e.rowIndex ? t.colIndex - e.colIndex : t.rowIndex - e.rowIndex;
|
|
548
|
+
}
|
|
549
|
+
function pt(t, e) {
|
|
550
|
+
return t.rowIndex === e.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex;
|
|
551
|
+
}
|
|
552
|
+
function gt(t, e) {
|
|
553
|
+
return t.colIndex === e.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex;
|
|
554
|
+
}
|
|
555
|
+
function mt(t = n.Row, e = !1) {
|
|
556
|
+
return e ? t !== n.Column ? dt : ht : t !== n.Column ? ut : ct;
|
|
557
|
+
}
|
|
558
|
+
function yt(t = n.Row, e = !1) {
|
|
559
|
+
return e ? t !== n.Column ? pt : gt : t !== n.Column ? wt : ft;
|
|
560
|
+
}
|
|
561
|
+
function _t(t, e) {
|
|
562
|
+
return t === e || !(!t || !e) && t.rowIndex === e.rowIndex && t.colIndex === e.colIndex && t.scope === e.scope;
|
|
563
|
+
}
|
|
564
|
+
function St(t, e) {
|
|
565
|
+
return t === e || !(!t || !e) && t.rowStart === e.rowStart && t.rowEnd === e.rowEnd && t.colStart === e.colStart && t.colEnd === e.colEnd && t.scope === e.scope;
|
|
566
|
+
}
|
|
567
|
+
function Et(t, e) {
|
|
568
|
+
if (!t || !e) return !1;
|
|
569
|
+
const n = t.rowIndex;
|
|
570
|
+
if (n < e.rowStart || n > e.rowEnd) return !1;
|
|
571
|
+
const r = t.colIndex;
|
|
572
|
+
return !(r < e.colStart || r > e.colEnd);
|
|
573
|
+
}
|
|
574
|
+
function bt(t, e) {
|
|
575
|
+
return !(!t || !e || t.rowStart < e.rowStart || t.rowEnd > e.rowEnd || t.colStart < e.colStart || t.colEnd > e.colEnd);
|
|
576
|
+
}
|
|
577
|
+
function vt(t, e) {
|
|
578
|
+
return !(!t || !e || t.colStart > e.colEnd || e.colStart > t.colEnd || t.rowStart > e.rowEnd || e.rowStart > t.rowEnd);
|
|
579
|
+
}
|
|
580
|
+
function xt(t, e) {
|
|
581
|
+
if (t === e) return !0;
|
|
582
|
+
if (!t || !e) return !1;
|
|
583
|
+
if (t.length !== e.length) return !1;
|
|
584
|
+
for (let n = 0; n < t.length; n++) if (!St(t[n], e[n])) return !1;
|
|
585
|
+
return !0;
|
|
586
|
+
}
|
|
587
|
+
function It(t) {
|
|
588
|
+
return !!t && t.rowEnd === t.rowStart && t.colStart === t.colEnd;
|
|
589
|
+
}
|
|
590
|
+
function Ct(t, e) {
|
|
591
|
+
if (!t) return null;
|
|
592
|
+
let n = e;
|
|
593
|
+
return n || (n = { ...t }, delete n.colIndex, delete n.rowIndex), n.colStart = t.colIndex ?? 0, n.rowStart = t.rowIndex ?? 0, n.colEnd = t.colIndex ?? 0, n.rowEnd = t.rowIndex ?? 0, n;
|
|
594
|
+
}
|
|
595
|
+
function Ot(t, e, n) {
|
|
596
|
+
if (!t) return n ? e : { ...e };
|
|
597
|
+
if (!e) return n ? t : { ...t };
|
|
598
|
+
if (!t && !e) return null;
|
|
599
|
+
if (t.rowStart > e.rowEnd || t.rowEnd < e.rowStart || t.colStart > e.colEnd || t.colEnd < e.colStart) return null;
|
|
600
|
+
const r = Math.max(t.colStart, e.colStart), o = Math.max(t.rowStart, e.rowStart), i = Math.min(t.colEnd, e.colEnd), s = Math.min(t.rowEnd, e.rowEnd);
|
|
601
|
+
let a = n;
|
|
602
|
+
return a ? (a.colStart = r, a.rowStart = o, a.colEnd = i, a.rowEnd = s) : a = {
|
|
603
|
+
colStart: r,
|
|
604
|
+
rowStart: o,
|
|
605
|
+
colEnd: i,
|
|
606
|
+
rowEnd: s
|
|
607
|
+
}, a;
|
|
608
|
+
}
|
|
609
|
+
function kt(t, e, n) {
|
|
610
|
+
if (!t && !e) return null;
|
|
611
|
+
if (!t) return n ? e : { ...e };
|
|
612
|
+
if (!e) return n ? t : { ...t };
|
|
613
|
+
const r = Math.min(t.colStart, e.colStart), o = Math.min(t.rowStart, e.rowStart), i = Math.max(t.colEnd, e.colEnd), s = Math.max(t.rowEnd, e.rowEnd);
|
|
614
|
+
let a = n;
|
|
615
|
+
return a ? (a.colStart = r, a.rowStart = o, a.colEnd = i, a.rowEnd = s) : a = {
|
|
616
|
+
colStart: r,
|
|
617
|
+
rowStart: o,
|
|
618
|
+
colEnd: i,
|
|
619
|
+
rowEnd: s
|
|
620
|
+
}, a;
|
|
621
|
+
}
|
|
622
|
+
function Rt(t, e) {
|
|
623
|
+
return t === e || !(!t || !e) && t.rangeIndex === e.rangeIndex && !!_t(t.cell, e.cell) && xt(t.ranges, e.ranges);
|
|
624
|
+
}
|
|
625
|
+
function At(t, e, n) {
|
|
626
|
+
if (!t || 0 === t.length) return null;
|
|
627
|
+
if (1 === t.length && !e) return t[0];
|
|
628
|
+
let r = t[0];
|
|
629
|
+
for (let e = 1; e < t.length; e++) r = kt(r, t[e], n);
|
|
630
|
+
return e && (r = kt(r, e, n)), r;
|
|
631
|
+
}
|
|
632
|
+
function jt(t) {
|
|
633
|
+
return !(!t || "number" != typeof t.colStart || t.colStart < 0 || "number" != typeof t.colEnd || t.colEnd < t.colStart || "number" != typeof t.rowStart || t.rowStart < 0 || "number" != typeof t.rowEnd || t.rowEnd < t.rowStart);
|
|
634
|
+
}
|
|
635
|
+
function Mt(t, e) {
|
|
636
|
+
if (!e || 0 === e.length) return t;
|
|
637
|
+
let n = t, r = null;
|
|
638
|
+
for (; !St(n, r);) r = n, n = Tt(r, e);
|
|
639
|
+
return n;
|
|
640
|
+
}
|
|
641
|
+
function Tt(t, e) {
|
|
642
|
+
if (!e || 0 === e.length) return t;
|
|
643
|
+
const n = { ...t };
|
|
644
|
+
for (let t = 0; t < e.length; t++) {
|
|
645
|
+
const r = e[t];
|
|
646
|
+
vt(n, r) && (n.rowStart = Math.min(n.rowStart, r.rowStart), n.colStart = Math.min(n.colStart, r.colStart), n.rowEnd = Math.max(n.rowEnd, r.rowEnd), n.colEnd = Math.max(n.colEnd, r.colEnd));
|
|
647
|
+
}
|
|
648
|
+
return n;
|
|
649
|
+
}
|
|
650
|
+
function Pt(t, e = -t.rowStart, n = -t.colStart, r) {
|
|
651
|
+
return r ? (r.colStart = t.colStart + n, r.rowStart = t.rowStart + e, r.colEnd = t.colEnd + n, r.rowEnd = t.rowEnd + e, r) : {
|
|
652
|
+
colStart: t.colStart + n,
|
|
653
|
+
rowStart: t.rowStart + e,
|
|
654
|
+
colEnd: t.colEnd + n,
|
|
655
|
+
rowEnd: t.rowEnd + e
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
function Lt(t, e) {
|
|
659
|
+
return t ? t.scope ? {
|
|
660
|
+
colStart: t.colIndex ?? t.colStart ?? e?.colStart ?? 0,
|
|
661
|
+
rowStart: t.rowIndex ?? t.rowStart ?? e?.rowStart ?? 0,
|
|
662
|
+
colEnd: t.colIndex ?? t.colEnd ?? e?.colEnd ?? 0,
|
|
663
|
+
rowEnd: t.rowIndex ?? t.rowEnd ?? e?.rowEnd ?? 0,
|
|
664
|
+
scope: t.scope
|
|
665
|
+
} : {
|
|
666
|
+
colStart: t.colIndex ?? t.colStart ?? e?.colStart ?? 0,
|
|
667
|
+
rowStart: t.rowIndex ?? t.rowStart ?? e?.rowStart ?? 0,
|
|
668
|
+
colEnd: t.colIndex ?? t.colEnd ?? e?.colEnd ?? 0,
|
|
669
|
+
rowEnd: t.rowIndex ?? t.rowEnd ?? e?.rowEnd ?? 0
|
|
670
|
+
} : null;
|
|
671
|
+
}
|
|
672
|
+
function Ut(t, e) {
|
|
673
|
+
if (!t) return null;
|
|
674
|
+
const n = t.length, r = new Array(n);
|
|
675
|
+
for (let o = 0; o < n; o++) r[o] = Lt(t[o], e);
|
|
676
|
+
return r;
|
|
677
|
+
}
|
|
678
|
+
function Nt(t, e, n) {
|
|
679
|
+
return t ? n ? (n.colStart = t.colStart ?? e.colStart, n.rowStart = t.rowStart ?? e.rowStart, n.colEnd = t.colEnd ?? e.colEnd, n.rowEnd = t.rowEnd ?? e.rowEnd, n) : {
|
|
680
|
+
colStart: t.colStart ?? e.colStart,
|
|
681
|
+
rowStart: t.rowStart ?? e.rowStart,
|
|
682
|
+
colEnd: t.colEnd ?? e.colEnd,
|
|
683
|
+
rowEnd: t.rowEnd ?? e.rowEnd
|
|
684
|
+
} : e;
|
|
685
|
+
}
|
|
686
|
+
var Bt = [null, null], $t = (t, e, n) => {
|
|
687
|
+
if (t[0].value === t[1].value) return e;
|
|
688
|
+
};
|
|
689
|
+
function Ft(t, e = 2, r, o = n.Row, i) {
|
|
690
|
+
let s = [...t];
|
|
691
|
+
if (e <= 0 || t.length <= 1) return s;
|
|
692
|
+
let a = o === n.Column, l = 0, c = !1;
|
|
693
|
+
do {
|
|
694
|
+
const t = s.sort(mt(a ? n.Row : n.Column));
|
|
695
|
+
s = [], s.push(t[0]);
|
|
696
|
+
const e = t.length;
|
|
697
|
+
let u = 0, d = t[0], h = d.colStart, f = d.rowStart, w = d.colEnd, p = d.rowEnd;
|
|
698
|
+
for (let n = 1; n < e; n++) {
|
|
699
|
+
const e = t[n];
|
|
700
|
+
let l = !1;
|
|
701
|
+
if (l = a ? d && f === e.rowStart && p === e.rowEnd && w + 1 === e.colStart : d && h === e.colStart && w === e.colEnd && p + 1 === e.rowStart, l) {
|
|
702
|
+
let t = {
|
|
703
|
+
colStart: h,
|
|
704
|
+
rowStart: f,
|
|
705
|
+
colEnd: a ? e.colEnd : w,
|
|
706
|
+
rowEnd: a ? p : e.rowEnd
|
|
707
|
+
};
|
|
708
|
+
if (void 0 !== d.value && (t.value = d.value), r) {
|
|
709
|
+
const n = i ?? [null, null];
|
|
710
|
+
n[0] = d, n[1] = e, t = r(n, t, o);
|
|
711
|
+
}
|
|
712
|
+
if (t) {
|
|
713
|
+
s[u] = t, c = !0, d = t, h = d.colStart, f = d.rowStart, w = d.colEnd, p = d.rowEnd;
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
s[++u] = e, d = e, h = d.colStart, f = d.rowStart, w = d.colEnd, p = d.rowEnd;
|
|
718
|
+
}
|
|
719
|
+
l++, a = !a, 1 === l && (c = !0);
|
|
720
|
+
} while (l < e && c && s.length > 1);
|
|
721
|
+
return s;
|
|
722
|
+
}
|
|
723
|
+
function Dt(t, e = !1) {
|
|
724
|
+
const r = [];
|
|
725
|
+
let o, i = null, s = Number.MIN_SAFE_INTEGER, a = Number.MIN_SAFE_INTEGER;
|
|
726
|
+
return {
|
|
727
|
+
append: (n, l, c) => {
|
|
728
|
+
let u = !0;
|
|
729
|
+
const d = void 0 !== c;
|
|
730
|
+
if (d) {
|
|
731
|
+
const n = t ? t(o, c, e) : o === c ? c : void 0;
|
|
732
|
+
void 0 === n ? u = !1 : c = n;
|
|
733
|
+
}
|
|
734
|
+
if (u && l === a + 1 && n === s) return e ? i.rowEnd = l : i.colEnd = l, a = l, void (o = c);
|
|
735
|
+
i && r.push(i);
|
|
736
|
+
const h = e ? n : l, f = e ? l : n;
|
|
737
|
+
i = {
|
|
738
|
+
colStart: h,
|
|
739
|
+
rowStart: f,
|
|
740
|
+
colEnd: h,
|
|
741
|
+
rowEnd: f
|
|
742
|
+
}, d && (i.value = c), s = n, a = l, o = c;
|
|
743
|
+
},
|
|
744
|
+
done: (t) => (i && (r.push(i), i = null), t ? Ft(r, 3, !0 === t ? $t : t, e ? n.Column : n.Row, Bt) : r)
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
var zt = {
|
|
748
|
+
Close: "close",
|
|
749
|
+
Blank: "blank",
|
|
750
|
+
Inside: "inside",
|
|
751
|
+
Tear: "tear"
|
|
752
|
+
};
|
|
753
|
+
function Ht(t, e, r) {
|
|
754
|
+
const o = r === n.Row;
|
|
755
|
+
return (o ? t.colStart === e.colStart && t.colEnd === e.colEnd : t.rowStart === e.rowStart && t.rowEnd === e.rowEnd) ? (o ? e.rowStart > t.rowStart && e.rowStart <= t.rowEnd : e.colStart > t.colStart && e.colStart <= t.colEnd) ? zt.Inside : zt.Close : (o ? t.rowEnd >= e.rowStart && t.colStart <= e.colEnd && t.colEnd >= e.colStart : t.colEnd >= e.colStart && t.rowStart <= e.rowEnd && t.rowEnd >= e.rowStart) ? zt.Tear : zt.Blank;
|
|
756
|
+
}
|
|
757
|
+
function qt(t) {
|
|
758
|
+
return t === zt.Inside || t === zt.Tear;
|
|
759
|
+
}
|
|
760
|
+
var Jt, Gt = {
|
|
761
|
+
Up: "up",
|
|
762
|
+
Down: "down",
|
|
763
|
+
Left: "left",
|
|
764
|
+
Right: "right"
|
|
765
|
+
}, Wt = {
|
|
766
|
+
TopLeft: "tl",
|
|
767
|
+
Top: "t",
|
|
768
|
+
TopRight: "tr",
|
|
769
|
+
Left: "l",
|
|
770
|
+
Center: "c",
|
|
771
|
+
Right: "r",
|
|
772
|
+
BottomLeft: "bl",
|
|
773
|
+
Bottom: "b",
|
|
774
|
+
BottomRight: "br"
|
|
775
|
+
}, Vt = {
|
|
776
|
+
Html: "text/html",
|
|
777
|
+
Plain: "text/plain",
|
|
778
|
+
Png: "image/png"
|
|
779
|
+
}, Xt = e({
|
|
780
|
+
findNextCellWithinSelection: () => Zt,
|
|
781
|
+
traverseHiddenHeaders: () => Kt
|
|
782
|
+
});
|
|
783
|
+
function Kt(t, e, n, r) {
|
|
784
|
+
if (!t) return e;
|
|
785
|
+
let o = e;
|
|
786
|
+
const i = n === Gt.Right || n === Gt.Down;
|
|
787
|
+
for (;;) {
|
|
788
|
+
const e = t(o, !i);
|
|
789
|
+
if (0 === e) return o;
|
|
790
|
+
const n = i ? o + e : o - e;
|
|
791
|
+
if (void 0 !== r && (i ? n > r : n < r)) return r;
|
|
792
|
+
o = n;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
function Zt(t, e = Gt.Right, n, r, o, i = null) {
|
|
796
|
+
if (i && Rt(i, t)) return t;
|
|
797
|
+
const s = t.ranges, a = t.rangeIndex, l = s[a];
|
|
798
|
+
if (!vt({
|
|
799
|
+
rowStart: t.cell.rowIndex,
|
|
800
|
+
colStart: t.cell.colIndex,
|
|
801
|
+
rowEnd: t.cell.rowIndex,
|
|
802
|
+
colEnd: t.cell.colIndex
|
|
803
|
+
}, l)) return t;
|
|
804
|
+
let c = { ...t.cell }, u = a;
|
|
805
|
+
switch (e) {
|
|
806
|
+
case Gt.Right:
|
|
807
|
+
c.colIndex = Kt(o, c.colIndex + 1, e, l.colEnd + 1);
|
|
808
|
+
break;
|
|
809
|
+
case Gt.Left:
|
|
810
|
+
c.colIndex = Kt(o, c.colIndex - 1, e, l.colStart - 1);
|
|
811
|
+
break;
|
|
812
|
+
case Gt.Down:
|
|
813
|
+
c.rowIndex = Kt(r, c.rowIndex + 1, e, l.rowEnd + 1);
|
|
814
|
+
break;
|
|
815
|
+
case Gt.Up: c.rowIndex = Kt(r, c.rowIndex - 1, e, l.rowStart - 1);
|
|
816
|
+
}
|
|
817
|
+
const d = (t) => {
|
|
818
|
+
if (t) {
|
|
819
|
+
u = a >= s.length - 1 ? 0 : a + 1;
|
|
820
|
+
const t = s[u];
|
|
821
|
+
c = {
|
|
822
|
+
colIndex: t.colStart,
|
|
823
|
+
rowIndex: t.rowStart
|
|
824
|
+
};
|
|
825
|
+
} else {
|
|
826
|
+
u = a <= 0 ? s.length - 1 : a - 1;
|
|
827
|
+
const t = s[u];
|
|
828
|
+
c = {
|
|
829
|
+
colIndex: t.colEnd,
|
|
830
|
+
rowIndex: t.rowEnd
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
if (e === Gt.Right && c.colIndex > l.colEnd && c.rowIndex === l.rowEnd) d(!0);
|
|
835
|
+
else if (e === Gt.Left && c.colIndex < l.colStart && c.rowIndex === l.rowStart) d(!1);
|
|
836
|
+
else if (e === Gt.Down && c.colIndex === l.colEnd && c.rowIndex > l.rowEnd) d(!0);
|
|
837
|
+
else if (e === Gt.Up && c.colIndex === l.colStart && c.rowIndex < l.rowStart) d(!1);
|
|
838
|
+
else {
|
|
839
|
+
let t = c.rowIndex, n = c.colIndex;
|
|
840
|
+
switch (e) {
|
|
841
|
+
case Gt.Right:
|
|
842
|
+
n > l.colEnd && (t = Kt(r, t + 1, e, l.rowEnd + 1), n = l.colStart, t > l.rowEnd && (t = l.rowStart));
|
|
843
|
+
break;
|
|
844
|
+
case Gt.Left:
|
|
845
|
+
n < l.colStart && (t = Kt(r, t - 1, e, l.rowStart - 1), n = l.colEnd, t < l.rowStart && (t = l.rowEnd));
|
|
846
|
+
break;
|
|
847
|
+
case Gt.Down:
|
|
848
|
+
t > l.rowEnd && (n = Kt(o, n + 1, e, l.colEnd + 1), t = l.rowStart, n > l.colEnd && (n = l.colStart));
|
|
849
|
+
break;
|
|
850
|
+
case Gt.Up: t < l.rowStart && (n = Kt(o, n - 1, e, l.colStart - 1), t = l.rowEnd, n < l.colStart && (n = l.colEnd));
|
|
851
|
+
}
|
|
852
|
+
c = {
|
|
853
|
+
rowIndex: t,
|
|
854
|
+
colIndex: n
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
let h = n(c);
|
|
858
|
+
if (!bt(h, l)) {
|
|
859
|
+
const t = Ot(h, l);
|
|
860
|
+
t && (h = t);
|
|
861
|
+
}
|
|
862
|
+
const f = {
|
|
863
|
+
rowStart: Kt(r, h.rowStart, Gt.Down, h.rowEnd),
|
|
864
|
+
colStart: Kt(o, h.colStart, Gt.Right, h.colEnd),
|
|
865
|
+
rowEnd: Kt(r, h.rowEnd, Gt.Up, h.rowStart),
|
|
866
|
+
colEnd: Kt(o, h.colEnd, Gt.Left, h.colStart)
|
|
867
|
+
};
|
|
868
|
+
if (f.rowStart !== c.rowIndex || f.colStart !== c.colIndex) {
|
|
869
|
+
switch (e) {
|
|
870
|
+
case Gt.Right:
|
|
871
|
+
s[u].colStart === f.colStart && s[u].colEnd === f.colEnd && (c.rowIndex = f.rowEnd), c.colIndex = f.colEnd;
|
|
872
|
+
break;
|
|
873
|
+
case Gt.Left:
|
|
874
|
+
s[u].colStart === f.colStart && s[u].colEnd === f.colEnd && (c.rowIndex = f.rowStart), c.rowIndex === f.rowStart ? c.colIndex = f.colStart + 1 : c.colIndex = f.colStart;
|
|
875
|
+
break;
|
|
876
|
+
case Gt.Down:
|
|
877
|
+
s[u].rowStart === f.rowStart && s[u].rowEnd === f.rowEnd && (c.colIndex = f.colEnd), c.rowIndex = f.rowEnd;
|
|
878
|
+
break;
|
|
879
|
+
case Gt.Up: s[u].rowStart === f.rowStart && s[u].rowEnd === f.rowEnd && (c.colIndex = f.colStart), c.colIndex === f.colStart ? c.rowIndex = f.rowStart + 1 : c.rowIndex = f.rowStart;
|
|
880
|
+
}
|
|
881
|
+
return Zt({
|
|
882
|
+
cell: c,
|
|
883
|
+
ranges: t.ranges,
|
|
884
|
+
rangeIndex: u
|
|
885
|
+
}, e, n, r, o, i ?? t);
|
|
886
|
+
}
|
|
887
|
+
return {
|
|
888
|
+
ranges: t.ranges,
|
|
889
|
+
cell: c,
|
|
890
|
+
rangeIndex: u
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
var Yt = (t = 64) => ({
|
|
894
|
+
count: 0,
|
|
895
|
+
rowS: new Int32Array(t),
|
|
896
|
+
rowE: new Int32Array(t),
|
|
897
|
+
colS: new Int32Array(t),
|
|
898
|
+
colE: new Int32Array(t),
|
|
899
|
+
type: new Uint16Array(t),
|
|
900
|
+
value: [],
|
|
901
|
+
keys: []
|
|
902
|
+
}), Qt = (t, e) => {
|
|
903
|
+
if (t.length >= e) return t;
|
|
904
|
+
const n = new Int32Array(Math.max(e, 2 * t.length));
|
|
905
|
+
return n.set(t), n;
|
|
906
|
+
}, te = (t, e) => {
|
|
907
|
+
if (t.rowS.length >= e) return;
|
|
908
|
+
const n = Math.max(e, 2 * t.rowS.length);
|
|
909
|
+
t.rowS = Qt(t.rowS, n), t.rowE = Qt(t.rowE, n), t.colS = Qt(t.colS, n), t.colE = Qt(t.colE, n);
|
|
910
|
+
const r = new Uint16Array(n);
|
|
911
|
+
r.set(t.type), t.type = r;
|
|
912
|
+
}, ee = /* @__PURE__ */ new Int32Array(1024), ne = (t) => (ee.length < t && (ee = new Int32Array(Math.max(t, 2 * ee.length))), ee.fill(0, 0, t), ee), re = class {
|
|
913
|
+
constructor(t, e, n, r) {
|
|
914
|
+
this._nextOrder = 0, this._activeLen = 0, this._events = /* @__PURE__ */ new Int32Array(64), this._hasBand = !1, this._bandStart = 0, this._bandEnd = 0, this._rMinS = /* @__PURE__ */ new Int32Array(64), this._rMinE = /* @__PURE__ */ new Int32Array(64), this._rOff = /* @__PURE__ */ new Int32Array(65), this._rCount = 0, this._pool = /* @__PURE__ */ new Int32Array(256), this._overlaps = /* @__PURE__ */ new Int32Array(16), this._rInter = null, this._region = -1, this._major = 0, this._minor = 0, this._done = !1, this.rowStart = 0, this.rowEnd = 0, this.colStart = 0, this.colEnd = 0, this.cellRow = 0, this.cellCol = 0, this.intersection = null, this._isColumn = n, this._isReverse = r, this._store = t;
|
|
915
|
+
const o = t.count;
|
|
916
|
+
this._n = o;
|
|
917
|
+
const i = new Int32Array(o), s = new Int32Array(o), a = new Int32Array(o), l = new Int32Array(o), c = n ? t.colS : t.rowS, u = n ? t.colE : t.rowE, d = n ? t.rowS : t.colS, h = n ? t.rowE : t.colE;
|
|
918
|
+
for (let t = 0; t < o; t++) r ? (i[t] = -u[t], s[t] = -c[t], a[t] = -h[t], l[t] = -d[t]) : (i[t] = c[t], s[t] = u[t], a[t] = d[t], l[t] = h[t]);
|
|
919
|
+
this._M0 = i, this._M1 = s, this._m0 = a, this._m1 = l;
|
|
920
|
+
const f = n ? e.colStart : e.rowStart, w = n ? e.colEnd : e.rowEnd, p = w - f + 1, g = new Int32Array(o);
|
|
921
|
+
if (o < 256 || p > 16 * o) {
|
|
922
|
+
for (let t = 0; t < o; t++) g[t] = t;
|
|
923
|
+
g.sort((t, e) => i[t] - i[e] || t - e);
|
|
924
|
+
} else {
|
|
925
|
+
const t = r ? -w : f, e = ne(p + 1);
|
|
926
|
+
for (let n = 0; n < o; n++) e[i[n] - t + 1]++;
|
|
927
|
+
for (let t = 1; t <= p; t++) e[t] += e[t - 1];
|
|
928
|
+
for (let n = 0; n < o; n++) g[e[i[n] - t]++] = n;
|
|
929
|
+
}
|
|
930
|
+
this._order = g, this._active = new Int32Array(Math.min(2 * o, 1024)), this._scratch = new Int32Array(this._active.length);
|
|
931
|
+
}
|
|
932
|
+
_stable(t) {
|
|
933
|
+
return this._isReverse ? this._n - 1 - t : t;
|
|
934
|
+
}
|
|
935
|
+
_compareEvents(t, e) {
|
|
936
|
+
const n = t >> 1, r = e >> 1, o = 1 & t, i = 1 & e, s = this._m0, a = this._m1, l = o ? a[n] : s[n], c = i ? a[r] : s[r];
|
|
937
|
+
if (l !== c) return l - c;
|
|
938
|
+
if (o !== i) return o - i;
|
|
939
|
+
const u = o ? s[n] : a[n], d = i ? s[r] : a[r];
|
|
940
|
+
return u !== d ? u - d : this._stable(n) - this._stable(r);
|
|
941
|
+
}
|
|
942
|
+
_sortEvents(t, e, n, r) {
|
|
943
|
+
const o = r - n + 1;
|
|
944
|
+
if (e < 256 || o > 16 * e) return t.subarray(0, e).sort((t, e) => this._compareEvents(t, e)), t;
|
|
945
|
+
const i = this._m0, s = this._m1, a = t;
|
|
946
|
+
let l = this._scratch;
|
|
947
|
+
l.length < e && (l = this._scratch = new Int32Array(e));
|
|
948
|
+
let c = ne(o + 1);
|
|
949
|
+
for (let t = 0; t < e; t++) {
|
|
950
|
+
const e = a[t];
|
|
951
|
+
c[(1 & e ? i[e >> 1] : s[e >> 1]) - n + 1]++;
|
|
952
|
+
}
|
|
953
|
+
for (let t = 1; t <= o; t++) c[t] += c[t - 1];
|
|
954
|
+
for (let t = 0; t < e; t++) {
|
|
955
|
+
const e = a[t];
|
|
956
|
+
l[c[(1 & e ? i[e >> 1] : s[e >> 1]) - n]++] = e;
|
|
957
|
+
}
|
|
958
|
+
let u = 0;
|
|
959
|
+
for (let t = 0; t < e; t++) 1 & l[t] || (a[u++] = l[t]);
|
|
960
|
+
for (let t = 0; t < e; t++) 1 & ~l[t] || (a[u++] = l[t]);
|
|
961
|
+
c = ne(o + 1);
|
|
962
|
+
for (let t = 0; t < e; t++) {
|
|
963
|
+
const e = a[t];
|
|
964
|
+
c[(1 & e ? s[e >> 1] : i[e >> 1]) - n + 1]++;
|
|
965
|
+
}
|
|
966
|
+
for (let t = 1; t <= o; t++) c[t] += c[t - 1];
|
|
967
|
+
for (let t = 0; t < e; t++) {
|
|
968
|
+
const e = a[t];
|
|
969
|
+
l[c[(1 & e ? s[e >> 1] : i[e >> 1]) - n]++] = e;
|
|
970
|
+
}
|
|
971
|
+
return this._scratch = a, this._events = l, l;
|
|
972
|
+
}
|
|
973
|
+
_advanceBand() {
|
|
974
|
+
const t = this._n, e = this._M0, n = this._M1, r = this._order;
|
|
975
|
+
let o, i = this._active, s = this._activeLen;
|
|
976
|
+
if (this._hasBand) {
|
|
977
|
+
const t = this._bandEnd;
|
|
978
|
+
let e = 0;
|
|
979
|
+
for (let r = 0; r < s; r++) {
|
|
980
|
+
const o = i[r];
|
|
981
|
+
n[o >> 1] > t && (i[e++] = o);
|
|
982
|
+
}
|
|
983
|
+
s = e;
|
|
984
|
+
}
|
|
985
|
+
const a = this._nextOrder;
|
|
986
|
+
if (s > 0) o = this._bandEnd + 1;
|
|
987
|
+
else {
|
|
988
|
+
if (a >= t) return this._activeLen = 0, this._done = !0, !1;
|
|
989
|
+
o = e[r[a]];
|
|
990
|
+
}
|
|
991
|
+
let l = a;
|
|
992
|
+
for (; l < t && e[r[l]] === o;) l++;
|
|
993
|
+
const c = l - a;
|
|
994
|
+
if (c > 0) {
|
|
995
|
+
const t = 2 * c;
|
|
996
|
+
let e = this._events;
|
|
997
|
+
e.length < t && (e = this._events = new Int32Array(Math.max(t, 2 * e.length)));
|
|
998
|
+
const n = this._m0, o = this._m1;
|
|
999
|
+
let u = Number.MAX_SAFE_INTEGER, d = Number.MIN_SAFE_INTEGER, h = 0;
|
|
1000
|
+
if (this._isReverse) for (let t = l - 1; t >= a; t--) {
|
|
1001
|
+
const i = r[t];
|
|
1002
|
+
e[h++] = i << 1, e[h++] = i << 1 | 1, n[i] < u && (u = n[i]), o[i] > d && (d = o[i]);
|
|
1003
|
+
}
|
|
1004
|
+
else for (let t = a; t < l; t++) {
|
|
1005
|
+
const i = r[t];
|
|
1006
|
+
e[h++] = i << 1, e[h++] = i << 1 | 1, n[i] < u && (u = n[i]), o[i] > d && (d = o[i]);
|
|
1007
|
+
}
|
|
1008
|
+
const f = this._sortEvents(e, t, u, d), w = s + t;
|
|
1009
|
+
let p = this._scratch;
|
|
1010
|
+
if ((p === f || p.length < w) && (p = new Int32Array(Math.max(w, 2 * i.length))), 0 === s) p.set(f.subarray(0, t));
|
|
1011
|
+
else {
|
|
1012
|
+
let e = 0, n = 0, r = 0;
|
|
1013
|
+
for (; e < s && n < t;) this._compareEvents(i[e], f[n]) <= 0 ? p[r++] = i[e++] : p[r++] = f[n++];
|
|
1014
|
+
for (; e < s;) p[r++] = i[e++];
|
|
1015
|
+
for (; n < t;) p[r++] = f[n++];
|
|
1016
|
+
}
|
|
1017
|
+
this._scratch = i.length >= p.length ? i : new Int32Array(p.length), i = this._active = p, s = w;
|
|
1018
|
+
}
|
|
1019
|
+
this._activeLen = s, this._nextOrder = l;
|
|
1020
|
+
let u = l < t ? e[r[l]] - 1 : Number.MAX_SAFE_INTEGER;
|
|
1021
|
+
for (let t = 0; t < s; t++) {
|
|
1022
|
+
const e = n[i[t] >> 1];
|
|
1023
|
+
e < u && (u = e);
|
|
1024
|
+
}
|
|
1025
|
+
return this._bandStart = o, this._bandEnd = u, this._hasBand = !0, this._sweepBand(), !0;
|
|
1026
|
+
}
|
|
1027
|
+
_sweepBand() {
|
|
1028
|
+
const t = this._active, e = this._activeLen, n = this._m0, r = this._m1;
|
|
1029
|
+
let o = this._rMinS, i = this._rMinE, s = this._rOff, a = this._pool, l = this._overlaps, c = 0, u = 0, d = 0, h = 0;
|
|
1030
|
+
const f = (t, e) => {
|
|
1031
|
+
d >= o.length && (o = this._rMinS = Qt(o, d + 1), i = this._rMinE = Qt(i, d + 1), s = this._rOff = Qt(s, o.length + 1)), o[d] = t, i[d] = e, s[d] = u, d++, u + c > a.length && (a = this._pool = Qt(a, u + c));
|
|
1032
|
+
for (let t = 0; t < c; t++) a[u++] = l[t];
|
|
1033
|
+
};
|
|
1034
|
+
for (let o = 0; o < e; o++) {
|
|
1035
|
+
const e = t[o], i = e >> 1;
|
|
1036
|
+
if (1 & e) {
|
|
1037
|
+
const t = r[i];
|
|
1038
|
+
if (h <= t && f(h, t), c > 1) {
|
|
1039
|
+
let t = c - 1;
|
|
1040
|
+
for (; t >= 0 && l[t] !== i;) t--;
|
|
1041
|
+
-1 !== t && (l[t] = l[c - 1]);
|
|
1042
|
+
}
|
|
1043
|
+
c--, h = t + 1;
|
|
1044
|
+
} else {
|
|
1045
|
+
const t = n[i];
|
|
1046
|
+
c > 0 && h < t && f(h, t - 1), c >= l.length && (l = this._overlaps = Qt(l, c + 1)), l[c++] = i, h = t;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
s[d] = u, this._rCount = d, this._region = -1, this._rInter = null;
|
|
1050
|
+
}
|
|
1051
|
+
_setRegion(t) {
|
|
1052
|
+
const e = this._isReverse, n = e ? 0 - this._bandEnd : this._bandStart, r = e ? 0 - this._bandStart : this._bandEnd, o = this._rMinS[t], i = this._rMinE[t], s = e ? 0 - i : o, a = e ? 0 - o : i;
|
|
1053
|
+
this._isColumn ? (this.colStart = n, this.colEnd = r, this.rowStart = s, this.rowEnd = a) : (this.rowStart = n, this.rowEnd = r, this.colStart = s, this.colEnd = a);
|
|
1054
|
+
const l = this._rInter;
|
|
1055
|
+
if (l) {
|
|
1056
|
+
let e = l[t];
|
|
1057
|
+
e || (e = l[t] = this._materialize(t)), this.intersection = e;
|
|
1058
|
+
} else this.intersection = this._materialize(t);
|
|
1059
|
+
}
|
|
1060
|
+
nextRegion() {
|
|
1061
|
+
if (this._done) return !1;
|
|
1062
|
+
let t = this._region + 1;
|
|
1063
|
+
for (; !this._hasBand || t >= this._rCount;) {
|
|
1064
|
+
if (!this._advanceBand()) return !1;
|
|
1065
|
+
t = 0;
|
|
1066
|
+
}
|
|
1067
|
+
return this._region = t, this._setRegion(t), !0;
|
|
1068
|
+
}
|
|
1069
|
+
_setCell(t) {
|
|
1070
|
+
const e = this._isReverse, n = e ? 0 - this._major : this._major, r = e ? 0 - this._minor : this._minor;
|
|
1071
|
+
this._isColumn ? (this.cellCol = n, this.cellRow = r) : (this.cellRow = n, this.cellCol = r), t !== this._region && (this._region = t, this._setRegion(t));
|
|
1072
|
+
}
|
|
1073
|
+
_enterBandByCell() {
|
|
1074
|
+
this._rInter = this._bandEnd > this._bandStart ? new Array(this._rCount) : null, this._major = this._bandStart;
|
|
1075
|
+
}
|
|
1076
|
+
nextCell() {
|
|
1077
|
+
if (this._done) return !1;
|
|
1078
|
+
let t = this._region;
|
|
1079
|
+
if (!this._hasBand || t < 0) {
|
|
1080
|
+
if (!this._hasBand) {
|
|
1081
|
+
if (!this._advanceBand()) return !1;
|
|
1082
|
+
this._enterBandByCell();
|
|
1083
|
+
}
|
|
1084
|
+
return this._minor = this._rMinS[0], this._setCell(0), !0;
|
|
1085
|
+
}
|
|
1086
|
+
const e = this._minor + 1;
|
|
1087
|
+
if (e <= this._rMinE[t]) return this._minor = e, this._setCell(t), !0;
|
|
1088
|
+
if (t++, t >= this._rCount && (t = 0, ++this._major > this._bandEnd)) {
|
|
1089
|
+
if (!this._advanceBand()) return !1;
|
|
1090
|
+
this._enterBandByCell();
|
|
1091
|
+
}
|
|
1092
|
+
return this._minor = this._rMinS[t], this._setCell(t), !0;
|
|
1093
|
+
}
|
|
1094
|
+
seekCell(t, e) {
|
|
1095
|
+
if (this._done) return !1;
|
|
1096
|
+
const n = this._isReverse;
|
|
1097
|
+
let r = this._isColumn ? e : t, o = this._isColumn ? t : e;
|
|
1098
|
+
if (n && (r = -r, o = -o), this._hasBand && this._region >= 0 && (r < this._major || r === this._major && o <= this._minor)) return this.nextCell();
|
|
1099
|
+
for (;;) {
|
|
1100
|
+
if (!this._hasBand || r > this._bandEnd) {
|
|
1101
|
+
if (!this._advanceBand()) return !1;
|
|
1102
|
+
this._enterBandByCell();
|
|
1103
|
+
continue;
|
|
1104
|
+
}
|
|
1105
|
+
if (r < this._bandStart) return this._major = this._bandStart, this._minor = this._rMinS[0], this._setCell(0), !0;
|
|
1106
|
+
this._major = r;
|
|
1107
|
+
const t = this._rMinE;
|
|
1108
|
+
let e = 0, n = this._rCount;
|
|
1109
|
+
for (; e < n;) {
|
|
1110
|
+
const r = e + n >>> 1;
|
|
1111
|
+
t[r] < o ? e = r + 1 : n = r;
|
|
1112
|
+
}
|
|
1113
|
+
if (e < this._rCount) {
|
|
1114
|
+
const t = this._rMinS[e];
|
|
1115
|
+
return this._minor = t > o ? t : o, this._setCell(e), !0;
|
|
1116
|
+
}
|
|
1117
|
+
if (!(++this._major > this._bandEnd)) return this._minor = this._rMinS[0], this._setCell(0), !0;
|
|
1118
|
+
if (!this._advanceBand()) return !1;
|
|
1119
|
+
this._enterBandByCell();
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}, oe = Object.freeze({
|
|
1123
|
+
done: !0,
|
|
1124
|
+
value: void 0
|
|
1125
|
+
});
|
|
1126
|
+
(function(t) {
|
|
1127
|
+
class e extends re {
|
|
1128
|
+
constructor(...t) {
|
|
1129
|
+
super(...t), this._reuseOverlaps = null;
|
|
1130
|
+
}
|
|
1131
|
+
_materialize(t) {
|
|
1132
|
+
const e = this._rOff, n = this._pool, r = this._store.value, o = e[t], i = e[t + 1];
|
|
1133
|
+
let s = this._reuseOverlaps;
|
|
1134
|
+
s ? s.length = 0 : s = [];
|
|
1135
|
+
for (let t = o; t < i; t++) s.push(r[n[t]]);
|
|
1136
|
+
return s;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
class r {
|
|
1140
|
+
constructor(t, r) {
|
|
1141
|
+
if (this._sweep = null, this._isByCell = !1, this._cellComparator = null, this._lastCell = null, this._reuse = null, !t || 0 === t.length) return;
|
|
1142
|
+
let o, i = !0, s = !1, a = !1;
|
|
1143
|
+
if (r && (i = (r.axis ?? n.Column) !== n.Row, s = r.reverse ?? !1, a = r.byCell ?? !1, o = r.reuseIterator), this._isByCell = a, o) {
|
|
1144
|
+
const t = "boolean" == typeof o ? {
|
|
1145
|
+
done: !1,
|
|
1146
|
+
value: {
|
|
1147
|
+
cell: null,
|
|
1148
|
+
range: null,
|
|
1149
|
+
overlaps: null
|
|
1150
|
+
}
|
|
1151
|
+
} : o;
|
|
1152
|
+
t.done = !1;
|
|
1153
|
+
let e = t.value;
|
|
1154
|
+
e || (e = t.value = {
|
|
1155
|
+
cell: null,
|
|
1156
|
+
range: null,
|
|
1157
|
+
overlaps: null
|
|
1158
|
+
}), e.range || (e.range = {
|
|
1159
|
+
colStart: 0,
|
|
1160
|
+
rowStart: 0,
|
|
1161
|
+
colEnd: 0,
|
|
1162
|
+
rowEnd: 0
|
|
1163
|
+
}), e.cell = a ? e.cell ?? {
|
|
1164
|
+
colIndex: -1,
|
|
1165
|
+
rowIndex: -1
|
|
1166
|
+
} : null, this._reuse = t;
|
|
1167
|
+
}
|
|
1168
|
+
const l = t.length, c = {
|
|
1169
|
+
count: l,
|
|
1170
|
+
rowS: new Int32Array(l),
|
|
1171
|
+
rowE: new Int32Array(l),
|
|
1172
|
+
colS: new Int32Array(l),
|
|
1173
|
+
colE: new Int32Array(l),
|
|
1174
|
+
type: new Uint16Array(l),
|
|
1175
|
+
value: [],
|
|
1176
|
+
keys: ["range"]
|
|
1177
|
+
};
|
|
1178
|
+
let u = Number.MAX_SAFE_INTEGER, d = Number.MIN_SAFE_INTEGER, h = Number.MAX_SAFE_INTEGER, f = Number.MIN_SAFE_INTEGER;
|
|
1179
|
+
for (let e = 0; e < l; e++) {
|
|
1180
|
+
const n = t[e];
|
|
1181
|
+
c.rowS[e] = n.rowStart, c.rowE[e] = n.rowEnd, c.colS[e] = n.colStart, c.colE[e] = n.colEnd, c.value.push(n), n.rowStart < u && (u = n.rowStart), n.rowEnd > d && (d = n.rowEnd), n.colStart < h && (h = n.colStart), n.colEnd > f && (f = n.colEnd);
|
|
1182
|
+
}
|
|
1183
|
+
const w = {
|
|
1184
|
+
rowStart: u,
|
|
1185
|
+
rowEnd: d,
|
|
1186
|
+
colStart: h,
|
|
1187
|
+
colEnd: f
|
|
1188
|
+
}, p = this._sweep = new e(c, w, i, s);
|
|
1189
|
+
a ? this._cellComparator = yt(i ? n.Column : n.Row, s) : o && (p._reuseOverlaps = []);
|
|
1190
|
+
}
|
|
1191
|
+
next(t) {
|
|
1192
|
+
const e = this._sweep;
|
|
1193
|
+
if (!e) return oe;
|
|
1194
|
+
const n = this._isByCell;
|
|
1195
|
+
let r;
|
|
1196
|
+
if (t) {
|
|
1197
|
+
if (!n) throw new Error("nextCell is only supported when byCell is true");
|
|
1198
|
+
const o = this._lastCell;
|
|
1199
|
+
if (o && this._cellComparator(o, t) >= 0) throw new Error("nextCell must be after the current iteration cell");
|
|
1200
|
+
r = e.seekCell(t.rowIndex, t.colIndex);
|
|
1201
|
+
} else r = n ? e.nextCell() : e.nextRegion();
|
|
1202
|
+
if (!r) return this._sweep = null, oe;
|
|
1203
|
+
const o = this._reuse;
|
|
1204
|
+
if (o) {
|
|
1205
|
+
const t = o.value;
|
|
1206
|
+
o.done = !1;
|
|
1207
|
+
const r = t.range;
|
|
1208
|
+
if (r.colStart = e.colStart, r.rowStart = e.rowStart, r.colEnd = e.colEnd, r.rowEnd = e.rowEnd, n) {
|
|
1209
|
+
const n = t.cell;
|
|
1210
|
+
n.colIndex = e.cellCol, n.rowIndex = e.cellRow;
|
|
1211
|
+
let r = this._lastCell;
|
|
1212
|
+
r || (r = this._lastCell = {
|
|
1213
|
+
colIndex: 0,
|
|
1214
|
+
rowIndex: 0
|
|
1215
|
+
}), r.colIndex = e.cellCol, r.rowIndex = e.cellRow;
|
|
1216
|
+
}
|
|
1217
|
+
return t.overlaps = e.intersection, o;
|
|
1218
|
+
}
|
|
1219
|
+
let i = null, s = e.intersection;
|
|
1220
|
+
return n && (i = this._lastCell = {
|
|
1221
|
+
colIndex: e.cellCol,
|
|
1222
|
+
rowIndex: e.cellRow
|
|
1223
|
+
}, s = s.slice()), {
|
|
1224
|
+
done: !1,
|
|
1225
|
+
value: {
|
|
1226
|
+
cell: i,
|
|
1227
|
+
range: {
|
|
1228
|
+
colStart: e.colStart,
|
|
1229
|
+
rowStart: e.rowStart,
|
|
1230
|
+
colEnd: e.colEnd,
|
|
1231
|
+
rowEnd: e.rowEnd
|
|
1232
|
+
},
|
|
1233
|
+
overlaps: s
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
return(t) {
|
|
1238
|
+
return oe;
|
|
1239
|
+
}
|
|
1240
|
+
throw(t) {
|
|
1241
|
+
return oe;
|
|
1242
|
+
}
|
|
1243
|
+
[Symbol.iterator]() {
|
|
1244
|
+
return this;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
t.IteratorInstance = r;
|
|
1248
|
+
})(Jt || (Jt = {}));
|
|
1249
|
+
var ie = class {
|
|
1250
|
+
constructor() {
|
|
1251
|
+
this._onceMessageKeys = /* @__PURE__ */ new Set(), this._overrides = null;
|
|
1252
|
+
}
|
|
1253
|
+
setOverrides(t) {
|
|
1254
|
+
this._overrides = t ?? null;
|
|
1255
|
+
}
|
|
1256
|
+
getOverrides() {
|
|
1257
|
+
return this._overrides;
|
|
1258
|
+
}
|
|
1259
|
+
_write(t, e, n) {
|
|
1260
|
+
if (n?.onceKey) {
|
|
1261
|
+
const t = this._onceMessageKeys;
|
|
1262
|
+
if (t.has(n.onceKey)) return;
|
|
1263
|
+
t.add(n.onceKey);
|
|
1264
|
+
}
|
|
1265
|
+
const r = n?.meta, o = this._overrides;
|
|
1266
|
+
if (o) {
|
|
1267
|
+
const r = o[t];
|
|
1268
|
+
if (r) return void r.bind(o)(e, n);
|
|
1269
|
+
}
|
|
1270
|
+
void 0 === r ? console[t](e) : console[t](e, r);
|
|
1271
|
+
}
|
|
1272
|
+
log(t, e) {
|
|
1273
|
+
return this._write("log", t, e);
|
|
1274
|
+
}
|
|
1275
|
+
error(t, e) {
|
|
1276
|
+
return this._write("error", t, e);
|
|
1277
|
+
}
|
|
1278
|
+
warn(t, e) {
|
|
1279
|
+
return this._write("warn", t, e);
|
|
1280
|
+
}
|
|
1281
|
+
debug(t, e) {
|
|
1282
|
+
return this._write("debug", t, e);
|
|
1283
|
+
}
|
|
1284
|
+
}, se = new ie(), ae = class {
|
|
1285
|
+
constructor() {
|
|
1286
|
+
this._seen = /* @__PURE__ */ new Set();
|
|
1287
|
+
}
|
|
1288
|
+
_emit(t, e, n, r) {
|
|
1289
|
+
if (n?.once) {
|
|
1290
|
+
if (this._seen.has(n.once)) return;
|
|
1291
|
+
this._seen.add(n.once);
|
|
1292
|
+
}
|
|
1293
|
+
void 0 !== n?.data ? r(e, n.data) : r(e);
|
|
1294
|
+
}
|
|
1295
|
+
debug(t, e) {
|
|
1296
|
+
this._emit("debug", t, e, console.debug);
|
|
1297
|
+
}
|
|
1298
|
+
log(t, e) {
|
|
1299
|
+
this._emit("log", t, e, console.log);
|
|
1300
|
+
}
|
|
1301
|
+
info(t, e) {
|
|
1302
|
+
this._emit("info", t, e, console.info);
|
|
1303
|
+
}
|
|
1304
|
+
warn(t, e) {
|
|
1305
|
+
this._emit("warn", t, e, console.warn);
|
|
1306
|
+
}
|
|
1307
|
+
error(t, e) {
|
|
1308
|
+
const n = t instanceof Error ? t.stack ?? t.message : t;
|
|
1309
|
+
this._emit("error", n, e, console.error);
|
|
1310
|
+
}
|
|
1311
|
+
}, le = class {
|
|
1312
|
+
constructor() {
|
|
1313
|
+
this._entries = [], this._seen = /* @__PURE__ */ new Set();
|
|
1314
|
+
}
|
|
1315
|
+
_add(t, e, n) {
|
|
1316
|
+
if (n?.once) {
|
|
1317
|
+
if (this._seen.has(n.once)) return;
|
|
1318
|
+
this._seen.add(n.once);
|
|
1319
|
+
}
|
|
1320
|
+
this._entries.push({
|
|
1321
|
+
level: t,
|
|
1322
|
+
message: e,
|
|
1323
|
+
data: n?.data,
|
|
1324
|
+
time: Date.now()
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
debug(t, e) {
|
|
1328
|
+
this._add("debug", t, e);
|
|
1329
|
+
}
|
|
1330
|
+
log(t, e) {
|
|
1331
|
+
this._add("log", t, e);
|
|
1332
|
+
}
|
|
1333
|
+
info(t, e) {
|
|
1334
|
+
this._add("info", t, e);
|
|
1335
|
+
}
|
|
1336
|
+
warn(t, e) {
|
|
1337
|
+
this._add("warn", t, e);
|
|
1338
|
+
}
|
|
1339
|
+
error(t, e) {
|
|
1340
|
+
const n = t instanceof Error ? t.stack ?? t.message : t;
|
|
1341
|
+
this._add("error", n, e);
|
|
1342
|
+
}
|
|
1343
|
+
getEntries() {
|
|
1344
|
+
return this._entries;
|
|
1345
|
+
}
|
|
1346
|
+
clear() {
|
|
1347
|
+
this._entries.length = 0, this._seen.clear();
|
|
1348
|
+
}
|
|
1349
|
+
toString() {
|
|
1350
|
+
return this._entries.map((t) => {
|
|
1351
|
+
let e = `[${t.level}] ${t.message}`;
|
|
1352
|
+
if (void 0 !== t.data) {
|
|
1353
|
+
let n;
|
|
1354
|
+
try {
|
|
1355
|
+
n = "string" == typeof t.data ? t.data : JSON.stringify(t.data);
|
|
1356
|
+
} catch {
|
|
1357
|
+
n = String(t.data);
|
|
1358
|
+
}
|
|
1359
|
+
e += ` ${n}`;
|
|
1360
|
+
}
|
|
1361
|
+
return e;
|
|
1362
|
+
}).join("\n");
|
|
1363
|
+
}
|
|
1364
|
+
}, ce = 1e4, ue = "SHEETXL_LOG_TIMEOUT";
|
|
1365
|
+
function de(...t) {
|
|
1366
|
+
for (const e of t) {
|
|
1367
|
+
const t = he(e);
|
|
1368
|
+
if (void 0 !== t) return t;
|
|
1369
|
+
}
|
|
1370
|
+
return 1e4;
|
|
1371
|
+
}
|
|
1372
|
+
function he(t) {
|
|
1373
|
+
if ("string" == typeof t ? "" === t.trim() : "number" != typeof t) return;
|
|
1374
|
+
const e = Number(t);
|
|
1375
|
+
return Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
1376
|
+
}
|
|
1377
|
+
var fe, we = (t) => !!t && "function" == typeof t.then, pe = (t) => {
|
|
1378
|
+
try {
|
|
1379
|
+
const e = JSON.stringify(t);
|
|
1380
|
+
if (void 0 !== e) return e;
|
|
1381
|
+
} catch {}
|
|
1382
|
+
return String(t);
|
|
1383
|
+
};
|
|
1384
|
+
function ge(t, e) {
|
|
1385
|
+
const n = e?.render, r = (t) => {
|
|
1386
|
+
if ("string" == typeof t) return t;
|
|
1387
|
+
if (void 0 === t) return "undefined";
|
|
1388
|
+
if (null === t) return "null";
|
|
1389
|
+
if (t instanceof Error) return t.stack ?? t.message;
|
|
1390
|
+
if (we(t)) return Promise.resolve(t).then(r, async (t) => `[rejected] ${await r(t)}`);
|
|
1391
|
+
if ("object" != typeof t) return String(t);
|
|
1392
|
+
if (n) try {
|
|
1393
|
+
const e = n(t);
|
|
1394
|
+
if (we(e)) return e.then((e) => e ?? pe(t), () => pe(t));
|
|
1395
|
+
if ("string" == typeof e) return e;
|
|
1396
|
+
} catch {}
|
|
1397
|
+
return pe(t);
|
|
1398
|
+
}, o = (e, n) => {
|
|
1399
|
+
"warn" === e ? t.warn(n) : "error" === e ? t.error(n) : t.log(n);
|
|
1400
|
+
};
|
|
1401
|
+
let i, s, a = Promise.resolve(), l = 0;
|
|
1402
|
+
const c = () => {
|
|
1403
|
+
s = new Promise((t) => {
|
|
1404
|
+
i = t;
|
|
1405
|
+
});
|
|
1406
|
+
};
|
|
1407
|
+
c();
|
|
1408
|
+
let u = 0;
|
|
1409
|
+
const d = (t, e) => {
|
|
1410
|
+
const n = e.map(r);
|
|
1411
|
+
if (0 === l && !n.some(we)) return void o(t, n.join(" "));
|
|
1412
|
+
const i = n.map((t, e) => {
|
|
1413
|
+
if (!we(t)) return t;
|
|
1414
|
+
t.then((t) => {
|
|
1415
|
+
i[e] = t;
|
|
1416
|
+
}, () => {
|
|
1417
|
+
i[e] = "[rejected]";
|
|
1418
|
+
});
|
|
1419
|
+
});
|
|
1420
|
+
l++, a = a.then(async () => {
|
|
1421
|
+
try {
|
|
1422
|
+
await Promise.race([Promise.allSettled(n), s]), o(t, i.map((t) => void 0 !== t ? t : (u++, "[pending]")).join(" "));
|
|
1423
|
+
} catch {} finally {
|
|
1424
|
+
l--;
|
|
1425
|
+
}
|
|
1426
|
+
});
|
|
1427
|
+
};
|
|
1428
|
+
return {
|
|
1429
|
+
log: (...t) => d("log", t),
|
|
1430
|
+
warn: (...t) => d("warn", t),
|
|
1431
|
+
error: (...t) => d("error", t),
|
|
1432
|
+
flush: async (t) => {
|
|
1433
|
+
const e = t?.timeoutMs;
|
|
1434
|
+
let n = !1;
|
|
1435
|
+
const r = l > 0 && void 0 !== e && Number.isFinite(e) && e > 0 ? setTimeout(() => {
|
|
1436
|
+
n = !0, i();
|
|
1437
|
+
}, e) : void 0;
|
|
1438
|
+
try {
|
|
1439
|
+
for (; l > 0;) await a;
|
|
1440
|
+
} finally {
|
|
1441
|
+
clearTimeout(r), n && c();
|
|
1442
|
+
}
|
|
1443
|
+
if (u > 0) {
|
|
1444
|
+
const t = u;
|
|
1445
|
+
u = 0, o("warn", `${t} logged ${1 === t ? "value" : "values"} never settled and printed as [pending]: a logged promise has to resolve before the run ends.`);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
};
|
|
1449
|
+
}
|
|
1450
|
+
var me = e({
|
|
1451
|
+
EmptyBounds: () => Se,
|
|
1452
|
+
EmptyRect: () => _e,
|
|
1453
|
+
EmptyTopLeft: () => ye
|
|
1454
|
+
}), ye = Object.freeze({
|
|
1455
|
+
left: 0,
|
|
1456
|
+
top: 0
|
|
1457
|
+
}), _e = Object.freeze({
|
|
1458
|
+
left: 0,
|
|
1459
|
+
top: 0,
|
|
1460
|
+
bottom: 0,
|
|
1461
|
+
right: 0
|
|
1462
|
+
}), Se = Object.freeze({
|
|
1463
|
+
x: 0,
|
|
1464
|
+
y: 0,
|
|
1465
|
+
width: 0,
|
|
1466
|
+
height: 0
|
|
1467
|
+
}), Ee = e({
|
|
1468
|
+
canUseDOM: () => be,
|
|
1469
|
+
getDPI: () => xe,
|
|
1470
|
+
hasFocus: () => Ie,
|
|
1471
|
+
openFileDialog: () => ve,
|
|
1472
|
+
scrollIntoContainer: () => Ce,
|
|
1473
|
+
whenFocus: () => Oe
|
|
1474
|
+
}), be = !("undefined" == typeof window || !window.document || !window.document.createElement), ve = (t = "*.*") => new Promise((e, n) => {
|
|
1475
|
+
if (!be) return void n("Unable to open dialog with no dom.");
|
|
1476
|
+
const r = document.createElement("input");
|
|
1477
|
+
r.type = "file", r.accept = t;
|
|
1478
|
+
let o = null, i = !1;
|
|
1479
|
+
globalThis.addEventListener?.("focus", () => {
|
|
1480
|
+
setTimeout(() => {
|
|
1481
|
+
o || i || (i = !0, e(null));
|
|
1482
|
+
}, 1e3);
|
|
1483
|
+
}, {
|
|
1484
|
+
once: !0,
|
|
1485
|
+
passive: !0
|
|
1486
|
+
}), r.onchange = () => {
|
|
1487
|
+
if (o = r.files?.[0] ?? null, o) {
|
|
1488
|
+
if (i) return void console.warn("File open detected after faux cancel.", o);
|
|
1489
|
+
e(o);
|
|
1490
|
+
}
|
|
1491
|
+
}, r.autofocus = !0, r.click();
|
|
1492
|
+
}), xe = () => {
|
|
1493
|
+
let t = 1;
|
|
1494
|
+
return "object" == typeof window && (t = window.devicePixelRatio || 1), t;
|
|
1495
|
+
}, Ie = (t, e = !1) => (document.hasFocus() || e) && (t === document.activeElement || t?.contains(document.activeElement)), Ce = (t, e, n = "auto") => {
|
|
1496
|
+
if ((() => {
|
|
1497
|
+
if (void 0 === fe) {
|
|
1498
|
+
let t = !1;
|
|
1499
|
+
try {
|
|
1500
|
+
document.createElement("div").scrollIntoView({ get container() {
|
|
1501
|
+
return t = !0, "nearest";
|
|
1502
|
+
} });
|
|
1503
|
+
} catch {}
|
|
1504
|
+
fe = t;
|
|
1505
|
+
}
|
|
1506
|
+
return fe;
|
|
1507
|
+
})()) return void e.scrollIntoView({
|
|
1508
|
+
block: "nearest",
|
|
1509
|
+
inline: "nearest",
|
|
1510
|
+
behavior: n,
|
|
1511
|
+
container: "nearest"
|
|
1512
|
+
});
|
|
1513
|
+
const r = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = r.top + t.clientTop, s = i + t.clientHeight;
|
|
1514
|
+
let a = 0;
|
|
1515
|
+
o.top < i ? a = o.top - i : o.bottom > s && (a = Math.min(o.bottom - s, o.top - i)), 0 !== a && t.scrollBy({
|
|
1516
|
+
top: a,
|
|
1517
|
+
behavior: n
|
|
1518
|
+
});
|
|
1519
|
+
}, Oe = async (t, e = !1) => new Promise((n) => {
|
|
1520
|
+
Ie(t, e) ? n(!0) : t.addEventListener("focusin", () => {
|
|
1521
|
+
n(!0);
|
|
1522
|
+
}, { once: !0 }), t.focus();
|
|
1523
|
+
}), ke = e({
|
|
1524
|
+
cancelTimeout: () => Ne,
|
|
1525
|
+
debounce: () => Me,
|
|
1526
|
+
nextTick: () => Le,
|
|
1527
|
+
rafThrottle: () => Pe,
|
|
1528
|
+
requestTimeout: () => Be,
|
|
1529
|
+
throttle: () => je
|
|
1530
|
+
}), Re = globalThis.requestAnimationFrame, Ae = globalThis.cancelAnimationFrame;
|
|
1531
|
+
function je(t, e) {
|
|
1532
|
+
let n = null;
|
|
1533
|
+
return (...r) => {
|
|
1534
|
+
const o = Date.now();
|
|
1535
|
+
(!n || o - n >= e) && (n = o, t(...r));
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
function Me(t, e = 300, n = !1) {
|
|
1539
|
+
let r, o, i, s = null, a = 0;
|
|
1540
|
+
function l() {
|
|
1541
|
+
let c = Date.now() - a;
|
|
1542
|
+
c < e && c >= 0 ? s = setTimeout(l, e - c) : (s = null, n || (i = t.apply(o, r), o = r = null));
|
|
1543
|
+
}
|
|
1544
|
+
e ??= 100;
|
|
1545
|
+
const c = function() {
|
|
1546
|
+
o = globalThis, r = arguments, a = Date.now();
|
|
1547
|
+
var c = n && !s;
|
|
1548
|
+
return s || (s = setTimeout(l, e)), c && (i = t.apply(o, r), o = r = null), i;
|
|
1549
|
+
};
|
|
1550
|
+
return c.clear = function() {
|
|
1551
|
+
s && (clearTimeout(s), s = null);
|
|
1552
|
+
}, c.flush = function() {
|
|
1553
|
+
s && (i = t.apply(o, r), o = r = null, clearTimeout(s), s = null);
|
|
1554
|
+
}, c;
|
|
1555
|
+
}
|
|
1556
|
+
var Te, Pe = (t) => {
|
|
1557
|
+
let e, n = !1;
|
|
1558
|
+
const r = function() {
|
|
1559
|
+
n = !1, t(e);
|
|
1560
|
+
};
|
|
1561
|
+
return function(t) {
|
|
1562
|
+
e = t, e && e.persist && e.persist(), n || (n = !0, Re(r));
|
|
1563
|
+
};
|
|
1564
|
+
}, Le = (t) => {
|
|
1565
|
+
if ("function" == typeof Re) Re(() => {
|
|
1566
|
+
t();
|
|
1567
|
+
});
|
|
1568
|
+
else {
|
|
1569
|
+
const e = globalThis.setImmediate;
|
|
1570
|
+
("function" == typeof e ? e : setTimeout)(() => {
|
|
1571
|
+
t();
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
}, Ue = "object" == typeof performance && "function" == typeof performance.now ? () => performance.now() : () => Date.now(), Ne = (t) => {
|
|
1575
|
+
Ae(t.id);
|
|
1576
|
+
}, Be = (t, e) => {
|
|
1577
|
+
const n = Ue(), r = { id: Re(function o() {
|
|
1578
|
+
Ue() - n >= e ? t.call(null) : r.id = Re(o);
|
|
1579
|
+
}) };
|
|
1580
|
+
return r;
|
|
1581
|
+
}, $e = e({ MESSAGE_ERROR_INVALID_ARG: () => Fe }), Fe = (t) => `Invalid argument: '${t}'.`, De = e({
|
|
1582
|
+
APP_MIME_TYPE: () => ze,
|
|
1583
|
+
DEFAULT_MIME_TYPE: () => "*/*",
|
|
1584
|
+
JSONStableStringify: () => Ze,
|
|
1585
|
+
arrayBufferToBase64: () => Xe,
|
|
1586
|
+
base64ToArrayBuffer: () => Ve,
|
|
1587
|
+
blobToString: () => Ke,
|
|
1588
|
+
isLittleEndian: () => Ge,
|
|
1589
|
+
isNodeBuffer: () => qe,
|
|
1590
|
+
isSharedArrayBufferSupported: () => Je
|
|
1591
|
+
}), ze = "application/octet-stream", He = globalThis.Buffer, qe = (t) => He?.isBuffer(t) ?? !1, Je = "function" == typeof SharedArrayBuffer && (void 0 === globalThis.crossOriginIsolated || !0 === globalThis.crossOriginIsolated), Ge = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0], We = globalThis.FileReader, Ve = (t) => {
|
|
1592
|
+
const e = "function" == typeof globalThis.atob ? globalThis.atob(t) : He.from(t, "base64").toString("binary"), n = e.length, r = new Uint8Array(n);
|
|
1593
|
+
for (let t = 0; t < n; t++) r[t] = e.charCodeAt(t);
|
|
1594
|
+
return r.buffer;
|
|
1595
|
+
}, Xe = (t) => {
|
|
1596
|
+
const e = new Uint8Array(t), n = e.byteLength;
|
|
1597
|
+
let r = "";
|
|
1598
|
+
for (let t = 0; t < n; t++) r += String.fromCharCode(e[t]);
|
|
1599
|
+
if ("function" == typeof globalThis.btoa) return globalThis.btoa(r);
|
|
1600
|
+
if (He) return He.from(r, "binary").toString("base64");
|
|
1601
|
+
throw new Error("Unsupported environment");
|
|
1602
|
+
}, Ke = (t) => new Promise((e, n) => {
|
|
1603
|
+
if (t) if (We) {
|
|
1604
|
+
const r = new We();
|
|
1605
|
+
r.onload = () => {
|
|
1606
|
+
e(r.result);
|
|
1607
|
+
}, r.onerror = () => {
|
|
1608
|
+
n(r.error);
|
|
1609
|
+
}, r.readAsText(t);
|
|
1610
|
+
} else if (He) {
|
|
1611
|
+
const r = (t) => He.from(t).toString("utf-8");
|
|
1612
|
+
t.arrayBuffer().then((t) => {
|
|
1613
|
+
e(r(t));
|
|
1614
|
+
}).catch((t) => {
|
|
1615
|
+
n(t);
|
|
1616
|
+
});
|
|
1617
|
+
} else n(/* @__PURE__ */ new Error("Unsupported environment"));
|
|
1618
|
+
else e("");
|
|
1619
|
+
});
|
|
1620
|
+
function Ze(t, e) {
|
|
1621
|
+
e || (e = {}), "function" == typeof e && (e = { cmp: e });
|
|
1622
|
+
let n = "boolean" == typeof e.cycles && e.cycles;
|
|
1623
|
+
const r = e.cmp && (o = e.cmp, function(t) {
|
|
1624
|
+
return function(e, n) {
|
|
1625
|
+
return o({
|
|
1626
|
+
key: e,
|
|
1627
|
+
value: t[e]
|
|
1628
|
+
}, {
|
|
1629
|
+
key: n,
|
|
1630
|
+
value: t[n]
|
|
1631
|
+
});
|
|
1632
|
+
};
|
|
1633
|
+
});
|
|
1634
|
+
var o;
|
|
1635
|
+
let i = [];
|
|
1636
|
+
return function t(e) {
|
|
1637
|
+
if (e && e.toJSON && "function" == typeof e.toJSON && (e = e.toJSON()), void 0 === e) return;
|
|
1638
|
+
if ("number" == typeof e) return isFinite(e) ? "" + e : "null";
|
|
1639
|
+
if ("object" != typeof e) return JSON.stringify(e);
|
|
1640
|
+
let o;
|
|
1641
|
+
if (Array.isArray(e)) {
|
|
1642
|
+
o = "[";
|
|
1643
|
+
for (let n = 0; n < e.length; n++) n && (o += ","), o += t(e[n]) || "null";
|
|
1644
|
+
return o + "]";
|
|
1645
|
+
}
|
|
1646
|
+
if (null === e) return "null";
|
|
1647
|
+
if (-1 !== i.indexOf(e)) {
|
|
1648
|
+
if (n) return JSON.stringify("__cycle__");
|
|
1649
|
+
throw new TypeError("Converting circular structure to JSON");
|
|
1650
|
+
}
|
|
1651
|
+
const s = i.push(e) - 1, a = Object.keys(e).sort(r && r(e));
|
|
1652
|
+
o = "";
|
|
1653
|
+
for (let n = 0; n < a.length; n++) {
|
|
1654
|
+
const r = a[n], i = t(e[r]);
|
|
1655
|
+
i && (o && (o += ","), o += JSON.stringify(r) + ":" + i);
|
|
1656
|
+
}
|
|
1657
|
+
return i.splice(s, 1), "{" + o + "}";
|
|
1658
|
+
}(t);
|
|
1659
|
+
}
|
|
1660
|
+
var Ye = e({
|
|
1661
|
+
DATA_URL_PNG_PREFIX: () => Qe,
|
|
1662
|
+
getImageDataUrl: () => nn,
|
|
1663
|
+
getPngStatedSize: () => sn,
|
|
1664
|
+
loadImageDetails: () => ln
|
|
1665
|
+
}), Qe = "data:image/png;base64,", tn = "Unable to resolve image.", en = (t) => new Promise(async (e, n) => {
|
|
1666
|
+
let r = null;
|
|
1667
|
+
try {
|
|
1668
|
+
const o = r = new Image();
|
|
1669
|
+
o.src = t, o.addEventListener("load", function() {
|
|
1670
|
+
e({
|
|
1671
|
+
width: o.naturalWidth,
|
|
1672
|
+
height: o.naturalHeight
|
|
1673
|
+
});
|
|
1674
|
+
}, { once: !0 }), o.addEventListener("error", function(e) {
|
|
1675
|
+
URL.revokeObjectURL(t);
|
|
1676
|
+
let r = e?.error?.message ?? "";
|
|
1677
|
+
r && (r = `: ${r}`), n(`Invalid Image${r}`);
|
|
1678
|
+
}, { once: !0 }), await o.decode();
|
|
1679
|
+
} catch (t) {
|
|
1680
|
+
r?.src && URL.revokeObjectURL(r.src);
|
|
1681
|
+
}
|
|
1682
|
+
r || n(new Error(tn));
|
|
1683
|
+
}), nn = (t, e = 1) => new Promise(async (n, r) => {
|
|
1684
|
+
let o = null;
|
|
1685
|
+
try {
|
|
1686
|
+
const i = o = new Image();
|
|
1687
|
+
i.src = t, i.addEventListener("load", function() {
|
|
1688
|
+
try {
|
|
1689
|
+
const t = document.createElement("canvas");
|
|
1690
|
+
t.width = i.naturalWidth, t.height = i.naturalHeight;
|
|
1691
|
+
const r = t.getContext("2d");
|
|
1692
|
+
if (!r) throw new Error("Unable to create 2d context");
|
|
1693
|
+
r.drawImage(i, 0, 0);
|
|
1694
|
+
const o = t.toDataURL("image/png", e);
|
|
1695
|
+
n({
|
|
1696
|
+
elemImg: i,
|
|
1697
|
+
dataUrl: o
|
|
1698
|
+
});
|
|
1699
|
+
} catch (e) {
|
|
1700
|
+
URL.revokeObjectURL(t), r(e);
|
|
1701
|
+
}
|
|
1702
|
+
}, { once: !0 }), i.addEventListener("error", function() {
|
|
1703
|
+
URL.revokeObjectURL(t), r("Invalid Image");
|
|
1704
|
+
}, { once: !0 }), await i.decode();
|
|
1705
|
+
} catch (t) {
|
|
1706
|
+
o?.src && URL.revokeObjectURL(o.src);
|
|
1707
|
+
}
|
|
1708
|
+
o || r(new Error(tn));
|
|
1709
|
+
}), rn = [2303741511, 218765834], on = 96 / .0254, sn = (t) => {
|
|
1710
|
+
const e = new DataView(t);
|
|
1711
|
+
if (e.byteLength < 24 || e.getUint32(0) !== rn[0] || e.getUint32(4) !== rn[1]) return null;
|
|
1712
|
+
let n = 8;
|
|
1713
|
+
for (; n + 8 <= e.byteLength;) {
|
|
1714
|
+
const t = e.getUint32(n), r = e.getUint32(n + 4);
|
|
1715
|
+
if (1229209940 === r) return null;
|
|
1716
|
+
if (1883789683 === r) {
|
|
1717
|
+
if (9 !== t || n + 17 > e.byteLength) return null;
|
|
1718
|
+
const r = e.getUint32(n + 8), o = e.getUint32(n + 12);
|
|
1719
|
+
return 1 === e.getUint8(n + 16) && r && o ? {
|
|
1720
|
+
width: Math.max(1, Math.round(e.getUint32(16) * on / r)),
|
|
1721
|
+
height: Math.max(1, Math.round(e.getUint32(20) * on / o))
|
|
1722
|
+
} : null;
|
|
1723
|
+
}
|
|
1724
|
+
n += 12 + t;
|
|
1725
|
+
}
|
|
1726
|
+
return null;
|
|
1727
|
+
}, an = "image/svg+xml", ln = async (t, e = null) => {
|
|
1728
|
+
let n = null;
|
|
1729
|
+
const r = async () => {
|
|
1730
|
+
try {
|
|
1731
|
+
const r = e ?? "image/*", o = URL.createObjectURL(new Blob([t], { type: r }));
|
|
1732
|
+
n = {
|
|
1733
|
+
mimeType: r,
|
|
1734
|
+
naturalSize: await en(o),
|
|
1735
|
+
asUrl: o
|
|
1736
|
+
};
|
|
1737
|
+
} catch (t) {}
|
|
1738
|
+
}, o = async () => {
|
|
1739
|
+
try {
|
|
1740
|
+
const r = new TextDecoder().decode(t), o = URL.createObjectURL(new Blob([r], { type: an })), i = await en(o);
|
|
1741
|
+
n = {
|
|
1742
|
+
mimeType: e ?? an,
|
|
1743
|
+
naturalSize: i,
|
|
1744
|
+
asUrl: o,
|
|
1745
|
+
asSVGText: r
|
|
1746
|
+
};
|
|
1747
|
+
} catch (t) {}
|
|
1748
|
+
};
|
|
1749
|
+
if (e === an ? await o() : e?.startsWith("image/") ? await r() : (await r(), n || await o()), !n) throw new Error("Failed to load image");
|
|
1750
|
+
return n;
|
|
1751
|
+
}, cn = class {
|
|
1752
|
+
constructor() {
|
|
1753
|
+
this._resolve = null, this._result = void 0, this._handled = null, this._reject = null, this._error = void 0, this._promise = new Promise((t, e) => {
|
|
1754
|
+
this._resolve = t, this._reject = e, "resolve" === this._handled ? t(this._result) : "reject" === this._handled && e(this._error);
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
resolve(t) {
|
|
1758
|
+
this._resolve ? this._resolve(t) : this._handled || (this._result = t), this._handled = "resolve";
|
|
1759
|
+
}
|
|
1760
|
+
reject(t) {
|
|
1761
|
+
this._reject ? this._reject(t) : this._handled || (this._error = t), this._handled = "reject";
|
|
1762
|
+
}
|
|
1763
|
+
async wait() {
|
|
1764
|
+
await this._promise;
|
|
1765
|
+
}
|
|
1766
|
+
}, un = /* @__PURE__ */ new Set(), dn = (t) => {
|
|
1767
|
+
un.has(t) || (un.add(t), console.warn(`Unknown property '${t}' in update; ignoring.`));
|
|
1768
|
+
};
|
|
1769
|
+
(function(t) {
|
|
1770
|
+
t.PassThrough = Object.freeze({});
|
|
1771
|
+
const e = t.resolveTypedUpdates = (t, n, r, o, i = !1) => {
|
|
1772
|
+
if (null === t) return t;
|
|
1773
|
+
if (void 0 === t) return o;
|
|
1774
|
+
let s = t;
|
|
1775
|
+
if (n?.shorthand) {
|
|
1776
|
+
const e = n?.shorthand(t, r);
|
|
1777
|
+
void 0 !== e && (s = e);
|
|
1778
|
+
}
|
|
1779
|
+
if (null !== s && n?.getSubType) {
|
|
1780
|
+
const t = n.getSubType(s, o);
|
|
1781
|
+
t && (n = t);
|
|
1782
|
+
}
|
|
1783
|
+
const a = n?.properties, l = n?.arrayType ?? !1;
|
|
1784
|
+
let c = s;
|
|
1785
|
+
if (n && n.merge && c && o) c = n.merge(c, o, r);
|
|
1786
|
+
else if (l);
|
|
1787
|
+
else if (a) {
|
|
1788
|
+
const t = Object.keys({
|
|
1789
|
+
...s,
|
|
1790
|
+
...o
|
|
1791
|
+
});
|
|
1792
|
+
c = null;
|
|
1793
|
+
const n = t.length;
|
|
1794
|
+
for (let l = 0; l < n; l++) {
|
|
1795
|
+
const n = t[l];
|
|
1796
|
+
let u, d = s?.[n];
|
|
1797
|
+
if (void 0 !== d) {
|
|
1798
|
+
const t = a[n];
|
|
1799
|
+
if (!t) {
|
|
1800
|
+
dn(n);
|
|
1801
|
+
continue;
|
|
1802
|
+
}
|
|
1803
|
+
u = e(d, t, r, o?.[n], i);
|
|
1804
|
+
} else u = o?.[n];
|
|
1805
|
+
null != u ? (c = c ?? {}, c[n] = u) : i && null === d && (c = c ?? {}, c[n] = null);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
return c;
|
|
1809
|
+
};
|
|
1810
|
+
})(Te || (Te = {}));
|
|
1811
|
+
var hn = class extends Error {
|
|
1812
|
+
constructor(t, e = null) {
|
|
1813
|
+
super(t, e), this.name = "ChainedError", this._cause = e;
|
|
1814
|
+
}
|
|
1815
|
+
get cause() {
|
|
1816
|
+
return this._cause;
|
|
1817
|
+
}
|
|
1818
|
+
}, fn = class extends Error {
|
|
1819
|
+
constructor(t, e) {
|
|
1820
|
+
super(t, e);
|
|
1821
|
+
}
|
|
1822
|
+
}, wn = class extends fn {
|
|
1823
|
+
constructor(t, e) {
|
|
1824
|
+
super(t, e), this.name = "ProtectedError";
|
|
1825
|
+
}
|
|
1826
|
+
}, pn = class extends fn {
|
|
1827
|
+
constructor(t = "Out of bounds", e = null) {
|
|
1828
|
+
super(t, e ?? void 0), this.name = "OutOfBoundsError";
|
|
1829
|
+
}
|
|
1830
|
+
}, gn = class extends fn {
|
|
1831
|
+
constructor(t = "A password is required to open this file.", e) {
|
|
1832
|
+
super(t, e), this.name = "PasswordRequiredError";
|
|
1833
|
+
}
|
|
1834
|
+
}, mn = class extends fn {
|
|
1835
|
+
constructor(t = "The password is incorrect.", e) {
|
|
1836
|
+
super(t, e), this.name = "InvalidPasswordError";
|
|
1837
|
+
}
|
|
1838
|
+
}, yn = class extends hn {
|
|
1839
|
+
constructor(t = "Partial Error", e = null) {
|
|
1840
|
+
super(t, e);
|
|
1841
|
+
}
|
|
1842
|
+
}, _n = class extends hn {
|
|
1843
|
+
constructor(t = "Null not supported", e = null) {
|
|
1844
|
+
super(t, e);
|
|
1845
|
+
}
|
|
1846
|
+
}, Sn = class extends Error {
|
|
1847
|
+
constructor(t = "Null not supported", e) {
|
|
1848
|
+
super(t), this._type = e;
|
|
1849
|
+
}
|
|
1850
|
+
get type() {
|
|
1851
|
+
return this._type;
|
|
1852
|
+
}
|
|
1853
|
+
}, En = class extends hn {
|
|
1854
|
+
constructor(t = "Not implemented", e = null) {
|
|
1855
|
+
super(t, e);
|
|
1856
|
+
}
|
|
1857
|
+
}, bn = { collectErrorChain: (t, e = !1) => {
|
|
1858
|
+
const n = [], r = (t, o = 0) => {
|
|
1859
|
+
if (!t) return;
|
|
1860
|
+
if (n.push({
|
|
1861
|
+
error: t,
|
|
1862
|
+
depth: o
|
|
1863
|
+
}), e && t instanceof fn) return;
|
|
1864
|
+
const i = t.cause;
|
|
1865
|
+
i && i instanceof Error && r(i, o + 1);
|
|
1866
|
+
};
|
|
1867
|
+
return r(t), n.reverse();
|
|
1868
|
+
} }, vn = class extends fn {
|
|
1869
|
+
constructor(t, e) {
|
|
1870
|
+
super("This feature could not be loaded. Check your connection and try again.", e), this.name = "LazyLoadError", this.key = t;
|
|
1871
|
+
}
|
|
1872
|
+
}, xn = /* @__PURE__ */ new Map(), In = (t) => new Promise((e) => setTimeout(e, t)), Cn = (t) => {
|
|
1873
|
+
const e = t instanceof Error ? t.message : "", n = /dynamically imported module:?\s+(\S+)/i.exec(e);
|
|
1874
|
+
if (!n) return null;
|
|
1875
|
+
try {
|
|
1876
|
+
return new URL(n[1]).href;
|
|
1877
|
+
} catch {
|
|
1878
|
+
return null;
|
|
1879
|
+
}
|
|
1880
|
+
}, On = (t) => {
|
|
1881
|
+
const e = new URL(t);
|
|
1882
|
+
return e.searchParams.set("retry", String(Date.now())), import(
|
|
1883
|
+
/* webpackIgnore: true */
|
|
1884
|
+
/* @vite-ignore */
|
|
1885
|
+
e.href
|
|
1886
|
+
);
|
|
1887
|
+
}, kn = () => new Promise((t) => {
|
|
1888
|
+
const e = globalThis.requestIdleCallback;
|
|
1889
|
+
"function" == typeof e ? e(() => t(), { timeout: 2e3 }) : setTimeout(t, 0);
|
|
1890
|
+
}), Rn = (t) => {
|
|
1891
|
+
const e = "undefined" == typeof navigator ? void 0 : navigator;
|
|
1892
|
+
if (!1 === e?.onLine) return !1;
|
|
1893
|
+
const n = e?.connection;
|
|
1894
|
+
if (!0 === n?.saveData) return !1;
|
|
1895
|
+
const r = n?.effectiveType ?? "";
|
|
1896
|
+
return t ? "4g" === r : !/2g$/.test(r);
|
|
1897
|
+
};
|
|
1898
|
+
function An(t, e, n) {
|
|
1899
|
+
const r = n?.prefetch ?? !0, o = n?.select ?? ((t) => t), i = Math.max(0, n?.retries ?? 1), s = n?.retryDelay ?? 250;
|
|
1900
|
+
let a, l = !1, c = null, u = null;
|
|
1901
|
+
const d = {
|
|
1902
|
+
key: t,
|
|
1903
|
+
get prefetch() {
|
|
1904
|
+
return "function" == typeof r ? r() : r;
|
|
1905
|
+
},
|
|
1906
|
+
load: () => l ? Promise.resolve(a) : (c ??= (async () => o(await (async () => {
|
|
1907
|
+
let n;
|
|
1908
|
+
for (let t = 0; t <= i; t++) {
|
|
1909
|
+
t > 0 && await In(s);
|
|
1910
|
+
try {
|
|
1911
|
+
return u ? await On(u) : await e();
|
|
1912
|
+
} catch (t) {
|
|
1913
|
+
n = t, u ??= Cn(t);
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
throw n instanceof vn ? n : new vn(t, { cause: n });
|
|
1917
|
+
})()))().then((t) => (a = t, l = !0, c = null, t), (t) => {
|
|
1918
|
+
throw c = null, t;
|
|
1919
|
+
}), c),
|
|
1920
|
+
peek: () => a
|
|
1921
|
+
};
|
|
1922
|
+
return xn.set(t, d), d;
|
|
1923
|
+
}
|
|
1924
|
+
var jn = {
|
|
1925
|
+
get: (t) => xn.get(t),
|
|
1926
|
+
getAll: () => Array.from(xn.values()),
|
|
1927
|
+
remove: (t) => xn.get(t.key) === t && xn.delete(t.key),
|
|
1928
|
+
prefetch: async (t) => {
|
|
1929
|
+
const e = t?.signal, n = t?.onlyWhenFast ?? !1, r = Array.from(xn.values()).filter((t) => t.prefetch && void 0 === t.peek());
|
|
1930
|
+
for (const t of r) {
|
|
1931
|
+
if (e?.aborted) return;
|
|
1932
|
+
if (await kn(), e?.aborted) return;
|
|
1933
|
+
if (!Rn(n)) return;
|
|
1934
|
+
try {
|
|
1935
|
+
await t.load();
|
|
1936
|
+
} catch {}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
};
|
|
1940
|
+
async function Mn(t, e) {
|
|
1941
|
+
return await t.default({ module_or_path: Ve(e) }), t;
|
|
1942
|
+
}
|
|
1943
|
+
function Tn(t, e) {
|
|
1944
|
+
return t.initSync({ module: Ve(e) }), t;
|
|
1945
|
+
}
|
|
1946
|
+
var Pn = Math.pow(2, 26), Ln = Math.pow(2, 32), Un = Math.pow(2, 53), Nn = (t) => {
|
|
1947
|
+
let e = 0 | t;
|
|
1948
|
+
return e ^= e >>> 16, e = Math.imul(e, 2246822507), e ^= e >>> 13, e = Math.imul(e, 3266489909), e ^= e >>> 16, e >>> 0;
|
|
1949
|
+
};
|
|
1950
|
+
function Bn(t) {
|
|
1951
|
+
let e = 0 | t;
|
|
1952
|
+
const n = () => {
|
|
1953
|
+
e = e + 1831565813 | 0;
|
|
1954
|
+
let t = Math.imul(e ^ e >>> 15, 1 | e);
|
|
1955
|
+
return t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t, (t ^ t >>> 14) >>> 0;
|
|
1956
|
+
};
|
|
1957
|
+
return () => {
|
|
1958
|
+
const t = n() >>> 5, e = n() >>> 6;
|
|
1959
|
+
return (t * Pn + e) / Un;
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
function $n(t, e, n, r, o) {
|
|
1963
|
+
let i = Nn(2654435769 ^ t);
|
|
1964
|
+
i = Nn(i ^ Math.floor(t / Ln)), i = Nn(i ^ e), i = Nn(i ^ n), i = Nn(i ^ r), i = Nn(i ^ o);
|
|
1965
|
+
const s = Nn(i) >>> 5, a = Nn(2246822507 ^ i) >>> 6;
|
|
1966
|
+
return (s * Pn + a) / Un;
|
|
1967
|
+
}
|
|
1968
|
+
function Fn(t) {
|
|
1969
|
+
let e = 2166136261;
|
|
1970
|
+
const n = t.length;
|
|
1971
|
+
for (let r = 0; r < n; r++) e = Math.imul(e ^ t.charCodeAt(r), 16777619);
|
|
1972
|
+
return Nn(e);
|
|
1973
|
+
}
|
|
1974
|
+
var Dn, zn = {
|
|
1975
|
+
code: "safari",
|
|
1976
|
+
message: "The Safari browser does not support advanced copy and paste.\nCopy and paste will be limited to within the browser tab.\n\nPlease use Chrome or Edge if external copy and paste is required."
|
|
1977
|
+
}, Hn = {
|
|
1978
|
+
code: "perms",
|
|
1979
|
+
message: "You do not have permissions to access the clipboard.\nAll copy and paste operations will be limited to the browser tab."
|
|
1980
|
+
}, qn = et() === tt.Safari ? zn : Hn, Jn = {
|
|
1981
|
+
Safari: zn,
|
|
1982
|
+
Perms: Hn,
|
|
1983
|
+
PermsWrite: qn,
|
|
1984
|
+
PermsRead: qn
|
|
1985
|
+
}, Gn = async () => new Promise((t) => {
|
|
1986
|
+
document.hasFocus() ? t() : globalThis.addEventListener?.("focus", () => {
|
|
1987
|
+
t();
|
|
1988
|
+
}, { once: !0 }), document.activeElement.focus?.();
|
|
1989
|
+
}), Wn = async (t, e, n) => {
|
|
1990
|
+
if (et() === tt.Safari) return await n(new Error(zn.message));
|
|
1991
|
+
try {
|
|
1992
|
+
const r = async (t) => {
|
|
1993
|
+
try {
|
|
1994
|
+
return await t();
|
|
1995
|
+
} catch (t) {
|
|
1996
|
+
if (t.message?.includes("Document is not focused")) return !1;
|
|
1997
|
+
throw t;
|
|
1998
|
+
}
|
|
1999
|
+
}, o = await globalThis?.navigator?.permissions?.query({
|
|
2000
|
+
name: t,
|
|
2001
|
+
allowWithoutGesture: !0,
|
|
2002
|
+
allowWithoutSanitization: !0
|
|
2003
|
+
});
|
|
2004
|
+
let i = !1;
|
|
2005
|
+
if ("prompt" === o.state && (i = await r(e)), i || "granted" !== o.state || (i = await e()), !i) return await n(new Error(o.state));
|
|
2006
|
+
} catch (t) {
|
|
2007
|
+
if ("No valid data on clipboard" === t.message || "DataError" === t.name) return;
|
|
2008
|
+
return await n(t);
|
|
2009
|
+
}
|
|
2010
|
+
}, Vn = async (t) => {
|
|
2011
|
+
if (!t) return null;
|
|
2012
|
+
try {
|
|
2013
|
+
return await t.read({ unsanitized: [Vt.Html] });
|
|
2014
|
+
} catch (t) {}
|
|
2015
|
+
return await t.read();
|
|
2016
|
+
}, Xn = async (t, e) => {
|
|
2017
|
+
if (!t) return null;
|
|
2018
|
+
const n = await Vn(t);
|
|
2019
|
+
let r = !1;
|
|
2020
|
+
for (let t = 0; !r && n && t < n.length; t++) if (r = n[t].types.includes(e), r) return await n[t].getType(e);
|
|
2021
|
+
return null;
|
|
2022
|
+
};
|
|
2023
|
+
if (!globalThis.ClipboardItem) {
|
|
2024
|
+
const t = (t, e) => new Blob([e], { type: t });
|
|
2025
|
+
class e {
|
|
2026
|
+
constructor(e, n) {
|
|
2027
|
+
this._items = {}, this._types = Object.keys(e);
|
|
2028
|
+
const r = {}, o = Object.keys(e);
|
|
2029
|
+
for (let n = 0; n < o.length; n++) {
|
|
2030
|
+
const i = o[n];
|
|
2031
|
+
let s = e[i];
|
|
2032
|
+
r[i] = "string" == typeof s ? t(i, s) : s;
|
|
2033
|
+
}
|
|
2034
|
+
this._items = r, this._presentationStyle = n?.presentationStyle ?? "unspecified";
|
|
2035
|
+
}
|
|
2036
|
+
get types() {
|
|
2037
|
+
return this._types;
|
|
2038
|
+
}
|
|
2039
|
+
getType(t) {
|
|
2040
|
+
return Promise.resolve(this._items[t]);
|
|
2041
|
+
}
|
|
2042
|
+
supports(t) {
|
|
2043
|
+
return !0;
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
globalThis.ClipboardItem = e;
|
|
2047
|
+
}
|
|
2048
|
+
var Kn = async (t, e = Vt.Html) => new Promise(async (n, r) => {
|
|
2049
|
+
try {
|
|
2050
|
+
const r = await Xn(t, e);
|
|
2051
|
+
if (r) {
|
|
2052
|
+
const t = new FileReader();
|
|
2053
|
+
t.onload = () => {
|
|
2054
|
+
n(t.result);
|
|
2055
|
+
}, t.onerror = () => {
|
|
2056
|
+
n("");
|
|
2057
|
+
}, t.readAsText(r);
|
|
2058
|
+
} else n("");
|
|
2059
|
+
} catch (t) {
|
|
2060
|
+
r(t);
|
|
2061
|
+
}
|
|
2062
|
+
}), Zn = async (t, e = Vt.Html) => {
|
|
2063
|
+
const n = await Kn(t, e);
|
|
2064
|
+
if (!n) return null;
|
|
2065
|
+
let r = null;
|
|
2066
|
+
try {
|
|
2067
|
+
r = new DOMParser().parseFromString(n, Vt.Html);
|
|
2068
|
+
} catch (t) {
|
|
2069
|
+
console.warn("Can't parse html from clipboard.");
|
|
2070
|
+
}
|
|
2071
|
+
return r;
|
|
2072
|
+
}, Yn = async (t) => {
|
|
2073
|
+
t && await t.writeText("");
|
|
2074
|
+
}, Qn = {
|
|
2075
|
+
readBlobFromClipboard: Xn,
|
|
2076
|
+
readStringFromClipboard: Kn,
|
|
2077
|
+
readHTMLFromClipboard: Zn,
|
|
2078
|
+
clearClipboard: Yn
|
|
2079
|
+
}, tr = "clipboard-uuid", er = "web text/uuid", nr = (t) => `<div style="display:none" ${tr}="${t}"/>`, rr = { type: Vt.Plain }, or = { type: Vt.Html }, ir = { type: er }, sr = (t, e) => {
|
|
2080
|
+
let n = null;
|
|
2081
|
+
try {
|
|
2082
|
+
const r = new DOMParser().parseFromString(e, Vt.Html);
|
|
2083
|
+
r.body.firstElementChild?.setAttribute(tr, t), n = r.getElementsByTagName("body")[0].innerHTML;
|
|
2084
|
+
} catch (t) {
|
|
2085
|
+
console.warn("Can't embed uuid.", t);
|
|
2086
|
+
}
|
|
2087
|
+
return n;
|
|
2088
|
+
}, ar = (t, e) => {
|
|
2089
|
+
if (!e || !t) return !1;
|
|
2090
|
+
try {
|
|
2091
|
+
const n = e.querySelectorAll(`[${tr}="${t}"]`);
|
|
2092
|
+
if (n && 1 === n.length) return !0;
|
|
2093
|
+
if (e.querySelector("parsererror")) throw new Error("We are unable to parse node");
|
|
2094
|
+
return !1;
|
|
2095
|
+
} catch (t) {
|
|
2096
|
+
return !1;
|
|
2097
|
+
}
|
|
2098
|
+
}, lr = class {
|
|
2099
|
+
constructor(t) {
|
|
2100
|
+
if (this._state = null, this._nativeClipboard = null, this._onFocus = null, this._onBlur = null, void 0 === t?.nativeClipboard || !0 === t?.nativeClipboard) try {
|
|
2101
|
+
this._nativeClipboard = globalThis?.navigator.clipboard;
|
|
2102
|
+
} catch (e) {
|
|
2103
|
+
!0 === t?.nativeClipboard && console.warn("NativeClipboard option set to true but no native clipboard available.");
|
|
2104
|
+
}
|
|
2105
|
+
else this._nativeClipboard = !1 === t?.nativeClipboard ? null : t?.nativeClipboard ?? null;
|
|
2106
|
+
this._disableCheckOnFocus = t?.disableCheckOnFocus ?? !1, this._init();
|
|
2107
|
+
}
|
|
2108
|
+
async _checkForChanges() {
|
|
2109
|
+
this._nativeClipboard && this._state && !this._disableCheckOnFocus && await Wn("clipboard-read", async () => {
|
|
2110
|
+
await Gn();
|
|
2111
|
+
const t = await Kn(this._nativeClipboard, er);
|
|
2112
|
+
if (!this._state) return !0;
|
|
2113
|
+
if (t && t === this._state.uuid) return !0;
|
|
2114
|
+
const e = await Zn(this._nativeClipboard, Vt.Html);
|
|
2115
|
+
return !this._state || (ar(this._state.uuid, e) || this.clear(), !0);
|
|
2116
|
+
}, async (t) => {
|
|
2117
|
+
"denied" === t?.message || t.message?.includes("Document is not focused") || et() === tt.Safari || console.warn("Unable to detect clipboard changes: ", t);
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
_init() {
|
|
2121
|
+
const t = this;
|
|
2122
|
+
this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {
|
|
2123
|
+
t._checkForChanges();
|
|
2124
|
+
}, this._onBlur = () => {
|
|
2125
|
+
globalThis.addEventListener?.("focus", t._onFocus, { once: !0 });
|
|
2126
|
+
}, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (e) => {
|
|
2127
|
+
t._checkForChanges();
|
|
2128
|
+
}));
|
|
2129
|
+
}
|
|
2130
|
+
async read() {
|
|
2131
|
+
if (!this._nativeClipboard) return this._state?.items ?? null;
|
|
2132
|
+
const t = this;
|
|
2133
|
+
return await Wn("clipboard-read", async () => {
|
|
2134
|
+
if (await Gn(), this._state?.uuid) {
|
|
2135
|
+
const e = await Kn(this._nativeClipboard, er);
|
|
2136
|
+
if (e && e === t._state?.uuid) return !0;
|
|
2137
|
+
const n = await Zn(this._nativeClipboard, Vt.Html);
|
|
2138
|
+
if (ar(t._state?.uuid, n)) return !0;
|
|
2139
|
+
}
|
|
2140
|
+
return t._state = {
|
|
2141
|
+
items: await Vn(this._nativeClipboard),
|
|
2142
|
+
uuid: null,
|
|
2143
|
+
ref: null
|
|
2144
|
+
}, this.dispatchEvent(new Event("clipboardread")), !0;
|
|
2145
|
+
}, async (t) => {
|
|
2146
|
+
this.dispatchEvent(new Event("clipboarderrorread"));
|
|
2147
|
+
}), this._state?.items ?? [];
|
|
2148
|
+
}
|
|
2149
|
+
async write(t) {
|
|
2150
|
+
return this._write({
|
|
2151
|
+
uuid: E(),
|
|
2152
|
+
items: t,
|
|
2153
|
+
ref: null
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
async _write(t) {
|
|
2157
|
+
if (!this._nativeClipboard) return this._state = t, this.dispatchEvent(new Event("clipboardwrite")), void this.dispatchEvent(new Event("clipboardchange"));
|
|
2158
|
+
const e = this, n = [], r = t.uuid;
|
|
2159
|
+
let o = t.items ?? [];
|
|
2160
|
+
const i = () => {
|
|
2161
|
+
e._state = {
|
|
2162
|
+
uuid: r,
|
|
2163
|
+
ref: t.ref,
|
|
2164
|
+
items: n
|
|
2165
|
+
}, e.dispatchEvent(new Event("clipboardwrite")), e.dispatchEvent(new Event("clipboardchange"));
|
|
2166
|
+
};
|
|
2167
|
+
await Wn("clipboard-write", async () => {
|
|
2168
|
+
await Gn(), r && 0 === o.length && (o.push(new ClipboardItem({ [er]: new Blob([r], ir) })), o.push(new ClipboardItem({ [Vt.Html]: new Blob([nr(r)], or) })));
|
|
2169
|
+
for (let t = 0; t < Math.min(1, o.length); t++) {
|
|
2170
|
+
const e = o[t];
|
|
2171
|
+
let i = e.types.indexOf(Vt.Html), s = null;
|
|
2172
|
+
if (-1 !== i && (s = await Ke(await e.getType(Vt.Html)), s && (s = sr(r, s))), !s && e.types.includes(Vt.Plain)) {
|
|
2173
|
+
const t = await e.getType(Vt.Plain);
|
|
2174
|
+
if (t) {
|
|
2175
|
+
let e = null;
|
|
2176
|
+
"string" == typeof t ? (console.warn("text as string", t), e = t) : e = await Ke(t), e && (s = `<div ${tr}="${r}">${e}</div>`);
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
if (!s && e.types.includes(Vt.Png)) {
|
|
2180
|
+
const t = Xe(await (await e.getType(Vt.Png)).arrayBuffer());
|
|
2181
|
+
s = `<div ${tr}="${r}"><img src="${Qe + t}"/></div>`;
|
|
2182
|
+
}
|
|
2183
|
+
!s && r && (s = nr(r));
|
|
2184
|
+
const a = new Blob([s ?? ""], or), l = {}, c = e.types, u = c.length;
|
|
2185
|
+
for (let t = 0; t < u; t++) {
|
|
2186
|
+
const n = c[t];
|
|
2187
|
+
l[n] = t === i ? a : e.getType(n);
|
|
2188
|
+
}
|
|
2189
|
+
s && -1 === i && (l[Vt.Html] = a), r && (l[er] = new Blob([r], ir)), n.push(new ClipboardItem(l));
|
|
2190
|
+
}
|
|
2191
|
+
try {
|
|
2192
|
+
n && 0 !== n.length ? await this._nativeClipboard.write(n) : await Yn(this._nativeClipboard);
|
|
2193
|
+
} catch (t) {
|
|
2194
|
+
t.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", t);
|
|
2195
|
+
}
|
|
2196
|
+
return i(), !0;
|
|
2197
|
+
}, async (t) => {
|
|
2198
|
+
this.dispatchEvent(new Event("clipboarderrorwrite")), i();
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
async writeReference(t) {
|
|
2202
|
+
if (!t) return void this.clear();
|
|
2203
|
+
let e = null;
|
|
2204
|
+
const n = {};
|
|
2205
|
+
try {
|
|
2206
|
+
const e = await t.toText?.() ?? null;
|
|
2207
|
+
e && (n[Vt.Plain] = new Blob([e ?? ""], rr));
|
|
2208
|
+
} catch (t) {
|
|
2209
|
+
e = t;
|
|
2210
|
+
}
|
|
2211
|
+
try {
|
|
2212
|
+
const e = await t.toHtml?.() ?? null;
|
|
2213
|
+
e && (n[Vt.Html] = new Blob([e], { type: Vt.Html }));
|
|
2214
|
+
} catch (t) {
|
|
2215
|
+
e = t, console.warn("export to html", t);
|
|
2216
|
+
}
|
|
2217
|
+
try {
|
|
2218
|
+
const e = await t.toImage?.() ?? null;
|
|
2219
|
+
e && (n[Vt.Png] = e);
|
|
2220
|
+
} catch (t) {
|
|
2221
|
+
e = t, console.warn("export to png", t);
|
|
2222
|
+
}
|
|
2223
|
+
const r = this._write({
|
|
2224
|
+
uuid: E(),
|
|
2225
|
+
ref: t,
|
|
2226
|
+
items: Object.keys(n).length > 0 ? [new ClipboardItem(n)] : null
|
|
2227
|
+
});
|
|
2228
|
+
if (e) throw e;
|
|
2229
|
+
return r;
|
|
2230
|
+
}
|
|
2231
|
+
clear(t = !1) {
|
|
2232
|
+
this._state && (this._state = null, t && this._write({
|
|
2233
|
+
uuid: null,
|
|
2234
|
+
ref: null,
|
|
2235
|
+
items: null
|
|
2236
|
+
}), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));
|
|
2237
|
+
}
|
|
2238
|
+
async readReference() {
|
|
2239
|
+
return await this.read(), this._state?.ref ?? null;
|
|
2240
|
+
}
|
|
2241
|
+
readText() {
|
|
2242
|
+
return new Promise(async (t, e) => {
|
|
2243
|
+
const n = await this.read();
|
|
2244
|
+
let r = null;
|
|
2245
|
+
const o = n ? n.length : 0;
|
|
2246
|
+
for (let t = 0; !r && t < o; t++) {
|
|
2247
|
+
const e = n[t];
|
|
2248
|
+
e.types.includes(Vt.Plain) && (r = await e.getType(Vt.Plain));
|
|
2249
|
+
}
|
|
2250
|
+
if (!r) return void t("");
|
|
2251
|
+
const i = new FileReader();
|
|
2252
|
+
i.onload = () => {
|
|
2253
|
+
t(i.result);
|
|
2254
|
+
}, i.readAsText(r), i.onerror = (t) => {
|
|
2255
|
+
e(t);
|
|
2256
|
+
};
|
|
2257
|
+
});
|
|
2258
|
+
}
|
|
2259
|
+
async writeText(t) {
|
|
2260
|
+
const e = [new ClipboardItem({ [Vt.Plain]: new Blob([t], rr) })];
|
|
2261
|
+
return this._write({
|
|
2262
|
+
uuid: E(),
|
|
2263
|
+
items: e,
|
|
2264
|
+
ref: null
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
addEventListener(t, e, n = {}) {
|
|
2268
|
+
const r = n?.capture ? this._listenersCapture : this._listeners;
|
|
2269
|
+
let o = r.get(t);
|
|
2270
|
+
o || (o = /* @__PURE__ */ new Map(), r.set(t, o)), e && o.set(e, "boolean" == typeof n ? {} : n);
|
|
2271
|
+
}
|
|
2272
|
+
dispatchEvent(t) {
|
|
2273
|
+
if (!t) return !1;
|
|
2274
|
+
const e = (e) => {
|
|
2275
|
+
const n = e.get(t.type);
|
|
2276
|
+
n && n.forEach((e, r) => {
|
|
2277
|
+
try {
|
|
2278
|
+
"function" == typeof r ? r(t) : r.handleEvent && r.handleEvent(t), e.once && n.delete(r);
|
|
2279
|
+
} catch (t) {
|
|
2280
|
+
console.warn(t);
|
|
2281
|
+
}
|
|
2282
|
+
});
|
|
2283
|
+
};
|
|
2284
|
+
return e(this._listenersCapture), e(this._listeners), !0;
|
|
2285
|
+
}
|
|
2286
|
+
removeEventListener(t, e, n) {
|
|
2287
|
+
const r = n?.capture ? this._listenersCapture : this._listeners, o = r.get(t);
|
|
2288
|
+
o && e && (o.delete(e), 0 === o.size && r.delete(t));
|
|
2289
|
+
}
|
|
2290
|
+
close() {
|
|
2291
|
+
this._onFocus && globalThis.removeEventListener?.("focus", this._onFocus), this._onBlur && globalThis.removeEventListener?.("blur", this._onBlur);
|
|
2292
|
+
}
|
|
2293
|
+
};
|
|
2294
|
+
(Dn = lr || (lr = {})).ErrorMessages = Jn, Dn.Global = new lr();
|
|
2295
|
+
var cr = class {
|
|
2296
|
+
constructor(t = 100) {
|
|
2297
|
+
this._undoDescriptions = null, this._redoDescriptions = null, this._maxStack = t, this._undoStack = [], this._redoStack = [], this._repeatOperation = null, this._listeners = /* @__PURE__ */ new Set();
|
|
2298
|
+
}
|
|
2299
|
+
get maxStack() {
|
|
2300
|
+
return this._maxStack;
|
|
2301
|
+
}
|
|
2302
|
+
undo(t = 1) {
|
|
2303
|
+
if (0 === this._undoStack.length) return;
|
|
2304
|
+
let e = !1;
|
|
2305
|
+
try {
|
|
2306
|
+
for (let n = 0; n < t && this._undoStack.length > 0; n++) {
|
|
2307
|
+
const t = this._undoStack[this._undoStack.length - 1];
|
|
2308
|
+
t.redo = t.undo(), this._undoStack.pop(), "function" == typeof t.redo ? this._redoStack.push(t) : this._redoStack = [], e = !0;
|
|
2309
|
+
}
|
|
2310
|
+
} catch (t) {
|
|
2311
|
+
throw t;
|
|
2312
|
+
} finally {
|
|
2313
|
+
e && this._notifyOnStackChange();
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
redo(t = 1) {
|
|
2317
|
+
if (0 === this._redoStack.length) return void (null !== this._repeatOperation && this._repeatOperation.repeat());
|
|
2318
|
+
let e = !1;
|
|
2319
|
+
try {
|
|
2320
|
+
for (let n = 0; n < t && this._redoStack.length > 0; n++) {
|
|
2321
|
+
const t = this._redoStack[this._redoStack.length - 1];
|
|
2322
|
+
t.redo(), this._redoStack.pop(), this._undoStack.push(t), e = !0;
|
|
2323
|
+
}
|
|
2324
|
+
} catch (t) {
|
|
2325
|
+
throw t;
|
|
2326
|
+
} finally {
|
|
2327
|
+
e && this._notifyOnStackChange();
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
hasUndo() {
|
|
2331
|
+
return this._undoStack.length > 0;
|
|
2332
|
+
}
|
|
2333
|
+
getTopUndoDescription() {
|
|
2334
|
+
return 0 === this._undoStack.length ? null : this._undoStack[this._undoStack.length - 1].description;
|
|
2335
|
+
}
|
|
2336
|
+
hasRedo() {
|
|
2337
|
+
return this._redoStack.length > 0 || null !== this._repeatOperation;
|
|
2338
|
+
}
|
|
2339
|
+
getTopRedoDescription() {
|
|
2340
|
+
return null !== this._repeatOperation ? this._repeatOperation.description : 0 === this._redoStack.length ? null : this._redoStack[this._redoStack.length - 1].description;
|
|
2341
|
+
}
|
|
2342
|
+
getUndoDescriptions() {
|
|
2343
|
+
if (this._undoDescriptions) return this._undoDescriptions;
|
|
2344
|
+
const t = [];
|
|
2345
|
+
for (let e = this._undoStack.length - 1; e >= 0; e--) t.push(this._undoStack[e].description);
|
|
2346
|
+
return this._undoDescriptions = t, this._undoDescriptions;
|
|
2347
|
+
}
|
|
2348
|
+
getRedoDescriptions() {
|
|
2349
|
+
if (this._redoDescriptions) return this._redoDescriptions;
|
|
2350
|
+
const t = [];
|
|
2351
|
+
for (let e = this._redoStack.length - 1; e >= 0; e--) t.push(this._redoStack[e].description);
|
|
2352
|
+
return 0 === t.length && null !== this._repeatOperation && t.push(this._repeatOperation.description), this._redoDescriptions = Object.freeze(t), this._redoDescriptions;
|
|
2353
|
+
}
|
|
2354
|
+
getUndoEntries() {
|
|
2355
|
+
return this.getUndoDescriptions().map(dr);
|
|
2356
|
+
}
|
|
2357
|
+
getRedoEntries() {
|
|
2358
|
+
return this.getRedoDescriptions().map(dr);
|
|
2359
|
+
}
|
|
2360
|
+
addUndoOperation(t) {
|
|
2361
|
+
const e = {
|
|
2362
|
+
description: t.description,
|
|
2363
|
+
undo: t.undo,
|
|
2364
|
+
redo: null
|
|
2365
|
+
};
|
|
2366
|
+
this._undoStack.push(e), this._redoStack = [], this._undoStack.length > this._maxStack && this._undoStack.shift(), this._notifyOnStackChange();
|
|
2367
|
+
}
|
|
2368
|
+
setRepeatableOperation(t) {
|
|
2369
|
+
this._repeatOperation = t ?? null, this._redoStack = [], this._notifyOnStackChange();
|
|
2370
|
+
}
|
|
2371
|
+
clear(t = !0) {
|
|
2372
|
+
this._undoStack = [], this._redoStack = [], this._repeatOperation = null, this._undoDescriptions = null, this._redoDescriptions = null, t && this._notifyOnStackChange();
|
|
2373
|
+
}
|
|
2374
|
+
addListener(t) {
|
|
2375
|
+
const e = this._listeners;
|
|
2376
|
+
return e.add(t), () => {
|
|
2377
|
+
e.delete(t);
|
|
2378
|
+
};
|
|
2379
|
+
}
|
|
2380
|
+
_notifyOnStackChange() {
|
|
2381
|
+
this._undoDescriptions = null, this._redoDescriptions = null, this._listeners.forEach((t) => {
|
|
2382
|
+
t.onStackChange?.();
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
}, ur = Object.freeze({}), dr = (t) => ({
|
|
2386
|
+
description: t,
|
|
2387
|
+
author: null,
|
|
2388
|
+
meta: ur
|
|
2389
|
+
}), hr = (t) => " " === t || " " === t || "\n" === t || "\r" === t;
|
|
2390
|
+
function fr(t, e) {
|
|
2391
|
+
for (; e.i < t.length && hr(t[e.i]);) e.i++;
|
|
2392
|
+
}
|
|
2393
|
+
function wr(t, e, n, r) {
|
|
2394
|
+
const o = [];
|
|
2395
|
+
let i = "";
|
|
2396
|
+
const s = () => {
|
|
2397
|
+
i && (o.push(i), i = "");
|
|
2398
|
+
};
|
|
2399
|
+
for (; e.i < t.length;) {
|
|
2400
|
+
const a = t[e.i];
|
|
2401
|
+
if ("}" === a && r > 0) break;
|
|
2402
|
+
if ("{" !== a) if ("#" === a && n) s(), o.push({ kind: "hash" }), e.i++;
|
|
2403
|
+
else {
|
|
2404
|
+
if ("'" === a) {
|
|
2405
|
+
const r = t[e.i + 1];
|
|
2406
|
+
if ("'" === r) {
|
|
2407
|
+
i += "'", e.i += 2;
|
|
2408
|
+
continue;
|
|
2409
|
+
}
|
|
2410
|
+
if ("{" === r || "}" === r || "#" === r && n) {
|
|
2411
|
+
for (e.i++; e.i < t.length;) {
|
|
2412
|
+
const n = t[e.i];
|
|
2413
|
+
if ("'" === n) {
|
|
2414
|
+
if ("'" === t[e.i + 1]) {
|
|
2415
|
+
i += "'", e.i += 2;
|
|
2416
|
+
continue;
|
|
2417
|
+
}
|
|
2418
|
+
e.i++;
|
|
2419
|
+
break;
|
|
2420
|
+
}
|
|
2421
|
+
i += n, e.i++;
|
|
2422
|
+
}
|
|
2423
|
+
continue;
|
|
2424
|
+
}
|
|
2425
|
+
i += "'", e.i++;
|
|
2426
|
+
continue;
|
|
2427
|
+
}
|
|
2428
|
+
i += a, e.i++;
|
|
2429
|
+
}
|
|
2430
|
+
else e.i++, s(), o.push(pr(t, e, n, r));
|
|
2431
|
+
}
|
|
2432
|
+
return s(), o;
|
|
2433
|
+
}
|
|
2434
|
+
function pr(t, e, n, r) {
|
|
2435
|
+
const o = e.i;
|
|
2436
|
+
for (; e.i < t.length && "," !== t[e.i] && "}" !== t[e.i];) e.i++;
|
|
2437
|
+
const i = t.slice(o, e.i).trim();
|
|
2438
|
+
if ("}" === t[e.i]) return e.i++, {
|
|
2439
|
+
kind: "arg",
|
|
2440
|
+
name: i
|
|
2441
|
+
};
|
|
2442
|
+
if (e.i >= t.length) return {
|
|
2443
|
+
kind: "arg",
|
|
2444
|
+
name: i
|
|
2445
|
+
};
|
|
2446
|
+
e.i++;
|
|
2447
|
+
const s = e.i;
|
|
2448
|
+
for (; e.i < t.length && "," !== t[e.i] && "}" !== t[e.i];) e.i++;
|
|
2449
|
+
const a = t.slice(s, e.i).trim(), l = "plural" === a || "selectordinal" === a || "select" === a;
|
|
2450
|
+
if ("," !== t[e.i] || !l) {
|
|
2451
|
+
let n = r + 1;
|
|
2452
|
+
for (; e.i < t.length && n > r;) "{" === t[e.i] ? n++ : "}" === t[e.i] && n--, e.i++;
|
|
2453
|
+
return {
|
|
2454
|
+
kind: "arg",
|
|
2455
|
+
name: i
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
e.i++;
|
|
2459
|
+
const c = {};
|
|
2460
|
+
let u = 0;
|
|
2461
|
+
for (; fr(t, e), !(e.i >= t.length);) {
|
|
2462
|
+
if ("}" === t[e.i]) {
|
|
2463
|
+
e.i++;
|
|
2464
|
+
break;
|
|
2465
|
+
}
|
|
2466
|
+
const o = e.i;
|
|
2467
|
+
for (; e.i < t.length && "{" !== t[e.i] && "}" !== t[e.i] && !hr(t[e.i]);) e.i++;
|
|
2468
|
+
const i = t.slice(o, e.i);
|
|
2469
|
+
if (i.startsWith("offset:")) u = parseInt(i.slice(7), 10) || 0;
|
|
2470
|
+
else {
|
|
2471
|
+
if (fr(t, e), "{" !== t[e.i]) break;
|
|
2472
|
+
e.i++, c[i] = wr(t, e, "select" !== a || n, r + 1), "}" === t[e.i] && e.i++;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
return {
|
|
2476
|
+
kind: "branched",
|
|
2477
|
+
type: a,
|
|
2478
|
+
name: i,
|
|
2479
|
+
offset: u,
|
|
2480
|
+
branches: c
|
|
2481
|
+
};
|
|
2482
|
+
}
|
|
2483
|
+
var gr = /* @__PURE__ */ new Map(), mr = /* @__PURE__ */ new Map(), yr = /* @__PURE__ */ new Map();
|
|
2484
|
+
function _r(t, e) {
|
|
2485
|
+
const n = e ? mr : gr;
|
|
2486
|
+
let r = n.get(t);
|
|
2487
|
+
if (!r) {
|
|
2488
|
+
try {
|
|
2489
|
+
r = new Intl.PluralRules(t, e ? { type: "ordinal" } : void 0);
|
|
2490
|
+
} catch {
|
|
2491
|
+
r = new Intl.PluralRules("en", e ? { type: "ordinal" } : void 0);
|
|
2492
|
+
}
|
|
2493
|
+
n.set(t, r);
|
|
2494
|
+
}
|
|
2495
|
+
return r;
|
|
2496
|
+
}
|
|
2497
|
+
function Sr(t) {
|
|
2498
|
+
let e = yr.get(t);
|
|
2499
|
+
if (!e) {
|
|
2500
|
+
try {
|
|
2501
|
+
e = new Intl.NumberFormat(t);
|
|
2502
|
+
} catch {
|
|
2503
|
+
e = new Intl.NumberFormat("en");
|
|
2504
|
+
}
|
|
2505
|
+
yr.set(t, e);
|
|
2506
|
+
}
|
|
2507
|
+
return e;
|
|
2508
|
+
}
|
|
2509
|
+
function Er(t, e, n, r) {
|
|
2510
|
+
let o = "";
|
|
2511
|
+
for (const i of t) {
|
|
2512
|
+
if ("string" == typeof i) {
|
|
2513
|
+
o += i;
|
|
2514
|
+
continue;
|
|
2515
|
+
}
|
|
2516
|
+
if ("arg" === i.kind) {
|
|
2517
|
+
const t = e?.[i.name];
|
|
2518
|
+
o += void 0 === t ? `{${i.name}}` : String(t);
|
|
2519
|
+
continue;
|
|
2520
|
+
}
|
|
2521
|
+
if ("hash" === i.kind) {
|
|
2522
|
+
o += void 0 === r ? "#" : Sr(n).format(r);
|
|
2523
|
+
continue;
|
|
2524
|
+
}
|
|
2525
|
+
const t = e?.[i.name];
|
|
2526
|
+
if ("select" === i.type) {
|
|
2527
|
+
const s = (void 0 !== t ? i.branches[String(t)] : void 0) ?? i.branches.other;
|
|
2528
|
+
o += s ? Er(s, e, n, r) : void 0 === t ? `{${i.name}}` : String(t);
|
|
2529
|
+
continue;
|
|
2530
|
+
}
|
|
2531
|
+
const s = "number" == typeof t ? t : Number(t);
|
|
2532
|
+
if (void 0 === t || Number.isNaN(s)) {
|
|
2533
|
+
const t = i.branches.other;
|
|
2534
|
+
o += t ? Er(t, e, n, void 0) : `{${i.name}}`;
|
|
2535
|
+
continue;
|
|
2536
|
+
}
|
|
2537
|
+
let a = i.branches[`=${s}`];
|
|
2538
|
+
const l = s - i.offset;
|
|
2539
|
+
if (!a) {
|
|
2540
|
+
const t = _r(n, "selectordinal" === i.type).select(l);
|
|
2541
|
+
a = i.branches[t] ?? i.branches.other;
|
|
2542
|
+
}
|
|
2543
|
+
o += a ? Er(a, e, n, l) : String(t);
|
|
2544
|
+
}
|
|
2545
|
+
return o;
|
|
2546
|
+
}
|
|
2547
|
+
var br = /* @__PURE__ */ new Map();
|
|
2548
|
+
function vr(t, e, n = "en") {
|
|
2549
|
+
if (t.indexOf("{") < 0 && t.indexOf("''") < 0) return t;
|
|
2550
|
+
let r = br.get(t);
|
|
2551
|
+
return r || (br.size >= 4e3 && br.clear(), r = wr(t, { i: 0 }, !1, 0), br.set(t, r)), Er(r, e, n, void 0);
|
|
2552
|
+
}
|
|
2553
|
+
var xr = /* @__PURE__ */ new Set();
|
|
2554
|
+
function Ir(t) {
|
|
2555
|
+
return xr.add(t), t.catch(() => {}).finally(() => {
|
|
2556
|
+
xr.delete(t);
|
|
2557
|
+
}), t;
|
|
2558
|
+
}
|
|
2559
|
+
async function Cr() {
|
|
2560
|
+
for (; xr.size;) await Promise.all([...xr].map((t) => t.catch(() => {})));
|
|
2561
|
+
}
|
|
2562
|
+
var Or = "en";
|
|
2563
|
+
function kr(t, e) {
|
|
2564
|
+
return e ? t.replace(/\{(\w+)\}/g, (t, n) => {
|
|
2565
|
+
const r = e[n];
|
|
2566
|
+
return void 0 === r ? t : String(r);
|
|
2567
|
+
}) : t;
|
|
2568
|
+
}
|
|
2569
|
+
function Rr(t) {
|
|
2570
|
+
const e = t.indexOf("-");
|
|
2571
|
+
return e > 0 ? t.slice(0, e) : null;
|
|
2572
|
+
}
|
|
2573
|
+
var Ar = "\0host";
|
|
2574
|
+
function jr() {
|
|
2575
|
+
const t = /* @__PURE__ */ new Map(), e = [], n = /* @__PURE__ */ new Set();
|
|
2576
|
+
let r = "en", o = [], i = 0;
|
|
2577
|
+
const s = /* @__PURE__ */ new Map(), a = (t, e) => `${t}\0${e}`;
|
|
2578
|
+
function l(n, i, s, l) {
|
|
2579
|
+
e.includes(n) || (n === Ar ? e.unshift(n) : e.push(n));
|
|
2580
|
+
const d = a(n, i), f = t.get(d) ?? {};
|
|
2581
|
+
f.isPack = l, "function" == typeof s ? (f.loader = s, f.catalog = void 0, f.pack = void 0, f.loading = void 0) : l ? (f.pack = s, f.catalog = s.messages) : f.catalog = s, t.set(d, f), i !== r && i !== Rr(r) || (f.catalog ? (o = h(r), c(r)) : u(n, i).then(() => {
|
|
2582
|
+
o = h(r), c(r);
|
|
2583
|
+
}).catch((t) => {
|
|
2584
|
+
console.warn(`language messages '${n}' [${i}] failed to load`, t);
|
|
2585
|
+
}));
|
|
2586
|
+
}
|
|
2587
|
+
function c(t) {
|
|
2588
|
+
i++;
|
|
2589
|
+
for (const e of s.keys()) try {
|
|
2590
|
+
e(t);
|
|
2591
|
+
} catch (t) {
|
|
2592
|
+
console.warn("LanguagePackService change listener error", t);
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
async function u(e, n) {
|
|
2596
|
+
const r = t.get(a(e, n));
|
|
2597
|
+
if (r && !r.catalog) {
|
|
2598
|
+
if (!r.loading) {
|
|
2599
|
+
if (!r.loader) return;
|
|
2600
|
+
r.loading = r.loader().then((t) => {
|
|
2601
|
+
const e = t && "object" == typeof t && "default" in t ? t.default : t;
|
|
2602
|
+
r.isPack ? (r.pack = e, r.catalog = e.messages) : r.catalog = e;
|
|
2603
|
+
}).catch((t) => {
|
|
2604
|
+
throw r.loading = void 0, t;
|
|
2605
|
+
});
|
|
2606
|
+
}
|
|
2607
|
+
await r.loading;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
async function d(e) {
|
|
2611
|
+
const n = [];
|
|
2612
|
+
for (const r of t.keys()) {
|
|
2613
|
+
const t = r.lastIndexOf("\0");
|
|
2614
|
+
r.slice(t + 1) === e && n.push(u(r.slice(0, t), e).catch(() => {}));
|
|
2615
|
+
}
|
|
2616
|
+
await Promise.all(n);
|
|
2617
|
+
}
|
|
2618
|
+
function h(r) {
|
|
2619
|
+
const o = [], i = (r) => {
|
|
2620
|
+
const i = [], s = [];
|
|
2621
|
+
for (const t of e) t !== Ar && (n.has(t) ? s : i).push(t);
|
|
2622
|
+
for (const e of [
|
|
2623
|
+
Ar,
|
|
2624
|
+
...i.reverse(),
|
|
2625
|
+
...s.reverse()
|
|
2626
|
+
]) {
|
|
2627
|
+
const n = t.get(a(e, r))?.catalog;
|
|
2628
|
+
n && o.push(n);
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
i(r);
|
|
2632
|
+
const s = Rr(r);
|
|
2633
|
+
return s && i(s), o;
|
|
2634
|
+
}
|
|
2635
|
+
function f() {
|
|
2636
|
+
const e = /* @__PURE__ */ new Set();
|
|
2637
|
+
for (const n of t.keys()) e.add(n.slice(n.lastIndexOf("\0") + 1));
|
|
2638
|
+
return e;
|
|
2639
|
+
}
|
|
2640
|
+
function w(t) {
|
|
2641
|
+
const e = s.get(t);
|
|
2642
|
+
if (e) return e;
|
|
2643
|
+
const n = () => {
|
|
2644
|
+
s.delete(t);
|
|
2645
|
+
};
|
|
2646
|
+
return s.set(t, n), n;
|
|
2647
|
+
}
|
|
2648
|
+
function p(t) {
|
|
2649
|
+
const e = o.length;
|
|
2650
|
+
for (let n = 0; n < e; n++) {
|
|
2651
|
+
const e = o[n][t];
|
|
2652
|
+
if (void 0 !== e) return e;
|
|
2653
|
+
}
|
|
2654
|
+
}
|
|
2655
|
+
function g(t, e) {
|
|
2656
|
+
const n = p(t);
|
|
2657
|
+
return void 0 === n ? void 0 : vr(n, e, r);
|
|
2658
|
+
}
|
|
2659
|
+
return {
|
|
2660
|
+
register: function(t, e) {
|
|
2661
|
+
l(Ar, t, e, !0);
|
|
2662
|
+
},
|
|
2663
|
+
registerPack: function(t, e, n) {
|
|
2664
|
+
l(t, e, n, !0);
|
|
2665
|
+
},
|
|
2666
|
+
registerMessages: function(t, e, n) {
|
|
2667
|
+
l(t, e, n, !1);
|
|
2668
|
+
},
|
|
2669
|
+
registerDefaultMessages: function(t, e, r) {
|
|
2670
|
+
const o = "\0default:" + t;
|
|
2671
|
+
n.add(o), l(o, e, r, !1);
|
|
2672
|
+
},
|
|
2673
|
+
setActive: async function(t) {
|
|
2674
|
+
await Cr(), await d(t);
|
|
2675
|
+
const e = Rr(t);
|
|
2676
|
+
e && await d(e), r = t, o = h(t), c(t);
|
|
2677
|
+
},
|
|
2678
|
+
getActive: function() {
|
|
2679
|
+
return r;
|
|
2680
|
+
},
|
|
2681
|
+
getAvailable: function() {
|
|
2682
|
+
return [.../* @__PURE__ */ new Set(["en", ...f()])];
|
|
2683
|
+
},
|
|
2684
|
+
prefetch: async function(t) {
|
|
2685
|
+
await Cr();
|
|
2686
|
+
const e = void 0 === t ? [...f()] : Array.isArray(t) ? t : [t];
|
|
2687
|
+
await Promise.all(e.map((t) => d(t))), e.includes(r) && (o = h(r));
|
|
2688
|
+
},
|
|
2689
|
+
getPack: function(e) {
|
|
2690
|
+
return t.get(a(Ar, e ?? r))?.pack;
|
|
2691
|
+
},
|
|
2692
|
+
getPacks: function(n) {
|
|
2693
|
+
const o = n ?? r, i = [], s = (n) => {
|
|
2694
|
+
for (const r of e) {
|
|
2695
|
+
if (r === Ar) continue;
|
|
2696
|
+
const e = t.get(a(r, n))?.pack;
|
|
2697
|
+
e && i.push(e);
|
|
2698
|
+
}
|
|
2699
|
+
const r = t.get(a(Ar, n))?.pack;
|
|
2700
|
+
r && i.push(r);
|
|
2701
|
+
}, l = Rr(o);
|
|
2702
|
+
return l && s(l), s(o), i;
|
|
2703
|
+
},
|
|
2704
|
+
addChangeListener: w,
|
|
2705
|
+
getRevision: function() {
|
|
2706
|
+
return i;
|
|
2707
|
+
},
|
|
2708
|
+
lookup: g,
|
|
2709
|
+
t: function(t, e) {
|
|
2710
|
+
return g(t, e) ?? t;
|
|
2711
|
+
},
|
|
2712
|
+
has: function(t) {
|
|
2713
|
+
return void 0 !== p(t);
|
|
2714
|
+
},
|
|
2715
|
+
get language() {
|
|
2716
|
+
return r;
|
|
2717
|
+
},
|
|
2718
|
+
onChange: w
|
|
2719
|
+
};
|
|
2720
|
+
}
|
|
2721
|
+
var Mr = jr();
|
|
2722
|
+
function Tr(t, e) {
|
|
2723
|
+
return Mr.lookup(t, e) ?? t;
|
|
2724
|
+
}
|
|
2725
|
+
function Pr(t) {
|
|
2726
|
+
return t;
|
|
2727
|
+
}
|
|
2728
|
+
var Lr = "contents.json", Ur = new TextDecoder();
|
|
2729
|
+
function Nr(t, e, n, r) {
|
|
2730
|
+
return t.describe?.(e, n, r) ?? `${t.id}/${e}/${n}/${r}`;
|
|
2731
|
+
}
|
|
2732
|
+
async function Br(t, e, n, r) {
|
|
2733
|
+
const o = [];
|
|
2734
|
+
for (let i = 0; i < t.length; i++) {
|
|
2735
|
+
const s = t[i];
|
|
2736
|
+
if (s.has && !1 === await s.has(e, n, r)) continue;
|
|
2737
|
+
let a;
|
|
2738
|
+
try {
|
|
2739
|
+
a = await s.read(e, n, r);
|
|
2740
|
+
} catch {
|
|
2741
|
+
continue;
|
|
2742
|
+
}
|
|
2743
|
+
if (a) try {
|
|
2744
|
+
o.push({
|
|
2745
|
+
rank: i,
|
|
2746
|
+
id: s.id,
|
|
2747
|
+
value: JSON.parse(Ur.decode(a))
|
|
2748
|
+
});
|
|
2749
|
+
} catch (t) {
|
|
2750
|
+
throw new Error(`resource '${e}/${n}/${r}' at '${Nr(s, e, n, r)}' is not valid JSON: ${t?.message ?? t}`);
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
return o;
|
|
2754
|
+
}
|
|
2755
|
+
async function $r(t, e, n, r) {
|
|
2756
|
+
return (await Br(t, e, n, r)).map((t) => t.value);
|
|
2757
|
+
}
|
|
2758
|
+
var Fr = "resources", Dr = (t) => import(
|
|
2759
|
+
/* @vite-ignore */
|
|
2760
|
+
/* webpackIgnore: true */
|
|
2761
|
+
t
|
|
2762
|
+
);
|
|
2763
|
+
async function zr(t, e, n, r = "") {
|
|
2764
|
+
const o = [];
|
|
2765
|
+
for (const i of await t.readdir(n, { withFileTypes: !0 })) {
|
|
2766
|
+
const s = r ? `${r}/${i.name}` : i.name;
|
|
2767
|
+
i.isDirectory() ? o.push(...await zr(t, e, e.join(n, i.name), s)) : o.push(s);
|
|
2768
|
+
}
|
|
2769
|
+
return o;
|
|
2770
|
+
}
|
|
2771
|
+
function Hr(t, e) {
|
|
2772
|
+
const n = async (n, r) => (await Dr("node:path")).join(t, ...e(n, r));
|
|
2773
|
+
return {
|
|
2774
|
+
id: t,
|
|
2775
|
+
describe: (n, r, o) => [
|
|
2776
|
+
t,
|
|
2777
|
+
...e(n, r),
|
|
2778
|
+
o
|
|
2779
|
+
].join("/"),
|
|
2780
|
+
async read(t, e, r) {
|
|
2781
|
+
const o = await Dr("node:fs/promises"), i = await Dr("node:path");
|
|
2782
|
+
try {
|
|
2783
|
+
return await o.readFile(i.join(await n(t, e), r));
|
|
2784
|
+
} catch {
|
|
2785
|
+
return null;
|
|
2786
|
+
}
|
|
2787
|
+
},
|
|
2788
|
+
async list(t, e) {
|
|
2789
|
+
const r = await Dr("node:fs/promises"), o = await Dr("node:path");
|
|
2790
|
+
try {
|
|
2791
|
+
return await zr(r, o, await n(t, e));
|
|
2792
|
+
} catch {
|
|
2793
|
+
return null;
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
var qr = [], Jr = null, Gr = /* @__PURE__ */ new Map();
|
|
2799
|
+
async function Wr(t, e, n) {
|
|
2800
|
+
const { user: r, app: o } = await async function() {
|
|
2801
|
+
if (Jr) return Jr;
|
|
2802
|
+
const t = [], e = [];
|
|
2803
|
+
try {
|
|
2804
|
+
const n = await Dr("node:path"), r = await Dr("node:os"), o = await Dr("node:fs"), i = globalThis.process, s = i?.env?.SHEETXL_RESOURCE_PATH;
|
|
2805
|
+
if (s) for (const e of String(s).split(n.delimiter)) {
|
|
2806
|
+
const n = e.trim();
|
|
2807
|
+
n && t.push(Hr(n, (t, e) => [t, e]));
|
|
2808
|
+
}
|
|
2809
|
+
const a = r.homedir();
|
|
2810
|
+
a && t.push(Hr(n.join(a, ".sheetxl", Fr), (t, e) => [t, e]));
|
|
2811
|
+
const l = i?.argv?.[1];
|
|
2812
|
+
if (l) {
|
|
2813
|
+
const t = n.join(n.dirname(o.realpathSync(l)), Fr);
|
|
2814
|
+
o.existsSync(t) && e.push(Hr(t, (t, e) => [t, e]));
|
|
2815
|
+
}
|
|
2816
|
+
} catch {}
|
|
2817
|
+
return Jr = {
|
|
2818
|
+
user: t,
|
|
2819
|
+
app: e
|
|
2820
|
+
};
|
|
2821
|
+
}(), i = [...r, ...qr];
|
|
2822
|
+
if (e && i.push(Hr(e, (t, e) => [e])), i.push(...o), n) {
|
|
2823
|
+
const e = await async function(t, e) {
|
|
2824
|
+
const n = `${t}\0${e}`;
|
|
2825
|
+
if (Gr.has(n)) return Gr.get(n);
|
|
2826
|
+
const r = await Dr("node:url"), o = await Dr("node:fs/promises"), i = await Dr("node:path");
|
|
2827
|
+
let s = null;
|
|
2828
|
+
try {
|
|
2829
|
+
let n = i.dirname(r.fileURLToPath(e));
|
|
2830
|
+
for (let e = 0; e < 12; e++) {
|
|
2831
|
+
try {
|
|
2832
|
+
const e = await o.readFile(i.join(n, "package.json"), "utf8");
|
|
2833
|
+
if (JSON.parse(e).name === t) {
|
|
2834
|
+
s = n;
|
|
2835
|
+
break;
|
|
2836
|
+
}
|
|
2837
|
+
} catch {}
|
|
2838
|
+
const e = i.dirname(n);
|
|
2839
|
+
if (e === n) break;
|
|
2840
|
+
n = e;
|
|
2841
|
+
}
|
|
2842
|
+
} catch {}
|
|
2843
|
+
return Gr.set(n, s), s;
|
|
2844
|
+
}(t, n);
|
|
2845
|
+
e && i.push(Hr(e, (t) => [Fr, t]));
|
|
2846
|
+
}
|
|
2847
|
+
return i;
|
|
2848
|
+
}
|
|
2849
|
+
async function Vr(t, e, n, r, o) {
|
|
2850
|
+
return $r(await Wr(e, r, o), t, e, n);
|
|
2851
|
+
}
|
|
2852
|
+
async function Xr(t, e, n, r, o) {
|
|
2853
|
+
return async function(t, e, n, r) {
|
|
2854
|
+
const o = await $r(t, e, n, r);
|
|
2855
|
+
if (o.length > 0) return o[0];
|
|
2856
|
+
const i = t.map((t) => Nr(t, e, n, r));
|
|
2857
|
+
throw new Error(`resource '${e}/${n}/${r}' not found. Looked in:\n ${i.join("\n ")}` + (0 === i.length ? "\n (no resource roots configured — set SHEETXL_RESOURCE_PATH or call addResourceRoot)" : ""));
|
|
2858
|
+
}(await Wr(e, r, o), t, e, n);
|
|
2859
|
+
}
|
|
2860
|
+
async function Kr(t, e, n, r) {
|
|
2861
|
+
return async function(t, e, n) {
|
|
2862
|
+
const r = [];
|
|
2863
|
+
for (const o of t) if (!1 !== (o.has ? await o.has(e, n) : null)) {
|
|
2864
|
+
if (!1 !== (o.has ? await o.has(e, n, "contents.json") : null)) try {
|
|
2865
|
+
const t = await o.read(e, n, Lr);
|
|
2866
|
+
if (t) {
|
|
2867
|
+
r.push(JSON.parse(Ur.decode(t)));
|
|
2868
|
+
continue;
|
|
2869
|
+
}
|
|
2870
|
+
} catch {}
|
|
2871
|
+
if (o.list) try {
|
|
2872
|
+
const t = (await o.list(e, n))?.filter((t) => t !== Lr);
|
|
2873
|
+
t?.length && r.push({
|
|
2874
|
+
kind: e,
|
|
2875
|
+
package: n,
|
|
2876
|
+
entries: t.map((t) => ({ path: t }))
|
|
2877
|
+
});
|
|
2878
|
+
} catch {}
|
|
2879
|
+
}
|
|
2880
|
+
return r;
|
|
2881
|
+
}(await Wr(e, n, r), t, e);
|
|
2882
|
+
}
|
|
2883
|
+
var Zr = "locales", Yr = null, Qr = /* @__PURE__ */ new Set();
|
|
2884
|
+
function to() {
|
|
2885
|
+
for (const t of [...Qr]) t();
|
|
2886
|
+
}
|
|
2887
|
+
function eo(t) {
|
|
2888
|
+
(function(t) {
|
|
2889
|
+
const e = "string" == typeof t ? Hr(t, (t, e) => [t, e]) : t;
|
|
2890
|
+
e.id && !qr.some((t) => t.id === e.id) && qr.push(e);
|
|
2891
|
+
})(t), to();
|
|
2892
|
+
}
|
|
2893
|
+
function no(t) {
|
|
2894
|
+
const e = t.endsWith("/") ? t : `${t}/`;
|
|
2895
|
+
e !== Yr && (Yr = e, to());
|
|
2896
|
+
}
|
|
2897
|
+
function ro() {
|
|
2898
|
+
return Yr;
|
|
2899
|
+
}
|
|
2900
|
+
function oo(t, e) {
|
|
2901
|
+
return Yr ? `${Yr}${t}/${e}` : null;
|
|
2902
|
+
}
|
|
2903
|
+
function io(t) {
|
|
2904
|
+
return Qr.add(t), () => {
|
|
2905
|
+
Qr.delete(t);
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2908
|
+
function so(t, e, n) {
|
|
2909
|
+
return Xr(Zr, t, e, Yr, n);
|
|
2910
|
+
}
|
|
2911
|
+
function ao(t, e, n) {
|
|
2912
|
+
return Vr(Zr, t, e, Yr, n);
|
|
2913
|
+
}
|
|
2914
|
+
async function lo(t, e, n, r) {
|
|
2915
|
+
const o = (await Promise.all(n.map((n) => async function(t, e, n, r, o) {
|
|
2916
|
+
return Br(await Wr(e, r, o), t, e, n);
|
|
2917
|
+
}(Zr, t, `${e}/${n}`, Yr, r).then((t) => t.map((t) => ({
|
|
2918
|
+
...t,
|
|
2919
|
+
file: n
|
|
2920
|
+
})))))).flat();
|
|
2921
|
+
return o.sort((t, e) => e.rank - t.rank || t.file.localeCompare(e.file)), Object.assign({}, ...o.map((t) => t.value));
|
|
2922
|
+
}
|
|
2923
|
+
function co(t, e) {
|
|
2924
|
+
return Kr(Zr, t, Yr, e);
|
|
2925
|
+
}
|
|
2926
|
+
var uo = "inherit.json";
|
|
2927
|
+
async function ho(t, e, n) {
|
|
2928
|
+
const r = 0 === e.length || e.some((t) => t.path === uo) ? (await Vr(Zr, t, uo, Yr, n))[0] ?? {} : {}, o = {}, i = (t) => o[t] ??= {
|
|
2929
|
+
tag: t,
|
|
2930
|
+
...r[t]?.length ? { inherit: r[t] } : {}
|
|
2931
|
+
};
|
|
2932
|
+
await Promise.all(e.map(async (e) => {
|
|
2933
|
+
const r = e.path.split("/");
|
|
2934
|
+
if (2 !== r.length) return;
|
|
2935
|
+
const [o, s] = r, a = e.locale ?? o;
|
|
2936
|
+
if ("messages" === e.role || s.endsWith(".msg.json")) return void (i(a).messages ??= []).push(s);
|
|
2937
|
+
if ("catalog" !== e.role && !s.endsWith(".cmd.json")) return;
|
|
2938
|
+
const l = e.scope ?? (await Vr(Zr, t, e.path, Yr, n))[0]?.scope;
|
|
2939
|
+
l && (i(a).catalogs ??= []).push({
|
|
2940
|
+
file: s,
|
|
2941
|
+
scope: l,
|
|
2942
|
+
sourceId: e.sourceId ?? s.replace(/\.cmd\.json$/, "")
|
|
2943
|
+
});
|
|
2944
|
+
}));
|
|
2945
|
+
for (const t of Object.values(o)) t.messages?.sort(), t.catalogs?.sort((t, e) => t.file.localeCompare(e.file));
|
|
2946
|
+
for (const t of Object.keys(r)) i(t);
|
|
2947
|
+
return o;
|
|
2948
|
+
}
|
|
2949
|
+
async function fo(t, e) {
|
|
2950
|
+
const n = {}, r = (t) => {
|
|
2951
|
+
for (const [e, r] of Object.entries(t)) {
|
|
2952
|
+
if (!r) continue;
|
|
2953
|
+
const t = n[e], o = "string" == typeof r.messages ? [r.messages] : r.messages, i = [.../* @__PURE__ */ new Set([...t?.messages ?? [], ...o ?? []])].sort(), s = [...t?.catalogs ?? [], ...r.catalogs ?? []], a = new Map(s.map((t) => [`${t.scope}\0${t.sourceId}`, t]));
|
|
2954
|
+
n[e] = {
|
|
2955
|
+
...t,
|
|
2956
|
+
...r,
|
|
2957
|
+
tag: e,
|
|
2958
|
+
...i.length ? { messages: i } : {},
|
|
2959
|
+
...a.size ? { catalogs: [...a.values()] } : {}
|
|
2960
|
+
};
|
|
2961
|
+
}
|
|
2962
|
+
}, o = await co(t, e);
|
|
2963
|
+
for (const n of [...o].reverse()) r(await ho(t, n.entries ?? [], e));
|
|
2964
|
+
return n;
|
|
2965
|
+
}
|
|
2966
|
+
function wo(t, e) {
|
|
2967
|
+
const n = [], r = (t) => {
|
|
2968
|
+
if (!t || n.includes(t)) return;
|
|
2969
|
+
n.push(t);
|
|
2970
|
+
for (const n of e[t]?.inherit ?? []) r(n);
|
|
2971
|
+
const o = t.indexOf("-");
|
|
2972
|
+
o > 0 && r(t.slice(0, o));
|
|
2973
|
+
};
|
|
2974
|
+
return r(t), n;
|
|
2975
|
+
}
|
|
2976
|
+
var po = /* @__PURE__ */ new Set(), go = /* @__PURE__ */ new Set();
|
|
2977
|
+
async function mo(t, e, n, r) {
|
|
2978
|
+
const o = await Promise.all([...e].reverse().map((e) => lo(t, e, n[e]?.messages ?? [], r)));
|
|
2979
|
+
return Object.assign({}, ...o);
|
|
2980
|
+
}
|
|
2981
|
+
function yo(t, e, n) {
|
|
2982
|
+
return po.has(t) ? Promise.resolve() : (po.add(t), n && Mr.registerDefaultMessages(t, "en", n), go.has(t) || (go.add(t), io(() => {
|
|
2983
|
+
_o(t, e, n);
|
|
2984
|
+
})), _o(t, e, n));
|
|
2985
|
+
}
|
|
2986
|
+
function _o(t, e, n) {
|
|
2987
|
+
return Ir(fo(t, e).then(async (r) => {
|
|
2988
|
+
const o = Object.keys(r);
|
|
2989
|
+
if (0 === o.length) {
|
|
2990
|
+
if (n) return;
|
|
2991
|
+
throw new Error(`no locales for '${t}' were found in any resource root`);
|
|
2992
|
+
}
|
|
2993
|
+
for (const n of o) {
|
|
2994
|
+
if (!r[n].messages?.length) continue;
|
|
2995
|
+
const o = wo(n, r).filter((t) => r[t]?.messages?.length);
|
|
2996
|
+
Mr.registerMessages(t, n, () => mo(t, o, r, e));
|
|
2997
|
+
}
|
|
2998
|
+
}).catch((e) => {
|
|
2999
|
+
po.delete(t), n || console.warn(`@sheetxl: locale messages for '${t}' failed to load; text will render as keys.`, e);
|
|
3000
|
+
}));
|
|
3001
|
+
}
|
|
3002
|
+
function So(t, e, n, r) {
|
|
3003
|
+
return Kr(t, e, n, r);
|
|
3004
|
+
}
|
|
3005
|
+
function Eo(t, e, n, r, o) {
|
|
3006
|
+
return Xr(t, e, n, r, o);
|
|
3007
|
+
}
|
|
3008
|
+
function bo(t) {
|
|
3009
|
+
return "local" === t ? "beta" : /^\d+\.\d+\.\d+-([0-9A-Za-z-]+)/.exec(t)?.[1];
|
|
3010
|
+
}
|
|
3011
|
+
export { te as $, Sn as A, wn as B, Wt as C, mn as D, me as E, cn as F, ro as G, ue as H, cr as I, se as J, An as K, Qt as L, ae as M, ao as N, ie as O, ce as P, n as Q, Qn as R, Mr as S, Fn as St, Vt as T, co as U, wo as V, re as W, ge as X, so as Y, pn as Z, yn as _, hn as _t, $e as a, oo as at, jr as b, gn as bt, vr as c, Ye as ct, Ir as d, lr as dt, no as et, Tn as f, Ee as ft, Or as g, he as gt, Jt as h, h as ht, _n as i, eo as it, So as j, io as k, Xt as l, le as lt, Te as m, Eo as mt, kr as n, fo as nt, Bn as o, ot, Tr as p, En as pt, Cr as q, $n as r, r as rt, vn as s, Yt as st, ke as t, fn as tt, Pr as u, lo as ut, yo as v, bn as vt, Gt as w, Mn as x, De as xt, jn as y, bo as yt, de as z };
|