@sheetxl/studio-vanilla 0.7.3 → 0.7.5
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/README.md +9 -5
- package/browser/cjs/{Bq5B84cvyZ8OYIz6.cjs → B3cy0yECplxmF-ZV.cjs} +2 -2
- package/browser/cjs/{D5iZt0R5B2wmTq9v.cjs → B6UICJx5Bw3JbPvz.cjs} +1 -1
- package/browser/cjs/{BmsbIZ939yQctHD6.cjs → B7W2Oq164K4FSwFO.cjs} +1 -1
- package/browser/cjs/{Dm7olX2nDFTkXnZY.cjs → B7u_MAMs5OAq4GdF.cjs} +1 -1
- package/browser/cjs/{QqzkV3azD4vIOKZ2.cjs → BA4xgI8-YLnoV8Nt.cjs} +10 -10
- package/browser/cjs/{D1uSjhWmlU5THG1P.cjs → BB1OETlqft3E7T5Z.cjs} +1 -1
- package/browser/cjs/{4XQsjfv-mpA7WJDa.cjs → BE-9cm3nACn3awgy.cjs} +1 -1
- package/browser/cjs/{d0WPP_ytsh2QgluQ.cjs → BG2KzPwReru_hA3S.cjs} +2 -2
- package/browser/cjs/{Cv9z6TDkk54-RU6s.cjs → BG5LXAwXTxvszJnw.cjs} +3 -3
- package/browser/cjs/{BAVZCS-6TMywf-LE.cjs → BPumuWTJVZfqK5CF.cjs} +1 -1
- package/browser/cjs/BR1gc9EjvJSJsyo5.cjs +6 -0
- package/browser/cjs/{BI7D58lbU_QCK6AB.cjs → BVkDkd0RVFvIZheb.cjs} +1 -1
- package/browser/cjs/{CgmHXy-q0GruZI8X.cjs → B_PRKbKNzV31Ownq.cjs} +1 -1
- package/browser/cjs/{zVLCowqud_vITJlX.cjs → BhS7jv26uN8bTZHQ.cjs} +1 -1
- package/browser/cjs/{DPObIispo-BnNIS5.cjs → Bi1ZxHFcefcZx6ZG.cjs} +1 -1
- package/browser/cjs/{niUlo6nAYiwYIUyT.cjs → BlCgecmBdf9cl7oF.cjs} +1 -1
- package/browser/cjs/{B4VQUY77kxW2ClsV.cjs → BlZO0VTkAeZHIiRF.cjs} +2 -2
- package/browser/cjs/{C7soJWPu8fdQMDKh.cjs → C-KJcvl8tZsb4ira.cjs} +1 -1
- package/browser/cjs/{D2oVp3EL6dX5ODnP.cjs → C59GU2KGToOpxqIu.cjs} +1 -1
- package/browser/cjs/{C0pqv1DbTg7j8n4t.cjs → CA-8YHE5v74t05ah.cjs} +1 -1
- package/browser/cjs/CENfRAWXnNjIFG_1.cjs +11 -0
- package/browser/cjs/{NJRjP5fZf063qa_j.cjs → CFR3i21biJwGBGDy.cjs} +1 -1
- package/browser/cjs/{Bmgx1KG2dHqvK0IP.cjs → C_-fevMsOzoeHUX1.cjs} +3 -3
- package/browser/cjs/C_RM79K9AMokH2QJ.cjs +330 -0
- package/browser/cjs/{Bk3dq9oyFJiJSGj_.cjs → CkYsNsr2UZ6GJi0E.cjs} +1 -1
- package/browser/cjs/{CQms0ElWRvuMBvoH.cjs → CkkvS-F90xn4I7rJ.cjs} +1 -1
- package/browser/cjs/{MsEdoC-pzcFE0w_y.cjs → CowjlwpqcDbAgu6c.cjs} +2 -2
- package/browser/cjs/{Nwjr-_1igB0QWOhx.cjs → CpY-5ZfeRzaP61dG.cjs} +5 -5
- package/browser/cjs/{Cz4bptupZrLkAnaS.cjs → Cwnb4T0WdA2DpO6l.cjs} +2 -2
- package/browser/cjs/{C6KT_ePmyek9jS3d.cjs → D58RZavNtO-WdBdw.cjs} +1 -1
- package/browser/cjs/{CpE3PTQkikAxhg4g.cjs → D7HKuOM-LllPjJbc.cjs} +2 -2
- package/browser/cjs/{amq-khP9nkyBI5Ro.cjs → D8bM6LcNtnUixiLd.cjs} +1 -1
- package/browser/cjs/DBsNfJK9kgDaJIC5.cjs +6 -0
- package/browser/cjs/{dAi3dUCADByWtU8J.cjs → DD4LnZu1J3JZmMST.cjs} +2 -2
- package/browser/cjs/{18KMc3DO6-QUK7EW.cjs → DJmA92ScRYkRNHr8.cjs} +1 -1
- package/browser/cjs/{BmbSOb6Ep0lvFpsE.cjs → DOJeH6L1b_NYsknS.cjs} +2 -2
- package/browser/cjs/{B6yCSqd62uTktnlY.cjs → DRoIkxlMmTEzzgsq.cjs} +1 -1
- package/browser/cjs/{8VX5F9-vSSGbO0aC.cjs → DXPn20Z-hXJj0Bjc.cjs} +1 -1
- package/browser/cjs/{Bx-t9hS0Ea8fS6cW.cjs → D_dgAvL8PqalpMMm.cjs} +1 -1
- package/browser/cjs/{CyD7EdiqHml5T8Bq.cjs → DcntS4dVnAy4TwCl.cjs} +2 -2
- package/browser/cjs/Dh6N83HOXQnIi6eD.cjs +6 -0
- package/browser/cjs/{B1ArA8FKm4WVUvvM.cjs → DhT5l1nC8v5n3mI2.cjs} +2 -2
- package/browser/cjs/{CEMcAl53gqW4Tbar.cjs → DmGAgS9-QDlvMpsH.cjs} +9 -9
- package/browser/cjs/{CuEvMFFfmw4EzVAL.cjs → Dp2HaoMVlQBZmdJR.cjs} +4 -4
- package/browser/cjs/{CDrgv3rpGPZh6d8e.cjs → DrZp2De1Ceg32Kr5.cjs} +3 -3
- package/browser/cjs/{03L3sV1YAHRQUBjZ.cjs → DtgzMHlfyHeAXjgF.cjs} +1 -1
- package/browser/cjs/{Bjbh4_Dk82VFJYks.cjs → DyetmnKituvbVpAa.cjs} +1 -1
- package/browser/cjs/{BdIduBeLUGoOxDXC.cjs → Gj-mHeRNeqGqvlES.cjs} +1 -1
- package/browser/cjs/{DEaS8TV80AORUrfm.cjs → O7wJ0khshNgDHhIc.cjs} +1 -1
- package/browser/cjs/{DyC8iBrVH7LDDW1x.cjs → Vf_ah_b03vdfE3ru.cjs} +1 -1
- package/browser/cjs/{B-_6rKIitR2q93fJ.cjs → VqXvdfsWxA_K-5Ex.cjs} +2 -2
- package/browser/cjs/{xLprIpqHB-fTZxw6.cjs → gxwT1w-qgEmDMY0E.cjs} +1 -1
- package/browser/cjs/{B-G7myiBLkxxlzK2.cjs → hZddd0l0AwDjrIuc.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BfrxFnXlulEOhhE1.cjs → pSQ1idMlzpT4UK0i.cjs} +2 -2
- package/browser/cjs/{CZzooq_Dbdirg1so.cjs → qHGOMnwcNQhF5hJK.cjs} +1 -1
- package/browser/cjs/{DZlQ0ZdlhDYCKZ84.cjs → rnqMim6wQNkN8UU4.cjs} +4 -4
- package/browser/cjs/{DAyEcbqQzttM-vxn.cjs → w3tcpoHaegCl8_iT.cjs} +1 -1
- package/browser/esm/{BzL1AxfchzmIOM9M.mjs → 4aFM9IYjAjyhZDlq.mjs} +48 -48
- package/{cdn/assets/DKEuuOaurg6zrgED.js → browser/esm/B1TNjs3DJMr0pbtF.mjs} +2 -2
- package/browser/esm/{B67UzC_dxChimHYC.mjs → B4XZfefr-bz6Pdt9.mjs} +2 -2
- package/{cdn/assets/CXwgvim5T1bDmyck.js → browser/esm/B7HO8ZpVKQq-WpI7.mjs} +1 -1
- package/{cdn/assets/Cf5-RzokSUlqC84X.js → browser/esm/BAQ9yj7xFyqsJPAd.mjs} +1 -1
- package/browser/esm/{CVu2epp9fhfex9NL.mjs → BODVsKHVApv63hi5.mjs} +2 -2
- package/browser/esm/{0KR8f89vI_5Mwz7H.mjs → BS5tM0LLXtmU6BC_.mjs} +5 -5
- package/{cdn/assets/CmWuCsBWpv3hu5-B.js → browser/esm/BXeU9MWWLu7OeigM.mjs} +1 -1
- package/browser/esm/{DiRWHRkwW9s9_GMc.mjs → BY65rBGEqoRJMqBs.mjs} +29 -29
- package/{cdn/assets/DCXFA__PEU2U1kRH.js → browser/esm/BZ3YXob52SPxPFD0.mjs} +1 -1
- package/browser/esm/{Bk0CMPODIHZODYkA.mjs → BcEPkiSHERcWEWyl.mjs} +1 -1
- package/browser/esm/{BhjQAaTAZveEoHho.mjs → BfRx9yySN_e7ZQbb.mjs} +2 -2
- package/{cdn/assets/mmv3YCV5K_S7Hjhe.js → browser/esm/BiqoHhOyYEtpgfz5.mjs} +1 -1
- package/{cdn/assets/BqAxzWcqJIGCb2d0.js → browser/esm/BkIUt0s6jqlrSO7t.mjs} +1 -1
- package/{cdn/assets/D9hTqQqAW8QTc_8Q.js → browser/esm/BoaC8MRCqtpP_goE.mjs} +1 -1
- package/browser/esm/{8hyzunyf0O949-vz.mjs → BwuAACy86XQd0r9H.mjs} +1 -1
- package/{cdn/assets/0rJdjIu1JyUD78Iy.js → browser/esm/C-hXgLAdORdKqJmG.mjs} +1 -1
- package/{cdn/assets/CvODiQFnL48SxLgJ.js → browser/esm/C-yV4uS4-pk7T8wq.mjs} +1 -1
- package/browser/esm/C0enYEAhREbynMAD.mjs +48 -0
- package/{cdn/assets/CBXt6vcEnDTzUhED.js → browser/esm/C0vrzB1RhP0BA__i.mjs} +1 -1
- package/{cdn/assets/DEi-WYrO6icYcm8Z.js → browser/esm/C2IXaoRd-J1b0n7I.mjs} +1 -1
- package/browser/esm/{p476r_-Ouf3iaYIc.mjs → C65IVLH_eOUfD06X.mjs} +16 -14
- package/browser/esm/{Cf1M02sA8FLOwBzb.mjs → C7vHazx_6mthV4R9.mjs} +2 -2
- package/browser/esm/{B8W3PE6OA1hg00t1.mjs → CF-pbKUy8CQ6SgES.mjs} +1 -1
- package/browser/esm/{4LRM8_32XzCaSk1F.mjs → CF4J6IDM30-WXhSx.mjs} +1 -1
- package/browser/esm/{Dl3TiAoINXoApeKj.mjs → CFIhGwAXjycz5dUq.mjs} +3 -3
- package/browser/esm/{Dl7R3IFy9Y9o-Q0I.mjs → CO6OkYBew2KKDX_5.mjs} +1 -1
- package/{cdn/assets/BdHTQaH6E3G3q0l9.js → browser/esm/CTXPqoD7oDVhBT4X.mjs} +1 -1
- package/{cdn/assets/nrVyS158rTnaAJVN.js → browser/esm/CWeaTt0irkvWrqL4.mjs} +1 -1
- package/browser/esm/{DSA5mYpR0vs_wuhO.mjs → CYftWR0vSdUWRn2Z.mjs} +15360 -15289
- package/{cdn/assets/dZylOjR-39eER4GB.js → browser/esm/CZO2hFD3umTBnm9r.mjs} +1 -1
- package/{cdn/assets/C8t8iVNsz03fWG_i.js → browser/esm/CeUbcEwp0cNaqj18.mjs} +1 -1
- package/browser/esm/{fMUqs_3dU5oxSO7E.mjs → CxS-0-9S1ecpPb9-.mjs} +10 -10
- package/{cdn/assets/Cek4YwPIyHWB2iVA.js → browser/esm/CyUfBBxuRU6CZ5Kh.mjs} +1 -1
- package/browser/esm/{CeMYqSz1VADp7RTo.mjs → D0A-tJxbcY0qDNob.mjs} +1 -1
- package/{cdn/assets/BWvc1g3YiKSoqwev.js → browser/esm/D3KGlFIc4iOEQmRQ.mjs} +1 -1
- package/{cdn/assets/qFrSZCDTH0G0JDfb.js → browser/esm/D5HhLgZ6vcAus0c9.mjs} +1 -1
- package/browser/esm/{BSAZm7wqqfWEKCaf.mjs → D9oZfnx8XQICAuAR.mjs} +1 -1
- package/browser/esm/{8f7G-rpq07c7sz0F.mjs → DB2_f-Fg1FAY2Uvx.mjs} +1 -1
- package/browser/esm/{B6GSLs_Ze16csEUM.mjs → DHXXvQ2x_fqmnpFp.mjs} +2 -2
- package/browser/esm/{BSF_fNyha8v2ysLL.mjs → DU9bcHdSn8g_qYPK.mjs} +3 -3
- package/browser/esm/{Da0goN3E6ovlx2Wk.mjs → DcqxrKAC0CliCOd7.mjs} +3 -3
- package/browser/esm/{Cpv_VJfcd0lQgsd2.mjs → DcuQQrT98E_v-m7J.mjs} +4 -4
- package/browser/esm/Dht4DZVbawQlW51S.mjs +1480 -0
- package/browser/esm/{BdewC0t_gRjGI3Z9.mjs → DmwjTNRMu3mrAhEh.mjs} +3 -3
- package/{cdn/assets/Dp5spPNYziuCpAjI.js → browser/esm/Dyqyl22FQ7u-5nQg.mjs} +1 -1
- package/browser/esm/{auopa7YjuIcIlNMM.mjs → KhEEeC1dy1pEML_5.mjs} +2 -2
- package/{cdn/assets/dx2PfVq4BgLwSo2m.js → browser/esm/Mdu783AKqLQFuFAi.mjs} +1 -1
- package/browser/esm/{Crb7e3xskPF7eKP8.mjs → QfpSUpja9WctKfdt.mjs} +2 -2
- package/browser/esm/{DV62I0HQ_gAwiRbM.mjs → Sz_hlqiUydAUV9O5.mjs} +2 -2
- package/browser/esm/{BOZs5TX4xwgrA2El.mjs → YUCx2g8ABxa1ExCE.mjs} +1 -1
- package/browser/esm/{C1fL3M_1H6G3yS0L.mjs → avKJgk0IGcf5bqxl.mjs} +16 -16
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DX1rk0tNl-vYmcUE.mjs → k6dplGzG2KotvgOY.mjs} +2 -2
- package/browser/esm/{DqZVoNtqMI1C_e95.mjs → prLy9D5nxrDTulYj.mjs} +2 -2
- package/browser/esm/{S-GjtOL5Bh3e-02h.mjs → swe5uQxGiNoljwcZ.mjs} +1 -1
- package/browser/esm/{1FgykQ6oxhSQKBfW.mjs → sz9lJ3jlPzIUu-eI.mjs} +1 -1
- package/{cdn/assets/Ckxn_MQ55THahZo3.js → browser/esm/uHHIT_oas6bdcl7T.mjs} +1 -1
- package/cdn/assets/{C9PhjUfQhQP3mArV.js → -C5nZ__wNloSiQBU.js} +3 -3
- package/cdn/assets/{BB7n0e6CxSvP7yHL.js → -RmAWseMjh618sly.js} +8 -8
- package/cdn/assets/{CZf8ZnFjvZzbt6UD.js → 1dSwxtvs5jJNozC2.js} +13 -11
- package/cdn/assets/{B-jfq2V5rCha0_Ee.js → AIT39BHt_2g-s3As.js} +5 -5
- package/{browser/esm/CXwgvim5T1bDmyck.mjs → cdn/assets/B7HO8ZpVKQq-WpI7.js} +1 -1
- package/{browser/esm/Cf5-RzokSUlqC84X.mjs → cdn/assets/BAQ9yj7xFyqsJPAd.js} +1 -1
- package/cdn/assets/{DSQ_jXS2RYh7Mf48.js → BGYzQCmu8YtQv0hk.js} +3 -3
- package/{browser/esm/CmWuCsBWpv3hu5-B.mjs → cdn/assets/BXeU9MWWLu7OeigM.js} +1 -1
- package/{browser/esm/DCXFA__PEU2U1kRH.mjs → cdn/assets/BZ3YXob52SPxPFD0.js} +1 -1
- package/cdn/assets/{Ds6hPhvZLAxQ0d5x.js → BbpQ1Ci6AYjWQxnE.js} +2 -2
- package/cdn/assets/{Bk0CMPODIHZODYkA.js → BcEPkiSHERcWEWyl.js} +1 -1
- package/cdn/assets/{CUII-6d9j6HdVfok.js → BcyrqopK0U_CLy9L.js} +8 -8
- package/{browser/esm/mmv3YCV5K_S7Hjhe.mjs → cdn/assets/BiqoHhOyYEtpgfz5.js} +1 -1
- package/cdn/assets/{D8-dJ4NPxgd13jjm.js → BjqlgRc8H7Zwjgh4.js} +3 -3
- package/{browser/esm/BqAxzWcqJIGCb2d0.mjs → cdn/assets/BkIUt0s6jqlrSO7t.js} +1 -1
- package/{browser/esm/D9hTqQqAW8QTc_8Q.mjs → cdn/assets/BoaC8MRCqtpP_goE.js} +1 -1
- package/cdn/assets/{8hyzunyf0O949-vz.js → BwuAACy86XQd0r9H.js} +1 -1
- package/{browser/esm/0rJdjIu1JyUD78Iy.mjs → cdn/assets/C-hXgLAdORdKqJmG.js} +1 -1
- package/{browser/esm/CvODiQFnL48SxLgJ.mjs → cdn/assets/C-yV4uS4-pk7T8wq.js} +1 -1
- package/{browser/esm/CBXt6vcEnDTzUhED.mjs → cdn/assets/C0vrzB1RhP0BA__i.js} +1 -1
- package/{browser/esm/DEi-WYrO6icYcm8Z.mjs → cdn/assets/C2IXaoRd-J1b0n7I.js} +1 -1
- package/cdn/assets/{BlYrwcbZLI9o3GEx.js → C2xJ1-8E3UvCDFVm.js} +10 -10
- package/cdn/assets/{Bl-o1sKfmGvXl2C5.js → CA-iEdjENXePF7HK.js} +3 -3
- package/cdn/assets/{RlH7yLXkgv89-8Sy.js → CDv_n4Q4fyeHGNC-.js} +15 -15
- package/cdn/assets/{B8W3PE6OA1hg00t1.js → CF-pbKUy8CQ6SgES.js} +1 -1
- package/cdn/assets/{4LRM8_32XzCaSk1F.js → CF4J6IDM30-WXhSx.js} +1 -1
- package/cdn/assets/{CCroVkP2kxsAGCP0.js → CHtu2w8dUH9qE_gV.js} +7 -7
- package/cdn/assets/{DUJxr3mhCk0FDKII.js → CM3hIUGWZbcyiXoL.js} +3 -3
- package/cdn/assets/{Dl7R3IFy9Y9o-Q0I.js → CO6OkYBew2KKDX_5.js} +1 -1
- package/cdn/assets/{BrrCq2E9icHFWhxl.js → CTQArMyY5sn7brEn.js} +14 -14
- package/{browser/esm/BdHTQaH6E3G3q0l9.mjs → cdn/assets/CTXPqoD7oDVhBT4X.js} +1 -1
- package/cdn/assets/{D6sNNtokp4mLQiw3.js → CVBaJALDWZmlWWg2.js} +13 -13
- package/{browser/esm/nrVyS158rTnaAJVN.mjs → cdn/assets/CWeaTt0irkvWrqL4.js} +1 -1
- package/{browser/esm/dZylOjR-39eER4GB.mjs → cdn/assets/CZO2hFD3umTBnm9r.js} +1 -1
- package/{browser/esm/C8t8iVNsz03fWG_i.mjs → cdn/assets/CeUbcEwp0cNaqj18.js} +1 -1
- package/cdn/assets/{DCj2ksitjH0nflTl.js → CleWxPUcczhRfrHP.js} +4 -4
- package/cdn/assets/{Bopms-FCBYVpep58.js → Cnl4kz_oDyI6jz9X.js} +14 -14
- package/{browser/esm/DO1U62H4O-dAJtf-.mjs → cdn/assets/CrOJeFT3vEZBbGsU.js} +39 -39
- package/{browser/esm/Cek4YwPIyHWB2iVA.mjs → cdn/assets/CyUfBBxuRU6CZ5Kh.js} +1 -1
- package/cdn/assets/{CeMYqSz1VADp7RTo.js → D0A-tJxbcY0qDNob.js} +1 -1
- package/cdn/assets/{C7qb2ZMtZYg_njDy.js → D1oNCgzGxkEm86ML.js} +1 -1
- package/{browser/esm/BWvc1g3YiKSoqwev.mjs → cdn/assets/D3KGlFIc4iOEQmRQ.js} +1 -1
- package/{browser/esm/qFrSZCDTH0G0JDfb.mjs → cdn/assets/D5HhLgZ6vcAus0c9.js} +1 -1
- package/cdn/assets/{DuA0s3_rkCGnQ8YD.js → D7hbzFFwi6pemjZ6.js} +2 -2
- package/cdn/assets/D7levSDmgvF1R_cy.js +1480 -0
- package/cdn/assets/{BSAZm7wqqfWEKCaf.js → D9oZfnx8XQICAuAR.js} +1 -1
- package/cdn/assets/{8f7G-rpq07c7sz0F.js → DB2_f-Fg1FAY2Uvx.js} +1 -1
- package/cdn/assets/{CYngTHj-adXcslLB.js → DVWSXiPvUKCZl8c1.js} +1 -1
- package/cdn/assets/{xJ9KhWlLoNSP6-Hi.js → DmKA7DQzHDu4_OqC.js} +2 -2
- package/cdn/assets/{CxhoAHkORrJNv5rM.js → Do8_yi3_u501_TAo.js} +2 -2
- package/cdn/assets/{KTdgK91s2uZQsbSi.js → Dt4YpmBXEJFgXMqH.js} +2 -2
- package/cdn/assets/{BnN9FFFUGToz96QP.js → Dtu0hv3Ab7CCrY4R.js} +2 -2
- package/cdn/assets/{GDbQpYg73jLjx2Zo.js → Dxp8ZbLp35r7F-sp.js} +32 -32
- package/{browser/esm/Dp5spPNYziuCpAjI.mjs → cdn/assets/Dyqyl22FQ7u-5nQg.js} +1 -1
- package/cdn/assets/KyCZ140AgyGGZCcB.js +48 -0
- package/{browser/esm/dx2PfVq4BgLwSo2m.mjs → cdn/assets/Mdu783AKqLQFuFAi.js} +1 -1
- package/cdn/assets/{FqgG-BZHvOc2-ty2.js → YNhHFwthgm8SLyHw.js} +15280 -15209
- package/cdn/assets/{BOZs5TX4xwgrA2El.js → YUCx2g8ABxa1ExCE.js} +1 -1
- package/cdn/assets/{tuPLfw-QNAp0BwcX.js → qQr5GMLkoqLrmdV0.js} +12 -12
- package/cdn/assets/{peax0VuRgyHFCQ_G.js → qnEXpda2bHmKI7XO.js} +2 -2
- package/cdn/assets/{CaV3Cwu2U8o9Iobr.js → ryvwL5F0lm91Z45H.js} +50 -50
- package/cdn/assets/{S-GjtOL5Bh3e-02h.js → swe5uQxGiNoljwcZ.js} +1 -1
- package/{browser/esm/Ckxn_MQ55THahZo3.mjs → cdn/assets/uHHIT_oas6bdcl7T.js} +1 -1
- package/cdn/assets/{BnESyazjG2frLdU9.js → vPZX1gXFAkrxoNqD.js} +2 -2
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +16 -4
- package/browser/cjs/BtfwmEQ4p3yNqTRo.cjs +0 -11
- package/browser/cjs/CiYF8QjkKxQATXHv.cjs +0 -330
- package/browser/cjs/DCRD-C6Y3JpDBHzZ.cjs +0 -6
- package/browser/cjs/DfERjr0YTkM7nvqm.cjs +0 -6
- package/browser/cjs/DvyZxJDmtkZgGsNc.cjs +0 -6
- package/browser/esm/B_C8F4pEXETUmxZI.mjs +0 -46
- package/browser/esm/D9rQ4kBN9rUGEI2x.mjs +0 -1467
- package/cdn/assets/DOMjjxYgJmqxOutl.js +0 -1467
- package/cdn/assets/DUhtUNYvPgRNUg0w.js +0 -46
|
@@ -0,0 +1,1480 @@
|
|
|
1
|
+
import { o as Nt, M as Mt, ax as Se, ay as Ce, az as Ft, aA as wt, t as re, aB as ke, aC as Ae, aw as De, aD as Ee, H as ne, w as Pe, aE as Oe, n as Ie } from "./YNhHFwthgm8SLyHw.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.5
|
|
4
|
+
*
|
|
5
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
+
*/
|
|
8
|
+
const ue = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ve = new RegExp(`^[${ue}][-${ue}.0-9·̀-ͯ‿-⁀]*$`, "u");
|
|
9
|
+
function ye(i) {
|
|
10
|
+
return i >= 65 && i <= 90 || i >= 97 && i <= 122 || i === 58 || i === 95 || i === 8204 || i === 8205 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
|
|
11
|
+
}
|
|
12
|
+
const de = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Le = new RegExp(`^[${de}][-${de}.0-9·̀-ͯ‿-⁀]*$`, "u");
|
|
13
|
+
function be(i) {
|
|
14
|
+
return i >= 65 && i <= 90 || i === 95 || i >= 97 && i <= 122 || i >= 192 && i <= 214 || i >= 216 && i <= 246 || i >= 248 && i <= 767 || i >= 880 && i <= 893 || i >= 895 && i <= 8191 || i >= 8204 && i <= 8205 || i >= 8304 && i <= 8591 || i >= 11264 && i <= 12271 || i >= 12289 && i <= 55295 || i >= 63744 && i <= 64975 || i >= 65008 && i <= 65533 || i >= 65536 && i <= 983039;
|
|
15
|
+
}
|
|
16
|
+
const it = function(i) {
|
|
17
|
+
return i === 32 || i === 10 || i === 13 || i === 9;
|
|
18
|
+
}, Ne = function(i) {
|
|
19
|
+
return i >= 32 && i <= 55295 || i === 10 || i === 13 || i === 9 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
|
|
20
|
+
}, Jt = ye, pe = function(i) {
|
|
21
|
+
return ye(i) || i >= 48 && i <= 57 || i === 45 || i === 46 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
|
|
22
|
+
}, xe = [32, 10, 13, 9], Re = Ve, $e = function(i) {
|
|
23
|
+
return i >= 1 && i <= 55295 || i >= 57344 && i <= 65533 || i >= 65536 && i <= 1114111;
|
|
24
|
+
}, Me = be, He = function(i) {
|
|
25
|
+
return be(i) || i === 45 || i === 46 || i >= 48 && i <= 57 || i === 183 || i >= 768 && i <= 879 || i >= 8255 && i <= 8256;
|
|
26
|
+
}, je = Le, oe = "http://www.w3.org/XML/1998/namespace", qt = "http://www.w3.org/2000/xmlns/", Xe = { __proto__: null, xml: oe, xmlns: qt }, Fe = { __proto__: null, amp: "&", gt: ">", lt: "<", quot: '"', apos: "'" }, N = -1, bt = -2, Y = 13, Rt = 33, pt = 10, Ot = 60, Wt = 61, B = 62, G = 63, _t = 93, ie = (i) => i === 34 || i === 39, we = [34, 39], Be = [...we, 91, B], We = [...we, Ot, _t], _e = [Wt, G, ...xe], qe = [...xe, B, 38, Ot];
|
|
27
|
+
function ae(i, t, s) {
|
|
28
|
+
switch (t) {
|
|
29
|
+
case "xml":
|
|
30
|
+
s !== oe && i.fail(`xml prefix must be bound to ${oe}.`);
|
|
31
|
+
break;
|
|
32
|
+
case "xmlns":
|
|
33
|
+
s !== qt && i.fail(`xmlns prefix must be bound to ${qt}.`);
|
|
34
|
+
}
|
|
35
|
+
switch (s) {
|
|
36
|
+
case qt:
|
|
37
|
+
i.fail(t === "" ? `the default namespace may not be set to ${s}.` : `may not assign a prefix (even "xmlns") to the URI ${qt}.`);
|
|
38
|
+
break;
|
|
39
|
+
case oe:
|
|
40
|
+
switch (t) {
|
|
41
|
+
case "xml":
|
|
42
|
+
break;
|
|
43
|
+
case "":
|
|
44
|
+
i.fail(`the default namespace may not be set to ${s}.`);
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
i.fail("may not assign the xml namespace to another prefix.");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const ze = (i) => je.test(i), Ue = (i) => Re.test(i), ge = { xmldecl: "xmldeclHandler", text: "textHandler", processinginstruction: "piHandler", doctype: "doctypeHandler", comment: "commentHandler", opentagstart: "openTagStartHandler", attribute: "attributeHandler", opentag: "openTagHandler", closetag: "closeTagHandler", cdata: "cdataHandler", error: "errorHandler", end: "endHandler", ready: "readyHandler" };
|
|
52
|
+
class Ge {
|
|
53
|
+
constructor(t) {
|
|
54
|
+
this.i = 0, this.prevI = 0, this.opt = t ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
55
|
+
const s = this.xmlnsOpt = !!this.opt.xmlns;
|
|
56
|
+
if (this.trackPosition = this.opt.position !== !1, this.fileName = this.opt.fileName, s) {
|
|
57
|
+
this.nameStartCheck = Me, this.nameCheck = He, this.isName = ze, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = { __proto__: null, ...Xe };
|
|
58
|
+
const o = this.opt.additionalNamespaces;
|
|
59
|
+
o != null && ((function(a, n) {
|
|
60
|
+
for (const c of Object.keys(n)) ae(a, c, n[c]);
|
|
61
|
+
})(this, o), Object.assign(this.ns, o));
|
|
62
|
+
} else this.nameStartCheck = Jt, this.nameCheck = pe, this.isName = Ue, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
63
|
+
this.stateTable = [this.sBegin, this.sBeginWhitespace, this.sDoctype, this.sDoctypeQuote, this.sDTD, this.sDTDQuoted, this.sDTDOpenWaka, this.sDTDOpenWakaBang, this.sDTDComment, this.sDTDCommentEnding, this.sDTDCommentEnded, this.sDTDPI, this.sDTDPIEnding, this.sText, this.sEntity, this.sOpenWaka, this.sOpenWakaBang, this.sComment, this.sCommentEnding, this.sCommentEnded, this.sCData, this.sCDataEnding, this.sCDataEnding2, this.sPIFirstChar, this.sPIRest, this.sPIBody, this.sPIEnding, this.sXMLDeclNameStart, this.sXMLDeclName, this.sXMLDeclEq, this.sXMLDeclValueStart, this.sXMLDeclValue, this.sXMLDeclSeparator, this.sXMLDeclEnding, this.sOpenTag, this.sOpenTagSlash, this.sAttrib, this.sAttribName, this.sAttribNameSawWhite, this.sAttribValue, this.sAttribValueQuoted, this.sAttribValueClosed, this.sAttribValueUnquoted, this.sCloseTag, this.sCloseTagSawWhite], this._init();
|
|
64
|
+
}
|
|
65
|
+
get closed() {
|
|
66
|
+
return this._closed;
|
|
67
|
+
}
|
|
68
|
+
_init() {
|
|
69
|
+
this.openWakaBang = "", this.text = "", this.name = "", this.piTarget = "", this.entity = "", this.q = null, this.tags = [], this.tag = null, this.topNS = null, this.chunk = "", this.chunkPosition = 0, this.i = 0, this.prevI = 0, this.carriedFromPrevious = void 0, this.forbiddenState = 0, this.attribList = [];
|
|
70
|
+
const { fragmentOpt: t } = this;
|
|
71
|
+
this.state = t ? Y : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = t, this.xmlDeclPossible = !t, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
72
|
+
let { defaultXMLVersion: s } = this.opt;
|
|
73
|
+
if (s === void 0) {
|
|
74
|
+
if (this.opt.forceXMLVersion === !0) throw new Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
75
|
+
s = "1.0";
|
|
76
|
+
}
|
|
77
|
+
this.setXMLVersion(s), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = { version: void 0, encoding: void 0, standalone: void 0 }, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Fe), this.readyHandler?.();
|
|
78
|
+
}
|
|
79
|
+
get position() {
|
|
80
|
+
return this.chunkPosition + this.i;
|
|
81
|
+
}
|
|
82
|
+
get columnIndex() {
|
|
83
|
+
return this.position - this.positionAtNewLine;
|
|
84
|
+
}
|
|
85
|
+
on(t, s) {
|
|
86
|
+
this[ge[t]] = s;
|
|
87
|
+
}
|
|
88
|
+
off(t) {
|
|
89
|
+
this[ge[t]] = void 0;
|
|
90
|
+
}
|
|
91
|
+
makeError(t) {
|
|
92
|
+
let s = this.fileName ?? "";
|
|
93
|
+
return this.trackPosition && (s.length > 0 && (s += ":"), s += `${this.line}:${this.column}`), s.length > 0 && (s += ": "), new Error(s + t);
|
|
94
|
+
}
|
|
95
|
+
fail(t) {
|
|
96
|
+
const s = this.makeError(t), o = this.errorHandler;
|
|
97
|
+
if (o === void 0) throw s;
|
|
98
|
+
return o(s), this;
|
|
99
|
+
}
|
|
100
|
+
write(t) {
|
|
101
|
+
if (this.closed) return this.fail("cannot write after close; assign an onready handler.");
|
|
102
|
+
let s = !1;
|
|
103
|
+
t === null ? (s = !0, t = "") : typeof t == "object" && (t = t.toString()), this.carriedFromPrevious !== void 0 && (t = `${this.carriedFromPrevious}${t}`, this.carriedFromPrevious = void 0);
|
|
104
|
+
let o = t.length;
|
|
105
|
+
const a = t.charCodeAt(o - 1);
|
|
106
|
+
!s && (a === 13 || a >= 55296 && a <= 56319) && (this.carriedFromPrevious = t[o - 1], o--, t = t.slice(0, o));
|
|
107
|
+
const { stateTable: n } = this;
|
|
108
|
+
for (this.chunk = t, this.i = 0; this.i < o; ) n[this.state].call(this);
|
|
109
|
+
return this.chunkPosition += o, s ? this.end() : this;
|
|
110
|
+
}
|
|
111
|
+
close() {
|
|
112
|
+
return this.write(null);
|
|
113
|
+
}
|
|
114
|
+
getCode10() {
|
|
115
|
+
const t = this.chunk, s = this.i;
|
|
116
|
+
if (this.prevI = s, this.i++, s >= t.length) return N;
|
|
117
|
+
const o = t.charCodeAt(s);
|
|
118
|
+
if (this.column++, o < 55296) {
|
|
119
|
+
if (o >= 32 || o === 9) return o;
|
|
120
|
+
switch (o) {
|
|
121
|
+
case pt:
|
|
122
|
+
return this.line++, this.column = 0, this.positionAtNewLine = this.position, pt;
|
|
123
|
+
case 13:
|
|
124
|
+
return t.charCodeAt(s + 1) === pt && (this.i = s + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, bt;
|
|
125
|
+
default:
|
|
126
|
+
return this.fail("disallowed character."), o;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (o > 56319) return o >= 57344 && o <= 65533 || this.fail("disallowed character."), o;
|
|
130
|
+
const a = 65536 + 1024 * (o - 55296) + (t.charCodeAt(s + 1) - 56320);
|
|
131
|
+
return this.i = s + 2, a > 1114111 && this.fail("disallowed character."), a;
|
|
132
|
+
}
|
|
133
|
+
getCode11() {
|
|
134
|
+
const { chunk: t, i: s } = this;
|
|
135
|
+
if (this.prevI = s, this.i = s + 1, s >= t.length) return N;
|
|
136
|
+
const o = t.charCodeAt(s);
|
|
137
|
+
if (this.column++, o < 55296) {
|
|
138
|
+
if (o > 31 && o < 127 || o > 159 && o !== 8232 || o === 9) return o;
|
|
139
|
+
switch (o) {
|
|
140
|
+
case pt:
|
|
141
|
+
return this.line++, this.column = 0, this.positionAtNewLine = this.position, pt;
|
|
142
|
+
case 13: {
|
|
143
|
+
const n = t.charCodeAt(s + 1);
|
|
144
|
+
n !== pt && n !== 133 || (this.i = s + 2);
|
|
145
|
+
}
|
|
146
|
+
case 133:
|
|
147
|
+
case 8232:
|
|
148
|
+
return this.line++, this.column = 0, this.positionAtNewLine = this.position, bt;
|
|
149
|
+
default:
|
|
150
|
+
return this.fail("disallowed character."), o;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (o > 56319) return o >= 57344 && o <= 65533 || this.fail("disallowed character."), o;
|
|
154
|
+
const a = 65536 + 1024 * (o - 55296) + (t.charCodeAt(s + 1) - 56320);
|
|
155
|
+
return this.i = s + 2, a > 1114111 && this.fail("disallowed character."), a;
|
|
156
|
+
}
|
|
157
|
+
getCodeNorm() {
|
|
158
|
+
const t = this.getCode();
|
|
159
|
+
return t === bt ? pt : t;
|
|
160
|
+
}
|
|
161
|
+
unget() {
|
|
162
|
+
this.i = this.prevI, this.column--;
|
|
163
|
+
}
|
|
164
|
+
captureTo(t) {
|
|
165
|
+
let { i: s } = this;
|
|
166
|
+
const { chunk: o } = this;
|
|
167
|
+
for (; ; ) {
|
|
168
|
+
const a = this.getCode(), n = a === bt, c = n ? pt : a;
|
|
169
|
+
if (c === N || t.includes(c)) return this.text += o.slice(s, this.prevI), c;
|
|
170
|
+
n && (this.text += `${o.slice(s, this.prevI)}
|
|
171
|
+
`, s = this.i);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
captureToChar(t) {
|
|
175
|
+
let { i: s } = this;
|
|
176
|
+
const { chunk: o } = this;
|
|
177
|
+
for (; ; ) {
|
|
178
|
+
let a = this.getCode();
|
|
179
|
+
switch (a) {
|
|
180
|
+
case bt:
|
|
181
|
+
this.text += `${o.slice(s, this.prevI)}
|
|
182
|
+
`, s = this.i, a = pt;
|
|
183
|
+
break;
|
|
184
|
+
case N:
|
|
185
|
+
return this.text += o.slice(s), !1;
|
|
186
|
+
}
|
|
187
|
+
if (a === t) return this.text += o.slice(s, this.prevI), !0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
captureNameChars() {
|
|
191
|
+
const { chunk: t, i: s } = this;
|
|
192
|
+
for (; ; ) {
|
|
193
|
+
const o = this.getCode();
|
|
194
|
+
if (o === N) return this.name += t.slice(s), N;
|
|
195
|
+
if (!pe(o)) return this.name += t.slice(s, this.prevI), o === bt ? pt : o;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
skipSpaces() {
|
|
199
|
+
for (; ; ) {
|
|
200
|
+
const t = this.getCodeNorm();
|
|
201
|
+
if (t === N || !it(t)) return t;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
setXMLVersion(t) {
|
|
205
|
+
this.currentXMLVersion = t, t === "1.0" ? (this.isChar = Ne, this.getCode = this.getCode10) : (this.isChar = $e, this.getCode = this.getCode11);
|
|
206
|
+
}
|
|
207
|
+
sBegin() {
|
|
208
|
+
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
209
|
+
}
|
|
210
|
+
sBeginWhitespace() {
|
|
211
|
+
const t = this.i, s = this.skipSpaces();
|
|
212
|
+
switch (this.prevI !== t && (this.xmlDeclPossible = !1), s) {
|
|
213
|
+
case Ot:
|
|
214
|
+
if (this.state = 15, this.text.length !== 0) throw new Error("no-empty text at start");
|
|
215
|
+
break;
|
|
216
|
+
case N:
|
|
217
|
+
break;
|
|
218
|
+
default:
|
|
219
|
+
this.unget(), this.state = Y, this.xmlDeclPossible = !1;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
sDoctype() {
|
|
223
|
+
const t = this.captureTo(Be);
|
|
224
|
+
switch (t) {
|
|
225
|
+
case B:
|
|
226
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = Y, this.doctype = !0;
|
|
227
|
+
break;
|
|
228
|
+
case N:
|
|
229
|
+
break;
|
|
230
|
+
default:
|
|
231
|
+
this.text += String.fromCodePoint(t), t === 91 ? this.state = 4 : ie(t) && (this.state = 3, this.q = t);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
sDoctypeQuote() {
|
|
235
|
+
const t = this.q;
|
|
236
|
+
this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.q = null, this.state = 2);
|
|
237
|
+
}
|
|
238
|
+
sDTD() {
|
|
239
|
+
const t = this.captureTo(We);
|
|
240
|
+
t !== N && (this.text += String.fromCodePoint(t), t === _t ? this.state = 2 : t === Ot ? this.state = 6 : ie(t) && (this.state = 5, this.q = t));
|
|
241
|
+
}
|
|
242
|
+
sDTDQuoted() {
|
|
243
|
+
const t = this.q;
|
|
244
|
+
this.captureToChar(t) && (this.text += String.fromCodePoint(t), this.state = 4, this.q = null);
|
|
245
|
+
}
|
|
246
|
+
sDTDOpenWaka() {
|
|
247
|
+
const t = this.getCodeNorm();
|
|
248
|
+
switch (this.text += String.fromCodePoint(t), t) {
|
|
249
|
+
case 33:
|
|
250
|
+
this.state = 7, this.openWakaBang = "";
|
|
251
|
+
break;
|
|
252
|
+
case G:
|
|
253
|
+
this.state = 11;
|
|
254
|
+
break;
|
|
255
|
+
default:
|
|
256
|
+
this.state = 4;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
sDTDOpenWakaBang() {
|
|
260
|
+
const t = String.fromCodePoint(this.getCodeNorm()), s = this.openWakaBang += t;
|
|
261
|
+
this.text += t, s !== "-" && (this.state = s === "--" ? 8 : 4, this.openWakaBang = "");
|
|
262
|
+
}
|
|
263
|
+
sDTDComment() {
|
|
264
|
+
this.captureToChar(45) && (this.text += "-", this.state = 9);
|
|
265
|
+
}
|
|
266
|
+
sDTDCommentEnding() {
|
|
267
|
+
const t = this.getCodeNorm();
|
|
268
|
+
this.text += String.fromCodePoint(t), this.state = t === 45 ? 10 : 8;
|
|
269
|
+
}
|
|
270
|
+
sDTDCommentEnded() {
|
|
271
|
+
const t = this.getCodeNorm();
|
|
272
|
+
this.text += String.fromCodePoint(t), t === B ? this.state = 4 : (this.fail("malformed comment."), this.state = 8);
|
|
273
|
+
}
|
|
274
|
+
sDTDPI() {
|
|
275
|
+
this.captureToChar(G) && (this.text += "?", this.state = 12);
|
|
276
|
+
}
|
|
277
|
+
sDTDPIEnding() {
|
|
278
|
+
const t = this.getCodeNorm();
|
|
279
|
+
this.text += String.fromCodePoint(t), t === B && (this.state = 4);
|
|
280
|
+
}
|
|
281
|
+
sText() {
|
|
282
|
+
this.tags.length !== 0 ? this.handleTextInRoot() : this.handleTextOutsideRoot();
|
|
283
|
+
}
|
|
284
|
+
sEntity() {
|
|
285
|
+
let { i: t } = this;
|
|
286
|
+
const { chunk: s } = this;
|
|
287
|
+
t: for (; ; ) switch (this.getCode()) {
|
|
288
|
+
case bt:
|
|
289
|
+
this.entity += `${s.slice(t, this.prevI)}
|
|
290
|
+
`, t = this.i;
|
|
291
|
+
break;
|
|
292
|
+
case 59: {
|
|
293
|
+
const { entityReturnState: o } = this, a = this.entity + s.slice(t, this.prevI);
|
|
294
|
+
let n;
|
|
295
|
+
this.state = o, a === "" ? (this.fail("empty entity name."), n = "&;") : (n = this.parseEntity(a), this.entity = ""), o === Y && this.textHandler === void 0 || (this.text += n);
|
|
296
|
+
break t;
|
|
297
|
+
}
|
|
298
|
+
case N:
|
|
299
|
+
this.entity += s.slice(t);
|
|
300
|
+
break t;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
sOpenWaka() {
|
|
304
|
+
const t = this.getCode();
|
|
305
|
+
if (Jt(t)) this.state = 34, this.unget(), this.xmlDeclPossible = !1;
|
|
306
|
+
else switch (t) {
|
|
307
|
+
case 47:
|
|
308
|
+
this.state = 43, this.xmlDeclPossible = !1;
|
|
309
|
+
break;
|
|
310
|
+
case 33:
|
|
311
|
+
this.state = 16, this.openWakaBang = "", this.xmlDeclPossible = !1;
|
|
312
|
+
break;
|
|
313
|
+
case G:
|
|
314
|
+
this.state = 23;
|
|
315
|
+
break;
|
|
316
|
+
default:
|
|
317
|
+
this.fail("disallowed character in tag name"), this.state = Y, this.xmlDeclPossible = !1;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
sOpenWakaBang() {
|
|
321
|
+
switch (this.openWakaBang += String.fromCodePoint(this.getCodeNorm()), this.openWakaBang) {
|
|
322
|
+
case "[CDATA[":
|
|
323
|
+
this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0), this.state = 20, this.openWakaBang = "";
|
|
324
|
+
break;
|
|
325
|
+
case "--":
|
|
326
|
+
this.state = 17, this.openWakaBang = "";
|
|
327
|
+
break;
|
|
328
|
+
case "DOCTYPE":
|
|
329
|
+
this.state = 2, (this.doctype || this.sawRoot) && this.fail("inappropriately located doctype declaration."), this.openWakaBang = "";
|
|
330
|
+
break;
|
|
331
|
+
default:
|
|
332
|
+
this.openWakaBang.length >= 7 && this.fail("incorrect syntax.");
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
sComment() {
|
|
336
|
+
this.captureToChar(45) && (this.state = 18);
|
|
337
|
+
}
|
|
338
|
+
sCommentEnding() {
|
|
339
|
+
const t = this.getCodeNorm();
|
|
340
|
+
t === 45 ? (this.state = 19, this.commentHandler?.(this.text), this.text = "") : (this.text += `-${String.fromCodePoint(t)}`, this.state = 17);
|
|
341
|
+
}
|
|
342
|
+
sCommentEnded() {
|
|
343
|
+
const t = this.getCodeNorm();
|
|
344
|
+
t !== B ? (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(t)}`, this.state = 17) : this.state = Y;
|
|
345
|
+
}
|
|
346
|
+
sCData() {
|
|
347
|
+
this.captureToChar(_t) && (this.state = 21);
|
|
348
|
+
}
|
|
349
|
+
sCDataEnding() {
|
|
350
|
+
const t = this.getCodeNorm();
|
|
351
|
+
t === _t ? this.state = 22 : (this.text += `]${String.fromCodePoint(t)}`, this.state = 20);
|
|
352
|
+
}
|
|
353
|
+
sCDataEnding2() {
|
|
354
|
+
const t = this.getCodeNorm();
|
|
355
|
+
switch (t) {
|
|
356
|
+
case B:
|
|
357
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = Y;
|
|
358
|
+
break;
|
|
359
|
+
case _t:
|
|
360
|
+
this.text += "]";
|
|
361
|
+
break;
|
|
362
|
+
default:
|
|
363
|
+
this.text += `]]${String.fromCodePoint(t)}`, this.state = 20;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
sPIFirstChar() {
|
|
367
|
+
const t = this.getCodeNorm();
|
|
368
|
+
this.nameStartCheck(t) ? (this.piTarget += String.fromCodePoint(t), this.state = 24) : t === G || it(t) ? (this.fail("processing instruction without a target."), this.state = t === G ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(t), this.state = 24);
|
|
369
|
+
}
|
|
370
|
+
sPIRest() {
|
|
371
|
+
const { chunk: t, i: s } = this;
|
|
372
|
+
for (; ; ) {
|
|
373
|
+
const o = this.getCodeNorm();
|
|
374
|
+
if (o === N) return void (this.piTarget += t.slice(s));
|
|
375
|
+
if (!this.nameCheck(o)) {
|
|
376
|
+
this.piTarget += t.slice(s, this.prevI);
|
|
377
|
+
const a = o === G;
|
|
378
|
+
a || it(o) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = a ? Rt : 27) : this.state = a ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(o));
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
sPIBody() {
|
|
384
|
+
if (this.text.length === 0) {
|
|
385
|
+
const t = this.getCodeNorm();
|
|
386
|
+
t === G ? this.state = 26 : it(t) || (this.text = String.fromCodePoint(t));
|
|
387
|
+
} else this.captureToChar(G) && (this.state = 26);
|
|
388
|
+
}
|
|
389
|
+
sPIEnding() {
|
|
390
|
+
const t = this.getCodeNorm();
|
|
391
|
+
if (t === B) {
|
|
392
|
+
const { piTarget: s } = this;
|
|
393
|
+
s.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({ target: s, body: this.text }), this.piTarget = this.text = "", this.state = Y;
|
|
394
|
+
} else t === G ? this.text += "?" : (this.text += `?${String.fromCodePoint(t)}`, this.state = 25);
|
|
395
|
+
this.xmlDeclPossible = !1;
|
|
396
|
+
}
|
|
397
|
+
sXMLDeclNameStart() {
|
|
398
|
+
const t = this.skipSpaces();
|
|
399
|
+
t !== G ? t !== N && (this.state = 28, this.name = String.fromCodePoint(t)) : this.state = Rt;
|
|
400
|
+
}
|
|
401
|
+
sXMLDeclName() {
|
|
402
|
+
const t = this.captureTo(_e);
|
|
403
|
+
if (t === G) return this.state = Rt, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
404
|
+
if (it(t) || t === Wt) {
|
|
405
|
+
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
406
|
+
case 0:
|
|
407
|
+
this.fail("did not expect any more name/value pairs.");
|
|
408
|
+
break;
|
|
409
|
+
case 1:
|
|
410
|
+
this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);
|
|
411
|
+
break;
|
|
412
|
+
default:
|
|
413
|
+
this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
414
|
+
}
|
|
415
|
+
this.state = t === Wt ? 30 : 29;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
sXMLDeclEq() {
|
|
419
|
+
const t = this.getCodeNorm();
|
|
420
|
+
if (t === G) return this.state = Rt, void this.fail("XML declaration is incomplete.");
|
|
421
|
+
it(t) || (t !== Wt && this.fail("value required."), this.state = 30);
|
|
422
|
+
}
|
|
423
|
+
sXMLDeclValueStart() {
|
|
424
|
+
const t = this.getCodeNorm();
|
|
425
|
+
if (t === G) return this.state = Rt, void this.fail("XML declaration is incomplete.");
|
|
426
|
+
it(t) || (ie(t) ? this.q = t : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
427
|
+
}
|
|
428
|
+
sXMLDeclValue() {
|
|
429
|
+
const t = this.captureTo([this.q, G]);
|
|
430
|
+
if (t === G) return this.state = Rt, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
431
|
+
if (t === N) return;
|
|
432
|
+
const s = this.text;
|
|
433
|
+
switch (this.text = "", this.name) {
|
|
434
|
+
case "version": {
|
|
435
|
+
this.xmlDeclExpects = ["encoding", "standalone"];
|
|
436
|
+
const o = s;
|
|
437
|
+
this.xmlDecl.version = o, /^1\.[0-9]+$/.test(o) ? this.opt.forceXMLVersion || this.setXMLVersion(o) : this.fail("version number must match /^1\\.[0-9]+$/.");
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
case "encoding":
|
|
441
|
+
/^[A-Za-z][A-Za-z0-9._-]*$/.test(s) || this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."), this.xmlDeclExpects = ["standalone"], this.xmlDecl.encoding = s;
|
|
442
|
+
break;
|
|
443
|
+
case "standalone":
|
|
444
|
+
s !== "yes" && s !== "no" && this.fail('standalone value must match "yes" or "no".'), this.xmlDeclExpects = [], this.xmlDecl.standalone = s;
|
|
445
|
+
}
|
|
446
|
+
this.name = "", this.state = 32;
|
|
447
|
+
}
|
|
448
|
+
sXMLDeclSeparator() {
|
|
449
|
+
const t = this.getCodeNorm();
|
|
450
|
+
t !== G ? (it(t) || (this.fail("whitespace required."), this.unget()), this.state = 27) : this.state = Rt;
|
|
451
|
+
}
|
|
452
|
+
sXMLDeclEnding() {
|
|
453
|
+
this.getCodeNorm() === B ? (this.piTarget !== "xml" ? this.fail("processing instructions are not allowed before root.") : this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version."), this.xmldeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = Y) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
454
|
+
}
|
|
455
|
+
sOpenTag() {
|
|
456
|
+
const t = this.captureNameChars();
|
|
457
|
+
if (t === N) return;
|
|
458
|
+
const s = this.tag = { name: this.name, attributes: /* @__PURE__ */ Object.create(null) };
|
|
459
|
+
switch (this.name = "", this.xmlnsOpt && (this.topNS = s.ns = /* @__PURE__ */ Object.create(null)), this.openTagStartHandler?.(s), this.sawRoot = !0, !this.fragmentOpt && this.closedRoot && this.fail("documents may contain only one root."), t) {
|
|
460
|
+
case B:
|
|
461
|
+
this.openTag();
|
|
462
|
+
break;
|
|
463
|
+
case 47:
|
|
464
|
+
this.state = 35;
|
|
465
|
+
break;
|
|
466
|
+
default:
|
|
467
|
+
it(t) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
sOpenTagSlash() {
|
|
471
|
+
this.getCode() === B ? this.openSelfClosingTag() : (this.fail("forward-slash in opening tag not followed by >."), this.state = 36);
|
|
472
|
+
}
|
|
473
|
+
sAttrib() {
|
|
474
|
+
const t = this.skipSpaces();
|
|
475
|
+
t !== N && (Jt(t) ? (this.unget(), this.state = 37) : t === B ? this.openTag() : t === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
476
|
+
}
|
|
477
|
+
sAttribName() {
|
|
478
|
+
const t = this.captureNameChars();
|
|
479
|
+
t === Wt ? this.state = 39 : it(t) ? this.state = 38 : t === B ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : t !== N && this.fail("disallowed character in attribute name.");
|
|
480
|
+
}
|
|
481
|
+
sAttribNameSawWhite() {
|
|
482
|
+
const t = this.skipSpaces();
|
|
483
|
+
switch (t) {
|
|
484
|
+
case N:
|
|
485
|
+
return;
|
|
486
|
+
case Wt:
|
|
487
|
+
this.state = 39;
|
|
488
|
+
break;
|
|
489
|
+
default:
|
|
490
|
+
this.fail("attribute without value."), this.text = "", this.name = "", t === B ? this.openTag() : Jt(t) ? (this.unget(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
sAttribValue() {
|
|
494
|
+
const t = this.getCodeNorm();
|
|
495
|
+
ie(t) ? (this.q = t, this.state = 40) : it(t) || (this.fail("unquoted attribute value."), this.state = 42, this.unget());
|
|
496
|
+
}
|
|
497
|
+
sAttribValueQuoted() {
|
|
498
|
+
const { q: t, chunk: s } = this;
|
|
499
|
+
let { i: o } = this;
|
|
500
|
+
for (; ; ) switch (this.getCode()) {
|
|
501
|
+
case t:
|
|
502
|
+
return this.pushAttrib(this.name, this.text + s.slice(o, this.prevI)), this.name = this.text = "", this.q = null, void (this.state = 41);
|
|
503
|
+
case 38:
|
|
504
|
+
return this.text += s.slice(o, this.prevI), this.state = 14, void (this.entityReturnState = 40);
|
|
505
|
+
case pt:
|
|
506
|
+
case bt:
|
|
507
|
+
case 9:
|
|
508
|
+
this.text += `${s.slice(o, this.prevI)} `, o = this.i;
|
|
509
|
+
break;
|
|
510
|
+
case Ot:
|
|
511
|
+
return this.text += s.slice(o, this.prevI), void this.fail("disallowed character.");
|
|
512
|
+
case N:
|
|
513
|
+
return void (this.text += s.slice(o));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
sAttribValueClosed() {
|
|
517
|
+
const t = this.getCodeNorm();
|
|
518
|
+
it(t) ? this.state = 36 : t === B ? this.openTag() : t === 47 ? this.state = 35 : Jt(t) ? (this.fail("no whitespace between attributes."), this.unget(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
519
|
+
}
|
|
520
|
+
sAttribValueUnquoted() {
|
|
521
|
+
const t = this.captureTo(qe);
|
|
522
|
+
switch (t) {
|
|
523
|
+
case 38:
|
|
524
|
+
this.state = 14, this.entityReturnState = 42;
|
|
525
|
+
break;
|
|
526
|
+
case Ot:
|
|
527
|
+
this.fail("disallowed character.");
|
|
528
|
+
break;
|
|
529
|
+
case N:
|
|
530
|
+
break;
|
|
531
|
+
default:
|
|
532
|
+
this.text.includes("]]>") && this.fail('the string "]]>" is disallowed in char data.'), this.pushAttrib(this.name, this.text), this.name = this.text = "", t === B ? this.openTag() : this.state = 36;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
sCloseTag() {
|
|
536
|
+
const t = this.captureNameChars();
|
|
537
|
+
t === B ? this.closeTag() : it(t) ? this.state = 44 : t !== N && this.fail("disallowed character in closing tag.");
|
|
538
|
+
}
|
|
539
|
+
sCloseTagSawWhite() {
|
|
540
|
+
switch (this.skipSpaces()) {
|
|
541
|
+
case B:
|
|
542
|
+
this.closeTag();
|
|
543
|
+
break;
|
|
544
|
+
case N:
|
|
545
|
+
break;
|
|
546
|
+
default:
|
|
547
|
+
this.fail("disallowed character in closing tag.");
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
handleTextInRoot() {
|
|
551
|
+
let { i: t, forbiddenState: s } = this;
|
|
552
|
+
const { chunk: o, textHandler: a } = this;
|
|
553
|
+
t: for (; ; ) switch (this.getCode()) {
|
|
554
|
+
case Ot:
|
|
555
|
+
if (this.state = 15, a !== void 0) {
|
|
556
|
+
const { text: n } = this, c = o.slice(t, this.prevI);
|
|
557
|
+
n.length !== 0 ? (a(n + c), this.text = "") : c.length !== 0 && a(c);
|
|
558
|
+
}
|
|
559
|
+
s = 0;
|
|
560
|
+
break t;
|
|
561
|
+
case 38:
|
|
562
|
+
this.state = 14, this.entityReturnState = Y, a !== void 0 && (this.text += o.slice(t, this.prevI)), s = 0;
|
|
563
|
+
break t;
|
|
564
|
+
case _t:
|
|
565
|
+
switch (s) {
|
|
566
|
+
case 0:
|
|
567
|
+
s = 1;
|
|
568
|
+
break;
|
|
569
|
+
case 1:
|
|
570
|
+
s = 2;
|
|
571
|
+
break;
|
|
572
|
+
case 2:
|
|
573
|
+
break;
|
|
574
|
+
default:
|
|
575
|
+
throw new Error("impossible state");
|
|
576
|
+
}
|
|
577
|
+
break;
|
|
578
|
+
case B:
|
|
579
|
+
s === 2 && this.fail('the string "]]>" is disallowed in char data.'), s = 0;
|
|
580
|
+
break;
|
|
581
|
+
case bt:
|
|
582
|
+
a !== void 0 && (this.text += `${o.slice(t, this.prevI)}
|
|
583
|
+
`), t = this.i, s = 0;
|
|
584
|
+
break;
|
|
585
|
+
case N:
|
|
586
|
+
a !== void 0 && (this.text += o.slice(t));
|
|
587
|
+
break t;
|
|
588
|
+
default:
|
|
589
|
+
s = 0;
|
|
590
|
+
}
|
|
591
|
+
this.forbiddenState = s;
|
|
592
|
+
}
|
|
593
|
+
handleTextOutsideRoot() {
|
|
594
|
+
let { i: t } = this;
|
|
595
|
+
const { chunk: s, textHandler: o } = this;
|
|
596
|
+
let a = !1;
|
|
597
|
+
t: for (; ; ) {
|
|
598
|
+
const n = this.getCode();
|
|
599
|
+
switch (n) {
|
|
600
|
+
case Ot:
|
|
601
|
+
if (this.state = 15, o !== void 0) {
|
|
602
|
+
const { text: c } = this, p = s.slice(t, this.prevI);
|
|
603
|
+
c.length !== 0 ? (o(c + p), this.text = "") : p.length !== 0 && o(p);
|
|
604
|
+
}
|
|
605
|
+
break t;
|
|
606
|
+
case 38:
|
|
607
|
+
this.state = 14, this.entityReturnState = Y, o !== void 0 && (this.text += s.slice(t, this.prevI)), a = !0;
|
|
608
|
+
break t;
|
|
609
|
+
case bt:
|
|
610
|
+
o !== void 0 && (this.text += `${s.slice(t, this.prevI)}
|
|
611
|
+
`), t = this.i;
|
|
612
|
+
break;
|
|
613
|
+
case N:
|
|
614
|
+
o !== void 0 && (this.text += s.slice(t));
|
|
615
|
+
break t;
|
|
616
|
+
default:
|
|
617
|
+
it(n) || (a = !0);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
a && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
621
|
+
}
|
|
622
|
+
pushAttribNS(t, s) {
|
|
623
|
+
const { prefix: o, local: a } = this.qname(t), n = { name: t, prefix: o, local: a, value: s };
|
|
624
|
+
if (this.attribList.push(n), this.attributeHandler?.(n), o === "xmlns") {
|
|
625
|
+
const c = s.trim();
|
|
626
|
+
this.currentXMLVersion === "1.0" && c === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[a] = c, ae(this, a, c);
|
|
627
|
+
} else if (t === "xmlns") {
|
|
628
|
+
const c = s.trim();
|
|
629
|
+
this.topNS[""] = c, ae(this, "", c);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
pushAttribPlain(t, s) {
|
|
633
|
+
const o = { name: t, value: s };
|
|
634
|
+
this.attribList.push(o), this.attributeHandler?.(o);
|
|
635
|
+
}
|
|
636
|
+
end() {
|
|
637
|
+
this.sawRoot || this.fail("document must contain a root element.");
|
|
638
|
+
const { tags: t } = this;
|
|
639
|
+
for (; t.length > 0; ) {
|
|
640
|
+
const o = t.pop();
|
|
641
|
+
this.fail(`unclosed tag: ${o.name}`);
|
|
642
|
+
}
|
|
643
|
+
this.state !== 0 && this.state !== Y && this.fail("unexpected end.");
|
|
644
|
+
const { text: s } = this;
|
|
645
|
+
return s.length !== 0 && (this.textHandler?.(s), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
646
|
+
}
|
|
647
|
+
resolve(t) {
|
|
648
|
+
let s = this.topNS[t];
|
|
649
|
+
if (s !== void 0) return s;
|
|
650
|
+
const { tags: o } = this;
|
|
651
|
+
for (let a = o.length - 1; a >= 0; a--) if (s = o[a].ns[t], s !== void 0) return s;
|
|
652
|
+
return s = this.ns[t], s !== void 0 ? s : this.opt.resolvePrefix?.(t);
|
|
653
|
+
}
|
|
654
|
+
qname(t) {
|
|
655
|
+
const s = t.indexOf(":");
|
|
656
|
+
if (s === -1) return { prefix: "", local: t };
|
|
657
|
+
const o = t.slice(s + 1), a = t.slice(0, s);
|
|
658
|
+
return (a === "" || o === "" || o.includes(":")) && this.fail(`malformed name: ${t}.`), { prefix: a, local: o };
|
|
659
|
+
}
|
|
660
|
+
processAttribsNS() {
|
|
661
|
+
const { attribList: t } = this, s = this.tag;
|
|
662
|
+
{
|
|
663
|
+
const { prefix: n, local: c } = this.qname(s.name);
|
|
664
|
+
s.prefix = n, s.local = c;
|
|
665
|
+
const p = s.uri = this.resolve(n) ?? "";
|
|
666
|
+
n !== "" && (n === "xmlns" && this.fail('tags may not have "xmlns" as prefix.'), p === "" && (this.fail(`unbound namespace prefix: ${JSON.stringify(n)}.`), s.uri = n));
|
|
667
|
+
}
|
|
668
|
+
if (t.length === 0) return;
|
|
669
|
+
const { attributes: o } = s, a = /* @__PURE__ */ new Set();
|
|
670
|
+
for (const n of t) {
|
|
671
|
+
const { name: c, prefix: p, local: k } = n;
|
|
672
|
+
let y, S;
|
|
673
|
+
p === "" ? (y = c === "xmlns" ? qt : "", S = c) : (y = this.resolve(p), y === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(p)}.`), y = p), S = `{${y}}${k}`), a.has(S) && this.fail(`duplicate attribute: ${S}.`), a.add(S), n.uri = y, o[c] = n;
|
|
674
|
+
}
|
|
675
|
+
this.attribList = [];
|
|
676
|
+
}
|
|
677
|
+
processAttribsPlain() {
|
|
678
|
+
const { attribList: t } = this, s = this.tag.attributes;
|
|
679
|
+
for (const { name: o, value: a } of t) s[o] !== void 0 && this.fail(`duplicate attribute: ${o}.`), s[o] = a;
|
|
680
|
+
this.attribList = [];
|
|
681
|
+
}
|
|
682
|
+
openTag() {
|
|
683
|
+
this.processAttribs();
|
|
684
|
+
const { tags: t } = this, s = this.tag;
|
|
685
|
+
s.isSelfClosing = !1, this.openTagHandler?.(s), t.push(s), this.state = Y, this.name = "";
|
|
686
|
+
}
|
|
687
|
+
openSelfClosingTag() {
|
|
688
|
+
this.processAttribs();
|
|
689
|
+
const { tags: t } = this, s = this.tag;
|
|
690
|
+
s.isSelfClosing = !0, this.openTagHandler?.(s), this.closeTagHandler?.(s), (this.tag = t[t.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = Y, this.name = "";
|
|
691
|
+
}
|
|
692
|
+
closeTag() {
|
|
693
|
+
const { tags: t, name: s } = this;
|
|
694
|
+
if (this.state = Y, this.name = "", s === "") return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
695
|
+
const o = this.closeTagHandler;
|
|
696
|
+
let a = t.length;
|
|
697
|
+
for (; a-- > 0; ) {
|
|
698
|
+
const n = this.tag = t.pop();
|
|
699
|
+
if (this.topNS = n.ns, o?.(n), n.name === s) break;
|
|
700
|
+
this.fail("unexpected close tag.");
|
|
701
|
+
}
|
|
702
|
+
a === 0 ? this.closedRoot = !0 : a < 0 && (this.fail(`unmatched closing tag: ${s}.`), this.text += `</${s}>`);
|
|
703
|
+
}
|
|
704
|
+
parseEntity(t) {
|
|
705
|
+
if (t[0] !== "#") {
|
|
706
|
+
const o = this.ENTITIES[t];
|
|
707
|
+
return o !== void 0 ? o : (this.fail(this.isName(t) ? "undefined entity." : "disallowed character in entity name."), `&${t};`);
|
|
708
|
+
}
|
|
709
|
+
let s = NaN;
|
|
710
|
+
return t[1] === "x" && /^#x[0-9a-f]+$/i.test(t) ? s = parseInt(t.slice(2), 16) : /^#[0-9]+$/.test(t) && (s = parseInt(t.slice(1), 10)), this.isChar(s) ? String.fromCodePoint(s) : (this.fail("malformed character entity."), `&${t};`);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
var le, At;
|
|
714
|
+
(At = le || (le = {})).Events = { XmlDecl: "xmldecl", Text: "text", ProcessingInstruction: "processinginstruction", Doctype: "doctype", Comment: "comment", OpenTagStart: "opentagstart", Attribute: "attribute", OpenTag: "opentag", CloseTag: "closetag", CDdata: "cdata", Error: "error", End: "end", Ready: "ready" }, At.parseStream = async (i, t, s) => {
|
|
715
|
+
const o = new Ge({ position: !1, ...s });
|
|
716
|
+
let a;
|
|
717
|
+
if (t.onOpenTagStart && o.on(At.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && o.on(At.Events.OpenTag, t.onOpenTag), t.onCloseTag && o.on(At.Events.CloseTag, t.onCloseTag), t.onAttribute && o.on(At.Events.Attribute, t.onAttribute), t.onText && o.on(At.Events.Text, t.onText), t.onError && o.on(At.Events.Error, t.onError), t.onEnd) {
|
|
718
|
+
t.onEnd;
|
|
719
|
+
const n = () => {
|
|
720
|
+
a = t.onEnd();
|
|
721
|
+
};
|
|
722
|
+
o.on(At.Events.End, n);
|
|
723
|
+
}
|
|
724
|
+
for (; ; ) {
|
|
725
|
+
const { value: n, done: c } = await i.read();
|
|
726
|
+
if (c) break;
|
|
727
|
+
o.write(n);
|
|
728
|
+
}
|
|
729
|
+
return o.close(), a;
|
|
730
|
+
};
|
|
731
|
+
const A = (i) => i === !0 || i === "1" || i === "on" || i === "true" || i !== !1 && i !== "0" && i !== "off" && i !== "false" && null, V = (i) => {
|
|
732
|
+
const t = parseInt(i);
|
|
733
|
+
return isNaN(t) ? null : t;
|
|
734
|
+
}, xt = (i) => {
|
|
735
|
+
const t = parseFloat(i);
|
|
736
|
+
return isNaN(t) ? null : t;
|
|
737
|
+
}, P = null;
|
|
738
|
+
class Ze {
|
|
739
|
+
constructor() {
|
|
740
|
+
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
741
|
+
}
|
|
742
|
+
registerVisitor(t) {
|
|
743
|
+
this._registeredVisitors.set(t.from, t);
|
|
744
|
+
}
|
|
745
|
+
createEventHandler(t, s, o) {
|
|
746
|
+
const a = this._registeredVisitors, n = [];
|
|
747
|
+
let c = null, p = null, k = null, y = null;
|
|
748
|
+
const S = [], C = { key: null, source: t };
|
|
749
|
+
let b = null, O = !1;
|
|
750
|
+
const I = (f, l) => {
|
|
751
|
+
let w = k.attributes[f];
|
|
752
|
+
if (l) {
|
|
753
|
+
if (Array.isArray(l)) {
|
|
754
|
+
for (let D = 0; D < l.length; D++) if (w == null || (w = l[D](w), w == null)) return;
|
|
755
|
+
} else if (w == null || (w = l(w), w == null)) return;
|
|
756
|
+
}
|
|
757
|
+
return w;
|
|
758
|
+
}, x = { getSource: () => b.source, setSource: (f) => {
|
|
759
|
+
b.source = f;
|
|
760
|
+
}, setKey: (f) => {
|
|
761
|
+
b.key = f;
|
|
762
|
+
}, getFrom: () => k, getAttribute: (f, l) => I(f, l) ?? null, hasAttribute: (f) => x.getAttribute(f) !== null, getParent: () => S[S.length - 2].source, getPath: () => {
|
|
763
|
+
const f = [];
|
|
764
|
+
for (let l = 0; l < n.length; l++) f.push(n[l].local);
|
|
765
|
+
return f.join("\\");
|
|
766
|
+
}, parseAttribute: I, copyToObject: (f, l, w, D) => {
|
|
767
|
+
const q = I(D ?? l, w);
|
|
768
|
+
q !== void 0 && (f[l] = q);
|
|
769
|
+
}, copyTo: (f, l, w) => {
|
|
770
|
+
const D = I(w ?? f, l);
|
|
771
|
+
D !== void 0 && (b.source[f] = D);
|
|
772
|
+
}, warn: (f) => {
|
|
773
|
+
o ? o?.(f) : console.warn(f);
|
|
774
|
+
} };
|
|
775
|
+
return { onOpenTag: (f) => {
|
|
776
|
+
let l = f.name;
|
|
777
|
+
const w = l.indexOf(":");
|
|
778
|
+
w !== -1 && (l = l.slice(w + 1));
|
|
779
|
+
const D = a.get(l);
|
|
780
|
+
if (c = { local: l, visitor: D, tag: f, destination: null }, O) return n.push(c), p = l, void (k = f);
|
|
781
|
+
y = c?.visitor ?? null, D && (b = n.length === 0 ? C : y?.to !== null ? { key: null, source: {} } : null, c.destination = b, b && S.push(b)), n.push(c), p = l, k = f, O = y?.to === null, y?.openTag?.(x);
|
|
782
|
+
}, onCloseTag: (f) => {
|
|
783
|
+
let l = f.name;
|
|
784
|
+
const w = l.indexOf(":");
|
|
785
|
+
if (w !== -1 && (l = l.slice(w + 1)), l !== p) throw new Error(`mismatch open/close tag: '${l}'/'${p}'`);
|
|
786
|
+
O || y?.closeTag?.(x);
|
|
787
|
+
const D = n.pop() ?? null;
|
|
788
|
+
c = n[n.length - 1] ?? null;
|
|
789
|
+
const q = D?.destination;
|
|
790
|
+
if (q) {
|
|
791
|
+
S.pop(), b = S[S.length - 1] ?? C;
|
|
792
|
+
const ot = D.visitor;
|
|
793
|
+
ot && ot.to && q.source !== void 0 && (Array.isArray(ot.to) ? b.source.push ? b.source.push(q.source) : o?.(`Unable to parse array for ${ot.from} at ${x.getPath()}`) : q.key ? b.source[q.key] = q.source : typeof ot.to == "string" && (b.source[ot.to] = q.source));
|
|
794
|
+
}
|
|
795
|
+
p = c?.local ?? null, k = c?.tag ?? null, y = c?.visitor ?? null, O = !c?.destination;
|
|
796
|
+
}, onText: (f) => {
|
|
797
|
+
y?.text?.(f, x);
|
|
798
|
+
}, onEnd: s };
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
const fe = (i, t, s, o = null) => {
|
|
802
|
+
if (!i) return null;
|
|
803
|
+
let a = i;
|
|
804
|
+
a.startsWith("/") && (a = a.substring(1));
|
|
805
|
+
let n = o?.parsedRefs?.get(i);
|
|
806
|
+
if (n !== void 0) return n;
|
|
807
|
+
const c = t(a);
|
|
808
|
+
if (!c) return null;
|
|
809
|
+
let p = c.content;
|
|
810
|
+
try {
|
|
811
|
+
s && (p = s(p));
|
|
812
|
+
} catch (k) {
|
|
813
|
+
console.warn(k);
|
|
814
|
+
}
|
|
815
|
+
return o?.parsedRefs?.set(i, p), p;
|
|
816
|
+
}, ce = (i, t, s, o, a = null) => {
|
|
817
|
+
if (!i) return null;
|
|
818
|
+
let n = i;
|
|
819
|
+
n.startsWith("/") && (n = n.substring(1));
|
|
820
|
+
let c = a?.parsedRefs?.get(i);
|
|
821
|
+
if (c !== void 0) return c;
|
|
822
|
+
const p = t(n);
|
|
823
|
+
if (!p) return null;
|
|
824
|
+
const k = p.content;
|
|
825
|
+
try {
|
|
826
|
+
const y = new TextDecoder().decode(k), S = s.parseFromString(y, "text/xml"), C = o.convert(S, i, a);
|
|
827
|
+
return a?.parsedRefs?.set(i, C), C;
|
|
828
|
+
} catch (y) {
|
|
829
|
+
console.warn(y);
|
|
830
|
+
}
|
|
831
|
+
return null;
|
|
832
|
+
}, Bt = (i, t, s, o, a = null) => {
|
|
833
|
+
const n = /* @__PURE__ */ new Map();
|
|
834
|
+
let c = t.Directory[i];
|
|
835
|
+
const p = c ? c.length : 0;
|
|
836
|
+
for (let k = 0; k < p; k++) {
|
|
837
|
+
const y = c[k];
|
|
838
|
+
if (!y) continue;
|
|
839
|
+
let S = y;
|
|
840
|
+
S.startsWith("/") && (S = S.substring(1));
|
|
841
|
+
const C = ce(S, (b) => t.files[b], s, o, a);
|
|
842
|
+
n.set(S, C);
|
|
843
|
+
}
|
|
844
|
+
return n;
|
|
845
|
+
}, Qe = ["lt1", "dk1", "lt2", "dk2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6", "hlink", "folHlink"], me = (i, t = "dk1") => {
|
|
846
|
+
let s;
|
|
847
|
+
const o = i("auto");
|
|
848
|
+
o === void 0 || o !== "1" && o !== "true" || (s = t);
|
|
849
|
+
const a = i("indexed");
|
|
850
|
+
a && (s = `index${a}`);
|
|
851
|
+
const n = i("rgb");
|
|
852
|
+
n && (s = n.toLowerCase(), n.length !== 8 || n.startsWith("FF") || (s = "FF" + n.substring(2, n.length)));
|
|
853
|
+
const c = i("theme");
|
|
854
|
+
c && (s = Qe[c]);
|
|
855
|
+
let p = i("tint");
|
|
856
|
+
if (p && (s += ` ${Ee.AdjustmentType.ETint} ${parseFloat(p)}`), s) return s;
|
|
857
|
+
}, Je = (i) => i && i.replace(/^\{([\s\S]+)\}$/, "$1"), ss = (i) => i ? re.roundAccurately(parseFloat(i) / 12700, 4) : null, is = (i) => i ? re.roundAccurately(parseFloat(i) / 9525, 1) : null, os = (i) => parseFloat(i) / 1e3, rs = (i) => parseFloat(i) / 6e4, Ke = (i) => i === "true" || i === "1";
|
|
858
|
+
class $t {
|
|
859
|
+
static {
|
|
860
|
+
this.Collapsed = 1;
|
|
861
|
+
}
|
|
862
|
+
static {
|
|
863
|
+
this.CustomFormat = 2;
|
|
864
|
+
}
|
|
865
|
+
static {
|
|
866
|
+
this.CustomHeight = 4;
|
|
867
|
+
}
|
|
868
|
+
static {
|
|
869
|
+
this.Hidden = 8;
|
|
870
|
+
}
|
|
871
|
+
static {
|
|
872
|
+
this.Ht = 16;
|
|
873
|
+
}
|
|
874
|
+
static {
|
|
875
|
+
this.OutlineLevel = 32;
|
|
876
|
+
}
|
|
877
|
+
static {
|
|
878
|
+
this.Ph = 64;
|
|
879
|
+
}
|
|
880
|
+
static {
|
|
881
|
+
this.R = 128;
|
|
882
|
+
}
|
|
883
|
+
static {
|
|
884
|
+
this.S = 256;
|
|
885
|
+
}
|
|
886
|
+
static {
|
|
887
|
+
this.Spans = 512;
|
|
888
|
+
}
|
|
889
|
+
static {
|
|
890
|
+
this.ThickBot = 1024;
|
|
891
|
+
}
|
|
892
|
+
static {
|
|
893
|
+
this.ThickTop = 2048;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
const Ye = (i, t, s) => {
|
|
897
|
+
if (i[0].value[0] === i[1].value[0]) return t;
|
|
898
|
+
}, Te = { colStart: 0, colEnd: 0, rowStart: 0, rowEnd: 0 }, ts = (i, t, s, o, a, n, c) => {
|
|
899
|
+
let p = !1, k = !1, y = [], S = !1, C = null, b = null, O = null, I = null, x = null, f = null;
|
|
900
|
+
const l = c?.get("richData") ?? [], w = wt.normalizeA1ToR1C1, D = ne.createConflatingRanges(), q = /* @__PURE__ */ new Map(), ot = [];
|
|
901
|
+
let Dt = null;
|
|
902
|
+
const zt = ne.createConflatingRanges();
|
|
903
|
+
let vt, gt = !1, W = -1, z = -1, rt = null, ft = null;
|
|
904
|
+
const lt = [];
|
|
905
|
+
let Et = null, Ht = -2, ht = 0, St = "", mt = "", Ct = "", ct = "", Tt = "", yt = "", Z = "", jt = "", Ut = "", Kt = "", It = "", Yt = "", Xt = "", te = "", ut = !0, v = null, H = 0;
|
|
906
|
+
return { ...s, onEnd: () => {
|
|
907
|
+
lt.length > 0 && (t.rows = lt);
|
|
908
|
+
let d = D.done(Ye);
|
|
909
|
+
const T = d.length;
|
|
910
|
+
if (T > 0) {
|
|
911
|
+
const L = new Array(T);
|
|
912
|
+
for (let E = 0; E < T; E++) {
|
|
913
|
+
const U = d[E], j = wt.rangeToString(U), X = U.value[1], tt = wt.resolveRelativeToA1(X, U.rowStart, U.colStart);
|
|
914
|
+
L[E] = [j, tt];
|
|
915
|
+
}
|
|
916
|
+
t.formulas = L;
|
|
917
|
+
}
|
|
918
|
+
const R = zt.done(!0), g = R.length;
|
|
919
|
+
if (g > 0) {
|
|
920
|
+
const L = new Array(g);
|
|
921
|
+
for (let E = 0; E < g; E++) {
|
|
922
|
+
const U = R[E], j = wt.rangeToString(U);
|
|
923
|
+
L[E] = j;
|
|
924
|
+
}
|
|
925
|
+
t.volatile = L;
|
|
926
|
+
}
|
|
927
|
+
if (ot.length > 0 && (t.dynamicArray = [...ot]), y.length > 0) {
|
|
928
|
+
y.sort(ne.createRangeComparator(Pe.Orientation.Column));
|
|
929
|
+
const L = [];
|
|
930
|
+
let E = null, U = -1, j = -1, X = -1, tt = -1, J = null;
|
|
931
|
+
const dt = y.length;
|
|
932
|
+
dt > 0 && (E = y[0], U = E.colStart, j = E.colEnd, X = E.rowEnd, tt = E.value, L.push(E));
|
|
933
|
+
for (let K = 1; K < dt; K++) J = y[K], tt !== J.value || U !== J.colStart || j !== J.colEnd || X + 1 !== J.rowEnd ? (L.push(J), E = J, U = E.colStart, j = E.colEnd, X = E.rowEnd, tt = E.value) : (X = J.rowEnd, E.rowEnd = X);
|
|
934
|
+
let kt = [];
|
|
935
|
+
for (let K = 0; K < L.length; K++) {
|
|
936
|
+
const Pt = L[K];
|
|
937
|
+
kt.push({ r: { colStart: Pt.colStart, colEnd: Pt.colEnd, rowStart: Pt.rowStart, rowEnd: Pt.rowEnd }, v: Pt.value });
|
|
938
|
+
}
|
|
939
|
+
t.directStyles = kt;
|
|
940
|
+
}
|
|
941
|
+
const Q = i.build();
|
|
942
|
+
if (Q) {
|
|
943
|
+
const L = Q.tuples;
|
|
944
|
+
t.data = L;
|
|
945
|
+
}
|
|
946
|
+
s?.onEnd?.();
|
|
947
|
+
}, onOpenTag: (d) => {
|
|
948
|
+
let T = d.name;
|
|
949
|
+
const R = T.indexOf(":");
|
|
950
|
+
if (R !== -1 && (T = T.slice(R + 1)), H++, H % 196608 == 0 && a(H), vt) {
|
|
951
|
+
const g = d.attributes;
|
|
952
|
+
switch (T) {
|
|
953
|
+
case "v":
|
|
954
|
+
k = !0;
|
|
955
|
+
break;
|
|
956
|
+
case "f":
|
|
957
|
+
switch (g.t ?? null) {
|
|
958
|
+
case null:
|
|
959
|
+
case "normal":
|
|
960
|
+
S = !0;
|
|
961
|
+
break;
|
|
962
|
+
case "shared":
|
|
963
|
+
const Q = g.si;
|
|
964
|
+
b = g.ref, C = Q;
|
|
965
|
+
break;
|
|
966
|
+
case "array":
|
|
967
|
+
S = !0, b = g.ref, Dt = [b, !1];
|
|
968
|
+
break;
|
|
969
|
+
case "datatable":
|
|
970
|
+
S = !0, b = g.ref, S = !0;
|
|
971
|
+
}
|
|
972
|
+
g.ca !== void 0 && zt.append(W, z);
|
|
973
|
+
break;
|
|
974
|
+
case "is":
|
|
975
|
+
return void (gt = !0);
|
|
976
|
+
}
|
|
977
|
+
return void (gt && n?.onOpenTag(d));
|
|
978
|
+
}
|
|
979
|
+
if (p) {
|
|
980
|
+
if (T === "c") {
|
|
981
|
+
vt = d;
|
|
982
|
+
const g = d.attributes.r;
|
|
983
|
+
z = wt.fastStringToCol(g);
|
|
984
|
+
const Q = d.attributes.t;
|
|
985
|
+
Q === void 0 ? ft = null : (ft = Q, ft === "str" && (gt = !0));
|
|
986
|
+
let L = d.attributes.s;
|
|
987
|
+
L !== void 0 && (L = parseInt(L), v && v.value === L && v.colEnd + 1 === z ? v.colEnd = z : (v = { colStart: z, rowStart: W, colEnd: z, rowEnd: W, value: L }, y.push(v)));
|
|
988
|
+
}
|
|
989
|
+
} else {
|
|
990
|
+
if (T === "row") {
|
|
991
|
+
p = !0;
|
|
992
|
+
const g = d.attributes.r;
|
|
993
|
+
if (W = parseInt(g) - 1, ht = 0, mt = d.attributes.customHeight, mt !== void 0 && (ht |= $t.CustomHeight), mt !== Ut && (ut = !0, Ut = mt), St = d.attributes.ht, St !== void 0 && (ht |= $t.Ht), St !== jt && (ut = !0, jt = St), Ct = d.attributes.hidden, Ct !== void 0 && (ht |= $t.Hidden), Ct !== Kt && (ut = !0, Kt = Ct), Tt = d.attributes.s, Tt !== void 0 && (ht |= $t.S), Tt !== Yt && (ut = !0, Yt = Tt), ct = d.attributes.customFormat, ct !== void 0 && (ht |= $t.CustomFormat), ct !== It && (ut = !0, It = ct), yt = d.attributes.outlineLevel, yt !== void 0 && (ht |= $t.OutlineLevel), yt !== Xt && (ut = !0, Xt = yt), Z = d.attributes.collapsed, Z !== void 0 && (ht |= $t.Collapsed), Z !== te && (ut = !0, te = Z), ht !== 0) if (Ht + 1 !== W || ut) {
|
|
994
|
+
const Q = mt !== void 0 && (mt === "1" || mt === "true"), L = ct !== void 0 && (ct === "1" || ct === "true");
|
|
995
|
+
Et = { min: W, max: W, sz: Q && St !== void 0 ? parseFloat(St) : -1, csz: Q, h: Ct !== void 0 && (Ct === "1" || Ct === "true"), s: Q && Tt !== void 0 && Tt !== "0" ? parseInt(Tt) : 0, cs: L, l: yt === void 0 || yt === "0" ? 0 : parseInt(yt), cl: Z !== void 0 && (Z === "1" || Z === "true") }, lt.push(Et);
|
|
996
|
+
} else Et.max = W;
|
|
997
|
+
return Ht = W, void (ut = !1);
|
|
998
|
+
}
|
|
999
|
+
s?.onOpenTag(d);
|
|
1000
|
+
}
|
|
1001
|
+
}, onCloseTag: (d) => {
|
|
1002
|
+
if (vt) {
|
|
1003
|
+
let T = d.name;
|
|
1004
|
+
const R = T.indexOf(":");
|
|
1005
|
+
if (R !== -1 && (T = T.slice(R + 1)), gt) if (T === "is" || T === "v") {
|
|
1006
|
+
const g = n?.onEnd();
|
|
1007
|
+
g !== null && i.addValue(W, z, "" + g);
|
|
1008
|
+
} else n?.onCloseTag?.(d);
|
|
1009
|
+
return k && (k = !1), void (T === "c" && (vt = null, gt = !1));
|
|
1010
|
+
}
|
|
1011
|
+
if (p) return p = !1, void (v = null);
|
|
1012
|
+
s?.onCloseTag(d);
|
|
1013
|
+
}, onText: (d) => {
|
|
1014
|
+
if (d = d.trim(), k) {
|
|
1015
|
+
switch (rt = null, ft) {
|
|
1016
|
+
case null:
|
|
1017
|
+
case "n":
|
|
1018
|
+
rt = parseFloat(d);
|
|
1019
|
+
break;
|
|
1020
|
+
case "b":
|
|
1021
|
+
rt = d === "1" || d === "true";
|
|
1022
|
+
break;
|
|
1023
|
+
case "s":
|
|
1024
|
+
rt = d;
|
|
1025
|
+
break;
|
|
1026
|
+
case "e":
|
|
1027
|
+
if (d === "#VALUE!") {
|
|
1028
|
+
const R = vt.attributes.vm;
|
|
1029
|
+
if (R !== void 0) {
|
|
1030
|
+
const g = l[parseInt(R) - 1];
|
|
1031
|
+
if (g && g.isFormulaError) {
|
|
1032
|
+
rt = { t: Mt.Error, v: g.getCode() };
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
const T = Ie.getBuiltInByLabel(d);
|
|
1038
|
+
T ? rt = { t: Mt.Error, v: T.getCode() } : (rt = d, o?.(`Unknown formula error '${d}' in cell ${wt.cellToString({ colIndex: z, rowIndex: W })}`));
|
|
1039
|
+
break;
|
|
1040
|
+
case "str":
|
|
1041
|
+
case "inlineStr":
|
|
1042
|
+
gt = !0;
|
|
1043
|
+
}
|
|
1044
|
+
rt !== null && i.addValue(W, z, rt);
|
|
1045
|
+
}
|
|
1046
|
+
if (Dt && (ft === "e" && (Dt[1] = !0), ot.push(Dt), Dt = null), C) if (x === C) I = f;
|
|
1047
|
+
else {
|
|
1048
|
+
if (I = q.get(C), !I) {
|
|
1049
|
+
const T = [];
|
|
1050
|
+
O = w(d, W, z, T), I = [O, T, d], q.set(C, I);
|
|
1051
|
+
}
|
|
1052
|
+
x = C, f = I;
|
|
1053
|
+
}
|
|
1054
|
+
if (S) {
|
|
1055
|
+
const T = [];
|
|
1056
|
+
O = w(d, W, z, T), I = [O, T, d];
|
|
1057
|
+
}
|
|
1058
|
+
if (I) return D.append(W, z, I), I = null, S = !1, C = null, void (b = null);
|
|
1059
|
+
gt ? n?.onText(d) : p || s?.onText(d);
|
|
1060
|
+
} };
|
|
1061
|
+
}, ns = Object.freeze(Object.defineProperty({ __proto__: null, fromBufferXLSX: async (i, t) => {
|
|
1062
|
+
const { password: s, createWorkbookOptions: o = {}, ...a } = t ?? {}, n = [], c = t?.progress, p = c?.onStart?.(t?.name ?? "Parsing XLSX");
|
|
1063
|
+
await Promise.resolve(p);
|
|
1064
|
+
const k = c?.onProgress;
|
|
1065
|
+
let y = 0;
|
|
1066
|
+
const S = import("./swe5uQxGiNoljwcZ.js"), C = import("./CA-iEdjENXePF7HK.js");
|
|
1067
|
+
let b = null;
|
|
1068
|
+
try {
|
|
1069
|
+
b = new DOMParser();
|
|
1070
|
+
} catch {
|
|
1071
|
+
}
|
|
1072
|
+
let O = null;
|
|
1073
|
+
b || (O = import("./BXeU9MWWLu7OeigM.js").then((l) => l.i));
|
|
1074
|
+
let I = null, x = null, f = null;
|
|
1075
|
+
try {
|
|
1076
|
+
const l = await Promise.all([S, C, O]);
|
|
1077
|
+
I = l[0], x = l[1], f = l[2];
|
|
1078
|
+
} catch (l) {
|
|
1079
|
+
throw new Error("Unable to load XLSX parser.", { cause: l });
|
|
1080
|
+
}
|
|
1081
|
+
try {
|
|
1082
|
+
const l = I.read(i, { type: "array", sheets: [], cellStyles: !1, bookFiles: !0 });
|
|
1083
|
+
if (!l.Directory) throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
1084
|
+
l.Directory.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], l.Directory.richdata = ["/xl/richData/rdrichvalue.xml"];
|
|
1085
|
+
const w = new x.FromOOXMLConverter(), D = b ?? new f.DOMParser(), q = o?.resources ?? new Se(), ot = q.beginPersist(), Dt = {}, zt = /* @__PURE__ */ new Set(), vt = /* @__PURE__ */ new Map();
|
|
1086
|
+
vt.set("richTypes", []);
|
|
1087
|
+
const gt = /* @__PURE__ */ new Map(), W = [], z = (v) => l.files[v], rt = (v, H) => {
|
|
1088
|
+
const d = v.lastIndexOf("/"), T = v.substring(0, d + 1) + "_rels/" + v.substring(d + 1, v.length) + ".rels";
|
|
1089
|
+
let R = H.get(T);
|
|
1090
|
+
return R || (R = ((g, Q, L, E, U = null) => {
|
|
1091
|
+
if (!g) return null;
|
|
1092
|
+
const j = ce(g, Q, L, E, U);
|
|
1093
|
+
if (!j) return null;
|
|
1094
|
+
const X = /* @__PURE__ */ new Map(), tt = Object.keys(j), J = tt.length;
|
|
1095
|
+
for (let dt = 0; dt < J; dt++) {
|
|
1096
|
+
const kt = tt[dt], K = j[kt];
|
|
1097
|
+
X.set(kt, K);
|
|
1098
|
+
}
|
|
1099
|
+
return X;
|
|
1100
|
+
})(T, z, D, w, lt), H.set(T, R)), R;
|
|
1101
|
+
}, ft = (v, H, d, T = gt) => {
|
|
1102
|
+
let R = rt(H, T).get(v), g = R?.target;
|
|
1103
|
+
if (!g) return null;
|
|
1104
|
+
if (R.targetMode === "External") return R.target;
|
|
1105
|
+
const Q = H.lastIndexOf("/"), L = H.substring(0, Q + 1);
|
|
1106
|
+
g.startsWith("/") || (g = L + g), g = ((j) => {
|
|
1107
|
+
const X = j.split(/\/+/);
|
|
1108
|
+
return X.reduce((tt, J, dt) => (J === "." ? tt.splice(dt, 1) : J === ".." && tt.splice(dt - 1, 2), tt), X).join("/");
|
|
1109
|
+
})(g);
|
|
1110
|
+
const E = w?.getVisitorParamsState().get("dxfs");
|
|
1111
|
+
let U = T.get(g);
|
|
1112
|
+
if (!U) if (R.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
1113
|
+
const j = {};
|
|
1114
|
+
U = j;
|
|
1115
|
+
const X = async () => {
|
|
1116
|
+
const tt = ((M, _, Gt, et, nt, st, Zt, Vt) => {
|
|
1117
|
+
const u = new Ze(), at = new Ce.TransposedBuilder();
|
|
1118
|
+
let F = null;
|
|
1119
|
+
u.registerVisitor({ from: "autoFilter", to: "filter", openTag: (e) => {
|
|
1120
|
+
e.copyTo("ref", P);
|
|
1121
|
+
} }), u.registerVisitor({ from: "conditionalFormatting", to: {}, openTag: (e) => {
|
|
1122
|
+
const r = e.getParent();
|
|
1123
|
+
r.conditionals || (r.conditionals = []), r.conditionals.push(e.getSource());
|
|
1124
|
+
const h = e.getAttribute("sqref");
|
|
1125
|
+
h && (e.getSource().ref = h.split(" ").join(",")), e.copyTo("pivot", A);
|
|
1126
|
+
}, closeTag: (e) => {
|
|
1127
|
+
const r = e.getSource();
|
|
1128
|
+
if (r.rule) {
|
|
1129
|
+
const h = Object.keys(r.rule);
|
|
1130
|
+
for (let m = 0; m < h.length; m++) {
|
|
1131
|
+
const $ = h[m];
|
|
1132
|
+
$ !== "rule" && (r[$] = r.rule[$]);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
delete r.rule;
|
|
1136
|
+
} }), u.registerVisitor({ from: "cfRule", to: "rule", openTag: (e) => {
|
|
1137
|
+
const r = e.getParent();
|
|
1138
|
+
e.copyToObject(r, "type", P), e.copyToObject(r, "priority", V), e.copyToObject(r, "stopIfTrue", A);
|
|
1139
|
+
const h = e.getAttribute("dxfId", V);
|
|
1140
|
+
if (h !== null) {
|
|
1141
|
+
let m = et?.get(h);
|
|
1142
|
+
m || (st?.(`Unable to load conditional color. Invalid dxfI: '${h}' at '${e.getPath()}'.`), m = {}), r.style = m;
|
|
1143
|
+
}
|
|
1144
|
+
e.copyToObject(r, "aboveAverage", A), e.copyToObject(r, "equalAverage", A), e.copyToObject(r, "stdDev", V), e.copyToObject(r, "bottom", A), e.copyToObject(r, "percent", A), e.copyToObject(r, "rank", V), e.copyToObject(r, "operator", P), e.copyToObject(r, "text", P), e.copyToObject(r, "timePeriod", P);
|
|
1145
|
+
} }), u.registerVisitor({ from: "colorScale", to: "colorScale" }), u.registerVisitor({ from: "dataBar", to: "dataBar", openTag: (e) => {
|
|
1146
|
+
e.copyTo("maxLength", V), e.copyTo("minLength", V), e.copyTo("showValue", A);
|
|
1147
|
+
} }), u.registerVisitor({ from: "iconSet", to: "iconSet", openTag: (e) => {
|
|
1148
|
+
e.copyTo("iconSet", P), e.copyTo("reverse", A), e.copyTo("showValue", A);
|
|
1149
|
+
} }), u.registerVisitor({ from: "formula", to: null, text: (e, r) => {
|
|
1150
|
+
const h = r.getParent();
|
|
1151
|
+
let m = h.formulas;
|
|
1152
|
+
m || (m = [], h.formulas = m), m.push(e);
|
|
1153
|
+
} }), u.registerVisitor({ from: "cfvo", to: {}, openTag: (e) => {
|
|
1154
|
+
const r = e.getParent();
|
|
1155
|
+
r.conditions || (r.conditions = []), r.conditions.push(e.getSource()), e.copyTo("type", P), e.copyTo("value", xt, "val"), e.copyTo("gte", A);
|
|
1156
|
+
} }), u.registerVisitor({ from: "color", to: {}, openTag: (e) => {
|
|
1157
|
+
const r = e.getParent();
|
|
1158
|
+
r.colors || (r.colors = []);
|
|
1159
|
+
const h = me((m) => e.getAttribute(m));
|
|
1160
|
+
r.colors.push(h);
|
|
1161
|
+
} }), u.registerVisitor({ from: "filterColumn", to: "filterColumn", openTag: (e) => {
|
|
1162
|
+
const r = e.getParent();
|
|
1163
|
+
r.fields || (r.fields = []), r.fields.push(e.getSource()), e.copyTo("offset", V, "colId"), e.copyTo("hiddenButton", A), e.copyTo("showButton", A);
|
|
1164
|
+
} }), u.registerVisitor({ from: "colorFilter", to: "colorFilter", openTag: (e) => {
|
|
1165
|
+
const r = e.getParent();
|
|
1166
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Color, e.copyTo("cellColor", A), e.copyTo("styleId", V, "dxfId");
|
|
1167
|
+
} }), u.registerVisitor({ from: "dynamicFilter", to: "dynamicFilter", openTag: (e) => {
|
|
1168
|
+
const r = e.getParent();
|
|
1169
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Dynamic, e.copyTo("dynamicType", P, "type"), e.copyTo("val", xt), e.copyTo("maxVal", xt, "maxVal");
|
|
1170
|
+
} }), u.registerVisitor({ from: "iconFilter", to: "iconFilter", openTag: (e) => {
|
|
1171
|
+
const r = e.getParent();
|
|
1172
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Icon, e.copyTo("iconId", V), e.copyTo("iconSet", P);
|
|
1173
|
+
} }), u.registerVisitor({ from: "top10", to: "top10", openTag: (e) => {
|
|
1174
|
+
const r = e.getParent();
|
|
1175
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Top10, e.copyTo("filterVal", xt), e.copyTo("percent", A), e.copyTo("top", A), e.copyTo("val", xt);
|
|
1176
|
+
} }), u.registerVisitor({ from: "filters", to: "filters", openTag: (e) => {
|
|
1177
|
+
const r = e.getParent();
|
|
1178
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Items, e.copyTo("blank", A), e.copyTo("calendarType", P);
|
|
1179
|
+
} }), u.registerVisitor({ from: "dateGroupItem", to: "dateGroupItem", openTag: (e) => {
|
|
1180
|
+
const r = e.getParent();
|
|
1181
|
+
r.dateGroups || (r.dateGroups = []), r.dateGroups.push(e.getSource()), e.copyTo("group", P, "dateTimeGrouping"), e.copyTo("day", V), e.copyTo("hour", V), e.copyTo("minute", V), e.copyTo("month", V), e.copyTo("second", V), e.copyTo("year", V);
|
|
1182
|
+
} }), u.registerVisitor({ from: "filter", to: "filter", openTag: (e) => {
|
|
1183
|
+
const r = e.getParent();
|
|
1184
|
+
r.items || (r.items = []), r.items.push(e.getAttribute("val", xt));
|
|
1185
|
+
} }), u.registerVisitor({ from: "customFilters", to: "customFilters", openTag: (e) => {
|
|
1186
|
+
const r = e.getParent();
|
|
1187
|
+
r.criteria || (r.criteria = []), r.criteria.push(e.getSource()), e.getSource().type = Ft.Type.Custom, e.copyTo("and", A);
|
|
1188
|
+
} }), u.registerVisitor({ from: "customFilter", to: "customFilter", openTag: (e) => {
|
|
1189
|
+
const r = e.getParent();
|
|
1190
|
+
r.filters || (r.filters = []), r.filters.push(e.getSource()), e.copyTo("operator", P), e.copyTo("value", xt, "val");
|
|
1191
|
+
} }), u.registerVisitor({ from: "sortState", to: "sort", openTag: (e) => {
|
|
1192
|
+
e.copyTo("ref", P);
|
|
1193
|
+
} }), u.registerVisitor({ from: "sortCondition", to: "sortCondition", openTag: (e) => {
|
|
1194
|
+
const r = e.getParent();
|
|
1195
|
+
r.fields || (r.fields = []);
|
|
1196
|
+
const h = e.getSource();
|
|
1197
|
+
r.fields.push(h), e.copyTo("sortOn", P, "sortBy"), e.copyTo("dxfId", P, "sortBy"), e.copyTo("iconSet", P), e.copyTo("customList", P);
|
|
1198
|
+
const m = e.getAttribute("ref");
|
|
1199
|
+
if (m) {
|
|
1200
|
+
const $ = wt.fastStringToRange(m, Te).colStart, Lt = wt.fastStringToRange(r.ref, Te), se = Lt.colStart;
|
|
1201
|
+
h.offset = Lt ? $ - se : $;
|
|
1202
|
+
}
|
|
1203
|
+
h.reverse = e.getAttribute("descending", A) ?? !1;
|
|
1204
|
+
} }), u.registerVisitor({ from: "AlternateContent", to: null });
|
|
1205
|
+
const ee = (e) => {
|
|
1206
|
+
F = e.getSource(), e.copyTo("topLeft", P, "topLeftCell");
|
|
1207
|
+
const r = Ke(e.getAttribute("defaultGridColor")), h = e.getAttribute("colorId");
|
|
1208
|
+
h === null || r || (e.getSource().gridLineColor = "index" + parseFloat(h)), e.copyTo("showZeros", A), e.copyTo("showFormulas", A), e.copyTo("zoomScale", V), e.copyTo("showRowHeaders", A, "showRowColHeaders"), e.copyTo("showColumnHeaders", A, "showRowColHeaders"), e.copyTo("showRowGridlines", A, "showGridLines"), e.copyTo("showColumnGridlines", A, "showGridLines");
|
|
1209
|
+
};
|
|
1210
|
+
u.registerVisitor({ from: "sheetView", to: "view", openTag: (e) => {
|
|
1211
|
+
ee(e);
|
|
1212
|
+
}, closeTag: () => {
|
|
1213
|
+
F = null;
|
|
1214
|
+
} }), u.registerVisitor({ from: "customSheetViews", to: "customSheetViews", openTag: (e) => {
|
|
1215
|
+
e.setSource([]);
|
|
1216
|
+
} }), u.registerVisitor({ from: "customSheetView", to: [], openTag: (e) => {
|
|
1217
|
+
ee(e);
|
|
1218
|
+
}, closeTag: () => {
|
|
1219
|
+
F = null;
|
|
1220
|
+
} }), u.registerVisitor({ from: "selection", to: "selection", openTag: (e) => {
|
|
1221
|
+
if (!F) return;
|
|
1222
|
+
e.copyTo("cell", P, "activeCell"), e.copyTo("rangeIndex", V, "activeCellId");
|
|
1223
|
+
const r = e.getAttribute("activeCell"), h = e.getAttribute("sqref");
|
|
1224
|
+
h && h !== r && (e.getSource().ranges = h.split(" "));
|
|
1225
|
+
} }), u.registerVisitor({ from: "pane", to: "pane", openTag: (e) => {
|
|
1226
|
+
if (F && e.getAttribute("state") === "frozen") {
|
|
1227
|
+
const r = {};
|
|
1228
|
+
F.freezePanes = r, e.copyToObject(r, "topLeft", P, "topLeftCell");
|
|
1229
|
+
const h = F.topLeft ? wt.fastStringToCell(F.topLeft) : { colIndex: 0, rowIndex: 0 }, m = { colIndex: 0, rowIndex: 0 };
|
|
1230
|
+
e.copyToObject(m, "colIndex", V, "xSplit"), e.copyToObject(m, "rowIndex", V, "ySplit");
|
|
1231
|
+
const $ = { colIndex: h.colIndex + m.colIndex, rowIndex: h.rowIndex + m.rowIndex };
|
|
1232
|
+
r.coords = wt.cellToString($);
|
|
1233
|
+
}
|
|
1234
|
+
} }), u.registerVisitor({ from: "tabColor", to: null, openTag: (e) => {
|
|
1235
|
+
const r = me((h) => e.getAttribute(h));
|
|
1236
|
+
r && (M.tabColor = r);
|
|
1237
|
+
} }), u.registerVisitor({ from: "pageSetUpPr", to: "pageSetUpPr", openTag: (e) => {
|
|
1238
|
+
} }), u.registerVisitor({ from: "outlinePr", to: "outlinePr", openTag: (e) => {
|
|
1239
|
+
} }), u.registerVisitor({ from: "pageMargins", to: "pageMargins", openTag: (e) => {
|
|
1240
|
+
} }), u.registerVisitor({ from: "pageSetup", to: "pageSetup", openTag: (e) => {
|
|
1241
|
+
} }), u.registerVisitor({ from: "printOptions", to: "printOptions", openTag: (e) => {
|
|
1242
|
+
} }), u.registerVisitor({ from: "mergeCells", to: "merges", openTag: (e) => {
|
|
1243
|
+
e.setSource([]);
|
|
1244
|
+
} }), u.registerVisitor({ from: "mergeCell", to: [], openTag: (e) => {
|
|
1245
|
+
const r = e.getAttribute("ref");
|
|
1246
|
+
e.setSource(r);
|
|
1247
|
+
} }), u.registerVisitor({ from: "hyperlinks", to: "hyperlinks", openTag: (e) => {
|
|
1248
|
+
e.setSource([]);
|
|
1249
|
+
} }), u.registerVisitor({ from: "hyperlink", to: [], openTag: (e) => {
|
|
1250
|
+
const r = e.getAttribute("r:id"), h = e.getAttribute("ref");
|
|
1251
|
+
if (!h) return void console.warn("No ref found for hyperlink");
|
|
1252
|
+
e.setKey(h);
|
|
1253
|
+
let m = r ? _(r) : "";
|
|
1254
|
+
if (typeof m != "string") return void console.warn("Invalid address ", m);
|
|
1255
|
+
const $ = e.getAttribute("location");
|
|
1256
|
+
m.endsWith("\\") && (m = m.substring(0, m.length - 1));
|
|
1257
|
+
const Lt = e.getAttribute("location");
|
|
1258
|
+
if (Lt && ($ && $ !== Lt && console.warn("display and location are different", $, Lt), m += "#" + Lt), !m) return void console.warn("No address found for hyperlink. r:id", r);
|
|
1259
|
+
let se;
|
|
1260
|
+
const he = e.getAttribute("tooltip");
|
|
1261
|
+
se = he ? { address: m, tooltip: he } : m, e.setSource({ r: h, v: se });
|
|
1262
|
+
} }), u.registerVisitor({ from: "drawing", to: "movables", openTag: (e) => {
|
|
1263
|
+
const r = e.getAttribute("r:id");
|
|
1264
|
+
if (!r) return;
|
|
1265
|
+
const h = _(r);
|
|
1266
|
+
h ? e.setSource(h.movables) : console.warn("no drawing found for rId", r);
|
|
1267
|
+
} }), u.registerVisitor({ from: "tableParts", to: "tables", openTag: (e) => {
|
|
1268
|
+
e.setSource([]);
|
|
1269
|
+
} }), u.registerVisitor({ from: "tablePart", to: [], openTag: (e) => {
|
|
1270
|
+
const r = e.getAttribute("r:id");
|
|
1271
|
+
if (!r) return;
|
|
1272
|
+
const h = _(r);
|
|
1273
|
+
h ? e.setSource(h) : console.warn("no table found for rId", r);
|
|
1274
|
+
} }), u.registerVisitor({ from: "worksheet", to: "worksheet", openTag: (e) => {
|
|
1275
|
+
} }), u.registerVisitor({ from: "sheetProtection", to: "protection", openTag: (e) => {
|
|
1276
|
+
let r = !1;
|
|
1277
|
+
if (e.hasAttribute("sheet") && A(e.getAttribute("sheet")) && (r = !0), !r) return void e.setSource(void 0);
|
|
1278
|
+
const h = ($) => $ === !0 || $ === "1" || $ === "on" || $ === "true" || $ === !1 || $ === "0" || $ === "off" || $ === "false" || null;
|
|
1279
|
+
e.copyTo("autoFilter", h), e.copyTo("deleteColumns", h), e.copyTo("formatCells", h), e.copyTo("formatColumns", h), e.copyTo("formatRows", h), e.copyTo("insertColumns", h), e.copyTo("insertHyperlinks", h), e.copyTo("insertRows", h), e.copyTo("objects", h), e.copyTo("pivotTables", h), e.copyTo("scenarios", h), e.copyTo("selectUnlockedCells", h), e.copyTo("selectUnlockedCells", h), e.copyTo("sort", h);
|
|
1280
|
+
const m = {};
|
|
1281
|
+
e.copyToObject(m, "hash", P, "hashValue"), e.copyToObject(m, "algorithm", P, "algorithmName"), e.copyToObject(m, "salt", P, "saltValue"), e.copyToObject(m, "spinCount", V), Object.keys(m).length > 0 && (e.getSource().password = m);
|
|
1282
|
+
} }), u.registerVisitor({ from: "protectedRanges", to: "protectedRanges", openTag: (e) => {
|
|
1283
|
+
e.setSource({});
|
|
1284
|
+
} }), u.registerVisitor({ from: "protectedRange", to: {}, openTag: (e) => {
|
|
1285
|
+
const r = e.getAttribute("sqref");
|
|
1286
|
+
e.setKey(r), e.copyTo("name"), e.copyTo("securityDescriptor");
|
|
1287
|
+
const h = {};
|
|
1288
|
+
e.copyToObject(h, "hash", P, "hashValue"), e.copyToObject(h, "algorithm", P, "algorithmName"), e.copyToObject(h, "salt", P, "saltValue"), e.copyToObject(h, "spinCount", V), Object.keys(h).length > 0 && (e.getSource().password = h);
|
|
1289
|
+
} }), u.registerVisitor({ from: "sheetFormatPr", to: "sheetFormatPr", openTag: (e) => {
|
|
1290
|
+
e.copyToObject(M, "defaultColSize", xt, "defaultColWidth"), e.copyToObject(M, "outlineLevelCol", V, "outlineLevelCol");
|
|
1291
|
+
const r = e.getAttribute("customHeight");
|
|
1292
|
+
r !== "1" && r !== "true" || e.copyToObject(M, "defaultRowSize", xt, "defaultRowHeight"), e.copyToObject(M, "outlineLevelRow", V, "outlineLevelRow");
|
|
1293
|
+
} }), u.registerVisitor({ from: "cols", to: "cols", openTag: (e) => {
|
|
1294
|
+
e.setSource([]);
|
|
1295
|
+
} }), u.registerVisitor({ from: "col", to: [], openTag: (e) => {
|
|
1296
|
+
e.copyTo("min", (r) => parseInt(r) - 1), e.copyTo("max", (r) => parseInt(r) - 1), e.copyTo("sz", xt, "width"), e.copyTo("cs", A, "customWidth"), e.copyTo("h", A, "hidden"), e.copyTo("l", V, "outlineLevel"), e.copyTo("s", V, "style");
|
|
1297
|
+
} }), u.registerVisitor({ from: "oleObjects", to: null, openTag: (e) => {
|
|
1298
|
+
e.warn("'OLE Objects' are not supported.");
|
|
1299
|
+
} });
|
|
1300
|
+
let Qt = null;
|
|
1301
|
+
const ve = { onOpenTag: (e) => {
|
|
1302
|
+
Qt === null && (Qt = "");
|
|
1303
|
+
}, onText: (e) => {
|
|
1304
|
+
Qt += e;
|
|
1305
|
+
}, onEnd: () => {
|
|
1306
|
+
const e = Gt(Qt);
|
|
1307
|
+
return Qt = null, e;
|
|
1308
|
+
}, onError: (e) => {
|
|
1309
|
+
} };
|
|
1310
|
+
return ts(at, M, u.createEventHandler(M, () => {
|
|
1311
|
+
}, st), st, (e) => {
|
|
1312
|
+
y += e, k?.(y);
|
|
1313
|
+
}, ve, Vt);
|
|
1314
|
+
})(j, (M, _ = !1) => ft(M, g, _) ?? null, Ct, E, 0, (M, _) => {
|
|
1315
|
+
_ = _ ? `${_} (${g})` : g, n.push([M, _]);
|
|
1316
|
+
}, 0, vt), J = fe(g, z), dt = await (async (M, _ = 8388608) => {
|
|
1317
|
+
await (async () => {
|
|
1318
|
+
if (typeof ReadableStream > "u") if (typeof window > "u") {
|
|
1319
|
+
const { ReadableStream: st } = await import("./C2IXaoRd-J1b0n7I.js");
|
|
1320
|
+
globalThis.ReadableStream = st;
|
|
1321
|
+
} else console.warn("Browser does not support ReadableStream; consider loading a polyfill.");
|
|
1322
|
+
})();
|
|
1323
|
+
const Gt = new TextDecoder("utf-8");
|
|
1324
|
+
let et = 0;
|
|
1325
|
+
const nt = M instanceof Uint8Array ? M : new Uint8Array(M);
|
|
1326
|
+
return new ReadableStream({ pull(st) {
|
|
1327
|
+
if (et >= nt.byteLength) return void st.close();
|
|
1328
|
+
const Zt = nt.subarray(et, Math.min(et + _, nt.byteLength)), Vt = Gt.decode(Zt, { stream: et + _ < nt.byteLength });
|
|
1329
|
+
st.enqueue(Vt), et += Zt.length;
|
|
1330
|
+
} }).getReader();
|
|
1331
|
+
})(J);
|
|
1332
|
+
try {
|
|
1333
|
+
await le.parseStream(dt, tt, { xmlns: !1 });
|
|
1334
|
+
} catch (M) {
|
|
1335
|
+
throw console.warn(`Error parsing sheet: '${g}'`, M), new Error(`Error parsing sheet: '${g}'`, { cause: M });
|
|
1336
|
+
}
|
|
1337
|
+
const kt = rt(g, T);
|
|
1338
|
+
let K, Pt = /* @__PURE__ */ new Map();
|
|
1339
|
+
if (kt) {
|
|
1340
|
+
const M = "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";
|
|
1341
|
+
let _;
|
|
1342
|
+
kt.forEach((et, nt) => {
|
|
1343
|
+
et.type === M && (K = ft(nt, g, !1, T)?.comments, K && K.forEach((st) => {
|
|
1344
|
+
Pt.set(st.id, st);
|
|
1345
|
+
}));
|
|
1346
|
+
});
|
|
1347
|
+
const Gt = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
1348
|
+
if (kt.forEach((et, nt) => {
|
|
1349
|
+
et.type === Gt && (_ = ft(nt, g, !1, T));
|
|
1350
|
+
}), _ || K) {
|
|
1351
|
+
const et = K ?? [], nt = _?.comments;
|
|
1352
|
+
if (nt) {
|
|
1353
|
+
const st = _?.authors, Zt = nt.length;
|
|
1354
|
+
for (let Vt = 0; Vt < Zt; Vt++) {
|
|
1355
|
+
const u = nt[Vt];
|
|
1356
|
+
if (!u) continue;
|
|
1357
|
+
let at = st && u.authorId !== void 0 ? st[u.authorId] : u.authorId;
|
|
1358
|
+
if (at && at.startsWith("tc=") && (at = Je(at.substring(3)), Pt.has(at))) continue;
|
|
1359
|
+
let F = null;
|
|
1360
|
+
at && (F = ct.get(at)), F || (F = Tt.get(at)), F || (F = { id: re.uuidV4(), displayName: at }, Tt.set(F.displayName, F), ct.set(F.id, F)), at = F?.id ?? null;
|
|
1361
|
+
const ee = { id: re.uuidV4(), personId: at, ref: u.ref, done: !1, asNote: !0, content: u.content };
|
|
1362
|
+
et.push(ee);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
j.comments = et;
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
W.push(X());
|
|
1370
|
+
} else U = d ? fe(g, z, (j) => {
|
|
1371
|
+
const X = q.add({ buffer: j });
|
|
1372
|
+
return X.addReference(Dt), zt.add(X), ot.toResourceId(X);
|
|
1373
|
+
}, lt) : ce(g, z, D, w, lt);
|
|
1374
|
+
return U;
|
|
1375
|
+
}, lt = { paramMap: vt, getRefs: rt, getRef: ft, parsedRefs: gt, addPerson: (v) => null }, Et = [];
|
|
1376
|
+
let Ht = 0;
|
|
1377
|
+
l.Strings && (Ht = parseInt(l.Strings.Unique ?? l.Strings.length ?? 0));
|
|
1378
|
+
const ht = l.Strings ?? [];
|
|
1379
|
+
for (let v = 0; v < Ht; v++) Et.push(ht[v]?.t ?? "");
|
|
1380
|
+
const St = /* @__PURE__ */ new Map();
|
|
1381
|
+
let mt = Ht;
|
|
1382
|
+
const Ct = (v) => {
|
|
1383
|
+
const H = St.get(v);
|
|
1384
|
+
if (H !== void 0) return H;
|
|
1385
|
+
const d = mt;
|
|
1386
|
+
return St.set(v, mt++), Et.push(v), d;
|
|
1387
|
+
}, ct = (Bt("richstructure", l, D, w, lt), Bt("richdata", l, D, w, lt), /* @__PURE__ */ new Map()), Tt = /* @__PURE__ */ new Map(), yt = Bt("people", l, D, w);
|
|
1388
|
+
let Z = null;
|
|
1389
|
+
if (yt.size > 0 && (Z = yt.entries().next()?.value?.[1]?.persons, Z)) {
|
|
1390
|
+
const v = Z.length;
|
|
1391
|
+
for (let H = 0; H < v; H++) {
|
|
1392
|
+
const d = Z[H];
|
|
1393
|
+
ct.set(d.id, d), ct.set(d.displayName, d);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const jt = Bt("themes", l, D, w, lt);
|
|
1397
|
+
let Ut = null;
|
|
1398
|
+
if (jt && jt.entries) {
|
|
1399
|
+
let v = jt.entries().next();
|
|
1400
|
+
v?.value?.[1] && (Ut = v.value[1]);
|
|
1401
|
+
}
|
|
1402
|
+
const Kt = new ke(Ut);
|
|
1403
|
+
let It = Bt("styles", l, D, w, lt).entries().next()?.value[1];
|
|
1404
|
+
It && (It = JSON.parse(Ae(It)));
|
|
1405
|
+
const Yt = Bt("workbooks", l, D, w, lt);
|
|
1406
|
+
await Promise.all(W);
|
|
1407
|
+
const Xt = { ...Yt.entries().next().value[1], styles: It, theme: Kt.toJSON() };
|
|
1408
|
+
Et.length > 0 && (Xt.strings = Et), Z && Z.length > 0 && (Xt.people = Z);
|
|
1409
|
+
const te = { ...o, resources: q, json: Xt }, ut = new De(te);
|
|
1410
|
+
if (zt.forEach((v) => {
|
|
1411
|
+
v.deleteReference(Dt);
|
|
1412
|
+
}), ot.endPersist(), n.length) {
|
|
1413
|
+
const v = c?.onWarning;
|
|
1414
|
+
if (v) for (const H of n) {
|
|
1415
|
+
const [d, T] = H;
|
|
1416
|
+
v(d, T);
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
return c?.onComplete?.(y), ut;
|
|
1420
|
+
} catch (l) {
|
|
1421
|
+
let w = "Unable to parse XLSX.";
|
|
1422
|
+
throw l instanceof Oe && (w = "Unable to open XLSX. There are too many rows or columns."), new Error(w, { cause: l });
|
|
1423
|
+
}
|
|
1424
|
+
}, toBufferXLSX: async (i, t) => {
|
|
1425
|
+
const s = await import("./swe5uQxGiNoljwcZ.js"), o = await i.toJSON(!0), a = s.utils.book_new();
|
|
1426
|
+
for (let n = 0; n < o.sheets.length; n++) {
|
|
1427
|
+
const c = o.sheets[n], p = s.utils.json_to_sheet([{}]);
|
|
1428
|
+
s.utils.book_append_sheet(a, p, c.name);
|
|
1429
|
+
const k = c.sheet, y = i.getSheetAt(n), S = y.getUsedRange();
|
|
1430
|
+
if (S ? (p["!ref"] = S.getA1(), S.forEach((C, b) => {
|
|
1431
|
+
const O = { t: "z" }, I = b.getCell().getStyle();
|
|
1432
|
+
if (!I.isNormal()) {
|
|
1433
|
+
let x = I.getNumberFormat();
|
|
1434
|
+
x !== Nt.Type.General && (x === Nt.Type.ShortDate ? x = "m/d/yyyy" : x === Nt.Type.MediumDate ? x = "d-mmm-yy" : x === Nt.Type.LongDate ? x = "[$-x-sysdate]dddd, mmmm dd, yyyy" : x === Nt.Type.ShortTime ? x = "h:mm" : x === Nt.Type.MediumTime ? x = "h:mm AM/PM" : x === Nt.Type.LongTime && (x = "h:mm:ss AM/PM"), O.z = x);
|
|
1435
|
+
}
|
|
1436
|
+
if (C !== null) switch (b.getType()) {
|
|
1437
|
+
case Mt.Number:
|
|
1438
|
+
O.t = "n", O.v = C;
|
|
1439
|
+
break;
|
|
1440
|
+
case Mt.String:
|
|
1441
|
+
O.t = "s", O.v = C;
|
|
1442
|
+
break;
|
|
1443
|
+
case Mt.Boolean:
|
|
1444
|
+
O.t = "b", O.v = C;
|
|
1445
|
+
break;
|
|
1446
|
+
case Mt.Error:
|
|
1447
|
+
O.t = "e", O.v = C.toString();
|
|
1448
|
+
case Mt.RichData:
|
|
1449
|
+
}
|
|
1450
|
+
p[b.getA1()] = O;
|
|
1451
|
+
})) : p["!ref"] = "A1:A1", k.merges?.length > 0) {
|
|
1452
|
+
const C = [];
|
|
1453
|
+
p["!merges"] = C;
|
|
1454
|
+
for (let b = 0; b < k.merges.length; b++) C.push(s.utils.decode_range(k.merges[b]));
|
|
1455
|
+
}
|
|
1456
|
+
if (k.cols?.length > 0) {
|
|
1457
|
+
const C = [];
|
|
1458
|
+
p["!cols"] = C;
|
|
1459
|
+
const b = k.cols, O = { width: k.defaultColSize ?? y.getColumnWidthAsFontUnit(y.getColumnHeaders().getDefaultSize()) };
|
|
1460
|
+
for (let I = 0; I < b.length; I++) {
|
|
1461
|
+
const x = b[I];
|
|
1462
|
+
for (let l = C.length; l <= x.min - 1; l++) C.push(O);
|
|
1463
|
+
const f = {};
|
|
1464
|
+
x.sz !== void 0 && (f.width = x.sz), x.h !== void 0 && (f.hidden = x.h), x.l !== void 0 && (f.level = x.l);
|
|
1465
|
+
for (let l = x.min; l <= x.max; l++) C.push(f);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
return s.write(a, { type: "array", bookType: "xlsx" }), s.write(a, { type: "array", bookType: "xlsx" });
|
|
1470
|
+
} }, Symbol.toStringTag, { value: "Module" }));
|
|
1471
|
+
export {
|
|
1472
|
+
os as a,
|
|
1473
|
+
Ke as b,
|
|
1474
|
+
is as c,
|
|
1475
|
+
me as d,
|
|
1476
|
+
ns as i,
|
|
1477
|
+
rs as p,
|
|
1478
|
+
Je as r,
|
|
1479
|
+
ss as t
|
|
1480
|
+
};
|