@sheetxl/studio-vanilla 0.6.5 → 0.6.7
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/{CuyqWl8TtYPE7cas.cjs → B-RS05VornOldrL9.cjs} +2 -2
- package/browser/cjs/{DBLgeCJrYVDDlTYO.cjs → B3IYNI3z6mcbe3EI.cjs} +1 -1
- package/browser/cjs/{CEuy5mrMYYaKilHh.cjs → B3htTp6BdTpcwfc-.cjs} +1 -1
- package/browser/cjs/{CFep85kcTTZiLq1s.cjs → B5hu9_FYVC-RLOgi.cjs} +1 -1
- package/browser/cjs/{z9Nd8o1UXeSTjADs.cjs → B5vtgM0_WVTv1zKa.cjs} +12 -12
- package/browser/cjs/{CWqY5qD9F8ejqlhn.cjs → B8X707JrwtMd0Eyo.cjs} +1 -1
- package/browser/cjs/B9gppe9yylOBVjlO.cjs +11 -0
- package/browser/cjs/{Dn2j4hs3RfBXCOAB.cjs → BC5hMfP9nDp-FX8w.cjs} +2 -2
- package/browser/cjs/{OVBBMnz7U1N8Auls.cjs → BDQTloR6ySF1oJmn.cjs} +5 -5
- package/browser/cjs/BGmWpUqfmKTMUMGn.cjs +7 -0
- package/browser/cjs/BKUqPcB-J7lrb6tK.cjs +16 -0
- package/browser/cjs/BOGPmlcdjsR1qGaw.cjs +12 -0
- package/browser/cjs/Bm0v2rjm2HlzxhYA.cjs +6 -0
- package/browser/cjs/{DEYDql7M3QlI-qyY.cjs → Boc6wJysGvzcubzE.cjs} +1 -1
- package/browser/cjs/Bu-QtkFZAjl5aqEZ.cjs +42 -0
- package/browser/cjs/Bu5RUSGc8vWvj5h1.cjs +7 -0
- package/browser/cjs/{o9UvxolVM8N5j5LT.cjs → Bz6AFqV-iXwN2WXy.cjs} +1 -1
- package/browser/cjs/{D-yGu0GKJTlWjCxV.cjs → BzjDXtPtypjn5O_r.cjs} +1 -1
- package/browser/cjs/CCqgQpZBR5wOpyiV.cjs +14 -0
- package/browser/cjs/CD_immjTuT8VP5bS.cjs +6 -0
- package/browser/cjs/CI-H71iwfm3NKxMS.cjs +124 -0
- package/browser/cjs/CIJw5emAR2nvDIDj.cjs +161 -0
- package/browser/cjs/{BsohAXSW9Zd3K4Gg.cjs → CLnjehFtQBLSaonl.cjs} +2 -2
- package/browser/cjs/CVq2lRYh2ZK9ZzEp.cjs +15 -0
- package/browser/cjs/{DapbHy2lgBdWLWXl.cjs → CaKK8Dpj8rxVd-Wo.cjs} +1 -1
- package/browser/cjs/{D9EkzEeAA8NvFlem.cjs → CbGqtIkA64SUCGEX.cjs} +1 -1
- package/browser/cjs/{Cbnj0TlUbiPA_cBl.cjs → CnlXlI3wOKu-GDWY.cjs} +3 -3
- package/browser/cjs/{fzltUv7k3g_41akR.cjs → CvXAxxhFkfbMd1H8.cjs} +1 -1
- package/browser/cjs/Cx89ds7YFppm4HH8.cjs +330 -0
- package/browser/cjs/{3khn6THwfFkU5jiH.cjs → D66WJ7L44lH-gqEs.cjs} +2 -2
- package/browser/cjs/{BQqQus7GNCcRanky.cjs → D7gvl_LJVORCBWTA.cjs} +1 -1
- package/browser/cjs/DCFKfo0Ks_YcBE8v.cjs +145 -0
- package/browser/cjs/{BgBZia5f0ckQO3tv.cjs → DD1C5KAehYscPt_U.cjs} +1 -1
- package/browser/cjs/{DsfbagZuh7gCZyZ8.cjs → DDRMd_y3PtDFdzBi.cjs} +2 -2
- package/browser/cjs/DF5NXM1lV0Jz4B1B.cjs +6 -0
- package/browser/cjs/{CJRGbGQR903TfsX2.cjs → DJi6RguPp8dklFKW.cjs} +1 -1
- package/browser/cjs/{B1YRBQSzaSCXrDlD.cjs → DOZnkhk5efb0CiB9.cjs} +2 -2
- package/browser/cjs/DR_fZ7-8acyZaLf_.cjs +19 -0
- package/browser/cjs/{CT96vwef1frE_xO5.cjs → DU-89orbH_T7qaL_.cjs} +2 -2
- package/browser/cjs/{DeRclvX0tjcH-5d2.cjs → DUn4qKP1csajZc4U.cjs} +1 -1
- package/browser/cjs/{BzFcYUyBS3xk7vSt.cjs → DXlz9YcBEiIGssXP.cjs} +1 -1
- package/browser/cjs/DrjMGXXyOnkOigI3.cjs +6 -0
- package/browser/cjs/{DzjzjVrsJAiGWj9X.cjs → Dsrylhr0rINLqxIo.cjs} +2 -2
- package/browser/cjs/{BnVqC38vXnNaYwta.cjs → DuF2g76E_LpdsOdz.cjs} +1 -1
- package/browser/cjs/{C9mIuhpLiGvTMK3B.cjs → DutZZ9gvn9J4bp35.cjs} +1 -1
- package/browser/cjs/{ZZZZKdW69P9OmQK5.cjs → G3x4UlaZ9MkYVc_H.cjs} +1 -1
- package/browser/cjs/{DactbGy-IDnFmHL7.cjs → JDc0LRRyF9OoLcKS.cjs} +1 -1
- package/browser/cjs/{k4_Gtj0ee7QZfher.cjs → NLVU73SQVRkwS4d0.cjs} +1 -1
- package/browser/cjs/{e4hIpC2H8SZs_FaH.cjs → VbpW0QWkLYTAJZ9w.cjs} +1 -1
- package/browser/cjs/WWBhcM7q4pZnnMeY.cjs +6 -0
- package/browser/cjs/{BndRovkKEbGeFsIH.cjs → ZF7PNrdu1G2yTlSk.cjs} +1 -1
- package/browser/cjs/_GxFAa8FZ2HuEH-n.cjs +15 -0
- package/browser/cjs/{x7GV7VCCkhxBkRVr.cjs → cr5ZnpTRS8qn8ngu.cjs} +2 -2
- package/browser/cjs/{BbqDvLB4XRAq8PjK.cjs → dL8JD9YUPUIBdJkl.cjs} +1 -1
- package/browser/cjs/{Dx_G16YNQRCCsesH.cjs → hvq3aBxxvks6uvKj.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{B3PJcVj-IGm2RK7S.cjs → nJzfcdG4V6pfF7h0.cjs} +5 -5
- package/browser/cjs/{BYe6FaSGXohfwifR.cjs → v338k5Im1PgN694P.cjs} +1 -1
- package/browser/esm/{CqSQOGGwktiMRz1z.mjs → 282jouDV7h31MJHQ.mjs} +5 -5
- package/{cdn/assets/CJN-uFq_MoeA5VM-.js → browser/esm/321FigfSIHj07fJF.mjs} +1 -1
- package/browser/esm/{DmZ4vbOEMyG1LvTc.mjs → 9MIReimVqrwIxqEh.mjs} +1 -1
- package/{cdn/assets/B9rnABCK7K6EEcUc.js → browser/esm/B-gztIZ7YM5iJ3wt.mjs} +17 -17
- package/browser/esm/{C50gVw8rEDbiul-B.mjs → B2OboXsiOvfvb8MH.mjs} +1 -1
- package/{cdn/assets/Ciwk37oa-xAQO86p.js → browser/esm/B9MJ-EmRjSDTv1w4.mjs} +1 -1
- package/browser/esm/{MMr5Kq6qb0K9sPfX.mjs → BISAvXzk3EtsunSD.mjs} +2 -2
- package/{cdn/assets/DoOlH6JiH7WXd0Qg.js → browser/esm/BJvO68MxNlLVN11J.mjs} +4 -4
- package/browser/esm/{CN5ju_1W5NIt_JCQ.mjs → BcB6Q7VGZgUIWt2j.mjs} +4 -4
- package/browser/esm/{BMNrxDrMdnAXIAiO.mjs → Bd38h6XDigUqNbcg.mjs} +67 -67
- package/browser/esm/{DngFb_8sfEsFaHaQ.mjs → Bivu8-qvZh-EDNQz.mjs} +1 -1
- package/browser/esm/{BNzwQyGLGh1tjzhn.mjs → Bw8K2kVeFl_Jw0P0.mjs} +1 -1
- package/browser/esm/{eiBFvjjW2dDKZjOF.mjs → C19ecRqHKBtGZDfI.mjs} +12 -12
- package/browser/esm/{BCS2lE8-uzpKYINn.mjs → C3qEhTp5YVVnZe5X.mjs} +7 -7
- package/browser/esm/{D4HHHmz1LQD5ETIe.mjs → CG-xcWmpigeW_Kx8.mjs} +168 -168
- package/browser/esm/{hdg94KDLbrr748yN.mjs → CI7wOlrf3eE6yN7V.mjs} +586 -586
- package/browser/esm/{CrpsPARYIAfu5oHf.mjs → CKFK8GcprNVEDHNa.mjs} +357 -356
- package/{cdn/assets/CJim-5oZhpIg7Vf4.js → browser/esm/CKfqzGFvOATXIjAg.mjs} +1 -1
- package/{cdn/assets/DGLvDjF4Ltazle05.js → browser/esm/CYyb69OWQjTFKZv7.mjs} +1 -1
- package/browser/esm/{VUyduI-iwcib6hbK.mjs → Ca3LaiFQ9rDcFlEo.mjs} +8 -8
- package/browser/esm/{DRXQI_U2zF18xL3R.mjs → Cawd10Vkye_QwId6.mjs} +2 -2
- package/{cdn/assets/BGrkjy07_4jYJwBH.js → browser/esm/CbJB9w-prfu6jjZ0.mjs} +1 -1
- package/browser/esm/{DbcUVpIOErroPO4b.mjs → CbXdVcSvxsdppPQ4.mjs} +75 -82
- package/browser/esm/{BXKAAavlpQcvnarE.mjs → CdwPs5lUbmC7U3Lf.mjs} +5 -5
- package/browser/esm/{BFDqHUU6NBrQYJ-F.mjs → Cl6khHlxvVnMqS0D.mjs} +7 -7
- package/browser/esm/{CXhxt8m9WX6gvLG1.mjs → Csz20JNLZYTSnN3K.mjs} +10 -10
- package/browser/esm/{JxKR3nJXui56hTBx.mjs → D1lQwvLcMPDvQDo3.mjs} +60 -60
- package/browser/esm/{BL9NSV4ILX2820PR.mjs → DAPBPRU-M2q2HiIn.mjs} +1 -1
- package/{cdn/assets/Dh_Pj2pa2DKQx8aH.js → browser/esm/DBR_WsF8TffwuBP5.mjs} +1 -1
- package/browser/esm/{DrQxuqUa-GmFG82t.mjs → DBW1hdmDRqaRvLdG.mjs} +1 -1
- package/browser/esm/{DBLTAEDLOALSC-7a.mjs → DFAD0oXlIppeZ1IQ.mjs} +6 -6
- package/{cdn/assets/C-SXSAOGAHA0bZUW.js → browser/esm/DFfg5BY06x9-h5wg.mjs} +34 -34
- package/browser/esm/{CdZXTJk-jNtcVXha.mjs → DH4lpkIZMn3CDh2L.mjs} +1 -1
- package/{cdn/assets/DeQHUGB9ottxRmbH.js → browser/esm/DJItiTiaGl2-0zAy.mjs} +1 -1
- package/browser/esm/{Ceq0QgfNVk9io8W8.mjs → DMOg-rB-O9FQsKkk.mjs} +5 -5
- package/{cdn/assets/CkCqmIbs1HHqbf34.js → browser/esm/DRygyzN5WothohKo.mjs} +1 -1
- package/browser/esm/{BxD3MYvWDk4f5t_w.mjs → DXNGyZw3edrDJuF1.mjs} +160 -160
- package/{cdn/assets/D8i0nz8-BvYAe8oj.js → browser/esm/DeG9MYnptEMw6Ci6.mjs} +1 -1
- package/browser/esm/{CAT2zqzqokcdysLX.mjs → Djig3YKXdV_mj88V.mjs} +193 -193
- package/browser/esm/{MqGfbbA-UIKBZ5Tg.mjs → Dm2C0SjlSYBZS9oV.mjs} +1 -1
- package/browser/esm/{DhfT1I2puhMG8qyB.mjs → DtMlg7r-7Kg2ayER.mjs} +1758 -1713
- package/{cdn/assets/CWPiSqGk_qGiuLTG.js → browser/esm/DvDXwlRVOM7de1QK.mjs} +1 -1
- package/browser/esm/{BSsqSjmoZaq9VjJ_.mjs → DxjMGNLar5dDlfH_.mjs} +1 -1
- package/{cdn/assets/DvN21qGioKQrYwy6.js → browser/esm/E33ZqiZAVm4cVSiH.mjs} +1 -1
- package/browser/esm/{C30vxb2B-wCWYHyT.mjs → I3vLnXgPWzkEMtym.mjs} +13 -13
- package/browser/esm/{DjMBFC3zWPemXx3O.mjs → K61zfEs7RrucoPnb.mjs} +15436 -15311
- package/browser/esm/{COCcNVFiLmqqNfVi.mjs → PgD4CyzbD_U5krXX.mjs} +1 -1
- package/{cdn/assets/CBnB_qT-UB_ZNgr9.js → browser/esm/PrQ3OVkLkyIlDEHZ.mjs} +38 -38
- package/{cdn/assets/DimykeZaWz3Rxvru.js → browser/esm/SvSuP9M_jWMrPq63.mjs} +1 -1
- package/browser/esm/{CjkleAGl3FPE0lTt.mjs → Zhy5PMTCSYaidSab.mjs} +9 -9
- package/browser/esm/{BtJtQbcCcJQwi2Ye.mjs → cJvqQx_I0x7ktXkn.mjs} +8 -8
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CiyMv2h97cqIcynz.mjs → jKFK6KscRWBH7tPf.mjs} +3 -3
- package/browser/esm/{CYgmtE8McBoj3TaY.mjs → lgGOpw-8ydsoTisK.mjs} +7 -7
- package/browser/esm/{DhKU9Oa9vYS0eExH.mjs → uKUM2sxpQwuh_nK7.mjs} +1 -1
- package/{cdn/assets/EWdHaNI3cfEdN2qZ.js → browser/esm/wDr5_PkewoAFIrSf.mjs} +17 -17
- package/{cdn/assets/TbcqA8k5V12hx--M.js → browser/esm/wLe5ErQZrZcWaars.mjs} +1 -1
- package/{cdn/assets/D2g6xWYtxhSSbeIg.js → browser/esm/zudk-msJM8N8TvQw.mjs} +1 -1
- package/{browser/esm/CJN-uFq_MoeA5VM-.mjs → cdn/assets/321FigfSIHj07fJF.js} +1 -1
- package/cdn/assets/{DCy4YIoci_md9gam.js → 90jiHAR6NVWs1jzk.js} +11 -11
- package/cdn/assets/{DmZ4vbOEMyG1LvTc.js → 9MIReimVqrwIxqEh.js} +1 -1
- package/cdn/assets/9Zm1kh3NR1JoshnB.js +22 -0
- package/{browser/esm/C_6cfOrpNv_R0fzp.mjs → cdn/assets/AWYiFPClRuayIl9x.js} +6 -6
- package/cdn/assets/{DMh4HTxSNspJWLf6.js → B-4pX265Exs8Q3Ic.js} +8 -8
- package/cdn/assets/{C50gVw8rEDbiul-B.js → B2OboXsiOvfvb8MH.js} +1 -1
- package/cdn/assets/{CKLIeTejFu3Chzc0.js → B4YJTAf0poVXP8L5.js} +2 -2
- package/{browser/esm/Ciwk37oa-xAQO86p.mjs → cdn/assets/B9MJ-EmRjSDTv1w4.js} +1 -1
- package/cdn/assets/{BcwnerrAZQ4U26yF.js → BCpiEapQ9ORxsm8i.js} +17 -17
- package/cdn/assets/{BLlBmq17Ns85SGIy.js → BDpsB4gB5WlFNaD9.js} +3 -3
- package/{browser/esm/DoOlH6JiH7WXd0Qg.mjs → cdn/assets/BJvO68MxNlLVN11J.js} +4 -4
- package/cdn/assets/{Bc88uy0uKB2E8nZF.js → BM7LiF_a2pzxiL9z.js} +9 -9
- package/cdn/assets/{DngFb_8sfEsFaHaQ.js → Bivu8-qvZh-EDNQz.js} +1 -1
- package/cdn/assets/{CONhxNzXu71azh3U.js → BoaBdKMl_TI4KOG4.js} +1 -1
- package/cdn/assets/{BNzwQyGLGh1tjzhn.js → Bw8K2kVeFl_Jw0P0.js} +1 -1
- package/cdn/assets/{DOL53NVAyIA3BCpu.js → BzNkHK2uCe3sZJjM.js} +3 -3
- package/cdn/assets/{CpzbAOY6S-fCGokT.js → C3Uwcfkr3Vxb1l6W.js} +3 -3
- package/cdn/assets/{DBySRnkeKApkqWoJ.js → C5PTWP3-CKX2W7rN.js} +4 -4
- package/cdn/assets/{Cr3aHpBRlCcE0133.js → C7NcQPRjBbbwZPYQ.js} +12 -12
- package/cdn/assets/{YDKdfPwqd5jfl-N0.js → CHbRDN7qNXFI7ERc.js} +10 -10
- package/cdn/assets/{hdg94KDLbrr748yN.js → CI7wOlrf3eE6yN7V.js} +586 -586
- package/cdn/assets/{CrpsPARYIAfu5oHf.js → CKFK8GcprNVEDHNa.js} +357 -356
- package/{browser/esm/CJim-5oZhpIg7Vf4.mjs → cdn/assets/CKfqzGFvOATXIjAg.js} +1 -1
- package/{browser/esm/DGLvDjF4Ltazle05.mjs → cdn/assets/CYyb69OWQjTFKZv7.js} +1 -1
- package/cdn/assets/{Boy7yvaVLE0PsPuH.js → C_xB0pERAopiMdvi.js} +2 -2
- package/cdn/assets/{BtXaxs1sazydxVbz.js → CaCiTJE2_MJc90Mb.js} +16388 -16263
- package/cdn/assets/{DAqZessyZO7y1dzE.js → Cavphgcoa0QAHI4t.js} +4 -4
- package/{browser/esm/BGrkjy07_4jYJwBH.mjs → cdn/assets/CbJB9w-prfu6jjZ0.js} +1 -1
- package/cdn/assets/{DbcUVpIOErroPO4b.js → CbXdVcSvxsdppPQ4.js} +75 -82
- package/cdn/assets/{B7YLlVtTf8SyjRxl.js → CxYYYES99eqMaXS6.js} +53 -53
- package/cdn/assets/{RgTun6OehOIz_L1Y.js → CyxLxezaPBJ7ttzY.js} +1758 -1713
- package/cdn/assets/{CrjpZUy5OEHTDbj6.js → D3Fizhhok4urArOz.js} +168 -168
- package/cdn/assets/{vcOEiIk1OYCnaDRj.js → D96I9AC-G_mJQ17A.js} +7 -7
- package/cdn/assets/{BitXsx5qKVZKyUTJ.js → D9ExW89xyL0Yg3Rt.js} +5 -5
- package/cdn/assets/{BL9NSV4ILX2820PR.js → DAPBPRU-M2q2HiIn.js} +1 -1
- package/{browser/esm/Dh_Pj2pa2DKQx8aH.mjs → cdn/assets/DBR_WsF8TffwuBP5.js} +1 -1
- package/cdn/assets/{DrQxuqUa-GmFG82t.js → DBW1hdmDRqaRvLdG.js} +1 -1
- package/cdn/assets/{CdZXTJk-jNtcVXha.js → DH4lpkIZMn3CDh2L.js} +1 -1
- package/{browser/esm/DeQHUGB9ottxRmbH.mjs → cdn/assets/DJItiTiaGl2-0zAy.js} +1 -1
- package/cdn/assets/{usddELzSbbsMIYFT.js → DNItKxoG_Q2f6LZH.js} +9 -9
- package/{browser/esm/CkCqmIbs1HHqbf34.mjs → cdn/assets/DRygyzN5WothohKo.js} +1 -1
- package/cdn/assets/{BIRDVeAokEioxEMg.js → DSEAFlw0g7QF2Mfu.js} +12 -12
- package/cdn/assets/{DX-j8vaA1R6x38jO.js → DU9-sbmPBpyK8ktC.js} +8 -8
- package/cdn/assets/{BfgS5gIABj2bHJof.js → D_F8ngmTDFKi26MZ.js} +69 -69
- package/{browser/esm/D8i0nz8-BvYAe8oj.mjs → cdn/assets/DeG9MYnptEMw6Ci6.js} +1 -1
- package/cdn/assets/{MqGfbbA-UIKBZ5Tg.js → Dm2C0SjlSYBZS9oV.js} +1 -1
- package/cdn/assets/{BNJIXyHxPjWIalrP.js → DoX3XAVH8Iy19wb6.js} +4 -4
- package/{browser/esm/CWPiSqGk_qGiuLTG.mjs → cdn/assets/DvDXwlRVOM7de1QK.js} +1 -1
- package/cdn/assets/{DALlODXPDn6BGsXV.js → DwjBlRF-rzuhl244.js} +26 -26
- package/cdn/assets/{BSsqSjmoZaq9VjJ_.js → DxjMGNLar5dDlfH_.js} +1 -1
- package/{browser/esm/DvN21qGioKQrYwy6.mjs → cdn/assets/E33ZqiZAVm4cVSiH.js} +1 -1
- package/{browser/esm/DSze70JHdAh2o4p9.mjs → cdn/assets/EFp9HFyLmGj1_WJp.js} +17 -17
- package/cdn/assets/{YyvEF1qZsZDaA58n.js → Gigloq__yXekS86R.js} +21 -21
- package/cdn/assets/{COCcNVFiLmqqNfVi.js → PgD4CyzbD_U5krXX.js} +1 -1
- package/{browser/esm/CBnB_qT-UB_ZNgr9.mjs → cdn/assets/PrQ3OVkLkyIlDEHZ.js} +38 -38
- package/{browser/esm/DimykeZaWz3Rxvru.mjs → cdn/assets/SvSuP9M_jWMrPq63.js} +1 -1
- package/cdn/assets/{B2NFKI-3rXb76mvP.js → WWXOc9ZGS04IoLgi.js} +160 -160
- package/cdn/assets/{BDCRKnCTXynByvqI.js → qg_xcC9otctUkCnM.js} +7 -7
- package/cdn/assets/{fMhtLphCYHJcJ0rQ.js → u2X7MYw3x6jMX0Hz.js} +195 -195
- package/cdn/assets/{DhKU9Oa9vYS0eExH.js → uKUM2sxpQwuh_nK7.js} +1 -1
- package/{browser/esm/EWdHaNI3cfEdN2qZ.mjs → cdn/assets/wDr5_PkewoAFIrSf.js} +17 -17
- package/{browser/esm/TbcqA8k5V12hx--M.mjs → cdn/assets/wLe5ErQZrZcWaars.js} +1 -1
- package/{browser/esm/D2g6xWYtxhSSbeIg.mjs → cdn/assets/zudk-msJM8N8TvQw.js} +1 -1
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/cjs/BH0JlnXxs_y9xAfD.cjs +0 -15
- package/browser/cjs/BIOXqmoH-9ZdUMHO.cjs +0 -15
- package/browser/cjs/BVefqxsvansu52pf.cjs +0 -19
- package/browser/cjs/BWzl7ZXSHwavO1h4.cjs +0 -6
- package/browser/cjs/C_nqx5jy0WdS5eUt.cjs +0 -14
- package/browser/cjs/CjaswnmozG1Wnkph.cjs +0 -161
- package/browser/cjs/Ck162yhI8a8AzP2Y.cjs +0 -6
- package/browser/cjs/DEd-uOI_8EwTswrZ.cjs +0 -6
- package/browser/cjs/DRa2LS1ZYygPeKIb.cjs +0 -145
- package/browser/cjs/Deuzq2vrUnAdRwxw.cjs +0 -330
- package/browser/cjs/DhZX40l9OVd1jfAd.cjs +0 -16
- package/browser/cjs/Dz-80wbKR9gluvY0.cjs +0 -124
- package/browser/cjs/LVJHt4cXqQ6d6uQv.cjs +0 -11
- package/browser/cjs/NOXwAG1U2GSI3--B.cjs +0 -42
- package/browser/cjs/PJxjbBQ6T_x_8d3R.cjs +0 -7
- package/browser/cjs/Rs4SPldcFaR25pkN.cjs +0 -6
- package/browser/cjs/Uy4-KgVmrHLJmZPY.cjs +0 -12
- package/browser/cjs/VMrvwITLckOb9OZJ.cjs +0 -6
- package/browser/cjs/oZeX-CFYY8CzIcSm.cjs +0 -7
- package/cdn/assets/DYF0w_-PnC9qTlpv.js +0 -22
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ce,ue,ne={},ee={},U={},oe={},H={};function Ne(){if(ue)return H;ue=1;var g=H&&H.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=H&&H.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(H,"__esModule",{value:!0}),H.JsDelivrSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return H.JsDelivrSourceResolver=j,H}var le,pe,he,N={},V={};function se(){if(pe)return le;function g(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function x(e,t){for(var o,n="",r=0,s=-1,l=0,f=0;f<=e.length;++f){if(f<e.length)o=e.charCodeAt(f);else{if(o===47)break;o=47}if(o===47){if(s!==f-1&&l!==1)if(s!==f-1&&l===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var D=n.lastIndexOf("/");if(D!==n.length-1){D===-1?(n="",r=0):r=(n=n.slice(0,D)).length-1-n.lastIndexOf("/"),s=f,l=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=f,l=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(s+1,f):n=e.slice(s+1,f),r=f-s-1;s=f,l=0}else o===46&&l!==-1?++l:l=-1}return n}pe=1;var j={resolve:function(){for(var e,t="",o=!1,n=arguments.length-1;n>=-1&&!o;n--){var r;n>=0?r=arguments[n]:(e===void 0&&(e=process.cwd()),r=e),g(r),r.length!==0&&(t=r+"/"+t,o=r.charCodeAt(0)===47)}return t=x(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(g(e),e.length===0)return".";var t=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return(e=x(e,!t)).length!==0||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return g(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var o=arguments[t];g(o),o.length>0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":j.normalize(e)},relative:function(e,t){if(g(e),g(t),e===t||(e=j.resolve(e))===(t=j.resolve(t)))return"";for(var o=1;o<e.length&&e.charCodeAt(o)===47;++o);for(var n=e.length,r=n-o,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var l=t.length-s,f=r<l?r:l,D=-1,O=0;O<=f;++O){if(O===f){if(l>f){if(t.charCodeAt(s+O)===47)return t.slice(s+O+1);if(O===0)return t.slice(s+O)}else r>f&&(e.charCodeAt(o+O)===47?D=O:O===0&&(D=0));break}var c=e.charCodeAt(o+O);if(c!==t.charCodeAt(s+O))break;c===47&&(D=O)}var i="";for(O=o+D+1;O<=n;++O)O!==n&&e.charCodeAt(O)!==47||(i.length===0?i+="..":i+="/..");return i.length>0?i+t.slice(s+D):(s+=D,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(g(e),e.length===0)return".";for(var t=e.charCodeAt(0),o=t===47,n=-1,r=!0,s=e.length-1;s>=1;--s)if((t=e.charCodeAt(s))===47){if(!r){n=s;break}}else r=!1;return n===-1?o?"/":".":o&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');g(e);var o,n=0,r=-1,s=!0;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var l=t.length-1,f=-1;for(o=e.length-1;o>=0;--o){var D=e.charCodeAt(o);if(D===47){if(!s){n=o+1;break}}else f===-1&&(s=!1,f=o+1),l>=0&&(D===t.charCodeAt(l)?--l===-1&&(r=o):(l=-1,r=f))}return n===r?r=f:r===-1&&(r=e.length),e.slice(n,r)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!s){n=o+1;break}}else r===-1&&(s=!1,r=o+1);return r===-1?"":e.slice(n,r)},extname:function(e){g(e);for(var t=-1,o=0,n=-1,r=!0,s=0,l=e.length-1;l>=0;--l){var f=e.charCodeAt(l);if(f!==47)n===-1&&(r=!1,n=l+1),f===46?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1);else if(!r){o=l+1;break}}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===o+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return o=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),o?o===t.root?o+n:o+"/"+n:n;var t,o,n},parse:function(e){g(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var o,n=e.charCodeAt(0),r=n===47;r?(t.root="/",o=1):o=0;for(var s=-1,l=0,f=-1,D=!0,O=e.length-1,c=0;O>=o;--O)if((n=e.charCodeAt(O))!==47)f===-1&&(D=!1,f=O+1),n===46?s===-1?s=O:c!==1&&(c=1):s!==-1&&(c=-1);else if(!D){l=O+1;break}return s===-1||f===-1||c===0||c===1&&s===f-1&&s===l+1?f!==-1&&(t.base=t.name=l===0&&r?e.slice(1,f):e.slice(l,f)):(l===0&&r?(t.name=e.slice(1,s),t.base=e.slice(1,f)):(t.name=e.slice(l,s),t.base=e.slice(l,f)),t.ext=e.slice(s,f)),l>0?t.dir=e.slice(0,l-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};return j.posix=j,le=j}var fe,te={};function Ie(){if(fe)return te;fe=1;var g=te&&te.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(te,"__esModule",{value:!0}),te.importResourcePathToString=void 0;var x=g(se());return te.importResourcePathToString=function(j){var e;switch(j.kind){case"package":return x.default.join(j.packageName,(e=j.importPath)!==null&&e!==void 0?e:"","package.json");case"relative":return x.default.join(j.sourcePath,j.importPath);case"relative-in-package":return x.default.join(j.packageName,j.sourcePath,j.importPath)}},te}var de,ie={};function ve(){return de||(de=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.invokeUpdate=void 0,ie.invokeUpdate=function(g,x){var j,e="".concat(g.type,": ");switch(g.type){case"CodeChanged":case"ResolveNewImports":e+="";break;case"LookedUpTypeFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up");break;case"AttemptedLookUpFile":e+='"'.concat(g.path,'" was ').concat(g.success?"sucessfully":"not sucessfully"," attempted to looked up");break;case"LookedUpPackage":e+='package.json for package "'.concat(g.package,'" was ').concat(g.success?"sucessfully":"not sucessfully"," looked up").concat(g.definitelyTyped?" (found in definitely typed repo)":"");break;case"LoadedFromCache":e+='"'.concat(g.importPath,'" was loaded from cache');break;case"StoredToCache":e+='"'.concat(g.importPath,'" was stored to cache')}e.endsWith(": ")&&(e=e.slice(void 0,-2)),(j=x.onUpdate)===null||j===void 0||j.call(x,g,e)}),ie}var ye,ge,me,be,ae={};function ke(){if(ye)return ae;ye=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.RecursionDepth=void 0;var g=function(){function x(j,e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.options=j,this.fileRecursionDepth=e,this.packageRecursionDepth=t}return x.prototype.nextPackage=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth+1)},x.prototype.nextFile=function(){return new x(this.options,this.fileRecursionDepth+1,this.packageRecursionDepth)},x.prototype.same=function(){return new x(this.options,this.fileRecursionDepth,this.packageRecursionDepth)},x.prototype.shouldStop=function(){return this.options.fileRecursionDepth>0&&this.fileRecursionDepth>=this.options.fileRecursionDepth||this.options.packageRecursionDepth>0&&this.packageRecursionDepth>=this.options.packageRecursionDepth},x}();return ae.RecursionDepth=g,ae}function Le(){if(me)return U;me=1;var g=U&&U.__assign||function(){return g=Object.assign||function(i){for(var b,k=1,A=arguments.length;k<A;k++)for(var y in b=arguments[k])Object.prototype.hasOwnProperty.call(b,y)&&(i[y]=b[y]);return i},g.apply(this,arguments)},x=U&&U.__createBinding||(Object.create?function(i,b,k,A){A===void 0&&(A=k);var y=Object.getOwnPropertyDescriptor(b,k);y&&!("get"in y?!b.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return b[k]}}),Object.defineProperty(i,A,y)}:function(i,b,k,A){A===void 0&&(A=k),i[A]=b[k]}),j=U&&U.__setModuleDefault||(Object.create?function(i,b){Object.defineProperty(i,"default",{enumerable:!0,value:b})}:function(i,b){i.default=b}),e=U&&U.__importStar||function(i){if(i&&i.__esModule)return i;var b={};if(i!=null)for(var k in i)k!=="default"&&Object.prototype.hasOwnProperty.call(i,k)&&x(b,i,k);return j(b,i),b},t=U&&U.__awaiter||function(i,b,k,A){return new(k||(k=Promise))(function(y,T){function E(X){try{Z(A.next(X))}catch(R){T(R)}}function Y(X){try{Z(A.throw(X))}catch(R){T(R)}}function Z(X){var R;X.done?y(X.value):(R=X.value,R instanceof k?R:new k(function(G){G(R)})).then(E,Y)}Z((A=A.apply(i,b||[])).next())})},o=U&&U.__generator||function(i,b){var k,A,y,T,E={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return T={next:Y(0),throw:Y(1),return:Y(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function Y(Z){return function(X){return function(R){if(k)throw new TypeError("Generator is already executing.");for(;E;)try{if(k=1,A&&(y=2&R[0]?A.return:R[0]?A.throw||((y=A.return)&&y.call(A),0):A.next)&&!(y=y.call(A,R[1])).done)return y;switch(A=0,y&&(R=[2&R[0],y.value]),R[0]){case 0:case 1:y=R;break;case 4:return E.label++,{value:R[1],done:!1};case 5:E.label++,A=R[1],R=[0];continue;case 7:R=E.ops.pop(),E.trys.pop();continue;default:if(!((y=(y=E.trys).length>0&&y[y.length-1])||R[0]!==6&&R[0]!==2)){E=0;continue}if(R[0]===3&&(!y||R[1]>y[0]&&R[1]<y[3])){E.label=R[1];break}if(R[0]===6&&E.label<y[1]){E.label=y[1],y=R;break}if(y&&E.label<y[2]){E.label=y[2],E.ops.push(R);break}y[2]&&E.ops.pop(),E.trys.pop();continue}R=b.call(i,E)}catch(G){R=[6,G],A=0}finally{k=y=0}if(5&R[0])throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}([Z,X])}}},n=U&&U.__values||function(i){var b=typeof Symbol=="function"&&Symbol.iterator,k=b&&i[b],A=0;if(k)return k.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&A>=i.length&&(i=void 0),{value:i&&i[A++],done:!i}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(U,"__esModule",{value:!0}),U.AutoTypingsCore=void 0;var r=function(){if(ce)return oe;ce=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.DummySourceCache=void 0;var i=function(){function b(){}return b.prototype.getFile=function(k){return Promise.resolve(void 0)},b.prototype.isFileAvailable=function(k){return Promise.resolve(!1)},b.prototype.storeFile=function(k,A){return Promise.resolve(void 0)},b.prototype.clear=function(){return Promise.resolve(void 0)},b}();return oe.DummySourceCache=i,oe}(),s=Ne(),l=function(){if(ge)return N;ge=1;var i=N&&N.__assign||function(){return i=Object.assign||function(_){for(var a,h=1,v=arguments.length;h<v;h++)for(var u in a=arguments[h])Object.prototype.hasOwnProperty.call(a,u)&&(_[u]=a[u]);return _},i.apply(this,arguments)},b=N&&N.__createBinding||(Object.create?function(_,a,h,v){v===void 0&&(v=h);var u=Object.getOwnPropertyDescriptor(a,h);u&&!("get"in u?!a.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return a[h]}}),Object.defineProperty(_,v,u)}:function(_,a,h,v){v===void 0&&(v=h),_[v]=a[h]}),k=N&&N.__setModuleDefault||(Object.create?function(_,a){Object.defineProperty(_,"default",{enumerable:!0,value:a})}:function(_,a){_.default=a}),A=N&&N.__importStar||function(_){if(_&&_.__esModule)return _;var a={};if(_!=null)for(var h in _)h!=="default"&&Object.prototype.hasOwnProperty.call(_,h)&&b(a,_,h);return k(a,_),a},y=N&&N.__awaiter||function(_,a,h,v){return new(h||(h=Promise))(function(u,S){function m(C){try{p(v.next(C))}catch(d){S(d)}}function w(C){try{p(v.throw(C))}catch(d){S(d)}}function p(C){var d;C.done?u(C.value):(d=C.value,d instanceof h?d:new h(function(P){P(d)})).then(m,w)}p((v=v.apply(_,a||[])).next())})},T=N&&N.__generator||function(_,a){var h,v,u,S,m={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return S={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function w(p){return function(C){return function(d){if(h)throw new TypeError("Generator is already executing.");for(;m;)try{if(h=1,v&&(u=2&d[0]?v.return:d[0]?v.throw||((u=v.return)&&u.call(v),0):v.next)&&!(u=u.call(v,d[1])).done)return u;switch(v=0,u&&(d=[2&d[0],u.value]),d[0]){case 0:case 1:u=d;break;case 4:return m.label++,{value:d[1],done:!1};case 5:m.label++,v=d[1],d=[0];continue;case 7:d=m.ops.pop(),m.trys.pop();continue;default:if(!((u=(u=m.trys).length>0&&u[u.length-1])||d[0]!==6&&d[0]!==2)){m=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]<u[3])){m.label=d[1];break}if(d[0]===6&&m.label<u[1]){m.label=u[1],u=d;break}if(u&&m.label<u[2]){m.label=u[2],m.ops.push(d);break}u[2]&&m.ops.pop(),m.trys.pop();continue}d=a.call(_,m)}catch(P){d=[6,P],v=0}finally{h=u=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([p,C])}}},E=N&&N.__values||function(_){var a=typeof Symbol=="function"&&Symbol.iterator,h=a&&_[a],v=0;if(h)return h.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&v>=_.length&&(_=void 0),{value:_&&_[v++],done:!_}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Y=N&&N.__read||function(_,a){var h=typeof Symbol=="function"&&_[Symbol.iterator];if(!h)return _;var v,u,S=h.call(_),m=[];try{for(;(a===void 0||a-- >0)&&!(v=S.next()).done;)m.push(v.value)}catch(w){u={error:w}}finally{try{v&&!v.done&&(h=S.return)&&h.call(S)}finally{if(u)throw u.error}}return m};Object.defineProperty(N,"__esModule",{value:!0}),N.ImportResolver=void 0;var Z=function(){if(he)return V;he=1;var _=V&&V.__createBinding||(Object.create?function(w,p,C,d){d===void 0&&(d=C);var P=Object.getOwnPropertyDescriptor(p,C);P&&!("get"in P?!p.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return p[C]}}),Object.defineProperty(w,d,P)}:function(w,p,C,d){d===void 0&&(d=C),w[d]=p[C]}),a=V&&V.__setModuleDefault||(Object.create?function(w,p){Object.defineProperty(w,"default",{enumerable:!0,value:p})}:function(w,p){w.default=p}),h=V&&V.__importStar||function(w){if(w&&w.__esModule)return w;var p={};if(w!=null)for(var C in w)C!=="default"&&Object.prototype.hasOwnProperty.call(w,C)&&_(p,w,C);return a(p,w),p},v=V&&V.__read||function(w,p){var C=typeof Symbol=="function"&&w[Symbol.iterator];if(!C)return w;var d,P,I=C.call(w),L=[];try{for(;(p===void 0||p-- >0)&&!(d=I.next()).done;)L.push(d.value)}catch(M){P={error:M}}finally{try{d&&!d.done&&(C=I.return)&&C.call(I)}finally{if(P)throw P.error}}return L},u=V&&V.__spreadArray||function(w,p,C){if(C||arguments.length===2)for(var d,P=0,I=p.length;P<I;P++)!d&&P in p||(d||(d=Array.prototype.slice.call(p,0,P)),d[P]=p[P]);return w.concat(d||Array.prototype.slice.call(p))};Object.defineProperty(V,"__esModule",{value:!0}),V.DependencyParser=void 0;var S=h(se()),m=function(){function w(){this.REGEX_CLEAN=/[\n|\r]/g,this.REGEX_DETECT_IMPORT=/(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g,this.REGEX_NODE_MODULE=/^node:([\w\W\/]+)$/}return w.prototype.parseDependencies=function(p,C){var d=this;return u([],v(p.matchAll(this.REGEX_DETECT_IMPORT)),!1).map(function(P){var I,L;return(L=(I=P[1])!==null&&I!==void 0?I:P[2])!==null&&L!==void 0?L:P[3]}).filter(function(P){return!!P}).map(function(P){return d.resolvePath(P,C)})},w.prototype.resolvePath=function(p,C){var d=p.match(this.REGEX_NODE_MODULE);if(d)return{kind:"relative-in-package",packageName:"@types/node",importPath:"".concat(d[1],".d.ts"),sourcePath:""};if(typeof C=="string"){if(p.startsWith("."))return{kind:"relative",importPath:p,sourcePath:C};if(p.startsWith("@")){var P=p.split("/");return{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}}return{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}switch(C.kind){case"package":throw Error("TODO?");case"relative":throw Error("TODO2?");case"relative-in-package":return p.startsWith(".")?{kind:"relative-in-package",packageName:C.packageName,sourcePath:S.join(C.sourcePath,C.importPath),importPath:p}:p.startsWith("@")?(P=p.split("/"),{kind:"package",packageName:"".concat(P[0],"/").concat(P[1]),importPath:P.slice(2).join("/")}):{kind:"package",packageName:(P=p.split("/"))[0],importPath:P.slice(1).join("/")}}},w}();return V.DependencyParser=m,V}(),X=Ie(),R=A(se()),G=ve(),Me=ke(),Ue=function(){function _(a){var h,v;if(this.options=a,this.loadedFiles=[],this.dependencyParser=new Z.DependencyParser,this.cache=a.sourceCache,this.sourceResolver=a.sourceResolver,this.newImportsResolved=!1,this.monaco=a.monaco,a.preloadPackages&&a.versions){this.versions=a.versions;try{for(var u=E(Object.entries(a.versions)),S=u.next();!S.done;S=u.next()){var m=Y(S.value,2),w=m[0];m[1],this.resolveImport({kind:"package",packageName:w,importPath:""},new Me.RecursionDepth(this.options)).catch(function(p){console.error(p)})}}catch(p){h={error:p}}finally{try{S&&!S.done&&(v=u.return)&&v.call(u)}finally{if(h)throw h.error}}}}return _.prototype.wereNewImportsResolved=function(){return this.newImportsResolved},_.prototype.resetNewImportsResolved=function(){this.newImportsResolved=!1},_.prototype.resolveImportsInFile=function(a,h,v){var u,S,m;return y(this,void 0,void 0,function(){var w,p,C,d,P,I,L,M;return T(this,function(F){switch(F.label){case 0:if(v.shouldStop())return[2];w=this.dependencyParser.parseDependencies(a,h),F.label=1;case 1:F.trys.push([1,8,9,10]),p=E(w),C=p.next(),F.label=2;case 2:if(C.done)return[3,7];d=C.value,F.label=3;case 3:return F.trys.push([3,5,,6]),[4,this.resolveImport(d,v)];case 4:return F.sent(),[3,6];case 5:return P=F.sent(),this.options.onError?(S=(u=this.options).onError)===null||S===void 0||S.call(u,(m=P.message)!==null&&m!==void 0?m:P):console.error(P),[3,6];case 6:return C=p.next(),[3,2];case 7:return[3,10];case 8:return I=F.sent(),L={error:I},[3,10];case 9:try{C&&!C.done&&(M=p.return)&&M.call(p)}finally{if(L)throw L.error}return[7];case 10:return[2]}})})},_.prototype.resolveImport=function(a,h){return y(this,void 0,void 0,function(){var v,u;return T(this,function(S){switch(S.label){case 0:if(v=this.hashImportResourcePath(a),this.loadedFiles.includes(v))return[2];switch(this.loadedFiles.push(v),a.kind){case"package":return[3,1];case"relative":return[3,5];case"relative-in-package":return[3,6]}return[3,8];case 1:return[4,this.resolveImportFromPackageRoot(a)];case 2:return(u=S.sent())?[4,this.resolveImportInPackage(u,h.nextPackage().nextFile())]:[3,4];case 3:case 7:return[2,S.sent()];case 4:return[3,8];case 5:throw Error("Not implemented yet");case 6:return[4,this.resolveImportInPackage(a,h.nextFile())];case 8:return[2]}})})},_.prototype.resolveImportInPackage=function(a,h){return y(this,void 0,void 0,function(){var v,u,S;return T(this,function(m){switch(m.label){case 0:return[4,this.loadSourceFileContents(a)];case 1:return(v=m.sent())?(u=v.source,S=v.at,this.createModel(u,this.monaco.Uri.parse(this.options.fileRootPath+R.join("node_modules/".concat(a.packageName),S))),[4,this.resolveImportsInFile(u,{kind:"relative-in-package",packageName:a.packageName,sourcePath:R.dirname(S),importPath:""},h)]):[3,3];case 2:m.sent(),m.label=3;case 3:return[2]}})})},_.prototype.resolveImportFromPackageRoot=function(a){var h,v,u,S,m,w,p,C,d;return y(this,void 0,void 0,function(){var P,I,L,M,F,B,re,J,W;return T(this,function($){switch($.label){case 0:return P={type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!1},!this.options.onlySpecifiedPackages||(h=this.versions)!==null&&h!==void 0&&h[a.packageName]||(v=this.versions)!==null&&v!==void 0&&v["@types/"+a.packageName]?(I=(S=(u=a.importPath)===null||u===void 0?void 0:u.length)!==null&&S!==void 0&&S,L=I?"/".concat(a.importPath):"",[4,this.resolvePackageJson(a.packageName,(m=this.versions)===null||m===void 0?void 0:m[a.packageName],I?a.importPath:void 0)]):((0,G.invokeUpdate)(P,this.options),[2]);case 1:return(M=$.sent())||!I?[3,3]:[4,this.resolvePackageJson(a.packageName,(w=this.versions)===null||w===void 0?void 0:w[a.packageName])];case 2:M=$.sent(),L="",$.label=3;case 3:return M?(F=JSON.parse(M)).typings||F.types?(W=F.typings||F.types,this.createModel(M,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(a.packageName).concat(L,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:a.packageName,definitelyTyped:!1,success:!0},this.options),this.setVersion(a.packageName,F.version),[2,{kind:"relative-in-package",packageName:a.packageName,sourcePath:"",importPath:R.join((p=a.importPath)!==null&&p!==void 0?p:"",W.startsWith("./")?W.slice(2):W)}]):[3,4]:[3,7];case 4:return B="@types/".concat(a.packageName.startsWith("@")?a.packageName.slice(1).replace(/\//,"__"):a.packageName),[4,this.resolvePackageJson(B,(C=this.versions)===null||C===void 0?void 0:C[B])];case 5:if(re=$.sent()){if((J=JSON.parse(re)).typings||J.types)return W=J.typings||J.types,this.createModel(re,this.monaco.Uri.parse("".concat(this.options.fileRootPath,"node_modules/").concat(B,"/package.json"))),(0,G.invokeUpdate)({type:"LookedUpPackage",package:B,definitelyTyped:!0,success:!0},this.options),this.setVersion(B,J.version),[2,{kind:"relative-in-package",packageName:B,sourcePath:"",importPath:R.join((d=a.importPath)!==null&&d!==void 0?d:"",W.startsWith("./")?W.slice(2):W)}];(0,G.invokeUpdate)(P,this.options)}else(0,G.invokeUpdate)(P,this.options);$.label=6;case 6:return[3,8];case 7:(0,G.invokeUpdate)(P,this.options),$.label=8;case 8:return[2]}})})},_.prototype.loadSourceFileContents=function(a){return y(this,void 0,void 0,function(){var h,v,u,S,m,w,p,C,d,P,I,L,M,F,B,re;return T(this,function(J){switch(J.label){case 0:return h=R.join(a.packageName,a.sourcePath,a.importPath),v={type:"LookedUpTypeFile",path:h,definitelyTyped:!1,success:!1},u=a.packageName,S=this.getVersion(a.packageName),(m=[".d.ts","/index.d.ts",".ts",".tsx","/index.ts","/index.tsx"]).map(function(W){return a.importPath.endsWith(W)}).reduce(function(W,$){return W||$},!1)?[4,this.resolveSourceFile(u,S,R.join(a.sourcePath,a.importPath))]:[3,2];case 1:return(F=J.sent())?[2,{source:F,at:R.join(a.sourcePath,a.importPath)}]:[3,9];case 2:J.trys.push([2,7,8,9]),w=E(m),p=w.next(),J.label=3;case 3:return p.done?[3,6]:(C=p.value,d=R.join(a.sourcePath,a.importPath),M=(C===".d.ts"&&d.endsWith(".js")?d.slice(0,-3):d)+C,[4,this.resolveSourceFile(u,S,M)]);case 4:if(F=J.sent(),(0,G.invokeUpdate)({type:"AttemptedLookUpFile",path:R.join(u,M),success:!!F},this.options),F)return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=5;case 5:return p=w.next(),[3,3];case 6:return[3,9];case 7:return P=J.sent(),B={error:P},[3,9];case 8:try{p&&!p.done&&(re=w.return)&&re.call(w)}finally{if(B)throw B.error}return[7];case 9:return[4,this.resolvePackageJson(u,S,R.join(a.sourcePath,a.importPath))];case 10:return(I=J.sent())&&(L=JSON.parse(I).types)?(M=R.join(a.sourcePath,a.importPath,L),[4,this.resolveSourceFile(u,S,M)]):[3,12];case 11:if(F=J.sent())return(0,G.invokeUpdate)({type:"LookedUpTypeFile",path:R.join(u,M),success:!0},this.options),[2,{source:F,at:M}];J.label=12;case 12:return(0,G.invokeUpdate)(v,this.options),[2,null]}})})},_.prototype.getVersion=function(a){var h;return(h=this.versions)===null||h===void 0?void 0:h[a]},_.prototype.setVersions=function(a){var h,v;this.versions=a,(v=(h=this.options).onUpdateVersions)===null||v===void 0||v.call(h,a)},_.prototype.setVersion=function(a,h){var v;this.setVersions(i(i({},this.versions),((v={})[a]=h,v)))},_.prototype.createModel=function(a,h){h=h.with({path:h.path.replace("@types/","")}),this.monaco.editor.getModel(h)||(this.monaco.editor.createModel(a,"typescript",h),this.newImportsResolved=!0)},_.prototype.hashImportResourcePath=function(a){return(0,X.importResourcePathToString)(a)},_.prototype.resolvePackageJson=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v??"","package.json"),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?m==null?[3,5]:(w=m,[3,7]):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolvePackageJson(a,h,v)];case 9:return(m=p.sent())&&this.cache.storeFile(u,m),[2,m]}})})},_.prototype.resolveSourceFile=function(a,h,v){return y(this,void 0,void 0,function(){var u,S,m,w;return T(this,function(p){switch(p.label){case 0:return u=R.join(a+(h?"@".concat(h):""),v),S=!1,m=void 0,this.cache.isFileAvailable?[4,this.cache.isFileAvailable(u)]:[3,2];case 1:return S=p.sent(),[3,4];case 2:return[4,this.cache.getFile(u)];case 3:m=p.sent(),S=m!==void 0,p.label=4;case 4:return S?((0,G.invokeUpdate)({type:"LoadedFromCache",importPath:u},this.options),m==null?[3,5]:(w=m,[3,7])):[3,8];case 5:return[4,this.cache.getFile(u)];case 6:w=p.sent(),p.label=7;case 7:return[2,w];case 8:return[4,this.sourceResolver.resolveSourceFile(a,h,v)];case 9:return(m=p.sent())&&((0,G.invokeUpdate)({type:"StoredToCache",importPath:u},this.options),this.cache.storeFile(u,m)),[2,m]}})})},_}();return N.ImportResolver=Ue,N}(),f=e(se()),D=ve(),O=ke(),c=function(){function i(b,k){var A=this;this.editor=b,this.options=k,this.disposables=[],this.importResolver=new l.ImportResolver(k);var y=b.onDidChangeModelContent(function(T){A.debouncedResolveContents()});this.disposables.push(y),this.resolveContents(),k.dontAdaptEditorOptions||k.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(g(g({},k.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()),{moduleResolution:k.monaco.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,rootDir:k.fileRootPath}))}return i.create=function(b,k){var A,y;return t(this,void 0,void 0,function(){var T;return o(this,function(E){if(k?.shareCache&&k.sourceCache&&!i.sharedCache&&(i.sharedCache=k.sourceCache),!(T=k?.monaco))throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");return[2,new i(b,g(g({fileRootPath:"inmemory://model/",onlySpecifiedPackages:!1,preloadPackages:!1,shareCache:!1,dontAdaptEditorOptions:!1,dontRefreshModelValueAfterResolvement:!1,sourceCache:(A=i.sharedCache)!==null&&A!==void 0?A:new r.DummySourceCache,sourceResolver:(y=k?.sourceResolver)!==null&&y!==void 0?y:new s.JsDelivrSourceResolver,debounceDuration:4e3,fileRecursionDepth:10,packageRecursionDepth:3},k),{monaco:T}))]})})},i.prototype.dispose=function(){var b,k;try{for(var A=n(this.disposables),y=A.next();!y.done;y=A.next())y.value.dispose()}catch(T){b={error:T}}finally{try{y&&!y.done&&(k=A.return)&&k.call(A)}finally{if(b)throw b.error}}},i.prototype.setVersions=function(b){this.importResolver.setVersions(b),this.options.versions=b},i.prototype.clearCache=function(){return t(this,void 0,void 0,function(){return o(this,function(b){switch(b.label){case 0:return[4,this.options.sourceCache.clear()];case 1:return b.sent(),[2]}})})},i.prototype.debouncedResolveContents=function(){var b=this;this.isResolving||((0,D.invokeUpdate)({type:"CodeChanged"},this.options),this.options.debounceDuration<=0?this.resolveContents():(this.debounceTimer!==void 0&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t(b,void 0,void 0,function(){return o(this,function(k){switch(k.label){case 0:return[4,this.resolveContents()];case 1:return k.sent(),this.debounceTimer=void 0,[2]}})})},this.options.debounceDuration)))},i.prototype.resolveContents=function(){var b;return t(this,void 0,void 0,function(){var k,A,y,T;return o(this,function(E){switch(E.label){case 0:if(this.isResolving=!0,(0,D.invokeUpdate)({type:"ResolveNewImports"},this.options),!(k=this.editor.getModel()))throw Error("No model");A=k.getLinesContent(),E.label=1;case 1:return E.trys.push([1,3,,4]),[4,this.importResolver.resolveImportsInFile(A.join(`
|
|
7
|
-
`),f.dirname(k.uri.toString()),new O.RecursionDepth(this.options))];case 2:return E.sent(),[3,4];case 3:if(y=E.sent(),!this.options.onError)throw y;return this.options.onError((b=y.message)!==null&&b!==void 0?b:y),[3,4];case 4:return this.importResolver.wereNewImportsResolved()&&(this.options.dontRefreshModelValueAfterResolvement||(T=this.editor.getPosition(),k.setValue(k.getValue()),T&&this.editor.setPosition(T)),this.importResolver.resetNewImportsResolved()),this.isResolving=!1,[2]}})})},i}();return U.AutoTypingsCore=c,U}var we,z={},_e,Pe,Oe,je,Re,Ce,Se,xe,Ae={},De={},Ee={},Te={},Q={};const Ge=function(g,x){for(var j=0;j<x.length;j++){const e=x[j];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in g)){const o=Object.getOwnPropertyDescriptor(e,t);o&&Object.defineProperty(g,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[xe?Se:(xe=1,Ce||(Ce=1,q=ne,Fe=ne&&ne.__createBinding||(Object.create?function(g,x,j,e){e===void 0&&(e=j);var t=Object.getOwnPropertyDescriptor(x,j);t&&!("get"in t?!x.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return x[j]}}),Object.defineProperty(g,e,t)}:function(g,x,j,e){e===void 0&&(e=j),g[e]=x[j]}),K=ne&&ne.__exportStar||function(g,x){for(var j in g)j==="default"||Object.prototype.hasOwnProperty.call(x,j)||Fe(x,g,j)},Object.defineProperty(q,"__esModule",{value:!0}),K(function(){if(be)return ee;be=1;var g,x=ee&&ee.__extends||(g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])})(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}g(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(ee,"__esModule",{value:!0}),ee.AutoTypings=void 0;var j=function(e){function t(o,n){return e.call(this,o,n)||this}return x(t,e),t}(Le().AutoTypingsCore);return ee.AutoTypings=j,ee}(),q),K(Ie(),q),K(function(){if(we)return z;we=1;var g=z&&z.__awaiter||function(t,o,n,r){return new(n||(n=Promise))(function(s,l){function f(c){try{O(r.next(c))}catch(i){l(i)}}function D(c){try{O(r.throw(c))}catch(i){l(i)}}function O(c){var i;c.done?s(c.value):(i=c.value,i instanceof n?i:new n(function(b){b(i)})).then(f,D)}O((r=r.apply(t,o||[])).next())})},x=z&&z.__generator||function(t,o){var n,r,s,l,f={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function D(O){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return f.label++,{value:i[1],done:!1};case 5:f.label++,r=i[1],i=[0];continue;case 7:i=f.ops.pop(),f.trys.pop();continue;default:if(!((s=(s=f.trys).length>0&&s[s.length-1])||i[0]!==6&&i[0]!==2)){f=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){f.label=i[1];break}if(i[0]===6&&f.label<s[1]){f.label=s[1],s=i;break}if(s&&f.label<s[2]){f.label=s[2],f.ops.push(i);break}s[2]&&f.ops.pop(),f.trys.pop();continue}i=o.call(t,f)}catch(b){i=[6,b],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([O,c])}}},j=z&&z.__values||function(t){var o=typeof Symbol=="function"&&Symbol.iterator,n=o&&t[o],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(z,"__esModule",{value:!0}),z.LocalStorageCache=void 0;var e=function(){function t(){this.localCache={}}return t.prototype.getFile=function(o){var n;return g(this,void 0,void 0,function(){return x(this,function(r){try{return[2,(n=localStorage.getItem(t.LOCALSTORAGE_PREFIX+o))!==null&&n!==void 0?n:void 0]}catch{return[2,this.localCache[o]]}return[2]})})},t.prototype.storeFile=function(o,n){return g(this,void 0,void 0,function(){return x(this,function(r){this.localCache[o]=n;try{localStorage.setItem(t.LOCALSTORAGE_PREFIX+o,n)}catch{}return[2]})})},t.prototype.clear=function(){return g(this,void 0,void 0,function(){var o,n,r,s,l,f,D;return x(this,function(O){for(this.localCache={},o=[],n=0;n<localStorage.length;n++)(l=localStorage.key(n))!=null&&l.startsWith(t.LOCALSTORAGE_PREFIX)&&o.push(l);try{for(r=j(o),s=r.next();!s.done;s=r.next())l=s.value,localStorage.removeItem(l)}catch(c){f={error:c}}finally{try{s&&!s.done&&(D=r.return)&&D.call(r)}finally{if(f)throw f.error}}return[2]})})},t.LOCALSTORAGE_PREFIX="__autotyper_cache_",t}();return z.LocalStorageCache=e,z}(),q),K((_e||(_e=1,Object.defineProperty(Ae,"__esModule",{value:!0})),Ae),q),K((Pe||(Pe=1,Object.defineProperty(De,"__esModule",{value:!0})),De),q),K((Oe||(Oe=1,Object.defineProperty(Ee,"__esModule",{value:!0})),Ee),q),K((je||(je=1,Object.defineProperty(Te,"__esModule",{value:!0})),Te),q),K(function(){if(Re)return Q;Re=1;var g=Q&&Q.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,s){function l(O){try{D(n.next(O))}catch(c){s(c)}}function f(O){try{D(n.throw(O))}catch(c){s(c)}}function D(O){var c;O.done?r(O.value):(c=O.value,c instanceof o?c:new o(function(i){i(c)})).then(l,f)}D((n=n.apply(e,t||[])).next())})},x=Q&&Q.__generator||function(e,t){var o,n,r,s,l={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(D){return function(O){return function(c){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!((r=(r=l.trys).length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){l=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){l.label=c[1];break}if(c[0]===6&&l.label<r[1]){l.label=r[1],r=c;break}if(r&&l.label<r[2]){l.label=r[2],l.ops.push(c);break}r[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(i){c=[6,i],n=0}finally{o=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([D,O])}}};Object.defineProperty(Q,"__esModule",{value:!0}),Q.UnpkgSourceResolver=void 0;var j=function(){function e(){}return e.prototype.resolvePackageJson=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"").concat(n?"/".concat(n):"","/package.json"))];case 1:return[2,r.sent()]}})})},e.prototype.resolveSourceFile=function(t,o,n){return g(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.resolveFile("https://unpkg.com/".concat(t).concat(o?"@".concat(o):"","/").concat(n))];case 1:return[2,r.sent()]}})})},e.prototype.resolveFile=function(t){return g(this,void 0,void 0,function(){var o;return x(this,function(n){switch(n.label){case 0:return[4,fetch(t,{method:"GET"})];case 1:return(o=n.sent()).ok?[4,o.text()]:[3,3];case 2:return[2,n.sent()];case 3:if(o.status===404)return[2,""];throw Error("Error other than 404 while fetching from Unpkg at ".concat(t));case 4:return[2]}})})},e}();return Q.UnpkgSourceResolver=j,Q}(),q),K(Ne(),q)),Se=ne)]);var q,Fe,K;exports.c=Ge;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./Deuzq2vrUnAdRwxw.cjs"),g=require("./OVBBMnz7U1N8Auls.cjs");class X{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const z=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,G=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},$=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??$}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new X(s)}getFromPath(t,e){return p.Xt.getFromPath(t,e)}setToPath(t,e,s){return p.Xt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return z}get INT_COPY(){return G}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Xt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Q{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const U=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Z{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){U(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),U(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class k{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.ne.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.ne.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.cu.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.cu.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.cu.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.cu.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.cu.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.cu.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.Ur.CaseSensitiveOptions:p.Ur.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.w.Orientation.Column);const i=p.Qr.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.Qr.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class M{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.ne.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.ne.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.ne.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.ne.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Q.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Q.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Q.BuiltInSheetPattern.Solid:p.Q.BuiltInSheetPattern.None);if(o===p.Q.BuiltInSheetPattern.None)return{none:!0};s.type=p.Q.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Q.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends M{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Q.Type.None},r.fills[1]={type:p.Q.Type.Pattern,patternType:p.Q.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.de.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.X.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.X.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.X.Overflow.Wrap:r.overflow=p.X.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.X.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.X.ReadingDirection.Auto:o==="1"?r.readingDirection=p.X.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.X.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends M{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class x{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.n.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Q),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Z),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new k),this.registerVisitor("c:valAx",new k),this.registerVisitor("c:dateAx",new k),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new x),this.registerVisitor("oneCellAnchor",new x),this.registerVisitor("absoluteAnchor",new x),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("./Deuzq2vrUnAdRwxw.cjs");exports.fromBufferJSON=async(w,l)=>{let u=w;(function(t){if(t.byteLength<4)return!1;const i=new Uint8Array(t),r={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},n=Object.keys(r);for(let f=0;f<n.length;f++){const o=n[f],e=r[o];let a=!0;for(let s=0;s<e.length;s++)if(i[s]!==e[s]){a=!1;break}if(a)return o}return!1})(u)&&(u=await async function(t,i="gzip"){let r;typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer?(r=new ArrayBuffer(t.byteLength),new Uint8Array(r).set(new Uint8Array(t))):r=t;const n=new Blob([r]).stream(),f=new DecompressionStream(i),o=n.pipeThrough(f);return(await new Response(o).blob()).arrayBuffer()}(u));let b=new TextDecoder().decode(u);const g=JSON.parse(b),p={...l?.createWorkbookOptions??{},json:g};return new J.ny(p)},exports.toBufferJSON=async(w,l)=>{const u=await w.toJSON(),b=l?.whiteSpace??0;let g;l?.beforeWrite?.(w,u),g=b===0?JSON.stringify(u):function(i,r=2){const n=[];function f(o){const e=r*o;return n[e]===void 0&&(n[e]=" ".repeat(e)),n[e]}return function o(e,a,s,m){if(e==null||typeof e!="object")return JSON.stringify(e);const A=f(a),O=f(a+1);if(Array.isArray(e)){const c=e.length;if(c===0)return"[]";if(s!==0)return JSON.stringify(e);let y=`[
|
|
7
|
-
`;for(let h=0;h<c;h++)y+=O+o(e[h],a+1,s+1,!0),h<c-1&&(y+=`,
|
|
8
|
-
`);return y+=`
|
|
9
|
-
`+A+"]",y}const B=Object.keys(e),d=B.length;if(d===0)return"{}";if(!(s<2))return JSON.stringify(e);let S=`{
|
|
10
|
-
`;m||(s=0);for(let c=0;c<d;c++){const y=B[c];S+=O+JSON.stringify(y)+": "+o(e[y],a+1,s,!1),c<d-1&&(S+=`,
|
|
11
|
-
`)}return S+=`
|
|
12
|
-
`+A+"}",S}(i,0,0,!1)}(u,b);let p=new TextEncoder().encode(g).buffer;const t=l?.compress??!0;return t&&(p=await async function(i,r="gzip"){let n;typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer?(n=new ArrayBuffer(i.byteLength),new Uint8Array(n).set(new Uint8Array(i))):n=i;const f=new ReadableStream({start(a){a.enqueue(n),a.close()}}),o=new CompressionStream(r),e=f.pipeThrough(o);return(await new Response(e).blob()).arrayBuffer()}(p,typeof t=="string"?t:void 0)),p};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/function v(t){return Array.isArray?Array.isArray(t):Me(t)==="[object Array]"}function L(t){return typeof t=="string"}function Ce(t){return typeof t=="number"}function me(t){return typeof t=="object"}function M(t){return t!=null}function te(t){return!t.trim().length}function Me(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=Object.prototype.hasOwnProperty;class Ie{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(i=>{let n=Fe(i);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(i=>{i.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Fe(t){let e=null,s=null,i=null,n=1,r=null;if(L(t)||v(t))i=t,e=de(t),s=ie(t);else{if(!le.call(t,"name"))throw new Error("Missing name property in key");const u=t.name;if(i=u,le.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(`Property 'weight' in key '${u}' must be a positive integer`);e=de(u),s=ie(u),r=t.getFn}return{path:e,id:s,weight:n,src:i,getFn:r}}function de(t){return v(t)?t:t.split(".")}function ie(t){return v(t)?t.join("."):t}var l={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let s=[],i=!1;const n=(r,u,h)=>{if(M(r))if(u[h]){const a=r[u[h]];if(!M(a))return;if(h===u.length-1&&(L(a)||Ce(a)||function(o){return o===!0||o===!1||me(d=o)&&d!==null&&Me(o)=="[object Boolean]";var d}(a)))s.push((c=a)==null?"":function(o){if(typeof o=="string")return o;let d=o+"";return d=="0"&&1/o==-1/0?"-0":d}(c));else if(v(a)){i=!0;for(let o=0,d=a.length;o<d;o+=1)n(a[o],u,h+1)}else u.length&&n(a,u,h+1)}else s.push(r);var c};return n(t,L(e)?e.split("."):e,0),i?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const we=/[^ ]+/g;class ce{constructor({getFn:e=l.getFn,fieldNormWeight:s=l.fieldNormWeight}={}){this.norm=function(i=1,n=3){const r=new Map,u=Math.pow(10,n);return{get(h){const c=h.match(we).length;if(r.has(c))return r.get(c);const a=1/Math.pow(c,.5*i),o=parseFloat(Math.round(a*u)/u);return r.set(c,o),o},clear(){r.clear()}}}(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,i)=>{this._keysMap[s.id]=i})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,L(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();L(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,i=this.size();s<i;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!M(e)||te(e))return;let i={v:e,i:s,n:this.norm.get(e)};this.records.push(i)}_addObject(e,s){let i={i:s,$:{}};this.keys.forEach((n,r)=>{let u=n.getFn?n.getFn(e):this.getFn(e,n.path);if(M(u)){if(v(u)){let h=[];const c=[{nestedArrIndex:-1,value:u}];for(;c.length;){const{nestedArrIndex:a,value:o}=c.pop();if(M(o))if(L(o)&&!te(o)){let d={v:o,i:a,n:this.norm.get(o)};h.push(d)}else v(o)&&o.forEach((d,f)=>{c.push({nestedArrIndex:f,value:d})})}i.$[r]=h}else if(L(u)&&!te(u)){let h={v:u,n:this.norm.get(u)};i.$[r]=h}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=l.getFn,fieldNormWeight:i=l.fieldNormWeight}={}){const n=new ce({getFn:s,fieldNormWeight:i});return n.setKeys(t.map(Fe)),n.setSources(e),n.create(),n}function X(t,{errors:e=0,currentLocation:s=0,expectedLocation:i=0,distance:n=l.distance,ignoreLocation:r=l.ignoreLocation}={}){const u=e/t.length;if(r)return u;const h=Math.abs(i-s);return n?u+h/n:h?1:u}const z=32;function $e(t){let e={};for(let s=0,i=t.length;s<i;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<i-s-1}return e}const Y=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class ye{constructor(e,{location:s=l.location,threshold:i=l.threshold,distance:n=l.distance,includeMatches:r=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:h=l.minMatchCharLength,isCaseSensitive:c=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:o=l.ignoreLocation}={}){if(this.options={location:s,threshold:i,distance:n,includeMatches:r,findAllMatches:u,minMatchCharLength:h,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o},e=c?e:e.toLowerCase(),e=a?Y(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(g,p)=>{this.chunks.push({pattern:g,alphabet:$e(g),startIndex:p})},f=this.pattern.length;if(f>z){let g=0;const p=f%z,A=f-p;for(;g<A;)d(this.pattern.substr(g,z),g),g+=z;if(p){const m=f-z;d(this.pattern.substr(m),m)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:i,includeMatches:n}=this.options;if(e=s?e:e.toLowerCase(),e=i?Y(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}const{location:r,distance:u,threshold:h,findAllMatches:c,minMatchCharLength:a,ignoreLocation:o}=this.options;let d=[],f=0,g=!1;this.chunks.forEach(({pattern:A,alphabet:m,startIndex:_})=>{const{isMatch:N,score:w,indices:S}=function(k,$,Le,{location:ke=l.location,distance:J=l.distance,threshold:ve=l.threshold,findAllMatches:_e=l.findAllMatches,minMatchCharLength:he=l.minMatchCharLength,includeMatches:ae=l.includeMatches,ignoreLocation:V=l.ignoreLocation}={}){if($.length>z)throw new Error("Pattern length exceeds max of 32.");const R=$.length,P=k.length,D=Math.max(0,Math.min(ke,P));let O=ve,b=D;const Q=he>1||ae,Z=Q?Array(P):[];let T;for(;(T=k.indexOf($,b))>-1;){let F=X($,{currentLocation:T,expectedLocation:D,distance:J,ignoreLocation:V});if(O=Math.min(F,O),b=T+R,Q){let E=0;for(;E<R;)Z[T+E]=1,E+=1}}b=-1;let U=[],G=1,H=R+P;const Se=1<<R-1;for(let F=0;F<R;F+=1){let E=0,B=H;for(;E<B;)X($,{errors:F,currentLocation:D+B,expectedLocation:D,distance:J,ignoreLocation:V})<=O?E=B:H=B,B=Math.floor((H-E)/2+E);H=B;let j=Math.max(1,D-B+1),y=_e?P:Math.min(D+B,P)+R,x=Array(y+2);x[y+1]=(1<<F)-1;for(let C=y;C>=j;C-=1){let W=C-1,q=Le[k.charAt(W)];if(Q&&(Z[W]=+!!q),x[C]=(x[C+1]<<1|1)&q,F&&(x[C]|=(U[C+1]|U[C])<<1|1|U[C+1]),x[C]&Se&&(G=X($,{errors:F,currentLocation:W,expectedLocation:D,distance:J,ignoreLocation:V}),G<=O)){if(O=G,b=W,b<=D)break;j=Math.max(1,2*D-b)}}if(X($,{errors:F+1,currentLocation:D,expectedLocation:D,distance:J,ignoreLocation:V})>O)break;U=x}const ee={isMatch:b>=0,score:Math.max(.001,G)};if(Q){const F=function(E=[],B=l.minMatchCharLength){let j=[],y=-1,x=-1,C=0;for(let W=E.length;C<W;C+=1){let q=E[C];q&&y===-1?y=C:q||y===-1||(x=C-1,x-y+1>=B&&j.push([y,x]),y=-1)}return E[C-1]&&C-y>=B&&j.push([y,C-1]),j}(Z,he);F.length?ae&&(ee.indices=F):ee.isMatch=!1}return ee}(e,A,m,{location:r+_,distance:u,threshold:h,findAllMatches:c,minMatchCharLength:a,includeMatches:n,ignoreLocation:o});N&&(g=!0),f+=w,N&&S&&(d=[...d,...S])});let p={isMatch:g,score:g?f/this.chunks.length:1};return g&&n&&(p.indices=d),p}}class I{constructor(e){this.pattern=e}static isMultiMatch(e){return ge(e,this.multiRegex)}static isSingleMatch(e){return ge(e,this.singleRegex)}search(){}}function ge(t,e){const s=t.match(e);return s?s[1]:null}class De extends I{constructor(e,{location:s=l.location,threshold:i=l.threshold,distance:n=l.distance,includeMatches:r=l.includeMatches,findAllMatches:u=l.findAllMatches,minMatchCharLength:h=l.minMatchCharLength,isCaseSensitive:c=l.isCaseSensitive,ignoreDiacritics:a=l.ignoreDiacritics,ignoreLocation:o=l.ignoreLocation}={}){super(e),this._bitapSearch=new ye(e,{location:s,threshold:i,distance:n,includeMatches:r,findAllMatches:u,minMatchCharLength:h,isCaseSensitive:c,ignoreDiacritics:a,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Be extends I{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s,i=0;const n=[],r=this.pattern.length;for(;(s=e.indexOf(this.pattern,i))>-1;)i=s+r,n.push([s,i-1]);const u=!!n.length;return{isMatch:u,score:u?0:1,indices:n}}}const ne=[class extends I{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},Be,class extends I{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends I{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=t.indexOf(this.pattern)===-1;return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},De],fe=ne.length,be=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Ne=new Set([De.type,Be.type]),re=[];function ue(t,e){for(let s=0,i=re.length;s<i;s+=1){let n=re[s];if(n.condition(t,e))return new n(t,e)}return new ye(t,e)}const oe="$and",Ae="$path",se=t=>!(!t[oe]&&!t.$or),pe=t=>({[oe]:Object.keys(t).map(e=>({[e]:t[e]}))});function xe(t,e,{auto:s=!0}={}){const i=n=>{let r=Object.keys(n);const u=!!n[Ae];if(!u&&r.length>1&&!se(n))return i(pe(n));if((c=>!v(c)&&me(c)&&!se(c))(n)){const c=u?n[Ae]:r[0],a=u?n.$val:n[c];if(!L(a))throw new Error(`Invalid value for key ${c}`);const o={keyId:ie(c),pattern:a};return s&&(o.searcher=ue(a,e)),o}let h={children:[],operator:r[0]};return r.forEach(c=>{const a=n[c];v(a)&&a.forEach(o=>{h.children.push(i(o))})}),h};return se(t)||(t=pe(t)),i(t)}function Re(t,e){const s=t.matches;e.matches=[],M(s)&&s.forEach(i=>{if(!M(i.indices)||!i.indices.length)return;const{indices:n,value:r}=i;let u={indices:n,value:r};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),e.matches.push(u)})}function Oe(t,e){e.score=t.score}class K{constructor(e,s={},i){this.options={...l,...s},this.options.useExtendedSearch,this._keyStore=new Ie(this.options.keys),this.setCollection(e,i)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof ce))throw new Error("Incorrect 'index' type");this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){M(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let i=0,n=this._docs.length;i<n;i+=1){const r=this._docs[i];e(r,i)&&(this.removeAt(i),i-=1,n-=1,s.push(r))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:r,sortFn:u,ignoreFieldNorm:h}=this.options;let c=L(e)?L(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(a,{ignoreFieldNorm:o=l.ignoreFieldNorm}){a.forEach(d=>{let f=1;d.matches.forEach(({key:g,norm:p,score:A})=>{const m=g?g.weight:null;f*=Math.pow(A===0&&m?Number.EPSILON:A,(m||1)*(o?1:p))}),d.score=f})}(c,{ignoreFieldNorm:h}),r&&c.sort(u),Ce(s)&&s>-1&&(c=c.slice(0,s)),function(a,o,{includeMatches:d=l.includeMatches,includeScore:f=l.includeScore}={}){const g=[];return d&&g.push(Re),f&&g.push(Oe),a.map(p=>{const{idx:A}=p,m={item:o[A],refIndex:A};return g.length&&g.forEach(_=>{_(p,m)}),m})}(c,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(e){const s=ue(e,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:r,i:u,n:h})=>{if(!M(r))return;const{isMatch:c,score:a,indices:o}=s.searchIn(r);c&&n.push({item:r,idx:u,matches:[{score:a,value:r,norm:h,indices:o}]})}),n}_searchLogical(e){const s=xe(e,this.options),i=(h,c,a)=>{if(!h.children){const{keyId:d,searcher:f}=h,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:f});return g&&g.length?[{idx:a,item:c,matches:g}]:[]}const o=[];for(let d=0,f=h.children.length;d<f;d+=1){const g=h.children[d],p=i(g,c,a);if(p.length)o.push(...p);else if(h.operator===oe)return[]}return o},n=this._myIndex.records,r={},u=[];return n.forEach(({$:h,i:c})=>{if(M(h)){let a=i(s,h,c);a.length&&(r[c]||(r[c]={idx:c,item:h,matches:[]},u.push(r[c])),a.forEach(({matches:o})=>{r[c].matches.push(...o)}))}}),u}_searchObjectList(e){const s=ue(e,this.options),{keys:i,records:n}=this._myIndex,r=[];return n.forEach(({$:u,i:h})=>{if(!M(u))return;let c=[];i.forEach((a,o)=>{c.push(...this._findMatches({key:a,value:u[o],searcher:s}))}),c.length&&r.push({idx:h,item:u,matches:c})}),r}_findMatches({key:e,value:s,searcher:i}){if(!M(s))return[];let n=[];if(v(s))s.forEach(({v:r,i:u,n:h})=>{if(!M(r))return;const{isMatch:c,score:a,indices:o}=i.searchIn(r);c&&n.push({score:a,key:e,value:r,idx:u,norm:h,indices:o})});else{const{v:r,n:u}=s,{isMatch:h,score:c,indices:a}=i.searchIn(r);h&&n.push({score:c,key:e,value:r,norm:u,indices:a})}return n}}K.version="7.1.0",K.createIndex=Ee,K.parseIndex=function(t,{getFn:e=l.getFn,fieldNormWeight:s=l.fieldNormWeight}={}){const{keys:i,records:n}=t,r=new ce({getFn:e,fieldNormWeight:s});return r.setKeys(i),r.setIndexRecords(n),r},K.config=l,K.parseQuery=xe,function(...t){re.push(...t)}(class{constructor(t,{isCaseSensitive:e=l.isCaseSensitive,ignoreDiacritics:s=l.ignoreDiacritics,includeMatches:i=l.includeMatches,minMatchCharLength:n=l.minMatchCharLength,ignoreLocation:r=l.ignoreLocation,findAllMatches:u=l.findAllMatches,location:h=l.location,threshold:c=l.threshold,distance:a=l.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:s,includeMatches:i,minMatchCharLength:n,findAllMatches:u,ignoreLocation:r,location:h,threshold:c,distance:a},t=e?t:t.toLowerCase(),t=s?Y(t):t,this.pattern=t,this.query=function(o,d={}){return o.split("|").map(f=>{let g=f.trim().split(be).filter(A=>A&&!!A.trim()),p=[];for(let A=0,m=g.length;A<m;A+=1){const _=g[A];let N=!1,w=-1;for(;!N&&++w<fe;){const S=ne[w];let k=S.isMultiMatch(_);k&&(p.push(new S(k,d)),N=!0)}if(!N)for(w=-1;++w<fe;){const S=ne[w];let k=S.isSingleMatch(_);if(k){p.push(new S(k,d));break}}}return p})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i,ignoreDiacritics:n}=this.options;t=i?t:t.toLowerCase(),t=n?Y(t):t;let r=0,u=[],h=0;for(let c=0,a=e.length;c<a;c+=1){const o=e[c];u.length=0,r=0;for(let d=0,f=o.length;d<f;d+=1){const g=o[d],{isMatch:p,indices:A,score:m}=g.search(t);if(!p){h=0,r=0,u.length=0;break}if(r+=1,h+=m,s){const _=g.constructor.type;Ne.has(_)?u=[...u,...A]:u.push(A)}}if(r){let d={isMatch:!0,score:h/r};return s&&(d.indices=u),d}}return{isMatch:!1,score:1}}}),exports.default=K;
|