@sheetxl/studio-vanilla 0.8.0-beta.1 → 0.8.0-beta.3
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/browser/cjs/00npLPxW7DhY7cIJ.cjs +5 -0
- package/browser/cjs/1gbSV4OYBoEWTygY2.cjs +1 -0
- package/browser/cjs/7SCJ4vwRZW4B71kq.cjs +8 -0
- package/browser/cjs/9LTjOB1_w-bikScD.cjs +1 -0
- package/browser/cjs/AVUt0iNPhRf4R5xb.cjs +1 -0
- package/browser/cjs/{aYuNpndpwcZG5eik2.cjs → B2fdTYeKGNugWRgn2.cjs} +2 -2
- package/browser/cjs/B4ANcw0mAmhe2Aeb2.cjs +1 -0
- package/browser/cjs/B6IXpae7f0J8Ocq62.cjs +1 -0
- package/browser/cjs/B6vy56yEA1I3B74O.cjs +1 -0
- package/browser/cjs/B7QDcu7uACQA1y3h.cjs +1 -0
- package/browser/cjs/B7oyN0rn95Kyes8D2.cjs +1 -0
- package/browser/cjs/BArvhvpcrQEcbcyY.cjs +1 -0
- package/browser/cjs/{Ci8Uu7_b4lwwRLAD2.cjs → BC3OSmoFNyA52TRp2.cjs} +1 -1
- package/browser/cjs/{_H5j4dU7HOBYTawU.cjs → BDmBYZigchoACsQx.cjs} +1 -1
- package/browser/cjs/BFmgMQoM5sQsWIxf2.cjs +1 -0
- package/browser/cjs/BIN8L9V0hoUwMh64.cjs +1 -0
- package/browser/cjs/BPWKnUtyoTrtW567.cjs +1 -0
- package/browser/cjs/BcROQ4pvVajDQ1em.cjs +1 -0
- package/browser/cjs/BjjAQLiorKWXy3g5.cjs +4 -0
- package/browser/cjs/Bncc0oXhFMdj_HuR2.cjs +1 -0
- package/browser/cjs/BoRfsJCaLzUHQseD.cjs +1 -0
- package/browser/cjs/BqQgEaUREvuFHYoW.cjs +1 -0
- package/browser/cjs/{Cm21F18ga8TluA9h.cjs → BtAs67e7WBCglqc5.cjs} +1 -1
- package/browser/cjs/BxFSy-hOEbyllj-r2.cjs +22 -0
- package/browser/cjs/{CRx1WvmgBjT8WVyB2.cjs → C0g87ndP2zMUbX6f2.cjs} +1 -1
- package/browser/cjs/C0xAhPzztP9a24zR.cjs +5 -0
- package/browser/cjs/C2SohnuJK8Urc7Fx2.cjs +2 -0
- package/browser/cjs/C3scwi-q2KqEM39H.cjs +126 -0
- package/browser/cjs/C4cZxb9nRtzTCA402.cjs +1 -0
- package/browser/cjs/C9q3zr8iCIoYDrdA2.cjs +1 -0
- package/browser/cjs/CBLwtHFYNB1BTpSS.cjs +1 -0
- package/browser/cjs/{lEQC21-Sk4lwHy2r2.cjs → CFxueP0tbpmvY1Ip2.cjs} +1 -1
- package/browser/cjs/CGtG2pvGgTAnImBg2.cjs +8 -0
- package/browser/cjs/CH0vbLpwoyU7oOFk.cjs +11 -0
- package/browser/cjs/CKtdmbeMjJ2udO8s.cjs +1 -0
- package/browser/cjs/CQ-W9AUNHdts8pmY.cjs +1 -0
- package/browser/cjs/CQ5x8oFPDaU6OCJf.cjs +3 -0
- package/browser/cjs/CRcv32tHTbGSGtkh2.cjs +1 -0
- package/browser/cjs/{DsIHLUKUrSrYhFHl.cjs → CTObzk4r7C71x9Ep2.cjs} +1 -1
- package/browser/cjs/CUyKbhM67853Rnt22.cjs +1 -0
- package/browser/cjs/CVHRh1RGDSgqfAm4.cjs +2 -0
- package/browser/cjs/CVHc_cJddJk7J3Zt.cjs +1 -0
- package/browser/cjs/CaJGoNwTL6pAJ6a42.cjs +1 -0
- package/browser/cjs/{bGMaev70Zd_NXqLM2.cjs → CcqhH_Ign02tLFbU2.cjs} +1 -1
- package/browser/cjs/CdsreHc3A0wBhEy9.cjs +14 -0
- package/browser/cjs/CfXcRa4RlFmqU0Op.cjs +1 -0
- package/browser/cjs/CgyU8XPzm6O1a93m.cjs +41 -0
- package/browser/cjs/CzGNIWwu8KL3tcCO2.cjs +1 -0
- package/browser/cjs/D-8QQWC-67PplJdV2.cjs +1 -0
- package/browser/cjs/D6XEHfNbKx-9qZye.cjs +32 -0
- package/browser/cjs/{a0Z-SXs_N71CtqYb2.cjs → D6YaqporVrSewZpm2.cjs} +1 -1
- package/browser/cjs/D6m2M4H6JZaYZ4El2.cjs +1 -0
- package/browser/cjs/{DIbdDzNf_3S2RYZN.cjs → D9SdUvJVa64UoGj9.cjs} +1 -1
- package/browser/cjs/DCVnwgmc5HuYp_iv2.cjs +1 -0
- package/browser/cjs/{EeOVMRq7TuptFKTc2.cjs → DF4l8xrxkcLkgExp.cjs} +1 -1
- package/browser/cjs/DNnMGL1ff8hutxSd.cjs +1 -0
- package/browser/cjs/{D19RglhKiroWfpQn2.cjs → DOEhH2HGT1Zv0irr2.cjs} +1 -1
- package/browser/cjs/DQOt8XSpXyhsrF9N.cjs +93 -0
- package/browser/cjs/{CnZfa45XxA-9Jhmp.cjs → DRmo6uoGoqtiVff82.cjs} +1 -1
- package/browser/cjs/DSXLVieENYN9qXYl.cjs +1 -0
- package/browser/cjs/{BEJFcqVMDMKOvs11.cjs → DUXRl3eYfSwbhAfx.cjs} +1 -1
- package/browser/cjs/{B9EI7wviSkHS9ZkH.cjs → DWdUSWl4MXn2-MLU.cjs} +1 -1
- package/browser/cjs/DWyoF5GqKXce_GmT2.cjs +3 -0
- package/browser/cjs/Df3jw0eHS0X-qFvT.cjs +1 -0
- package/browser/cjs/{DiZDRPIgbO3sQ8Vb.cjs → Doiqeo4Qlie45lbl.cjs} +1 -1
- package/browser/cjs/Dp2fPEReFhDsI01j.cjs +3 -0
- package/browser/cjs/DpFg69dDCPoOK2BY2.cjs +1 -0
- package/browser/cjs/{Du4jBiFxRIF1OjD4.cjs → Dtxj9JR14A-uliu52.cjs} +1 -1
- package/browser/cjs/{CpJJh4UnFl1_qFui.cjs → Dx7GQ4ALtNG3kshu.cjs} +1 -1
- package/browser/cjs/{DG-AY_xO8RKHtEBE.cjs → Dy50BSaRMmRISD2Y.cjs} +1 -2
- package/browser/cjs/LD1P-jAXleebK12X.cjs +7 -0
- package/browser/cjs/P0AUOlaMi9tyE0vN.cjs +3747 -0
- package/browser/cjs/PmwvZPFhqmL4DO58.cjs +1 -0
- package/browser/cjs/Qp04O3ALK3M9d3At.cjs +54 -0
- package/browser/cjs/SATfdSwNygvlOSKC2.cjs +1 -0
- package/browser/cjs/XRCcogT-Iqd3Wv6R2.cjs +1 -0
- package/browser/cjs/{BziOCn_XEGT4ynN5.cjs → Z_6RasaVpnIv1MHk.cjs} +1 -1
- package/browser/cjs/Zz5dLT_2gLI18Jmx.cjs +7 -0
- package/browser/cjs/a4xpA8d_d22-GKos.cjs +1 -0
- package/browser/cjs/cexWxRluo6g-NG_u.cjs +1 -0
- package/browser/cjs/{C5rQELB0TUeXY6VM.cjs → ge8Wd-0WC6oMuJZR.cjs} +1 -1
- package/browser/cjs/iYn00uzmSLl2T0oN2.cjs +1 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/kj_kwD7S9uUbhKiz2.cjs +1 -0
- package/browser/cjs/qA_ElZ6f49Un56OC.cjs +1 -0
- package/browser/cjs/s2c8Pr4obSACz8Lu2.cjs +1 -0
- package/browser/cjs/{hzUo76TXMOBqsI3U2.cjs → uAWsHfi-JD_ZQIT82.cjs} +1 -1
- package/browser/cjs/uRXkwHKoe-2HtXuR.cjs +1 -0
- package/browser/cjs/{DxQkFYAFNZubVdn22.cjs → y4KFnuCKf8r5oFal2.cjs} +1 -1
- package/browser/esm/{CZWIS7FuqNjbheSw.mjs → 2eBMkUK0-HxaCmDY.mjs} +40 -40
- package/browser/esm/{DzDwSOBdJh_lx_NM.mjs → 53nnk5W22gJW7Ddx.mjs} +241 -241
- package/{cdn/assets/BCZjYGV8AqIZghBH.js → browser/esm/5SHS088DeaZ82qmD2.mjs} +69 -4
- package/browser/esm/{B4vYIE3kSPTxCgpf2.mjs → 5shGy9JSRzvoIfDE2.mjs} +6 -6
- package/browser/esm/{-vgNEEXiEad4bltZ.mjs → 74Ynqpv5NPbb_8vB.mjs} +15762 -16413
- package/browser/esm/B-VKr_KwiWjDeAP5.mjs +3343 -0
- package/{cdn/assets/BDkVAo0CDCTE04ZJ.js → browser/esm/B08GCyGdLNiXtb_R.mjs} +1 -1
- package/browser/esm/{3y_bCend8tkaewDG2.mjs → B0F5gtNQjANAfRw32.mjs} +19 -27
- package/browser/esm/B0gZ5e38MXWbEDS_.mjs +25 -0
- package/browser/esm/{D3G3tI3DVCUF3Gdk.mjs → B45vVm2Ma1i2b6_F.mjs} +1 -1
- package/browser/esm/B5z-uoALcLY2ABTo.mjs +27 -0
- package/{cdn/assets/Bv_96nwOEMHN9Sa0.js → browser/esm/B72sK2NRGAke-aCk2.mjs} +27 -29
- package/{cdn/assets/DQ4o4dG7gWbL1X8F.js → browser/esm/B8q1hrKv7LAL4xmM2.mjs} +2 -2
- package/{cdn/assets/DIQf1pX-j-dWQu_e.js → browser/esm/BCQJVniXgm81YQ0v2.mjs} +141 -140
- package/browser/esm/{CR3jgkduTLczbMjH2.mjs → BCcbek_TFOdgqxXq.mjs} +1 -1
- package/browser/esm/{1guzFZp1LHz_FwfL.mjs → BEb3QhWwGW8rErZy.mjs} +1 -1
- package/browser/esm/{CU1d8OvDv5TU6fSd.mjs → BGRNyE5ar4c3ggrS.mjs} +465 -366
- package/browser/esm/{fJ1McMt7xzRA_lUX.mjs → BHIVjD6BdBS3BAWp.mjs} +15 -15
- package/browser/esm/BH_qL-oGqwG-7JKF.mjs +87746 -0
- package/browser/esm/BJ26E2DhS1Jz4nUY2.mjs +514 -0
- package/browser/esm/BJVcTpMN-u5XhMVE2.mjs +47 -0
- package/browser/esm/BNgf4HZDOKYBkvL3.mjs +15495 -0
- package/browser/esm/BOMJTicRKnx01hw-.mjs +155 -0
- package/browser/esm/{8V-VceXEjpADM8qK2.mjs → BPZxx-OH0wACHLsN2.mjs} +1 -1
- package/browser/esm/BQIRHi8T3P5MZtan.mjs +15 -0
- package/browser/esm/{Dc0BDcQUGy_WIVFa.mjs → BQhVWbI9uag9iRfX2.mjs} +1 -1
- package/{cdn/assets/D_t53-8k73CNpV-p2.js → browser/esm/BSWXx2rKOMPxLLs8.mjs} +88 -72
- package/browser/esm/{CJPemkFUzhcAD_qR.mjs → BUjTEjAeByh6MKpn.mjs} +1 -1
- package/{cdn/assets/B5ZqqASTcBEV5L9K.js → browser/esm/BUokT-PbfvYzD63f2.mjs} +1 -1
- package/browser/esm/BYAZ3XZq8XXkOulw.mjs +758 -0
- package/browser/esm/BYPIn5AkddMzMcsa2.mjs +117 -0
- package/browser/esm/{CH0of3GZTzHviuQV.mjs → BcPnGFFKCddWgOch.mjs} +1 -1
- package/browser/esm/{BCkXtOM3yKocv7L-2.mjs → BgwzL8v2pmR5HJXW.mjs} +1 -1
- package/browser/esm/BiomOxscV1M0Uw2n.mjs +37 -0
- package/browser/esm/{DTaVECXVrgvC48BE.mjs → Bj42pxe5AuY4bF2e.mjs} +3 -3
- package/browser/esm/{DBL3Qp5jyPrFg7KI2.mjs → BmC-_QeQ-53oyorq2.mjs} +1 -1
- package/browser/esm/{DW72HwfnJtQxzoGa.mjs → BnHE1Z6WkOfTWheU2.mjs} +2 -2
- package/{cdn/assets/BHBJtVTiQByD_y9j2.js → browser/esm/BoWCDK44X4tp02_4.mjs} +2 -2
- package/browser/esm/{DVZ_UnchuMRveDG32.mjs → Bq7qy-C7tVkiIaDE2.mjs} +42 -4
- package/browser/esm/{Cc5IufffX4N-8QpE.mjs → BrzXFBoYDjcG3ct8.mjs} +3 -3
- package/browser/esm/{BOl4FzJRD7MplCU72.mjs → BsY_DyFxoqjRHTv02.mjs} +1 -1
- package/{cdn/assets/COA_SZY2x8q6t4BD.js → browser/esm/Bsfof8nD-exhrNwn.mjs} +7 -6
- package/browser/esm/BtC6lEbd98TeKGsX2.mjs +298 -0
- package/browser/esm/BuoHLVUSwf-mq0hg2.mjs +32 -0
- package/browser/esm/{R5bs6kCQSZmsCXz-.mjs → BwbR2Dao5LgLYQgV.mjs} +1 -1
- package/browser/esm/ByQakLd0YFwc0Lgl.mjs +91 -0
- package/browser/esm/{DuPdSe-EXFTx9dsc2.mjs → C-97pwItkHA3s5rD2.mjs} +16 -16
- package/browser/esm/{DMLwXmjo28k_iNEU.mjs → C02og4vKxq9qpIUA.mjs} +1866 -1401
- package/{cdn/assets/BykiUmcpDgSRNQI1.js → browser/esm/C0HHZ3XLqp0LgRuW.mjs} +1 -1
- package/browser/esm/C213T1hhBphljJTF2.mjs +19 -0
- package/browser/esm/{Dnx3_xXfRlD6ECfZ2.mjs → C3A-yJ12PN-CPPnI2.mjs} +5 -5
- package/browser/esm/{DQ-0yyFAwoWtxmhV2.mjs → C5Oex2msskTvaCQ92.mjs} +1 -1
- package/{cdn/assets/8f9hCbpXTTYEgG31.js → browser/esm/C5u9ds7LUh9JJEbW2.mjs} +2 -2
- package/browser/esm/{BVRzmIk5PujkT_Ap.mjs → C6D3gk0GBvvDjawh.mjs} +563 -534
- package/browser/esm/{BHmYoIIbNW3GdcqV2.mjs → C7b3GyO7FCiMLeyn.mjs} +1 -1
- package/browser/esm/{BqTFwWLbXXJ0Fu-X2.mjs → C8qOmdaHh4WQkzEy.mjs} +2 -2
- package/browser/esm/CD44l4eg_lxr7kgn2.mjs +115 -0
- package/{cdn/assets/iXWgTu3qpYZHcx1J.js → browser/esm/CDxmuF7Iay8T4cnU.mjs} +963 -946
- package/browser/esm/CS38A8yr4eKvdDZm.mjs +159 -0
- package/browser/esm/CSu0Md4a1JIZrirV.mjs +3324 -0
- package/{cdn/assets/BMRav2VAqEzDSp3r.js → browser/esm/CU1J-I76aVm-KPP6.mjs} +37 -3
- package/{cdn/assets/D9-wpGVbTS9rRpxx.js → browser/esm/CVbPAnmNN3TxMkq4.mjs} +1 -1
- package/browser/esm/{qG5zdZZAe6mQIJo32.mjs → CXvcyGN4L9iDr1LK2.mjs} +5 -5
- package/{cdn/assets/CopfZ7Y1Zn_PDNXK.js → browser/esm/CZN6c8yBDjLVTVpH.mjs} +16 -11
- package/{cdn/assets/DOsbSsKsexrBoeXa2.js → browser/esm/C__tNzwz0i7bQrSu2.mjs} +17 -18
- package/browser/esm/CcPFyWALYlJWf17T2.mjs +58 -0
- package/browser/esm/{47Yv4X226-93If7L.mjs → CcuNkPxT6rqElgbZ2.mjs} +1 -1
- package/{cdn/assets/C1ZePT2B182vSnxW.js → browser/esm/Cjbksosgv7NZFNE0.mjs} +1 -1
- package/browser/esm/{BD7RxHQgrqy_4tb5.mjs → CjxOVBbWLFeUZza82.mjs} +2 -2
- package/browser/esm/CksEMRqAqI-_nekb.mjs +149 -0
- package/{cdn/assets/DZDynaLqNeVaDoiH2.js → browser/esm/CnB5AuoIz-49NXD_.mjs} +3 -3
- package/{cdn/assets/DRc_Wi5c7WdKHTVN.js → browser/esm/Co06Uf-tv1IuVQhe.mjs} +6 -6
- package/browser/esm/{D6SKy2BtcWkhfiA02.mjs → CpzLNwtfx0Zd0OZ0.mjs} +2 -5
- package/{cdn/assets/Cbw0JeJURvQyxIoa.js → browser/esm/CwRAK6IVjIYuwofE.mjs} +1 -1
- package/{cdn/assets/CtXoSHbCUKMY-tSJ2.js → browser/esm/CyS1VLOdAweeZsMV.mjs} +48 -2
- package/browser/esm/CyomJv3_vWy4trRe2.mjs +33 -0
- package/browser/esm/{Be4QC65cR8N84rTn.mjs → D-1WiFWkKNPWXppx2.mjs} +1 -1
- package/browser/esm/D16eCDM3k1_Fk-MN.mjs +225 -0
- package/browser/esm/{DZbR5R1fNikjgqYb.mjs → D3Qv3--VfvVHImXW.mjs} +1 -1
- package/{cdn/assets/BJEpPEyFWtLzMIq-2.js → browser/esm/D5j8qMZCamJQ82pi.mjs} +1809 -1038
- package/{cdn/assets/CdMv3f8Gyxh8q2RR.js → browser/esm/D718rIGL3d_m1mjm2.mjs} +1 -1
- package/browser/esm/{BPv6Pw1hW-sV5Fya.mjs → DAhlDEV6ehTRvrj72.mjs} +1 -1
- package/browser/esm/{CEN8dYSpN2oew8HH.mjs → DB_I2ygTnDxYiYyc.mjs} +526 -350
- package/browser/esm/{D4VqLbEWag8lTWzC2.mjs → DGde1GUi2j-ZUPJW2.mjs} +121 -94
- package/browser/esm/DJUnZsVsvwRT_Onq2.mjs +8 -0
- package/browser/esm/{DXWmgQSeh0_HDxZj.mjs → DLgM7RXEEfx33zms.mjs} +4 -4
- package/browser/esm/DNxL1aQIN6J2PLV7.mjs +35 -0
- package/browser/esm/{BjTf3XA9Swj0ngpH.mjs → DRRx9F2h6V-Q957j.mjs} +2 -2
- package/{cdn/assets/hFSDx-LnUOObv-6h.js → browser/esm/DZGMsbIACs9TKYrM2.mjs} +2 -2
- package/browser/esm/{DFdU1DsC1lXOrejZ.mjs → Dcpd3kkjvidrDQuN.mjs} +1814 -1737
- package/browser/esm/{7rixDGGrR72lXkMV.mjs → DevyWm6bXV7lW2dr.mjs} +97 -54
- package/browser/esm/{Gy0CHZTvn4hY-rkx2.mjs → DfIwClWz03Qw38-O.mjs} +1 -1
- package/{cdn/assets/CAPgMrAKg07EREFD2.js → browser/esm/Dg7wE0RZdHeJv537.mjs} +1 -1
- package/browser/esm/Dj_S0P34nk_fjFoh2.mjs +427 -0
- package/browser/esm/DjyzSKZNfvxPmFqi.mjs +3342 -0
- package/browser/esm/{9_bymSfTn_rR_v6W.mjs → DlHJ7zkV6AMCtYPP.mjs} +6 -6
- package/browser/esm/{B1NoGosH2YQh01g7.mjs → DnLi57ylUOd3DUek.mjs} +6 -6
- package/{cdn/assets/BVjXdv_wkL1x_8ZJ2.js → browser/esm/DoAKAH3cmECZGboo2.mjs} +1 -1
- package/browser/esm/Dok4MRpMgkcsNzp4.mjs +589 -0
- package/browser/esm/{Blc1T4zLkp8bRC_n2.mjs → DpORFFFF3LUx_zsT2.mjs} +22 -22
- package/{cdn/assets/DvlpP6sUZ9Qzl9s22.js → browser/esm/Ds5mE3-q83ZhE-2T.mjs} +193 -172
- package/browser/esm/Du5dlbWtpboIrJk-2.mjs +394 -0
- package/{cdn/assets/Chq4BwbjH0sbIkJN2.js → browser/esm/DuMveAGZv1j1YAwO.mjs} +28 -13
- package/browser/esm/{C6CK_4GD9IpxKglV2.mjs → GETgdmj9xZWcFrIC2.mjs} +2391 -2900
- package/browser/esm/GJUYPKfNptRZyU9r.mjs +267 -0
- package/browser/esm/{vcRSnmAqjwKglEkY.mjs → JDCQtP0lkncrmnpC2.mjs} +2 -2
- package/browser/esm/{BceIETi6JJRW6Ss62.mjs → OsRyVy3M_rNtmU472.mjs} +13 -13
- package/{cdn/assets/DrUEYcXg6N2D2s1Z.js → browser/esm/OtaDVRqZVyi7IBBa.mjs} +51 -11
- package/browser/esm/OyyHiDjohIf4lZX62.mjs +119 -0
- package/browser/esm/QEPUcBp4VkPz75h8.mjs +637 -0
- package/{cdn/assets/CpnA5TZRkPDt4HnM2.js → browser/esm/R0Xd51SJLUebJwYv.mjs} +2 -2
- package/browser/esm/{DMX-ZlC_ljcf7oUN.mjs → S4MMwlNd4kcK3RDU.mjs} +1 -1
- package/browser/esm/{CsufM5aF6VTLKDWM.mjs → VaST17rbOSkMsGyn.mjs} +12 -12
- package/browser/esm/{DtXC6uPF2LLktqFE.mjs → WfqSQXib2MuH663g.mjs} +2 -2
- package/browser/esm/{CG5v2hAwGR5Ptufn.mjs → XuGWliVSRCNi5it12.mjs} +1 -1
- package/browser/esm/Z83G4i9Tvq4z2kCB.mjs +87 -0
- package/browser/esm/_cZz4ZhEEr54LYNe2.mjs +32 -0
- package/browser/esm/{NekeSGoazNCraGNC2.mjs → cDMkMgN5tB-wni7c2.mjs} +15 -15
- package/{cdn/assets/Clfp7SznkOrJoQvL.js → browser/esm/efVOgresgMXMdh7J2.mjs} +3 -3
- package/{cdn/assets/CGqvy5LwQ4z9J2oD.js → browser/esm/gXemYPUoPvaUd055.mjs} +1 -1
- package/browser/esm/index.mjs +6 -6
- package/browser/esm/kef_IwcJES4VXcNa2.mjs +238 -0
- package/browser/esm/{oYdWyqsKo9ejAdVm.mjs → lfNgkSweNYs6v7g2.mjs} +2 -2
- package/browser/esm/{BLcn1kGRsjURZSzk.mjs → lfNgkSweNYs6v7g22.mjs} +2 -2
- package/{cdn/assets/EwzqnZl1lTr56hH-.js → browser/esm/mbUWaIl3SJkdbWx02.mjs} +1 -1
- package/browser/esm/vDg2R-517z6mPR3B2.mjs +280 -0
- package/browser/esm/{CfvrjQGuf7vXiQCB.mjs → vP8Rb-lgzeerBAx4.mjs} +1 -1
- package/cdn/assets/0uSu6ChH_CTmXM2q2.js +226 -0
- package/{browser/esm/BCZjYGV8AqIZghBH.mjs → cdn/assets/5SHS088DeaZ82qmD.js} +69 -4
- package/cdn/assets/8rILuc7bVIGEeb97.js +394 -0
- package/cdn/assets/9ra2y9Srlg_Pw7Q32.js +590 -0
- package/cdn/assets/B-ylRvlizyArIFrd.js +15496 -0
- package/{browser/esm/BDkVAo0CDCTE04ZJ2.mjs → cdn/assets/B08GCyGdLNiXtb_R2.js} +1 -1
- package/cdn/assets/B0gZ5e38MXWbEDS_.js +25 -0
- package/cdn/assets/{C8mUyjJ26jsHGl_D.js → B15uSTYXbbRVKP0X2.js} +7 -7
- package/cdn/assets/{BixsQGDDf3Iv_PtW2.js → B1Lxf24mP-fwn03r2.js} +1866 -1401
- package/cdn/assets/{D3G3tI3DVCUF3Gdk2.js → B45vVm2Ma1i2b6_F.js} +1 -1
- package/cdn/assets/B63SfOuKJt36aTr_.js +8 -0
- package/cdn/assets/B69EK_yDF3V8Rq2r2.js +299 -0
- package/{browser/esm/Bv_96nwOEMHN9Sa02.mjs → cdn/assets/B72sK2NRGAke-aCk.js} +27 -29
- package/cdn/assets/{DW7JlG-SQEdLYNar2.js → B7SJVFUHxy16UJRA.js} +41 -3
- package/{browser/esm/DQ4o4dG7gWbL1X8F2.mjs → cdn/assets/B8q1hrKv7LAL4xmM.js} +2 -2
- package/cdn/assets/{DVS_5oDniuAFH3vT2.js → BAbRLjxqebqVPyto2.js} +2451 -2960
- package/cdn/assets/BCOGONuWSq4hgADu.js +4426 -0
- package/cdn/assets/{CR3jgkduTLczbMjH.js → BCcbek_TFOdgqxXq2.js} +1 -1
- package/cdn/assets/{1guzFZp1LHz_FwfL2.js → BEb3QhWwGW8rErZy2.js} +1 -1
- package/cdn/assets/BHpE1nCbJEbRdzIG2.js +118 -0
- package/cdn/assets/BJVcTpMN-u5XhMVE.js +47 -0
- package/cdn/assets/{B55nrhIK6gAAu4ZA.js → BLpNuslYLGia3h9t2.js} +2 -2
- package/cdn/assets/{8V-VceXEjpADM8qK.js → BPZxx-OH0wACHLsN.js} +1 -1
- package/cdn/assets/BQIRHi8T3P5MZtan2.js +15 -0
- package/cdn/assets/{Dc0BDcQUGy_WIVFa.js → BQhVWbI9uag9iRfX.js} +1 -1
- package/{browser/esm/D_t53-8k73CNpV-p.mjs → cdn/assets/BSWXx2rKOMPxLLs82.js} +88 -72
- package/cdn/assets/{CBuvbUg67ah_3BOZ.js → BUeKY15yUtNX2nYg.js} +2 -2
- package/cdn/assets/{CJPemkFUzhcAD_qR.js → BUjTEjAeByh6MKpn.js} +1 -1
- package/{browser/esm/B5ZqqASTcBEV5L9K2.mjs → cdn/assets/BUokT-PbfvYzD63f.js} +1 -1
- package/cdn/assets/BWbSIhQVBaXJNFgl.js +3324 -0
- package/cdn/assets/{tVOVNvOs6ro8FXqa2.js → BZDRat2zTkUEg9cR.js} +16 -16
- package/cdn/assets/{c6VvwMHfXubjjtyj.js → BeFqINcF0gIgBnB1.js} +16 -16
- package/cdn/assets/{DJwQ9abZkyFO9Doy.js → Beyy1fJJeov2iYL4.js} +4 -4
- package/cdn/assets/{BCkXtOM3yKocv7L-.js → BgwzL8v2pmR5HJXW2.js} +1 -1
- package/cdn/assets/BiomOxscV1M0Uw2n.js +37 -0
- package/cdn/assets/{DBL3Qp5jyPrFg7KI.js → BmC-_QeQ-53oyorq.js} +1 -1
- package/{browser/esm/BHBJtVTiQByD_y9j.mjs → cdn/assets/BoWCDK44X4tp02_42.js} +2 -2
- package/cdn/assets/{BOl4FzJRD7MplCU7.js → BsY_DyFxoqjRHTv0.js} +1 -1
- package/{browser/esm/COA_SZY2x8q6t4BD.mjs → cdn/assets/Bsfof8nD-exhrNwn.js} +7 -6
- package/cdn/assets/{BzUU8y1IFjREzgog2.js → BsiuCRJjX2LRrDF22.js} +20 -28
- package/cdn/assets/BuPGWNRZMMyn4fm8.js +268 -0
- package/cdn/assets/Bub12rk6wWVZVNx62.js +496 -0
- package/cdn/assets/BuoHLVUSwf-mq0hg.js +32 -0
- package/cdn/assets/{DbEGszSW_J_k96KJ.js → ButSau4Lf36Oe3GD.js} +2 -2
- package/cdn/assets/{R5bs6kCQSZmsCXz-2.js → BwbR2Dao5LgLYQgV2.js} +1 -1
- package/{browser/esm/B0HA_dHcr0kKfudQ.mjs → cdn/assets/C-F-eIvIRbCAMD662.js} +194 -171
- package/cdn/assets/{BhDLR-jtbOOG-tl12.js → C-KWjRT0CUb-bkvj2.js} +8 -8
- package/{browser/esm/BykiUmcpDgSRNQI12.mjs → cdn/assets/C0HHZ3XLqp0LgRuW2.js} +1 -1
- package/cdn/assets/C213T1hhBphljJTF.js +19 -0
- package/cdn/assets/{Dnx3_xXfRlD6ECfZ.js → C3A-yJ12PN-CPPnI.js} +5 -5
- package/cdn/assets/C4vZWmW5DZLQTTAx.js +758 -0
- package/cdn/assets/{DQ-0yyFAwoWtxmhV2.js → C5Oex2msskTvaCQ9.js} +1 -1
- package/{browser/esm/8f9hCbpXTTYEgG312.mjs → cdn/assets/C5u9ds7LUh9JJEbW.js} +2 -2
- package/cdn/assets/{BHmYoIIbNW3GdcqV.js → C7b3GyO7FCiMLeyn2.js} +1 -1
- package/cdn/assets/C8W7e-O1V1Mo2HOp.js +35 -0
- package/cdn/assets/{BqTFwWLbXXJ0Fu-X.js → C8qOmdaHh4WQkzEy.js} +2 -2
- package/cdn/assets/{Ce5A_D4YBgi_s2KF.js → CEyEKBYpjE5GGcmE.js} +13 -13
- package/{browser/esm/Dg5wjQp0fArKXlM3.mjs → cdn/assets/CJoCbCtXkTbj6-nC.js} +16 -11
- package/cdn/assets/{j8nXVEYbO2kPuEYQ.js → CLEhV4ZVh2Jf4WLI.js} +3 -3
- package/{browser/esm/BMRav2VAqEzDSp3r2.mjs → cdn/assets/CU1J-I76aVm-KPP6.js} +37 -3
- package/{browser/esm/D9-wpGVbTS9rRpxx.mjs → cdn/assets/CVbPAnmNN3TxMkq4.js} +1 -1
- package/cdn/assets/{2CuCH0wi9XPgVzE42.js → CWIp4JC2SCM6lg-s.js} +11 -9
- package/cdn/assets/{BKEzd89UphJ8q1pp2.js → CXKguOBpJrsoXPTQ.js} +485 -386
- package/cdn/assets/CXgMJ_MuMQRu0isj2.js +159 -0
- package/cdn/assets/{qG5zdZZAe6mQIJo3.js → CXvcyGN4L9iDr1LK.js} +5 -5
- package/cdn/assets/{DnzDlqizzNkbhJP7.js → CYFmWcVbnUCDPJ8m.js} +2 -2
- package/cdn/assets/{CF8m5SqeMaRkGIYM.js → C_W3L9-im26Qc-Ub.js} +2 -2
- package/cdn/assets/Cb7x4GW2rRvj_q2Z.js +87 -0
- package/cdn/assets/CcOMQhQN8PPKQulw2.js +428 -0
- package/cdn/assets/CcPFyWALYlJWf17T.js +58 -0
- package/{browser/esm/Bl6bX86tSq8hfyb2.mjs → cdn/assets/CcXDdl0SsmyEFtmU.js} +965 -944
- package/cdn/assets/{47Yv4X226-93If7L2.js → CcuNkPxT6rqElgbZ.js} +1 -1
- package/cdn/assets/CdDTtABobc5txUF6.js +149 -0
- package/cdn/assets/CdTHBpWoW1Fu4Dg_.js +27 -0
- package/cdn/assets/{CT3G9YRPVfKtHWwf2.js → Cdm7E0sw56lpdqRU2.js} +17 -17
- package/cdn/assets/{mtrwY1hjJeYlmzC-.js → Cf-bndowUtxZ6tmG.js} +3 -3
- package/cdn/assets/{DaBczM5xU9ev5_or.js → CiTCEuoCSDCy9khR.js} +2 -2
- package/{browser/esm/C1ZePT2B182vSnxW2.mjs → cdn/assets/Cjbksosgv7NZFNE02.js} +1 -1
- package/cdn/assets/{DvItgGbf8IOWPyxd.js → CmRLwDXiK3woZrVI.js} +15461 -16112
- package/{browser/esm/DRc_Wi5c7WdKHTVN2.mjs → cdn/assets/Co06Uf-tv1IuVQhe.js} +6 -6
- package/cdn/assets/Cpkl0peJbfEXl6ta2.js +239 -0
- package/cdn/assets/{D6SKy2BtcWkhfiA0.js → CpzLNwtfx0Zd0OZ02.js} +2 -5
- package/cdn/assets/{CpYlf4dXa_V2v-iS2.js → CukMw9Sc4iO21aRQ2.js} +1109 -955
- package/cdn/assets/{EjOJX5m8OEL-IjPB.js → CwGEi_5ErUTrkWRj.js} +7 -7
- package/{browser/esm/Cbw0JeJURvQyxIoa.mjs → cdn/assets/CwRAK6IVjIYuwofE2.js} +1 -1
- package/cdn/assets/{-2S675KWulPRlVNb2.js → Cx1HsOCOdZoKJDEN2.js} +14 -14
- package/{browser/esm/BqwvP0318zI2izeL2.mjs → cdn/assets/Cy6Cst4s2vE_WWKK2.js} +27 -26
- package/{browser/esm/CtXoSHbCUKMY-tSJ.mjs → cdn/assets/CyS1VLOdAweeZsMV2.js} +48 -2
- package/cdn/assets/CyomJv3_vWy4trRe.js +33 -0
- package/cdn/assets/{Be4QC65cR8N84rTn2.js → D-1WiFWkKNPWXppx.js} +1 -1
- package/cdn/assets/{DZbR5R1fNikjgqYb.js → D3Qv3--VfvVHImXW.js} +1 -1
- package/cdn/assets/D6B6VvRh1cfT2e-M2.js +116 -0
- package/{browser/esm/CdMv3f8Gyxh8q2RR2.mjs → cdn/assets/D718rIGL3d_m1mjm.js} +1 -1
- package/cdn/assets/D7WMzCfJnKIfTbdg.js +280 -0
- package/cdn/assets/{C_Io1QC4CeLGRBrz.js → D8sc6gCXnfpn7W79.js} +2 -2
- package/cdn/assets/DA4QV7VUyNUEfx1k2.js +156 -0
- package/cdn/assets/{BPv6Pw1hW-sV5Fya.js → DAhlDEV6ehTRvrj7.js} +1 -1
- package/cdn/assets/{gspQcUnmlRIwG609.js → DBKHpCvbeQU-Y4eS2.js} +5 -5
- package/cdn/assets/{CEN8dYSpN2oew8HH2.js → DB_I2ygTnDxYiYyc2.js} +526 -350
- package/cdn/assets/{DLEdaT0MmrOxMa2h2.js → DKwpjlUd2pFOI9yp2.js} +64 -64
- package/cdn/assets/{BNybEGR813e3aNIv.js → DW3_Jr-4VdZZqNEg.js} +1817 -1740
- package/{browser/esm/hFSDx-LnUOObv-6h2.mjs → cdn/assets/DZGMsbIACs9TKYrM.js} +2 -2
- package/cdn/assets/{Gy0CHZTvn4hY-rkx.js → DfIwClWz03Qw38-O2.js} +1 -1
- package/{browser/esm/CAPgMrAKg07EREFD.mjs → cdn/assets/Dg7wE0RZdHeJv5372.js} +1 -1
- package/{browser/esm/BVjXdv_wkL1x_8ZJ2.mjs → cdn/assets/DoAKAH3cmECZGboo2.js} +1 -1
- package/cdn/assets/FAaqx6EbN4JxNuNL2.js +87746 -0
- package/{browser/esm/CPUlpDM6aAzZzCat2.mjs → cdn/assets/FHIg3Yb5Rn05W1F22.js} +142 -139
- package/{browser/esm/CQM87ZBN7Yzn4Yxr.mjs → cdn/assets/FbLFNYdTqRtQ7QiS.js} +9 -9
- package/cdn/assets/{vcRSnmAqjwKglEkY2.js → JDCQtP0lkncrmnpC.js} +2 -2
- package/cdn/assets/{D-fJXasEYyfRUcj2.js → KOiR-1SNAX7AiEes.js} +3 -3
- package/cdn/assets/KS5XJUWdKvEezJfs2.js +264 -0
- package/{browser/esm/B4iT_CduJeJunwBc.mjs → cdn/assets/OTQWLENoZ1cSiDQb2.js} +28 -13
- package/{browser/esm/DrUEYcXg6N2D2s1Z2.mjs → cdn/assets/OtaDVRqZVyi7IBBa2.js} +51 -11
- package/cdn/assets/OyyHiDjohIf4lZX6.js +119 -0
- package/cdn/assets/{DKeLjEJPO9nT3bpr.js → PLFw1pLjdLQLrlB0.js} +242 -242
- package/cdn/assets/S4MMwlNd4kcK3RDU.js +24 -0
- package/cdn/assets/S4MMwlNd4kcK3RDU2.js +24 -0
- package/cdn/assets/{CG5v2hAwGR5Ptufn2.js → XuGWliVSRCNi5it1.js} +1 -1
- package/cdn/assets/_cZz4ZhEEr54LYNe.js +32 -0
- package/cdn/assets/{DCnA2-zB7W_QB-tD2.js → bQ6G23JQrt4l2Ls92.js} +566 -537
- package/{browser/esm/Clfp7SznkOrJoQvL.mjs → cdn/assets/efVOgresgMXMdh7J.js} +3 -3
- package/{browser/esm/CGqvy5LwQ4z9J2oD2.mjs → cdn/assets/gXemYPUoPvaUd055.js} +1 -1
- package/cdn/assets/{UYgwKnPX3US3Cj2k2.js → hHkEq7qn0rj2XKD82.js} +75 -48
- package/cdn/assets/{D1MA2ed2cLMt7hV9.js → hqW1sMr576y2S1qX.js} +41 -41
- package/cdn/assets/mI8tvfP8ed2Zerre.js +3344 -0
- package/{browser/esm/EwzqnZl1lTr56hH-2.mjs → cdn/assets/mbUWaIl3SJkdbWx0.js} +1 -1
- package/{browser/esm/RW23HF8taEtW8q9D.mjs → cdn/assets/n_NkstgVVwl2iAnp.js} +2 -2
- package/cdn/assets/ryzcqI-93l1HBuTe2.js +91 -0
- package/cdn/assets/{CfvrjQGuf7vXiQCB2.js → vP8Rb-lgzeerBAx42.js} +1 -1
- package/cdn/assets/{CHttngK66Ido5dWW.js → w65zHFqjAp_NlbXg2.js} +7 -7
- package/cdn/index.js +2 -2
- package/package.json +3 -3
- package/browser/cjs/2zXD3NPfuQT2KSZq.cjs +0 -7
- package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
- package/browser/cjs/B19QM3SGmPKKwD_o.cjs +0 -1
- package/browser/cjs/B4JJfKSI4ppwU8552.cjs +0 -1
- package/browser/cjs/B5YBx0GqLor3i0O1.cjs +0 -1
- package/browser/cjs/BC2gCQkR1iykfAuC.cjs +0 -1
- package/browser/cjs/BEVqcFGFU6Ri9y8T.cjs +0 -5
- package/browser/cjs/BEzaum_kgG4yAOx0.cjs +0 -1
- package/browser/cjs/BF-38Z7Z0FZOPl192.cjs +0 -1
- package/browser/cjs/BIQZDBQfv3Qm5iC8.cjs +0 -4
- package/browser/cjs/BSCgCfORdZz1Ii5S.cjs +0 -2
- package/browser/cjs/BZr-IqNS1skh1hr6.cjs +0 -21
- package/browser/cjs/BfzzZ9IR27ZPzj-8.cjs +0 -3
- package/browser/cjs/Bgke3PtMSF2Iaen4.cjs +0 -1
- package/browser/cjs/BnccBYHCCq9TGFx4.cjs +0 -8
- package/browser/cjs/BwLx9ix5Sq7suAYP2.cjs +0 -1
- package/browser/cjs/C-HOJozu5NgCil1q.cjs +0 -1
- package/browser/cjs/C2oTW2DjZypuqq7x.cjs +0 -1
- package/browser/cjs/C6yxQPAEgcGWAhYR.cjs +0 -33
- package/browser/cjs/C9C-pr-T_ThweQX92.cjs +0 -1
- package/browser/cjs/CPgCih_KEqnUZ9Rv.cjs +0 -3
- package/browser/cjs/CSNCOmYEOR-iTJ7K.cjs +0 -5
- package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +0 -1
- package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +0 -1
- package/browser/cjs/CcneNtiqtKppCa-p.cjs +0 -57
- package/browser/cjs/CeF0DZ-k4DB8M47I.cjs +0 -1
- package/browser/cjs/Clu7XiAsCB48GDXN2.cjs +0 -1
- package/browser/cjs/CojEXZgX08waZOoq.cjs +0 -1
- package/browser/cjs/CrDTTLE9EvaGDSD4.cjs +0 -88
- package/browser/cjs/Cty5pi0fwToP1GWe.cjs +0 -7
- package/browser/cjs/CvV18ZJgssoHMkdf2.cjs +0 -2
- package/browser/cjs/Cy-4IMt-AbR-ifP3.cjs +0 -126
- package/browser/cjs/CyGzzWYDy-IniKCq2.cjs +0 -7
- package/browser/cjs/CzgwTfy2072Dmt5u.cjs +0 -1
- package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
- package/browser/cjs/DFHxNnJ-lHtv0hIq.cjs +0 -1
- package/browser/cjs/DH3WXPfGHwWJW0nH.cjs +0 -1
- package/browser/cjs/DNCC-QNp2I7saV-I.cjs +0 -1
- package/browser/cjs/DNy-UU3NKNqQQngF.cjs +0 -1
- package/browser/cjs/DPjEO7dwhCFd8DHR2.cjs +0 -2
- package/browser/cjs/DfMJOaJ0GcUiSn4Q.cjs +0 -1
- package/browser/cjs/DsFZgtSQpC75d1M02.cjs +0 -1
- package/browser/cjs/DvSvfeo9V0Abfd3q2.cjs +0 -1
- package/browser/cjs/E-IqDztfMb_xdszH.cjs +0 -1
- package/browser/cjs/ElcoSB--cCpS6i7R2.cjs +0 -1
- package/browser/cjs/KNCocKN9uPR0tvUS.cjs +0 -1
- package/browser/cjs/Kr8f1inOTt-MICaP2.cjs +0 -1
- package/browser/cjs/Kvn916ebqGc4t6hv2.cjs +0 -1
- package/browser/cjs/PM3PrEWG3WHKxaDx.cjs +0 -1
- package/browser/cjs/YG320hBA20Dl3HoU2.cjs +0 -1
- package/browser/cjs/bIaGoYEDSBCrAaB6.cjs +0 -1
- package/browser/cjs/fqTQ_p3ehzUvc1tF2.cjs +0 -1
- package/browser/cjs/h3dw1jAp2J5Pu4p32.cjs +0 -1
- package/browser/cjs/i2VboqjlOcozI9MQ.cjs +0 -12
- package/browser/cjs/jev6VGWTdgEgm4Yk2.cjs +0 -1
- package/browser/cjs/ppSJKdLn646BZOzg.cjs +0 -1
- package/browser/cjs/xBcvszV6x7ys-m532.cjs +0 -1
- package/browser/esm/At60x9FEPePwPP_J.mjs +0 -51151
- package/browser/esm/B4h6iO7hQ9lCR7kj.mjs +0 -11273
- package/browser/esm/BBtOlJMVlsWorNJH.mjs +0 -824
- package/browser/esm/BQDXkeSabbxB5DUB2.mjs +0 -47
- package/browser/esm/BUCKq_2lHPd1ndvw.mjs +0 -149
- package/browser/esm/BX4f6i2WMBMKFVCq.mjs +0 -99
- package/browser/esm/BZsx0QHg1RZlM9ZN.mjs +0 -15
- package/browser/esm/BhxX7CZWSOlV2Dsz.mjs +0 -224
- package/browser/esm/BhzLZRz2N8RxjQ_U.mjs +0 -34
- package/browser/esm/BkSb_vyWe-AhyEDa.mjs +0 -4423
- package/browser/esm/Bp9qFBIcpIGXvMgo.mjs +0 -134
- package/browser/esm/C0rS1uBqfsj-gPR8.mjs +0 -152
- package/browser/esm/CGGJWgWSPZ0aP_C3.mjs +0 -87
- package/browser/esm/CGyydD3tRb0ik50l2.mjs +0 -20
- package/browser/esm/CY1zykikO58_ADk8.mjs +0 -3188
- package/browser/esm/Cb-FUOYcyRSkHG6u2.mjs +0 -238
- package/browser/esm/Cd8HXAJlflkkTXxc.mjs +0 -53
- package/browser/esm/CfuhUkrvOq11d9FR.mjs +0 -44
- package/browser/esm/Ckl3FLCOeqw7yhkP2.mjs +0 -82
- package/browser/esm/CpjX81WsWJbXMUoT.mjs +0 -3655
- package/browser/esm/DDOO4tcrO4OfMUDe.mjs +0 -25
- package/browser/esm/DDUYQ8FPeh1TJU24.mjs +0 -538
- package/browser/esm/DVJd6McdAG5udItH.mjs +0 -27
- package/browser/esm/DVQNQmjI2PKkwiOw2.mjs +0 -514
- package/browser/esm/D_zNx76HGunFi7xJ.mjs +0 -509
- package/browser/esm/DfRGH6mEtIVDWEYN2.mjs +0 -304
- package/browser/esm/DnuaqN0xfgqzl8qG.mjs +0 -2687
- package/browser/esm/nguMxPB9LKexKBRX.mjs +0 -219
- package/browser/esm/qzhFT2j-mpQEQnKs.mjs +0 -16386
- package/cdn/assets/2UHIeioUPXrwtZy-2.js +0 -83
- package/cdn/assets/BAhvL7M7ZcgZ8eDc2.js +0 -48
- package/cdn/assets/BM7OqAUEUk-up7_82.js +0 -134
- package/cdn/assets/BNuoKAzs4zkxSocG2.js +0 -44
- package/cdn/assets/BU6uQhQhpaLElTT82.js +0 -225
- package/cdn/assets/BVgTMDEoPgsWFmku.js +0 -510
- package/cdn/assets/BWlMK76Aj2d4ygsH.js +0 -538
- package/cdn/assets/BZsx0QHg1RZlM9ZN2.js +0 -15
- package/cdn/assets/Bl6C6xWT8E6b7OwJ2.js +0 -239
- package/cdn/assets/CGyydD3tRb0ik50l.js +0 -20
- package/cdn/assets/CH0of3GZTzHviuQV.js +0 -24
- package/cdn/assets/CH0of3GZTzHviuQV2.js +0 -24
- package/cdn/assets/Crkvq5j5KIa6eTLI2.js +0 -51151
- package/cdn/assets/Cv-KXN9kl0UeMezQ.js +0 -824
- package/cdn/assets/CvtkpvGzCHhNuwTm.js +0 -16386
- package/cdn/assets/D9gETGi23d14kT7u2.js +0 -99
- package/cdn/assets/D9joTG0Z2zdWHAEa2.js +0 -4423
- package/cdn/assets/DC9obE_EVmxtvXCf.js +0 -11275
- package/cdn/assets/DDNivpFWzQ3AIJia.js +0 -2687
- package/cdn/assets/DDOO4tcrO4OfMUDe.js +0 -25
- package/cdn/assets/DEUY_zuVwmptMX4l.js +0 -150
- package/cdn/assets/DTCtbG90ip7Z7LaG.js +0 -220
- package/cdn/assets/D_HeH7AJqWoxehn52.js +0 -53
- package/cdn/assets/DfRGH6mEtIVDWEYN.js +0 -304
- package/cdn/assets/WLUhtyUNK5QJ7Pff.js +0 -34
- package/cdn/assets/c7aIqKLOO4pvUsV12.js +0 -220
- package/cdn/assets/mtI43hWjdp4E3Z_-.js +0 -152
- package/cdn/assets/nmR_PgTW7GrlbHHZ.js +0 -27
- package/cdn/assets/vTCuFafvRlSaT9wy.js +0 -87
- /package/browser/cjs/{1XrWGMP3GmsQOMIX2.cjs → 1XrWGMP3GmsQOMIX.cjs} +0 -0
- /package/browser/cjs/{4nReftSsKWmnRdtf2.cjs → 4nReftSsKWmnRdtf.cjs} +0 -0
- /package/browser/cjs/{507hQYooKKjnRzsZ2.cjs → 507hQYooKKjnRzsZ.cjs} +0 -0
- /package/browser/cjs/{BAxVLKkxFgI6cXnR.cjs → BAxVLKkxFgI6cXnR2.cjs} +0 -0
- /package/browser/cjs/{C2uDl8VIJqh58YF_.cjs → C2uDl8VIJqh58YF_2.cjs} +0 -0
- /package/browser/cjs/{CV4KQsHluMqo1I2Q.cjs → CV4KQsHluMqo1I2Q2.cjs} +0 -0
- /package/browser/cjs/{CXlzsh_WHCOsErJ12.cjs → CXlzsh_WHCOsErJ1.cjs} +0 -0
- /package/browser/cjs/{D8-KovdJ0LjxqCe2.cjs → D8-KovdJ0LjxqCe22.cjs} +0 -0
- /package/browser/cjs/{DDnGLOLTqLFsdUDS2.cjs → DDnGLOLTqLFsdUDS.cjs} +0 -0
- /package/browser/cjs/{DM7-R_ltoLbA9jde2.cjs → DM7-R_ltoLbA9jde.cjs} +0 -0
- /package/browser/cjs/{DNKyaSruDogoBd2H2.cjs → DNKyaSruDogoBd2H.cjs} +0 -0
- /package/browser/cjs/{Dx79LP1-YCQg8B87.cjs → Dx79LP1-YCQg8B872.cjs} +0 -0
- /package/browser/cjs/{JfM6P_qoQQTWakZf.cjs → JfM6P_qoQQTWakZf2.cjs} +0 -0
- /package/browser/cjs/{CbLXP9WY38wTcGn5.cjs → NcNz8RfT5V889CMT2.cjs} +0 -0
- /package/browser/cjs/{z_rZE1OHFPpdGBh42.cjs → z_rZE1OHFPpdGBh4.cjs} +0 -0
|
@@ -0,0 +1,3747 @@
|
|
|
1
|
+
var e=class{constructor(e){this._worker=null,this._nextId=1,this._pendingRequests=new Map,this._workerFactory=e}start(){if(typeof Worker>`u`)throw Error(`Web Workers are not supported in this environment.`);return this._worker||(this._worker=this._workerFactory(),this._worker.onmessage=e=>{let{id:t,result:n,error:r}=e.data,i=this._pendingRequests.get(t);if(i)if(this._pendingRequests.delete(t),r){let e=Error(r.message);e.stack=r.stack,r.cause&&(e.cause=r.cause),i.reject(e)}else i.resolve(n)},this._worker.onerror=e=>{console.error(`Worker error:`,e),this._pendingRequests.forEach(t=>{t.reject(Error(`Worker failed: ${e.message}`))}),this._pendingRequests.clear(),this._worker=null}),Promise.resolve()}execute(e){if(!this._worker)throw Error(`Worker is not initialized. Call start() first.`);let t=this._nextId++;return new Promise((n,r)=>{this._pendingRequests.set(t,{resolve:n,reject:r}),this._worker.postMessage({id:t,params:e})})}terminate(){this._worker&&=(this._worker.terminate(),null)}},t=class{constructor(e){this._onExecute=e}execute(e){return this._onExecute(e)}start(){return Promise.resolve()}terminate(){}},n=`var yt = Object.defineProperty, Yt = (e, t, r) => () => {
|
|
2
|
+
if (r) throw r[0];
|
|
3
|
+
try {
|
|
4
|
+
return e && (t = e(e = 0)), t;
|
|
5
|
+
} catch (n) {
|
|
6
|
+
throw r = [n], n;
|
|
7
|
+
}
|
|
8
|
+
}, Zt = (e, t) => {
|
|
9
|
+
let r = {};
|
|
10
|
+
for (var n in e) yt(r, n, {
|
|
11
|
+
get: e[n],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
return t || yt(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
15
|
+
}, wt = Object.defineProperty, he = (e, t) => {
|
|
16
|
+
let r = {};
|
|
17
|
+
for (var n in e) wt(r, n, {
|
|
18
|
+
get: e[n],
|
|
19
|
+
enumerable: !0
|
|
20
|
+
});
|
|
21
|
+
return t || wt(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
22
|
+
}, ue = {
|
|
23
|
+
Column: "column",
|
|
24
|
+
Row: "row"
|
|
25
|
+
};
|
|
26
|
+
({ ...ue });
|
|
27
|
+
function Be(e, t) {
|
|
28
|
+
if (e === t) return !0;
|
|
29
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
30
|
+
if (e.constructor !== t.constructor) return !1;
|
|
31
|
+
let r, n, o;
|
|
32
|
+
if (Array.isArray(e)) {
|
|
33
|
+
if (r = e.length, r != t.length) return !1;
|
|
34
|
+
for (n = r; n-- !== 0;) if (!Be(e[n], t[n])) return !1;
|
|
35
|
+
return !0;
|
|
36
|
+
}
|
|
37
|
+
if (e instanceof Map && t instanceof Map) {
|
|
38
|
+
if (e.size !== t.size) return !1;
|
|
39
|
+
for (n of e.entries()) if (!t.has(n[0])) return !1;
|
|
40
|
+
for (n of e.entries()) if (!Be(n[1], t.get(n[0]))) return !1;
|
|
41
|
+
return !0;
|
|
42
|
+
}
|
|
43
|
+
if (e instanceof Set && t instanceof Set) {
|
|
44
|
+
if (e.size !== t.size) return !1;
|
|
45
|
+
for (n of e.entries()) if (!t.has(n[0])) return !1;
|
|
46
|
+
return !0;
|
|
47
|
+
}
|
|
48
|
+
if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
49
|
+
if (r = e.length, r != t.length) return !1;
|
|
50
|
+
for (n = r; n-- !== 0;) if (e[n] !== t[n]) return !1;
|
|
51
|
+
return !0;
|
|
52
|
+
}
|
|
53
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
54
|
+
if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
|
|
55
|
+
if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
|
|
56
|
+
if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length) return !1;
|
|
57
|
+
for (n = r; n-- !== 0;) if (!Object.prototype.hasOwnProperty.call(t, o[n])) return !1;
|
|
58
|
+
for (n = r; n-- !== 0;) {
|
|
59
|
+
let a = o[n];
|
|
60
|
+
if ((a !== "_owner" || !e.$$typeof) && !Be(e[a], t[a])) return !1;
|
|
61
|
+
}
|
|
62
|
+
return !0;
|
|
63
|
+
}
|
|
64
|
+
return e != e && t != t;
|
|
65
|
+
}
|
|
66
|
+
function en(e) {
|
|
67
|
+
let t = Object.prototype.toString.call(e);
|
|
68
|
+
return t === "[object RegExp]" || t === "[object Date]" || (function(r) {
|
|
69
|
+
return r.$$typeof === tn;
|
|
70
|
+
})(e);
|
|
71
|
+
}
|
|
72
|
+
var tn = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
73
|
+
function rn(e) {
|
|
74
|
+
return /* @__PURE__ */ (function(t) {
|
|
75
|
+
return !!t && typeof t == "object";
|
|
76
|
+
})(e) && !en(e);
|
|
77
|
+
}
|
|
78
|
+
function Ne(e, t) {
|
|
79
|
+
return t.clone !== !1 && t.isMergeableObject(e) ? Ee((r = e, Array.isArray(r) ? [] : {}), e, t) : e;
|
|
80
|
+
var r;
|
|
81
|
+
}
|
|
82
|
+
function nn(e, t, r) {
|
|
83
|
+
return e.concat(t).map(function(n) {
|
|
84
|
+
return Ne(n, r);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function bt(e) {
|
|
88
|
+
return Object.keys(e).concat((function(t) {
|
|
89
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
|
|
90
|
+
return Object.propertyIsEnumerable.call(t, r);
|
|
91
|
+
}) : [];
|
|
92
|
+
})(e));
|
|
93
|
+
}
|
|
94
|
+
function St(e, t) {
|
|
95
|
+
try {
|
|
96
|
+
return t in e;
|
|
97
|
+
} catch {
|
|
98
|
+
return !1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function on(e, t, r) {
|
|
102
|
+
let n = {};
|
|
103
|
+
return r.isMergeableObject(e) && bt(e).forEach(function(o) {
|
|
104
|
+
n[o] = Ne(e[o], r);
|
|
105
|
+
}), bt(t).forEach(function(o) {
|
|
106
|
+
(function(a, l) {
|
|
107
|
+
return St(a, l) && !(Object.hasOwnProperty.call(a, l) && Object.propertyIsEnumerable.call(a, l));
|
|
108
|
+
})(e, o) || (St(e, o) && r.isMergeableObject(t[o]) ? n[o] = (function(a, l) {
|
|
109
|
+
if (!l.customMerge) return Ee;
|
|
110
|
+
let i = l.customMerge(a);
|
|
111
|
+
return typeof i == "function" ? i : Ee;
|
|
112
|
+
})(o, r)(e[o], t[o], r) : n[o] = Ne(t[o], r));
|
|
113
|
+
}), n;
|
|
114
|
+
}
|
|
115
|
+
function Ee(e, t, r) {
|
|
116
|
+
(r ||= {}).arrayMerge = r.arrayMerge || nn, r.isMergeableObject = r.isMergeableObject || rn, r.cloneUnlessOtherwiseSpecified = Ne;
|
|
117
|
+
let n = Array.isArray(t);
|
|
118
|
+
return n === Array.isArray(e) ? n ? r.arrayMerge(e, t, r) : on(e, t, r) : Ne(t, r);
|
|
119
|
+
}
|
|
120
|
+
Ee.all = function(e, t) {
|
|
121
|
+
if (!Array.isArray(e)) throw Error("first argument should be an array");
|
|
122
|
+
return e.reduce(function(r, n) {
|
|
123
|
+
return Ee(r, n, t);
|
|
124
|
+
}, {});
|
|
125
|
+
};
|
|
126
|
+
var Qt = he({
|
|
127
|
+
DonePromise: () => ln,
|
|
128
|
+
EmptyArray: () => _e,
|
|
129
|
+
EmptyObject: () => an,
|
|
130
|
+
OSType: () => fe,
|
|
131
|
+
arrayMove: () => Tn,
|
|
132
|
+
asNumber: () => dn,
|
|
133
|
+
camelToPrettyCase: () => cn,
|
|
134
|
+
castToString: () => Cn,
|
|
135
|
+
cloneObject: () => gn,
|
|
136
|
+
consoleWithNoSource: () => Ln,
|
|
137
|
+
deepEqual: () => Be,
|
|
138
|
+
deepFreeze: () => sr,
|
|
139
|
+
deepMerge: () => Ee,
|
|
140
|
+
diffValues: () => En,
|
|
141
|
+
findEqualOrGreater: () => vn,
|
|
142
|
+
findEqualOrLesser: () => xn,
|
|
143
|
+
getFromPath: () => _n,
|
|
144
|
+
getPlatform: () => Xe,
|
|
145
|
+
isDefined: () => An,
|
|
146
|
+
isEmpty: () => In,
|
|
147
|
+
isEqualArrays: () => tr,
|
|
148
|
+
isEqualBounds: () => yn,
|
|
149
|
+
isNullOrUndefined: () => ir,
|
|
150
|
+
isNumeric: () => fn,
|
|
151
|
+
isObject: () => ke,
|
|
152
|
+
isPromiseLike: () => $n,
|
|
153
|
+
isRectInsideRect: () => Rn,
|
|
154
|
+
isRectIntersect: () => lr,
|
|
155
|
+
mergeContentful: () => Sn,
|
|
156
|
+
removeEmptyProperties: () => rr,
|
|
157
|
+
removeEqualValues: () => or,
|
|
158
|
+
removeEqualValuesLayered: () => ar,
|
|
159
|
+
removeListenerAll: () => wn,
|
|
160
|
+
roundAccurately: () => mn,
|
|
161
|
+
setToPath: () => kn,
|
|
162
|
+
splitNumber: () => pn,
|
|
163
|
+
subtractRect: () => Nn,
|
|
164
|
+
textToKey: () => un,
|
|
165
|
+
toSafeJSON: () => at,
|
|
166
|
+
transpose: () => bn,
|
|
167
|
+
uuidV4: () => Ke,
|
|
168
|
+
validEnumValue: () => sn
|
|
169
|
+
}), _e = Object.freeze([]), an = Object.freeze({}), ln = Promise.resolve(), er = (e) => e;
|
|
170
|
+
function sn(e, t) {
|
|
171
|
+
if (!Object.values(e).includes(t)) throw Error(\`Invalid type: \${t ?? "null"}. Must be one of: \${Object.values(e).join(", ")}.\`);
|
|
172
|
+
}
|
|
173
|
+
function cn(e) {
|
|
174
|
+
return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/^./, (t) => t.toUpperCase()) : "";
|
|
175
|
+
}
|
|
176
|
+
function un(e) {
|
|
177
|
+
return e.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
178
|
+
}
|
|
179
|
+
var ie = Array.from({ length: 256 }, (e, t) => (t + 256).toString(16).slice(1));
|
|
180
|
+
function Ke() {
|
|
181
|
+
let e = globalThis.crypto;
|
|
182
|
+
if (e?.randomUUID) return e.randomUUID();
|
|
183
|
+
if (e?.getRandomValues) {
|
|
184
|
+
let t = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
185
|
+
return t[6] = 15 & t[6] | 64, t[8] = 63 & t[8] | 128, ie[t[0]] + ie[t[1]] + ie[t[2]] + ie[t[3]] + "-" + ie[t[4]] + ie[t[5]] + "-" + ie[t[6]] + ie[t[7]] + "-" + ie[t[8]] + ie[t[9]] + "-" + ie[t[10]] + ie[t[11]] + ie[t[12]] + ie[t[13]] + ie[t[14]] + ie[t[15]];
|
|
186
|
+
}
|
|
187
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
188
|
+
let r = 16 * Math.random() | 0;
|
|
189
|
+
return (t === "x" ? r : 3 & r | 8).toString(16);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function dn(e) {
|
|
193
|
+
let t = (function(r) {
|
|
194
|
+
return 1 * r;
|
|
195
|
+
})(e);
|
|
196
|
+
return Number.isFinite(t) ? t : 0;
|
|
197
|
+
}
|
|
198
|
+
function fn(e) {
|
|
199
|
+
let t = 1 * e;
|
|
200
|
+
return Number.isFinite(t) && typeof t == "number";
|
|
201
|
+
}
|
|
202
|
+
var We = [
|
|
203
|
+
1,
|
|
204
|
+
10,
|
|
205
|
+
100,
|
|
206
|
+
1e3,
|
|
207
|
+
1e4,
|
|
208
|
+
1e5,
|
|
209
|
+
1e6,
|
|
210
|
+
1e7,
|
|
211
|
+
1e8,
|
|
212
|
+
1e9,
|
|
213
|
+
1e10,
|
|
214
|
+
1e11,
|
|
215
|
+
0xe8d4a51000,
|
|
216
|
+
0x9184e72a000,
|
|
217
|
+
0x5af3107a4000,
|
|
218
|
+
0x38d7ea4c68000,
|
|
219
|
+
0x2386f26fc10000
|
|
220
|
+
];
|
|
221
|
+
function pn(e) {
|
|
222
|
+
let t = Math.abs(e);
|
|
223
|
+
if (!Number.isFinite(t)) return null;
|
|
224
|
+
let r = Math.trunc(t), n = t - r, o;
|
|
225
|
+
r > 2 ** 53 - 1 ? o = Number(r.toExponential().split("e")[1]) + 1 : (o = Math.ceil(Math.log10(r + 1)), We[o] <= r && o++);
|
|
226
|
+
let a = 0, l = 0, i = 15 - o;
|
|
227
|
+
if (n > 0 && i > 0) {
|
|
228
|
+
let u = We[i];
|
|
229
|
+
if (a = Math.round(n * u), a === u) r++, a = 0, r >= We[o] && o++;
|
|
230
|
+
else if (a > 0) for (l = i; a % 10 == 0;) a /= 10, l--;
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
ip: e < 0 ? -r : r,
|
|
234
|
+
fp: a,
|
|
235
|
+
ipLength: o,
|
|
236
|
+
fpLength: l
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function mn(e, t = 0) {
|
|
240
|
+
if (e == null || !isFinite(e)) return null;
|
|
241
|
+
let r = 10 ** t;
|
|
242
|
+
return Number(Math.round(e * r) / r);
|
|
243
|
+
}
|
|
244
|
+
function gn(e) {
|
|
245
|
+
return ir(e) ? e : JSON.parse(JSON.stringify(e));
|
|
246
|
+
}
|
|
247
|
+
var hn = (e, t) => e === t;
|
|
248
|
+
function tr(e, t, r) {
|
|
249
|
+
if (e === t) return !0;
|
|
250
|
+
if (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) return !1;
|
|
251
|
+
r ||= hn;
|
|
252
|
+
let n = e.length;
|
|
253
|
+
for (let o = 0; o < n; o++) if (!r(e[o], t[o])) return !1;
|
|
254
|
+
return !0;
|
|
255
|
+
}
|
|
256
|
+
function yn(e, t) {
|
|
257
|
+
return e === t || !(!e || !t) && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
258
|
+
}
|
|
259
|
+
function ke(e) {
|
|
260
|
+
return typeof e == "object" && !Array.isArray(e) && e !== null;
|
|
261
|
+
}
|
|
262
|
+
function rr(e) {
|
|
263
|
+
if (typeof e != "object" || Array.isArray(e) || e === null) return e;
|
|
264
|
+
let t = e;
|
|
265
|
+
return Object.keys(t).forEach(function(r) {
|
|
266
|
+
t[r] && typeof t[r] == "object" ? rr(t[r]) : t[r] !== null && t[r] !== void 0 || delete t[r], typeof t[r] == "object" && Object.keys(t[r]).length === 0 && delete t[r];
|
|
267
|
+
}), Object.keys(e).length === 0 ? null : e;
|
|
268
|
+
}
|
|
269
|
+
function wn(e, t) {
|
|
270
|
+
if (!e) return _e;
|
|
271
|
+
let r = e.length;
|
|
272
|
+
for (let n = 0; n < r; n++) {
|
|
273
|
+
let o = e[n];
|
|
274
|
+
o && o(t);
|
|
275
|
+
}
|
|
276
|
+
return _e;
|
|
277
|
+
}
|
|
278
|
+
function bn(e) {
|
|
279
|
+
if (!e) return e;
|
|
280
|
+
let t = e.length, r = e[0].length, n = [];
|
|
281
|
+
for (let o = 0; o < r; o++) n[o] = Array(t);
|
|
282
|
+
for (let o = 0; o < t; o++) {
|
|
283
|
+
let a = e[o];
|
|
284
|
+
for (let l = 0; l < r; l++) n[l][o] = a[l];
|
|
285
|
+
}
|
|
286
|
+
return n;
|
|
287
|
+
}
|
|
288
|
+
var nr = (e, t) => !(e !== t && !tr(e, t)) || !!e.isEqual?.(t);
|
|
289
|
+
function or(e, t, r = nr) {
|
|
290
|
+
if (e == null || e === t) return null;
|
|
291
|
+
if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) return r(e, t) ? null : e;
|
|
292
|
+
let n = Object.keys(e), o = n.length;
|
|
293
|
+
if (o === 0) return null;
|
|
294
|
+
let a = !1;
|
|
295
|
+
for (let l = 0; l < o; l++) {
|
|
296
|
+
let i = n[l];
|
|
297
|
+
or(e[i], t?.[i], r) === null && (a = !0, delete e[i]);
|
|
298
|
+
}
|
|
299
|
+
return a && Object.keys(e).length === 0 ? null : void 0;
|
|
300
|
+
}
|
|
301
|
+
function ar(e, t, r = nr) {
|
|
302
|
+
if (e == null) return !0;
|
|
303
|
+
if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) {
|
|
304
|
+
let i, u = !1;
|
|
305
|
+
for (let p = 0; !u && p < t.length; p++) t[p] !== void 0 && (u = !0, i = t[p]);
|
|
306
|
+
return u && (e === i || r(e, i));
|
|
307
|
+
}
|
|
308
|
+
let n = Object.keys(e), o = n.length;
|
|
309
|
+
if (o === 0) return !0;
|
|
310
|
+
let a = t.length, l = !1;
|
|
311
|
+
for (let i = 0; i < o; i++) {
|
|
312
|
+
let u = n[i], p = [];
|
|
313
|
+
for (let h = 0; h < a; h++) {
|
|
314
|
+
let c = t[h]?.[u];
|
|
315
|
+
c !== void 0 && p.push(c);
|
|
316
|
+
}
|
|
317
|
+
ar(e[u], p, r) && (l = !0, delete e[u]);
|
|
318
|
+
}
|
|
319
|
+
return l && Object.keys(e).length === 0;
|
|
320
|
+
}
|
|
321
|
+
function Sn(...e) {
|
|
322
|
+
let t = e.length;
|
|
323
|
+
if (t > 0 && e[t - 1] !== void 0 && !ke(e[t - 1])) return e[t - 1];
|
|
324
|
+
let r = e[0] || {};
|
|
325
|
+
for (let n = 1; n < t; n++) r = Ee(r, e[n] || {}, { arrayMerge: (o, a) => [...a] });
|
|
326
|
+
return r;
|
|
327
|
+
}
|
|
328
|
+
function En(e, t) {
|
|
329
|
+
let r = {}, n = Object.keys(t), o = n.length;
|
|
330
|
+
for (let a = 0; a < o; a++) {
|
|
331
|
+
let l = n[a], i = e[l], u = t[l];
|
|
332
|
+
i !== u && (r[l] = i === void 0 ? u : i);
|
|
333
|
+
}
|
|
334
|
+
return Object.keys(r).length === 0 ? null : r;
|
|
335
|
+
}
|
|
336
|
+
function vn(e, t, r = er) {
|
|
337
|
+
let n = 0, o = e.length - 1;
|
|
338
|
+
for (; n <= o;) {
|
|
339
|
+
let a = Math.floor((n + o) / 2), l = r(e[a]);
|
|
340
|
+
if (l === t) return a;
|
|
341
|
+
l < t ? n = a + 1 : o = a - 1;
|
|
342
|
+
}
|
|
343
|
+
return n;
|
|
344
|
+
}
|
|
345
|
+
function xn(e, t, r = er) {
|
|
346
|
+
let n = e.length - 1, o = 0;
|
|
347
|
+
for (; n >= o;) {
|
|
348
|
+
let a = Math.floor((n + o) / 2), l = r(e[a]);
|
|
349
|
+
if (l === t) return a;
|
|
350
|
+
l > t ? n = a - 1 : o = a + 1;
|
|
351
|
+
}
|
|
352
|
+
return n;
|
|
353
|
+
}
|
|
354
|
+
function Tn(e, t, r) {
|
|
355
|
+
let n = e.slice();
|
|
356
|
+
return n.splice(r < 0 ? n.length + r : r, 0, n.splice(t, 1)[0]), n;
|
|
357
|
+
}
|
|
358
|
+
function Cn(e) {
|
|
359
|
+
return e == null || e === void 0 ? "" : typeof e == "string" ? e : "" + e;
|
|
360
|
+
}
|
|
361
|
+
function ir(e) {
|
|
362
|
+
return e == null;
|
|
363
|
+
}
|
|
364
|
+
function An(e) {
|
|
365
|
+
return e != null;
|
|
366
|
+
}
|
|
367
|
+
function In(e) {
|
|
368
|
+
return e == null || e === "";
|
|
369
|
+
}
|
|
370
|
+
function $n(e) {
|
|
371
|
+
return !!e && typeof e.then == "function";
|
|
372
|
+
}
|
|
373
|
+
function lr(e, t) {
|
|
374
|
+
return !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top);
|
|
375
|
+
}
|
|
376
|
+
function Rn(e, t) {
|
|
377
|
+
return e.top >= t.top && e.bottom <= t.bottom && e.left >= t.left && e.right <= t.right;
|
|
378
|
+
}
|
|
379
|
+
function Nn(e, t, r = !1) {
|
|
380
|
+
if (!t) return [e];
|
|
381
|
+
if (!lr(e, t)) return [];
|
|
382
|
+
let n = [], o = e, a = () => {
|
|
383
|
+
t.top > o.top && t.top < o.bottom && (n.push({
|
|
384
|
+
...o,
|
|
385
|
+
bottom: t.top
|
|
386
|
+
}), o = {
|
|
387
|
+
...o,
|
|
388
|
+
top: t.top
|
|
389
|
+
});
|
|
390
|
+
}, l = () => {
|
|
391
|
+
t.bottom > o.top && t.bottom < o.bottom && (n.push({
|
|
392
|
+
...o,
|
|
393
|
+
top: t.bottom
|
|
394
|
+
}), o = {
|
|
395
|
+
...o,
|
|
396
|
+
bottom: t.bottom
|
|
397
|
+
});
|
|
398
|
+
}, i = () => {
|
|
399
|
+
t.right > o.left && t.right < o.right && (n.push({
|
|
400
|
+
...o,
|
|
401
|
+
left: t.right
|
|
402
|
+
}), o = {
|
|
403
|
+
...o,
|
|
404
|
+
right: t.right
|
|
405
|
+
});
|
|
406
|
+
}, u = () => {
|
|
407
|
+
t.left > o.left && t.left < o.right && (n.push({
|
|
408
|
+
...o,
|
|
409
|
+
right: t.left
|
|
410
|
+
}), o = {
|
|
411
|
+
...o,
|
|
412
|
+
left: t.left
|
|
413
|
+
});
|
|
414
|
+
};
|
|
415
|
+
return r ? (u(), i(), a(), l()) : (a(), l(), i(), u()), n;
|
|
416
|
+
}
|
|
417
|
+
function _n(e, t) {
|
|
418
|
+
let r = t.split("."), n = e, o = r.length;
|
|
419
|
+
for (let a = 0; a < o; a++) {
|
|
420
|
+
let l = r[a];
|
|
421
|
+
if (!n) return null;
|
|
422
|
+
let i = n[l];
|
|
423
|
+
if (typeof i == "function" && (i = i.bind(n)()), !i || !ke(i)) return i;
|
|
424
|
+
n = i;
|
|
425
|
+
}
|
|
426
|
+
return n ?? null;
|
|
427
|
+
}
|
|
428
|
+
function kn(e, t, r) {
|
|
429
|
+
let n = t.split("."), o = e;
|
|
430
|
+
if (!o) throw Error("Can not set path to a null path.");
|
|
431
|
+
let a = n.length;
|
|
432
|
+
for (let l = 0; o && l < a - 1; l++) {
|
|
433
|
+
let i = n[l], u = o[i];
|
|
434
|
+
if (u ?? (u = {}, o[i] = u), !ke(u)) throw Error("Can not set path to a non object path.");
|
|
435
|
+
o = u;
|
|
436
|
+
}
|
|
437
|
+
if (typeof r != "number" && typeof r != "boolean" && typeof r != "string" && !ke(r)) throw Error(\`Can not set path to \${r} that is not a a supported primitive.\`);
|
|
438
|
+
return o[n[a - 1]] = r, e;
|
|
439
|
+
}
|
|
440
|
+
function Ln(...e) {
|
|
441
|
+
return new Promise((t) => {
|
|
442
|
+
setTimeout(() => {
|
|
443
|
+
Function("console.log.apply(console, arguments)").apply(null, e), t();
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
var fe = {
|
|
448
|
+
Windows: "windows",
|
|
449
|
+
MacOS: "macos",
|
|
450
|
+
IOS: "ios",
|
|
451
|
+
Linux: "linux",
|
|
452
|
+
Android: "android",
|
|
453
|
+
Safari: "safari",
|
|
454
|
+
Firefox: "firefox",
|
|
455
|
+
Unknown: "unknown"
|
|
456
|
+
};
|
|
457
|
+
function Xe() {
|
|
458
|
+
let e = globalThis.navigator !== void 0 && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";
|
|
459
|
+
return e ? /(win32|win64|windows|wince)/i.test(e) ? fe.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(e) ? fe.MacOS : /(iphone|ipad|ipod)/i.test(e) ? fe.IOS : /android/.test(e) ? fe.Android : /linux/.test(e) ? fe.Linux : /^((?!chrome|android|).)*safari/i.test(e) ? fe.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(e) ? fe.Firefox : fe.Unknown : fe.Unknown;
|
|
460
|
+
}
|
|
461
|
+
function sr(e) {
|
|
462
|
+
Object.freeze(e);
|
|
463
|
+
let t = e;
|
|
464
|
+
return Object.keys(t).forEach((r) => {
|
|
465
|
+
typeof t[r] != "object" || t[r] === null || Object.isFrozen(t[r]) || sr(t[r]);
|
|
466
|
+
}), e;
|
|
467
|
+
}
|
|
468
|
+
function at(e) {
|
|
469
|
+
if (typeof e != "object" || !e) return e;
|
|
470
|
+
if (typeof e.toJSON == "function") return e.toJSON();
|
|
471
|
+
if (Array.isArray(e)) return e.map((r) => at(r));
|
|
472
|
+
if (typeof e.toString == "function" && e.toString !== Object.prototype.toString) return e.toString();
|
|
473
|
+
let t = {};
|
|
474
|
+
for (let r in e) e.hasOwnProperty(r) && (t[r] = at(e[r]));
|
|
475
|
+
return t;
|
|
476
|
+
}
|
|
477
|
+
he({
|
|
478
|
+
EmptyCell: () => cr,
|
|
479
|
+
EmptyRange: () => On,
|
|
480
|
+
EmptyRanges: () => Mn,
|
|
481
|
+
EmptySelection: () => Dn,
|
|
482
|
+
InsertCutShift: () => Se,
|
|
483
|
+
cellToRange: () => jn,
|
|
484
|
+
classifyInsertCut: () => Jn,
|
|
485
|
+
columnFirstCellComparator: () => mr,
|
|
486
|
+
columnFirstRangeComparator: () => ur,
|
|
487
|
+
createCellComparator: () => Fn,
|
|
488
|
+
createConflatingRanges: () => Wn,
|
|
489
|
+
createRangeComparator: () => wr,
|
|
490
|
+
defaultRange: () => Gn,
|
|
491
|
+
extendRangeToIntersectingRanges: () => Tr,
|
|
492
|
+
extendRangeToUnionRanges: () => zn,
|
|
493
|
+
intersectRanges: () => vr,
|
|
494
|
+
isCellWithinRange: () => Pn,
|
|
495
|
+
isEqualCells: () => br,
|
|
496
|
+
isEqualRanges: () => dt,
|
|
497
|
+
isEqualRangesArrays: () => Er,
|
|
498
|
+
isEqualSelectionCoords: () => xr,
|
|
499
|
+
isRangeWithinRange: () => Sr,
|
|
500
|
+
isRangesIntersect: () => ft,
|
|
501
|
+
isRefusedInsertCut: () => Yn,
|
|
502
|
+
isSingleCell: () => Un,
|
|
503
|
+
isValidRange: () => Kn,
|
|
504
|
+
mergeRangeCoordValues: () => Ar,
|
|
505
|
+
reverseColumnFirstCellComparator: () => yr,
|
|
506
|
+
reverseColumnFirstRangeComparator: () => pr,
|
|
507
|
+
reverseRowFirstCellComparator: () => hr,
|
|
508
|
+
reverseRowFirstRangeComparator: () => fr,
|
|
509
|
+
rowFirstCellComparator: () => gr,
|
|
510
|
+
rowFirstRangeComparator: () => dr,
|
|
511
|
+
sanitizeRange: () => Cr,
|
|
512
|
+
sanitizeRangeArray: () => Xn,
|
|
513
|
+
translateRange: () => Vn,
|
|
514
|
+
unionRanges: () => it,
|
|
515
|
+
unionRangesArrays: () => Bn
|
|
516
|
+
});
|
|
517
|
+
var cr = Object.freeze({
|
|
518
|
+
colIndex: 0,
|
|
519
|
+
rowIndex: 0
|
|
520
|
+
}), On = Object.freeze({
|
|
521
|
+
colStart: 0,
|
|
522
|
+
rowStart: 0,
|
|
523
|
+
colEnd: 0,
|
|
524
|
+
rowEnd: 0
|
|
525
|
+
}), Mn = _e, Dn = Object.freeze({
|
|
526
|
+
cell: cr,
|
|
527
|
+
ranges: _e,
|
|
528
|
+
rangeIndex: -1
|
|
529
|
+
});
|
|
530
|
+
function ur(e, t) {
|
|
531
|
+
return e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart;
|
|
532
|
+
}
|
|
533
|
+
function dr(e, t) {
|
|
534
|
+
return e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart;
|
|
535
|
+
}
|
|
536
|
+
function fr(e, t) {
|
|
537
|
+
return e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd;
|
|
538
|
+
}
|
|
539
|
+
function pr(e, t) {
|
|
540
|
+
return e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd;
|
|
541
|
+
}
|
|
542
|
+
function mr(e, t) {
|
|
543
|
+
return e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex;
|
|
544
|
+
}
|
|
545
|
+
function gr(e, t) {
|
|
546
|
+
return e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex;
|
|
547
|
+
}
|
|
548
|
+
function hr(e, t) {
|
|
549
|
+
return e.rowIndex === t.rowIndex ? t.colIndex - e.colIndex : t.rowIndex - e.rowIndex;
|
|
550
|
+
}
|
|
551
|
+
function yr(e, t) {
|
|
552
|
+
return e.colIndex === t.colIndex ? t.rowIndex - e.rowIndex : t.colIndex - e.colIndex;
|
|
553
|
+
}
|
|
554
|
+
function wr(e = ue.Row, t = !1) {
|
|
555
|
+
return t ? e === ue.Column ? pr : fr : e === ue.Column ? ur : dr;
|
|
556
|
+
}
|
|
557
|
+
function Fn(e = ue.Row, t = !1) {
|
|
558
|
+
return t ? e === ue.Column ? yr : hr : e === ue.Column ? mr : gr;
|
|
559
|
+
}
|
|
560
|
+
function br(e, t) {
|
|
561
|
+
return e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex && e.scope === t.scope;
|
|
562
|
+
}
|
|
563
|
+
function dt(e, t) {
|
|
564
|
+
return e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd && e.scope === t.scope;
|
|
565
|
+
}
|
|
566
|
+
function Pn(e, t) {
|
|
567
|
+
if (!e || !t) return !1;
|
|
568
|
+
let r = e.rowIndex;
|
|
569
|
+
if (r < t.rowStart || r > t.rowEnd) return !1;
|
|
570
|
+
let n = e.colIndex;
|
|
571
|
+
return !(n < t.colStart || n > t.colEnd);
|
|
572
|
+
}
|
|
573
|
+
function Sr(e, t) {
|
|
574
|
+
return !(!e || !t) && !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd) && !(e.colStart < t.colStart || e.colEnd > t.colEnd);
|
|
575
|
+
}
|
|
576
|
+
function ft(e, t) {
|
|
577
|
+
return !(!e || !t) && !(e.colStart > t.colEnd || t.colStart > e.colEnd) && !(e.rowStart > t.rowEnd || t.rowStart > e.rowEnd);
|
|
578
|
+
}
|
|
579
|
+
function Er(e, t) {
|
|
580
|
+
if (e === t) return !0;
|
|
581
|
+
if (!e || !t || e.length !== t.length) return !1;
|
|
582
|
+
for (let r = 0; r < e.length; r++) if (!dt(e[r], t[r])) return !1;
|
|
583
|
+
return !0;
|
|
584
|
+
}
|
|
585
|
+
function Un(e) {
|
|
586
|
+
return !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd;
|
|
587
|
+
}
|
|
588
|
+
function jn(e, t) {
|
|
589
|
+
if (!e) return null;
|
|
590
|
+
let r = t;
|
|
591
|
+
return r || (r = { ...e }, delete r.colIndex, delete r.rowIndex), r.colStart = e.colIndex ?? 0, r.rowStart = e.rowIndex ?? 0, r.colEnd = e.colIndex ?? 0, r.rowEnd = e.rowIndex ?? 0, r;
|
|
592
|
+
}
|
|
593
|
+
function vr(e, t, r) {
|
|
594
|
+
if (!e) return r ? t : { ...t };
|
|
595
|
+
if (!t) return r ? e : { ...e };
|
|
596
|
+
if (!e && !t || e.rowStart > t.rowEnd || e.rowEnd < t.rowStart || e.colStart > t.colEnd || e.colEnd < t.colStart) return null;
|
|
597
|
+
let n = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), a = Math.min(e.colEnd, t.colEnd), l = Math.min(e.rowEnd, t.rowEnd), i = r;
|
|
598
|
+
return i ? (i.colStart = n, i.rowStart = o, i.colEnd = a, i.rowEnd = l) : i = {
|
|
599
|
+
colStart: n,
|
|
600
|
+
rowStart: o,
|
|
601
|
+
colEnd: a,
|
|
602
|
+
rowEnd: l
|
|
603
|
+
}, i;
|
|
604
|
+
}
|
|
605
|
+
function it(e, t, r) {
|
|
606
|
+
if (!e && !t) return null;
|
|
607
|
+
if (!e) return r ? t : { ...t };
|
|
608
|
+
if (!t) return r ? e : { ...e };
|
|
609
|
+
let n = Math.min(e.colStart, t.colStart), o = Math.min(e.rowStart, t.rowStart), a = Math.max(e.colEnd, t.colEnd), l = Math.max(e.rowEnd, t.rowEnd), i = r;
|
|
610
|
+
return i ? (i.colStart = n, i.rowStart = o, i.colEnd = a, i.rowEnd = l) : i = {
|
|
611
|
+
colStart: n,
|
|
612
|
+
rowStart: o,
|
|
613
|
+
colEnd: a,
|
|
614
|
+
rowEnd: l
|
|
615
|
+
}, i;
|
|
616
|
+
}
|
|
617
|
+
function xr(e, t) {
|
|
618
|
+
return e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!br(e.cell, t.cell) && Er(e.ranges, t.ranges);
|
|
619
|
+
}
|
|
620
|
+
function Bn(e, t, r) {
|
|
621
|
+
if (!e || e.length === 0) return null;
|
|
622
|
+
if (e.length === 1 && !t) return e[0];
|
|
623
|
+
let n = e[0];
|
|
624
|
+
for (let o = 1; o < e.length; o++) n = it(n, e[o], r);
|
|
625
|
+
return t && (n = it(n, t, r)), n;
|
|
626
|
+
}
|
|
627
|
+
function Kn(e) {
|
|
628
|
+
return !!e && !(typeof e.colStart != "number" || e.colStart < 0) && !(typeof e.colEnd != "number" || e.colEnd < e.colStart) && !(typeof e.rowStart != "number" || e.rowStart < 0) && !(typeof e.rowEnd != "number" || e.rowEnd < e.rowStart);
|
|
629
|
+
}
|
|
630
|
+
function zn(e, t) {
|
|
631
|
+
if (!t || t.length === 0) return e;
|
|
632
|
+
let r = e, n = null;
|
|
633
|
+
for (; !dt(r, n);) n = r, r = Tr(n, t);
|
|
634
|
+
return r;
|
|
635
|
+
}
|
|
636
|
+
function Tr(e, t) {
|
|
637
|
+
if (!t || t.length === 0) return e;
|
|
638
|
+
let r = { ...e };
|
|
639
|
+
for (let n = 0; n < t.length; n++) {
|
|
640
|
+
let o = t[n];
|
|
641
|
+
ft(r, o) && (r.rowStart = Math.min(r.rowStart, o.rowStart), r.colStart = Math.min(r.colStart, o.colStart), r.rowEnd = Math.max(r.rowEnd, o.rowEnd), r.colEnd = Math.max(r.colEnd, o.colEnd));
|
|
642
|
+
}
|
|
643
|
+
return r;
|
|
644
|
+
}
|
|
645
|
+
function Vn(e, t = -e.rowStart, r = -e.colStart, n) {
|
|
646
|
+
return n ? (n.colStart = e.colStart + r, n.rowStart = e.rowStart + t, n.colEnd = e.colEnd + r, n.rowEnd = e.rowEnd + t, n) : {
|
|
647
|
+
colStart: e.colStart + r,
|
|
648
|
+
rowStart: e.rowStart + t,
|
|
649
|
+
colEnd: e.colEnd + r,
|
|
650
|
+
rowEnd: e.rowEnd + t
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
function Cr(e, t) {
|
|
654
|
+
return e ? e.scope ? {
|
|
655
|
+
colStart: e.colIndex ?? e.colStart ?? t?.colStart ?? 0,
|
|
656
|
+
rowStart: e.rowIndex ?? e.rowStart ?? t?.rowStart ?? 0,
|
|
657
|
+
colEnd: e.colIndex ?? e.colEnd ?? t?.colEnd ?? 0,
|
|
658
|
+
rowEnd: e.rowIndex ?? e.rowEnd ?? t?.rowEnd ?? 0,
|
|
659
|
+
scope: e.scope
|
|
660
|
+
} : {
|
|
661
|
+
colStart: e.colIndex ?? e.colStart ?? t?.colStart ?? 0,
|
|
662
|
+
rowStart: e.rowIndex ?? e.rowStart ?? t?.rowStart ?? 0,
|
|
663
|
+
colEnd: e.colIndex ?? e.colEnd ?? t?.colEnd ?? 0,
|
|
664
|
+
rowEnd: e.rowIndex ?? e.rowEnd ?? t?.rowEnd ?? 0
|
|
665
|
+
} : null;
|
|
666
|
+
}
|
|
667
|
+
function Xn(e, t) {
|
|
668
|
+
if (!e) return null;
|
|
669
|
+
let r = e.length, n = Array(r);
|
|
670
|
+
for (let o = 0; o < r; o++) n[o] = Cr(e[o], t);
|
|
671
|
+
return n;
|
|
672
|
+
}
|
|
673
|
+
function Gn(e, t, r) {
|
|
674
|
+
return e ? r ? (r.colStart = e.colStart ?? t.colStart, r.rowStart = e.rowStart ?? t.rowStart, r.colEnd = e.colEnd ?? t.colEnd, r.rowEnd = e.rowEnd ?? t.rowEnd, r) : {
|
|
675
|
+
colStart: e.colStart ?? t.colStart,
|
|
676
|
+
rowStart: e.rowStart ?? t.rowStart,
|
|
677
|
+
colEnd: e.colEnd ?? t.colEnd,
|
|
678
|
+
rowEnd: e.rowEnd ?? t.rowEnd
|
|
679
|
+
} : t;
|
|
680
|
+
}
|
|
681
|
+
var qn = [null, null], Hn = (e, t, r) => {
|
|
682
|
+
if (e[0].value === e[1].value) return t;
|
|
683
|
+
};
|
|
684
|
+
function Ar(e, t = 2, r, n = ue.Row, o) {
|
|
685
|
+
let a = [...e];
|
|
686
|
+
if (t <= 0 || e.length <= 1) return a;
|
|
687
|
+
let l = n === ue.Column, i = 0, u = !1;
|
|
688
|
+
do {
|
|
689
|
+
let p = a.sort(wr(l ? ue.Row : ue.Column));
|
|
690
|
+
a = [], a.push(p[0]);
|
|
691
|
+
let h = p.length, c = 0, g = p[0], T = g.colStart, I = g.rowStart, M = g.colEnd, q = g.rowEnd;
|
|
692
|
+
for (let v = 1; v < h; v++) {
|
|
693
|
+
let C = p[v], R = !1;
|
|
694
|
+
if (R = l ? g && I === C.rowStart && q === C.rowEnd && M + 1 === C.colStart : g && T === C.colStart && M === C.colEnd && q + 1 === C.rowStart, R) {
|
|
695
|
+
let U = {
|
|
696
|
+
colStart: T,
|
|
697
|
+
rowStart: I,
|
|
698
|
+
colEnd: l ? C.colEnd : M,
|
|
699
|
+
rowEnd: l ? q : C.rowEnd
|
|
700
|
+
};
|
|
701
|
+
if (g.value !== void 0 && (U.value = g.value), r) {
|
|
702
|
+
let Z = o ?? [null, null];
|
|
703
|
+
Z[0] = g, Z[1] = C, U = r(Z, U, n);
|
|
704
|
+
}
|
|
705
|
+
if (U) {
|
|
706
|
+
a[c] = U, u = !0, g = U, T = g.colStart, I = g.rowStart, M = g.colEnd, q = g.rowEnd;
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
a[++c] = C, g = C, T = g.colStart, I = g.rowStart, M = g.colEnd, q = g.rowEnd;
|
|
711
|
+
}
|
|
712
|
+
i++, l = !l, i === 1 && (u = !0);
|
|
713
|
+
} while (i < t && u && a.length > 1);
|
|
714
|
+
return a;
|
|
715
|
+
}
|
|
716
|
+
function Wn(e, t = !1) {
|
|
717
|
+
let r = [], n, o = null, a = -(2 ** 53 - 1), l = -(2 ** 53 - 1);
|
|
718
|
+
return {
|
|
719
|
+
append: (i, u, p) => {
|
|
720
|
+
let h = !0, c = p !== void 0;
|
|
721
|
+
if (c) {
|
|
722
|
+
let I = e ? e(n, p, t) : n === p ? p : void 0;
|
|
723
|
+
I === void 0 ? h = !1 : p = I;
|
|
724
|
+
}
|
|
725
|
+
if (h && u === l + 1 && i === a) return t ? o.rowEnd = u : o.colEnd = u, l = u, void (n = p);
|
|
726
|
+
o && r.push(o);
|
|
727
|
+
let g = t ? i : u, T = t ? u : i;
|
|
728
|
+
o = {
|
|
729
|
+
colStart: g,
|
|
730
|
+
rowStart: T,
|
|
731
|
+
colEnd: g,
|
|
732
|
+
rowEnd: T
|
|
733
|
+
}, c && (o.value = p), a = i, l = u, n = p;
|
|
734
|
+
},
|
|
735
|
+
done: (i) => (o &&= (r.push(o), null), i ? Ar(r, 3, i === !0 ? Hn : i, t ? ue.Column : ue.Row, qn) : r)
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
var Se = {
|
|
739
|
+
Close: "close",
|
|
740
|
+
Blank: "blank",
|
|
741
|
+
Inside: "inside",
|
|
742
|
+
Tear: "tear"
|
|
743
|
+
};
|
|
744
|
+
function Jn(e, t, r) {
|
|
745
|
+
let n = r === ue.Row;
|
|
746
|
+
return (n ? e.colStart === t.colStart && e.colEnd === t.colEnd : e.rowStart === t.rowStart && e.rowEnd === t.rowEnd) ? (n ? t.rowStart > e.rowStart && t.rowStart <= e.rowEnd : t.colStart > e.colStart && t.colStart <= e.colEnd) ? Se.Inside : Se.Close : (n ? e.rowEnd >= t.rowStart && e.colStart <= t.colEnd && e.colEnd >= t.colStart : e.colEnd >= t.colStart && e.rowStart <= t.rowEnd && e.rowEnd >= t.rowStart) ? Se.Tear : Se.Blank;
|
|
747
|
+
}
|
|
748
|
+
function Yn(e) {
|
|
749
|
+
return e === Se.Inside || e === Se.Tear;
|
|
750
|
+
}
|
|
751
|
+
var Y = {
|
|
752
|
+
Up: "up",
|
|
753
|
+
Down: "down",
|
|
754
|
+
Left: "left",
|
|
755
|
+
Right: "right"
|
|
756
|
+
}, H = {
|
|
757
|
+
Html: "text/html",
|
|
758
|
+
Plain: "text/plain",
|
|
759
|
+
Png: "image/png"
|
|
760
|
+
};
|
|
761
|
+
he({
|
|
762
|
+
findNextCellWithinSelection: () => Ir,
|
|
763
|
+
traverseHiddenHeaders: () => de
|
|
764
|
+
});
|
|
765
|
+
function de(e, t, r, n) {
|
|
766
|
+
if (!e) return t;
|
|
767
|
+
let o = t, a = r === Y.Right || r === Y.Down;
|
|
768
|
+
for (;;) {
|
|
769
|
+
let l = e(o, !a);
|
|
770
|
+
if (l === 0) return o;
|
|
771
|
+
let i = a ? o + l : o - l;
|
|
772
|
+
if (n !== void 0 && (a ? i > n : i < n)) return n;
|
|
773
|
+
o = i;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function Ir(e, t = Y.Right, r, n, o, a = null) {
|
|
777
|
+
if (a && xr(a, e)) return e;
|
|
778
|
+
let l = e.ranges, i = e.rangeIndex, u = l[i];
|
|
779
|
+
if (!ft({
|
|
780
|
+
rowStart: e.cell.rowIndex,
|
|
781
|
+
colStart: e.cell.colIndex,
|
|
782
|
+
rowEnd: e.cell.rowIndex,
|
|
783
|
+
colEnd: e.cell.colIndex
|
|
784
|
+
}, u)) return e;
|
|
785
|
+
let p = { ...e.cell }, h = i;
|
|
786
|
+
switch (t) {
|
|
787
|
+
case Y.Right:
|
|
788
|
+
p.colIndex = de(o, p.colIndex + 1, t, u.colEnd + 1);
|
|
789
|
+
break;
|
|
790
|
+
case Y.Left:
|
|
791
|
+
p.colIndex = de(o, p.colIndex - 1, t, u.colStart - 1);
|
|
792
|
+
break;
|
|
793
|
+
case Y.Down:
|
|
794
|
+
p.rowIndex = de(n, p.rowIndex + 1, t, u.rowEnd + 1);
|
|
795
|
+
break;
|
|
796
|
+
case Y.Up: p.rowIndex = de(n, p.rowIndex - 1, t, u.rowStart - 1);
|
|
797
|
+
}
|
|
798
|
+
let c = (I) => {
|
|
799
|
+
if (I) {
|
|
800
|
+
h = i >= l.length - 1 ? 0 : i + 1;
|
|
801
|
+
let M = l[h];
|
|
802
|
+
p = {
|
|
803
|
+
colIndex: M.colStart,
|
|
804
|
+
rowIndex: M.rowStart
|
|
805
|
+
};
|
|
806
|
+
} else {
|
|
807
|
+
h = i <= 0 ? l.length - 1 : i - 1;
|
|
808
|
+
let M = l[h];
|
|
809
|
+
p = {
|
|
810
|
+
colIndex: M.colEnd,
|
|
811
|
+
rowIndex: M.rowEnd
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
if (t === Y.Right && p.colIndex > u.colEnd && p.rowIndex === u.rowEnd) c(!0);
|
|
816
|
+
else if (t === Y.Left && p.colIndex < u.colStart && p.rowIndex === u.rowStart) c(!1);
|
|
817
|
+
else if (t === Y.Down && p.colIndex === u.colEnd && p.rowIndex > u.rowEnd) c(!0);
|
|
818
|
+
else if (t === Y.Up && p.colIndex === u.colStart && p.rowIndex < u.rowStart) c(!1);
|
|
819
|
+
else {
|
|
820
|
+
let I = p.rowIndex, M = p.colIndex;
|
|
821
|
+
switch (t) {
|
|
822
|
+
case Y.Right:
|
|
823
|
+
M > u.colEnd && (I = de(n, I + 1, t, u.rowEnd + 1), M = u.colStart, I > u.rowEnd && (I = u.rowStart));
|
|
824
|
+
break;
|
|
825
|
+
case Y.Left:
|
|
826
|
+
M < u.colStart && (I = de(n, I - 1, t, u.rowStart - 1), M = u.colEnd, I < u.rowStart && (I = u.rowEnd));
|
|
827
|
+
break;
|
|
828
|
+
case Y.Down:
|
|
829
|
+
I > u.rowEnd && (M = de(o, M + 1, t, u.colEnd + 1), I = u.rowStart, M > u.colEnd && (M = u.colStart));
|
|
830
|
+
break;
|
|
831
|
+
case Y.Up: I < u.rowStart && (M = de(o, M - 1, t, u.colStart - 1), I = u.rowEnd, M < u.colStart && (M = u.colEnd));
|
|
832
|
+
}
|
|
833
|
+
p = {
|
|
834
|
+
rowIndex: I,
|
|
835
|
+
colIndex: M
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
let g = r(p);
|
|
839
|
+
if (!Sr(g, u)) {
|
|
840
|
+
let I = vr(g, u);
|
|
841
|
+
I && (g = I);
|
|
842
|
+
}
|
|
843
|
+
let T = {
|
|
844
|
+
rowStart: de(n, g.rowStart, Y.Down, g.rowEnd),
|
|
845
|
+
colStart: de(o, g.colStart, Y.Right, g.colEnd),
|
|
846
|
+
rowEnd: de(n, g.rowEnd, Y.Up, g.rowStart),
|
|
847
|
+
colEnd: de(o, g.colEnd, Y.Left, g.colStart)
|
|
848
|
+
};
|
|
849
|
+
if (T.rowStart !== p.rowIndex || T.colStart !== p.colIndex) {
|
|
850
|
+
switch (t) {
|
|
851
|
+
case Y.Right:
|
|
852
|
+
l[h].colStart === T.colStart && l[h].colEnd === T.colEnd && (p.rowIndex = T.rowEnd), p.colIndex = T.colEnd;
|
|
853
|
+
break;
|
|
854
|
+
case Y.Left:
|
|
855
|
+
l[h].colStart === T.colStart && l[h].colEnd === T.colEnd && (p.rowIndex = T.rowStart), p.rowIndex === T.rowStart ? p.colIndex = T.colStart + 1 : p.colIndex = T.colStart;
|
|
856
|
+
break;
|
|
857
|
+
case Y.Down:
|
|
858
|
+
l[h].rowStart === T.rowStart && l[h].rowEnd === T.rowEnd && (p.colIndex = T.colEnd), p.rowIndex = T.rowEnd;
|
|
859
|
+
break;
|
|
860
|
+
case Y.Up: l[h].rowStart === T.rowStart && l[h].rowEnd === T.rowEnd && (p.colIndex = T.colStart), p.colIndex === T.colStart ? p.rowIndex = T.rowStart + 1 : p.rowIndex = T.rowStart;
|
|
861
|
+
}
|
|
862
|
+
return Ir({
|
|
863
|
+
cell: p,
|
|
864
|
+
ranges: e.ranges,
|
|
865
|
+
rangeIndex: h
|
|
866
|
+
}, t, r, n, o, a ?? e);
|
|
867
|
+
}
|
|
868
|
+
return {
|
|
869
|
+
ranges: e.ranges,
|
|
870
|
+
cell: p,
|
|
871
|
+
rangeIndex: h
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
var Zn = class {
|
|
875
|
+
constructor() {
|
|
876
|
+
this._onceMessageKeys = /* @__PURE__ */ new Set(), this._overrides = null;
|
|
877
|
+
}
|
|
878
|
+
setOverrides(e) {
|
|
879
|
+
this._overrides = e ?? null;
|
|
880
|
+
}
|
|
881
|
+
getOverrides() {
|
|
882
|
+
return this._overrides;
|
|
883
|
+
}
|
|
884
|
+
_write(e, t, r) {
|
|
885
|
+
if (r?.onceKey) {
|
|
886
|
+
let a = this._onceMessageKeys;
|
|
887
|
+
if (a.has(r.onceKey)) return;
|
|
888
|
+
a.add(r.onceKey);
|
|
889
|
+
}
|
|
890
|
+
let n = r?.meta, o = this._overrides;
|
|
891
|
+
if (o) {
|
|
892
|
+
let a = o[e];
|
|
893
|
+
if (a) return void a.bind(o)(t, r);
|
|
894
|
+
}
|
|
895
|
+
n === void 0 ? console[e](t) : console[e](t, n);
|
|
896
|
+
}
|
|
897
|
+
log(e, t) {
|
|
898
|
+
return this._write("log", e, t);
|
|
899
|
+
}
|
|
900
|
+
error(e, t) {
|
|
901
|
+
return this._write("error", e, t);
|
|
902
|
+
}
|
|
903
|
+
warn(e, t) {
|
|
904
|
+
return this._write("warn", e, t);
|
|
905
|
+
}
|
|
906
|
+
debug(e, t) {
|
|
907
|
+
return this._write("debug", e, t);
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
new Zn();
|
|
911
|
+
var Je;
|
|
912
|
+
he({
|
|
913
|
+
EmptyBounds: () => to,
|
|
914
|
+
EmptyRect: () => eo,
|
|
915
|
+
EmptyTopLeft: () => Qn
|
|
916
|
+
});
|
|
917
|
+
var Qn = Object.freeze({
|
|
918
|
+
left: 0,
|
|
919
|
+
top: 0
|
|
920
|
+
}), eo = Object.freeze({
|
|
921
|
+
left: 0,
|
|
922
|
+
top: 0,
|
|
923
|
+
bottom: 0,
|
|
924
|
+
right: 0
|
|
925
|
+
}), to = Object.freeze({
|
|
926
|
+
x: 0,
|
|
927
|
+
y: 0,
|
|
928
|
+
width: 0,
|
|
929
|
+
height: 0
|
|
930
|
+
});
|
|
931
|
+
he({
|
|
932
|
+
canUseDOM: () => $r,
|
|
933
|
+
getDPI: () => no,
|
|
934
|
+
hasFocus: () => Rr,
|
|
935
|
+
openFileDialog: () => ro,
|
|
936
|
+
scrollIntoContainer: () => oo,
|
|
937
|
+
whenFocus: () => ao
|
|
938
|
+
});
|
|
939
|
+
var $r = !(typeof window > "u" || !window.document || !window.document.createElement), ro = (e = "*.*") => new Promise((t, r) => {
|
|
940
|
+
if (!$r) return void r("Unable to open dialog with no dom.");
|
|
941
|
+
let n = document.createElement("input");
|
|
942
|
+
n.type = "file", n.accept = e;
|
|
943
|
+
let o = null, a = !1;
|
|
944
|
+
globalThis.addEventListener?.("focus", () => {
|
|
945
|
+
setTimeout(() => {
|
|
946
|
+
o || a || (a = !0, t(null));
|
|
947
|
+
}, 1e3);
|
|
948
|
+
}, {
|
|
949
|
+
once: !0,
|
|
950
|
+
passive: !0
|
|
951
|
+
}), n.onchange = () => {
|
|
952
|
+
if (o = n.files?.[0] ?? null, o) {
|
|
953
|
+
if (a) return void console.warn("File open detected after faux cancel.", o);
|
|
954
|
+
t(o);
|
|
955
|
+
}
|
|
956
|
+
}, n.autofocus = !0, n.click();
|
|
957
|
+
}), no = () => {
|
|
958
|
+
let e = 1;
|
|
959
|
+
return typeof window == "object" && (e = window.devicePixelRatio || 1), e;
|
|
960
|
+
}, Rr = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeElement || e?.contains(document.activeElement)), oo = (e, t, r = "auto") => {
|
|
961
|
+
if ((() => {
|
|
962
|
+
if (Je === void 0) {
|
|
963
|
+
let u = !1;
|
|
964
|
+
try {
|
|
965
|
+
document.createElement("div").scrollIntoView({ get container() {
|
|
966
|
+
return u = !0, "nearest";
|
|
967
|
+
} });
|
|
968
|
+
} catch {}
|
|
969
|
+
Je = u;
|
|
970
|
+
}
|
|
971
|
+
return Je;
|
|
972
|
+
})()) return void t.scrollIntoView({
|
|
973
|
+
block: "nearest",
|
|
974
|
+
inline: "nearest",
|
|
975
|
+
behavior: r,
|
|
976
|
+
container: "nearest"
|
|
977
|
+
});
|
|
978
|
+
let n = e.getBoundingClientRect(), o = t.getBoundingClientRect(), a = n.top + e.clientTop, l = a + e.clientHeight, i = 0;
|
|
979
|
+
o.top < a ? i = o.top - a : o.bottom > l && (i = Math.min(o.bottom - l, o.top - a)), i !== 0 && e.scrollBy({
|
|
980
|
+
top: i,
|
|
981
|
+
behavior: r
|
|
982
|
+
});
|
|
983
|
+
}, ao = async (e, t = !1) => new Promise((r) => {
|
|
984
|
+
Rr(e, t) ? r(!0) : e.addEventListener("focusin", () => {
|
|
985
|
+
r(!0);
|
|
986
|
+
}, { once: !0 }), e.focus();
|
|
987
|
+
});
|
|
988
|
+
he({
|
|
989
|
+
cancelTimeout: () => fo,
|
|
990
|
+
debounce: () => so,
|
|
991
|
+
nextTick: () => uo,
|
|
992
|
+
rafThrottle: () => co,
|
|
993
|
+
requestTimeout: () => po,
|
|
994
|
+
throttle: () => lo
|
|
995
|
+
});
|
|
996
|
+
var Le = globalThis.requestAnimationFrame, io = globalThis.cancelAnimationFrame;
|
|
997
|
+
function lo(e, t) {
|
|
998
|
+
let r = null;
|
|
999
|
+
return (...n) => {
|
|
1000
|
+
let o = Date.now();
|
|
1001
|
+
(!r || o - r >= t) && (r = o, e(...n));
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
function so(e, t = 300, r = !1) {
|
|
1005
|
+
let n, o, a, l = null, i = 0;
|
|
1006
|
+
function u() {
|
|
1007
|
+
let h = Date.now() - i;
|
|
1008
|
+
h < t && h >= 0 ? l = setTimeout(u, t - h) : (l = null, r || (a = e.apply(o, n), o = n = null));
|
|
1009
|
+
}
|
|
1010
|
+
t ??= 100;
|
|
1011
|
+
let p = function() {
|
|
1012
|
+
o = globalThis, n = arguments, i = Date.now();
|
|
1013
|
+
var h = r && !l;
|
|
1014
|
+
return l ||= setTimeout(u, t), h && (a = e.apply(o, n), o = n = null), a;
|
|
1015
|
+
};
|
|
1016
|
+
return p.clear = function() {
|
|
1017
|
+
l &&= (clearTimeout(l), null);
|
|
1018
|
+
}, p.flush = function() {
|
|
1019
|
+
l &&= (a = e.apply(o, n), o = n = null, clearTimeout(l), null);
|
|
1020
|
+
}, p;
|
|
1021
|
+
}
|
|
1022
|
+
var co = (e) => {
|
|
1023
|
+
let t, r = !1, n = function() {
|
|
1024
|
+
r = !1, e(t);
|
|
1025
|
+
};
|
|
1026
|
+
return function(o) {
|
|
1027
|
+
t = o, t && t.persist && t.persist(), r || (r = !0, Le(n));
|
|
1028
|
+
};
|
|
1029
|
+
}, uo = (e) => {
|
|
1030
|
+
if (typeof Le == "function") Le(() => {
|
|
1031
|
+
e();
|
|
1032
|
+
});
|
|
1033
|
+
else {
|
|
1034
|
+
let t = globalThis.setImmediate;
|
|
1035
|
+
(typeof t == "function" ? t : setTimeout)(() => {
|
|
1036
|
+
e();
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
}, Et = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now(), fo = (e) => {
|
|
1040
|
+
io(e.id);
|
|
1041
|
+
}, po = (e, t) => {
|
|
1042
|
+
let r = Et(), n = { id: Le(function o() {
|
|
1043
|
+
Et() - r >= t ? e.call(null) : n.id = Le(o);
|
|
1044
|
+
}) };
|
|
1045
|
+
return n;
|
|
1046
|
+
};
|
|
1047
|
+
he({ MESSAGE_ERROR_INVALID_ARG: () => mo });
|
|
1048
|
+
var mo = (e) => \`Invalid argument: '\${e}'.\`;
|
|
1049
|
+
he({
|
|
1050
|
+
APP_MIME_TYPE: () => go,
|
|
1051
|
+
DEFAULT_MIME_TYPE: () => "*/*",
|
|
1052
|
+
JSONStableStringify: () => So,
|
|
1053
|
+
arrayBufferToBase64: () => Nr,
|
|
1054
|
+
base64ToArrayBuffer: () => bo,
|
|
1055
|
+
blobToString: () => lt,
|
|
1056
|
+
isLittleEndian: () => wo,
|
|
1057
|
+
isNodeBuffer: () => ho,
|
|
1058
|
+
isSharedArrayBufferSupported: () => yo
|
|
1059
|
+
});
|
|
1060
|
+
var go = "application/octet-stream", Ae = globalThis.Buffer, ho = (e) => Ae?.isBuffer(e) ?? !1, yo = typeof SharedArrayBuffer == "function" && (globalThis.crossOriginIsolated === void 0 || globalThis.crossOriginIsolated === !0), wo = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1, vt = globalThis.FileReader, bo = (e) => {
|
|
1061
|
+
let t = typeof globalThis.atob == "function" ? globalThis.atob(e) : Ae.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);
|
|
1062
|
+
for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);
|
|
1063
|
+
return n.buffer;
|
|
1064
|
+
}, Nr = (e) => {
|
|
1065
|
+
let t = new Uint8Array(e), r = t.byteLength, n = "";
|
|
1066
|
+
for (let o = 0; o < r; o++) n += String.fromCharCode(t[o]);
|
|
1067
|
+
if (typeof globalThis.btoa == "function") return globalThis.btoa(n);
|
|
1068
|
+
if (Ae) return Ae.from(n, "binary").toString("base64");
|
|
1069
|
+
throw Error("Unsupported environment");
|
|
1070
|
+
}, lt = (e) => new Promise((t, r) => {
|
|
1071
|
+
if (e) if (vt) {
|
|
1072
|
+
let n = new vt();
|
|
1073
|
+
n.onload = () => {
|
|
1074
|
+
t(n.result);
|
|
1075
|
+
}, n.onerror = () => {
|
|
1076
|
+
r(n.error);
|
|
1077
|
+
}, n.readAsText(e);
|
|
1078
|
+
} else if (Ae) {
|
|
1079
|
+
let n = (o) => Ae.from(o).toString("utf-8");
|
|
1080
|
+
e.arrayBuffer().then((o) => {
|
|
1081
|
+
t(n(o));
|
|
1082
|
+
}).catch((o) => {
|
|
1083
|
+
r(o);
|
|
1084
|
+
});
|
|
1085
|
+
} else r(/* @__PURE__ */ Error("Unsupported environment"));
|
|
1086
|
+
else t("");
|
|
1087
|
+
});
|
|
1088
|
+
function So(e, t) {
|
|
1089
|
+
t ||= {}, typeof t == "function" && (t = { cmp: t });
|
|
1090
|
+
let r = typeof t.cycles == "boolean" && t.cycles, n = t.cmp && (o = t.cmp, function(l) {
|
|
1091
|
+
return function(i, u) {
|
|
1092
|
+
return o({
|
|
1093
|
+
key: i,
|
|
1094
|
+
value: l[i]
|
|
1095
|
+
}, {
|
|
1096
|
+
key: u,
|
|
1097
|
+
value: l[u]
|
|
1098
|
+
});
|
|
1099
|
+
};
|
|
1100
|
+
});
|
|
1101
|
+
var o;
|
|
1102
|
+
let a = [];
|
|
1103
|
+
return (function l(i) {
|
|
1104
|
+
if (i && i.toJSON && typeof i.toJSON == "function" && (i = i.toJSON()), i === void 0) return;
|
|
1105
|
+
if (typeof i == "number") return isFinite(i) ? "" + i : "null";
|
|
1106
|
+
if (typeof i != "object") return JSON.stringify(i);
|
|
1107
|
+
let u;
|
|
1108
|
+
if (Array.isArray(i)) {
|
|
1109
|
+
u = "[";
|
|
1110
|
+
for (let c = 0; c < i.length; c++) c && (u += ","), u += l(i[c]) || "null";
|
|
1111
|
+
return u + "]";
|
|
1112
|
+
}
|
|
1113
|
+
if (i === null) return "null";
|
|
1114
|
+
if (a.indexOf(i) !== -1) {
|
|
1115
|
+
if (r) return JSON.stringify("__cycle__");
|
|
1116
|
+
throw TypeError("Converting circular structure to JSON");
|
|
1117
|
+
}
|
|
1118
|
+
let p = a.push(i) - 1, h = Object.keys(i).sort(n && n(i));
|
|
1119
|
+
u = "";
|
|
1120
|
+
for (let c = 0; c < h.length; c++) {
|
|
1121
|
+
let g = h[c], T = l(i[g]);
|
|
1122
|
+
T && (u && (u += ","), u += JSON.stringify(g) + ":" + T);
|
|
1123
|
+
}
|
|
1124
|
+
return a.splice(p, 1), "{" + u + "}";
|
|
1125
|
+
})(e);
|
|
1126
|
+
}
|
|
1127
|
+
var Eo;
|
|
1128
|
+
he({
|
|
1129
|
+
DATA_URL_PNG_PREFIX: () => _r,
|
|
1130
|
+
getImageDataUrl: () => vo,
|
|
1131
|
+
loadImageDetails: () => xo
|
|
1132
|
+
});
|
|
1133
|
+
var _r = "data:image/png;base64,", kr = "Unable to resolve image.", xt = (e) => new Promise(async (t, r) => {
|
|
1134
|
+
let n = null;
|
|
1135
|
+
try {
|
|
1136
|
+
let o = n = new Image();
|
|
1137
|
+
o.src = e, o.addEventListener("load", function() {
|
|
1138
|
+
t({
|
|
1139
|
+
width: o.naturalWidth,
|
|
1140
|
+
height: o.naturalHeight
|
|
1141
|
+
});
|
|
1142
|
+
}, { once: !0 }), o.addEventListener("error", function(a) {
|
|
1143
|
+
URL.revokeObjectURL(e);
|
|
1144
|
+
let l = a?.error?.message ?? "";
|
|
1145
|
+
l &&= \`: \${l}\`, r(\`Invalid Image\${l}\`);
|
|
1146
|
+
}, { once: !0 }), await o.decode();
|
|
1147
|
+
} catch {
|
|
1148
|
+
n?.src && URL.revokeObjectURL(n.src);
|
|
1149
|
+
}
|
|
1150
|
+
n || r(Error(kr));
|
|
1151
|
+
}), vo = (e, t = 1) => new Promise(async (r, n) => {
|
|
1152
|
+
let o = null;
|
|
1153
|
+
try {
|
|
1154
|
+
let a = o = new Image();
|
|
1155
|
+
a.src = e, a.addEventListener("load", function() {
|
|
1156
|
+
try {
|
|
1157
|
+
let l = document.createElement("canvas");
|
|
1158
|
+
l.width = a.naturalWidth, l.height = a.naturalHeight;
|
|
1159
|
+
let i = l.getContext("2d");
|
|
1160
|
+
if (!i) throw Error("Unable to create 2d context");
|
|
1161
|
+
i.drawImage(a, 0, 0);
|
|
1162
|
+
let u = l.toDataURL("image/png", t);
|
|
1163
|
+
r({
|
|
1164
|
+
elemImg: a,
|
|
1165
|
+
dataUrl: u
|
|
1166
|
+
});
|
|
1167
|
+
} catch (l) {
|
|
1168
|
+
URL.revokeObjectURL(e), n(l);
|
|
1169
|
+
}
|
|
1170
|
+
}, { once: !0 }), a.addEventListener("error", function() {
|
|
1171
|
+
URL.revokeObjectURL(e), n("Invalid Image");
|
|
1172
|
+
}, { once: !0 }), await a.decode();
|
|
1173
|
+
} catch {
|
|
1174
|
+
o?.src && URL.revokeObjectURL(o.src);
|
|
1175
|
+
}
|
|
1176
|
+
o || n(Error(kr));
|
|
1177
|
+
}), Ye = "image/svg+xml", xo = async (e, t = null) => {
|
|
1178
|
+
let r = null, n = async () => {
|
|
1179
|
+
try {
|
|
1180
|
+
let a = t ?? "image/*", l = URL.createObjectURL(new Blob([e], { type: a }));
|
|
1181
|
+
r = {
|
|
1182
|
+
mimeType: a,
|
|
1183
|
+
naturalSize: await xt(l),
|
|
1184
|
+
asUrl: l
|
|
1185
|
+
};
|
|
1186
|
+
} catch {}
|
|
1187
|
+
}, o = async () => {
|
|
1188
|
+
try {
|
|
1189
|
+
let a = new TextDecoder().decode(e), l = URL.createObjectURL(new Blob([a], { type: Ye })), i = await xt(l);
|
|
1190
|
+
r = {
|
|
1191
|
+
mimeType: t ?? Ye,
|
|
1192
|
+
naturalSize: i,
|
|
1193
|
+
asUrl: l,
|
|
1194
|
+
asSVGText: a
|
|
1195
|
+
};
|
|
1196
|
+
} catch {}
|
|
1197
|
+
};
|
|
1198
|
+
if (t === Ye ? await o() : t?.startsWith("image/") ? await n() : (await n(), r || await o()), !r) throw Error("Failed to load image");
|
|
1199
|
+
return r;
|
|
1200
|
+
}, Tt = /* @__PURE__ */ new Set(), To = (e) => {
|
|
1201
|
+
Tt.has(e) || (Tt.add(e), console.warn(\`Unknown property '\${e}' in update; ignoring.\`));
|
|
1202
|
+
};
|
|
1203
|
+
(function(e) {
|
|
1204
|
+
e.PassThrough = Object.freeze({});
|
|
1205
|
+
let t = e.resolveTypedUpdates = (r, n, o, a, l = !1) => {
|
|
1206
|
+
if (r === null) return r;
|
|
1207
|
+
if (r === void 0) return a;
|
|
1208
|
+
let i = r;
|
|
1209
|
+
if (n?.shorthand) {
|
|
1210
|
+
let c = n?.shorthand(r, o);
|
|
1211
|
+
c !== void 0 && (i = c);
|
|
1212
|
+
}
|
|
1213
|
+
if (i !== null && n?.getSubType) {
|
|
1214
|
+
let c = n.getSubType(i, a);
|
|
1215
|
+
c && (n = c);
|
|
1216
|
+
}
|
|
1217
|
+
let u = n?.properties, p = n?.arrayType ?? !1, h = i;
|
|
1218
|
+
if (n && n.merge && h && a) h = n.merge(h, a, o);
|
|
1219
|
+
else if (!p && u) {
|
|
1220
|
+
let c = Object.keys({
|
|
1221
|
+
...i,
|
|
1222
|
+
...a
|
|
1223
|
+
});
|
|
1224
|
+
h = null;
|
|
1225
|
+
let g = c.length;
|
|
1226
|
+
for (let T = 0; T < g; T++) {
|
|
1227
|
+
let I = c[T], M, q = i?.[I];
|
|
1228
|
+
if (q !== void 0) {
|
|
1229
|
+
let v = u[I];
|
|
1230
|
+
if (!v) {
|
|
1231
|
+
To(I);
|
|
1232
|
+
continue;
|
|
1233
|
+
}
|
|
1234
|
+
M = t(q, v, o, a?.[I], l);
|
|
1235
|
+
} else M = a?.[I];
|
|
1236
|
+
M == null ? l && q === null && (h ??= {}, h[I] = null) : (h ??= {}, h[I] = M);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
return h;
|
|
1240
|
+
};
|
|
1241
|
+
})(Eo ||= {});
|
|
1242
|
+
var pt = {
|
|
1243
|
+
code: "safari",
|
|
1244
|
+
message: \`The Safari browser does not support advanced copy and paste.
|
|
1245
|
+
Copy and paste will be limited to within the browser tab.
|
|
1246
|
+
|
|
1247
|
+
Please use Chrome or Edge if external copy and paste is required.\`
|
|
1248
|
+
}, Lr = {
|
|
1249
|
+
code: "perms",
|
|
1250
|
+
message: \`You do not have permissions to access the clipboard.
|
|
1251
|
+
All copy and paste operations will be limited to the browser tab.\`
|
|
1252
|
+
}, Ct = Xe() === fe.Safari ? pt : Lr, Co = {
|
|
1253
|
+
Safari: pt,
|
|
1254
|
+
Perms: Lr,
|
|
1255
|
+
PermsWrite: Ct,
|
|
1256
|
+
PermsRead: Ct
|
|
1257
|
+
}, Ze = async () => new Promise((e) => {
|
|
1258
|
+
document.hasFocus() ? e() : globalThis.addEventListener?.("focus", () => {
|
|
1259
|
+
e();
|
|
1260
|
+
}, { once: !0 }), document.activeElement.focus?.();
|
|
1261
|
+
}), Qe = async (e, t, r) => {
|
|
1262
|
+
if (Xe() === fe.Safari) return await r(Error(pt.message));
|
|
1263
|
+
try {
|
|
1264
|
+
let n = async (l) => {
|
|
1265
|
+
try {
|
|
1266
|
+
return await l();
|
|
1267
|
+
} catch (i) {
|
|
1268
|
+
if (i.message?.includes("Document is not focused")) return !1;
|
|
1269
|
+
throw i;
|
|
1270
|
+
}
|
|
1271
|
+
}, o = await globalThis?.navigator?.permissions?.query({
|
|
1272
|
+
name: e,
|
|
1273
|
+
allowWithoutGesture: !0,
|
|
1274
|
+
allowWithoutSanitization: !0
|
|
1275
|
+
}), a = !1;
|
|
1276
|
+
if (o.state === "prompt" && (a = await n(t)), a || o.state !== "granted" || (a = await t()), !a) return await r(Error(o.state));
|
|
1277
|
+
} catch (n) {
|
|
1278
|
+
return n.message === "No valid data on clipboard" || n.name === "DataError" ? void 0 : await r(n);
|
|
1279
|
+
}
|
|
1280
|
+
}, Or = async (e) => {
|
|
1281
|
+
if (!e) return null;
|
|
1282
|
+
try {
|
|
1283
|
+
return await e.read({ unsanitized: [H.Html] });
|
|
1284
|
+
} catch {}
|
|
1285
|
+
return await e.read();
|
|
1286
|
+
}, Ao = async (e, t) => {
|
|
1287
|
+
if (!e) return null;
|
|
1288
|
+
let r = await Or(e), n = !1;
|
|
1289
|
+
for (let o = 0; !n && r && o < r.length; o++) if (n = r[o].types.includes(t), n) return await r[o].getType(t);
|
|
1290
|
+
return null;
|
|
1291
|
+
};
|
|
1292
|
+
if (!globalThis.ClipboardItem) {
|
|
1293
|
+
let e = (r, n) => new Blob([n], { type: r });
|
|
1294
|
+
class t {
|
|
1295
|
+
constructor(n, o) {
|
|
1296
|
+
this._items = {}, this._types = Object.keys(n);
|
|
1297
|
+
let a = {}, l = Object.keys(n);
|
|
1298
|
+
for (let i = 0; i < l.length; i++) {
|
|
1299
|
+
let u = l[i], p = n[u];
|
|
1300
|
+
a[u] = typeof p == "string" ? e(u, p) : p;
|
|
1301
|
+
}
|
|
1302
|
+
this._items = a, this._presentationStyle = o?.presentationStyle ?? "unspecified";
|
|
1303
|
+
}
|
|
1304
|
+
get types() {
|
|
1305
|
+
return this._types;
|
|
1306
|
+
}
|
|
1307
|
+
getType(n) {
|
|
1308
|
+
return Promise.resolve(this._items[n]);
|
|
1309
|
+
}
|
|
1310
|
+
supports(n) {
|
|
1311
|
+
return !0;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
globalThis.ClipboardItem = t;
|
|
1315
|
+
}
|
|
1316
|
+
var At, st = async (e, t = H.Html) => new Promise(async (r, n) => {
|
|
1317
|
+
try {
|
|
1318
|
+
let o = await Ao(e, t);
|
|
1319
|
+
if (o) {
|
|
1320
|
+
let a = new FileReader();
|
|
1321
|
+
a.onload = () => {
|
|
1322
|
+
r(a.result);
|
|
1323
|
+
}, a.onerror = () => {
|
|
1324
|
+
r("");
|
|
1325
|
+
}, a.readAsText(o);
|
|
1326
|
+
} else r("");
|
|
1327
|
+
} catch (o) {
|
|
1328
|
+
n(o);
|
|
1329
|
+
}
|
|
1330
|
+
}), It = async (e, t = H.Html) => {
|
|
1331
|
+
let r = await st(e, t);
|
|
1332
|
+
if (!r) return null;
|
|
1333
|
+
let n = null;
|
|
1334
|
+
try {
|
|
1335
|
+
n = new DOMParser().parseFromString(r, H.Html);
|
|
1336
|
+
} catch {
|
|
1337
|
+
console.warn("Can't parse html from clipboard.");
|
|
1338
|
+
}
|
|
1339
|
+
return n;
|
|
1340
|
+
}, Io = async (e) => {
|
|
1341
|
+
e && await e.writeText("");
|
|
1342
|
+
}, Oe = "clipboard-uuid", Re = "web text/uuid", $t = (e) => \`<div style="display:none" \${Oe}="\${e}"/>\`, Rt = { type: H.Plain }, Nt = { type: H.Html }, _t = { type: Re }, $o = (e, t) => {
|
|
1343
|
+
let r = null;
|
|
1344
|
+
try {
|
|
1345
|
+
let n = new DOMParser().parseFromString(t, H.Html);
|
|
1346
|
+
n.body.firstElementChild?.setAttribute(Oe, e), r = n.getElementsByTagName("body")[0].innerHTML;
|
|
1347
|
+
} catch (n) {
|
|
1348
|
+
console.warn("Can't embed uuid.", n);
|
|
1349
|
+
}
|
|
1350
|
+
return r;
|
|
1351
|
+
}, kt = (e, t) => {
|
|
1352
|
+
if (!t || !e) return !1;
|
|
1353
|
+
try {
|
|
1354
|
+
let r = t.querySelectorAll(\`[\${Oe}="\${e}"]\`);
|
|
1355
|
+
if (r && r.length === 1) return !0;
|
|
1356
|
+
if (t.querySelector("parsererror")) throw Error("We are unable to parse node");
|
|
1357
|
+
return !1;
|
|
1358
|
+
} catch {
|
|
1359
|
+
return !1;
|
|
1360
|
+
}
|
|
1361
|
+
}, Lt = class {
|
|
1362
|
+
constructor(e) {
|
|
1363
|
+
if (this._state = null, this._nativeClipboard = null, this._onFocus = null, this._onBlur = null, e?.nativeClipboard === void 0 || e?.nativeClipboard === !0) try {
|
|
1364
|
+
this._nativeClipboard = globalThis?.navigator.clipboard;
|
|
1365
|
+
} catch {
|
|
1366
|
+
e?.nativeClipboard === !0 && console.warn("NativeClipboard option set to true but no native clipboard available.");
|
|
1367
|
+
}
|
|
1368
|
+
else this._nativeClipboard = e?.nativeClipboard === !1 ? null : e?.nativeClipboard ?? null;
|
|
1369
|
+
this._disableCheckOnFocus = e?.disableCheckOnFocus ?? !1, this._init();
|
|
1370
|
+
}
|
|
1371
|
+
async _checkForChanges() {
|
|
1372
|
+
this._nativeClipboard && this._state && !this._disableCheckOnFocus && await Qe("clipboard-read", async () => {
|
|
1373
|
+
await Ze();
|
|
1374
|
+
let e = await st(this._nativeClipboard, Re);
|
|
1375
|
+
if (!this._state || e && e === this._state.uuid) return !0;
|
|
1376
|
+
let t = await It(this._nativeClipboard, H.Html);
|
|
1377
|
+
return !this._state || (kt(this._state.uuid, t) || this.clear(), !0);
|
|
1378
|
+
}, async (e) => {
|
|
1379
|
+
e?.message === "denied" || e.message?.includes("Document is not focused") || Xe() === fe.Safari || console.warn("Unable to detect clipboard changes: ", e);
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
_init() {
|
|
1383
|
+
let e = this;
|
|
1384
|
+
this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {
|
|
1385
|
+
e._checkForChanges();
|
|
1386
|
+
}, this._onBlur = () => {
|
|
1387
|
+
globalThis.addEventListener?.("focus", e._onFocus, { once: !0 });
|
|
1388
|
+
}, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (t) => {
|
|
1389
|
+
e._checkForChanges();
|
|
1390
|
+
}));
|
|
1391
|
+
}
|
|
1392
|
+
async read() {
|
|
1393
|
+
if (!this._nativeClipboard) return this._state?.items ?? null;
|
|
1394
|
+
let e = this;
|
|
1395
|
+
return await Qe("clipboard-read", async () => {
|
|
1396
|
+
if (await Ze(), this._state?.uuid) {
|
|
1397
|
+
let t = await st(this._nativeClipboard, Re);
|
|
1398
|
+
if (t && t === e._state?.uuid) return !0;
|
|
1399
|
+
let r = await It(this._nativeClipboard, H.Html);
|
|
1400
|
+
if (kt(e._state?.uuid, r)) return !0;
|
|
1401
|
+
}
|
|
1402
|
+
return e._state = {
|
|
1403
|
+
items: await Or(this._nativeClipboard),
|
|
1404
|
+
uuid: null,
|
|
1405
|
+
ref: null
|
|
1406
|
+
}, this.dispatchEvent(new Event("clipboardread")), !0;
|
|
1407
|
+
}, async (t) => {
|
|
1408
|
+
this.dispatchEvent(new Event("clipboarderrorread"));
|
|
1409
|
+
}), this._state?.items ?? [];
|
|
1410
|
+
}
|
|
1411
|
+
async write(e) {
|
|
1412
|
+
return this._write({
|
|
1413
|
+
uuid: Ke(),
|
|
1414
|
+
items: e,
|
|
1415
|
+
ref: null
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
async _write(e) {
|
|
1419
|
+
if (!this._nativeClipboard) return this._state = e, this.dispatchEvent(new Event("clipboardwrite")), void this.dispatchEvent(new Event("clipboardchange"));
|
|
1420
|
+
let t = this, r = [], n = e.uuid, o = e.items ?? [], a = () => {
|
|
1421
|
+
t._state = {
|
|
1422
|
+
uuid: n,
|
|
1423
|
+
ref: e.ref,
|
|
1424
|
+
items: r
|
|
1425
|
+
}, t.dispatchEvent(new Event("clipboardwrite")), t.dispatchEvent(new Event("clipboardchange"));
|
|
1426
|
+
};
|
|
1427
|
+
await Qe("clipboard-write", async () => {
|
|
1428
|
+
await Ze(), n && o.length === 0 && (o.push(new ClipboardItem({ [Re]: new Blob([n], _t) })), o.push(new ClipboardItem({ [H.Html]: new Blob([$t(n)], Nt) })));
|
|
1429
|
+
for (let l = 0; l < Math.min(1, o.length); l++) {
|
|
1430
|
+
let i = o[l], u = i.types.indexOf(H.Html), p = null;
|
|
1431
|
+
if (u !== -1 && (p = await lt(await i.getType(H.Html)), p &&= $o(n, p)), !p && i.types.includes(H.Plain)) {
|
|
1432
|
+
let I = await i.getType(H.Plain);
|
|
1433
|
+
if (I) {
|
|
1434
|
+
let M = null;
|
|
1435
|
+
typeof I == "string" ? (console.warn("text as string", I), M = I) : M = await lt(I), M && (p = \`<div \${Oe}="\${n}">\${M}</div>\`);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
if (!p && i.types.includes(H.Png)) {
|
|
1439
|
+
let I = Nr(await (await i.getType(H.Png)).arrayBuffer());
|
|
1440
|
+
p = \`<div \${Oe}="\${n}"><img src="\${_r + I}"/></div>\`;
|
|
1441
|
+
}
|
|
1442
|
+
!p && n && (p = $t(n));
|
|
1443
|
+
let h = new Blob([p ?? ""], Nt), c = {}, g = i.types, T = g.length;
|
|
1444
|
+
for (let I = 0; I < T; I++) {
|
|
1445
|
+
let M = g[I];
|
|
1446
|
+
c[M] = I === u ? h : i.getType(M);
|
|
1447
|
+
}
|
|
1448
|
+
p && u === -1 && (c[H.Html] = h), n && (c[Re] = new Blob([n], _t)), r.push(new ClipboardItem(c));
|
|
1449
|
+
}
|
|
1450
|
+
try {
|
|
1451
|
+
r && r.length !== 0 ? await this._nativeClipboard.write(r) : await Io(this._nativeClipboard);
|
|
1452
|
+
} catch (l) {
|
|
1453
|
+
l.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", l);
|
|
1454
|
+
}
|
|
1455
|
+
return a(), !0;
|
|
1456
|
+
}, async (l) => {
|
|
1457
|
+
this.dispatchEvent(new Event("clipboarderrorwrite")), a();
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
async writeReference(e) {
|
|
1461
|
+
if (!e) return void this.clear();
|
|
1462
|
+
let t = null, r = {};
|
|
1463
|
+
try {
|
|
1464
|
+
let o = await e.toText?.() ?? null;
|
|
1465
|
+
o && (r[H.Plain] = new Blob([o ?? ""], Rt));
|
|
1466
|
+
} catch (o) {
|
|
1467
|
+
t = o;
|
|
1468
|
+
}
|
|
1469
|
+
try {
|
|
1470
|
+
let o = await e.toHtml?.() ?? null;
|
|
1471
|
+
o && (r[H.Html] = new Blob([o], { type: H.Html }));
|
|
1472
|
+
} catch (o) {
|
|
1473
|
+
t = o, console.warn("export to html", o);
|
|
1474
|
+
}
|
|
1475
|
+
try {
|
|
1476
|
+
let o = await e.toImage?.() ?? null;
|
|
1477
|
+
o && (r[H.Png] = o);
|
|
1478
|
+
} catch (o) {
|
|
1479
|
+
t = o, console.warn("export to png", o);
|
|
1480
|
+
}
|
|
1481
|
+
let n = this._write({
|
|
1482
|
+
uuid: Ke(),
|
|
1483
|
+
ref: e,
|
|
1484
|
+
items: Object.keys(r).length > 0 ? [new ClipboardItem(r)] : null
|
|
1485
|
+
});
|
|
1486
|
+
if (t) throw t;
|
|
1487
|
+
return n;
|
|
1488
|
+
}
|
|
1489
|
+
clear(e = !1) {
|
|
1490
|
+
this._state && (this._state = null, e && this._write({
|
|
1491
|
+
uuid: null,
|
|
1492
|
+
ref: null,
|
|
1493
|
+
items: null
|
|
1494
|
+
}), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));
|
|
1495
|
+
}
|
|
1496
|
+
async readReference() {
|
|
1497
|
+
return await this.read(), this._state?.ref ?? null;
|
|
1498
|
+
}
|
|
1499
|
+
readText() {
|
|
1500
|
+
return new Promise(async (e, t) => {
|
|
1501
|
+
let r = await this.read(), n = null, o = r ? r.length : 0;
|
|
1502
|
+
for (let l = 0; !n && l < o; l++) {
|
|
1503
|
+
let i = r[l];
|
|
1504
|
+
i.types.includes(H.Plain) && (n = await i.getType(H.Plain));
|
|
1505
|
+
}
|
|
1506
|
+
if (!n) return void e("");
|
|
1507
|
+
let a = new FileReader();
|
|
1508
|
+
a.onload = () => {
|
|
1509
|
+
e(a.result);
|
|
1510
|
+
}, a.readAsText(n), a.onerror = (l) => {
|
|
1511
|
+
t(l);
|
|
1512
|
+
};
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
async writeText(e) {
|
|
1516
|
+
let t = [new ClipboardItem({ [H.Plain]: new Blob([e], Rt) })];
|
|
1517
|
+
return this._write({
|
|
1518
|
+
uuid: Ke(),
|
|
1519
|
+
items: t,
|
|
1520
|
+
ref: null
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
addEventListener(e, t, r = {}) {
|
|
1524
|
+
let n = r?.capture ? this._listenersCapture : this._listeners, o = n.get(e);
|
|
1525
|
+
o || (o = /* @__PURE__ */ new Map(), n.set(e, o)), t && o.set(t, typeof r == "boolean" ? {} : r);
|
|
1526
|
+
}
|
|
1527
|
+
dispatchEvent(e) {
|
|
1528
|
+
if (!e) return !1;
|
|
1529
|
+
let t = (r) => {
|
|
1530
|
+
let n = r.get(e.type);
|
|
1531
|
+
n && n.forEach((o, a) => {
|
|
1532
|
+
try {
|
|
1533
|
+
typeof a == "function" ? a(e) : a.handleEvent && a.handleEvent(e), o.once && n.delete(a);
|
|
1534
|
+
} catch (l) {
|
|
1535
|
+
console.warn(l);
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
};
|
|
1539
|
+
return t(this._listenersCapture), t(this._listeners), !0;
|
|
1540
|
+
}
|
|
1541
|
+
removeEventListener(e, t, r) {
|
|
1542
|
+
let n = r?.capture ? this._listenersCapture : this._listeners, o = n.get(e);
|
|
1543
|
+
o && t && (o.delete(t), o.size === 0 && n.delete(e));
|
|
1544
|
+
}
|
|
1545
|
+
close() {
|
|
1546
|
+
this._onFocus && globalThis.removeEventListener?.("focus", this._onFocus), this._onBlur && globalThis.removeEventListener?.("blur", this._onBlur);
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
(At = Lt ||= {}).ErrorMessages = Co, At.Global = new Lt();
|
|
1550
|
+
var Mr = (e) => e === " " || e === " " || e === \`
|
|
1551
|
+
\` || e === "\\r";
|
|
1552
|
+
function Ot(e, t) {
|
|
1553
|
+
for (; t.i < e.length && Mr(e[t.i]);) t.i++;
|
|
1554
|
+
}
|
|
1555
|
+
function Dr(e, t, r, n) {
|
|
1556
|
+
let o = [], a = "", l = () => {
|
|
1557
|
+
a &&= (o.push(a), "");
|
|
1558
|
+
};
|
|
1559
|
+
for (; t.i < e.length;) {
|
|
1560
|
+
let i = e[t.i];
|
|
1561
|
+
if (i === "}" && n > 0) break;
|
|
1562
|
+
if (i !== "{") if (i === "#" && r) l(), o.push({ kind: "hash" }), t.i++;
|
|
1563
|
+
else {
|
|
1564
|
+
if (i === "'") {
|
|
1565
|
+
let u = e[t.i + 1];
|
|
1566
|
+
if (u === "'") {
|
|
1567
|
+
a += "'", t.i += 2;
|
|
1568
|
+
continue;
|
|
1569
|
+
}
|
|
1570
|
+
if (u === "{" || u === "}" || u === "#" && r) {
|
|
1571
|
+
for (t.i++; t.i < e.length;) {
|
|
1572
|
+
let p = e[t.i];
|
|
1573
|
+
if (p === "'") {
|
|
1574
|
+
if (e[t.i + 1] === "'") {
|
|
1575
|
+
a += "'", t.i += 2;
|
|
1576
|
+
continue;
|
|
1577
|
+
}
|
|
1578
|
+
t.i++;
|
|
1579
|
+
break;
|
|
1580
|
+
}
|
|
1581
|
+
a += p, t.i++;
|
|
1582
|
+
}
|
|
1583
|
+
continue;
|
|
1584
|
+
}
|
|
1585
|
+
a += "'", t.i++;
|
|
1586
|
+
continue;
|
|
1587
|
+
}
|
|
1588
|
+
a += i, t.i++;
|
|
1589
|
+
}
|
|
1590
|
+
else t.i++, l(), o.push(Ro(e, t, r, n));
|
|
1591
|
+
}
|
|
1592
|
+
return l(), o;
|
|
1593
|
+
}
|
|
1594
|
+
function Ro(e, t, r, n) {
|
|
1595
|
+
let o = t.i;
|
|
1596
|
+
for (; t.i < e.length && e[t.i] !== "," && e[t.i] !== "}";) t.i++;
|
|
1597
|
+
let a = e.slice(o, t.i).trim();
|
|
1598
|
+
if (e[t.i] === "}") return t.i++, {
|
|
1599
|
+
kind: "arg",
|
|
1600
|
+
name: a
|
|
1601
|
+
};
|
|
1602
|
+
if (t.i >= e.length) return {
|
|
1603
|
+
kind: "arg",
|
|
1604
|
+
name: a
|
|
1605
|
+
};
|
|
1606
|
+
t.i++;
|
|
1607
|
+
let l = t.i;
|
|
1608
|
+
for (; t.i < e.length && e[t.i] !== "," && e[t.i] !== "}";) t.i++;
|
|
1609
|
+
let i = e.slice(l, t.i).trim(), u = i === "plural" || i === "selectordinal" || i === "select";
|
|
1610
|
+
if (e[t.i] !== "," || !u) {
|
|
1611
|
+
let c = n + 1;
|
|
1612
|
+
for (; t.i < e.length && c > n;) e[t.i] === "{" ? c++ : e[t.i] === "}" && c--, t.i++;
|
|
1613
|
+
return {
|
|
1614
|
+
kind: "arg",
|
|
1615
|
+
name: a
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
t.i++;
|
|
1619
|
+
let p = {}, h = 0;
|
|
1620
|
+
for (; Ot(e, t), !(t.i >= e.length);) {
|
|
1621
|
+
if (e[t.i] === "}") {
|
|
1622
|
+
t.i++;
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
let c = t.i;
|
|
1626
|
+
for (; t.i < e.length && e[t.i] !== "{" && e[t.i] !== "}" && !Mr(e[t.i]);) t.i++;
|
|
1627
|
+
let g = e.slice(c, t.i);
|
|
1628
|
+
if (g.startsWith("offset:")) h = parseInt(g.slice(7), 10) || 0;
|
|
1629
|
+
else {
|
|
1630
|
+
if (Ot(e, t), e[t.i] !== "{") break;
|
|
1631
|
+
t.i++, p[g] = Dr(e, t, i !== "select" || r, n + 1), e[t.i] === "}" && t.i++;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
return {
|
|
1635
|
+
kind: "branched",
|
|
1636
|
+
type: i,
|
|
1637
|
+
name: a,
|
|
1638
|
+
offset: h,
|
|
1639
|
+
branches: p
|
|
1640
|
+
};
|
|
1641
|
+
}
|
|
1642
|
+
var No = /* @__PURE__ */ new Map(), _o = /* @__PURE__ */ new Map(), Mt = /* @__PURE__ */ new Map();
|
|
1643
|
+
function ko(e, t) {
|
|
1644
|
+
let r = t ? _o : No, n = r.get(e);
|
|
1645
|
+
if (!n) {
|
|
1646
|
+
try {
|
|
1647
|
+
n = new Intl.PluralRules(e, t ? { type: "ordinal" } : void 0);
|
|
1648
|
+
} catch {
|
|
1649
|
+
n = new Intl.PluralRules("en", t ? { type: "ordinal" } : void 0);
|
|
1650
|
+
}
|
|
1651
|
+
r.set(e, n);
|
|
1652
|
+
}
|
|
1653
|
+
return n;
|
|
1654
|
+
}
|
|
1655
|
+
function Lo(e) {
|
|
1656
|
+
let t = Mt.get(e);
|
|
1657
|
+
if (!t) {
|
|
1658
|
+
try {
|
|
1659
|
+
t = new Intl.NumberFormat(e);
|
|
1660
|
+
} catch {
|
|
1661
|
+
t = new Intl.NumberFormat("en");
|
|
1662
|
+
}
|
|
1663
|
+
Mt.set(e, t);
|
|
1664
|
+
}
|
|
1665
|
+
return t;
|
|
1666
|
+
}
|
|
1667
|
+
function ze(e, t, r, n) {
|
|
1668
|
+
let o = "";
|
|
1669
|
+
for (let a of e) {
|
|
1670
|
+
if (typeof a == "string") {
|
|
1671
|
+
o += a;
|
|
1672
|
+
continue;
|
|
1673
|
+
}
|
|
1674
|
+
if (a.kind === "arg") {
|
|
1675
|
+
let h = t?.[a.name];
|
|
1676
|
+
o += h === void 0 ? \`{\${a.name}}\` : String(h);
|
|
1677
|
+
continue;
|
|
1678
|
+
}
|
|
1679
|
+
if (a.kind === "hash") {
|
|
1680
|
+
o += n === void 0 ? "#" : Lo(r).format(n);
|
|
1681
|
+
continue;
|
|
1682
|
+
}
|
|
1683
|
+
let l = t?.[a.name];
|
|
1684
|
+
if (a.type === "select") {
|
|
1685
|
+
let h = (l === void 0 ? void 0 : a.branches[String(l)]) ?? a.branches.other;
|
|
1686
|
+
o += h ? ze(h, t, r, n) : l === void 0 ? \`{\${a.name}}\` : String(l);
|
|
1687
|
+
continue;
|
|
1688
|
+
}
|
|
1689
|
+
let i = typeof l == "number" ? l : Number(l);
|
|
1690
|
+
if (l === void 0 || Number.isNaN(i)) {
|
|
1691
|
+
let h = a.branches.other;
|
|
1692
|
+
o += h ? ze(h, t, r, void 0) : \`{\${a.name}}\`;
|
|
1693
|
+
continue;
|
|
1694
|
+
}
|
|
1695
|
+
let u = a.branches[\`=\${i}\`], p = i - a.offset;
|
|
1696
|
+
if (!u) {
|
|
1697
|
+
let h = ko(r, a.type === "selectordinal").select(p);
|
|
1698
|
+
u = a.branches[h] ?? a.branches.other;
|
|
1699
|
+
}
|
|
1700
|
+
o += u ? ze(u, t, r, p) : String(l);
|
|
1701
|
+
}
|
|
1702
|
+
return o;
|
|
1703
|
+
}
|
|
1704
|
+
new TextDecoder();
|
|
1705
|
+
var Fo;
|
|
1706
|
+
(function(e) {
|
|
1707
|
+
e.MAX_TEXT_LENGTH = 32767;
|
|
1708
|
+
let t = e.MAX_SIGNIFICANT_DIGITS = 15;
|
|
1709
|
+
e.truncateNumberText = function(r) {
|
|
1710
|
+
let n = r.length;
|
|
1711
|
+
if (n <= t) return r;
|
|
1712
|
+
let o = 0, a = null;
|
|
1713
|
+
for (let l = 0; l < n; l++) {
|
|
1714
|
+
let i = r.charCodeAt(l);
|
|
1715
|
+
if (i >= 48 && i <= 57) {
|
|
1716
|
+
if (o === 0 && i === 48) continue;
|
|
1717
|
+
o++, o > t && ((a ??= r.split(""))[l] = "0");
|
|
1718
|
+
} else if ((i === 69 || i === 101) && o > 0) break;
|
|
1719
|
+
}
|
|
1720
|
+
return a === null ? r : a.join("");
|
|
1721
|
+
};
|
|
1722
|
+
})(Fo ||= {});
|
|
1723
|
+
var Pt, et, Po, S, me = {
|
|
1724
|
+
Number: "number",
|
|
1725
|
+
String: "string",
|
|
1726
|
+
Boolean: "boolean",
|
|
1727
|
+
Error: "error",
|
|
1728
|
+
RichData: "richData",
|
|
1729
|
+
Null: "null"
|
|
1730
|
+
}, Ut = {
|
|
1731
|
+
...me,
|
|
1732
|
+
Date: "date"
|
|
1733
|
+
}, jt = {
|
|
1734
|
+
...me,
|
|
1735
|
+
Reference: "reference",
|
|
1736
|
+
Array: "array",
|
|
1737
|
+
Lambda: "lambda",
|
|
1738
|
+
Omitted: "omitted"
|
|
1739
|
+
};
|
|
1740
|
+
(et = Pt ||= {}).Axis = {
|
|
1741
|
+
Column: "column",
|
|
1742
|
+
Row: "row"
|
|
1743
|
+
}, et.AxisSelection = {
|
|
1744
|
+
...Pt.Axis,
|
|
1745
|
+
Both: "both"
|
|
1746
|
+
}, et.Direction = {
|
|
1747
|
+
Up: "up",
|
|
1748
|
+
Down: "down",
|
|
1749
|
+
Left: "left",
|
|
1750
|
+
Right: "right"
|
|
1751
|
+
}, (Po ||= {}).Aggregate = {
|
|
1752
|
+
Count: "count",
|
|
1753
|
+
NumericalCount: "numericalCount",
|
|
1754
|
+
Sum: "sum",
|
|
1755
|
+
Average: "average",
|
|
1756
|
+
StdDev: "stdDev",
|
|
1757
|
+
PopulationStdDev: "stdDevP",
|
|
1758
|
+
Variance: "var",
|
|
1759
|
+
PopulationVariance: "varP",
|
|
1760
|
+
Min: "min",
|
|
1761
|
+
Max: "max"
|
|
1762
|
+
}, (function(e) {
|
|
1763
|
+
let t = e.Code = {
|
|
1764
|
+
Parse: 0,
|
|
1765
|
+
Null: 1,
|
|
1766
|
+
Div0: 2,
|
|
1767
|
+
Value: 3,
|
|
1768
|
+
Ref: 4,
|
|
1769
|
+
Name: 5,
|
|
1770
|
+
Num: 6,
|
|
1771
|
+
NA: 7,
|
|
1772
|
+
GettingData: 8,
|
|
1773
|
+
Spill: 9,
|
|
1774
|
+
Connect: 10,
|
|
1775
|
+
Blocked: 11,
|
|
1776
|
+
Unknown: 12,
|
|
1777
|
+
Field: 13,
|
|
1778
|
+
Calc: 14,
|
|
1779
|
+
Busy: 16,
|
|
1780
|
+
Python: 19,
|
|
1781
|
+
Timeout: 20
|
|
1782
|
+
}, r = e.Label = {
|
|
1783
|
+
Parse: "#PARSE!",
|
|
1784
|
+
Null: "#NULL!",
|
|
1785
|
+
Div0: "#DIV/0!",
|
|
1786
|
+
Value: "#VALUE!",
|
|
1787
|
+
Ref: "#REF!",
|
|
1788
|
+
Name: "#NAME?",
|
|
1789
|
+
Num: "#NUM!",
|
|
1790
|
+
NA: "#N/A",
|
|
1791
|
+
GettingData: "#GETTING_DATA",
|
|
1792
|
+
Spill: "#SPILL!",
|
|
1793
|
+
Connect: "#CONNECT!",
|
|
1794
|
+
Blocked: "#BLOCKED!",
|
|
1795
|
+
Unknown: "#UNKNOWN!",
|
|
1796
|
+
Field: "#FIELD!",
|
|
1797
|
+
Calc: "#CALC!",
|
|
1798
|
+
Busy: "#BUSY!",
|
|
1799
|
+
Python: "#PYTHON!",
|
|
1800
|
+
Timeout: "#TIMEOUT!"
|
|
1801
|
+
};
|
|
1802
|
+
class n extends Error {
|
|
1803
|
+
constructor(N, k, pe, W) {
|
|
1804
|
+
super(pe, W), this._label = k, this._code = N, this.details = W;
|
|
1805
|
+
}
|
|
1806
|
+
static {
|
|
1807
|
+
this.code = S.Code.Unknown;
|
|
1808
|
+
}
|
|
1809
|
+
get isFormulaError() {
|
|
1810
|
+
return !0;
|
|
1811
|
+
}
|
|
1812
|
+
getLabel() {
|
|
1813
|
+
return this._label;
|
|
1814
|
+
}
|
|
1815
|
+
getCode() {
|
|
1816
|
+
return this._code;
|
|
1817
|
+
}
|
|
1818
|
+
equals(N) {
|
|
1819
|
+
return !!N && (this._code === N._code || this._code === N.code);
|
|
1820
|
+
}
|
|
1821
|
+
get [Symbol.toStringTag]() {
|
|
1822
|
+
return "[FormulaError]";
|
|
1823
|
+
}
|
|
1824
|
+
toString() {
|
|
1825
|
+
return this._label;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
e.Known = n;
|
|
1829
|
+
class o extends n {
|
|
1830
|
+
constructor(N, k) {
|
|
1831
|
+
super(t.Parse, r.Parse, N, k);
|
|
1832
|
+
}
|
|
1833
|
+
static {
|
|
1834
|
+
this.code = S.Code.Parse;
|
|
1835
|
+
}
|
|
1836
|
+
getDetails() {
|
|
1837
|
+
let N = this.details;
|
|
1838
|
+
return {
|
|
1839
|
+
line: N?.line ?? 1,
|
|
1840
|
+
column: N?.column ?? 1,
|
|
1841
|
+
offset: N?.offset ?? 0,
|
|
1842
|
+
length: N?.length ?? 0
|
|
1843
|
+
};
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
e.Parse = o;
|
|
1847
|
+
class a extends n {
|
|
1848
|
+
constructor(N, k) {
|
|
1849
|
+
super(t.Null, r.Null, N, k);
|
|
1850
|
+
}
|
|
1851
|
+
static {
|
|
1852
|
+
this.code = S.Code.Null;
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
e.Null = a;
|
|
1856
|
+
class l extends n {
|
|
1857
|
+
constructor(N, k) {
|
|
1858
|
+
super(t.Div0, r.Div0, N, k);
|
|
1859
|
+
}
|
|
1860
|
+
static {
|
|
1861
|
+
this.code = S.Code.Div0;
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
e.Div0 = l;
|
|
1865
|
+
class i extends n {
|
|
1866
|
+
constructor(N, k) {
|
|
1867
|
+
super(t.Value, r.Value, N, k);
|
|
1868
|
+
}
|
|
1869
|
+
static {
|
|
1870
|
+
this.code = S.Code.Value;
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
e.Value = i;
|
|
1874
|
+
class u extends n {
|
|
1875
|
+
constructor(N, k) {
|
|
1876
|
+
super(t.Ref, r.Ref, N, k);
|
|
1877
|
+
}
|
|
1878
|
+
static {
|
|
1879
|
+
this.code = S.Code.Ref;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
e.Ref = u;
|
|
1883
|
+
class p extends n {
|
|
1884
|
+
constructor(N, k) {
|
|
1885
|
+
super(t.Name, r.Name, N, k);
|
|
1886
|
+
}
|
|
1887
|
+
static {
|
|
1888
|
+
this.code = S.Code.Name;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
e.Name = p;
|
|
1892
|
+
class h extends n {
|
|
1893
|
+
constructor(N, k) {
|
|
1894
|
+
super(t.Num, r.Num, N, k);
|
|
1895
|
+
}
|
|
1896
|
+
static {
|
|
1897
|
+
this.code = S.Code.Num;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
e.Num = h;
|
|
1901
|
+
class c extends n {
|
|
1902
|
+
constructor(N, k) {
|
|
1903
|
+
super(t.NA, r.NA, N, k);
|
|
1904
|
+
}
|
|
1905
|
+
static {
|
|
1906
|
+
this.code = S.Code.NA;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
e.NA = c;
|
|
1910
|
+
class g extends n {
|
|
1911
|
+
constructor(N, k) {
|
|
1912
|
+
super(t.GettingData, r.GettingData, N, k);
|
|
1913
|
+
}
|
|
1914
|
+
static {
|
|
1915
|
+
this.code = S.Code.GettingData;
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
e.GettingData = g;
|
|
1919
|
+
class T extends n {
|
|
1920
|
+
constructor(N, k) {
|
|
1921
|
+
super(t.Spill, r.Spill, N, k);
|
|
1922
|
+
}
|
|
1923
|
+
static {
|
|
1924
|
+
this.code = S.Code.Spill;
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
e.Spill = T;
|
|
1928
|
+
class I extends n {
|
|
1929
|
+
constructor(N, k) {
|
|
1930
|
+
super(t.Connect, r.Connect, N, k);
|
|
1931
|
+
}
|
|
1932
|
+
static {
|
|
1933
|
+
this.code = S.Code.Connect;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
e.Connect = I;
|
|
1937
|
+
class M extends n {
|
|
1938
|
+
constructor(N, k) {
|
|
1939
|
+
super(t.Blocked, r.Blocked, N, k);
|
|
1940
|
+
}
|
|
1941
|
+
static {
|
|
1942
|
+
this.code = S.Code.Blocked;
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
e.Blocked = M;
|
|
1946
|
+
class q extends n {
|
|
1947
|
+
constructor(N, k) {
|
|
1948
|
+
super(t.Unknown, r.Unknown, N, k);
|
|
1949
|
+
}
|
|
1950
|
+
static {
|
|
1951
|
+
this.code = S.Code.Unknown;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
e.Unknown = q;
|
|
1955
|
+
class v extends n {
|
|
1956
|
+
constructor(N, k) {
|
|
1957
|
+
super(t.Field, r.Field, N, k);
|
|
1958
|
+
}
|
|
1959
|
+
static {
|
|
1960
|
+
this.code = S.Code.Field;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
e.Field = v;
|
|
1964
|
+
class C extends n {
|
|
1965
|
+
constructor(N, k) {
|
|
1966
|
+
super(t.Calc, r.Calc, N, k);
|
|
1967
|
+
}
|
|
1968
|
+
static {
|
|
1969
|
+
this.code = S.Code.Calc;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
e.Calc = C;
|
|
1973
|
+
class R extends n {
|
|
1974
|
+
constructor(N, k) {
|
|
1975
|
+
super(t.Busy, r.Busy, N, k);
|
|
1976
|
+
}
|
|
1977
|
+
static {
|
|
1978
|
+
this.code = S.Code.Busy;
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
e.Busy = R;
|
|
1982
|
+
class U extends n {
|
|
1983
|
+
constructor(N, k) {
|
|
1984
|
+
super(t.Python, r.Python, N, k);
|
|
1985
|
+
}
|
|
1986
|
+
static {
|
|
1987
|
+
this.code = S.Code.Python;
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
e.Python = U;
|
|
1991
|
+
class Z extends n {
|
|
1992
|
+
constructor(N, k) {
|
|
1993
|
+
super(t.Timeout, r.Timeout, N, k);
|
|
1994
|
+
}
|
|
1995
|
+
static {
|
|
1996
|
+
this.code = S.Code.Timeout;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
e.Timeout = Z;
|
|
2000
|
+
})(S ||= {});
|
|
2001
|
+
var te = {};
|
|
2002
|
+
te[S.Code.Parse] = S.Parse, te[S.Code.Null] = S.Null, te[S.Code.Div0] = S.Div0, te[S.Code.Value] = S.Value, te[S.Code.Ref] = S.Ref, te[S.Code.Name] = S.Name, te[S.Code.Num] = S.Num, te[S.Code.NA] = S.NA, te[S.Code.GettingData] = S.GettingData, te[S.Code.Spill] = S.Spill, te[S.Code.Connect] = S.Connect, te[S.Code.Blocked] = S.Blocked, te[S.Code.Unknown] = S.Unknown, te[S.Code.Field] = S.Field, te[S.Code.Calc] = S.Calc, te[S.Code.Busy] = S.Busy, te[S.Code.Python] = S.Python, te[S.Code.Timeout] = S.Timeout;
|
|
2003
|
+
var Fr = /* @__PURE__ */ new Map(), Pr = /* @__PURE__ */ new Map(), Ur = /* @__PURE__ */ new Map(), jr = /* @__PURE__ */ new Map(), Bt = Object.keys(te);
|
|
2004
|
+
for (let e = 0; e < Bt.length; e++) {
|
|
2005
|
+
let t = te[Bt[e]], r = new t();
|
|
2006
|
+
Ur.set(r.getLabel(), t), jr.set(r.getCode(), t), Fr.set(r.getLabel(), r), Pr.set(r.getCode(), r);
|
|
2007
|
+
}
|
|
2008
|
+
(function(e) {
|
|
2009
|
+
let t = e.getBuiltInByCode = (r) => Pr.get(r);
|
|
2010
|
+
e.BuiltIn = {
|
|
2011
|
+
Parse: t(S.Code.Parse),
|
|
2012
|
+
Null: t(S.Code.Null),
|
|
2013
|
+
Div0: t(S.Code.Div0),
|
|
2014
|
+
Value: t(S.Code.Value),
|
|
2015
|
+
Ref: t(S.Code.Ref),
|
|
2016
|
+
Name: t(S.Code.Name),
|
|
2017
|
+
Num: t(S.Code.Num),
|
|
2018
|
+
NA: t(S.Code.NA),
|
|
2019
|
+
GettingData: t(S.Code.GettingData),
|
|
2020
|
+
Spill: t(S.Code.Spill),
|
|
2021
|
+
Connect: t(S.Code.Connect),
|
|
2022
|
+
Blocked: t(S.Code.Blocked),
|
|
2023
|
+
Unknown: t(S.Code.Unknown),
|
|
2024
|
+
Field: t(S.Code.Field),
|
|
2025
|
+
Calc: t(S.Code.Calc),
|
|
2026
|
+
Busy: t(S.Code.Busy),
|
|
2027
|
+
Python: t(S.Code.Python),
|
|
2028
|
+
Timeout: t(S.Code.Timeout)
|
|
2029
|
+
}, e.newTypedError = (r, n, o) => {
|
|
2030
|
+
let a;
|
|
2031
|
+
return a = typeof r == "string" ? Ur.get(r) : jr.get(r), a ||= S.Unknown, new a(n, o);
|
|
2032
|
+
}, e.getBuiltInByLabel = (r) => Fr.get(r), e.isError = function(r, n) {
|
|
2033
|
+
return !!r && r.isFormulaError === !0 && (n === void 0 || r.getCode() === n);
|
|
2034
|
+
};
|
|
2035
|
+
})(S ||= {});
|
|
2036
|
+
var Uo = class {
|
|
2037
|
+
createRange(e, t, r) {
|
|
2038
|
+
throw new oe();
|
|
2039
|
+
}
|
|
2040
|
+
flattenAreas(e) {
|
|
2041
|
+
throw new oe();
|
|
2042
|
+
}
|
|
2043
|
+
getReference(e, t) {
|
|
2044
|
+
throw new oe();
|
|
2045
|
+
}
|
|
2046
|
+
getResizedReference(e, t, r) {
|
|
2047
|
+
throw new oe();
|
|
2048
|
+
}
|
|
2049
|
+
getNumberFormat(e, t) {
|
|
2050
|
+
throw new oe();
|
|
2051
|
+
}
|
|
2052
|
+
fromSerialDate(e, t) {
|
|
2053
|
+
throw new oe();
|
|
2054
|
+
}
|
|
2055
|
+
toSerialDate(e, t) {
|
|
2056
|
+
throw new oe();
|
|
2057
|
+
}
|
|
2058
|
+
getDateParts(e, t) {
|
|
2059
|
+
throw new oe();
|
|
2060
|
+
}
|
|
2061
|
+
getSerialDate(e, t, r, n, o, a, l) {
|
|
2062
|
+
throw new oe();
|
|
2063
|
+
}
|
|
2064
|
+
getNow() {
|
|
2065
|
+
throw new oe();
|
|
2066
|
+
}
|
|
2067
|
+
getRandom() {
|
|
2068
|
+
return Math.random();
|
|
2069
|
+
}
|
|
2070
|
+
getValueAt(e, t, r, n) {
|
|
2071
|
+
return null;
|
|
2072
|
+
}
|
|
2073
|
+
getEntireCoords() {
|
|
2074
|
+
return Kr;
|
|
2075
|
+
}
|
|
2076
|
+
isValidDate(e, t) {
|
|
2077
|
+
return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]" ? !isNaN(e.getTime()) : !t && typeof e == "number" && !(e < 0 || e > Bo);
|
|
2078
|
+
}
|
|
2079
|
+
getRow() {
|
|
2080
|
+
return 0;
|
|
2081
|
+
}
|
|
2082
|
+
getColumn() {
|
|
2083
|
+
return 0;
|
|
2084
|
+
}
|
|
2085
|
+
isImplicitIntersect() {
|
|
2086
|
+
return !1;
|
|
2087
|
+
}
|
|
2088
|
+
getFormulaAt(e, t, r) {
|
|
2089
|
+
return null;
|
|
2090
|
+
}
|
|
2091
|
+
getSpillAt(e, t, r) {
|
|
2092
|
+
return null;
|
|
2093
|
+
}
|
|
2094
|
+
getSheetIndex(e) {
|
|
2095
|
+
return -1;
|
|
2096
|
+
}
|
|
2097
|
+
getSheetCount() {
|
|
2098
|
+
return 1;
|
|
2099
|
+
}
|
|
2100
|
+
markVolatile() {}
|
|
2101
|
+
formatResults(e) {}
|
|
2102
|
+
filterHidden(e, t) {
|
|
2103
|
+
return e;
|
|
2104
|
+
}
|
|
2105
|
+
filterTotals(e) {
|
|
2106
|
+
return e;
|
|
2107
|
+
}
|
|
2108
|
+
getFunction(e) {
|
|
2109
|
+
return null;
|
|
2110
|
+
}
|
|
2111
|
+
getAddress(e, t) {
|
|
2112
|
+
throw new oe();
|
|
2113
|
+
}
|
|
2114
|
+
parseAsSerialDate(e, t) {
|
|
2115
|
+
throw new oe();
|
|
2116
|
+
}
|
|
2117
|
+
parseAsDate(e, t) {
|
|
2118
|
+
throw new oe();
|
|
2119
|
+
}
|
|
2120
|
+
parseAsNumber(e, t) {
|
|
2121
|
+
throw new oe();
|
|
2122
|
+
}
|
|
2123
|
+
createCriteria(e, t) {
|
|
2124
|
+
throw new oe();
|
|
2125
|
+
}
|
|
2126
|
+
parseAsLiteral(e) {
|
|
2127
|
+
let t = e.toUpperCase();
|
|
2128
|
+
return t === "TRUE" || t !== "FALSE" && S.getBuiltInByLabel(t);
|
|
2129
|
+
}
|
|
2130
|
+
toText(e) {
|
|
2131
|
+
return typeof e == "string" ? e : e == null ? "" : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : e?.isFormulaError ? e.getLabel() : String(e);
|
|
2132
|
+
}
|
|
2133
|
+
compare(e, t, r) {
|
|
2134
|
+
if (e === t) return 0;
|
|
2135
|
+
let n = Kt(e), o = Kt(t);
|
|
2136
|
+
return n === o ? e < t ? -1 : +(e > t) : n < o ? -1 : 1;
|
|
2137
|
+
}
|
|
2138
|
+
getRuntime() {
|
|
2139
|
+
return jo;
|
|
2140
|
+
}
|
|
2141
|
+
getArgs() {
|
|
2142
|
+
throw new oe(Br);
|
|
2143
|
+
}
|
|
2144
|
+
}, Kt = (e) => {
|
|
2145
|
+
if (e == null) return 0;
|
|
2146
|
+
switch (typeof e) {
|
|
2147
|
+
case "number": return 1;
|
|
2148
|
+
case "string": return 2;
|
|
2149
|
+
case "boolean": return 3;
|
|
2150
|
+
default: return 4;
|
|
2151
|
+
}
|
|
2152
|
+
}, Br = "FormulaContext.getArgs() is only valid while a function body is running", oe = class extends Error {
|
|
2153
|
+
constructor(e = "Not implemented in StubbedFormulaContext") {
|
|
2154
|
+
super(e), this.name = "NotImplementedError";
|
|
2155
|
+
}
|
|
2156
|
+
}, Kr = Object.freeze({
|
|
2157
|
+
colStart: 0,
|
|
2158
|
+
rowStart: 0,
|
|
2159
|
+
colEnd: 2 ** 14 - 1,
|
|
2160
|
+
rowEnd: 2 ** 20 - 1
|
|
2161
|
+
}), jo = {
|
|
2162
|
+
isDate1904: () => !1,
|
|
2163
|
+
getLocale: () => zt.tag,
|
|
2164
|
+
getLocaleProfile: () => zt,
|
|
2165
|
+
isR1C1: () => !1,
|
|
2166
|
+
getNow: () => 0,
|
|
2167
|
+
getRandom: () => Math.random(),
|
|
2168
|
+
getLocation: () => "unknown",
|
|
2169
|
+
getVersion: () => "1.0.0",
|
|
2170
|
+
getOS: () => "unknown",
|
|
2171
|
+
getUser: () => "unidentified",
|
|
2172
|
+
getDescription: () => "Stubbed Formula Context"
|
|
2173
|
+
}, Bo = 2958465, Pe = new Uo(), Ko = class {
|
|
2174
|
+
constructor() {
|
|
2175
|
+
this._scope = Pe, this._argsFn = null;
|
|
2176
|
+
}
|
|
2177
|
+
_setScope(e) {
|
|
2178
|
+
this._scope = e ?? Pe;
|
|
2179
|
+
}
|
|
2180
|
+
_getScope() {
|
|
2181
|
+
return this._scope;
|
|
2182
|
+
}
|
|
2183
|
+
_setArgsProvider(e) {
|
|
2184
|
+
this._argsFn = e;
|
|
2185
|
+
}
|
|
2186
|
+
getNumberFormat(e, t) {
|
|
2187
|
+
return this._getScope().getNumberFormat(e, t);
|
|
2188
|
+
}
|
|
2189
|
+
getEntireCoords() {
|
|
2190
|
+
return this._getScope().getEntireCoords() ?? Kr;
|
|
2191
|
+
}
|
|
2192
|
+
parseAsSerialDate(e, t) {
|
|
2193
|
+
return this._getScope().parseAsSerialDate(e, t);
|
|
2194
|
+
}
|
|
2195
|
+
parseAsDate(e, t) {
|
|
2196
|
+
return this._getScope().parseAsDate(e, t);
|
|
2197
|
+
}
|
|
2198
|
+
parseAsNumber(e, t) {
|
|
2199
|
+
return this._getScope().parseAsNumber(e, t);
|
|
2200
|
+
}
|
|
2201
|
+
createCriteria(e, t) {
|
|
2202
|
+
return this._getScope().createCriteria(e, t);
|
|
2203
|
+
}
|
|
2204
|
+
parseAsLiteral(e) {
|
|
2205
|
+
let t = this._getScope();
|
|
2206
|
+
return t.parseAsLiteral ? t.parseAsLiteral(e) : Pe.parseAsLiteral(e);
|
|
2207
|
+
}
|
|
2208
|
+
toText(e) {
|
|
2209
|
+
return this._getScope().toText(e);
|
|
2210
|
+
}
|
|
2211
|
+
isValidDate(e, t = !1) {
|
|
2212
|
+
return this._getScope().isValidDate(e, t);
|
|
2213
|
+
}
|
|
2214
|
+
fromSerialDate(e, t = !1) {
|
|
2215
|
+
return this._getScope().fromSerialDate(e, t);
|
|
2216
|
+
}
|
|
2217
|
+
toSerialDate(e, t = !1) {
|
|
2218
|
+
return this._getScope().toSerialDate(e, t);
|
|
2219
|
+
}
|
|
2220
|
+
getDateParts(e, t) {
|
|
2221
|
+
return this._getScope().getDateParts(e, t);
|
|
2222
|
+
}
|
|
2223
|
+
getSerialDate(e, t, r, n = 0, o = 0, a = 0, l = 0) {
|
|
2224
|
+
return this._getScope().getSerialDate(e, t, r, n, o, a, l);
|
|
2225
|
+
}
|
|
2226
|
+
getNow() {
|
|
2227
|
+
return this._getScope().getNow();
|
|
2228
|
+
}
|
|
2229
|
+
getRandom() {
|
|
2230
|
+
return this._getScope().getRandom?.() ?? Math.random();
|
|
2231
|
+
}
|
|
2232
|
+
createRange(e, t, r) {
|
|
2233
|
+
return this._getScope().createRange(e, t, r);
|
|
2234
|
+
}
|
|
2235
|
+
flattenAreas(e) {
|
|
2236
|
+
if (!Array.isArray(e)) return e;
|
|
2237
|
+
let t = [];
|
|
2238
|
+
for (let r = 0; r < e.length; r++) {
|
|
2239
|
+
let n = e[r], { rows: o, columns: a } = n.getShape();
|
|
2240
|
+
for (let l = 0; l < o; l++) for (let i = 0; i < a; i++) t.push(n.getValueAt(l, i));
|
|
2241
|
+
}
|
|
2242
|
+
return this.createRange(t.length, 1, (r, n) => t[n.rowIndex]);
|
|
2243
|
+
}
|
|
2244
|
+
getRow() {
|
|
2245
|
+
return this._getScope().getRow?.() ?? 0;
|
|
2246
|
+
}
|
|
2247
|
+
getColumn() {
|
|
2248
|
+
return this._getScope().getColumn?.() ?? 0;
|
|
2249
|
+
}
|
|
2250
|
+
isImplicitIntersect() {
|
|
2251
|
+
return this._getScope().isImplicitIntersect?.() ?? !1;
|
|
2252
|
+
}
|
|
2253
|
+
getReference(e, t) {
|
|
2254
|
+
return this._getScope().getReference(e, t);
|
|
2255
|
+
}
|
|
2256
|
+
getResizedReference(e, t, r) {
|
|
2257
|
+
return this._getScope().getResizedReference(e, t, r);
|
|
2258
|
+
}
|
|
2259
|
+
getValueAt(e, t, r) {
|
|
2260
|
+
return this._getScope().getValueAt(e, t, r);
|
|
2261
|
+
}
|
|
2262
|
+
getFormulaAt(e, t, r) {
|
|
2263
|
+
return this._getScope().getFormulaAt?.(e, t, r) ?? null;
|
|
2264
|
+
}
|
|
2265
|
+
getSpillAt(e, t, r) {
|
|
2266
|
+
return this._getScope().getSpillAt?.(e, t, r) ?? null;
|
|
2267
|
+
}
|
|
2268
|
+
getSheetIndex(e) {
|
|
2269
|
+
return this._getScope().getSheetIndex?.(e) ?? -1;
|
|
2270
|
+
}
|
|
2271
|
+
getSheetCount() {
|
|
2272
|
+
return this._getScope().getSheetCount?.() ?? 1;
|
|
2273
|
+
}
|
|
2274
|
+
markVolatile() {
|
|
2275
|
+
this._getScope().markVolatile?.();
|
|
2276
|
+
}
|
|
2277
|
+
formatResults(e) {
|
|
2278
|
+
this._getScope().formatResults?.(e);
|
|
2279
|
+
}
|
|
2280
|
+
filterHidden(e, t) {
|
|
2281
|
+
return this._getScope().filterHidden?.(e, t) ?? e;
|
|
2282
|
+
}
|
|
2283
|
+
filterTotals(e) {
|
|
2284
|
+
return this._getScope().filterTotals?.(e) ?? e;
|
|
2285
|
+
}
|
|
2286
|
+
getFunction(e) {
|
|
2287
|
+
return this._getScope().getFunction?.(e) ?? null;
|
|
2288
|
+
}
|
|
2289
|
+
getAddress(e, t) {
|
|
2290
|
+
return this._getScope().getAddress(e, t);
|
|
2291
|
+
}
|
|
2292
|
+
compare(e, t, r) {
|
|
2293
|
+
return this._getScope().compare?.(e, t, r) ?? Pe.compare(e, t, r);
|
|
2294
|
+
}
|
|
2295
|
+
getRuntime() {
|
|
2296
|
+
return this._getScope().getRuntime();
|
|
2297
|
+
}
|
|
2298
|
+
getArgs() {
|
|
2299
|
+
let e = this._argsFn, t = e ? e() : null;
|
|
2300
|
+
if (!t) throw new oe(Br);
|
|
2301
|
+
return t;
|
|
2302
|
+
}
|
|
2303
|
+
get [Symbol.toStringTag]() {
|
|
2304
|
+
return "[FormulaContext]";
|
|
2305
|
+
}
|
|
2306
|
+
toString() {
|
|
2307
|
+
return this._getScope()?.toString?.() ?? "{STUB SCOPE}";
|
|
2308
|
+
}
|
|
2309
|
+
}, zt = Object.freeze({
|
|
2310
|
+
tag: "en-US",
|
|
2311
|
+
numberingSystem: "latn",
|
|
2312
|
+
decimal: ".",
|
|
2313
|
+
group: ",",
|
|
2314
|
+
grouping: [3],
|
|
2315
|
+
minusSign: "-",
|
|
2316
|
+
percentSign: "%",
|
|
2317
|
+
permilleSign: "‰",
|
|
2318
|
+
currencyCode: "USD",
|
|
2319
|
+
currencySymbol: "$",
|
|
2320
|
+
currencyDisplay: "symbol",
|
|
2321
|
+
currencyPosition: "before",
|
|
2322
|
+
currencySpacing: "tight",
|
|
2323
|
+
date: Object.freeze({
|
|
2324
|
+
calendar: "gregory",
|
|
2325
|
+
short: "M/d/yy",
|
|
2326
|
+
medium: "MMM d, y",
|
|
2327
|
+
long: "MMMM d, y",
|
|
2328
|
+
timeShort: "h:mm a",
|
|
2329
|
+
timeLong: "h:mm:ss a",
|
|
2330
|
+
am: "AM",
|
|
2331
|
+
pm: "PM",
|
|
2332
|
+
firstDay: 0,
|
|
2333
|
+
weekend: [6, 0],
|
|
2334
|
+
monthsWide: [
|
|
2335
|
+
"January",
|
|
2336
|
+
"February",
|
|
2337
|
+
"March",
|
|
2338
|
+
"April",
|
|
2339
|
+
"May",
|
|
2340
|
+
"June",
|
|
2341
|
+
"July",
|
|
2342
|
+
"August",
|
|
2343
|
+
"September",
|
|
2344
|
+
"October",
|
|
2345
|
+
"November",
|
|
2346
|
+
"December"
|
|
2347
|
+
],
|
|
2348
|
+
monthsAbbr: [
|
|
2349
|
+
"Jan",
|
|
2350
|
+
"Feb",
|
|
2351
|
+
"Mar",
|
|
2352
|
+
"Apr",
|
|
2353
|
+
"May",
|
|
2354
|
+
"Jun",
|
|
2355
|
+
"Jul",
|
|
2356
|
+
"Aug",
|
|
2357
|
+
"Sep",
|
|
2358
|
+
"Oct",
|
|
2359
|
+
"Nov",
|
|
2360
|
+
"Dec"
|
|
2361
|
+
],
|
|
2362
|
+
weekdaysWide: [
|
|
2363
|
+
"Sunday",
|
|
2364
|
+
"Monday",
|
|
2365
|
+
"Tuesday",
|
|
2366
|
+
"Wednesday",
|
|
2367
|
+
"Thursday",
|
|
2368
|
+
"Friday",
|
|
2369
|
+
"Saturday"
|
|
2370
|
+
],
|
|
2371
|
+
weekdaysAbbr: [
|
|
2372
|
+
"Sun",
|
|
2373
|
+
"Mon",
|
|
2374
|
+
"Tue",
|
|
2375
|
+
"Wed",
|
|
2376
|
+
"Thu",
|
|
2377
|
+
"Fri",
|
|
2378
|
+
"Sat"
|
|
2379
|
+
],
|
|
2380
|
+
hour12: !0
|
|
2381
|
+
}),
|
|
2382
|
+
listSeparator: ",",
|
|
2383
|
+
csvDelimiter: ",",
|
|
2384
|
+
rtl: !1,
|
|
2385
|
+
collator: Object.freeze({
|
|
2386
|
+
sensitivity: "base",
|
|
2387
|
+
numeric: !0
|
|
2388
|
+
})
|
|
2389
|
+
});
|
|
2390
|
+
new Ko();
|
|
2391
|
+
const w = Object.freeze({
|
|
2392
|
+
/** Exported function has no body. */
|
|
2393
|
+
NoBody: "SXL1001",
|
|
2394
|
+
/** Anonymous exported function is not allowed. */
|
|
2395
|
+
Anonymous: "SXL1002",
|
|
2396
|
+
/** Internal parse failure while analyzing the module. */
|
|
2397
|
+
ParseError: "SXL1003",
|
|
2398
|
+
/** Invalid parameter type. */
|
|
2399
|
+
InvalidParamType: "SXL2001",
|
|
2400
|
+
/** Invalid return type. */
|
|
2401
|
+
InvalidReturnType: "SXL2002",
|
|
2402
|
+
/** \`undefined\` / \`null\` / \`void\` is not valid as an input type. */
|
|
2403
|
+
UndefinedInput: "SXL2003",
|
|
2404
|
+
/** A type annotation is required but missing. */
|
|
2405
|
+
MissingType: "SXL2004",
|
|
2406
|
+
/** An \`Array\` must be typed (e.g. \`number[]\`, not bare \`[]\`). */
|
|
2407
|
+
UntypedArray: "SXL2005",
|
|
2408
|
+
/** A generic type must be supplied exactly one type argument. */
|
|
2409
|
+
GenericArity: "SXL2006",
|
|
2410
|
+
/** A return type cannot combine multiple modifiers (e.g. async + stream). */
|
|
2411
|
+
MultipleModifiers: "SXL2007",
|
|
2412
|
+
/** A context parameter must be the first parameter. */
|
|
2413
|
+
ContextNotFirst: "SXL2010",
|
|
2414
|
+
/** More than one \`Lambda\` parameter. */
|
|
2415
|
+
MultipleLambda: "SXL2020",
|
|
2416
|
+
/** A \`Lambda\` parameter must be the last parameter. */
|
|
2417
|
+
LambdaNotLast: "SXL2021",
|
|
2418
|
+
/** A \`Lambda\` parameter/return scalar type mismatch. */
|
|
2419
|
+
LambdaScalarMismatch: "SXL2022",
|
|
2420
|
+
/** \`Lambda\` is not valid as a return type. */
|
|
2421
|
+
LambdaReturn: "SXL2023",
|
|
2422
|
+
/** A bare function type is not valid as a return type. */
|
|
2423
|
+
FunctionReturn: "SXL2024",
|
|
2424
|
+
/** A \`Lambda\` function type has the wrong number of parameters. */
|
|
2425
|
+
LambdaArity: "SXL2025",
|
|
2426
|
+
/** Arrays of more than 2 dimensions are not supported. */
|
|
2427
|
+
ArrayDepth: "SXL2030",
|
|
2428
|
+
/** \`Repeating<T>\` used somewhere it cannot be (a return type, a rest parameter, nested in an array). */
|
|
2429
|
+
RepeatingPosition: "SXL2040",
|
|
2430
|
+
/** More than one \`Repeating<T>\` parameter. */
|
|
2431
|
+
MultipleRepeating: "SXL2041",
|
|
2432
|
+
/** A \`Repeating<T>\` group's slots are malformed (unlabelled tuple member, or a 1-element tuple). */
|
|
2433
|
+
RepeatingSlots: "SXL2042",
|
|
2434
|
+
/** An optional parameter/slot where a repeating group does not allow one. */
|
|
2435
|
+
RepeatingOptional: "SXL2043",
|
|
2436
|
+
/** \`Repeating<T, Max>\`'s maximum argument count is not a whole number in range. */
|
|
2437
|
+
RepeatingMax: "SXL2044",
|
|
2438
|
+
/** An enum mixes number and string members. */
|
|
2439
|
+
EnumMixed: "SXL2050",
|
|
2440
|
+
/** An enum member is not a constant number or string. */
|
|
2441
|
+
EnumMemberNotConstant: "SXL2051",
|
|
2442
|
+
/** A parameter type that is not declared in this module, so an enum behind it cannot be read. */
|
|
2443
|
+
EnumNotLocal: "SXL2052",
|
|
2444
|
+
/** An \`as const\` object used as a parameter type without its same-name type alias. */
|
|
2445
|
+
EnumMissingAlias: "SXL2053",
|
|
2446
|
+
/** An enum where no single argument is coerced to it (\`IRange<E>\`, \`Lazy<E>\`). */
|
|
2447
|
+
EnumPosition: "SXL2054",
|
|
2448
|
+
/** \`Omittable<E, V>\` whose \`V\` is neither a member of \`E\` nor \`null\`. */
|
|
2449
|
+
EnumOmittedValue: "SXL2055",
|
|
2450
|
+
/** No exported functions found in the module. */
|
|
2451
|
+
NoExports: "SXL3001",
|
|
2452
|
+
/** A \`@param\` tag references a parameter that does not exist. */
|
|
2453
|
+
UnknownParam: "SXL3002",
|
|
2454
|
+
/** A calculation function takes a built-in function's name. */
|
|
2455
|
+
BuiltInName: "SXL3003",
|
|
2456
|
+
/** A \`@returnKind\` tag names a value kind that does not exist, or names none at all. */
|
|
2457
|
+
UnknownReturnKind: "SXL3005",
|
|
2458
|
+
/** A calculation function's name (its \`@name\`, or else its own) is not a name a formula can call. */
|
|
2459
|
+
InvalidName: "SXL3006",
|
|
2460
|
+
/** Two functions in one module register under the same name (an \`@name\` repeats another's). */
|
|
2461
|
+
DuplicateName: "SXL3007",
|
|
2462
|
+
/** A function has no JSDoc description. */
|
|
2463
|
+
MissingSummary: "SXL9001",
|
|
2464
|
+
/** A \`@param\` is missing a description. */
|
|
2465
|
+
MissingParamDescription: "SXL9002",
|
|
2466
|
+
/**
|
|
2467
|
+
* Missing \`@returns\` on a non-void function.
|
|
2468
|
+
* @deprecated Retained for code stability but no longer emitted - Excel-style tooltips describe
|
|
2469
|
+
* behavior via the summary, so a standalone \`@returns\` warning is noise.
|
|
2470
|
+
*/
|
|
2471
|
+
MissingReturns: "SXL9003",
|
|
2472
|
+
/** Two enum members share a value. */
|
|
2473
|
+
EnumDuplicateValue: "SXL9004",
|
|
2474
|
+
/** An enum member has no doc comment. */
|
|
2475
|
+
EnumMemberUndocumented: "SXL9005"
|
|
2476
|
+
}), zo = [
|
|
2477
|
+
{
|
|
2478
|
+
name: "param",
|
|
2479
|
+
group: "jsdoc",
|
|
2480
|
+
description: "Document a parameter. A string union type becomes a dropdown of allowed options.",
|
|
2481
|
+
snippet: "param \${1:name} \${2:description}"
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
name: "returns",
|
|
2485
|
+
aliases: ["return"],
|
|
2486
|
+
group: "jsdoc",
|
|
2487
|
+
description: "Describe the return value."
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
name: "category",
|
|
2491
|
+
group: "sheetxl",
|
|
2492
|
+
description: "Group the function under a category in the function list.",
|
|
2493
|
+
snippet: "category \${1:name}"
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
name: "name",
|
|
2497
|
+
group: "sheetxl",
|
|
2498
|
+
description: "A name an identifier cannot spell: the name formulas call a function by (MY.FUNC), or an enum member's label.",
|
|
2499
|
+
snippet: "name \${1:NAME}"
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
name: "description",
|
|
2503
|
+
group: "sheetxl",
|
|
2504
|
+
description: "A longer description of the function."
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
name: "deprecated",
|
|
2508
|
+
group: "sheetxl",
|
|
2509
|
+
standalone: !0,
|
|
2510
|
+
description: "Mark the function as deprecated (optionally with a reason)."
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
name: "hidden",
|
|
2514
|
+
group: "sheetxl",
|
|
2515
|
+
standalone: !0,
|
|
2516
|
+
description: "Hide the function from the function list."
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
name: "returnkind",
|
|
2520
|
+
group: "sheetxl",
|
|
2521
|
+
description: "Declare the value kind of the return (a ValueKind word, e.g. \`number\`, \`array\`, \`reference\`) where the type spelling cannot say it (a union return collapses to any).",
|
|
2522
|
+
snippet: "returnKind \${1:number}"
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
name: "example",
|
|
2526
|
+
group: "jsdoc",
|
|
2527
|
+
description: "Provide a usage example."
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
name: "see",
|
|
2531
|
+
group: "jsdoc",
|
|
2532
|
+
description: "Reference a related function or link."
|
|
2533
|
+
}
|
|
2534
|
+
], Vo = (() => {
|
|
2535
|
+
const e = /* @__PURE__ */ new Map();
|
|
2536
|
+
for (const t of zo) if (e.set(t.name, t), t.aliases) for (const r of t.aliases) e.set(r, t);
|
|
2537
|
+
return e;
|
|
2538
|
+
})();
|
|
2539
|
+
function Xo(e) {
|
|
2540
|
+
if (!e) return;
|
|
2541
|
+
const t = (e.startsWith("@") ? e.slice(1) : e).toLowerCase();
|
|
2542
|
+
return Vo.get(t);
|
|
2543
|
+
}
|
|
2544
|
+
function Go(e) {
|
|
2545
|
+
return Xo(e)?.standalone === !0;
|
|
2546
|
+
}
|
|
2547
|
+
const ct = /* @__PURE__ */ new Map([["IReferenceRange", "p"], ["IRange", "r"]]), tt = new Set(Object.values(jt).filter((e) => e !== jt.Omitted)), mt = /* @__PURE__ */ new Map([
|
|
2548
|
+
["IWorkbook", "workbook"],
|
|
2549
|
+
["ISheet", "sheet"],
|
|
2550
|
+
["ICellRanges", "ranges"],
|
|
2551
|
+
["ICellRange", "range"]
|
|
2552
|
+
]), qo = Array.from(mt.keys()), gt = (e, t) => {
|
|
2553
|
+
Array.from(t.keys()).forEach((r) => {
|
|
2554
|
+
const n = t.get(r);
|
|
2555
|
+
t.set(\`\${e}.\${r}\`, n);
|
|
2556
|
+
});
|
|
2557
|
+
}, Ho = /* @__PURE__ */ new Map([
|
|
2558
|
+
["Scalar", "*"],
|
|
2559
|
+
["Lambda", "l"],
|
|
2560
|
+
["FormulaError.Known", me.Error],
|
|
2561
|
+
["Date", Ut.Date],
|
|
2562
|
+
["IRichData", Ut.RichData]
|
|
2563
|
+
]), zr = /* @__PURE__ */ new Map([["Repeating", "repeating"]]), Wo = /* @__PURE__ */ new Set(["Flatten", "SheetXL.Flatten"]), Vr = /* @__PURE__ */ new Set(["AcceptError"]), Xr = /* @__PURE__ */ new Set(["Omittable"]), Gr = /* @__PURE__ */ new Set(["NoLift"]), qr = /* @__PURE__ */ new Set(["NoFilter"]), Hr = /* @__PURE__ */ new Set(["Lazy"]), ut = /* @__PURE__ */ new Set(["ReportType"]), Vt = 255, Jo = /^[a-zA-Z_-][a-zA-Z0-9_.-]*$/, Yo = /^([a-z]{1,3})([0-9]+)$/i, Zo = /^r[0-9]*c[0-9]*$/i, Qo = (e) => {
|
|
2564
|
+
if (Zo.test(e)) return !0;
|
|
2565
|
+
const t = Yo.exec(e);
|
|
2566
|
+
if (!t) return !1;
|
|
2567
|
+
let r = 0;
|
|
2568
|
+
for (const o of t[1].toUpperCase()) r = r * 26 + (o.charCodeAt(0) - 64);
|
|
2569
|
+
const n = Number(t[2]);
|
|
2570
|
+
return r <= 16384 && n >= 1 && n <= 1048576;
|
|
2571
|
+
}, le = "SheetXL", ve = (e) => {
|
|
2572
|
+
const t = e.typeName.getText();
|
|
2573
|
+
return t.startsWith(\`\${le}.\`) ? t.slice(8) : t;
|
|
2574
|
+
};
|
|
2575
|
+
gt(le, ct);
|
|
2576
|
+
gt(le, mt);
|
|
2577
|
+
gt(le, zr);
|
|
2578
|
+
Vr.add("SheetXL.AcceptError");
|
|
2579
|
+
Xr.add(\`\${le}.Omittable\`);
|
|
2580
|
+
Gr.add(\`\${le}.NoLift\`);
|
|
2581
|
+
qr.add(\`\${le}.NoFilter\`);
|
|
2582
|
+
Hr.add(\`\${le}.Lazy\`);
|
|
2583
|
+
ut.add(\`\${le}.ReportType\`);
|
|
2584
|
+
const ea = /* @__PURE__ */ new Map([
|
|
2585
|
+
["Promise", () => ({ async: !0 })],
|
|
2586
|
+
["Observable", () => ({ stream: !0 })],
|
|
2587
|
+
["Volatile", () => ({ volatile: !0 })],
|
|
2588
|
+
[\`\${le}.Volatile\`, () => ({ volatile: !0 })]
|
|
2589
|
+
]), Xt = "__scriptContext__", Gt = "script", ta = /* @__PURE__ */ new Set([
|
|
2590
|
+
"IScript.ScriptContext",
|
|
2591
|
+
\`\${le}.IScript.ScriptContext\`,
|
|
2592
|
+
"ScriptContext"
|
|
2593
|
+
]), qt = (e, t) => {
|
|
2594
|
+
const r = t.literal;
|
|
2595
|
+
if (r === void 0) return;
|
|
2596
|
+
const n = e.SyntaxKind;
|
|
2597
|
+
switch (r.kind) {
|
|
2598
|
+
case n.StringLiteral: return r.text;
|
|
2599
|
+
case n.NumericLiteral: return parseFloat(r.text);
|
|
2600
|
+
case n.TrueKeyword: return !0;
|
|
2601
|
+
case n.FalseKeyword: return !1;
|
|
2602
|
+
case n.NullKeyword: return null;
|
|
2603
|
+
case n.PrefixUnaryExpression: return r.operator === n.MinusToken && r.operand?.kind === n.NumericLiteral ? -parseFloat(r.operand.text) : void 0;
|
|
2604
|
+
default: return;
|
|
2605
|
+
}
|
|
2606
|
+
}, $e = (e) => {
|
|
2607
|
+
if (!e || e.length === 0) return "";
|
|
2608
|
+
let t = "";
|
|
2609
|
+
for (let r = 0; r < e.length; r++) {
|
|
2610
|
+
const n = e[r], o = n.kind;
|
|
2611
|
+
if (o !== "link") {
|
|
2612
|
+
if (o === "linkName") {
|
|
2613
|
+
const a = e[r + 1];
|
|
2614
|
+
if (a?.kind === "linkText" && a.text.trim()) continue;
|
|
2615
|
+
t += n.text;
|
|
2616
|
+
continue;
|
|
2617
|
+
}
|
|
2618
|
+
if (o === "linkText") {
|
|
2619
|
+
t += n.text.trim();
|
|
2620
|
+
continue;
|
|
2621
|
+
}
|
|
2622
|
+
t += n.text;
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
return t.replace(/\\r\\n?/g, \`
|
|
2626
|
+
\`).split(/\\n[^\\S\\n]*\\n\\s*/).map((r) => r.split(\`
|
|
2627
|
+
\`).map((n) => n.trim()).filter(Boolean).join(" ")).filter(Boolean).join(\`
|
|
2628
|
+
\`).trim();
|
|
2629
|
+
};
|
|
2630
|
+
function ra(e, t, r, n) {
|
|
2631
|
+
const o = n?.builtInNames?.length ? new Set(n.builtInNames.map((s) => s.toUpperCase())) : null, a = [], l = /* @__PURE__ */ new Map(), i = [];
|
|
2632
|
+
let u = null;
|
|
2633
|
+
const p = (s) => {
|
|
2634
|
+
if (!s || typeof s.getStart != "function") return {
|
|
2635
|
+
start: 0,
|
|
2636
|
+
length: 0
|
|
2637
|
+
};
|
|
2638
|
+
try {
|
|
2639
|
+
return {
|
|
2640
|
+
start: s.getStart(),
|
|
2641
|
+
length: s.getWidth()
|
|
2642
|
+
};
|
|
2643
|
+
} catch {
|
|
2644
|
+
return {
|
|
2645
|
+
start: 0,
|
|
2646
|
+
length: 0
|
|
2647
|
+
};
|
|
2648
|
+
}
|
|
2649
|
+
}, h = (s, f, d, y) => {
|
|
2650
|
+
const { start: E, length: L } = p(s);
|
|
2651
|
+
i.push({
|
|
2652
|
+
start: E,
|
|
2653
|
+
length: L,
|
|
2654
|
+
severity: d,
|
|
2655
|
+
code: f,
|
|
2656
|
+
message: y
|
|
2657
|
+
});
|
|
2658
|
+
}, c = (s, f, d) => {
|
|
2659
|
+
h(s, f, "error", d);
|
|
2660
|
+
}, g = (s) => s?.parent?.name?.escapedText, T = (s, f, d, y, E = !1, L = !1, j = !1) => {
|
|
2661
|
+
const O = { count: 0 }, A = W(s, f, d, y, O, E, L, j);
|
|
2662
|
+
O.count >= 2 && (f.range || (f.range = "m", O.count -= 2), !y && O.count >= 1 && (O.count -= 1, O.count > 0 && c(s, w.ArrayDepth, \`Arrays of more than 2 dimensions are not supported: '\${g(s)}'.\`))), O.count > 0 && (f.arrayDepth = O.count);
|
|
2663
|
+
const F = f.enum;
|
|
2664
|
+
return F && (O.count > (j ? 1 : 0) || f.range) && !U.has(f) && (f.valueOrRange || (c(s, w.EnumPosition, \`A list cannot hold the enum '\${F.id}': '\${f.name ?? g(s)}'. Its members reach the body as they are, so nothing checks them against the enum. Take one value per argument ('...x: \${F.id}[]'), or type the list by its scalar ('\${F.type}').\`), delete f.enum)), A;
|
|
2665
|
+
}, I = (s, f, d, y, E) => {
|
|
2666
|
+
if (f !== "Lambda" && f !== \`\${le}.Lambda\`) return !1;
|
|
2667
|
+
const L = s.typeArguments;
|
|
2668
|
+
let j = "*";
|
|
2669
|
+
if (L && L.length === 2) if (E && L[0].kind === e.SyntaxKind.TupleType && (d.lambdaArity = L[0].elements.length), L[1].kind === e.SyntaxKind.AnyKeyword) j = "raw";
|
|
2670
|
+
else {
|
|
2671
|
+
const O = {};
|
|
2672
|
+
W(L[1], O, y, !1, { count: 0 }), j = O.scalar ?? "*";
|
|
2673
|
+
}
|
|
2674
|
+
else if (L && L.length === 1 && L[0].kind !== e.SyntaxKind.TupleType && L[0].kind !== e.SyntaxKind.ArrayType) if (E && (d.lambdaArity = 2), L[0].kind === e.SyntaxKind.AnyKeyword) j = "raw";
|
|
2675
|
+
else {
|
|
2676
|
+
const O = {};
|
|
2677
|
+
W(L[0], O, y, !1, { count: 0 }), j = O.scalar ?? "*";
|
|
2678
|
+
}
|
|
2679
|
+
return d.lambda = j, !0;
|
|
2680
|
+
}, M = (s, f, d, y) => {
|
|
2681
|
+
if (!y) {
|
|
2682
|
+
c(s, w.FunctionReturn, \`Function type is not a valid return type: '\${g(s)}'. Declare a 'Lambda' return instead.\`);
|
|
2683
|
+
return;
|
|
2684
|
+
}
|
|
2685
|
+
const E = s.type, L = {};
|
|
2686
|
+
let j = "*";
|
|
2687
|
+
E && (E.kind === e.SyntaxKind.AnyKeyword ? j = "raw" : (W(E, L, d, !1, { count: 0 }), j = L.scalar ?? "*"));
|
|
2688
|
+
const O = s.parameters;
|
|
2689
|
+
O && !O.some((A) => A.dotDotDotToken) && (f.lambdaArity = O.length), f.lambda = j;
|
|
2690
|
+
}, q = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new WeakSet(), Z = (s) => s !== void 0 && s.getSourceFile() === t, P = (s, f = !1) => {
|
|
2691
|
+
return s.getJsDocTags(r).find((y) => y.name === "name")?.text?.map((y) => y.text).join("").trim() || (f ? Qt.camelToPrettyCase(s.name) : s.name);
|
|
2692
|
+
}, N = (s) => {
|
|
2693
|
+
const f = s.getJsDocTags(r).find((d) => d.name === "deprecated");
|
|
2694
|
+
if (f) return f.text?.map((d) => d.text).join("").trim() || !0;
|
|
2695
|
+
}, k = (s, f) => {
|
|
2696
|
+
const d = e.isTypeReferenceNode(s) ? s.typeName : void 0, y = d ? r.getSymbolAtLocation(d) : void 0, E = y?.declarations?.length ? y : void 0;
|
|
2697
|
+
if (d) {
|
|
2698
|
+
if (E && E.flags & e.SymbolFlags.Alias) {
|
|
2699
|
+
c(s, w.EnumNotLocal, \`'\${d.getText()}' is imported, so its declaration cannot be read: '\${f}'. An enum must be declared in the module that uses it.\`);
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
2702
|
+
if (!E || !(E.flags & e.SymbolFlags.Type)) {
|
|
2703
|
+
const b = d.getText();
|
|
2704
|
+
if (!(E ? (E.flags & e.SymbolFlags.Variable) !== 0 : t.statements.some((x) => e.isVariableStatement(x) && x.declarationList.declarations.some((K) => e.isIdentifier(K.name) && K.name.text === b)))) return null;
|
|
2705
|
+
c(s, w.EnumMissingAlias, \`'\${b}' is a value, not a type: '\${f}'. Pair the object with a same-name type — 'type \${b} = typeof \${b}[keyof typeof \${b}];' — or declare it as 'enum \${b} { … }'.\`);
|
|
2706
|
+
return;
|
|
2707
|
+
}
|
|
2708
|
+
const m = q.get(E);
|
|
2709
|
+
if (m !== void 0) return m;
|
|
2710
|
+
if (R.has(E)) return;
|
|
2711
|
+
}
|
|
2712
|
+
const L = [];
|
|
2713
|
+
let j = !1;
|
|
2714
|
+
if (E && E.flags & e.SymbolFlags.Enum) {
|
|
2715
|
+
if (!E.declarations?.some(Z)) {
|
|
2716
|
+
c(s, w.EnumNotLocal, \`'\${E.name}' is not declared in this module: '\${f}'. An enum must be declared in the module that uses it.\`);
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
j = !0;
|
|
2720
|
+
let m = !1;
|
|
2721
|
+
if (E.exports?.forEach((b) => {
|
|
2722
|
+
const x = b.valueDeclaration;
|
|
2723
|
+
if (!x || !e.isEnumMember(x)) return;
|
|
2724
|
+
const K = r.getConstantValue(x);
|
|
2725
|
+
if (K === void 0) {
|
|
2726
|
+
c(x, w.EnumMemberNotConstant, \`'\${E.name}.\${b.name}' is not a constant number or string. A formula passes the VALUE, so every member needs one that can be read at compile time.\`), m = !0;
|
|
2727
|
+
return;
|
|
2728
|
+
}
|
|
2729
|
+
L.push([
|
|
2730
|
+
P(b, !0),
|
|
2731
|
+
K,
|
|
2732
|
+
x,
|
|
2733
|
+
$e(b.getDocumentationComment(r)),
|
|
2734
|
+
N(b)
|
|
2735
|
+
]);
|
|
2736
|
+
}), m) {
|
|
2737
|
+
R.add(E);
|
|
2738
|
+
return;
|
|
2739
|
+
}
|
|
2740
|
+
} else {
|
|
2741
|
+
const m = r.getTypeFromTypeNode(s), b = e.TypeFlags.Null | e.TypeFlags.Undefined | e.TypeFlags.Void, x = (m.isUnion() ? m.types : [m]).filter((D) => !(D.flags & b)), K = [];
|
|
2742
|
+
for (const D of x) {
|
|
2743
|
+
if (!(D.flags & (e.TypeFlags.NumberLiteral | e.TypeFlags.StringLiteral))) return E && q.set(E, null), null;
|
|
2744
|
+
K.push(D.value);
|
|
2745
|
+
}
|
|
2746
|
+
if (K.length === 0) return null;
|
|
2747
|
+
const re = E?.declarations?.find((D) => e.isTypeAliasDeclaration(D)), J = e.isUnionTypeNode(s) ? s : re?.type;
|
|
2748
|
+
if (J && e.isUnionTypeNode(J)) {
|
|
2749
|
+
const D = J.types.map(($) => {
|
|
2750
|
+
const ne = r.getTypeFromTypeNode($);
|
|
2751
|
+
return ne.isLiteral() ? ne.value : void 0;
|
|
2752
|
+
}), _ = ($) => {
|
|
2753
|
+
const ne = D.indexOf($);
|
|
2754
|
+
return ne < 0 ? D.length : ne;
|
|
2755
|
+
};
|
|
2756
|
+
K.sort(($, ne) => _($) - _(ne));
|
|
2757
|
+
}
|
|
2758
|
+
const ee = E && E.flags & e.SymbolFlags.Variable ? E.valueDeclaration : void 0, ge = new Set(K);
|
|
2759
|
+
if (E && ee && Z(ee)) for (const D of r.getTypeOfSymbolAtLocation(E, ee).getProperties()) {
|
|
2760
|
+
const _ = D.valueDeclaration, $ = r.getTypeOfSymbolAtLocation(D, _ ?? ee);
|
|
2761
|
+
if (!($.flags & (e.TypeFlags.NumberLiteral | e.TypeFlags.StringLiteral))) continue;
|
|
2762
|
+
const ne = $.value;
|
|
2763
|
+
K.includes(ne) && (j = !0, ge.delete(ne), L.push([
|
|
2764
|
+
P(D, !0),
|
|
2765
|
+
ne,
|
|
2766
|
+
_,
|
|
2767
|
+
$e(D.getDocumentationComment(r)),
|
|
2768
|
+
N(D)
|
|
2769
|
+
]));
|
|
2770
|
+
}
|
|
2771
|
+
for (const D of K) ge.has(D) && L.push([
|
|
2772
|
+
String(D),
|
|
2773
|
+
D,
|
|
2774
|
+
void 0,
|
|
2775
|
+
null
|
|
2776
|
+
]);
|
|
2777
|
+
}
|
|
2778
|
+
if (L.length === 0) return null;
|
|
2779
|
+
const O = typeof L[0][1] == "number";
|
|
2780
|
+
if (L.some(([, m]) => typeof m == "number" !== O)) {
|
|
2781
|
+
c(s, w.EnumMixed, \`'\${E?.name ?? s.getText()}' mixes number and string members: '\${f}'. A parameter has one type, so an enum is all numbers or all strings.\`);
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
const A = E ? P(E) : L.map(([, m]) => String(m)).join("|"), F = E ? void 0 : v.get(A);
|
|
2785
|
+
if (F) return F;
|
|
2786
|
+
if (j) {
|
|
2787
|
+
const m = /* @__PURE__ */ new Map();
|
|
2788
|
+
for (const [b, x, K, re] of L) {
|
|
2789
|
+
const J = K?.name?.getText() ?? b, ee = m.get(x);
|
|
2790
|
+
ee !== void 0 ? h(K ?? s, w.EnumDuplicateValue, "warning", \`'\${A}.\${J}' has the same value as '\${A}.\${ee}' (\${JSON.stringify(x)}). A formula passes the value, so the two cannot be told apart.\`) : m.set(x, J), re === "" && h(K ?? s, w.EnumMemberUndocumented, "warning", \`'\${A}.\${J}' is missing a description. Add a doc comment above the member — it is what the argument dropdown shows.\`);
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
const V = {
|
|
2794
|
+
id: A,
|
|
2795
|
+
type: O ? me.Number : me.String,
|
|
2796
|
+
members: L.map(([m, b, , , x]) => x ? [
|
|
2797
|
+
m,
|
|
2798
|
+
b,
|
|
2799
|
+
x
|
|
2800
|
+
] : [m, b])
|
|
2801
|
+
};
|
|
2802
|
+
E ? q.set(E, V) : v.set(A, V);
|
|
2803
|
+
const z = E ? $e(E.getDocumentationComment(r)) : "", B = {};
|
|
2804
|
+
for (const [m, , , b] of L) b && (B[m] = { description: b });
|
|
2805
|
+
if (z || Object.keys(B).length > 0) {
|
|
2806
|
+
const m = {};
|
|
2807
|
+
z && (m.summary = z), Object.keys(B).length > 0 && (m.members = B), C.set(V, m);
|
|
2808
|
+
}
|
|
2809
|
+
return V;
|
|
2810
|
+
}, pe = (s, f, d, y) => {
|
|
2811
|
+
const E = (O, A, F) => {
|
|
2812
|
+
const V = { name: O };
|
|
2813
|
+
return T(A, V, d, !0), F && (V.optional = !0), y && !V.acceptError && (V.acceptError = !0), V;
|
|
2814
|
+
};
|
|
2815
|
+
if (s.kind !== e.SyntaxKind.TupleType) return [E(f, s, !1)];
|
|
2816
|
+
const L = s.elements;
|
|
2817
|
+
if (L.length < 2) return c(s, w.RepeatingSlots, \`'\${f}': a repeating group of period \${L.length} must be spelled 'Repeating<T>' without the tuple.\`), null;
|
|
2818
|
+
const j = [];
|
|
2819
|
+
for (let O = 0; O < L.length; O++) {
|
|
2820
|
+
const A = L[O];
|
|
2821
|
+
if (A.kind !== e.SyntaxKind.NamedTupleMember) return c(A, w.RepeatingSlots, \`'\${f}': every slot of a repeating group must be labelled, e.g. 'Repeating<[criteriaRange: IRange, criteria: Scalar]>'.\`), null;
|
|
2822
|
+
const F = !!A.questionToken;
|
|
2823
|
+
if (F && O !== L.length - 1) return c(A, w.RepeatingOptional, \`'\${f}': only the LAST slot of a repeating group may be optional (slot '\${A.name?.getText?.()}' is not).\`), null;
|
|
2824
|
+
j.push(E(A.name?.getText?.() ?? \`\${O}\`, A.type, F));
|
|
2825
|
+
}
|
|
2826
|
+
return j;
|
|
2827
|
+
}, W = (s, f, d, y, E, L = !1, j = !1, O = !1) => {
|
|
2828
|
+
if (!s) {
|
|
2829
|
+
c(s, w.MissingType, \`Type is not defined for '\${f?.name ?? "return"}'.\`);
|
|
2830
|
+
return;
|
|
2831
|
+
}
|
|
2832
|
+
if (s.kind === e.SyntaxKind.ParenthesizedType) return W(s.type, f, d, y, E, L, j, O);
|
|
2833
|
+
if (s.kind === e.SyntaxKind.UnionType) {
|
|
2834
|
+
const A = (z) => z.kind === e.SyntaxKind.UndefinedKeyword || z.kind === e.SyntaxKind.VoidKeyword || z.kind === e.SyntaxKind.NullKeyword || z.kind === e.SyntaxKind.LiteralType && z.literal?.kind === e.SyntaxKind.NullKeyword, F = s.types.filter((z) => !A(z));
|
|
2835
|
+
if (F.length === 1) return W(F[0], f, d, y, E, L, j, O);
|
|
2836
|
+
const V = k(s, f.name ?? g(s));
|
|
2837
|
+
if (V === void 0) return;
|
|
2838
|
+
if (V !== null) {
|
|
2839
|
+
f.scalar = V.type, y && (f.enum = V);
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
2842
|
+
if (!y) {
|
|
2843
|
+
f.scalar = "*";
|
|
2844
|
+
return;
|
|
2845
|
+
}
|
|
2846
|
+
if (F.length === 2) {
|
|
2847
|
+
const z = (m) => m.kind !== e.SyntaxKind.TypeReference ? !1 : e.isTypeReferenceNode(m) && ve(m) === "Lambda", B = F.findIndex(z);
|
|
2848
|
+
if (B >= 0 && !z(F[1 - B])) {
|
|
2849
|
+
W(F[1 - B], f, d, y, E, L, j, O), I(F[B], ve(F[B]), f, d, y);
|
|
2850
|
+
return;
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
if (y && F.length === 2) {
|
|
2854
|
+
const z = (m) => {
|
|
2855
|
+
if (!(m.kind !== e.SyntaxKind.TypeReference || m.typeArguments?.length)) return ct.get(ve(m));
|
|
2856
|
+
}, B = F.findIndex((m) => z(m) !== void 0);
|
|
2857
|
+
if (B >= 0 && z(F[1 - B]) === void 0) {
|
|
2858
|
+
const m = {}, b = E.count;
|
|
2859
|
+
if (W(F[1 - B], m, d, y, E, L, !1), m.scalar && !m.range && m.lambda == null && E.count === b) {
|
|
2860
|
+
f.range = z(F[B]), f.scalar = m.scalar, f.valueOrRange = !0;
|
|
2861
|
+
const x = m.enum;
|
|
2862
|
+
x && (f.enum = x);
|
|
2863
|
+
return;
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
if (y && F.length === 2) {
|
|
2868
|
+
const z = (m) => m.kind === e.SyntaxKind.TypeReference && !m.typeArguments?.length && ve(m) === "Scalar", B = F.findIndex(z);
|
|
2869
|
+
if (B >= 0 && !z(F[1 - B])) {
|
|
2870
|
+
const m = k(F[1 - B], f.name ?? g(s));
|
|
2871
|
+
if (m === void 0) return;
|
|
2872
|
+
if (m !== null) {
|
|
2873
|
+
f.scalar = "*", f.enum = m;
|
|
2874
|
+
return;
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
c(s, w.InvalidParamType, \`Union parameter types are not supported: '\${g(s)}'. Use a single type, optionally with '| null' or '| undefined', 'T | Lambda<…>' for a value-or-lambda slot, 'IRange | Scalar' for a value-or-range slot, or 'E | Scalar' for an uncoerced slot whose values an enum documents.\`);
|
|
2879
|
+
return;
|
|
2880
|
+
}
|
|
2881
|
+
if (s.kind === e.SyntaxKind.NumberKeyword) f.scalar = me.Number;
|
|
2882
|
+
else if (s.kind === e.SyntaxKind.StringKeyword) f.scalar = me.String;
|
|
2883
|
+
else if (s.kind === e.SyntaxKind.BooleanKeyword) f.scalar = me.Boolean;
|
|
2884
|
+
else if (s.kind === e.SyntaxKind.UndefinedKeyword || s.kind === e.SyntaxKind.NullKeyword || s.kind === e.SyntaxKind.VoidKeyword) {
|
|
2885
|
+
if (y) {
|
|
2886
|
+
c(s, w.UndefinedInput, \`'undefined' is not a valid type for input: '\${g(s)}'.\`);
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
f.scalar = me.Null;
|
|
2890
|
+
} else if (s.kind === e.SyntaxKind.BigIntKeyword) f.scalar = me.Number;
|
|
2891
|
+
else if (s.kind === e.SyntaxKind.AnyKeyword) y && (f.range = "*");
|
|
2892
|
+
else if (s.kind === e.SyntaxKind.ArrayType) {
|
|
2893
|
+
const A = s.elementType;
|
|
2894
|
+
if (!A) {
|
|
2895
|
+
c(s, w.UntypedArray, \`'Array' must be typed: '\${g(s)}'.\`);
|
|
2896
|
+
return;
|
|
2897
|
+
}
|
|
2898
|
+
if (y && j) {
|
|
2899
|
+
const F = f, V = F.name ?? g(s) ?? "parameter", z = F.acceptError;
|
|
2900
|
+
delete F.acceptError;
|
|
2901
|
+
const B = { name: V };
|
|
2902
|
+
T(A, B, d, !0), z && !B.acceptError && (B.acceptError = !0), F.repeating = [B];
|
|
2903
|
+
return;
|
|
2904
|
+
}
|
|
2905
|
+
E.count++, W(A, f, d, y, E);
|
|
2906
|
+
} else if (s.kind !== e.SyntaxKind.TupleType) if (s.kind === e.SyntaxKind.TypeReference) {
|
|
2907
|
+
const A = ve(s);
|
|
2908
|
+
if (Vr.has(A)) {
|
|
2909
|
+
const m = g(s);
|
|
2910
|
+
if (!y) {
|
|
2911
|
+
c(s, w.InvalidReturnType, \`'\${A}' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2912
|
+
return;
|
|
2913
|
+
}
|
|
2914
|
+
const b = f;
|
|
2915
|
+
if (b.acceptError) {
|
|
2916
|
+
c(s, w.InvalidParamType, \`'\${m}' declares 'AcceptError' more than once.\`);
|
|
2917
|
+
return;
|
|
2918
|
+
}
|
|
2919
|
+
const x = s.typeArguments;
|
|
2920
|
+
if (!x || x.length !== 1) {
|
|
2921
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2922
|
+
return;
|
|
2923
|
+
}
|
|
2924
|
+
return b.acceptError = !0, W(x[0], f, d, y, E, L, j, O);
|
|
2925
|
+
}
|
|
2926
|
+
if (ut.has(A)) {
|
|
2927
|
+
const m = f.name ?? g(s);
|
|
2928
|
+
if (!y) {
|
|
2929
|
+
c(s, w.InvalidReturnType, \`'ReportType' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2930
|
+
return;
|
|
2931
|
+
}
|
|
2932
|
+
const b = s.typeArguments;
|
|
2933
|
+
if (!b || b.length !== 1) {
|
|
2934
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2935
|
+
return;
|
|
2936
|
+
}
|
|
2937
|
+
return f.reportType = !0, W(b[0], f, d, y, E, L, j, O);
|
|
2938
|
+
}
|
|
2939
|
+
if (Gr.has(A)) {
|
|
2940
|
+
const m = f.name ?? g(s);
|
|
2941
|
+
if (!y) {
|
|
2942
|
+
c(s, w.InvalidReturnType, \`'NoLift' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2943
|
+
return;
|
|
2944
|
+
}
|
|
2945
|
+
const b = s.typeArguments;
|
|
2946
|
+
if (!b || b.length !== 1) {
|
|
2947
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2948
|
+
return;
|
|
2949
|
+
}
|
|
2950
|
+
const x = f;
|
|
2951
|
+
x.noLift = !0;
|
|
2952
|
+
const K = E.count;
|
|
2953
|
+
W(b[0], f, d, y, E, L, j, O), (x.range || x.lambda != null || x.repeating || E.count !== K) && c(s, w.InvalidParamType, \`'\${m}': 'NoLift' applies to a SCALAR parameter only - a range, list, repeating or lambda slot never lifts.\`);
|
|
2954
|
+
return;
|
|
2955
|
+
}
|
|
2956
|
+
if (qr.has(A)) {
|
|
2957
|
+
const m = f.name ?? g(s);
|
|
2958
|
+
if (!y) {
|
|
2959
|
+
c(s, w.InvalidReturnType, \`'NoFilter' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2960
|
+
return;
|
|
2961
|
+
}
|
|
2962
|
+
const b = s.typeArguments;
|
|
2963
|
+
if (!b || b.length !== 1) {
|
|
2964
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
2965
|
+
return;
|
|
2966
|
+
}
|
|
2967
|
+
const x = f;
|
|
2968
|
+
x.noFilter = !0;
|
|
2969
|
+
const K = E.count;
|
|
2970
|
+
if (W(b[0], f, d, y, E, L, j, O), x.range || x.lambda != null || E.count !== K) {
|
|
2971
|
+
c(s, w.InvalidParamType, \`'\${m}': 'NoFilter' applies to a SCALAR slot only - a range, list or lambda slot has no members to coerce.\`);
|
|
2972
|
+
return;
|
|
2973
|
+
}
|
|
2974
|
+
const re = x.repeating;
|
|
2975
|
+
if (re) {
|
|
2976
|
+
if (delete x.noFilter, re.length !== 1) {
|
|
2977
|
+
c(s, w.InvalidParamType, \`'\${m}': 'NoFilter' over a repeating group applies to a period-1 group only - write it on the slot that takes the members.\`);
|
|
2978
|
+
return;
|
|
2979
|
+
}
|
|
2980
|
+
re[0].noFilter = !0;
|
|
2981
|
+
} else j && c(s, w.InvalidParamType, \`'\${m}': 'NoFilter' applies to a REPEATING slot only - a single scalar argument has no members to coerce.\`);
|
|
2982
|
+
return;
|
|
2983
|
+
}
|
|
2984
|
+
if (Xr.has(A)) {
|
|
2985
|
+
const m = f.name ?? g(s);
|
|
2986
|
+
if (!y) {
|
|
2987
|
+
c(s, w.InvalidReturnType, \`'Omittable' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
2988
|
+
return;
|
|
2989
|
+
}
|
|
2990
|
+
const b = s.typeArguments;
|
|
2991
|
+
if (!b || b.length < 1 || b.length > 2) {
|
|
2992
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with 1 or 2 types: '\${m}'.\`);
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
const x = f;
|
|
2996
|
+
if (x.omittable = !0, b.length === 2) {
|
|
2997
|
+
const J = qt(e, b[1]);
|
|
2998
|
+
if (J === void 0) {
|
|
2999
|
+
c(s, w.InvalidParamType, \`'\${m}' declares '\${A}' with a second type that is not a literal value. Use a number, string, boolean or null - the engine substitutes it for an omitted argument.\`);
|
|
3000
|
+
return;
|
|
3001
|
+
}
|
|
3002
|
+
x.omittedValue = J;
|
|
3003
|
+
}
|
|
3004
|
+
const K = W(b[0], f, d, y, E, L, j, O), re = x.omittedValue;
|
|
3005
|
+
return x.enum && re !== void 0 && re !== null && !x.enum.members.some(([, J]) => J === re) && c(b[1], w.EnumOmittedValue, \`'\${m}': \${JSON.stringify(re)} is not a member of '\${x.enum.id}'. An omitted argument must mean a member (\${x.enum.members.map(([, J]) => JSON.stringify(J)).join(", ")}) or null.\`), K;
|
|
3006
|
+
}
|
|
3007
|
+
if (Hr.has(A)) {
|
|
3008
|
+
const m = f.name ?? g(s);
|
|
3009
|
+
if (!y) {
|
|
3010
|
+
c(s, w.InvalidReturnType, \`'Lazy' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3011
|
+
return;
|
|
3012
|
+
}
|
|
3013
|
+
const b = f;
|
|
3014
|
+
if (b.lazy) {
|
|
3015
|
+
c(s, w.InvalidParamType, \`'\${m}' declares 'Lazy' more than once.\`);
|
|
3016
|
+
return;
|
|
3017
|
+
}
|
|
3018
|
+
const x = s.typeArguments;
|
|
3019
|
+
if (!x || x.length < 1 || x.length > 2) {
|
|
3020
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with 1 or 2 types: '\${m}'.\`);
|
|
3021
|
+
return;
|
|
3022
|
+
}
|
|
3023
|
+
if (b.lazy = !0, x.length === 2) {
|
|
3024
|
+
const K = qt(e, x[1]);
|
|
3025
|
+
if (K === void 0) {
|
|
3026
|
+
c(s, w.InvalidParamType, \`'\${m}' declares '\${A}' with a second type that is not a literal value. Use a number, string, boolean or null - the engine substitutes it for an absent argument.\`);
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3029
|
+
b.optional = !0, b.defaultValue = K;
|
|
3030
|
+
}
|
|
3031
|
+
W(x[0], f, d, y, E, L, j, O), b.enum ? (c(s, w.EnumPosition, \`'\${m}': 'Lazy' cannot hold the enum '\${b.enum.id}'. The argument may never be evaluated, so there is no point at which it could be checked against the members.\`), delete b.enum) : b.lambda != null ? c(s, w.InvalidParamType, \`'\${m}': 'Lazy' cannot be combined with a Lambda parameter - a callable slot is already the body's to call, or not.\`) : b.repeating && c(s, w.InvalidParamType, \`'\${m}': 'Lazy' applies to a VALUE, not to a repeating group - mark the group's slots instead.\`);
|
|
3032
|
+
return;
|
|
3033
|
+
}
|
|
3034
|
+
if (Wo.has(A)) {
|
|
3035
|
+
const m = f.name ?? g(s);
|
|
3036
|
+
if (!y) {
|
|
3037
|
+
c(s, w.InvalidReturnType, \`'Flatten' is not a valid return type: '\${m}'. It describes how an ARGUMENT is received.\`);
|
|
3038
|
+
return;
|
|
3039
|
+
}
|
|
3040
|
+
const b = s.typeArguments;
|
|
3041
|
+
if (!b || b.length !== 1) {
|
|
3042
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${m}'.\`);
|
|
3043
|
+
return;
|
|
3044
|
+
}
|
|
3045
|
+
return E.count++, W(b[0], f, d, y, E, L);
|
|
3046
|
+
}
|
|
3047
|
+
if (zr.get(A) === "repeating") {
|
|
3048
|
+
const m = f.name ?? g(s);
|
|
3049
|
+
if (!y) {
|
|
3050
|
+
c(s, w.RepeatingPosition, \`'Repeating' is not a valid return type: '\${m}'.\`);
|
|
3051
|
+
return;
|
|
3052
|
+
}
|
|
3053
|
+
if (E.count !== 0) {
|
|
3054
|
+
c(s, w.RepeatingPosition, \`'Repeating' cannot be nested inside another type: '\${m}'.\`);
|
|
3055
|
+
return;
|
|
3056
|
+
}
|
|
3057
|
+
const b = f, x = s.typeArguments;
|
|
3058
|
+
if (!x || x.length < 1 || x.length > 2) {
|
|
3059
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with 1 type, optionally followed by a maximum argument count: '\${m}'.\`);
|
|
3060
|
+
return;
|
|
3061
|
+
}
|
|
3062
|
+
let K;
|
|
3063
|
+
if (x.length === 2) {
|
|
3064
|
+
const ee = x[1], ge = ee.kind === e.SyntaxKind.LiteralType ? ee.literal : null, D = ge && ge.kind === e.SyntaxKind.NumericLiteral ? Number(ge.text) : NaN;
|
|
3065
|
+
if (!Number.isInteger(D) || D < 1 || D > Vt) {
|
|
3066
|
+
c(ee, w.RepeatingMax, \`'\${m}': '\${A}'’s maximum must be a whole number between 1 and \${Vt}.\`);
|
|
3067
|
+
return;
|
|
3068
|
+
}
|
|
3069
|
+
K = D, d.maxArguments = D;
|
|
3070
|
+
}
|
|
3071
|
+
if (O) {
|
|
3072
|
+
if (K === void 0) {
|
|
3073
|
+
c(s, w.RepeatingPosition, \`'\${m}' is a rest parameter and a repeating group. A group already repeats — drop the '...', or give the group a maximum ('Repeating<T, 254>') if the ceiling is all you meant.\`);
|
|
3074
|
+
return;
|
|
3075
|
+
}
|
|
3076
|
+
return W(x[0], f, d, y, E, L, j);
|
|
3077
|
+
}
|
|
3078
|
+
const re = b.acceptError;
|
|
3079
|
+
delete b.acceptError;
|
|
3080
|
+
const J = pe(x[0], m ?? "parameter", d, re);
|
|
3081
|
+
J && (b.repeating = J);
|
|
3082
|
+
return;
|
|
3083
|
+
}
|
|
3084
|
+
const F = ct.get(A);
|
|
3085
|
+
let V = !1;
|
|
3086
|
+
F && (f.range = F, V = !0);
|
|
3087
|
+
const z = Ho.get(A);
|
|
3088
|
+
if (z && (f.scalar = z), z !== void 0 && (V = !0), I(s, A, f, d, y)) return;
|
|
3089
|
+
if (y) {
|
|
3090
|
+
if (A === "Volatile" || A === \`\${le}.Volatile\`) {
|
|
3091
|
+
c(s, w.InvalidParamType, \`'Volatile' is not a valid parameter type: '\${g(s)}'. It describes the function's RESULT, so it belongs on the return type.\`);
|
|
3092
|
+
return;
|
|
3093
|
+
}
|
|
3094
|
+
if (ta.has(A)) return Xt;
|
|
3095
|
+
const m = mt.get(A);
|
|
3096
|
+
if (m) return m;
|
|
3097
|
+
} else {
|
|
3098
|
+
const m = ea.get(A);
|
|
3099
|
+
if (m) {
|
|
3100
|
+
const b = Object.assign(f, m());
|
|
3101
|
+
let x = 0;
|
|
3102
|
+
if (b.async && x++, b.stream && x++, x > 1) {
|
|
3103
|
+
c(s, w.MultipleModifiers, \`'\${A}' cannot have multiple modifiers: '\${g(s)}'.\`);
|
|
3104
|
+
return;
|
|
3105
|
+
}
|
|
3106
|
+
V = !0;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
if (!V) {
|
|
3110
|
+
const m = k(s, f.name ?? g(s));
|
|
3111
|
+
if (m === void 0) return;
|
|
3112
|
+
if (m !== null) {
|
|
3113
|
+
f.scalar = m.type, y && (f.enum = m);
|
|
3114
|
+
return;
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
if (!V) {
|
|
3118
|
+
const m = "number, string, boolean, Scalar, Lambda, Date, FormulaError.Known, IRichData, IRange, IReferenceRange (and arrays of these; optionally wrapped in AcceptError<T>, or grouped with Repeating<T>)", b = "number, string, boolean, Scalar, Date, FormulaError.Known, IRichData, IRange, Promise<T>, Observable<T>, Volatile<T> (and arrays of these)";
|
|
3119
|
+
let x;
|
|
3120
|
+
y ? L ? x = \`'\${A}' is not a valid first parameter: '\${g(s)}'. The first parameter is EITHER a macro target (making this a macro) OR a calculation input (making this a calculation function). Allowed: \${qo.join(", ")} (macro target); \${m} (calculation input).\` : x = \`'\${A}' is not a valid parameter type: '\${g(s)}'. Allowed: \${m}.\` : x = \`'\${A}' is not a valid return type: '\${g(s)}'. Allowed: \${b}.\`, c(s, y ? w.InvalidParamType : w.InvalidReturnType, x);
|
|
3121
|
+
return;
|
|
3122
|
+
}
|
|
3123
|
+
const B = s.typeArguments;
|
|
3124
|
+
if (B) {
|
|
3125
|
+
if (B.length !== 1) {
|
|
3126
|
+
c(s, w.GenericArity, \`'\${A}' must be typed with exactly 1 type: '\${g(s)}'.\`);
|
|
3127
|
+
return;
|
|
3128
|
+
}
|
|
3129
|
+
const m = B[0], b = y && e.isTypeReferenceNode(m) && ut.has(ve(m)), x = f.reportType;
|
|
3130
|
+
b && U.add(f), T(m, f, d, y), b && x === void 0 && delete f.reportType;
|
|
3131
|
+
const K = f.enum;
|
|
3132
|
+
K && !b && (c(B[0], w.EnumPosition, \`'\${A}' cannot hold the enum '\${K.id}': '\${g(s)}'. The members of a range reach the body as they are, so nothing checks them against the enum. Take the enum as a value, or type the range by its scalar ('\${A}<\${K.type}>').\`), delete f.enum);
|
|
3133
|
+
}
|
|
3134
|
+
} else s.kind === e.SyntaxKind.FunctionType && M(s, f, d, y);
|
|
3135
|
+
}, Ge = (s) => (e.getCombinedModifierFlags(s) & e.ModifierFlags.Export) !== 0, qe = (s) => (e.getCombinedModifierFlags(s) & e.ModifierFlags.Default) !== 0;
|
|
3136
|
+
try {
|
|
3137
|
+
e.forEachChild(t, (s) => {
|
|
3138
|
+
if (Ge(s) && e.isFunctionDeclaration(s)) {
|
|
3139
|
+
const f = s?.name?.getText();
|
|
3140
|
+
if (!s.body) {
|
|
3141
|
+
c(s, w.NoBody, \`'\${f}': function has no body.\`);
|
|
3142
|
+
return;
|
|
3143
|
+
}
|
|
3144
|
+
if (!f) {
|
|
3145
|
+
c(s, w.Anonymous, "Anonymous exported functions are not allowed.");
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
const d = {}, y = { parameters: {} };
|
|
3149
|
+
try {
|
|
3150
|
+
d.name = f;
|
|
3151
|
+
const E = r.getSymbolAtLocation(s.name), L = $e(E?.getDocumentationComment(r));
|
|
3152
|
+
L && (y.summary = L);
|
|
3153
|
+
const j = {};
|
|
3154
|
+
T(s.type, j, d, !1), d.returnType = j;
|
|
3155
|
+
const O = {};
|
|
3156
|
+
qe(s) && (O.default = !0, u = f), d.parameters = [];
|
|
3157
|
+
const A = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Set();
|
|
3158
|
+
let z = null, B = null, m = null, b = 0, x = !1, K = 0;
|
|
3159
|
+
for (let D = 0; D < s.parameters.length; D++) {
|
|
3160
|
+
const _ = s.parameters[D], $ = {};
|
|
3161
|
+
$.name = _.name?.getText();
|
|
3162
|
+
const ne = d.parameters.length === 0;
|
|
3163
|
+
if (n?.lenient && D === 0 && !_.type && O.default) {
|
|
3164
|
+
d.context = Gt;
|
|
3165
|
+
continue;
|
|
3166
|
+
}
|
|
3167
|
+
const Ie = T(_.type, $, d, !0, ne, !_.dotDotDotToken, !!_.dotDotDotToken);
|
|
3168
|
+
if (Ie === Xt) {
|
|
3169
|
+
D === 0 && d.context === void 0 && (d.context = Gt);
|
|
3170
|
+
continue;
|
|
3171
|
+
}
|
|
3172
|
+
if (Ie) {
|
|
3173
|
+
if (d.parameters.length !== 0) {
|
|
3174
|
+
c(_, w.ContextNotFirst, \`'\${d.name}' contexts must be the first parameter: '\${$.name}'.\`);
|
|
3175
|
+
return;
|
|
3176
|
+
}
|
|
3177
|
+
d.context = Ie;
|
|
3178
|
+
continue;
|
|
3179
|
+
}
|
|
3180
|
+
if ($.lambda !== void 0) {
|
|
3181
|
+
if (z !== null) {
|
|
3182
|
+
c(_, w.MultipleLambda, \`'\${d.name}' has more than one Lambda parameter ('\${z}' and '\${$.name}'). Only one Lambda parameter is allowed.\`);
|
|
3183
|
+
return;
|
|
3184
|
+
}
|
|
3185
|
+
z = $.name;
|
|
3186
|
+
} else if (z !== null) {
|
|
3187
|
+
c(_, w.LambdaNotLast, \`'\${d.name}' Lambda parameter ('\${z}') must be the last parameter, but '\${$.name}' follows it.\`);
|
|
3188
|
+
return;
|
|
3189
|
+
}
|
|
3190
|
+
const ye = $.optional === !0 || !((_.initializer === void 0 || _.initializer === null) && (_.questionToken === void 0 || _.questionToken === null));
|
|
3191
|
+
let ae;
|
|
3192
|
+
if (ye && ($.optional = !0, _.initializer)) try {
|
|
3193
|
+
if (_.initializer.kind === e.SyntaxKind.StringLiteral) ae = _.initializer.text;
|
|
3194
|
+
else if (_.initializer.kind === e.SyntaxKind.NumericLiteral) ae = parseFloat(_.initializer.text);
|
|
3195
|
+
else if (_.initializer.kind === e.SyntaxKind.TrueKeyword || _.initializer.kind === e.SyntaxKind.FalseKeyword) ae = _.initializer.kind === e.SyntaxKind.TrueKeyword;
|
|
3196
|
+
else if (_.initializer.kind === e.SyntaxKind.NullKeyword) ae = null;
|
|
3197
|
+
else if (e.isPrefixUnaryExpression(_.initializer) && _.initializer.operator === e.SyntaxKind.MinusToken && _.initializer.operand.kind === e.SyntaxKind.NumericLiteral) ae = -parseFloat(_.initializer.operand.text);
|
|
3198
|
+
else if (e.isPropertyAccessExpression(_.initializer) || e.isElementAccessExpression(_.initializer)) {
|
|
3199
|
+
const ce = r.getTypeAtLocation(_.initializer);
|
|
3200
|
+
ce.flags & (e.TypeFlags.NumberLiteral | e.TypeFlags.StringLiteral) && (ae = ce.value);
|
|
3201
|
+
}
|
|
3202
|
+
} catch (ce) {
|
|
3203
|
+
console.warn(\`Couldn't extract default value for parameter '\${$.name}'\`, ce);
|
|
3204
|
+
}
|
|
3205
|
+
_.dotDotDotToken && ($.rest = !0);
|
|
3206
|
+
const X = $.repeating;
|
|
3207
|
+
if (X) {
|
|
3208
|
+
if ($.rest) {
|
|
3209
|
+
c(_, w.RepeatingPosition, \`'\${d.name}' parameter '\${$.name}' is both a rest parameter and a repeating group. A group already repeats — drop the '...'.\`);
|
|
3210
|
+
return;
|
|
3211
|
+
}
|
|
3212
|
+
if (ye && X.length === 1) {
|
|
3213
|
+
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${$.name}' cannot be an optional repeating group. Use '...\${$.name}: T[]' for zero-or-more, or drop the '?' for one-or-more.\`);
|
|
3214
|
+
return;
|
|
3215
|
+
}
|
|
3216
|
+
if (B !== null) {
|
|
3217
|
+
c(_, w.MultipleRepeating, \`'\${d.name}' has more than one repeating group ('\${B}' and '\${$.name}'). Only one is allowed — two would make the argument count ambiguous.\`);
|
|
3218
|
+
return;
|
|
3219
|
+
}
|
|
3220
|
+
if (m !== null) {
|
|
3221
|
+
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${m}' is optional and precedes the repeating group '\${$.name}'. Every parameter outside a group must be required.\`);
|
|
3222
|
+
return;
|
|
3223
|
+
}
|
|
3224
|
+
B = $.name, b = X.length, x = X[X.length - 1].optional === !0;
|
|
3225
|
+
} else if (B !== null && $.rest) {
|
|
3226
|
+
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${$.name}' is a rest parameter and follows the repeating group '\${B}'. Two variadic tails would make the argument count ambiguous.\`);
|
|
3227
|
+
return;
|
|
3228
|
+
} else if (B !== null && ye) {
|
|
3229
|
+
if (K >= b - 1) {
|
|
3230
|
+
c(_, w.RepeatingOptional, b === 1 ? \`'\${d.name}' parameter '\${$.name}' is optional and follows the period-1 repeating group '\${B}'. One more argument is indistinguishable from one more repetition — make it required, or give the group a period.\` : \`'\${d.name}' has \${K + 1} optional parameters after the repeating group '\${B}', which has period \${b}. At most \${b - 1} may be optional, or the argument count no longer decides the parse.\`);
|
|
3231
|
+
return;
|
|
3232
|
+
}
|
|
3233
|
+
if (x) {
|
|
3234
|
+
c(_, w.RepeatingOptional, \`'\${d.name}' parameter '\${$.name}' is optional and follows '\${B}', whose own last slot is already optional. Both omissions reach the same argument count — drop one.\`);
|
|
3235
|
+
return;
|
|
3236
|
+
}
|
|
3237
|
+
K++;
|
|
3238
|
+
}
|
|
3239
|
+
ye && !X && (m = $.name);
|
|
3240
|
+
const G = ($.range ? 2 : 0) + ($.arrayDepth ?? 0), Me = $.range === "r" || $.range === "p" || $.range === "*", Q = $.rest || Me ? 3 : 2;
|
|
3241
|
+
if (G > Q) {
|
|
3242
|
+
c(_, w.ArrayDepth, \`'\${d.name}' parameter '\${$.name}' has an array depth of \${G}; the maximum is \${Q}\${$.rest ? " for a rest parameter" : " (use a rest parameter for one more level, or an IRange)"}.\`);
|
|
3243
|
+
return;
|
|
3244
|
+
}
|
|
3245
|
+
d.parameters.push($);
|
|
3246
|
+
const se = { description: "" };
|
|
3247
|
+
y.parameters[$.name] = se;
|
|
3248
|
+
const He = r.getSymbolAtLocation(_.name);
|
|
3249
|
+
se.description = $e(He?.getDocumentationComment(r)), ae !== void 0 && ($.defaultValue = ae);
|
|
3250
|
+
for (const ce of [$, ...$.repeating ?? []]) {
|
|
3251
|
+
const we = ce.enum ? C.get(ce.enum) : void 0;
|
|
3252
|
+
we && ((y.enums ??= {})[ce.enum.id] = we);
|
|
3253
|
+
}
|
|
3254
|
+
if (A.set($.name, $), F.set($.name, _), X && X.length > 1) {
|
|
3255
|
+
V.add($.name);
|
|
3256
|
+
for (const ce of X) {
|
|
3257
|
+
const we = \`\${$.name}.\${ce.name}\`;
|
|
3258
|
+
y.parameters[we] = { description: "" }, A.set(we, ce), F.set(we, _);
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
const re = d.maxArguments;
|
|
3263
|
+
if (re !== void 0) {
|
|
3264
|
+
const D = d.parameters ?? [];
|
|
3265
|
+
if (!D.some(($) => $.rest === !0 || $.repeating !== void 0)) {
|
|
3266
|
+
c(s, w.RepeatingMax, \`'\${d.name}' declares a maximum of \${re} arguments but takes a fixed \${D.length}. A maximum only means something on a variadic tail.\`);
|
|
3267
|
+
return;
|
|
3268
|
+
}
|
|
3269
|
+
let _ = 0;
|
|
3270
|
+
for (const $ of D) $.rest === !0 || $.optional === !0 || (_ += $.repeating ? $.repeating.length : 1);
|
|
3271
|
+
if (re < _) {
|
|
3272
|
+
c(s, w.RepeatingMax, \`'\${d.name}' declares a maximum of \${re} arguments but requires \${_}.\`);
|
|
3273
|
+
return;
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
if (s.jsDoc && s.jsDoc.length > 0) {
|
|
3277
|
+
const D = s.jsDoc, _ = D.length;
|
|
3278
|
+
for (let $ = 0; $ < _; $++) {
|
|
3279
|
+
const ne = D[$]?.tags;
|
|
3280
|
+
if (!ne) continue;
|
|
3281
|
+
const Ie = ne.length;
|
|
3282
|
+
for (let ye = 0; ye < Ie; ye++) {
|
|
3283
|
+
const ae = ne[ye];
|
|
3284
|
+
let X = ae?.tagName?.text;
|
|
3285
|
+
if (!X) continue;
|
|
3286
|
+
X = X.toLowerCase();
|
|
3287
|
+
let G = ae.comment;
|
|
3288
|
+
const Me = Go(X);
|
|
3289
|
+
if (typeof G != "string" && !Me) {
|
|
3290
|
+
X === "returnkind" && c(ae, w.UnknownReturnKind, \`'@returnKind' needs a value kind. Known: \${[...tt].map((Q) => \`'\${Q}'\`).join(", ")}.\`);
|
|
3291
|
+
continue;
|
|
3292
|
+
}
|
|
3293
|
+
if (typeof G == "string" && (G = G.replace(/\\r\\n?/g, \`
|
|
3294
|
+
\`).trim()), !(!Me && G && (G = G.split(\`
|
|
3295
|
+
\`)[0].trim(), !G || G.length === 0))) {
|
|
3296
|
+
if (G && typeof G == "string") {
|
|
3297
|
+
const Q = /\\{@link(code|plain)?\\s+([^}|]+)(?:\\s*\\|\\s*([^}]+))?\\}/g;
|
|
3298
|
+
let se, He = G, ce = [];
|
|
3299
|
+
for (; (se = Q.exec(G)) !== null;) {
|
|
3300
|
+
const [we, Ca, Zr, ht] = se, Qr = [Zr.trim()];
|
|
3301
|
+
ht && Qr.push(ht.trim());
|
|
3302
|
+
}
|
|
3303
|
+
G = He, ce.length > 0 && X === "see" && (y.links || (y.links = []), y.links.push(...ce));
|
|
3304
|
+
}
|
|
3305
|
+
if (X === "name") {
|
|
3306
|
+
const Q = G;
|
|
3307
|
+
Q !== f && (y.name = Q);
|
|
3308
|
+
} else if (X !== "description") {
|
|
3309
|
+
if (X === "param") {
|
|
3310
|
+
const Q = ae.name?.getText?.() ?? ae.name?.text;
|
|
3311
|
+
if (!A.get(Q)) {
|
|
3312
|
+
c(ae, w.UnknownParam, \`Parameter '\${Q}' not found in function '\${f}'.\`);
|
|
3313
|
+
continue;
|
|
3314
|
+
}
|
|
3315
|
+
const se = y.parameters?.[Q];
|
|
3316
|
+
se && !se.description && typeof G == "string" && G && (se.description = G);
|
|
3317
|
+
} else if (X === "returns" || X === "return") d.returnType.description = G;
|
|
3318
|
+
else if (X === "returnkind") {
|
|
3319
|
+
const Q = (G ?? "").trim().toLowerCase();
|
|
3320
|
+
tt.has(Q) ? d.returnType.kind = Q : c(ae, w.UnknownReturnKind, \`'@returnKind \${Q}' is not a known value kind. Known: \${[...tt].map((se) => \`'\${se}'\`).join(", ")}.\`);
|
|
3321
|
+
} else if (X === "category") y.category = G;
|
|
3322
|
+
else if (X === "deprecated" || X === "hidden") {
|
|
3323
|
+
let Q = !0;
|
|
3324
|
+
const se = G?.toLowerCase();
|
|
3325
|
+
se === "false" ? Q = !1 : se !== "true" && (Q = G), Q !== !1 && (y.deprecated = Q ?? !0);
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
Object.keys(d.returnType).length === 0 && delete d.returnType, Object.keys(O).length > 0 && (d.behavior = O), y.summary || h(s.name ?? s, w.MissingSummary, "warning", \`'\${f}': missing a description. Add a JSDoc comment above the function.\`);
|
|
3333
|
+
const J = !d.context, ee = J && y.name || f;
|
|
3334
|
+
if (J && !Jo.test(ee)) {
|
|
3335
|
+
const D = y.name ? \`'@name \${y.name}'\` : \`'\${ee}'\`;
|
|
3336
|
+
c(s.name ?? s, w.InvalidName, \`'\${f}': \${D} cannot be called from a formula. A function name starts with a letter or '_', and continues with letters, digits, '_' or '.'.\` + (y.name ? "" : " Add an '@name' tag to register it under another name."));
|
|
3337
|
+
return;
|
|
3338
|
+
}
|
|
3339
|
+
if (J && !n?.isBuiltIn && Qo(ee)) {
|
|
3340
|
+
const D = y.name ? \`'@name \${y.name}'\` : \`'\${ee}'\`;
|
|
3341
|
+
c(s.name ?? s, w.InvalidName, \`'\${f}': \${D} cannot be called from a formula. It reads as a cell address.\` + (y.name ? "" : " Add an '@name' tag to register it under another name."));
|
|
3342
|
+
return;
|
|
3343
|
+
}
|
|
3344
|
+
const ge = l.get(ee.toUpperCase());
|
|
3345
|
+
if (ge !== void 0) {
|
|
3346
|
+
c(s.name ?? s, w.DuplicateName, \`'\${f}': '\${ee}' is already the name of '\${ge}' in this module.\`);
|
|
3347
|
+
return;
|
|
3348
|
+
}
|
|
3349
|
+
if (l.set(ee.toUpperCase(), f), J && o?.has(ee.toUpperCase())) {
|
|
3350
|
+
c(s.name ?? s, w.BuiltInName, \`'\${ee}' is a built-in function. Choose a different name - a calculation function cannot replace a built-in.\`);
|
|
3351
|
+
return;
|
|
3352
|
+
}
|
|
3353
|
+
if (J) {
|
|
3354
|
+
const D = y.parameters ?? {};
|
|
3355
|
+
for (const [_, $] of Object.entries(D)) if (!V.has(_) && !$.description) {
|
|
3356
|
+
const ne = F.get(_);
|
|
3357
|
+
h(ne, w.MissingParamDescription, "warning", \`'\${f}': parameter '\${_}' is missing a description. Add an '@param \${_}' tag.\`);
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
a.push([d, y]);
|
|
3361
|
+
} catch (E) {
|
|
3362
|
+
c(s, w.ParseError, \`'\${f}': \${E.message}\`);
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
});
|
|
3366
|
+
} catch (s) {
|
|
3367
|
+
c(void 0, w.ParseError, \`Unable to analyze module: \${s?.message ?? s}\`);
|
|
3368
|
+
}
|
|
3369
|
+
return {
|
|
3370
|
+
functions: a,
|
|
3371
|
+
autoRun: u,
|
|
3372
|
+
diagnostics: i
|
|
3373
|
+
};
|
|
3374
|
+
}
|
|
3375
|
+
const Ve = "__SHEETXL";
|
|
3376
|
+
var na = /* @__PURE__ */ Zt({ initialize: () => oa });
|
|
3377
|
+
async function oa() {
|
|
3378
|
+
return Te || (Te = new Promise(async (e, t) => {
|
|
3379
|
+
try {
|
|
3380
|
+
const r = "0.20.2", n = \`https://esm.sh/esbuild-wasm@\${r}\`, o = \`https://esm.sh/esbuild-wasm@\${r}/esbuild.wasm\`, a = (await import(
|
|
3381
|
+
/* webpackIgnore: true */
|
|
3382
|
+
/* @vite-ignore */
|
|
3383
|
+
n
|
|
3384
|
+
)).default;
|
|
3385
|
+
await a.initialize({
|
|
3386
|
+
wasmURL: o,
|
|
3387
|
+
worker: !1
|
|
3388
|
+
}), e(a);
|
|
3389
|
+
} catch (r) {
|
|
3390
|
+
console.error("Error initializing esbuild:", r), Te = null, t(new Error("The script bundler could not be loaded. Check your connection and try again.", { cause: r }));
|
|
3391
|
+
}
|
|
3392
|
+
}), Te);
|
|
3393
|
+
}
|
|
3394
|
+
var Te, aa = Yt((() => {
|
|
3395
|
+
Te = null;
|
|
3396
|
+
}));
|
|
3397
|
+
let xe = null, Ue = null;
|
|
3398
|
+
async function ia() {
|
|
3399
|
+
if (xe) return xe;
|
|
3400
|
+
if (Ue) {
|
|
3401
|
+
if (await Ue, !xe) throw new Error("ESBuild initialization promise resolved, but instance is not available.");
|
|
3402
|
+
return xe;
|
|
3403
|
+
}
|
|
3404
|
+
let e, t;
|
|
3405
|
+
Ue = new Promise((r, n) => {
|
|
3406
|
+
e = r, t = n;
|
|
3407
|
+
});
|
|
3408
|
+
try {
|
|
3409
|
+
const { initialize: r } = await Promise.resolve().then(() => (aa(), na));
|
|
3410
|
+
return xe = await r(), e(), xe;
|
|
3411
|
+
} catch (r) {
|
|
3412
|
+
throw console.error("Failed to import or initialize esbuild:", r), Ue = null, t(r), r;
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
const la = { compilerOptions: { target: "esnext" } };
|
|
3416
|
+
async function sa(e, t, r = "/script.js", n = Ve) {
|
|
3417
|
+
try {
|
|
3418
|
+
const o = await ia(), a = "@sheetxl/primitives", l = \`
|
|
3419
|
+
export const FormulaContext = globalThis.\${n}?.FormulaContext;
|
|
3420
|
+
export const ScalarType = globalThis.\${n}?.ScalarType;
|
|
3421
|
+
export const Observable = globalThis.\${n}?.Observable;
|
|
3422
|
+
export const IRange = globalThis.\${n}?.IRange;
|
|
3423
|
+
export const FormulaError = globalThis.\${n}?.FormulaError;
|
|
3424
|
+
// Add more exports as needed
|
|
3425
|
+
\`, i = await o.build({
|
|
3426
|
+
entryPoints: [r],
|
|
3427
|
+
bundle: !0,
|
|
3428
|
+
write: !1,
|
|
3429
|
+
format: "esm",
|
|
3430
|
+
plugins: [{
|
|
3431
|
+
name: "sheetxl-esbuild-in-memory",
|
|
3432
|
+
setup(u) {
|
|
3433
|
+
const p = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();
|
|
3434
|
+
u.onResolve({ filter: new RegExp(\`^(\${r.replace("/", "\\\\/")}|\${a})$\`) }, (h) => ({
|
|
3435
|
+
path: h.path,
|
|
3436
|
+
namespace: p
|
|
3437
|
+
})), u.onResolve({ filter: /.*/ }, (h) => {
|
|
3438
|
+
if (h.namespace !== p) return console.warn(\`esbuild: Treating import "\${h.path}" as external.\`), {
|
|
3439
|
+
path: h.path,
|
|
3440
|
+
external: !0
|
|
3441
|
+
};
|
|
3442
|
+
}), u.onLoad({
|
|
3443
|
+
filter: /.*/,
|
|
3444
|
+
namespace: p
|
|
3445
|
+
}, (h) => {
|
|
3446
|
+
let c;
|
|
3447
|
+
if (h.path === r) c = t;
|
|
3448
|
+
else if (h.path === a) c = l;
|
|
3449
|
+
else return { errors: [{ text: \`Cannot load unknown path in \${p}: \${h.path}\` }] };
|
|
3450
|
+
return {
|
|
3451
|
+
contents: c,
|
|
3452
|
+
loader: "ts"
|
|
3453
|
+
};
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
}],
|
|
3457
|
+
sourcemap: "inline",
|
|
3458
|
+
tsconfigRaw: la,
|
|
3459
|
+
minify: !0,
|
|
3460
|
+
platform: "neutral"
|
|
3461
|
+
});
|
|
3462
|
+
if (i.outputFiles && i.outputFiles.length > 0) return i.outputFiles[0].text;
|
|
3463
|
+
throw i.errors && i.errors.length > 0 ? /* @__PURE__ */ new Error(\`esbuild bundling failed: \${i.errors.map((u) => u.text).join(\`
|
|
3464
|
+
\`)}\`) : /* @__PURE__ */ new Error("esbuild did not produce an output file.");
|
|
3465
|
+
} catch (o) {
|
|
3466
|
+
throw console.error("esbuild bundling process failed:", o), o;
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
function ca(e, t, r) {
|
|
3470
|
+
return (n) => {
|
|
3471
|
+
const o = n.factory, a = () => o.createExpressionStatement(o.createCallChain(o.createPropertyAccessExpression(o.createIdentifier(Ve), "checkRun"), o.createToken(e.SyntaxKind.QuestionDotToken), void 0, [o.createStringLiteral(t), o.createNumericLiteral(r)])), l = (c) => {
|
|
3472
|
+
const g = c.statements;
|
|
3473
|
+
let T = 0;
|
|
3474
|
+
for (; T < g.length && e.isExpressionStatement(g[T]) && e.isStringLiteral(g[T].expression);) T++;
|
|
3475
|
+
return o.updateBlock(c, [
|
|
3476
|
+
...g.slice(0, T),
|
|
3477
|
+
a(),
|
|
3478
|
+
...g.slice(T)
|
|
3479
|
+
]);
|
|
3480
|
+
}, i = (c) => e.isBlock(c) ? l(c) : o.createBlock([a(), c], !0), u = (c) => e.isBlock(c) ? l(c) : o.createBlock([a(), o.createReturnStatement(c)], !0), p = (c) => e.isForStatement(c) || e.isForInStatement(c) || e.isForOfStatement(c) || e.isWhileStatement(c) || e.isDoStatement(c), h = (c) => {
|
|
3481
|
+
if (p(c)) {
|
|
3482
|
+
const g = c.statement;
|
|
3483
|
+
return e.visitEachChild(c, (T) => {
|
|
3484
|
+
const I = h(T);
|
|
3485
|
+
return T === g ? i(I) : I;
|
|
3486
|
+
}, n);
|
|
3487
|
+
}
|
|
3488
|
+
if (e.isFunctionLike(c) && c.body) {
|
|
3489
|
+
const g = c.body;
|
|
3490
|
+
return e.visitEachChild(c, (T) => {
|
|
3491
|
+
const I = h(T);
|
|
3492
|
+
return T === g ? u(I) : I;
|
|
3493
|
+
}, n);
|
|
3494
|
+
}
|
|
3495
|
+
return e.visitEachChild(c, h, n);
|
|
3496
|
+
};
|
|
3497
|
+
return (c) => e.visitNode(c, h);
|
|
3498
|
+
};
|
|
3499
|
+
}
|
|
3500
|
+
const ua = /* @__PURE__ */ new Set(["TS2339", "TS2551"]), da = "TS2774";
|
|
3501
|
+
function fa(e, t, r) {
|
|
3502
|
+
let n = null;
|
|
3503
|
+
const o = (a) => {
|
|
3504
|
+
r < a.getStart(t) || r >= a.end || (a.getStart(t) === r && (n = a), e.forEachChild(a, o));
|
|
3505
|
+
};
|
|
3506
|
+
return e.forEachChild(t, o), n;
|
|
3507
|
+
}
|
|
3508
|
+
const pa = (e, t) => t.kind === e.SyntaxKind.NullKeyword || e.isIdentifier(t) && t.text === "undefined";
|
|
3509
|
+
function ma(e, t) {
|
|
3510
|
+
const r = t.parent;
|
|
3511
|
+
if (!r || !e.isPropertyAccessExpression(r) || r.name !== t) return !1;
|
|
3512
|
+
let n = r, o = r.parent;
|
|
3513
|
+
for (; o && (e.isParenthesizedExpression(o) || e.isNonNullExpression(o));) n = o, o = o.parent;
|
|
3514
|
+
if (!o) return !1;
|
|
3515
|
+
if ((e.isCallExpression(o) || e.isPropertyAccessExpression(o) || e.isElementAccessExpression(o)) && o.expression === n) return !!o.questionDotToken;
|
|
3516
|
+
if (e.isTypeOfExpression(o)) return !0;
|
|
3517
|
+
if (e.isPrefixUnaryExpression(o)) return o.operator === e.SyntaxKind.ExclamationToken;
|
|
3518
|
+
if (e.isConditionalExpression(o)) return o.condition === n;
|
|
3519
|
+
if (e.isIfStatement(o) || e.isWhileStatement(o) || e.isDoStatement(o)) return o.expression === n;
|
|
3520
|
+
if (e.isBinaryExpression(o)) {
|
|
3521
|
+
const a = o.operatorToken.kind, l = e.SyntaxKind;
|
|
3522
|
+
if (a === l.AmpersandAmpersandToken || a === l.BarBarToken || a === l.QuestionQuestionToken) return o.left === n;
|
|
3523
|
+
if (a === l.EqualsEqualsEqualsToken || a === l.ExclamationEqualsEqualsToken || a === l.EqualsEqualsToken || a === l.ExclamationEqualsToken) return pa(e, o.left === n ? o.right : o.left);
|
|
3524
|
+
}
|
|
3525
|
+
return !1;
|
|
3526
|
+
}
|
|
3527
|
+
function ga(e, t, r) {
|
|
3528
|
+
const n = [];
|
|
3529
|
+
for (const o of r) if (o.code !== w.MissingType) if (o.severity !== "error") n.push(o);
|
|
3530
|
+
else if (o.code === da) n.push({
|
|
3531
|
+
...o,
|
|
3532
|
+
severity: "warning"
|
|
3533
|
+
});
|
|
3534
|
+
else if (ua.has(o.code)) {
|
|
3535
|
+
const a = fa(e, t, o.start);
|
|
3536
|
+
n.push(a && ma(e, a) ? {
|
|
3537
|
+
...o,
|
|
3538
|
+
severity: "warning",
|
|
3539
|
+
message: \`\${o.message} Read as a probe, it is undefined.\`
|
|
3540
|
+
} : o);
|
|
3541
|
+
} else n.push(o);
|
|
3542
|
+
return n;
|
|
3543
|
+
}
|
|
3544
|
+
const Ht = "//# sourceMappingURL";
|
|
3545
|
+
var Wr = /* @__PURE__ */ Zt({
|
|
3546
|
+
initialize: () => ha,
|
|
3547
|
+
readLibFile: () => ya
|
|
3548
|
+
});
|
|
3549
|
+
async function ha() {
|
|
3550
|
+
return Ce || (Ce = new Promise(async (e, t) => {
|
|
3551
|
+
let r = null;
|
|
3552
|
+
try {
|
|
3553
|
+
r = await import(
|
|
3554
|
+
/* webpackIgnore: true */
|
|
3555
|
+
/* @vite-ignore */
|
|
3556
|
+
"https://esm.sh/typescript@5.7.2"
|
|
3557
|
+
);
|
|
3558
|
+
} catch (n) {
|
|
3559
|
+
console.error("Error initializing Browser TypeScript module:", n);
|
|
3560
|
+
}
|
|
3561
|
+
r || (console.log("use script fallback"), Ce = null), e(r);
|
|
3562
|
+
}), Ce);
|
|
3563
|
+
}
|
|
3564
|
+
function ya(e, t) {}
|
|
3565
|
+
var Ce, Jr = Yt((() => {
|
|
3566
|
+
Ce = null;
|
|
3567
|
+
}));
|
|
3568
|
+
const wa = \`
|
|
3569
|
+
/**
|
|
3570
|
+
* Represents the completion of an asynchronous operation
|
|
3571
|
+
*/
|
|
3572
|
+
interface Promise<T> {
|
|
3573
|
+
/**
|
|
3574
|
+
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
|
|
3575
|
+
* resolved value cannot be modified from the callback.
|
|
3576
|
+
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
|
3577
|
+
* @returns A Promise for the completion of the callback.
|
|
3578
|
+
*/
|
|
3579
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
3580
|
+
}
|
|
3581
|
+
\`, ba = \`
|
|
3582
|
+
interface FirstTest {
|
|
3583
|
+
isTrue?: boolean;
|
|
3584
|
+
}
|
|
3585
|
+
\`, Sa = async () => ba;
|
|
3586
|
+
let je = null;
|
|
3587
|
+
const rt = "sheetxl.d.ts", Wt = "sheetxl-modules.d.ts", Ea = \`declare module '@sheetxl/primitives' { export = SheetXL; }
|
|
3588
|
+
\`, va = [
|
|
3589
|
+
"lib.webworker.d.ts",
|
|
3590
|
+
"lib.es2020.d.ts",
|
|
3591
|
+
"lib.esnext.asynciterable.d.ts"
|
|
3592
|
+
], Jt = /* @__PURE__ */ new Map();
|
|
3593
|
+
let nt = null, ot = null;
|
|
3594
|
+
async function xa() {
|
|
3595
|
+
return ot || (ot = Promise.resolve().then(() => (Jr(), Wr)).then(async (e) => {
|
|
3596
|
+
const t = await Yr();
|
|
3597
|
+
return e.readLibFile(t, "lib.es5.d.ts") !== void 0 ? e.readLibFile : null;
|
|
3598
|
+
})), ot;
|
|
3599
|
+
}
|
|
3600
|
+
async function Yr() {
|
|
3601
|
+
if (je) return je;
|
|
3602
|
+
try {
|
|
3603
|
+
const e = await (await Promise.resolve().then(() => (Jr(), Wr))).initialize();
|
|
3604
|
+
if (!e) throw new Error("TypeScript could not be loaded. Check your connection and try again.");
|
|
3605
|
+
return e;
|
|
3606
|
+
} catch (e) {
|
|
3607
|
+
throw je = null, e;
|
|
3608
|
+
} finally {
|
|
3609
|
+
je = null;
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
async function Ta(e) {
|
|
3613
|
+
const t = e?.source ?? null;
|
|
3614
|
+
if (!t) return {
|
|
3615
|
+
module: null,
|
|
3616
|
+
diagnostics: []
|
|
3617
|
+
};
|
|
3618
|
+
const r = (e.disableBundle || e.declarationsOnly) ?? !1, [n, o, a] = await Promise.all([
|
|
3619
|
+
Sa(),
|
|
3620
|
+
Yr(),
|
|
3621
|
+
e.ambientTypes ? xa() : null
|
|
3622
|
+
]), l = a ? e.ambientTypes ?? null : null;
|
|
3623
|
+
let i = "";
|
|
3624
|
+
const u = {
|
|
3625
|
+
allowJs: !0,
|
|
3626
|
+
declaration: !1,
|
|
3627
|
+
sourceMap: !1,
|
|
3628
|
+
inlineSourceMap: !1,
|
|
3629
|
+
inlineSources: !1,
|
|
3630
|
+
isolatedModules: !0,
|
|
3631
|
+
preserveConstEnums: !1,
|
|
3632
|
+
module: 99,
|
|
3633
|
+
noResolve: !0,
|
|
3634
|
+
emitDeclarationOnly: !1,
|
|
3635
|
+
target: o.ScriptTarget.ES2020,
|
|
3636
|
+
...l ? {
|
|
3637
|
+
lib: va,
|
|
3638
|
+
skipLibCheck: !0,
|
|
3639
|
+
strict: !0
|
|
3640
|
+
} : {},
|
|
3641
|
+
...l && e.lenient ? { noImplicitAny: !1 } : {}
|
|
3642
|
+
}, p = "script", h = \`\${p}.ts\`, c = "lib.d.ts", g = "global.d.ts", T = {
|
|
3643
|
+
[h]: t,
|
|
3644
|
+
[c]: wa,
|
|
3645
|
+
[g]: n,
|
|
3646
|
+
...l ? {
|
|
3647
|
+
[rt]: l,
|
|
3648
|
+
[Wt]: Ea
|
|
3649
|
+
} : {}
|
|
3650
|
+
}, I = (d) => T[d] ?? (a && d.startsWith("lib.") ? a(o, d) : void 0), M = {
|
|
3651
|
+
getSourceFile: (d, y, E, L) => {
|
|
3652
|
+
if (d === rt) return nt?.text !== l && (nt = {
|
|
3653
|
+
text: l,
|
|
3654
|
+
file: o.createSourceFile(d, l, o.ScriptTarget.Latest, !1)
|
|
3655
|
+
}), nt.file;
|
|
3656
|
+
if (T[d] === void 0) {
|
|
3657
|
+
let j = Jt.get(d);
|
|
3658
|
+
if (!j) {
|
|
3659
|
+
const O = I(d);
|
|
3660
|
+
if (O === void 0) return;
|
|
3661
|
+
j = o.createSourceFile(d, O, o.ScriptTarget.Latest, !1), Jt.set(d, j);
|
|
3662
|
+
}
|
|
3663
|
+
return j;
|
|
3664
|
+
}
|
|
3665
|
+
return o.createSourceFile(d, T[d], o.ScriptTarget.Latest, !0);
|
|
3666
|
+
},
|
|
3667
|
+
fileExists: (d) => I(d) !== void 0,
|
|
3668
|
+
readFile: I,
|
|
3669
|
+
writeFile: (d, y) => {
|
|
3670
|
+
T[d] = y;
|
|
3671
|
+
},
|
|
3672
|
+
getCurrentDirectory: () => "./",
|
|
3673
|
+
getCanonicalFileName: (d) => d,
|
|
3674
|
+
useCaseSensitiveFileNames: () => !0,
|
|
3675
|
+
getDefaultLibFileName: (d) => c,
|
|
3676
|
+
getNewLine: () => \`
|
|
3677
|
+
\`
|
|
3678
|
+
}, q = o.createProgram([
|
|
3679
|
+
h,
|
|
3680
|
+
g,
|
|
3681
|
+
...l ? [rt, Wt] : []
|
|
3682
|
+
], u, M), v = q.getTypeChecker(), C = q.getSourceFile(h), R = e.runGuard;
|
|
3683
|
+
q.emit(void 0, void 0, void 0, void 0, R ? { before: [ca(o, R.key, R.timeoutMs)] } : void 0), i = T[\`\${p}.js\`] ?? "";
|
|
3684
|
+
const U = (d) => ({
|
|
3685
|
+
start: d.start ?? 0,
|
|
3686
|
+
length: d.length ?? 0,
|
|
3687
|
+
severity: d.category === o.DiagnosticCategory.Warning ? "warning" : "error",
|
|
3688
|
+
code: \`TS\${d.code}\`,
|
|
3689
|
+
message: o.flattenDiagnosticMessageText(d.messageText, \`
|
|
3690
|
+
\`)
|
|
3691
|
+
}), Z = q.getSyntacticDiagnostics(C).map(U), P = l ? q.getSemanticDiagnostics(C).filter((d) => d.category === o.DiagnosticCategory.Error || d.category === o.DiagnosticCategory.Warning).map(U) : [], N = ra(o, C, v, {
|
|
3692
|
+
builtInNames: e.builtInNames,
|
|
3693
|
+
isBuiltIn: e.isBuiltIn,
|
|
3694
|
+
lenient: !!l && e.lenient
|
|
3695
|
+
});
|
|
3696
|
+
let k = [
|
|
3697
|
+
...Z,
|
|
3698
|
+
...P,
|
|
3699
|
+
...N.diagnostics
|
|
3700
|
+
];
|
|
3701
|
+
l && e.lenient && (k = ga(o, C, k));
|
|
3702
|
+
const pe = N.functions, W = N.autoRun, Ge = k.some((d) => d.severity === "error"), qe = \`\${Qt.uuidV4()}-script\`;
|
|
3703
|
+
let s = null;
|
|
3704
|
+
if (Ge) i = "";
|
|
3705
|
+
else {
|
|
3706
|
+
try {
|
|
3707
|
+
r || (i = await sa(o, i, p));
|
|
3708
|
+
} catch {
|
|
3709
|
+
console.warn("Error bundling script");
|
|
3710
|
+
}
|
|
3711
|
+
const d = i.indexOf(Ht);
|
|
3712
|
+
d > -1 && (s = i.substring(d + 20 + 1, i.length), i = i.substring(0, d), i = i.replaceAll("globalThis.__SHEETXL", Ve));
|
|
3713
|
+
}
|
|
3714
|
+
const f = {
|
|
3715
|
+
functions: pe,
|
|
3716
|
+
commitId: qe,
|
|
3717
|
+
source: t,
|
|
3718
|
+
language: "typescript",
|
|
3719
|
+
compiled: i
|
|
3720
|
+
};
|
|
3721
|
+
return s && (f.sourceMap = s), W && (f.autoRun = W), {
|
|
3722
|
+
module: f,
|
|
3723
|
+
diagnostics: k
|
|
3724
|
+
};
|
|
3725
|
+
}
|
|
3726
|
+
self.addEventListener("message", async (e) => {
|
|
3727
|
+
const { id: t, params: r } = e.data;
|
|
3728
|
+
try {
|
|
3729
|
+
const n = await Ta(r);
|
|
3730
|
+
self.postMessage({
|
|
3731
|
+
id: t,
|
|
3732
|
+
result: n,
|
|
3733
|
+
error: null
|
|
3734
|
+
});
|
|
3735
|
+
} catch (n) {
|
|
3736
|
+
self.postMessage({
|
|
3737
|
+
id: t,
|
|
3738
|
+
result: null,
|
|
3739
|
+
error: {
|
|
3740
|
+
message: n.message,
|
|
3741
|
+
stack: n.stack,
|
|
3742
|
+
cause: n.cause
|
|
3743
|
+
}
|
|
3744
|
+
});
|
|
3745
|
+
}
|
|
3746
|
+
});
|
|
3747
|
+
`,r=typeof self<`u`&&self.Blob&&new Blob([`URL.revokeObjectURL(import.meta.url);`,n],{type:`text/javascript;charset=utf-8`});function i(e){let t;try{if(t=r&&(self.URL||self.webkitURL).createObjectURL(r),!t)throw``;let n=new Worker(t,{type:`module`,name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(n),{type:`module`,name:e?.name})}}var a=async()=>{let{compileModule:e}=await Promise.resolve().then(()=>require("./BxFSy-hOEbyllj-r2.cjs")),n=new t(t=>e(t));return await n.start(),n};exports.createCompilerWorker=async function(){if(globalThis.process?.versions?.node&&typeof Worker>`u`)return await a();if(typeof Worker<`u`){let t=new e(()=>new i);try{return await t.start(),t}catch(e){console.error(`Failed to start TypescriptCompiler worker reverting to fallback:`,e)}}return await a()};
|